diff options
author | Nick Cao <nickcao@nichi.co> | 2024-05-25 10:06:12 -0400 |
---|---|---|
committer | Nick Cao <nickcao@nichi.co> | 2024-05-25 10:26:42 -0400 |
commit | 19674ecb5cac26a84703848237a84658a9f85d5e (patch) | |
tree | 130c973cdb014b5d1cde8ba5672016a3624ea53e /pkgs/by-name/ja | |
parent | 77670642a267da7e0fa4a37a848a16c68884fe07 (diff) |
jasper: fix cross compilation
Diffstat (limited to 'pkgs/by-name/ja')
-rw-r--r-- | pkgs/by-name/ja/jasper/package.nix | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/pkgs/by-name/ja/jasper/package.nix b/pkgs/by-name/ja/jasper/package.nix index 34e517c81eaba..bdea66b5049f1 100644 --- a/pkgs/by-name/ja/jasper/package.nix +++ b/pkgs/by-name/ja/jasper/package.nix @@ -55,6 +55,14 @@ stdenv.mkDerivation (finalAttrs: { strictDeps = true; + # The value of __STDC_VERSION__ cannot be automatically determined when cross-compiling + # https://github.com/jasper-software/jasper/blob/87668487/CMakeLists.txt#L415 + # workaround taken from + # https://github.com/openembedded/meta-openembedded/blob/907b9c0a/meta-oe/recipes-graphics/jasper/jasper_4.1.1.bb#L16 + preConfigure = lib.optionalString (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + cmakeFlagsArray+=(-DJAS_STDC_VERSION="$(echo __STDC_VERSION__ | $CXX -E -P -)") + ''; + meta = { homepage = "https://jasper-software.github.io/jasper/"; description = "Image processing/coding toolkit"; @@ -79,9 +87,6 @@ stdenv.mkDerivation (finalAttrs: { mainProgram = "jasper"; maintainers = with lib.maintainers; [ AndersonTorres ]; platforms = lib.platforms.unix; - # The value of __STDC_VERSION__ cannot be automatically determined when - # cross-compiling. - broken = stdenv.buildPlatform != stdenv.hostPlatform; }; }) # TODO: investigate opengl support |