summary refs log tree commit diff
path: root/pkgs/shells/dash
diff options
context:
space:
mode:
authorKiskae <Kiskae@users.noreply.github.com>2022-12-13 20:47:26 +0100
committerGitHub <noreply@github.com>2022-12-13 20:47:26 +0100
commita2aa9225b6185ab2144dd8f397b0bd429d30c075 (patch)
treee5bb7c5f2f1a7fa436f561bdd4d03e162addce6d /pkgs/shells/dash
parent89583d0fc84af1731c0ddd2c364e6c21c9393f5a (diff)
downloadnixpkgs-a2aa9225b6185ab2144dd8f397b0bd429d30c075.tar
nixpkgs-a2aa9225b6185ab2144dd8f397b0bd429d30c075.tar.gz
nixpkgs-a2aa9225b6185ab2144dd8f397b0bd429d30c075.tar.bz2
nixpkgs-a2aa9225b6185ab2144dd8f397b0bd429d30c075.tar.lz
nixpkgs-a2aa9225b6185ab2144dd8f397b0bd429d30c075.tar.xz
nixpkgs-a2aa9225b6185ab2144dd8f397b0bd429d30c075.tar.zst
nixpkgs-a2aa9225b6185ab2144dd8f397b0bd429d30c075.zip
pkgStatic.dash: fix build
`libedit` declares a dependency on `libncurses`, but since dash doesn't use pkg-config it doesn't register the transitive dependencies.
Diffstat (limited to 'pkgs/shells/dash')
-rw-r--r--pkgs/shells/dash/default.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/shells/dash/default.nix b/pkgs/shells/dash/default.nix
index 3b362b4bdee..e9b4093249c 100644
--- a/pkgs/shells/dash/default.nix
+++ b/pkgs/shells/dash/default.nix
@@ -2,6 +2,7 @@
 , stdenv
 , buildPackages
 , autoreconfHook
+, pkg-config
 , fetchurl
 , fetchpatch
 , libedit
@@ -37,12 +38,16 @@ stdenv.mkDerivation rec {
 
   strictDeps = true;
   # configure.ac patched; remove on next release
-  nativeBuildInputs = [ autoreconfHook ];
+  nativeBuildInputs = [ autoreconfHook ]
+    ++ lib.optionals stdenv.hostPlatform.isStatic [ pkg-config ];
 
   depsBuildBuild = [ buildPackages.stdenv.cc ];
   buildInputs = [ libedit ];
 
   configureFlags = [ "--with-libedit" ];
+  preConfigure = lib.optional stdenv.hostPlatform.isStatic ''
+    export LIBS="$(pkg-config --libs --static libedit)"
+  '';
 
   enableParallelBuilding = true;