1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 13:10:33 +00:00

Merge pull request #87546 from FireyFly/pkgs/j/avx-flag

j: add avxSupport option
This commit is contained in:
Michael Raskin 2020-05-13 23:31:25 +00:00 committed by GitHub
commit b2f83be34d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,6 @@
{ stdenv, fetchFromGitHub, readline, libedit, bc }:
{ stdenv, fetchFromGitHub, readline, libedit, bc
, avxSupport ? false
}:
stdenv.mkDerivation rec {
pname = "j";
@ -19,6 +21,9 @@ stdenv.mkDerivation rec {
if stdenv.isLinux then "linux" else
if stdenv.isDarwin then "darwin" else
"unknown";
variant = if stdenv.isx86_64 && avxSupport then "avx" else "";
j64x="j${bits}${variant}";
doCheck = true;
@ -34,7 +39,7 @@ stdenv.mkDerivation rec {
patchShebangs .
sed -i $JLIB/bin/profile.ijs -e "s@'/usr/share/j/.*'@'$out/share/j'@;"
./build_all.sh
j64x="${j64x}" ./build_all.sh
cp $SOURCE_DIR/bin/${platform}/j${bits}*/* "$JLIB/bin"
'';