Skip to content

Instantly share code, notes, and snippets.

@mmahut
Created July 20, 2019 10:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mmahut/295f513fa39296c21ae2297c03622570 to your computer and use it in GitHub Desktop.
Save mmahut/295f513fa39296c21ae2297c03622570 to your computer and use it in GitHub Desktop.
mmahut@highhopes ~/repo/nixpkgs (dockbook5) $ nix-build -A docbook5
error: undefined variable 'version' at /home/mmahut/repo/nixpkgs/pkgs/data/sgml+xml/schemas/docbook-5.0/default.nix:8:41
mmahut@highhopes ~/repo/nixpkgs (dockbook5) $ cat ./pkgs/data/sgml+xml/schemas/docbook-5.0/default.nix
{ lib, stdenv, fetchzip }:
stdenv.mkDerivation {
pname = "docbook5";
version = "5.0.1";
src = fetchzip {
url = "http://www.docbook.org/xml/${version}/docbook-${version}.zip";
sha256 = "0qz4qmvlsrpl3ypg72ksfrnqxww4cr567s8sv8lwqggmrcqkyirz";
};
installPhase =
''
dst=$out/share/xml/docbook-5.0
mkdir -p $dst
cp -prv * $dst/
substituteInPlace $dst/catalog.xml --replace 'uri="' "uri=\"$dst/"
rm -rf $dst/docs $dst/ChangeLog
# Backwards compatibility. Will remove eventually.
mkdir -p $out/xml/rng $out/xml/dtd
ln -s $dst/rng $out/xml/rng/docbook
ln -s $dst/dtd $out/xml/dtd/docbook
'';
meta = {
description = "Schemas for DocBook 5.0, a semantic markup language for technical documentation";
homepage = https://docbook.org/xml/5.0/;
maintainers = [ lib.maintainers.eelco ];
platforms = lib.platforms.all;
};
}
mmahut@highhopes ~/repo/nixpkgs (dockbook5) $
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment