From 0f77179bcfa2e821d98889423d1f8a18e22952ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Mancilla?= Date: Tue, 21 Sep 2021 23:01:26 -0300 Subject: [PATCH] quilt: wrap all required inputs Some quilt commands fail on darwin with this error: stat: illegal option -- c usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...] This is because at build time quilt is configured to use the coreutils version of 'stat', but the 'quilt' wrapper does not wrap this coreutils dependency and then at runtime the version from macOS is used (as found in $PATH). Fix by ensuring that coreutils is wrapped. Also add and wrap the missing inputs for the other programs used by the quilt commands: gawk, gnugrep, gnused, unixtools.column and unixtools.getopt. --- pkgs/development/tools/quilt/default.nix | 36 +++++++++++++++++++++--- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/pkgs/development/tools/quilt/default.nix b/pkgs/development/tools/quilt/default.nix index 8dafe88005de..334737955832 100644 --- a/pkgs/development/tools/quilt/default.nix +++ b/pkgs/development/tools/quilt/default.nix @@ -1,4 +1,19 @@ -{ lib, stdenv, fetchurl, makeWrapper, bash, perl, diffstat, diffutils, patch, findutils }: +{ lib +, stdenv +, fetchurl +, makeWrapper +, bash +, coreutils +, diffstat +, diffutils +, findutils +, gawk +, gnugrep +, gnused +, patch +, perl +, unixtools +}: stdenv.mkDerivation rec { @@ -11,11 +26,24 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ makeWrapper ]; - buildInputs = [ perl bash diffutils patch findutils diffstat ]; + + buildInputs = [ + bash + coreutils + diffstat + diffutils + findutils + gawk + gnugrep + gnused + patch + perl + unixtools.column + unixtools.getopt + ]; postInstall = '' - wrapProgram $out/bin/quilt --prefix PATH : \ - ${perl}/bin:${bash}/bin:${diffstat}/bin:${diffutils}/bin:${findutils}/bin:${patch}/bin + wrapProgram $out/bin/quilt --prefix PATH : ${lib.makeBinPath buildInputs} ''; meta = {