File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 30
30
# stdenv as the original drv (important to determine targetPlatform).
31
31
drv . stdenv . mkDerivation {
32
32
name = "${ exe } " ;
33
- buildInputs = [ pkgs . cctools ] ;
34
- phases = [ "buildPhase" "postFixup" ] ;
33
+ buildInputs = pkgs . lib . optionals pkgs . stdenv . isDarwin [ pkgs . cctools ] ;
34
+ phases = [ "buildPhase" ] ++ pkgs . lib . optionals pkgs . stdenv . isDarwin [ "postFixup" ] ;
35
35
buildPhase = ''
36
36
set -e
37
37
47
47
sed 's/${ placeholder } /${ rev } /' ${ drv } /bin/${ exe } > $out/bin/${ exe }
48
48
chmod +x $out/bin/${ exe }
49
49
'' ;
50
- postFixup = ''
50
+ postFixup = pkgs . lib . optionalString pkgs . stdenv . isDarwin ''
51
51
install_name_tool -add_rpath ${ pkgs . zlib } /lib $out/bin/${ exe }
52
52
install_name_tool -add_rpath ${ pkgs . lmdb } /lib $out/bin/${ exe }
53
53
install_name_tool -add_rpath ${ pkgs . libcxx } /lib $out/bin/${ exe }
You can’t perform that action at this time.
0 commit comments