1
0
Fork 0
mirror of https://github.com/NixOS/hydra.git synced 2024-10-17 16:37:26 -04:00

inNixShell considered harmful

This commit is contained in:
Eelco Dolstra 2016-03-22 13:10:37 +01:00
parent 74426e6820
commit a727643286
2 changed files with 5 additions and 6 deletions

View file

@ -1,5 +1,6 @@
{ hydraSrc ? { outPath = ./.; revCount = 1234; rev = "abcdef"; }
, officialRelease ? false
, shell ? false
}:
with import <nixpkgs/lib>;
@ -111,7 +112,7 @@ rec {
releaseTools.nixBuild {
name = "hydra";
src = if lib.inNixShell then null else hydraSrc;
src = if shell then null else hydraSrc;
buildInputs =
[ 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
] ++ lib.optionals stdenv.isLinux [ rpm dpkg cdrkit ] );
postUnpack = ''
postUnpack = optionalString (!shell) ''
# 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
fi
(cd $sourceRoot && (git ls-files -o --directory | xargs -r rm -rfv)) || true
'';
configureFlags = [ "--with-docbook-xsl=${docbook_xsl}/xml/xsl/docbook" ];

View file

@ -1 +1 @@
(import ./release.nix {}).build.x86_64-linux
(import ./release.nix { shell = true; }).build.x86_64-linux