From 470466fdbd5991c0f7d81fa657e45458730ff7c8 Mon Sep 17 00:00:00 2001 From: Michael Stone Date: Thu, 23 Sep 2021 11:14:07 -0400 Subject: [PATCH] sigtool: 4a3719b4 -> 2a13539d (#138453) Co-authored-by: Sandro --- pkgs/os-specific/darwin/sigtool/default.nix | 20 +++++++------------- pkgs/stdenv/darwin/default.nix | 6 ++++++ pkgs/stdenv/darwin/make-bootstrap-tools.nix | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/pkgs/os-specific/darwin/sigtool/default.nix b/pkgs/os-specific/darwin/sigtool/default.nix index 933ef784879..6c600097f09 100644 --- a/pkgs/os-specific/darwin/sigtool/default.nix +++ b/pkgs/os-specific/darwin/sigtool/default.nix @@ -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 - ''; } diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index b5a9f0cc5cb..81313fb390e 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -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 { diff --git a/pkgs/stdenv/darwin/make-bootstrap-tools.nix b/pkgs/stdenv/darwin/make-bootstrap-tools.nix index c62e72f6047..434eadb38bf 100644 --- a/pkgs/stdenv/darwin/make-bootstrap-tools.nix +++ b/pkgs/stdenv/darwin/make-bootstrap-tools.nix @@ -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