2020-04-24 23:36:52 +00:00
|
|
|
{ fetchFromGitHub
|
2022-06-16 17:23:12 +00:00
|
|
|
, lib
|
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, autoreconfHook
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, gettext
|
|
|
|
, python3
|
|
|
|
, texinfo
|
|
|
|
, help2man
|
|
|
|
, libyaml
|
|
|
|
, perl
|
|
|
|
}:
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "liblouis";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "3.27.0";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
outputs = [ "out" "dev" "info" "doc" ]
|
|
|
|
# configure: WARNING: cannot generate manual pages while cross compiling
|
|
|
|
++ lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform) [ "man" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "liblouis";
|
|
|
|
repo = "liblouis";
|
2023-03-15 16:39:30 +00:00
|
|
|
rev = "v${finalAttrs.version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-5umpIscs4Y8MSaoY7yKtBFmlIa8QDQtjBxoysZ+GTm8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
strictDeps = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
gettext
|
|
|
|
python3
|
|
|
|
# Docs, man, info
|
|
|
|
texinfo
|
|
|
|
help2man
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
# lou_checkYaml
|
|
|
|
libyaml
|
2023-03-15 16:39:30 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
2020-04-24 23:36:52 +00:00
|
|
|
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;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Open-source braille translator and back-translator";
|
2023-03-15 16:39:30 +00:00
|
|
|
homepage = "https://liblouis.io/";
|
2022-06-16 17:23:12 +00:00
|
|
|
license = with licenses; [
|
|
|
|
lgpl21Plus # library
|
|
|
|
gpl3Plus # tools
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ jtojnar ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
2023-03-15 16:39:30 +00:00
|
|
|
})
|