inNixShell considered harmful
This commit is contained in:
parent
74426e6820
commit
a727643286
|
@ -1,5 +1,6 @@
|
||||||
{ hydraSrc ? { outPath = ./.; revCount = 1234; rev = "abcdef"; }
|
{ hydraSrc ? { outPath = ./.; revCount = 1234; rev = "abcdef"; }
|
||||||
, officialRelease ? false
|
, officialRelease ? false
|
||||||
|
, shell ? false
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with import <nixpkgs/lib>;
|
with import <nixpkgs/lib>;
|
||||||
|
@ -111,7 +112,7 @@ rec {
|
||||||
releaseTools.nixBuild {
|
releaseTools.nixBuild {
|
||||||
name = "hydra";
|
name = "hydra";
|
||||||
|
|
||||||
src = if lib.inNixShell then null else hydraSrc;
|
src = if shell then null else hydraSrc;
|
||||||
|
|
||||||
buildInputs =
|
buildInputs =
|
||||||
[ makeWrapper autoconf automake libtool unzip nukeReferences pkgconfig sqlite libpqxx
|
[ makeWrapper autoconf automake libtool unzip nukeReferences pkgconfig sqlite libpqxx
|
||||||
|
@ -130,11 +131,9 @@ rec {
|
||||||
gzip bzip2 lzma gnutar unzip git gitAndTools.topGit mercurial darcs gnused bazaar
|
gzip bzip2 lzma gnutar unzip git gitAndTools.topGit mercurial darcs gnused bazaar
|
||||||
] ++ lib.optionals stdenv.isLinux [ rpm dpkg cdrkit ] );
|
] ++ lib.optionals stdenv.isLinux [ rpm dpkg cdrkit ] );
|
||||||
|
|
||||||
postUnpack = ''
|
postUnpack = optionalString (!shell) ''
|
||||||
# Clean up when building from a working tree.
|
# Clean up when building from a working tree.
|
||||||
if [ -z "$IN_NIX_SHELL" ]; then
|
(cd $sourceRoot && (git ls-files -o --directory | xargs -r rm -rfv)) || true
|
||||||
(cd $sourceRoot && (git ls-files -o --directory | xargs -r rm -rfv)) || true
|
|
||||||
fi
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
configureFlags = [ "--with-docbook-xsl=${docbook_xsl}/xml/xsl/docbook" ];
|
configureFlags = [ "--with-docbook-xsl=${docbook_xsl}/xml/xsl/docbook" ];
|
||||||
|
|
Loading…
Reference in a new issue