depot/third_party/nixpkgs/pkgs/os-specific/darwin/sigtool/default.nix
Default email ec92d4d331 Project import generated by Copybara.
GitOrigin-RevId: 540dccb2aeaffa9dc69bfdc41c55abd7ccc6baa3
2021-05-28 11:39:13 +02:00

24 lines
679 B
Nix

{ lib, stdenv, fetchFromGitHub, pkg-config, cmake, makeWrapper, openssl }:
stdenv.mkDerivation {
name = "sigtool";
src = fetchFromGitHub {
owner = "thefloweringash";
repo = "sigtool";
rev = "4a3719b42dc91c3f513df94048851cc98e7c7fcf";
sha256 = "04ra1cx7k1sdbkj5yrvl0s3l333vpir8rnm8k1dh2zy1w0a6hpqa";
};
nativeBuildInputs = [ pkg-config makeWrapper ];
buildInputs = [ openssl ];
installFlags = [ "PREFIX=$(out)" ];
# Upstream (me) asserts the driver script is optional.
postInstall = ''
substitute $NIX_BUILD_TOP/$sourceRoot/codesign.sh $out/bin/codesign \
--replace sigtool "$out/bin/sigtool"
chmod a+x $out/bin/codesign
'';
}