libjpeg-turbo: Optionally build Java wrapper
This commit is contained in:
parent
266b6cdea3
commit
d45cdb2f3e
@ -1,4 +1,6 @@
|
|||||||
{ lib, stdenv, fetchFromGitHub, cmake, nasm
|
{ lib, stdenv, fetchFromGitHub, cmake, nasm
|
||||||
|
, openjdk
|
||||||
|
, enableJava ? false # whether to build the java wrapper
|
||||||
, enableStatic ? stdenv.hostPlatform.isStatic
|
, enableStatic ? stdenv.hostPlatform.isStatic
|
||||||
, enableShared ? !stdenv.hostPlatform.isStatic
|
, enableShared ? !stdenv.hostPlatform.isStatic
|
||||||
}:
|
}:
|
||||||
@ -26,11 +28,18 @@ stdenv.mkDerivation rec {
|
|||||||
moveToOutput include/transupp.h $dev_private
|
moveToOutput include/transupp.h $dev_private
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake nasm ];
|
nativeBuildInputs = [
|
||||||
|
cmake
|
||||||
|
nasm
|
||||||
|
] ++ lib.optionals enableJava [
|
||||||
|
openjdk
|
||||||
|
];
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-DENABLE_STATIC=${if enableStatic then "1" else "0"}"
|
"-DENABLE_STATIC=${if enableStatic then "1" else "0"}"
|
||||||
"-DENABLE_SHARED=${if enableShared then "1" else "0"}"
|
"-DENABLE_SHARED=${if enableShared then "1" else "0"}"
|
||||||
|
] ++ lib.optionals enableJava [
|
||||||
|
"-DWITH_JAVA=1"
|
||||||
];
|
];
|
||||||
|
|
||||||
doInstallCheck = true;
|
doInstallCheck = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user