depot/third_party/nixpkgs/pkgs/development/compilers/dotnet/sigtool.nix
Default email 5ca88bfbb9 Project import generated by Copybara.
GitOrigin-RevId: 9f918d616c5321ad374ae6cb5ea89c9e04bf3e58
2024-07-31 10:19:44 +00:00

26 lines
643 B
Nix

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