diff options
Diffstat (limited to 'release.nix')
-rw-r--r-- | release.nix | 104 |
1 files changed, 60 insertions, 44 deletions
diff --git a/release.nix b/release.nix index cfec7b9e774c..4803788fe009 100644 --- a/release.nix +++ b/release.nix @@ -1,4 +1,5 @@ { nix ? { outPath = ./.; revCount = 1234; shortRev = "abcdef"; } +, nixpkgs ? { outPath = <nixpkgs>; revCount = 1234; shortRev = "abcdef"; } , officialRelease ? false }: @@ -23,9 +24,10 @@ let inherit officialRelease; buildInputs = - [ curl bison flex perl libxml2 libxslt bzip2 - tetex dblatex nukeReferences pkgconfig sqlite libsodium + [ curl bison flex perl libxml2 libxslt bzip2 xz + pkgconfig sqlite libsodium docbook5 docbook5_xsl + autoconf-archive ] ++ lib.optional (!lib.inNixShell) git; configureFlags = '' @@ -36,7 +38,9 @@ let postUnpack = '' # Clean up when building from a working tree. - (cd $sourceRoot && (git ls-files -o | xargs -r rm -v)) + if [[ -d $sourceRoot/.git ]]; then + git -C $sourceRoot clean -fd + fi ''; preConfigure = '' @@ -54,20 +58,7 @@ let preDist = '' make install docdir=$out/share/doc/nix makefiles=doc/manual/local.mk - - make doc/manual/manual.pdf - cp doc/manual/manual.pdf $out/manual.pdf - - # The PDF containes filenames of included graphics (see - # http://www.tug.org/pipermail/pdftex/2007-August/007290.html). - # This causes a retained dependency on dblatex, which Hydra - # doesn't like (the output of the tarball job is distributed - # to Windows and Macs, so there should be no Linux binaries - # in the closure). - nuke-refs $out/manual.pdf - echo "doc manual $out/share/doc/nix/manual" >> $out/nix-support/hydra-build-products - echo "doc-pdf manual $out/manual.pdf" >> $out/nix-support/hydra-build-products ''; }; @@ -81,8 +72,13 @@ let src = tarball; buildInputs = - [ curl perl bzip2 openssl pkgconfig sqlite boehmgc ] - ++ lib.optional stdenv.isLinux libsodium; + [ curl perl bzip2 xz openssl pkgconfig sqlite boehmgc ] + ++ lib.optional stdenv.isLinux libsodium + ++ lib.optional stdenv.isLinux + (aws-sdk-cpp.override { + apis = ["s3"]; + customMemoryManagement = false; + }); configureFlags = '' --disable-init-state @@ -108,6 +104,7 @@ let binaryTarball = pkgs.lib.genAttrs systems (system: + # FIXME: temporarily use a different branch for the Darwin build. with import <nixpkgs> { inherit system; }; let @@ -150,7 +147,7 @@ let src = tarball; buildInputs = - [ curl perl bzip2 openssl pkgconfig sqlite + [ curl perl bzip2 openssl pkgconfig sqlite xz libsodium # These are for "make check" only: graphviz libxml2 libxslt ]; @@ -175,8 +172,6 @@ let }; - rpm_fedora18i386 = makeRPM_i686 (diskImageFuns: diskImageFuns.fedora18i386) []; - rpm_fedora18x86_64 = makeRPM_x86_64 (diskImageFunsFun: diskImageFunsFun.fedora18x86_64) []; rpm_fedora19i386 = makeRPM_i686 (diskImageFuns: diskImageFuns.fedora19i386) []; rpm_fedora19x86_64 = makeRPM_x86_64 (diskImageFunsFun: diskImageFunsFun.fedora19x86_64) []; rpm_fedora20i386 = makeRPM_i686 (diskImageFuns: diskImageFuns.fedora20i386) []; @@ -185,23 +180,21 @@ let rpm_fedora21x86_64 = makeRPM_x86_64 (diskImageFunsFun: diskImageFunsFun.fedora21x86_64) [ "libsodium-devel" ]; - deb_debian7i386 = makeDeb_i686 (diskImageFuns: diskImageFuns.debian7i386) []; - deb_debian7x86_64 = makeDeb_x86_64 (diskImageFunsFun: diskImageFunsFun.debian7x86_64) []; - deb_debian8i386 = makeDeb_i686 (diskImageFuns: diskImageFuns.debian8i386) [ "libsodium-dev" ]; - deb_debian8x86_64 = makeDeb_x86_64 (diskImageFunsFun: diskImageFunsFun.debian8x86_64) [ "libsodium-dev" ]; + deb_debian8i386 = makeDeb_i686 (diskImageFuns: diskImageFuns.debian8i386) [ "libsodium-dev" ] [ "libsodium18" ]; + deb_debian8x86_64 = makeDeb_x86_64 (diskImageFunsFun: diskImageFunsFun.debian8x86_64) [ "libsodium-dev" ] [ "libsodium18" ]; - deb_ubuntu1210i386 = makeDeb_i686 (diskImageFuns: diskImageFuns.ubuntu1210i386) []; - deb_ubuntu1210x86_64 = makeDeb_x86_64 (diskImageFuns: diskImageFuns.ubuntu1210x86_64) []; - deb_ubuntu1304i386 = makeDeb_i686 (diskImageFuns: diskImageFuns.ubuntu1304i386) []; - deb_ubuntu1304x86_64 = makeDeb_x86_64 (diskImageFuns: diskImageFuns.ubuntu1304x86_64) []; - deb_ubuntu1310i386 = makeDeb_i686 (diskImageFuns: diskImageFuns.ubuntu1310i386) []; - deb_ubuntu1310x86_64 = makeDeb_x86_64 (diskImageFuns: diskImageFuns.ubuntu1310x86_64) []; - deb_ubuntu1404i386 = makeDeb_i686 (diskImageFuns: diskImageFuns.ubuntu1404i386) []; - deb_ubuntu1404x86_64 = makeDeb_x86_64 (diskImageFuns: diskImageFuns.ubuntu1404x86_64) []; - deb_ubuntu1410i386 = makeDeb_i686 (diskImageFuns: diskImageFuns.ubuntu1410i386) []; - deb_ubuntu1410x86_64 = makeDeb_x86_64 (diskImageFuns: diskImageFuns.ubuntu1410x86_64) []; - deb_ubuntu1504i386 = makeDeb_i686 (diskImageFuns: diskImageFuns.ubuntu1504i386) [ "libsodium-dev" ]; - deb_ubuntu1504x86_64 = makeDeb_x86_64 (diskImageFuns: diskImageFuns.ubuntu1504x86_64) [ "libsodium-dev" ]; + deb_ubuntu1310i386 = makeDeb_i686 (diskImageFuns: diskImageFuns.ubuntu1310i386) [] []; + deb_ubuntu1310x86_64 = makeDeb_x86_64 (diskImageFuns: diskImageFuns.ubuntu1310x86_64) [] []; + deb_ubuntu1404i386 = makeDeb_i686 (diskImageFuns: diskImageFuns.ubuntu1404i386) [] []; + deb_ubuntu1404x86_64 = makeDeb_x86_64 (diskImageFuns: diskImageFuns.ubuntu1404x86_64) [] []; + deb_ubuntu1410i386 = makeDeb_i686 (diskImageFuns: diskImageFuns.ubuntu1410i386) [] []; + deb_ubuntu1410x86_64 = makeDeb_x86_64 (diskImageFuns: diskImageFuns.ubuntu1410x86_64) [] []; + deb_ubuntu1504i386 = makeDeb_i686 (diskImageFuns: diskImageFuns.ubuntu1504i386) [ "libsodium-dev" ] [ "libsodium13" ]; + deb_ubuntu1504x86_64 = makeDeb_x86_64 (diskImageFuns: diskImageFuns.ubuntu1504x86_64) [ "libsodium-dev" ] [ "libsodium13" ]; + deb_ubuntu1510i386 = makeDeb_i686 (diskImageFuns: diskImageFuns.ubuntu1510i386) [ "libsodium-dev" ] [ "libsodium13"]; + deb_ubuntu1510x86_64 = makeDeb_x86_64 (diskImageFuns: diskImageFuns.ubuntu1510x86_64) [ "libsodium-dev" ] [ "libsodium13" ]; + deb_ubuntu1604i386 = makeDeb_i686 (diskImageFuns: diskImageFuns.ubuntu1604i386) [ "libsodium-dev" ] [ "libsodium18" ]; + deb_ubuntu1604x86_64 = makeDeb_x86_64 (diskImageFuns: diskImageFuns.ubuntu1604x86_64) [ "libsodium-dev" ] [ "libsodium18" ]; # System tests. @@ -230,6 +223,26 @@ let touch $out/nix-support/hydra-build-products ''); # */ + tests.evalNixpkgs = + import <nixpkgs/pkgs/top-level/make-tarball.nix> { + inherit nixpkgs; + inherit pkgs; + nix = build.x86_64-linux; + officialRelease = false; + }; + + tests.evalNixOS = + pkgs.runCommand "eval-nixos" { buildInputs = [ build.x86_64-linux ]; } + '' + export NIX_DB_DIR=$TMPDIR + export NIX_STATE_DIR=$TMPDIR + nix-store --init + + nix-instantiate ${nixpkgs}/nixos/release-combined.nix -A tested --dry-run + + touch $out + ''; + # Aggregate job containing the release-critical jobs. release = pkgs.releaseTools.aggregate { @@ -247,8 +260,8 @@ let binaryTarball.x86_64-darwin #binaryTarball.x86_64-freebsd binaryTarball.x86_64-linux - deb_debian7i386 - deb_debian7x86_64 + deb_debian8i386 + deb_debian8x86_64 deb_ubuntu1404i386 # LTS deb_ubuntu1404x86_64 # LTS deb_ubuntu1504i386 @@ -260,6 +273,8 @@ let tests.remoteBuilds tests.nix-copy-closure tests.binaryTarball + tests.evalNixpkgs + tests.evalNixOS ]; }; @@ -279,7 +294,7 @@ let src = jobs.tarball; diskImage = (diskImageFun vmTools.diskImageFuns) { extraPackages = - [ "perl-DBD-SQLite" "perl-devel" "sqlite" "sqlite-devel" "bzip2-devel" "emacs" "perl-WWW-Curl" "libcurl-devel" ] + [ "perl-DBD-SQLite" "perl-devel" "sqlite" "sqlite-devel" "bzip2-devel" "emacs" "perl-WWW-Curl" "libcurl-devel" "openssl-devel" "xz-devel" ] ++ extraPackages; }; memSize = 1024; meta.schedulingPriority = 50; @@ -291,7 +306,7 @@ let makeDeb_x86_64 = makeDeb "x86_64-linux"; makeDeb = - system: diskImageFun: extraPackages: + system: diskImageFun: extraPackages: extraDebPackages: with import <nixpkgs> { inherit system; }; @@ -300,14 +315,15 @@ let src = jobs.tarball; diskImage = (diskImageFun vmTools.diskImageFuns) { extraPackages = - [ "libdbd-sqlite3-perl" "libsqlite3-dev" "libbz2-dev" "libwww-curl-perl" "libcurl-dev" ] + [ "libdbd-sqlite3-perl" "libsqlite3-dev" "libbz2-dev" "libwww-curl-perl" "libcurl-dev" "libcurl3-nss" "libssl-dev" "liblzma-dev" ] ++ extraPackages; }; memSize = 1024; meta.schedulingPriority = 50; + postInstall = "make installcheck"; configureFlags = "--sysconfdir=/etc"; debRequires = - [ "curl" "libdbd-sqlite3-perl" "libsqlite3-0" "libbz2-1.0" "bzip2" "xz-utils" "libwww-curl-perl" ] - ++ lib.optionals (lib.elem "libsodium-dev" extraPackages) [ "libsodium13" ] ; + [ "curl" "libdbd-sqlite3-perl" "libsqlite3-0" "libbz2-1.0" "bzip2" "xz-utils" "libwww-curl-perl" "libssl1.0.0" "liblzma5" ] + ++ extraDebPackages; debMaintainer = "Eelco Dolstra <eelco.dolstra@logicblox.com>"; doInstallCheck = true; }; |