diff options
author | toinux <26522723+itzwam@users.noreply.github.com> | 2024-05-11 18:00:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-11 18:00:43 +0200 |
commit | 50f296c0afcafb21fc938c6d72c0b03ef5b4220c (patch) | |
tree | 9128a189c8607b62ba783565115e5cf33c645f5b | |
parent | f7713016d98ec990e9b8b276dd6f5491ccdbf577 (diff) |
ferm: Fix import-ferm error importing ferm wrapped script instead of perlFile (#310626)
Co-authored-by: Antoine 'Toinux' Lesieur <toinux@laptaupe.local>
-rw-r--r-- | pkgs/tools/networking/ferm/default.nix | 4 | ||||
-rw-r--r-- | pkgs/tools/networking/ferm/import-ferm-wrapped.patch | 14 |
2 files changed, 18 insertions, 0 deletions
diff --git a/pkgs/tools/networking/ferm/default.nix b/pkgs/tools/networking/ferm/default.nix index 63f247ab986b3..e14b3f8572b83 100644 --- a/pkgs/tools/networking/ferm/default.nix +++ b/pkgs/tools/networking/ferm/default.nix @@ -11,6 +11,10 @@ in stdenv.mkDerivation rec { sha256 = "sha256-wA2RDVOU5pZ1YI617g9QTVz9pB6ZCi2akbqsbfk+P5I="; }; + patches = [ + ./import-ferm-wrapped.patch + ]; + # perl is used at build time to gather the ferm version. nativeBuildInputs = [ makeWrapper perl ]; buildInputs = [ perl ]; diff --git a/pkgs/tools/networking/ferm/import-ferm-wrapped.patch b/pkgs/tools/networking/ferm/import-ferm-wrapped.patch new file mode 100644 index 0000000000000..3975c79af8868 --- /dev/null +++ b/pkgs/tools/networking/ferm/import-ferm-wrapped.patch @@ -0,0 +1,14 @@ +--- old/src/import-ferm ++++ new/src/import-ferm +@@ -42,9 +42,9 @@ + # find the main "ferm" program + my $ferm; + if ($0 =~ /^(.*)\//) { +- $ferm = "$1/ferm"; ++ $ferm = "$1/.ferm-wrapped"; + } else { +- $ferm = 'ferm'; ++ $ferm = '.ferm-wrapped'; + } + + # Perl 5.24 requires this prefix or else it will only look in @INC |