at 18.03-beta 57 lines 1.2 kB view raw
1{ fetchFromGitHub, stdenv, autoreconfHook, pkgconfig, gettext, python3 2, texinfo, help2man, libyaml, perl 3}: 4 5let 6 version = "3.4.0"; 7in stdenv.mkDerivation rec { 8 name = "liblouis-${version}"; 9 10 src = fetchFromGitHub { 11 owner = "liblouis"; 12 repo = "liblouis"; 13 rev = "v${version}"; 14 sha256 = "1b3vf6sq2iffdvj0r2q5g5k198camy3sq2nwfz391brpwivsnayh"; 15 }; 16 17 outputs = [ "out" "dev" "man" "info" "doc" ]; 18 19 nativeBuildInputs = [ 20 autoreconfHook pkgconfig gettext python3 21 # Docs, man, info 22 texinfo help2man 23 ]; 24 25 buildInputs = [ 26 # lou_checkYaml 27 libyaml 28 # maketable.d 29 perl 30 ]; 31 32 configureFlags = [ 33 # Required by Python bindings 34 "--enable-ucs4" 35 ]; 36 37 postPatch = '' 38 patchShebangs tests 39 substituteInPlace python/louis/__init__.py.in --replace "###LIBLOUIS_SONAME###" "$out/lib/liblouis.so" 40 ''; 41 42 postInstall = '' 43 pushd python 44 python setup.py install --prefix="$out" --optimize=1 45 popd 46 ''; 47 48 doCheck = true; 49 50 meta = with stdenv.lib; { 51 description = "Open-source braille translator and back-translator"; 52 homepage = http://liblouis.org/; 53 license = licenses.lgpl21; 54 maintainers = with maintainers; [ jtojnar ]; 55 platforms = platforms.unix; 56 }; 57}