diff options
author | Michael Raskin <7c6f434c@mail.ru> | 2016-12-30 21:57:19 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-30 21:57:19 +0000 |
commit | f9020aed0608675b41c2a3c1374960486923a540 (patch) | |
tree | ce49f2ccf3c264b58efc8fe80be04f0392470f5b /pkgs/build-support | |
parent | 20c2b45ee661ff08b5b0fe7c946291e9ec8690f6 (diff) | |
parent | 41fcb036eb19b6aef8f4f11d7eb6135247afc8bd (diff) |
Merge pull request #20767 from abbradar/debbuild
releaseTools.debBuild: split checkinstall into separate phase
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/release/debian-build.nix | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/pkgs/build-support/release/debian-build.nix b/pkgs/build-support/release/debian-build.nix index f4bc3e73056d..74e061966bca 100644 --- a/pkgs/build-support/release/debian-build.nix +++ b/pkgs/build-support/release/debian-build.nix @@ -16,17 +16,14 @@ with stdenv.lib; vmTools.runInLinuxImage (stdenv.mkDerivation ( { + name = name + "-" + diskImage.name + (if src ? version then "-" + src.version else ""); + doCheck = true; prefix = "/usr"; - prePhases = "installExtraDebsPhase sysInfoPhase"; - } - - // removeAttrs args ["vmTools"] // - - { - name = name + "-" + diskImage.name + (if src ? version then "-" + src.version else ""); + prePhases = [ "installExtraDebsPhase" "sysInfoPhase" ]; + postPhases = [ "debInstallPhase" ]; # !!! cut&paste from rpm-build.nix postHook = '' @@ -72,6 +69,12 @@ vmTools.runInLinuxImage (stdenv.mkDerivation ( mkdir -p $out/debs find . -name "*.deb" -exec cp {} $out/debs \; + eval "$postInstall" + ''; + + debInstallPhase = '' + eval "$preDebInstall" + [ "$(echo $out/debs/*.deb)" != "" ] for i in $out/debs/*.deb; do @@ -87,12 +90,12 @@ vmTools.runInLinuxImage (stdenv.mkDerivation ( echo "file deb-extra $(ls $i/debs/*.deb | sort | head -1)" >> $out/nix-support/hydra-build-products done - eval "$postInstall" + eval "$postDebInstall" ''; # */ meta = (if args ? meta then args.meta else {}) // { description = "Deb package for ${diskImage.fullName}"; }; - } + } // removeAttrs args ["name" "meta" "vmTools"] )) |