Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

imv: add patch for libnsgif (#388255)

authored by

Peder Bergebakken Sundt and committed by
GitHub
e02cdfcf 1e364930

+16 -15
+16 -15
pkgs/by-name/im/imv/package.nix
··· 2 stdenv, 3 lib, 4 fetchFromSourcehut, 5 asciidoc, 6 cmocka, 7 docbook_xsl, ··· 12 icu75, 13 pango, 14 inih, 15 - withWindowSystem ? null, 16 xorg, 17 libxkbcommon, 18 libGLU, 19 wayland, 20 - # "libnsgif" is disabled until https://todo.sr.ht/~exec64/imv/55 is solved 21 withBackends ? [ 22 "libjxl" 23 "libtiff" ··· 25 "libpng" 26 "librsvg" 27 "libheif" 28 ], 29 freeimage, 30 libtiff, ··· 37 }: 38 39 let 40 - # default value of withWindowSystem 41 - withWindowSystem' = 42 - if withWindowSystem != null then 43 - withWindowSystem 44 - else if stdenv.hostPlatform.isLinux then 45 - "all" 46 - else 47 - "x11"; 48 - 49 windowSystems = { 50 all = windowSystems.x11 ++ windowSystems.wayland; 51 x11 = [ ··· 75 in 76 77 # check that given window system is valid 78 - assert lib.assertOneOf "withWindowSystem" withWindowSystem' (builtins.attrNames windowSystems); 79 # check that every given backend is valid 80 assert builtins.all ( 81 b: lib.assertOneOf "each backend" b (builtins.attrNames backends) ··· 97 }; 98 99 mesonFlags = [ 100 - "-Dwindows=${withWindowSystem'}" 101 "-Dtest=enabled" 102 "-Dman=enabled" 103 ] ++ backendFlags; ··· 121 pango 122 inih 123 ] 124 - ++ windowSystems."${withWindowSystem'}" 125 ++ builtins.map (b: backends."${b}") withBackends; 126 127 postInstall = '' 128 install -Dm644 ../files/imv.desktop $out/share/applications/ 129 ''; 130 131 - postFixup = lib.optionalString (withWindowSystem' == "all") '' 132 # The `bin/imv` script assumes imv-wayland or imv-x11 in PATH, 133 # so we have to fix those to the binaries we installed into the /nix/store 134
··· 2 stdenv, 3 lib, 4 fetchFromSourcehut, 5 + fetchpatch, 6 asciidoc, 7 cmocka, 8 docbook_xsl, ··· 13 icu75, 14 pango, 15 inih, 16 + withWindowSystem ? if stdenv.hostPlatform.isLinux then "all" else "x11", 17 xorg, 18 libxkbcommon, 19 libGLU, 20 wayland, 21 withBackends ? [ 22 "libjxl" 23 "libtiff" ··· 25 "libpng" 26 "librsvg" 27 "libheif" 28 + "libnsgif" 29 ], 30 freeimage, 31 libtiff, ··· 38 }: 39 40 let 41 windowSystems = { 42 all = windowSystems.x11 ++ windowSystems.wayland; 43 x11 = [ ··· 67 in 68 69 # check that given window system is valid 70 + assert lib.assertOneOf "withWindowSystem" withWindowSystem (builtins.attrNames windowSystems); 71 # check that every given backend is valid 72 assert builtins.all ( 73 b: lib.assertOneOf "each backend" b (builtins.attrNames backends) ··· 89 }; 90 91 mesonFlags = [ 92 + "-Dwindows=${withWindowSystem}" 93 "-Dtest=enabled" 94 "-Dman=enabled" 95 ] ++ backendFlags; ··· 113 pango 114 inih 115 ] 116 + ++ windowSystems."${withWindowSystem}" 117 ++ builtins.map (b: backends."${b}") withBackends; 118 119 + patches = [ 120 + (fetchpatch { 121 + # https://lists.sr.ht/~exec64/imv-devel/patches/55937 122 + name = "update libnsgif backend"; 123 + url = "https://lists.sr.ht/~exec64/imv-devel/%3C20241113012702.30521-2-reallyjohnreed@gmail.com%3E/raw"; 124 + hash = "sha256-/OQeDfIkPtJIIZwL8jYVRy0B7LSBi9/NvAdPoDm851k="; 125 + }) 126 + ]; 127 + 128 postInstall = '' 129 install -Dm644 ../files/imv.desktop $out/share/applications/ 130 ''; 131 132 + postFixup = lib.optionalString (withWindowSystem == "all") '' 133 # The `bin/imv` script assumes imv-wayland or imv-x11 in PATH, 134 # so we have to fix those to the binaries we installed into the /nix/store 135