Unverified Commit 13c1207a authored by jopejoe1's avatar jopejoe1 Committed by GitHub
Browse files

font-{alias,util}, gccmakedep, libp{ciacces,threadstub}s: refactor and migrate...

font-{alias,util}, gccmakedep, libp{ciacces,threadstub}s: refactor and migrate to pkgs/by-name from xorg namespace (#369520)
parents 4acb251a 4cc23fda
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -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";
+40 −0
Original line number Diff line number Diff line
{
  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;
  };
})
+49 −0
Original line number Diff line number Diff line
{
  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;
  };
})
+59 −0
Original line number Diff line number Diff line
{
  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;
  };
})
+81 −0
Original line number Diff line number Diff line
{
  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
    ];
  };
})
Loading