File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 1
1
{ pkgs } :
2
2
drv :
3
- pkgs . buildPackages . runCommand drv . name
3
+ with pkgs ;
4
+ buildPackages . runCommand drv . name
4
5
{
5
6
inherit ( drv ) exeName exePath meta passthru ;
6
- } ''
7
+ # this is to ensure we are re-signing macOS binaries that might have been
8
+ # mutilated by set-git-rev (e.g. patching in the git revision.)
9
+ nativeBuildInputs = lib . optionals hostPlatform . isDarwin [ darwin . signingUtils ] ;
10
+ } ( ''
7
11
mkdir -p $out
8
12
cp --no-preserve=timestamps --recursive ${ drv } /* $out/
9
13
chmod -R +w $out/bin
10
- ${ pkgs . pkgsBuildBuild . haskellBuildUtils } /bin/set-git-rev "${ pkgs . gitrev } " $out/bin/*
11
- ''
14
+ ${ pkgsBuildBuild . haskellBuildUtils } /bin/set-git-rev "${ gitrev } " $out/bin/*
15
+ '' + lib . optionalString hostPlatform . isDarwin ''
16
+ for exe in $out/bin/*; do
17
+ signIfRequired "$exe"
18
+ done
19
+ '' )
You can’t perform that action at this time.
0 commit comments