mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 15:27:20 +03:00
quickjs: fix build on darwin
This commit is contained in:
parent
ea50b72f4d
commit
429c8adc9b
@ -15,6 +15,10 @@ stdenv.mkDerivation rec {
|
||||
hash = "sha256-VMaxVVQuJ3DAwYrC14uJqlRBg0//ugYvtyhOXsTUbCA=";
|
||||
};
|
||||
|
||||
postPatch = lib.optionalString stdenv.isDarwin ''
|
||||
substituteInPlace Makefile --replace "CONFIG_LTO=y" ""
|
||||
'';
|
||||
|
||||
makeFlags = [ "prefix=${placeholder "out"}" ];
|
||||
enableParallelBuilding = true;
|
||||
|
||||
@ -45,15 +49,15 @@ stdenv.mkDerivation rec {
|
||||
temp=$(mktemp).js
|
||||
echo "console.log('Output from compiled program');" > "$temp"
|
||||
set -o verbose
|
||||
out=$(mktemp) && qjsc "$temp" -o "$out" && "$out" | grep -q "Output from compiled program"
|
||||
out=$(mktemp) && qjsc -flto "$temp" -o "$out" && "$out" | grep -q "Output from compiled program"
|
||||
out=$(mktemp) && qjsc -o "$out" "$temp" && "$out" | grep -q "Output from compiled program"
|
||||
out=$(mktemp) && qjsc -flto -o "$out" "$temp" && "$out" | grep -q "Output from compiled program"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A small and embeddable Javascript engine";
|
||||
homepage = "https://bellard.org/quickjs/";
|
||||
maintainers = with maintainers; [ stesie AndersonTorres ];
|
||||
platforms = platforms.linux;
|
||||
platforms = platforms.unix;
|
||||
license = licenses.mit;
|
||||
mainProgram = "qjs";
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user