aboutsummaryrefslogtreecommitdiff
path: root/release.nix
diff options
context:
space:
mode:
Diffstat (limited to 'release.nix')
-rw-r--r--release.nix85
1 files changed, 47 insertions, 38 deletions
diff --git a/release.nix b/release.nix
index fbf9e4721..d2785be13 100644
--- a/release.nix
+++ b/release.nix
@@ -12,63 +12,72 @@ let
builtins.readFile ./.version
+ (if officialRelease then "" else "pre${toString nix.revCount}_${nix.shortRev}");
- jobs = rec {
+ buildFun = pkgs: enableStatic:
+ with pkgs; with import ./release-common.nix { inherit pkgs enableStatic; };
+ stdenv.mkDerivation {
+ name = "nix-${version}";
- build = pkgs.lib.genAttrs systems (system:
+ src = nix;
- let pkgs = import nixpkgs { inherit system; }; in
+ outputs = [ "out" "dev" "doc" ];
- with pkgs;
+ buildInputs = buildDeps;
- with import ./release-common.nix { inherit pkgs; };
+ nativeBuildInputs = nativeBuildDeps;
- stdenv.mkDerivation {
- name = "nix-${version}";
+ propagatedBuildInputs = propagatedDeps;
- src = nix;
+ preConfigure =
+ lib.optionalString (!enableStatic) ''
+ # Copy libboost_context so we don't get all of Boost in our closure.
+ # https://github.com/NixOS/nixpkgs/issues/45462
+ mkdir -p $out/lib
+ cp -pd ${boost}/lib/{libboost_context*,libboost_thread*,libboost_system*} $out/lib
+ rm -f $out/lib/*.a
+ ${lib.optionalString stdenv.isLinux ''
+ chmod u+w $out/lib/*.so.*
+ patchelf --set-rpath $out/lib:${stdenv.cc.cc.lib}/lib $out/lib/libboost_thread.so.*
+ ''}
- outputs = [ "out" "dev" "doc" ];
+ (cd perl; autoreconf --install --force --verbose)
+ '';
- buildInputs = buildDeps;
+ configureFlags = configureFlags ++
+ [ "--sysconfdir=/etc" ];
- propagatedBuildInputs = propagatedDeps;
+ dontUpdateAutotoolsGnuConfigScripts = true;
- preConfigure =
- ''
- # Copy libboost_context so we don't get all of Boost in our closure.
- # https://github.com/NixOS/nixpkgs/issues/45462
- mkdir -p $out/lib
- cp -pd ${boost}/lib/{libboost_context*,libboost_thread*,libboost_system*} $out/lib
- rm -f $out/lib/*.a
- ${lib.optionalString stdenv.isLinux ''
- chmod u+w $out/lib/*.so.*
- patchelf --set-rpath $out/lib:${stdenv.cc.cc.lib}/lib $out/lib/libboost_thread.so.*
- ''}
+ enableParallelBuilding = true;
- (cd perl; autoreconf --install --force --verbose)
- '';
+ makeFlags = [ "profiledir=$(out)/etc/profile.d" "PRECOMPILE_HEADERS=0" ];
- configureFlags = configureFlags ++
- [ "--sysconfdir=/etc" ];
+ installFlags = "sysconfdir=$(out)/etc";
- enableParallelBuilding = true;
+ postInstall = ''
+ mkdir -p $doc/nix-support
+ echo "doc manual $doc/share/doc/nix/manual" >> $doc/nix-support/hydra-build-products
+ '';
- makeFlags = "profiledir=$(out)/etc/profile.d";
+ doCheck = true;
- installFlags = "sysconfdir=$(out)/etc";
+ doInstallCheck = true;
+ installCheckFlags = "sysconfdir=$(out)/etc";
- postInstall = ''
- mkdir -p $doc/nix-support
- echo "doc manual $doc/share/doc/nix/manual" >> $doc/nix-support/hydra-build-products
- '';
+ separateDebugInfo = !enableStatic;
+
+ stripAllList = ["bin"];
+ };
- doCheck = true;
- doInstallCheck = true;
- installCheckFlags = "sysconfdir=$(out)/etc";
+ jobs = rec {
- separateDebugInfo = true;
- });
+
+ build-static = pkgs.lib.genAttrs systems (system:
+ buildFun (import nixpkgs { inherit system; }).pkgsStatic true);
+
+
+ build = pkgs.lib.genAttrs systems (system:
+ buildFun (import nixpkgs { inherit system; }) false);
perlBindings = pkgs.lib.genAttrs systems (system: