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

69 lines
1.2 KiB
Nix
Raw Normal View History

2019-09-09 20:41:32 +01:00
{ fetchFromGitHub
, lib, stdenv
2019-09-09 20:41:32 +01:00
, autoreconfHook
, pkg-config
2019-09-09 20:41:32 +01:00
, gettext
, python3
, texinfo
, help2man
, libyaml
, perl
2017-12-23 16:14:46 +00:00
}:
2019-09-09 20:41:32 +01:00
stdenv.mkDerivation rec {
2019-08-13 22:52:01 +01:00
pname = "liblouis";
2020-12-04 15:41:56 +00:00
version = "3.16.1";
2017-12-23 16:14:46 +00:00
src = fetchFromGitHub {
owner = "liblouis";
repo = "liblouis";
rev = "v${version}";
2020-12-04 15:41:56 +00:00
sha256 = "0q9ixy8cjgd2d2lzxgkfd4chzr5j1bz783mg10pnwviyg6k630m5";
2017-12-23 16:14:46 +00:00
};
outputs = [ "out" "dev" "man" "info" "doc" ];
nativeBuildInputs = [
2019-09-09 20:41:32 +01:00
autoreconfHook
pkg-config
2019-09-09 20:41:32 +01:00
gettext
python3
2017-12-23 16:14:46 +00:00
# Docs, man, info
2019-09-09 20:41:32 +01: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 lib; {
2017-12-23 16:14:46 +00:00
description = "Open-source braille translator and back-translator";
2020-03-04 06:49:45 +00:00
homepage = "http://liblouis.org/";
2017-12-23 16:14:46 +00:00
license = licenses.lgpl21;
maintainers = with maintainers; [ jtojnar ];
platforms = platforms.unix;
};
}