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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

75 lines
1.4 KiB
Nix
Raw Normal View History

2019-09-09 19:41:32 +00:00
{ fetchFromGitHub
2022-05-28 23:32:12 +00:00
, lib
, stdenv
2019-09-09 19:41:32 +00:00
, autoreconfHook
, pkg-config
2019-09-09 19:41:32 +00:00
, 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";
2022-12-06 10:13:05 +00:00
version = "3.24.0";
2022-08-06 22:48:42 +00:00
outputs = [ "out" "dev" "info" "doc" ]
# configure: WARNING: cannot generate manual pages while cross compiling
++ lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform) [ "man" ];
2017-12-23 16:14:46 +00:00
src = fetchFromGitHub {
owner = "liblouis";
repo = "liblouis";
rev = "v${version}";
2022-12-06 10:13:05 +00:00
sha256 = "sha256-QSrCQhP3t+WPyBQPLJbZEaDCjXD8Lo6IAGKHsbL2S1o=";
2017-12-23 16:14:46 +00:00
};
nativeBuildInputs = [
2019-09-09 19:41:32 +00:00
autoreconfHook
pkg-config
2019-09-09 19:41:32 +00:00
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 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/";
license = with licenses; [
lgpl21Plus # library
gpl3Plus # tools
];
2017-12-23 16:14:46 +00:00
maintainers = with maintainers; [ jtojnar ];
platforms = platforms.unix;
};
}