about summary refs log tree commit diff
path: root/pkgs/development/libraries/liblouis/default.nix
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2017-12-23 17:14:46 +0100
committerJan Tojnar <jtojnar@gmail.com>2017-12-24 15:11:04 +0100
commitae03a11c86398dd5eee048b13f0430ace00408be (patch)
tree74fc0ce7403fb19635b87f2c2e3cc4c30170ab9a /pkgs/development/libraries/liblouis/default.nix
parent395f2dd67e66e8505150ff010425fac70c8fd03a (diff)
downloadnixlib-ae03a11c86398dd5eee048b13f0430ace00408be.tar
nixlib-ae03a11c86398dd5eee048b13f0430ace00408be.tar.gz
nixlib-ae03a11c86398dd5eee048b13f0430ace00408be.tar.bz2
nixlib-ae03a11c86398dd5eee048b13f0430ace00408be.tar.lz
nixlib-ae03a11c86398dd5eee048b13f0430ace00408be.tar.xz
nixlib-ae03a11c86398dd5eee048b13f0430ace00408be.tar.zst
nixlib-ae03a11c86398dd5eee048b13f0430ace00408be.zip
liblouis: init at 3.4.0
Diffstat (limited to 'pkgs/development/libraries/liblouis/default.nix')
-rw-r--r--pkgs/development/libraries/liblouis/default.nix57
1 files changed, 57 insertions, 0 deletions
diff --git a/pkgs/development/libraries/liblouis/default.nix b/pkgs/development/libraries/liblouis/default.nix
new file mode 100644
index 000000000000..d3ddb99adada
--- /dev/null
+++ b/pkgs/development/libraries/liblouis/default.nix
@@ -0,0 +1,57 @@
+{ fetchFromGitHub, stdenv, autoreconfHook, pkgconfig, gettext, python3
+, texinfo, help2man, libyaml, perl
+}:
+
+let
+  version = "3.4.0";
+in stdenv.mkDerivation rec {
+  name = "liblouis-${version}";
+
+  src = fetchFromGitHub {
+    owner = "liblouis";
+    repo = "liblouis";
+    rev = "v${version}";
+    sha256 = "1b3vf6sq2iffdvj0r2q5g5k198camy3sq2nwfz391brpwivsnayh";
+  };
+
+  outputs = [ "out" "dev" "man" "info" "doc" ];
+
+  nativeBuildInputs = [
+    autoreconfHook pkgconfig gettext python3
+    # Docs, man, info
+    texinfo help2man
+  ];
+
+  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;
+  };
+}