Advertisement
Guest User

Untitled

a guest
Feb 27th, 2018
397
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Clojure 17.36 KB | None | 0 0
  1. (lambda
  2.  [["nix"
  3.    (apply
  4.     (select (var_ "builtins") ["fetchGit"])
  5.     (path "/Users/dottedmag/Downloads/nixdump"))]
  6.   ["nixpkgs"
  7.    (apply
  8.     (select (var_ "builtins") ["fetchGit"])
  9.     {url "https://github.com/NixOS/nixpkgs.git", ref "nix-2.0"})]
  10.   ["officialRelease" (var_ "false")]
  11.   ["systems"
  12.    (list "x86_64-linux" "i686-linux" "x86_64-darwin" "aarch64-linux")]
  13.   :as
  14.   ""]
  15.  (let
  16.   {pkgs
  17.    (apply
  18.     (apply (var_ "import") (var_ "nixpkgs"))
  19.     {system
  20.      (select (var_ "builtins") ["currentSystem"] :or "x86_64-linux")}),
  21.    jobs
  22.    {deb_ubuntu1610i386
  23.     (apply
  24.      (apply
  25.       (apply
  26.        (var_ "makeDeb_i686")
  27.        (lambda
  28.         [:as "diskImageFuns"]
  29.         (select (var_ "diskImageFuns") ["ubuntu1610i386"])))
  30.       (list "libsodium-dev"))
  31.      (list "libsodium18")),
  32.     perlBindings
  33.     (apply
  34.      (apply (select (var_ "pkgs") ["lib" "genAttrs"]) (var_ "systems"))
  35.      (lambda
  36.       [:as "system"]
  37.       (let
  38.        {pkgs
  39.         (apply
  40.          (apply (var_ "import") (var_ "nixpkgs"))
  41.          {system :inherited})}
  42.        (with
  43.         (var_ "pkgs")
  44.         (apply
  45.          (select (var_ "releaseTools") ["nixBuild"])
  46.          {name "nix-perl",
  47.           src (var_ "tarball"),
  48.           buildInputs
  49.           (op-concat-lists
  50.            (list
  51.             (apply
  52.              (apply
  53.               (select (var_ "builtins") ["getAttr"])
  54.               (var_ "system"))
  55.              (select (var_ "jobs") ["build"]))
  56.             (var_ "curl")
  57.             (var_ "bzip2")
  58.             (var_ "xz")
  59.             (var_ "pkgconfig")
  60.             (select (var_ "pkgs") ["perl"]))
  61.            (apply
  62.             (apply
  63.              (select (var_ "lib") ["optional"])
  64.              (op-or
  65.               (select (var_ "stdenv") ["isLinux"])
  66.               (select (var_ "stdenv") ["isDarwin"])))
  67.             (var_ "libsodium"))),
  68.           configureFlags
  69.           (concat
  70.            "--with-dbi="
  71.            (select (var_ "perlPackages") ["DBI"])
  72.            "/"
  73.            (select (var_ "pkgs") ["perl" "libPrefix"])
  74.            "\n--with-dbd-sqlite="
  75.            (select (var_ "perlPackages") ["DBDSQLite"])
  76.            "/"
  77.            (select (var_ "pkgs") ["perl" "libPrefix"])
  78.            "\n"),
  79.           postUnpack "sourceRoot=$sourceRoot/perl",
  80.           enableParallelBuilding (var_ "true"),
  81.           preBuild "unset NIX_INDENT_MAKE"}))))),
  82.     binaryTarball
  83.     (apply
  84.      (apply (select (var_ "pkgs") ["lib" "genAttrs"]) (var_ "systems"))
  85.      (lambda
  86.       [:as "system"]
  87.       (with
  88.        (apply
  89.         (apply (var_ "import") (var_ "nixpkgs"))
  90.         {system :inherited})
  91.        (let
  92.         {version (select (var_ "toplevel") ["src" "version"]),
  93.          toplevel
  94.          (apply
  95.           (apply
  96.            (select (var_ "builtins") ["getAttr"])
  97.            (var_ "system"))
  98.           (select (var_ "jobs") ["build"]))}
  99.         (apply
  100.          (apply
  101.           (apply
  102.            (var_ "runCommand")
  103.            (concat "nix-binary-tarball-" (var_ "version")))
  104.           {meta
  105.            {description
  106.             (concat
  107.              "Distribution-independent Nix bootstrap binaries for "
  108.              (var_ "system"))},
  109.            buildInputs
  110.            (op-concat-lists
  111.             (list (var_ "perl"))
  112.             (apply
  113.              (apply
  114.               (select (var_ "lib") ["optional"])
  115.               (op-neq (var_ "system") "aarch64-linux"))
  116.              (var_ "shellcheck"))),
  117.            exportReferencesGraph
  118.            (list
  119.             "closure1"
  120.             (var_ "toplevel")
  121.             "closure2"
  122.             (var_ "cacert"))})
  123.          (concat
  124.           "storePaths=$(perl "
  125.           (var_ "pathsFromGraph")
  126.           " ./closure1 ./closure2)\nprintRegistration=1 perl "
  127.           (var_ "pathsFromGraph")
  128.           " ./closure1 ./closure2 > $TMPDIR/reginfo\nsubstitute "
  129.           (path
  130.            "/Users/dottedmag/Downloads/nixdump/scripts/install-nix-from-closure.sh")
  131.           " $TMPDIR/install \n  --subst-var-by nix "
  132.           (var_ "toplevel")
  133.           " \n  --subst-var-by cacert "
  134.           (var_ "cacert")
  135.           "\nsubstitute "
  136.           (path
  137.            "/Users/dottedmag/Downloads/nixdump/scripts/install-darwin-multi-user.sh")
  138.           " $TMPDIR/install-darwin-multi-user \n  --subst-var-by nix "
  139.           (var_ "toplevel")
  140.           " \n  --subst-var-by cacert "
  141.           (var_ "cacert")
  142.           "\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-"
  143.           (var_ "version")
  144.           "-"
  145.           (var_ "system")
  146.           "\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")))))),
  147.     tests
  148.     {binaryTarball
  149.      (with
  150.       (apply
  151.        (apply (var_ "import") (var_ "nixpkgs"))
  152.        {system "x86_64-linux"})
  153.       (apply
  154.        (select (var_ "vmTools") ["runInLinuxImage"])
  155.        (apply
  156.         (apply
  157.          (apply (var_ "runCommand") "nix-binary-tarball-test")
  158.          {diskImage
  159.           (select (var_ "vmTools") ["diskImages" "ubuntu1204x86_64"])})
  160.         (concat
  161.          "useradd -m alice\nsu - alice -c 'tar xf "
  162.          (select (var_ "binaryTarball") ["x86_64-linux"])
  163.          "/*.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 "
  164.          (select (var_ "build") ["x86_64-linux"])
  165.          "'\nmkdir -p $out/nix-support\ntouch $out/nix-support/hydra-build-products\numount /nix\n")))),
  166.      remoteBuilds
  167.      (apply
  168.       (apply
  169.        (var_ "import")
  170.        (path
  171.         "/Users/dottedmag/Downloads/nixdump/tests/remote-builds.nix"))
  172.       {system "x86_64-linux",
  173.        nix (select (var_ "build") ["x86_64-linux"]),
  174.        nixpkgs :inherited}),
  175.      nix-copy-closure
  176.      (apply
  177.       (apply
  178.        (var_ "import")
  179.        (path
  180.         "/Users/dottedmag/Downloads/nixdump/tests/nix-copy-closure.nix"))
  181.       {system "x86_64-linux",
  182.        nix (select (var_ "build") ["x86_64-linux"]),
  183.        nixpkgs :inherited}),
  184.      setuid
  185.      (apply
  186.       (apply
  187.        (select (var_ "pkgs") ["lib" "genAttrs"])
  188.        (list "i686-linux" "x86_64-linux"))
  189.       (lambda
  190.        [:as "system"]
  191.        (apply
  192.         (apply
  193.          (var_ "import")
  194.          (path "/Users/dottedmag/Downloads/nixdump/tests/setuid.nix"))
  195.         {system :inherited,
  196.          nix (select (var_ "build") [(var_ "system")]),
  197.          nixpkgs :inherited}))),
  198.      evalNixpkgs
  199.      (apply
  200.       (apply
  201.        (var_ "import")
  202.        (concat (var_ "nixpkgs") "/pkgs/top-level/make-tarball.nix"))
  203.       {nix (select (var_ "build") ["x86_64-linux"]),
  204.        nixpkgs :inherited,
  205.        officialRelease (var_ "false"),
  206.        pkgs :inherited}),
  207.      evalNixOS
  208.      (apply
  209.       (apply
  210.        (apply (select (var_ "pkgs") ["runCommand"]) "eval-nixos")
  211.        {buildInputs (list (select (var_ "build") ["x86_64-linux"]))})
  212.       (concat
  213.        "export NIX_STATE_DIR=$TMPDIR\nnix-store --init\n\nnix-instantiate "
  214.        (var_ "nixpkgs")
  215.        "/nixos/release-combined.nix -A tested --dry-run\n\ntouch $out\n"))},
  216.     release
  217.     (apply
  218.      (select (var_ "pkgs") ["releaseTools" "aggregate"])
  219.      {meta {description "Release-critical builds"},
  220.       name (concat "nix-" (select (var_ "tarball") ["version"])),
  221.       constituents
  222.       (list
  223.        (var_ "tarball")
  224.        (select (var_ "build") ["i686-linux"])
  225.        (select (var_ "build") ["x86_64-darwin"])
  226.        (select (var_ "build") ["x86_64-linux"])
  227.        (select (var_ "binaryTarball") ["i686-linux"])
  228.        (select (var_ "binaryTarball") ["x86_64-darwin"])
  229.        (select (var_ "binaryTarball") ["x86_64-linux"])
  230.        (var_ "deb_ubuntu1604i386")
  231.        (var_ "deb_ubuntu1604x86_64")
  232.        (var_ "rpm_fedora25i386")
  233.        (var_ "rpm_fedora25x86_64")
  234.        (select (var_ "tests") ["remoteBuilds"])
  235.        (select (var_ "tests") ["nix-copy-closure"])
  236.        (select (var_ "tests") ["binaryTarball"])
  237.        (select (var_ "tests") ["evalNixpkgs"])
  238.        (select (var_ "tests") ["evalNixOS"]))}),
  239.     coverage
  240.     (with
  241.      (apply
  242.       (apply (var_ "import") (var_ "nixpkgs"))
  243.       {system "x86_64-linux"})
  244.      (apply
  245.       (select (var_ "releaseTools") ["coverageAnalysis"])
  246.       {name "nix-build",
  247.        src (var_ "tarball"),
  248.        buildInputs
  249.        (list
  250.         (var_ "curl")
  251.         (var_ "bzip2")
  252.         (var_ "openssl")
  253.         (var_ "pkgconfig")
  254.         (var_ "sqlite")
  255.         (var_ "xz")
  256.         (var_ "libsodium")
  257.         (var_ "libseccomp")
  258.         (var_ "graphviz")
  259.         (var_ "libxml2")
  260.         (var_ "libxslt")
  261.         (var_ "git")
  262.         (var_ "mercurial")),
  263.        configureFlags "--disable-init-state\n",
  264.        doInstallCheck (var_ "true"),
  265.        dontInstall (var_ "false"),
  266.        lcovFilter
  267.        (list "*/boost/*" "*-tab.*" "*/nlohmann/*" "*/linenoise/*"),
  268.        FONTCONFIG_FILE (select (var_ "texFunctions") ["fontsConf"])})),
  269.     deb_ubuntu1604i386
  270.     (apply
  271.      (apply
  272.       (apply
  273.        (var_ "makeDeb_i686")
  274.        (lambda
  275.         [:as "diskImageFuns"]
  276.         (select (var_ "diskImageFuns") ["ubuntu1604i386"])))
  277.       (list "libsodium-dev"))
  278.      (list "libsodium18")),
  279.     deb_ubuntu1604x86_64
  280.     (apply
  281.      (apply
  282.       (apply
  283.        (var_ "makeDeb_x86_64")
  284.        (lambda
  285.         [:as "diskImageFuns"]
  286.         (select (var_ "diskImageFuns") ["ubuntu1604x86_64"])))
  287.       (list "libsodium-dev"))
  288.      (list "libsodium18")),
  289.     deb_ubuntu1610x86_64
  290.     (apply
  291.      (apply
  292.       (apply
  293.        (var_ "makeDeb_x86_64")
  294.        (lambda
  295.         [:as "diskImageFuns"]
  296.         (select (var_ "diskImageFuns") ["ubuntu1610x86_64"])))
  297.       (list "libsodium-dev"))
  298.      (list "libsodium18")),
  299.     rpm_fedora25i386
  300.     (apply
  301.      (apply
  302.       (var_ "makeRPM_i686")
  303.       (lambda
  304.        [:as "diskImageFuns"]
  305.        (select (var_ "diskImageFuns") ["fedora25i386"])))
  306.      (list "libsodium-devel")),
  307.     build
  308.     (apply
  309.      (apply (select (var_ "pkgs") ["lib" "genAttrs"]) (var_ "systems"))
  310.      (lambda
  311.       [:as "system"]
  312.       (with
  313.        (apply
  314.         (apply (var_ "import") (var_ "nixpkgs"))
  315.         {system :inherited})
  316.        (with
  317.         (apply
  318.          (apply
  319.           (var_ "import")
  320.           (path
  321.            "/Users/dottedmag/Downloads/nixdump/release-common.nix"))
  322.          {pkgs :inherited})
  323.         (apply
  324.          (select (var_ "releaseTools") ["nixBuild"])
  325.          {doInstallCheck (var_ "true"),
  326.           installFlags "sysconfdir=$(out)/etc",
  327.           enableParallelBuilding (var_ "true"),
  328.           name "nix",
  329.           buildInputs
  330.           (op-concat-lists
  331.            (list
  332.             (var_ "curl")
  333.             (var_ "bzip2")
  334.             (var_ "xz")
  335.             (var_ "brotli")
  336.             (var_ "openssl")
  337.             (var_ "pkgconfig")
  338.             (var_ "sqlite")
  339.             (var_ "boehmgc")
  340.             (var_ "git")
  341.             (var_ "mercurial"))
  342.            (op-concat-lists
  343.             (apply
  344.              (apply
  345.               (select (var_ "lib") ["optional"])
  346.               (select (var_ "stdenv") ["isLinux"]))
  347.              (var_ "libseccomp"))
  348.             (op-concat-lists
  349.              (apply
  350.               (apply
  351.                (select (var_ "lib") ["optional"])
  352.                (op-or
  353.                 (select (var_ "stdenv") ["isLinux"])
  354.                 (select (var_ "stdenv") ["isDarwin"])))
  355.               (var_ "libsodium"))
  356.              (apply
  357.               (apply
  358.                (select (var_ "lib") ["optional"])
  359.                (op-or
  360.                 (select (var_ "stdenv") ["isLinux"])
  361.                 (select (var_ "stdenv") ["isDarwin"])))
  362.               (apply
  363.                (select (var_ "aws-sdk-cpp") ["override"])
  364.                {apis (list "s3"),
  365.                 customMemoryManagement (var_ "false")}))))),
  366.           configureFlags
  367.           (op-concat-lists
  368.            (var_ "configureFlags")
  369.            (list "--sysconfdir=/etc")),
  370.           src (var_ "tarball"),
  371.           installCheckFlags "sysconfdir=$(out)/etc",
  372.           makeFlags "profiledir=$(out)/etc/profile.d",
  373.           preBuild "unset NIX_INDENT_MAKE"}))))),
  374.     rpm_fedora25x86_64
  375.     (apply
  376.      (apply
  377.       (var_ "makeRPM_x86_64")
  378.       (lambda
  379.        [:as "diskImageFunsFun"]
  380.        (select (var_ "diskImageFunsFun") ["fedora25x86_64"])))
  381.      (list "libsodium-devel")),
  382.     tarball
  383.     (with
  384.      (var_ "pkgs")
  385.      (apply
  386.       (select (var_ "releaseTools") ["sourceTarball"])
  387.       {version
  388.        (apply
  389.         (select (var_ "builtins") ["readFile"])
  390.         (path "/Users/dottedmag/Downloads/nixdump/version")),
  391.        versionSuffix
  392.        (if
  393.         (var_ "officialRelease")
  394.         ""
  395.         (concat
  396.          "pre"
  397.          (apply (var_ "toString") (select (var_ "nix") ["revCount"]))
  398.          "_"
  399.          (select (var_ "nix") ["shortRev"]))),
  400.        distPhase
  401.        "runHook preDist\nmake dist\nmkdir -p $out/tarballs\ncp *.tar.* $out/tarballs\n",
  402.        name "nix-tarball",
  403.        buildInputs
  404.        (op-concat-lists
  405.         (list
  406.          (var_ "curl")
  407.          (var_ "bison")
  408.          (var_ "flex")
  409.          (var_ "libxml2")
  410.          (var_ "libxslt")
  411.          (var_ "bzip2")
  412.          (var_ "xz")
  413.          (var_ "brotli")
  414.          (var_ "pkgconfig")
  415.          (var_ "sqlite")
  416.          (var_ "libsodium")
  417.          (var_ "boehmgc")
  418.          (var_ "docbook5")
  419.          (var_ "docbook5_xsl")
  420.          (var_ "autoconf-archive"))
  421.         (apply
  422.          (apply
  423.           (select (var_ "lib") ["optional"])
  424.           (select (var_ "stdenv") ["isLinux"]))
  425.          (var_ "libseccomp"))),
  426.        configureFlags "--enable-gc",
  427.        src (var_ "nix"),
  428.        preDist
  429.        "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",
  430.        preConfigure
  431.        "(cd perl ; autoreconf --install --force --verbose)\n# TeX needs a writable font cache.\nexport VARTEXFONTS=$TMPDIR/texfonts\n",
  432.        officialRelease :inherited,
  433.        postUnpack
  434.        "(cd source && find . -type f) | cut -c3- > source/.dist-files\ncat source/.dist-files\n"}))},
  435.    makeRPM_i686 (apply (var_ "makeRPM") "i686-linux"),
  436.    makeRPM_x86_64 (apply (var_ "makeRPM") "x86_64-linux"),
  437.    makeDeb_i686 (apply (var_ "makeDeb") "i686-linux"),
  438.    makeDeb_x86_64 (apply (var_ "makeDeb") "x86_64-linux"),
  439.    makeRPM
  440.    (lambda
  441.     [:as "system"]
  442.     (lambda
  443.      [:as "diskImageFun"]
  444.      (lambda
  445.       [:as "extraPackages"]
  446.       (with
  447.        (apply
  448.         (apply (var_ "import") (var_ "nixpkgs"))
  449.         {system :inherited})
  450.        (apply
  451.         (select (var_ "releaseTools") ["rpmBuild"])
  452.         {meta {schedulingPriority 50},
  453.          name "nix-rpm",
  454.          src (select (var_ "jobs") ["tarball"]),
  455.          diskImage
  456.          (apply
  457.           (apply
  458.            (var_ "diskImageFun")
  459.            (select (var_ "vmTools") ["diskImageFuns"]))
  460.           {extraPackages
  461.            (op-concat-lists
  462.             (list
  463.              "sqlite"
  464.              "sqlite-devel"
  465.              "bzip2-devel"
  466.              "libcurl-devel"
  467.              "openssl-devel"
  468.              "xz-devel"
  469.              "libseccomp-devel")
  470.             (var_ "extraPackages"))}),
  471.          memSize 2047,
  472.          postRPMInstall
  473.          "cd /tmp/rpmout/BUILD/nix-* && make installcheck"}))))),
  474.    makeDeb
  475.    (lambda
  476.     [:as "system"]
  477.     (lambda
  478.      [:as "diskImageFun"]
  479.      (lambda
  480.       [:as "extraPackages"]
  481.       (lambda
  482.        [:as "extraDebPackages"]
  483.        (with
  484.         (apply
  485.          (apply (var_ "import") (var_ "nixpkgs"))
  486.          {system :inherited})
  487.         (apply
  488.          (select (var_ "releaseTools") ["debBuild"])
  489.          {doInstallCheck (var_ "true"),
  490.           memSize 1024,
  491.           debRequires
  492.           (op-concat-lists
  493.            (list
  494.             "curl"
  495.             "libsqlite3-0"
  496.             "libbz2-1.0"
  497.             "bzip2"
  498.             "xz-utils"
  499.             "libssl1.0.0"
  500.             "liblzma5"
  501.             "libseccomp2")
  502.            (var_ "extraDebPackages")),
  503.           meta {schedulingPriority 50},
  504.           name "nix-deb",
  505.           debMaintainer "Eelco Dolstra <eelco.dolstra@logicblox.com>",
  506.           configureFlags "--sysconfdir=/etc",
  507.           src (select (var_ "jobs") ["tarball"]),
  508.           postInstall "make installcheck",
  509.           diskImage
  510.           (apply
  511.            (apply
  512.             (var_ "diskImageFun")
  513.             (select (var_ "vmTools") ["diskImageFuns"]))
  514.            {extraPackages
  515.             (op-concat-lists
  516.              (list
  517.               "libsqlite3-dev"
  518.               "libbz2-dev"
  519.               "libcurl-dev"
  520.               "libcurl3-nss"
  521.               "libssl-dev"
  522.               "liblzma-dev"
  523.               "libseccomp-dev")
  524.              (var_ "extraPackages"))})}))))))}
  525.   (var_ "jobs")))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement