diff --git a/lib/licenses.nix b/lib/licenses.nix index 301beb4ea4ae..2aa16bc0f305 100644 --- a/lib/licenses.nix +++ b/lib/licenses.nix @@ -257,6 +257,11 @@ lib.mapAttrs mkLicense ( fullName = "BSD Protection License"; }; + bsdSourceCode = { + spdxId = "BSD-Source-Code"; + fullName = "BSD Source Code Attribution"; + }; + bsl11 = { spdxId = "BUSL-1.1"; fullName = "Business Source License 1.1"; @@ -452,6 +457,11 @@ lib.mapAttrs mkLicense ( fullName = "Common Public License 1.0"; }; + cronyx = { + spdxId = "Cronyx"; + fullName = "Cronyx License"; + }; + curl = { spdxId = "curl"; fullName = "curl License"; @@ -937,6 +947,11 @@ lib.mapAttrs mkLicense ( fullName = "MIT No Attribution"; }; + mitOpenGroup = { + spdxId = "MIT-open-group"; + fullName = "MIT Open Group variant"; + }; + mpl10 = { spdxId = "MPL-1.0"; fullName = "Mozilla Public License 1.0"; @@ -1328,6 +1343,11 @@ lib.mapAttrs mkLicense ( fullName = "Unicode License Agreement - Data Files and Software (2016)"; }; + unicodeTOU = { + spdxId = "Unicode-TOU"; + fullName = "Unicode Terms of Use"; + }; + unlicense = { spdxId = "Unlicense"; fullName = "The Unlicense"; diff --git a/pkgs/by-name/fo/font-alias/package.nix b/pkgs/by-name/fo/font-alias/package.nix new file mode 100644 index 000000000000..4a441d944c8f --- /dev/null +++ b/pkgs/by-name/fo/font-alias/package.nix @@ -0,0 +1,40 @@ +{ + lib, + stdenv, + fetchurl, + writeScript, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "font-alias"; + version = "1.0.5"; + + src = fetchurl { + url = "mirror://xorg/individual/font/font-alias-${finalAttrs.version}.tar.xz"; + hash = "sha256-n4niF7tz4ONjagpJP7+LfJlRVuDFPZoEdtIBtnwta24="; + }; + + passthru = { + updateScript = writeScript "update-${finalAttrs.pname}" '' + #!/usr/bin/env nix-shell + #!nix-shell -i bash -p common-updater-scripts + + version="$(list-directory-versions --pname ${finalAttrs.pname} \ + --url https://xorg.freedesktop.org/releases/individual/font/ \ + | sort -V | tail -n1)" + + update-source-version ${finalAttrs.pname} "$version" + ''; + }; + + meta = { + description = "Common aliases for Xorg fonts"; + homepage = "https://gitlab.freedesktop.org/xorg/font/alias"; + license = with lib.licenses; [ + cronyx + mit + ]; + maintainers = [ ]; + platforms = lib.platforms.all; + }; +}) diff --git a/pkgs/by-name/fo/font-util/package.nix b/pkgs/by-name/fo/font-util/package.nix new file mode 100644 index 000000000000..b443788a941a --- /dev/null +++ b/pkgs/by-name/fo/font-util/package.nix @@ -0,0 +1,49 @@ +{ + lib, + stdenv, + fetchurl, + testers, + writeScript, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "font-util"; + version = "1.4.1"; + + src = fetchurl { + url = "mirror://xorg/individual/font/font-util-${finalAttrs.version}.tar.xz"; + hash = "sha256-XJ9kEjwZSxUP7okEmZFoc4bm/zbvKve4C6U++vNozJU="; + }; + + passthru = { + updateScript = writeScript "update-${finalAttrs.pname}" '' + #!/usr/bin/env nix-shell + #!nix-shell -i bash -p common-updater-scripts + + version="$(list-directory-versions --pname ${finalAttrs.pname} \ + --url https://xorg.freedesktop.org/releases/individual/font/ \ + | sort -V | tail -n1)" + + update-source-version ${finalAttrs.pname} "$version" + ''; + tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + }; + + meta = { + description = "X.Org font package creation/installation utilities"; + homepage = "https://gitlab.freedesktop.org/xorg/font/util"; + license = with lib.licenses; [ + mit + bsd2 + bsdSourceCode + mitOpenGroup + # there is a bit of a diff, but i think its close enough + # it was probably just adapted a bit to fit to the repository structure + # or its an older version that the one on spdx + unicodeTOU + ]; + maintainers = [ ]; + pkgConfigModules = [ "fontutil" ]; + platforms = lib.platforms.unix; + }; +}) diff --git a/pkgs/by-name/gc/gccmakedep/package.nix b/pkgs/by-name/gc/gccmakedep/package.nix new file mode 100644 index 000000000000..daa63e40bfd2 --- /dev/null +++ b/pkgs/by-name/gc/gccmakedep/package.nix @@ -0,0 +1,59 @@ +{ + lib, + stdenv, + fetchurl, + writeScript, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "gccmakedep"; + version = "1.0.4"; + + src = fetchurl { + url = "mirror://xorg/individual/util/gccmakedep-${finalAttrs.version}.tar.xz"; + hash = "sha256-UIj5h2n7Y8Mm6bnSy3yfSmMKKAHdHaBpcdCCkXbPJbY="; + }; + + passthru.updateScript = writeScript "update-${finalAttrs.pname}" '' + #!/usr/bin/env nix-shell + #!nix-shell -i bash -p common-updater-scripts + + version="$(list-directory-versions --pname ${finalAttrs.pname} \ + --url https://xorg.freedesktop.org/releases/individual/util/ \ + | sort -V | tail -n1)" + + update-source-version ${finalAttrs.pname} "$version" + ''; + + meta = { + description = "Creates dependencies in makefiles using 'gcc -M'"; + homepage = "https://gitlab.freedesktop.org/xorg/util/gccmakedep"; + license = with lib.licenses; [ + # COPYING file suggests looking at the Copyright headers of every file: + # upstream issue: https://gitlab.freedesktop.org/xorg/util/gccmakedep/-/issues/1 + + # 1. build system files Copyright Red Hat + hpndSellVariant + + # 2. gccmakedep.man was written by Colin Watson for Debian somewhen + # earlier than November 2003. While I wasn't able to trace the exact + # source, between 1997 and 2004 the "Debian Social Contract, Version + # 1.0" was in effect, which requires all components of the Debian + # Operating System to be free software, which includes this man page. + # https://www.debian.org/social_contract.1.0 + free + + # 3. gccmakedep.in, originally named gccmdep.cpp was copied from the + # XFree86 project around 2000. While it states to be "Based on + # mdepend.cpp and code supplied by Hongjiu Lu", that doesn't matter + # because it was supposedly completely rewritten by XFree86. + # XFree86 code without any explicit Copyright Statement is under X11. + x11 + + # 4. some files don't have any license info, but they are all trivial + ]; + mainProgram = "gccmakedep"; + maintainers = [ ]; + platforms = lib.platforms.unix; + }; +}) diff --git a/pkgs/by-name/li/libpciaccess/package.nix b/pkgs/by-name/li/libpciaccess/package.nix new file mode 100644 index 000000000000..e18595b1caf2 --- /dev/null +++ b/pkgs/by-name/li/libpciaccess/package.nix @@ -0,0 +1,81 @@ +{ + lib, + stdenv, + fetchurl, + testers, + writeScript, + pkg-config, + meson, + ninja, + zlib, + netbsd, + hwdata, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "libpciaccess"; + version = "0.18.1"; + + src = fetchurl { + url = "mirror://xorg/individual/lib/libpciaccess-${finalAttrs.version}.tar.xz"; + hash = "sha256-SvQ0RLOK21VF0O0cLORtlgjMR7McI4f8UYFlZ2Wm+nY="; + }; + + strictDeps = true; + + nativeBuildInputs = [ + pkg-config + meson + ninja + ]; + + buildInputs = + [ zlib ] + ++ lib.optionals stdenv.hostPlatform.isNetBSD [ + netbsd.libarch + netbsd.libpci + ]; + + mesonFlags = [ + (lib.mesonOption "pci-ids" "${hwdata}/share/hwdata") + (lib.mesonEnable "zlib" true) + ]; + + passthru = { + updateScript = writeScript "update-${finalAttrs.pname}" '' + #!/usr/bin/env nix-shell + #!nix-shell -i bash -p common-updater-scripts + + version="$(list-directory-versions --pname ${finalAttrs.pname} \ + --url https://xorg.freedesktop.org/releases/individual/lib/ \ + | sort -V | tail -n1)" + + update-source-version ${finalAttrs.pname} "$version" + ''; + tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + }; + + meta = { + description = "Generic PCI access library"; + homepage = "https://gitlab.freedesktop.org/xorg/lib/libpciaccess"; + license = with lib.licenses; [ + mit + isc + x11 + ]; + pkgConfigModules = [ "pciaccess" ]; + # https://gitlab.freedesktop.org/xorg/lib/libpciaccess/-/blob/6cd5a4afbb70868c7746de8d50dea59e02e9acf2/configure.ac#L108-114 + platforms = + with lib.platforms; + cygwin + ++ freebsd + ++ illumos + ++ linux + ++ lib.platforms.netbsd # otherwise netbsd from the function arguments is used + ++ openbsd; + badPlatforms = [ + # mandatory shared library + lib.systems.inspect.platformPatterns.isStatic + ]; + }; +}) diff --git a/pkgs/by-name/li/libpthread-stubs/package.nix b/pkgs/by-name/li/libpthread-stubs/package.nix new file mode 100644 index 000000000000..8ad5577de7b6 --- /dev/null +++ b/pkgs/by-name/li/libpthread-stubs/package.nix @@ -0,0 +1,43 @@ +{ + lib, + stdenv, + fetchurl, + testers, + writeScript, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "libpthread-stubs"; + version = "0.5"; + + src = fetchurl { + url = "mirror://xorg/individual/lib/libpthread-stubs-${finalAttrs.version}.tar.xz"; + hash = "sha256-WdpWbezOunwqeXCkoDtI2ZBfEmL/lEEKZJIk4z0kQrw="; + }; + + passthru = { + updateScript = writeScript "update-${finalAttrs.pname}" '' + #!/usr/bin/env nix-shell + #!nix-shell -i bash -p common-updater-scripts + + version="$(list-directory-versions --pname ${finalAttrs.pname} \ + --url https://xorg.freedesktop.org/releases/individual/lib/ \ + | sort -V | tail -n1)" + + update-source-version ${finalAttrs.pname} "$version" + ''; + tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + }; + + meta = { + description = "Provides a pkg-config file `pthread-stubs.pc` containing the Cflags/Libs flags applicable to programs/libraries that use only lightweight pthread API"; + homepage = "https://gitlab.freedesktop.org/xorg/lib/pthread-stubs"; + # gitlab says x11-distribute-modifications but it's not + # maybe due to https://github.com/spdx/spdx-online-tools/issues/540 + license = lib.licenses.x11; + maintainers = [ ]; + pkgConfigModules = [ "pthread-stubs" ]; + # on these platforms according to the readme + platforms = with lib.platforms; linux ++ cygwin ++ darwin ++ [ "x86_64-solaris" ]; + }; +}) diff --git a/pkgs/servers/x11/xorg/default.nix b/pkgs/servers/x11/xorg/default.nix index 08c2417c4966..0bdcf2653c85 100644 --- a/pkgs/servers/x11/xorg/default.nix +++ b/pkgs/servers/x11/xorg/default.nix @@ -1,14 +1,26 @@ # THIS IS A GENERATED FILE. DO NOT EDIT! { lib, - pixman, + font-alias, + font-util, + gccmakedep, + libpciaccess, + libpthread-stubs, luit, + pixman, }: self: with self; { - inherit pixman; - inherit luit; + inherit + gccmakedep + libpciaccess + luit + pixman + ; + fontalias = font-alias; + fontutil = font-util; + libpthreadstubs = libpthread-stubs; # THIS IS A GENERATED FILE. DO NOT EDIT! appres = callPackage ( @@ -413,37 +425,6 @@ self: with self; { }) ) { }; - # THIS IS A GENERATED FILE. DO NOT EDIT! - fontalias = callPackage ( - { - stdenv, - pkg-config, - fetchurl, - testers, - }: - stdenv.mkDerivation (finalAttrs: { - pname = "font-alias"; - version = "1.0.5"; - builder = ./builder.sh; - src = fetchurl { - url = "mirror://xorg/individual/font/font-alias-1.0.5.tar.xz"; - sha256 = "0vkb5mybc0fjfq29lgf5w1b536bwifzkyj8ad9iy7q3kpcby52cz"; - }; - hardeningDisable = [ - "bindnow" - "relro" - ]; - strictDeps = true; - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ ]; - passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; - meta = { - pkgConfigModules = [ ]; - platforms = lib.platforms.unix; - }; - }) - ) { }; - # THIS IS A GENERATED FILE. DO NOT EDIT! fontarabicmisc = callPackage ( { @@ -1594,37 +1575,6 @@ self: with self; { }) ) { }; - # THIS IS A GENERATED FILE. DO NOT EDIT! - fontutil = callPackage ( - { - stdenv, - pkg-config, - fetchurl, - testers, - }: - stdenv.mkDerivation (finalAttrs: { - pname = "font-util"; - version = "1.4.1"; - builder = ./builder.sh; - src = fetchurl { - url = "mirror://xorg/individual/font/font-util-1.4.1.tar.xz"; - sha256 = "15fcd3rzlgm51fwgfapg6vzyd1kkd28rj149xq7iajqr7h9697sw"; - }; - hardeningDisable = [ - "bindnow" - "relro" - ]; - strictDeps = true; - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ ]; - passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; - meta = { - pkgConfigModules = [ "fontutil" ]; - platforms = lib.platforms.unix; - }; - }) - ) { }; - # THIS IS A GENERATED FILE. DO NOT EDIT! fontwinitzkicyrillic = callPackage ( { @@ -1703,37 +1653,6 @@ self: with self; { }) ) { }; - # THIS IS A GENERATED FILE. DO NOT EDIT! - gccmakedep = callPackage ( - { - stdenv, - pkg-config, - fetchurl, - testers, - }: - stdenv.mkDerivation (finalAttrs: { - pname = "gccmakedep"; - version = "1.0.4"; - builder = ./builder.sh; - src = fetchurl { - url = "mirror://xorg/individual/util/gccmakedep-1.0.4.tar.xz"; - sha256 = "1di5rxv930nhf5ls07fx04l0lqsakxycplmrx4kc6qzvd63zk22h"; - }; - hardeningDisable = [ - "bindnow" - "relro" - ]; - strictDeps = true; - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ ]; - passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; - meta = { - pkgConfigModules = [ ]; - platforms = lib.platforms.unix; - }; - }) - ) { }; - # THIS IS A GENERATED FILE. DO NOT EDIT! iceauth = callPackage ( { @@ -3282,68 +3201,6 @@ self: with self; { }) ) { }; - # THIS IS A GENERATED FILE. DO NOT EDIT! - libpciaccess = callPackage ( - { - stdenv, - pkg-config, - fetchurl, - testers, - }: - stdenv.mkDerivation (finalAttrs: { - pname = "libpciaccess"; - version = "0.18.1"; - builder = ./builder.sh; - src = fetchurl { - url = "mirror://xorg/individual/lib/libpciaccess-0.18.1.tar.xz"; - sha256 = "0xpslrjnfrc1a7y8f8qwnd3wq24ndpj2q77ds12mbnwand239x2a"; - }; - hardeningDisable = [ - "bindnow" - "relro" - ]; - strictDeps = true; - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ ]; - passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; - meta = { - pkgConfigModules = [ "pciaccess" ]; - platforms = lib.platforms.unix; - }; - }) - ) { }; - - # THIS IS A GENERATED FILE. DO NOT EDIT! - libpthreadstubs = callPackage ( - { - stdenv, - pkg-config, - fetchurl, - testers, - }: - stdenv.mkDerivation (finalAttrs: { - pname = "libpthread-stubs"; - version = "0.5"; - builder = ./builder.sh; - src = fetchurl { - url = "mirror://xorg/individual/xcb/libpthread-stubs-0.5.tar.xz"; - sha256 = "1g224hyy694jch54357zc895z46r90xs193hg4m7rfnfxinmdnjr"; - }; - hardeningDisable = [ - "bindnow" - "relro" - ]; - strictDeps = true; - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ ]; - passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; - meta = { - pkgConfigModules = [ "pthread-stubs" ]; - platforms = lib.platforms.unix; - }; - }) - ) { }; - # THIS IS A GENERATED FILE. DO NOT EDIT! libxcb = callPackage ( { diff --git a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl index 95b47b5ed425..3a58856b599d 100755 --- a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl +++ b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl @@ -36,6 +36,9 @@ $pcMap{"gl"} = "libGL"; $pcMap{"GL"} = "libGL"; $pcMap{"gbm"} = "libgbm"; $pcMap{"hwdata"} = "hwdata"; +$pcMap{"fontutil"} = "fontutil"; +$pcMap{"pciaccess"} = "libpciaccess"; +$pcMap{"pthread-stubs"} = "libpthreadstubs"; $pcMap{"\$PIXMAN"} = "pixman"; $pcMap{"\$RENDERPROTO"} = "xorgproto"; $pcMap{"\$DRI3PROTO"} = "xorgproto"; @@ -260,14 +263,26 @@ print OUT <