summaryrefslogtreecommitdiffstats
path: root/pkgs/development/compilers/dotnet/sigtool.nix
blob: 6d45a76c169904731b93dcd588a71aaff8b72f31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{
  cctools,
  darwin,
  fetchFromGitHub,
  makeWrapper,
}:

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"
  '';
})