libxaw: refactor, move to pkgs/by-name and rename from xorg.libXaw

this also fixes the build on static

+88 -57
+82
pkgs/by-name/li/libxaw/package.nix
···
··· 1 + { 2 + lib, 3 + stdenv, 4 + fetchurl, 5 + pkg-config, 6 + xorgproto, 7 + libx11, 8 + libxext, 9 + libxmu, 10 + libxpm, 11 + libxt, 12 + writeScript, 13 + testers, 14 + }: 15 + stdenv.mkDerivation (finalAttrs: { 16 + pname = "libxaw"; 17 + version = "1.0.16"; 18 + 19 + outputs = [ 20 + "out" 21 + "dev" 22 + "devdoc" 23 + ]; 24 + 25 + src = fetchurl { 26 + url = "mirror://xorg/individual/lib/libXaw-${finalAttrs.version}.tar.xz"; 27 + hash = "sha256-cx1XK1THCPgeGXpq+oAWkY4uBt/TAl4GbKZCpbjDnI8="; 28 + }; 29 + 30 + strictDeps = true; 31 + 32 + nativeBuildInputs = [ pkg-config ]; 33 + 34 + buildInputs = [ 35 + xorgproto 36 + libx11 37 + libxext 38 + libxmu 39 + libxpm 40 + libxt 41 + ]; 42 + 43 + propagatedBuildInputs = [ 44 + xorgproto 45 + libxt 46 + # needs to be propagated because of header file dependencies 47 + libxmu 48 + ]; 49 + 50 + postInstall = 51 + # remove dangling symlinks to .so files on static 52 + lib.optionalString stdenv.hostPlatform.isStatic "rm $out/lib/*.so*"; 53 + 54 + passthru = { 55 + updateScript = writeScript "update-${finalAttrs.pname}" '' 56 + #!/usr/bin/env nix-shell 57 + #!nix-shell -i bash -p common-updater-scripts 58 + version="$(list-directory-versions --pname libXaw \ 59 + --url https://xorg.freedesktop.org/releases/individual/lib/ \ 60 + | sort -V | tail -n1)" 61 + update-source-version ${finalAttrs.pname} "$version" 62 + ''; 63 + tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; 64 + }; 65 + 66 + meta = { 67 + description = "X Athena Widget Set, based on the X Toolkit Intrinsics (Xt) Library"; 68 + homepage = "https://gitlab.freedesktop.org/xorg/lib/libxaw"; 69 + license = with lib.licenses; [ 70 + mitOpenGroup 71 + x11 72 + hpndSellVariant 73 + hpnd 74 + ]; 75 + maintainers = [ ]; 76 + pkgConfigModules = [ 77 + "xaw6" 78 + "xaw7" 79 + ]; 80 + platforms = lib.platforms.unix; 81 + }; 82 + })
+2 -47
pkgs/servers/x11/xorg/default.nix
··· 17 libsm, 18 libx11, 19 libxau, 20 libxcb, 21 libxcvt, 22 libxcursor, ··· 99 libSM = libsm; 100 libX11 = libx11; 101 libXau = libxau; 102 libXcursor = libxcursor; 103 libXdmcp = libxdmcp; 104 libXext = libxext; ··· 1862 passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; 1863 meta = { 1864 pkgConfigModules = [ "xtrap" ]; 1865 - platforms = lib.platforms.unix; 1866 - }; 1867 - }) 1868 - ) { }; 1869 - 1870 - # THIS IS A GENERATED FILE. DO NOT EDIT! 1871 - libXaw = callPackage ( 1872 - { 1873 - stdenv, 1874 - pkg-config, 1875 - fetchurl, 1876 - libX11, 1877 - libXext, 1878 - xorgproto, 1879 - libXmu, 1880 - libXpm, 1881 - libXt, 1882 - testers, 1883 - }: 1884 - stdenv.mkDerivation (finalAttrs: { 1885 - pname = "libXaw"; 1886 - version = "1.0.16"; 1887 - builder = ./builder.sh; 1888 - src = fetchurl { 1889 - url = "mirror://xorg/individual/lib/libXaw-1.0.16.tar.xz"; 1890 - sha256 = "13wwqfwaahm6dh35w0nkvw32x3li2s0glsks34ggh267ahmmf7bk"; 1891 - }; 1892 - hardeningDisable = [ 1893 - "bindnow" 1894 - "relro" 1895 - ]; 1896 - strictDeps = true; 1897 - nativeBuildInputs = [ pkg-config ]; 1898 - buildInputs = [ 1899 - libX11 1900 - libXext 1901 - xorgproto 1902 - libXmu 1903 - libXpm 1904 - libXt 1905 - ]; 1906 - passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; 1907 - meta = { 1908 - pkgConfigModules = [ 1909 - "xaw6" 1910 - "xaw7" 1911 - ]; 1912 platforms = lib.platforms.unix; 1913 }; 1914 })
··· 17 libsm, 18 libx11, 19 libxau, 20 + libxaw, 21 libxcb, 22 libxcvt, 23 libxcursor, ··· 100 libSM = libsm; 101 libX11 = libx11; 102 libXau = libxau; 103 + libXaw = libxaw; 104 libXcursor = libxcursor; 105 libXdmcp = libxdmcp; 106 libXext = libxext; ··· 1864 passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; 1865 meta = { 1866 pkgConfigModules = [ "xtrap" ]; 1867 platforms = lib.platforms.unix; 1868 }; 1869 })
+4
pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl
··· 47 $pcMap{"x11"} = "libX11"; 48 $pcMap{"x11-xcb"} = "libX11"; 49 $pcMap{"xau"} = "libXau"; 50 $pcMap{"xbitmaps"} = "xbitmaps"; 51 $pcMap{"xcb-proto"} = "xcbproto"; 52 $pcMap{"xcursor"} = "libXcursor"; ··· 316 libsm, 317 libx11, 318 libxau, 319 libxcb, 320 libxcvt, 321 libxcursor, ··· 398 libSM = libsm; 399 libX11 = libx11; 400 libXau = libxau; 401 libXcursor = libxcursor; 402 libXdmcp = libxdmcp; 403 libXext = libxext;
··· 47 $pcMap{"x11"} = "libX11"; 48 $pcMap{"x11-xcb"} = "libX11"; 49 $pcMap{"xau"} = "libXau"; 50 + $pcMap{"xaw6"} = "libXaw"; 51 + $pcMap{"xaw7"} = "libXaw"; 52 $pcMap{"xbitmaps"} = "xbitmaps"; 53 $pcMap{"xcb-proto"} = "xcbproto"; 54 $pcMap{"xcursor"} = "libXcursor"; ··· 318 libsm, 319 libx11, 320 libxau, 321 + libxaw, 322 libxcb, 323 libxcvt, 324 libxcursor, ··· 401 libSM = libsm; 402 libX11 = libx11; 403 libXau = libxau; 404 + libXaw = libxaw; 405 libXcursor = libxcursor; 406 libXdmcp = libxdmcp; 407 libXext = libxext;
-9
pkgs/servers/x11/xorg/overrides.nix
··· 225 propagatedBuildInputs = attrs.propagatedBuildInputs or [ ] ++ [ xorg.libXfixes ]; 226 }); 227 228 - libXaw = super.libXaw.overrideAttrs (attrs: { 229 - outputs = [ 230 - "out" 231 - "dev" 232 - "devdoc" 233 - ]; 234 - propagatedBuildInputs = attrs.propagatedBuildInputs or [ ] ++ [ xorg.libXmu ]; 235 - }); 236 - 237 libXdamage = super.libXdamage.overrideAttrs (attrs: { 238 outputs = [ 239 "out"
··· 225 propagatedBuildInputs = attrs.propagatedBuildInputs or [ ] ++ [ xorg.libXfixes ]; 226 }); 227 228 libXdamage = super.libXdamage.overrideAttrs (attrs: { 229 outputs = [ 230 "out"
-1
pkgs/servers/x11/xorg/tarballs.list
··· 142 mirror://xorg/individual/font/font-winitzki-cyrillic-1.0.4.tar.xz 143 mirror://xorg/individual/font/font-xfree86-type1-1.0.5.tar.xz 144 mirror://xorg/individual/lib/libWindowsWM-1.0.1.tar.bz2 145 - mirror://xorg/individual/lib/libXaw-1.0.16.tar.xz 146 mirror://xorg/individual/lib/libXcomposite-0.4.6.tar.xz 147 mirror://xorg/individual/lib/libXdamage-1.1.6.tar.xz 148 mirror://xorg/individual/lib/libXfont-1.5.4.tar.bz2
··· 142 mirror://xorg/individual/font/font-winitzki-cyrillic-1.0.4.tar.xz 143 mirror://xorg/individual/font/font-xfree86-type1-1.0.5.tar.xz 144 mirror://xorg/individual/lib/libWindowsWM-1.0.1.tar.bz2 145 mirror://xorg/individual/lib/libXcomposite-0.4.6.tar.xz 146 mirror://xorg/individual/lib/libXdamage-1.1.6.tar.xz 147 mirror://xorg/individual/lib/libXfont-1.5.4.tar.bz2