diff options
author | Alyssa Ross <hi@alyssa.is> | 2024-03-22 16:41:59 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2024-03-22 16:41:59 +0100 |
commit | 46a88117a05c3469af5d99433af140c3de8ca088 (patch) | |
tree | d7f0557756d8f07a3081b3498c05ddc5a8ad429d /nixpkgs/pkgs/by-name/ja | |
parent | e97457545cea0b2ca421da257c83d8f1ef451d85 (diff) | |
parent | a343533bccc62400e8a9560423486a3b6c11a23b (diff) | |
download | nixlib-46a88117a05c3469af5d99433af140c3de8ca088.tar nixlib-46a88117a05c3469af5d99433af140c3de8ca088.tar.gz nixlib-46a88117a05c3469af5d99433af140c3de8ca088.tar.bz2 nixlib-46a88117a05c3469af5d99433af140c3de8ca088.tar.lz nixlib-46a88117a05c3469af5d99433af140c3de8ca088.tar.xz nixlib-46a88117a05c3469af5d99433af140c3de8ca088.tar.zst nixlib-46a88117a05c3469af5d99433af140c3de8ca088.zip |
Merge commit 'a343533bccc62400e8a9560423486a3b6c11a23b'
Diffstat (limited to 'nixpkgs/pkgs/by-name/ja')
-rw-r--r-- | nixpkgs/pkgs/by-name/ja/jasper/package.nix | 40 |
1 files changed, 34 insertions, 6 deletions
diff --git a/nixpkgs/pkgs/by-name/ja/jasper/package.nix b/nixpkgs/pkgs/by-name/ja/jasper/package.nix index 42cce508a545..88665973596a 100644 --- a/nixpkgs/pkgs/by-name/ja/jasper/package.nix +++ b/nixpkgs/pkgs/by-name/ja/jasper/package.nix @@ -1,8 +1,15 @@ { lib -, stdenv -, fetchFromGitHub , cmake +, fetchFromGitHub +, freeglut +, libGL +, libheif +, libjpeg , pkg-config +, stdenv +, enableHEIFCodec ? true +, enableJPGCodec ? true +, enableOpenGL ? true }: stdenv.mkDerivation (finalAttrs: { @@ -16,18 +23,37 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-SE3zB+8zZuuT+W6QYTuQhM+dBgYuFzYK4a7QaquGB60="; }; - outputs = [ "out" "doc" "man" ]; + # Splitting outputs going bad on Darwin + outputs = if stdenv.isDarwin + then [ "out" ] + else [ "out" "dev" "doc" "lib" "man" ]; nativeBuildInputs = [ cmake 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, # throwing uncomprehensible error messages... cmakeBuildDir = "build-directory"; cmakeFlags = [ (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; @@ -52,11 +78,13 @@ stdenv.mkDerivation (finalAttrs: { was chosen primarily due to the availability of C development environments for most computing platforms when JasPer was first developed, circa 1999. ''; - license = lib.licenses.mit; + license = with lib.licenses; [ mit ]; + mainProgram = "jasper"; maintainers = with lib.maintainers; [ AndersonTorres ]; platforms = lib.platforms.unix; - - # The value of __STDC_VERSION__ cannot be automatically determined when cross-compiling. + # The value of __STDC_VERSION__ cannot be automatically determined when + # cross-compiling. broken = stdenv.buildPlatform != stdenv.hostPlatform; }; }) +# TODO: investigate opengl support |