From 4a78c0e982452b6d7dc3fb821f035df5191120e6 Mon Sep 17 00:00:00 2001 From: rczb Date: Sat, 19 Oct 2024 20:43:49 +0800 Subject: [PATCH] c-intro-and-ref: init at 0.0-unstable-2024-08-31 Co-authored-by: Lin Jian --- pkgs/by-name/c-/c-intro-and-ref/package.nix | 71 +++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 pkgs/by-name/c-/c-intro-and-ref/package.nix diff --git a/pkgs/by-name/c-/c-intro-and-ref/package.nix b/pkgs/by-name/c-/c-intro-and-ref/package.nix new file mode 100644 index 000000000000..b1b212e1c765 --- /dev/null +++ b/pkgs/by-name/c-/c-intro-and-ref/package.nix @@ -0,0 +1,71 @@ +{ + lib, + stdenv, + fetchFromSavannah, + texinfo, + texliveBasic, + ghostscript, + unstableGitUpdater, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "c-intro-and-ref"; + version = "0.0-unstable-2024-08-31"; + + src = fetchFromSavannah { + repo = "c-intro-and-ref"; + rev = "62962013107481127176ef04d69826e41f51313c"; + hash = "sha256-Fmli3x8zvPntvCvV/wbEkxWzW9uDMZgCElPkKo9TS6Y="; + }; + + nativeBuildInputs = [ + texinfo + ghostscript + texliveBasic + ]; + + buildFlags = [ + "c.info" + "c.dvi" + "c.pdf" + # FIXME: Not a HASH reference at (texinfo)/share/texinfo/Texinfo/Convert/DocBook.pm + # "c.doc" + "c.html" + "c.html.d" + "c.txt" + ]; + + installPhase = '' + runHook preInstall + dst_info=$out/share/info + dst_doc=$out/share/doc/c-intro-and-ref + mkdir -p $dst_info + mkdir -p $dst_doc + + cp -prv -t $dst_info \ + c.info c.info-* + cp -prv -t $dst_doc \ + c.dvi \ + c.pdf \ + c.html \ + c.html.d \ + c.txt + runHook postInstall + ''; + + passthru.updateScript = unstableGitUpdater { }; + + meta = { + description = "GNU C Language Intro and Reference Manual"; + longDescription = '' + This manual explains the C language for use with the GNU Compiler + Collection (GCC) on the GNU/Linux operating system and other systems. We + refer to this dialect as GNU C. If you already know C, you can use this as + a reference manual. + ''; + homepage = "https://www.gnu.org/software/c-intro-and-ref/"; + changelog = "https://git.savannah.nongnu.org/cgit/c-intro-and-ref.git/plain/ChangeLog?id=${finalAttrs.src.rev}"; + license = lib.licenses.fdl13Plus; + maintainers = with lib.maintainers; [ rc-zb ]; + platforms = lib.platforms.all; + }; +})