mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 08:53:21 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
46 lines
1.0 KiB
Nix
46 lines
1.0 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, docbook_xsl
|
|
, docbook_xml_dtd_45
|
|
, python3
|
|
, libxslt
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "csound-manual";
|
|
version = "6.18.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "csound";
|
|
repo = "manual";
|
|
rev = version;
|
|
sha256 = "sha256-W8MghqUBr3V7LPgNwU6Ugw16wdK3G37zAPuasMlZ2+I=";
|
|
};
|
|
|
|
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 = "Csound Canonical Reference Manual";
|
|
homepage = "https://github.com/csound/manual";
|
|
license = licenses.fdl12Plus;
|
|
maintainers = with maintainers; [ hlolli ];
|
|
platforms = lib.platforms.all;
|
|
};
|
|
}
|