From 50f296c0afcafb21fc938c6d72c0b03ef5b4220c Mon Sep 17 00:00:00 2001 From: toinux <26522723+itzwam@users.noreply.github.com> Date: Sat, 11 May 2024 18:00:43 +0200 Subject: [PATCH] ferm: Fix import-ferm error importing ferm wrapped script instead of perlFile (#310626) Co-authored-by: Antoine 'Toinux' Lesieur --- pkgs/tools/networking/ferm/default.nix | 4 ++++ .../networking/ferm/import-ferm-wrapped.patch | 14 ++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 pkgs/tools/networking/ferm/import-ferm-wrapped.patch diff --git a/pkgs/tools/networking/ferm/default.nix b/pkgs/tools/networking/ferm/default.nix index 63f247ab986b..e14b3f8572b8 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 000000000000..3975c79af886 --- /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