c594a97518
GitOrigin-RevId: 301aada7a64812853f2e2634a530ef5d34505048
45 lines
1 KiB
Nix
45 lines
1 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, docbook_xsl
|
|
, docbook_xml_dtd_45
|
|
, python3
|
|
, libxslt
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "csound-manual";
|
|
version = "6.17.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "csound";
|
|
repo = "manual";
|
|
rev = version;
|
|
sha256 = "sha256-8X9Egn/MIwlNDEKUmEEz4Dnw6rGa37jRjYsVEt8ziW8=";
|
|
};
|
|
|
|
prePatch = ''
|
|
substituteInPlace manual.xml \
|
|
--replace "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" \
|
|
"${docbook_xml_dtd_45}/xml/dtd/docbook/docbookx.dtd"
|
|
'';
|
|
|
|
nativeBuildInputs = [ libxslt.bin docbook_xsl python3 python3.pkgs.pygments ];
|
|
|
|
buildPhase = ''
|
|
make XSL_BASE_PATH=${docbook_xsl}/share/xml/docbook-xsl html-dist
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/share/doc/csound
|
|
cp -r ./html $out/share/doc/csound
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "The Csound Canonical Reference Manual";
|
|
homepage = "https://github.com/csound/manual";
|
|
license = licenses.fdl12Plus;
|
|
maintainers = with maintainers; [ hlolli ];
|
|
platforms = lib.platforms.all;
|
|
};
|
|
}
|