2022-10-21 18:38:19 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, docbook_xsl
|
|
|
|
, docbook_xml_dtd_45
|
|
|
|
, python3
|
|
|
|
, libxslt
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "csound-manual";
|
2022-10-21 18:38:19 +00:00
|
|
|
version = "6.17.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "csound";
|
|
|
|
repo = "manual";
|
2022-10-21 18:38:19 +00:00
|
|
|
rev = version;
|
|
|
|
sha256 = "sha256-8X9Egn/MIwlNDEKUmEEz4Dnw6rGa37jRjYsVEt8ziW8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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"
|
|
|
|
'';
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
nativeBuildInputs = [ libxslt.bin docbook_xsl python3 python3.pkgs.pygments ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "The Csound Canonical Reference Manual";
|
|
|
|
homepage = "https://github.com/csound/manual";
|
2022-10-21 18:38:19 +00:00
|
|
|
license = licenses.fdl12Plus;
|
|
|
|
maintainers = with maintainers; [ hlolli ];
|
2021-01-17 00:15:33 +00:00
|
|
|
platforms = lib.platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|