c-intro-and-ref: 0-unstable-2025-03-09 → 0.1; add myself as maintainer (#428197)

This commit is contained in:
Ramses
2025-08-18 10:05:54 +03:00
committed by GitHub
+36 -39
View File
@@ -1,58 +1,53 @@
{
lib,
stdenv,
fetchFromSavannah,
fetchurl,
autoreconfHook,
texinfo,
texliveBasic,
ghostscript,
unstableGitUpdater,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "c-intro-and-ref";
version = "0-unstable-2025-03-09";
version = "0.1";
src = fetchFromSavannah {
repo = "c-intro-and-ref";
rev = "11723f5d07331708985dfd3eb9b05163dde990e5";
hash = "sha256-quTeOQKTX/Aq78vMJPsjVQyisADzWm9mtLE1HoJByl4=";
src = fetchurl {
url = "mirror://gnu/${finalAttrs.pname}/${finalAttrs.pname}-${finalAttrs.version}.tar.gz";
hash = "sha256-45mtnlyz2RuYUk4Jza+lZGGBxezpiRS/v70xx1iKxEQ=";
};
nativeBuildInputs = [
autoreconfHook
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
# Remove pre-built documentaton artifacts
postConfigure = ''
make clean
'';
passthru.updateScript = unstableGitUpdater { };
buildFlags = [
"c.dvi"
"c.html"
];
# Build missing targets
postBuild = ''
makeinfo --html --no-split c.texi -o c.htm
makeinfo --plaintext c.texi -o c.txt
'';
# FIXME: Not a HASH reference at (texinfo)/share/texinfo/Texinfo/Convert/DocBook.pm
# Occurs when building "c.doc"
# makeinfo --docbook c.texi -o c.doc
# Install missing targets
postInstall = ''
install -Dm644 c.htm $out/share/doc/c-intro-and-ref/c.html
install -Dm644 c.txt -t $out/share/doc/c-intro-and-ref/
install -Dm644 c.html/* -t $out/share/doc/c-intro-and-ref/c.html.d/
install -Dm644 c.dvi -t $out/share/doc/c-intro-and-ref/
'';
meta = {
description = "GNU C Language Intro and Reference Manual";
@@ -63,9 +58,11 @@ stdenv.mkDerivation (finalAttrs: {
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 ];
maintainers = with lib.maintainers; [
normalcea
rc-zb
];
platforms = lib.platforms.all;
};
})