From d1ef3d7089cf8e39672f8ed7be7a394f8fb69c0c Mon Sep 17 00:00:00 2001 From: roblabla Date: Thu, 9 Nov 2023 21:35:03 +0100 Subject: [PATCH] ghidra: Remove executable bit of non-executable files --- pkgs/tools/security/ghidra/build.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/security/ghidra/build.nix b/pkgs/tools/security/ghidra/build.nix index cde42b9519b7..50fd64656f4a 100644 --- a/pkgs/tools/security/ghidra/build.nix +++ b/pkgs/tools/security/ghidra/build.nix @@ -10,6 +10,7 @@ , icoutils , xcbuild , protobuf +, fetchurl }: let @@ -103,7 +104,16 @@ in stdenv.mkDerivation { dontStrip = true; - patches = [ ./0001-Use-protobuf-gradle-plugin.patch ]; + patches = [ + ./0001-Use-protobuf-gradle-plugin.patch + # we use fetchurl since the fetchpatch normalization strips the whole diff + # https://github.com/NixOS/nixpkgs/issues/266556 + (fetchurl { + name = "0002-remove-executable-bit.patch"; + url = "https://github.com/NationalSecurityAgency/ghidra/commit/e2a945624b74e5d42dc85e9c1f992315dd154db1.diff"; + sha256 = "07mjfl7hvag2akk65g4cknp330qlk07dgbmh20dyg9qxzmk91fyq"; + }) + ]; buildPhase = '' export HOME="$NIX_BUILD_TOP/home"