···1+{
2+ lib,
3+ stdenv,
4+ fetchurl,
5+ writeScript,
6+}:
7+8+stdenv.mkDerivation (finalAttrs: {
9+ pname = "gccmakedep";
10+ version = "1.0.4";
11+12+ src = fetchurl {
13+ url = "mirror://xorg/individual/util/gccmakedep-${finalAttrs.version}.tar.xz";
14+ hash = "sha256-UIj5h2n7Y8Mm6bnSy3yfSmMKKAHdHaBpcdCCkXbPJbY=";
15+ };
16+17+ passthru.updateScript = writeScript "update-${finalAttrs.pname}" ''
18+ #!/usr/bin/env nix-shell
19+ #!nix-shell -i bash -p common-updater-scripts
20+21+ version="$(list-directory-versions --pname ${finalAttrs.pname} \
22+ --url https://xorg.freedesktop.org/releases/individual/util/ \
23+ | sort -V | tail -n1)"
24+25+ update-source-version ${finalAttrs.pname} "$version"
26+ '';
27+28+ meta = {
29+ description = "Creates dependencies in makefiles using 'gcc -M'";
30+ homepage = "https://gitlab.freedesktop.org/xorg/util/gccmakedep";
31+ license = with lib.licenses; [
32+ # COPYING file suggests looking at the Copyright headers of every file:
33+ # upstream issue: https://gitlab.freedesktop.org/xorg/util/gccmakedep/-/issues/1
34+35+ # 1. build system files Copyright Red Hat
36+ hpndSellVariant
37+38+ # 2. gccmakedep.man was written by Colin Watson for Debian somewhen
39+ # earlier than November 2003. While I wasn't able to trace the exact
40+ # source, between 1997 and 2004 the "Debian Social Contract, Version
41+ # 1.0" was in effect, which requires all components of the Debian
42+ # Operating System to be free software, which includes this man page.
43+ # https://www.debian.org/social_contract.1.0
44+ free
45+46+ # 3. gccmakedep.in, originally named gccmdep.cpp was copied from the
47+ # XFree86 project around 2000. While it states to be "Based on
48+ # mdepend.cpp and code supplied by Hongjiu Lu", that doesn't matter
49+ # because it was supposedly completely rewritten by XFree86.
50+ # XFree86 code without any explicit Copyright Statement is under X11.
51+ x11
52+53+ # 4. some files don't have any license info, but they are all trivial
54+ ];
55+ mainProgram = "gccmakedep";
56+ maintainers = [ ];
57+ platforms = lib.platforms.unix;
58+ };
59+})
···1#!/usr/bin/env nix-shell
2-#!nix-shell --pure --keep NIX_PATH -i python3 -p nix git "python3.withPackages (ps: [ ps. packaging ps.beautifulsoup4 ps.requests ])"
34# Usage: Run ./update.py from the directory containing tarballs.list. The script checks for the
5# latest versions of all packages, updates the expressions if any update is found, and commits
···92print("Generating updated expr (slow)...")
9394subprocess.run(["./generate-expr-from-tarballs.pl", "tarballs.list"], check=True)
00009596print("Committing...")
97
···1#!/usr/bin/env nix-shell
2+#!nix-shell --pure --keep NIX_PATH -i python3 -p nix git nixfmt-rfc-style "python3.withPackages (ps: [ ps. packaging ps.beautifulsoup4 ps.requests ])"
34# Usage: Run ./update.py from the directory containing tarballs.list. The script checks for the
5# latest versions of all packages, updates the expressions if any update is found, and commits
···92print("Generating updated expr (slow)...")
9394subprocess.run(["./generate-expr-from-tarballs.pl", "tarballs.list"], check=True)
95+96+print("Formatting generated expr...")
97+98+subprocess.run(["nixfmt", "default.nix"], check=True)
99100print("Committing...")
101