nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv, lib, makeWrapper, dev_only_shellcheck ? null,
2fetchFromGitHub,
3
4fzf, coreutils, libxml2, libxslt, jing, findutils, gnugrep, gnused,
5docbook5
6}:
7stdenv.mkDerivation rec {
8 pname = "xmloscopy";
9 version = "0.1.3";
10
11 nativeBuildInputs = [
12 makeWrapper
13 dev_only_shellcheck
14 ];
15
16 spath = lib.makeBinPath [
17 fzf
18 coreutils
19 libxml2
20 libxslt
21 jing
22 findutils
23 gnugrep
24 gnused
25 ];
26
27 src = fetchFromGitHub {
28 owner = "grahamc";
29 repo = "xmloscopy";
30 rev = "v${version}";
31 sha256 = "06y5bckrmnq7b5ny2hfvlmdws910jw3xbw5nzy3bcpqsccqnjxrc";
32 };
33
34 installPhase = ''
35 sed -i "s/hard to say/v${version}/" ./xmloscopy
36 type -P shellcheck && shellcheck ./xmloscopy
37 chmod +x ./xmloscopy
38 patchShebangs ./xmloscopy
39 mkdir -p $out/bin
40 cp ./xmloscopy $out/bin/
41 wrapProgram $out/bin/xmloscopy \
42 --set RNG "${docbook5}/xml/rng/docbook/docbook.rng" \
43 --set PATH "${spath}"
44 '';
45
46 meta = with lib; {
47 description = "wtf is my docbook broken?";
48 homepage = "https://github.com/grahamc/xmloscopy";
49 license = licenses.mit;
50 platforms = platforms.all;
51 maintainers = with maintainers; [ grahamc ];
52 };
53}