mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 03:23:29 +03:00
picolisp: fix darwin build
Also use the default `buildPhase` to let `makeFlags` etc. work, and change the deprecated `substituteInPlace --replace` to `--replace-fail`.
This commit is contained in:
parent
576f2c9301
commit
532bb82d5a
1 changed files with 11 additions and 5 deletions
|
@ -29,10 +29,16 @@ stdenv.mkDerivation {
|
||||||
readline
|
readline
|
||||||
];
|
];
|
||||||
sourceRoot = ''pil21'';
|
sourceRoot = ''pil21'';
|
||||||
buildPhase = ''
|
preBuild =
|
||||||
cd src
|
''
|
||||||
make
|
cd src
|
||||||
'';
|
''
|
||||||
|
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||||
|
# Flags taken from instructions at: https://picolisp.com/wiki/?alternativeMacOSRepository
|
||||||
|
makeFlagsArray+=(
|
||||||
|
SHARED='-dynamiclib -undefined dynamic_lookup'
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
cd ..
|
cd ..
|
||||||
|
@ -42,7 +48,7 @@ stdenv.mkDerivation {
|
||||||
ln -s "$out/lib/picolisp/bin/pil" "$out/bin/pil"
|
ln -s "$out/lib/picolisp/bin/pil" "$out/bin/pil"
|
||||||
ln -s "$out/lib/picolisp/man/man1/pil.1" "$out/man/pil.1"
|
ln -s "$out/lib/picolisp/man/man1/pil.1" "$out/man/pil.1"
|
||||||
ln -s "$out/lib/picolisp/man/man1/picolisp.1" "$out/man/picolisp.1"
|
ln -s "$out/lib/picolisp/man/man1/picolisp.1" "$out/man/picolisp.1"
|
||||||
substituteInPlace $out/bin/pil --replace /usr $out
|
substituteInPlace $out/bin/pil --replace-fail /usr $out
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue