Skip to content

Commit

Permalink
Merge pull request #20767 from abbradar/debbuild
Browse files Browse the repository at this point in the history
releaseTools.debBuild: split checkinstall into separate phase
  • Loading branch information
7c6f434c committed Dec 30, 2016
2 parents 20c2b45 + 41fcb03 commit f9020ae
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions pkgs/build-support/release/debian-build.nix
Expand Up @@ -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 = ''
Expand Down Expand Up @@ -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
Expand All @@ -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"]

))

0 comments on commit f9020ae

Please sign in to comment.