nixpkgs/pkgs/tools/text/sgml/opensp/compat.nix
Lluís Batlle i Rossell d711dcc070 Adding setup-hook for opensp, to set the sgml catalog files
This sets the SGML_CATALOG_FILES, similar to how libxml2 does the same with
XML_CATALOG_FILES.

I based the hook on the libxml2 one, and I followed the instructions about this
variable here:
http://docbook.sourceforge.net/release/dsssl/1.79/doc/install.html
2013-03-18 15:07:20 +01:00

20 lines
429 B
Nix

{ stdenv, opensp }:
stdenv.mkDerivation {
name = "sp-compat-${builtins.substring 7 100 opensp.name}";
phases = [ "fixupPhase" "installPhase" ];
installPhase = ''
mkdir -pv $out/bin
for i in ${opensp}/bin/o*; do
ln -sv $i $out/bin/''${i#${opensp}/bin/o}
done
'';
setupHook = opensp.setupHook;
meta.description =
"Compatibility wrapper for old programs looking for original sp programs";
}