Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (lambda
- [["nix"
- (apply
- (select (var_ "builtins") ["fetchGit"])
- (path "/Users/dottedmag/Downloads/nixdump"))]
- ["nixpkgs"
- (apply
- (select (var_ "builtins") ["fetchGit"])
- {url "https://github.com/NixOS/nixpkgs.git", ref "nix-2.0"})]
- ["officialRelease" (var_ "false")]
- ["systems"
- (list "x86_64-linux" "i686-linux" "x86_64-darwin" "aarch64-linux")]
- :as
- ""]
- (let
- {pkgs
- (apply
- (apply (var_ "import") (var_ "nixpkgs"))
- {system
- (select (var_ "builtins") ["currentSystem"] :or "x86_64-linux")}),
- jobs
- {deb_ubuntu1610i386
- (apply
- (apply
- (apply
- (var_ "makeDeb_i686")
- (lambda
- [:as "diskImageFuns"]
- (select (var_ "diskImageFuns") ["ubuntu1610i386"])))
- (list "libsodium-dev"))
- (list "libsodium18")),
- perlBindings
- (apply
- (apply (select (var_ "pkgs") ["lib" "genAttrs"]) (var_ "systems"))
- (lambda
- [:as "system"]
- (let
- {pkgs
- (apply
- (apply (var_ "import") (var_ "nixpkgs"))
- {system :inherited})}
- (with
- (var_ "pkgs")
- (apply
- (select (var_ "releaseTools") ["nixBuild"])
- {name "nix-perl",
- src (var_ "tarball"),
- buildInputs
- (op-concat-lists
- (list
- (apply
- (apply
- (select (var_ "builtins") ["getAttr"])
- (var_ "system"))
- (select (var_ "jobs") ["build"]))
- (var_ "curl")
- (var_ "bzip2")
- (var_ "xz")
- (var_ "pkgconfig")
- (select (var_ "pkgs") ["perl"]))
- (apply
- (apply
- (select (var_ "lib") ["optional"])
- (op-or
- (select (var_ "stdenv") ["isLinux"])
- (select (var_ "stdenv") ["isDarwin"])))
- (var_ "libsodium"))),
- configureFlags
- (concat
- "--with-dbi="
- (select (var_ "perlPackages") ["DBI"])
- "/"
- (select (var_ "pkgs") ["perl" "libPrefix"])
- "\n--with-dbd-sqlite="
- (select (var_ "perlPackages") ["DBDSQLite"])
- "/"
- (select (var_ "pkgs") ["perl" "libPrefix"])
- "\n"),
- postUnpack "sourceRoot=$sourceRoot/perl",
- enableParallelBuilding (var_ "true"),
- preBuild "unset NIX_INDENT_MAKE"}))))),
- binaryTarball
- (apply
- (apply (select (var_ "pkgs") ["lib" "genAttrs"]) (var_ "systems"))
- (lambda
- [:as "system"]
- (with
- (apply
- (apply (var_ "import") (var_ "nixpkgs"))
- {system :inherited})
- (let
- {version (select (var_ "toplevel") ["src" "version"]),
- toplevel
- (apply
- (apply
- (select (var_ "builtins") ["getAttr"])
- (var_ "system"))
- (select (var_ "jobs") ["build"]))}
- (apply
- (apply
- (apply
- (var_ "runCommand")
- (concat "nix-binary-tarball-" (var_ "version")))
- {meta
- {description
- (concat
- "Distribution-independent Nix bootstrap binaries for "
- (var_ "system"))},
- buildInputs
- (op-concat-lists
- (list (var_ "perl"))
- (apply
- (apply
- (select (var_ "lib") ["optional"])
- (op-neq (var_ "system") "aarch64-linux"))
- (var_ "shellcheck"))),
- exportReferencesGraph
- (list
- "closure1"
- (var_ "toplevel")
- "closure2"
- (var_ "cacert"))})
- (concat
- "storePaths=$(perl "
- (var_ "pathsFromGraph")
- " ./closure1 ./closure2)\nprintRegistration=1 perl "
- (var_ "pathsFromGraph")
- " ./closure1 ./closure2 > $TMPDIR/reginfo\nsubstitute "
- (path
- "/Users/dottedmag/Downloads/nixdump/scripts/install-nix-from-closure.sh")
- " $TMPDIR/install \n --subst-var-by nix "
- (var_ "toplevel")
- " \n --subst-var-by cacert "
- (var_ "cacert")
- "\nsubstitute "
- (path
- "/Users/dottedmag/Downloads/nixdump/scripts/install-darwin-multi-user.sh")
- " $TMPDIR/install-darwin-multi-user \n --subst-var-by nix "
- (var_ "toplevel")
- " \n --subst-var-by cacert "
- (var_ "cacert")
- "\n\nif type -p shellcheck; then\n shellcheck -e SC1090 $TMPDIR/install\n shellcheck -e SC1091,SC2002 $TMPDIR/install-darwin-multi-user\nfi\n\nchmod +x $TMPDIR/install\nchmod +x $TMPDIR/install-darwin-multi-user\ndir=nix-"
- (var_ "version")
- "-"
- (var_ "system")
- "\nfn=$out/$dir.tar.bz2\nmkdir -p $out/nix-support\necho \"file binary-dist $fn\" >> $out/nix-support/hydra-build-products\ntar cvfj $fn \n --owner=0 --group=0 --mode=u+rw,uga+r \n --absolute-names \n --hard-dereference \n --transform \"s,$TMPDIR/install,$dir/install,\" \n --transform \"s,$TMPDIR/reginfo,$dir/.reginfo,\" \n --transform \"s,$NIX_STORE,$dir/store,S\" \n $TMPDIR/install $TMPDIR/install-darwin-multi-user $TMPDIR/reginfo $storePaths\n")))))),
- tests
- {binaryTarball
- (with
- (apply
- (apply (var_ "import") (var_ "nixpkgs"))
- {system "x86_64-linux"})
- (apply
- (select (var_ "vmTools") ["runInLinuxImage"])
- (apply
- (apply
- (apply (var_ "runCommand") "nix-binary-tarball-test")
- {diskImage
- (select (var_ "vmTools") ["diskImages" "ubuntu1204x86_64"])})
- (concat
- "useradd -m alice\nsu - alice -c 'tar xf "
- (select (var_ "binaryTarball") ["x86_64-linux"])
- "/*.tar.*'\nmkdir /dest-nix\nmount -o bind /dest-nix /nix # Provide a writable /nix.\nchown alice /nix\nsu - alice -c '_NIX_INSTALLER_TEST=1 ./nix-*/install'\nsu - alice -c 'nix-store --verify'\nsu - alice -c 'PAGER= nix-store -qR "
- (select (var_ "build") ["x86_64-linux"])
- "'\nmkdir -p $out/nix-support\ntouch $out/nix-support/hydra-build-products\numount /nix\n")))),
- remoteBuilds
- (apply
- (apply
- (var_ "import")
- (path
- "/Users/dottedmag/Downloads/nixdump/tests/remote-builds.nix"))
- {system "x86_64-linux",
- nix (select (var_ "build") ["x86_64-linux"]),
- nixpkgs :inherited}),
- nix-copy-closure
- (apply
- (apply
- (var_ "import")
- (path
- "/Users/dottedmag/Downloads/nixdump/tests/nix-copy-closure.nix"))
- {system "x86_64-linux",
- nix (select (var_ "build") ["x86_64-linux"]),
- nixpkgs :inherited}),
- setuid
- (apply
- (apply
- (select (var_ "pkgs") ["lib" "genAttrs"])
- (list "i686-linux" "x86_64-linux"))
- (lambda
- [:as "system"]
- (apply
- (apply
- (var_ "import")
- (path "/Users/dottedmag/Downloads/nixdump/tests/setuid.nix"))
- {system :inherited,
- nix (select (var_ "build") [(var_ "system")]),
- nixpkgs :inherited}))),
- evalNixpkgs
- (apply
- (apply
- (var_ "import")
- (concat (var_ "nixpkgs") "/pkgs/top-level/make-tarball.nix"))
- {nix (select (var_ "build") ["x86_64-linux"]),
- nixpkgs :inherited,
- officialRelease (var_ "false"),
- pkgs :inherited}),
- evalNixOS
- (apply
- (apply
- (apply (select (var_ "pkgs") ["runCommand"]) "eval-nixos")
- {buildInputs (list (select (var_ "build") ["x86_64-linux"]))})
- (concat
- "export NIX_STATE_DIR=$TMPDIR\nnix-store --init\n\nnix-instantiate "
- (var_ "nixpkgs")
- "/nixos/release-combined.nix -A tested --dry-run\n\ntouch $out\n"))},
- release
- (apply
- (select (var_ "pkgs") ["releaseTools" "aggregate"])
- {meta {description "Release-critical builds"},
- name (concat "nix-" (select (var_ "tarball") ["version"])),
- constituents
- (list
- (var_ "tarball")
- (select (var_ "build") ["i686-linux"])
- (select (var_ "build") ["x86_64-darwin"])
- (select (var_ "build") ["x86_64-linux"])
- (select (var_ "binaryTarball") ["i686-linux"])
- (select (var_ "binaryTarball") ["x86_64-darwin"])
- (select (var_ "binaryTarball") ["x86_64-linux"])
- (var_ "deb_ubuntu1604i386")
- (var_ "deb_ubuntu1604x86_64")
- (var_ "rpm_fedora25i386")
- (var_ "rpm_fedora25x86_64")
- (select (var_ "tests") ["remoteBuilds"])
- (select (var_ "tests") ["nix-copy-closure"])
- (select (var_ "tests") ["binaryTarball"])
- (select (var_ "tests") ["evalNixpkgs"])
- (select (var_ "tests") ["evalNixOS"]))}),
- coverage
- (with
- (apply
- (apply (var_ "import") (var_ "nixpkgs"))
- {system "x86_64-linux"})
- (apply
- (select (var_ "releaseTools") ["coverageAnalysis"])
- {name "nix-build",
- src (var_ "tarball"),
- buildInputs
- (list
- (var_ "curl")
- (var_ "bzip2")
- (var_ "openssl")
- (var_ "pkgconfig")
- (var_ "sqlite")
- (var_ "xz")
- (var_ "libsodium")
- (var_ "libseccomp")
- (var_ "graphviz")
- (var_ "libxml2")
- (var_ "libxslt")
- (var_ "git")
- (var_ "mercurial")),
- configureFlags "--disable-init-state\n",
- doInstallCheck (var_ "true"),
- dontInstall (var_ "false"),
- lcovFilter
- (list "*/boost/*" "*-tab.*" "*/nlohmann/*" "*/linenoise/*"),
- FONTCONFIG_FILE (select (var_ "texFunctions") ["fontsConf"])})),
- deb_ubuntu1604i386
- (apply
- (apply
- (apply
- (var_ "makeDeb_i686")
- (lambda
- [:as "diskImageFuns"]
- (select (var_ "diskImageFuns") ["ubuntu1604i386"])))
- (list "libsodium-dev"))
- (list "libsodium18")),
- deb_ubuntu1604x86_64
- (apply
- (apply
- (apply
- (var_ "makeDeb_x86_64")
- (lambda
- [:as "diskImageFuns"]
- (select (var_ "diskImageFuns") ["ubuntu1604x86_64"])))
- (list "libsodium-dev"))
- (list "libsodium18")),
- deb_ubuntu1610x86_64
- (apply
- (apply
- (apply
- (var_ "makeDeb_x86_64")
- (lambda
- [:as "diskImageFuns"]
- (select (var_ "diskImageFuns") ["ubuntu1610x86_64"])))
- (list "libsodium-dev"))
- (list "libsodium18")),
- rpm_fedora25i386
- (apply
- (apply
- (var_ "makeRPM_i686")
- (lambda
- [:as "diskImageFuns"]
- (select (var_ "diskImageFuns") ["fedora25i386"])))
- (list "libsodium-devel")),
- build
- (apply
- (apply (select (var_ "pkgs") ["lib" "genAttrs"]) (var_ "systems"))
- (lambda
- [:as "system"]
- (with
- (apply
- (apply (var_ "import") (var_ "nixpkgs"))
- {system :inherited})
- (with
- (apply
- (apply
- (var_ "import")
- (path
- "/Users/dottedmag/Downloads/nixdump/release-common.nix"))
- {pkgs :inherited})
- (apply
- (select (var_ "releaseTools") ["nixBuild"])
- {doInstallCheck (var_ "true"),
- installFlags "sysconfdir=$(out)/etc",
- enableParallelBuilding (var_ "true"),
- name "nix",
- buildInputs
- (op-concat-lists
- (list
- (var_ "curl")
- (var_ "bzip2")
- (var_ "xz")
- (var_ "brotli")
- (var_ "openssl")
- (var_ "pkgconfig")
- (var_ "sqlite")
- (var_ "boehmgc")
- (var_ "git")
- (var_ "mercurial"))
- (op-concat-lists
- (apply
- (apply
- (select (var_ "lib") ["optional"])
- (select (var_ "stdenv") ["isLinux"]))
- (var_ "libseccomp"))
- (op-concat-lists
- (apply
- (apply
- (select (var_ "lib") ["optional"])
- (op-or
- (select (var_ "stdenv") ["isLinux"])
- (select (var_ "stdenv") ["isDarwin"])))
- (var_ "libsodium"))
- (apply
- (apply
- (select (var_ "lib") ["optional"])
- (op-or
- (select (var_ "stdenv") ["isLinux"])
- (select (var_ "stdenv") ["isDarwin"])))
- (apply
- (select (var_ "aws-sdk-cpp") ["override"])
- {apis (list "s3"),
- customMemoryManagement (var_ "false")}))))),
- configureFlags
- (op-concat-lists
- (var_ "configureFlags")
- (list "--sysconfdir=/etc")),
- src (var_ "tarball"),
- installCheckFlags "sysconfdir=$(out)/etc",
- makeFlags "profiledir=$(out)/etc/profile.d",
- preBuild "unset NIX_INDENT_MAKE"}))))),
- rpm_fedora25x86_64
- (apply
- (apply
- (var_ "makeRPM_x86_64")
- (lambda
- [:as "diskImageFunsFun"]
- (select (var_ "diskImageFunsFun") ["fedora25x86_64"])))
- (list "libsodium-devel")),
- tarball
- (with
- (var_ "pkgs")
- (apply
- (select (var_ "releaseTools") ["sourceTarball"])
- {version
- (apply
- (select (var_ "builtins") ["readFile"])
- (path "/Users/dottedmag/Downloads/nixdump/version")),
- versionSuffix
- (if
- (var_ "officialRelease")
- ""
- (concat
- "pre"
- (apply (var_ "toString") (select (var_ "nix") ["revCount"]))
- "_"
- (select (var_ "nix") ["shortRev"]))),
- distPhase
- "runHook preDist\nmake dist\nmkdir -p $out/tarballs\ncp *.tar.* $out/tarballs\n",
- name "nix-tarball",
- buildInputs
- (op-concat-lists
- (list
- (var_ "curl")
- (var_ "bison")
- (var_ "flex")
- (var_ "libxml2")
- (var_ "libxslt")
- (var_ "bzip2")
- (var_ "xz")
- (var_ "brotli")
- (var_ "pkgconfig")
- (var_ "sqlite")
- (var_ "libsodium")
- (var_ "boehmgc")
- (var_ "docbook5")
- (var_ "docbook5_xsl")
- (var_ "autoconf-archive"))
- (apply
- (apply
- (select (var_ "lib") ["optional"])
- (select (var_ "stdenv") ["isLinux"]))
- (var_ "libseccomp"))),
- configureFlags "--enable-gc",
- src (var_ "nix"),
- preDist
- "make install docdir=$out/share/doc/nix makefiles=doc/manual/local.mk\necho \"doc manual $out/share/doc/nix/manual\" >> $out/nix-support/hydra-build-products\n",
- preConfigure
- "(cd perl ; autoreconf --install --force --verbose)\n# TeX needs a writable font cache.\nexport VARTEXFONTS=$TMPDIR/texfonts\n",
- officialRelease :inherited,
- postUnpack
- "(cd source && find . -type f) | cut -c3- > source/.dist-files\ncat source/.dist-files\n"}))},
- makeRPM_i686 (apply (var_ "makeRPM") "i686-linux"),
- makeRPM_x86_64 (apply (var_ "makeRPM") "x86_64-linux"),
- makeDeb_i686 (apply (var_ "makeDeb") "i686-linux"),
- makeDeb_x86_64 (apply (var_ "makeDeb") "x86_64-linux"),
- makeRPM
- (lambda
- [:as "system"]
- (lambda
- [:as "diskImageFun"]
- (lambda
- [:as "extraPackages"]
- (with
- (apply
- (apply (var_ "import") (var_ "nixpkgs"))
- {system :inherited})
- (apply
- (select (var_ "releaseTools") ["rpmBuild"])
- {meta {schedulingPriority 50},
- name "nix-rpm",
- src (select (var_ "jobs") ["tarball"]),
- diskImage
- (apply
- (apply
- (var_ "diskImageFun")
- (select (var_ "vmTools") ["diskImageFuns"]))
- {extraPackages
- (op-concat-lists
- (list
- "sqlite"
- "sqlite-devel"
- "bzip2-devel"
- "libcurl-devel"
- "openssl-devel"
- "xz-devel"
- "libseccomp-devel")
- (var_ "extraPackages"))}),
- memSize 2047,
- postRPMInstall
- "cd /tmp/rpmout/BUILD/nix-* && make installcheck"}))))),
- makeDeb
- (lambda
- [:as "system"]
- (lambda
- [:as "diskImageFun"]
- (lambda
- [:as "extraPackages"]
- (lambda
- [:as "extraDebPackages"]
- (with
- (apply
- (apply (var_ "import") (var_ "nixpkgs"))
- {system :inherited})
- (apply
- (select (var_ "releaseTools") ["debBuild"])
- {doInstallCheck (var_ "true"),
- memSize 1024,
- debRequires
- (op-concat-lists
- (list
- "curl"
- "libsqlite3-0"
- "libbz2-1.0"
- "bzip2"
- "xz-utils"
- "libssl1.0.0"
- "liblzma5"
- "libseccomp2")
- (var_ "extraDebPackages")),
- meta {schedulingPriority 50},
- name "nix-deb",
- debMaintainer "Eelco Dolstra <eelco.dolstra@logicblox.com>",
- configureFlags "--sysconfdir=/etc",
- src (select (var_ "jobs") ["tarball"]),
- postInstall "make installcheck",
- diskImage
- (apply
- (apply
- (var_ "diskImageFun")
- (select (var_ "vmTools") ["diskImageFuns"]))
- {extraPackages
- (op-concat-lists
- (list
- "libsqlite3-dev"
- "libbz2-dev"
- "libcurl-dev"
- "libcurl3-nss"
- "libssl-dev"
- "liblzma-dev"
- "libseccomp-dev")
- (var_ "extraPackages"))})}))))))}
- (var_ "jobs")))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement