about summary refs log tree commit diff
path: root/pkgs/development/compilers/dotnet/sigtool.nix
diff options
context:
space:
mode:
authorDavid McFarland <corngood@gmail.com>2024-02-20 23:21:08 -0400
committerDavid McFarland <corngood@gmail.com>2024-03-03 15:15:08 -0400
commit043eab9a5ac2ac3bdabd541fb3180e80c47c2b2c (patch)
treeecce5897d1bc8c7626497ae32f32adea1c9d1aec /pkgs/development/compilers/dotnet/sigtool.nix
parent845b559abe7dea12b2f3d4a98cf5326e0f1e195b (diff)
downloadnixlib-043eab9a5ac2ac3bdabd541fb3180e80c47c2b2c.tar
nixlib-043eab9a5ac2ac3bdabd541fb3180e80c47c2b2c.tar.gz
nixlib-043eab9a5ac2ac3bdabd541fb3180e80c47c2b2c.tar.bz2
nixlib-043eab9a5ac2ac3bdabd541fb3180e80c47c2b2c.tar.lz
nixlib-043eab9a5ac2ac3bdabd541fb3180e80c47c2b2c.tar.xz
nixlib-043eab9a5ac2ac3bdabd541fb3180e80c47c2b2c.tar.zst
nixlib-043eab9a5ac2ac3bdabd541fb3180e80c47c2b2c.zip
dotnetCorePackages.dotnet_8: init at 8.0.2
Diffstat (limited to 'pkgs/development/compilers/dotnet/sigtool.nix')
-rw-r--r--pkgs/development/compilers/dotnet/sigtool.nix27
1 files changed, 27 insertions, 0 deletions
diff --git a/pkgs/development/compilers/dotnet/sigtool.nix b/pkgs/development/compilers/dotnet/sigtool.nix
new file mode 100644
index 000000000000..658ee578ae98
--- /dev/null
+++ b/pkgs/development/compilers/dotnet/sigtool.nix
@@ -0,0 +1,27 @@
+{ darwin
+, fetchFromGitHub
+, makeWrapper
+}:
+let
+  cctools = darwin.cctools;
+
+in darwin.sigtool.overrideAttrs (old: {
+  # this is a fork of sigtool that supports -v and --remove-signature, which are
+  # used by the dotnet sdk
+  src = fetchFromGitHub {
+    owner = "corngood";
+    repo = "sigtool";
+    rev = "new-commands";
+    sha256 = "sha256-EVM5ZG3sAHrIXuWrnqA9/4pDkJOpWCeBUl5fh0mkK4k=";
+  };
+
+  nativeBuildInputs = old.nativeBuildInputs or [] ++ [
+    makeWrapper
+  ];
+
+  postInstall = old.postInstall or "" + ''
+    wrapProgram $out/bin/codesign \
+      --set-default CODESIGN_ALLOCATE \
+        "${cctools}/bin/${cctools.targetPrefix}codesign_allocate"
+  '';
+})