Skip to content

Commit

Permalink
gccmakedep: refactored and moved to pkgs/by-name from xorg namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
quantenzitrone committed Dec 31, 2024
1 parent 4fa29c0 commit fbd1b74
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 3 deletions.
58 changes: 58 additions & 0 deletions pkgs/by-name/gc/gccmakedep/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
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 | 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:

# 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 somewhen in the 1990s. 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 changes: 5 additions & 1 deletion pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl
Original file line number Diff line number Diff line change
Expand Up @@ -263,13 +263,17 @@
pixman,
font-alias,
font-util,
gccmakedep,
luit,
}:

self: with self; {

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

Expand Down
1 change: 0 additions & 1 deletion pkgs/servers/x11/xorg/overrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ self: super:
};
});

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

Expand Down
1 change: 0 additions & 1 deletion pkgs/servers/x11/xorg/tarballs.list
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ mirror://xorg/individual/lib/xtrans-1.5.1.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
Expand Down

0 comments on commit fbd1b74

Please sign in to comment.