nixpkgs/pkgs/development/libraries/liblouis/default.nix

69 lines
1.2 KiB
Nix
Raw Normal View History

2019-09-09 19:41:32 +00:00
{ fetchFromGitHub
, stdenv
, autoreconfHook
, pkgconfig
, gettext
, python3
, texinfo
, help2man
, libyaml
, perl
2017-12-23 16:14:46 +00:00
}:
2019-09-09 19:41:32 +00:00
stdenv.mkDerivation rec {
2019-08-13 21:52:01 +00:00
pname = "liblouis";
2019-12-08 16:38:43 +00:00
version = "3.12.0";
2017-12-23 16:14:46 +00:00
src = fetchFromGitHub {
owner = "liblouis";
repo = "liblouis";
rev = "v${version}";
2019-12-08 16:38:43 +00:00
sha256 = "0sw7iwb9158z7jslxj9jwh2vqbg0q8wq6fbmk9iz7sfkjqhi80hv";
2017-12-23 16:14:46 +00:00
};
outputs = [ "out" "dev" "man" "info" "doc" ];
nativeBuildInputs = [
2019-09-09 19:41:32 +00:00
autoreconfHook
pkgconfig
gettext
python3
2017-12-23 16:14:46 +00:00
# Docs, man, info
2019-09-09 19:41:32 +00:00
texinfo
help2man
2017-12-23 16:14:46 +00:00
];
buildInputs = [
# lou_checkYaml
libyaml
# maketable.d
perl
];
configureFlags = [
# Required by Python bindings
"--enable-ucs4"
];
postPatch = ''
patchShebangs tests
substituteInPlace python/louis/__init__.py.in --replace "###LIBLOUIS_SONAME###" "$out/lib/liblouis.so"
'';
postInstall = ''
pushd python
python setup.py install --prefix="$out" --optimize=1
popd
'';
doCheck = true;
meta = with stdenv.lib; {
description = "Open-source braille translator and back-translator";
homepage = http://liblouis.org/;
license = licenses.lgpl21;
maintainers = with maintainers; [ jtojnar ];
platforms = platforms.unix;
};
}