sigtool: 4a3719b4 -> 2a13539d (#138453)

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
Michael Stone 2021-09-23 11:14:07 -04:00 committed by GitHub
parent 714fdd6f38
commit 470466fdbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 14 deletions

View File

@ -1,24 +1,18 @@
{ lib, stdenv, fetchFromGitHub, pkg-config, cmake, makeWrapper, openssl }:
{ lib, stdenv, fetchFromGitHub, pkg-config, openssl }:
stdenv.mkDerivation {
name = "sigtool";
stdenv.mkDerivation rec {
pname = "sigtool";
version = "0.1.0";
src = fetchFromGitHub {
owner = "thefloweringash";
repo = "sigtool";
rev = "4a3719b42dc91c3f513df94048851cc98e7c7fcf";
sha256 = "04ra1cx7k1sdbkj5yrvl0s3l333vpir8rnm8k1dh2zy1w0a6hpqa";
rev = "v${version}";
sha256 = "sha256-GSVkF1BkZEkIF+q0SsoCuE0q48DRclE3E+qKc6JEc/0=";
};
nativeBuildInputs = [ pkg-config makeWrapper ];
nativeBuildInputs = [ pkg-config ];
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
'';
}

View File

@ -268,6 +268,12 @@ rec {
${bootstrapTools}/bin/codesign > $out/bin/codesign
chmod a+x $out/bin/codesign
'';
# on next bootstrap tools update, use the following:
# installPhase = ''
# mkdir -p $out/bin
# ln -s ${bootstrapTools}/bin/sigtool $out/bin
# ln -s ${bootstrapTools}/bin/codesign $out/bin
# '';
};
print-reexports = stdenv.mkDerivation {

View File

@ -206,7 +206,7 @@ in rec {
done
for i in $out/bin/*; do
if test -x "$i" -a ! -L "$i" -a "$(basename $i)" != codesign; then
if test -x "$i" -a ! -L "$i"; then
echo "Adding @executable_path to rpath in $i"
${stdenv.cc.targetPrefix}install_name_tool -add_rpath '@executable_path/../lib' $i
fi