libxpm: refactor, move to pkgs/by-name and rename from xorg.libXpm

relevant changes:
- remove `sed -i '/USE_GETTEXT_TRUE/d' sxpm/Makefile.in cxpm/Makefile.in`
from patchPhase, added in c0496c041343219ad4e4333c2687a4122ee1dd94 with
the message "removed unused gettext" in fucking 2008.
I don't know exactly what this does but i think there is a high chance
that it is not relevant anymore.
So let's see if something breaks.

+84 -60
+79
pkgs/by-name/li/libxpm/package.nix
··· 1 + { 2 + lib, 3 + stdenv, 4 + fetchurl, 5 + pkg-config, 6 + gettext, 7 + xorgproto, 8 + libx11, 9 + libxext, 10 + libxt, 11 + ncompress, 12 + gzip, 13 + writeScript, 14 + testers, 15 + }: 16 + stdenv.mkDerivation (finalAttrs: { 17 + pname = "libxpm"; 18 + version = "3.5.17"; 19 + 20 + outputs = [ 21 + "bin" 22 + "dev" 23 + "out" 24 + ]; 25 + 26 + src = fetchurl { 27 + url = "mirror://xorg/individual/lib/libXpm-${finalAttrs.version}.tar.xz"; 28 + hash = "sha256-ZLMfgQGefTiMgisLKK+NUcRiK4Px8Mtvo/yV4nEibkM="; 29 + }; 30 + 31 + strictDeps = true; 32 + 33 + nativeBuildInputs = [ 34 + pkg-config 35 + gettext 36 + ]; 37 + 38 + buildInputs = [ 39 + xorgproto 40 + libx11 41 + libxext 42 + libxt 43 + ]; 44 + 45 + propagatedBuildInputs = [ 46 + libx11 47 + ]; 48 + 49 + env = { 50 + XPM_PATH_COMPRESS = lib.makeBinPath [ ncompress ]; 51 + XPM_PATH_GZIP = lib.makeBinPath [ gzip ]; 52 + XPM_PATH_UNCOMPRESS = lib.makeBinPath [ gzip ]; 53 + }; 54 + 55 + passthru = { 56 + updateScript = writeScript "update-${finalAttrs.pname}" '' 57 + #!/usr/bin/env nix-shell 58 + #!nix-shell -i bash -p common-updater-scripts 59 + version="$(list-directory-versions --pname libXpm \ 60 + --url https://xorg.freedesktop.org/releases/individual/lib/ \ 61 + | sort -V | tail -n1)" 62 + update-source-version ${finalAttrs.pname} "$version" 63 + ''; 64 + tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; 65 + }; 66 + 67 + meta = { 68 + description = "X Pixmap (XPM) image file format library"; 69 + homepage = "https://gitlab.freedesktop.org/xorg/lib/libxpm"; 70 + license = with lib.licenses; [ 71 + x11 72 + mit 73 + ]; 74 + mainProgram = "sxpm"; 75 + maintainers = [ ]; 76 + pkgConfigModules = [ "xpm" ]; 77 + platforms = lib.platforms.unix; 78 + }; 79 + })
+2 -44
pkgs/servers/x11/xorg/default.nix
··· 24 24 libxext, 25 25 libxfixes, 26 26 libxmu, 27 + libxpm, 27 28 libxrandr, 28 29 libxrender, 29 30 libxt, ··· 103 104 libXext = libxext; 104 105 libXfixes = libxfixes; 105 106 libXmu = libxmu; 107 + libXpm = libxpm; 106 108 libXrandr = libxrandr; 107 109 libXrender = libxrender; 108 110 libXt = libxt; ··· 2227 2229 passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; 2228 2230 meta = { 2229 2231 pkgConfigModules = [ "xp" ]; 2230 - platforms = lib.platforms.unix; 2231 - }; 2232 - }) 2233 - ) { }; 2234 - 2235 - # THIS IS A GENERATED FILE. DO NOT EDIT! 2236 - libXpm = callPackage ( 2237 - { 2238 - stdenv, 2239 - pkg-config, 2240 - fetchurl, 2241 - libX11, 2242 - libXext, 2243 - xorgproto, 2244 - libXt, 2245 - gettext, 2246 - testers, 2247 - }: 2248 - stdenv.mkDerivation (finalAttrs: { 2249 - pname = "libXpm"; 2250 - version = "3.5.17"; 2251 - builder = ./builder.sh; 2252 - src = fetchurl { 2253 - url = "mirror://xorg/individual/lib/libXpm-3.5.17.tar.xz"; 2254 - sha256 = "0hvf49qy55gwldpwpw7ihcmn5i2iinpjh2rbha63hzcy060izcv4"; 2255 - }; 2256 - hardeningDisable = [ 2257 - "bindnow" 2258 - "relro" 2259 - ]; 2260 - strictDeps = true; 2261 - nativeBuildInputs = [ 2262 - pkg-config 2263 - gettext 2264 - ]; 2265 - buildInputs = [ 2266 - libX11 2267 - libXext 2268 - xorgproto 2269 - libXt 2270 - ]; 2271 - passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; 2272 - meta = { 2273 - pkgConfigModules = [ "xpm" ]; 2274 2232 platforms = lib.platforms.unix; 2275 2233 }; 2276 2234 })
+3
pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl
··· 55 55 $pcMap{"xfixes"} = "libXfixes"; 56 56 $pcMap{"xmu"} = "libXmu"; 57 57 $pcMap{"xmuu"} = "libXmu"; 58 + $pcMap{"xpm"} = "libXpm"; 58 59 $pcMap{"xrandr"} = "libXrandr"; 59 60 $pcMap{"xrender"} = "libXrender"; 60 61 $pcMap{"xt"} = "libXt"; ··· 322 323 libxext, 323 324 libxfixes, 324 325 libxmu, 326 + libxpm, 325 327 libxrandr, 326 328 libxrender, 327 329 libxt, ··· 401 403 libXext = libxext; 402 404 libXfixes = libxfixes; 403 405 libXmu = libxmu; 406 + libXpm = libxpm; 404 407 libXrandr = libxrandr; 405 408 libXrender = libxrender; 406 409 libXt = libxt;
-15
pkgs/servers/x11/xorg/overrides.nix
··· 320 320 ]; 321 321 }); 322 322 323 - libXpm = super.libXpm.overrideAttrs (attrs: { 324 - outputs = [ 325 - "bin" 326 - "dev" 327 - "out" 328 - ]; # tiny man in $bin 329 - patchPhase = "sed -i '/USE_GETTEXT_TRUE/d' sxpm/Makefile.in cxpm/Makefile.in"; 330 - XPM_PATH_COMPRESS = lib.makeBinPath [ ncompress ]; 331 - XPM_PATH_GZIP = lib.makeBinPath [ gzip ]; 332 - XPM_PATH_UNCOMPRESS = lib.makeBinPath [ gzip ]; 333 - meta = attrs.meta // { 334 - mainProgram = "sxpm"; 335 - }; 336 - }); 337 - 338 323 libXpresent = super.libXpresent.overrideAttrs (attrs: { 339 324 buildInputs = attrs.buildInputs ++ [ 340 325 xorg.libXext
-1
pkgs/servers/x11/xorg/tarballs.list
··· 152 152 mirror://xorg/individual/lib/libXinerama-1.1.5.tar.xz 153 153 mirror://xorg/individual/lib/libxkbfile-1.1.3.tar.xz 154 154 mirror://xorg/individual/lib/libXp-1.0.4.tar.xz 155 - mirror://xorg/individual/lib/libXpm-3.5.17.tar.xz 156 155 mirror://xorg/individual/lib/libXpresent-1.0.1.tar.xz 157 156 mirror://xorg/individual/lib/libXres-1.2.2.tar.xz 158 157 mirror://xorg/individual/lib/libXScrnSaver-1.2.4.tar.xz