Merge pull request #291591 from atorres1985-contrib/jasper
jasper: split outputs
This commit is contained in:
commit
06a4249220
1 changed files with 27 additions and 3 deletions
|
@ -1,8 +1,15 @@
|
||||||
{ lib
|
{ lib
|
||||||
, stdenv
|
|
||||||
, fetchFromGitHub
|
|
||||||
, cmake
|
, cmake
|
||||||
|
, fetchFromGitHub
|
||||||
|
, freeglut
|
||||||
|
, libGL
|
||||||
|
, libheif
|
||||||
|
, libjpeg
|
||||||
, pkg-config
|
, pkg-config
|
||||||
|
, stdenv
|
||||||
|
, enableHEIFCodec ? true
|
||||||
|
, enableJPGCodec ? true
|
||||||
|
, enableOpenGL ? true
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
|
@ -16,18 +23,34 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
hash = "sha256-SE3zB+8zZuuT+W6QYTuQhM+dBgYuFzYK4a7QaquGB60=";
|
hash = "sha256-SE3zB+8zZuuT+W6QYTuQhM+dBgYuFzYK4a7QaquGB60=";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = [ "out" "doc" "man" ];
|
outputs = [ "out" "dev" "doc" "lib" "man" ];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
cmake
|
cmake
|
||||||
pkg-config
|
pkg-config
|
||||||
];
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
] ++ lib.optionals enableHEIFCodec [
|
||||||
|
libheif
|
||||||
|
] ++ lib.optionals enableJPGCodec [
|
||||||
|
libjpeg
|
||||||
|
] ++ lib.optionals enableOpenGL [
|
||||||
|
freeglut
|
||||||
|
libGL
|
||||||
|
];
|
||||||
|
|
||||||
# Since "build" already exists and is populated, cmake tries to use it,
|
# Since "build" already exists and is populated, cmake tries to use it,
|
||||||
# throwing uncomprehensible error messages...
|
# throwing uncomprehensible error messages...
|
||||||
cmakeBuildDir = "build-directory";
|
cmakeBuildDir = "build-directory";
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
(lib.cmakeBool "ALLOW_IN_SOURCE_BUILD" true)
|
(lib.cmakeBool "ALLOW_IN_SOURCE_BUILD" true)
|
||||||
|
(lib.cmakeBool "JAS_ENABLE_HEIC_CODEC" enableHEIFCodec)
|
||||||
|
(lib.cmakeBool "JAS_INCLUDE_HEIC_CODEC" enableHEIFCodec)
|
||||||
|
(lib.cmakeBool "JAS_ENABLE_JPG_CODEC" enableJPGCodec)
|
||||||
|
(lib.cmakeBool "JAS_INCLUDE_JPG_CODEC" enableJPGCodec)
|
||||||
|
(lib.cmakeBool "JAS_ENABLE_MIF_CODEC" false) # Dangerous!
|
||||||
|
(lib.cmakeBool "JAS_ENABLE_OPENGL" enableOpenGL)
|
||||||
];
|
];
|
||||||
|
|
||||||
strictDeps = true;
|
strictDeps = true;
|
||||||
|
@ -53,6 +76,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
for most computing platforms when JasPer was first developed, circa 1999.
|
for most computing platforms when JasPer was first developed, circa 1999.
|
||||||
'';
|
'';
|
||||||
license = lib.licenses.mit;
|
license = lib.licenses.mit;
|
||||||
|
mainProgram = "jasper";
|
||||||
maintainers = with lib.maintainers; [ AndersonTorres ];
|
maintainers = with lib.maintainers; [ AndersonTorres ];
|
||||||
platforms = lib.platforms.unix;
|
platforms = lib.platforms.unix;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue