libsm: refactor, move to pkgs/by-name and rename from xorg.libSM

relevant changes:
- moves xtrans from propagatedBuildInputs to buildInputs
xtrans was added there in cb4f2749778df37f8e8ee135caf1da75f4cc5483,
however I think it was meant to be added to buildInputs

+72 -51
+67
pkgs/by-name/li/libsm/package.nix
··· 1 + { 2 + lib, 3 + stdenv, 4 + fetchurl, 5 + pkg-config, 6 + libice, 7 + libuuid, 8 + xorgproto, 9 + xtrans, 10 + writeScript, 11 + testers, 12 + }: 13 + stdenv.mkDerivation (finalAttrs: { 14 + pname = "libsm"; 15 + version = "1.2.6"; 16 + 17 + outputs = [ 18 + "out" 19 + "dev" 20 + "doc" 21 + ]; 22 + 23 + src = fetchurl { 24 + url = "mirror://xorg/individual/lib/libSM-${finalAttrs.version}.tar.xz"; 25 + hash = "sha256-vnwKvbFcv9KaxiVzwcguh3+dQEetFTIefql9HkPYNb4="; 26 + }; 27 + 28 + strictDeps = true; 29 + 30 + nativeBuildInputs = [ pkg-config ]; 31 + 32 + buildInputs = [ 33 + libice 34 + libuuid 35 + xorgproto 36 + xtrans 37 + ]; 38 + 39 + propagatedBuildInputs = [ 40 + # needs to be propagated because of header file dependencies 41 + libice 42 + ]; 43 + 44 + passthru = { 45 + updateScript = writeScript "update-${finalAttrs.pname}" '' 46 + #!/usr/bin/env nix-shell 47 + #!nix-shell -i bash -p common-updater-scripts 48 + version="$(list-directory-versions --pname libSM \ 49 + --url https://xorg.freedesktop.org/releases/individual/lib/ \ 50 + | sort -V | tail -n1)" 51 + update-source-version ${finalAttrs.pname} "$version" 52 + ''; 53 + tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; 54 + }; 55 + 56 + meta = { 57 + description = "X Session Management Library"; 58 + homepage = "https://gitlab.freedesktop.org/xorg/lib/libsm"; 59 + license = with lib.licenses; [ 60 + mit 61 + mitOpenGroup 62 + ]; 63 + maintainers = [ ]; 64 + pkgConfigModules = [ "sm" ]; 65 + platforms = lib.platforms.unix; 66 + }; 67 + })
+2 -38
pkgs/servers/x11/xorg/default.nix
··· 14 14 libice, 15 15 libpciaccess, 16 16 libpthread-stubs, 17 + libsm, 17 18 libx11, 18 19 libxau, 19 20 libxcb, ··· 92 93 libFS = libfs; 93 94 libICE = libice; 94 95 libpthreadstubs = libpthread-stubs; 96 + libSM = libsm; 95 97 libX11 = libx11; 96 98 libXau = libxau; 97 99 libXcursor = libxcursor; ··· 1738 1740 passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; 1739 1741 meta = { 1740 1742 pkgConfigModules = [ ]; 1741 - platforms = lib.platforms.unix; 1742 - }; 1743 - }) 1744 - ) { }; 1745 - 1746 - # THIS IS A GENERATED FILE. DO NOT EDIT! 1747 - libSM = callPackage ( 1748 - { 1749 - stdenv, 1750 - pkg-config, 1751 - fetchurl, 1752 - libICE, 1753 - libuuid, 1754 - xorgproto, 1755 - testers, 1756 - }: 1757 - stdenv.mkDerivation (finalAttrs: { 1758 - pname = "libSM"; 1759 - version = "1.2.6"; 1760 - builder = ./builder.sh; 1761 - src = fetchurl { 1762 - url = "mirror://xorg/individual/lib/libSM-1.2.6.tar.xz"; 1763 - sha256 = "1gimv11iwzd9gqg345dd8x09szw75v4c2wr5qsdd5gswn6yhlz5y"; 1764 - }; 1765 - hardeningDisable = [ 1766 - "bindnow" 1767 - "relro" 1768 - ]; 1769 - strictDeps = true; 1770 - nativeBuildInputs = [ pkg-config ]; 1771 - buildInputs = [ 1772 - libICE 1773 - libuuid 1774 - xorgproto 1775 - ]; 1776 - passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; 1777 - meta = { 1778 - pkgConfigModules = [ "sm" ]; 1779 1743 platforms = lib.platforms.unix; 1780 1744 }; 1781 1745 })
+3
pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl
··· 43 43 $pcMap{"libfs"} = "libFS"; 44 44 $pcMap{"pciaccess"} = "libpciaccess"; 45 45 $pcMap{"pthread-stubs"} = "libpthreadstubs"; 46 + $pcMap{"sm"} = "libSM"; 46 47 $pcMap{"x11"} = "libX11"; 47 48 $pcMap{"x11-xcb"} = "libX11"; 48 49 $pcMap{"xau"} = "libXau"; ··· 308 309 libice, 309 310 libpciaccess, 310 311 libpthread-stubs, 312 + libsm, 311 313 libx11, 312 314 libxau, 313 315 libxcb, ··· 386 388 libFS = libfs; 387 389 libICE = libice; 388 390 libpthreadstubs = libpthread-stubs; 391 + libSM = libsm; 389 392 libX11 = libx11; 390 393 libXau = libxau; 391 394 libXcursor = libxcursor;
-12
pkgs/servers/x11/xorg/overrides.nix
··· 319 319 buildFlags = [ "BITMAP_DEFINES='-DBITMAPDIR=\"/no-such-path\"'" ]; 320 320 }); 321 321 322 - libSM = super.libSM.overrideAttrs (attrs: { 323 - outputs = [ 324 - "out" 325 - "dev" 326 - "doc" 327 - ]; 328 - propagatedBuildInputs = attrs.propagatedBuildInputs or [ ] ++ [ 329 - xorg.libICE 330 - xorg.xtrans 331 - ]; 332 - }); 333 - 334 322 libXres = super.libXres.overrideAttrs (attrs: { 335 323 outputs = [ 336 324 "out"
-1
pkgs/servers/x11/xorg/tarballs.list
··· 141 141 mirror://xorg/individual/font/font-sun-misc-1.0.4.tar.xz 142 142 mirror://xorg/individual/font/font-winitzki-cyrillic-1.0.4.tar.xz 143 143 mirror://xorg/individual/font/font-xfree86-type1-1.0.5.tar.xz 144 - mirror://xorg/individual/lib/libSM-1.2.6.tar.xz 145 144 mirror://xorg/individual/lib/libWindowsWM-1.0.1.tar.bz2 146 145 mirror://xorg/individual/lib/libXaw-1.0.16.tar.xz 147 146 mirror://xorg/individual/lib/libXcomposite-0.4.6.tar.xz