Unverified Commit 2e8f4f85 authored by quantenzitrone's avatar quantenzitrone
Browse files

gccmakedep: refactored and moved to pkgs/by-name from xorg namespace

parent 66386396
Loading
Loading
Loading
Loading
+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;
  };
})
+6 −33
Original line number Diff line number Diff line
@@ -3,14 +3,18 @@
  lib,
  font-alias,
  font-util,
  gccmakedep,
  luit,
  pixman,
}:

self: with self; {

  inherit pixman;
  inherit luit;
  inherit
    gccmakedep
    luit
    pixman
    ;
  fontalias = font-alias;
  fontutil = font-util;

@@ -1645,37 +1649,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 (
    {
+6 −2
Original line number Diff line number Diff line
@@ -263,14 +263,18 @@ print OUT <<EOF;
  lib,
  font-alias,
  font-util,
  gccmakedep,
  luit,
  pixman,
}:

self: with self; {

  inherit pixman;
  inherit luit;
  inherit
    gccmakedep
    luit
    pixman
    ;
  fontalias = font-alias;
  fontutil = font-util;

+0 −1
Original line number Diff line number Diff line
@@ -157,7 +157,6 @@ self: super:
    };
  });

  gccmakedep = addMainProgram super.gccmakedep { };
  iceauth = addMainProgram super.iceauth { };
  ico = addMainProgram super.ico { };

+0 −1
Original line number Diff line number Diff line
@@ -209,7 +209,6 @@ mirror://xorg/individual/lib/xtrans-1.6.0.tar.xz
mirror://xorg/individual/proto/xcb-proto-1.17.0.tar.xz
mirror://xorg/individual/proto/xorgproto-2024.1.tar.xz
mirror://xorg/individual/util/bdftopcf-1.1.2.tar.xz
mirror://xorg/individual/util/gccmakedep-1.0.4.tar.xz
mirror://xorg/individual/util/imake-1.0.10.tar.xz
mirror://xorg/individual/util/lndir-1.0.5.tar.xz
mirror://xorg/individual/util/makedepend-1.0.9.tar.xz