Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 7 additions & 13 deletions pkgs/os-specific/darwin/sigtool/default.nix
Original file line number Diff line number Diff line change
@@ -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
'';
}
6 changes: 6 additions & 0 deletions pkgs/stdenv/darwin/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/stdenv/darwin/make-bootstrap-tools.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down