Skip to content

Commit

Permalink
Wrap Nix to add Git as runtime dependency, resolves #46603
Browse files Browse the repository at this point in the history
  • Loading branch information
lukateras committed Sep 13, 2018
1 parent 2cfc0bb commit 5258c7c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pkgs/tools/package-management/nix/default.nix
@@ -1,5 +1,5 @@
{ lib, stdenv, fetchurl, fetchFromGitHub, fetchpatch, perl, curl, bzip2, sqlite, openssl ? null, xz
, pkgconfig, boehmgc, perlPackages, libsodium, brotli, boost
, pkgconfig, boehmgc, perlPackages, libsodium, brotli, boost, git
, autoreconfHook, autoconf-archive, bison, flex, libxml2, libxslt, docbook5, docbook_xsl_ns
, busybox-sandbox-shell
, storeDir ? "/nix/store"
Expand All @@ -24,7 +24,7 @@ let
outputs = [ "out" "dev" "man" "doc" ];

nativeBuildInputs =
[ pkgconfig ]
[ makeWrapper pkgconfig ]
++ lib.optionals (!is20) [ curl perl ]
++ lib.optionals fromGit [ autoreconfHook autoconf-archive bison flex libxml2 libxslt docbook5 docbook_xsl_ns ];

Expand Down Expand Up @@ -82,6 +82,12 @@ let
installFlags = "sysconfdir=$(out)/etc";

doInstallCheck = true; # not cross

postFixup = ''
for f in $out/bin/*; do
wrapProgram $f --prefix PATH : ${lib.makeBinPath [ git ]}
done
'';

# socket path becomes too long otherwise
preInstallCheck = lib.optional stdenv.isDarwin ''
Expand Down

0 comments on commit 5258c7c

Please sign in to comment.