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 {
|
|
|
|
name = "xmloscopy-${version}";
|
2018-03-25 04:47:38 +02:00
|
|
|
version = "v0.1.2";
|
2018-03-25 03:46:59 +02:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
dev_only_shellcheck
|
|
|
|
];
|
|
|
|
|
|
|
|
spath = lib.makeBinPath [
|
|
|
|
fzf
|
|
|
|
coreutils
|
|
|
|
libxml2
|
|
|
|
libxslt
|
|
|
|
jing
|
|
|
|
findutils
|
|
|
|
gnugrep
|
|
|
|
gnused
|
|
|
|
];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "grahamc";
|
|
|
|
repo = "xmloscopy";
|
|
|
|
rev = version;
|
2018-03-25 04:47:38 +02:00
|
|
|
sha256 = "07fcnf1vv0x72lksl1v0frmlh73gca199ldqqbgdjpybjdffz456";
|
2018-03-25 03:46:59 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
sed -i "s/hard to say/${version}/" ./xmloscopy
|
|
|
|
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}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "wtf is my docbook broken?";
|
|
|
|
homepage = https://github.com/grahamc/xmloscopy;
|
|
|
|
license = stdenv.lib.licenses.mit;
|
|
|
|
platforms = stdenv.lib.platforms.all;
|
|
|
|
};
|
|
|
|
}
|