nixpkgs-suyu/pkgs/tools/text/xml/xmloscopy/default.nix

54 lines
1.2 KiB
Nix
Raw Normal View History

2018-03-25 03:46:59 +02:00
{ stdenv, lib, makeWrapper, dev_only_shellcheck ? null,
fetchFromGitHub,
fzf, coreutils, libxml2, libxslt, jing, findutils, gnugrep, gnused,
docbook5
}:
stdenv.mkDerivation rec {
2019-08-06 04:02:47 +02:00
pname = "xmloscopy";
2019-08-06 03:55:29 +02:00
version = "0.1.3";
2018-03-25 03:46:59 +02:00
nativeBuildInputs = [
2018-03-25 03:46:59 +02:00
makeWrapper
dev_only_shellcheck
];
spath = lib.makeBinPath [
fzf
coreutils
libxml2
libxslt
jing
findutils
gnugrep
gnused
];
src = fetchFromGitHub {
owner = "grahamc";
repo = "xmloscopy";
2018-05-28 14:59:57 +02:00
rev = "v${version}";
2019-08-06 03:55:29 +02:00
sha256 = "06y5bckrmnq7b5ny2hfvlmdws910jw3xbw5nzy3bcpqsccqnjxrc";
2018-03-25 03:46:59 +02:00
};
installPhase = ''
2018-05-28 14:59:57 +02:00
sed -i "s/hard to say/v${version}/" ./xmloscopy
2018-03-25 03:46:59 +02:00
type -P shellcheck && shellcheck ./xmloscopy
chmod +x ./xmloscopy
patchShebangs ./xmloscopy
mkdir -p $out/bin
cp ./xmloscopy $out/bin/
wrapProgram $out/bin/xmloscopy \
--set RNG "${docbook5}/xml/rng/docbook/docbook.rng" \
--set PATH "${spath}"
'';
2019-08-06 04:02:13 +02:00
meta = with stdenv.lib; {
2018-03-25 03:46:59 +02:00
description = "wtf is my docbook broken?";
homepage = "https://github.com/grahamc/xmloscopy";
2019-08-06 04:02:13 +02:00
license = licenses.mit;
platforms = platforms.all;
maintainers = with maintainers; [ grahamc ];
2018-03-25 03:46:59 +02:00
};
}