nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

commit e34d43a2c34d0cbe69a1825e07079ad413d264f6
parent cee12913ffba2ff140d2ff1c0cd371583c3ea660
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date:   Wed, 24 Jun 2020 12:49:13 +0300

Add foma

Diffstat:
Mnix/sources.json | 13+++++++++++++
Mpkgs/default.nix | 3+++
Apkgs/development/libraries/foma/default.nix | 28++++++++++++++++++++++++++++
3 files changed, 44 insertions(+), 0 deletions(-)

diff --git a/nix/sources.json b/nix/sources.json @@ -103,6 +103,19 @@ "url": "https://github.com/embox/embox/archive/ad5ed2947ae7ad68e6b0b0400c1a12d1a5114fa2.tar.gz", "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" }, + "foma": { + "branch": "master", + "builtin": false, + "description": "xfst-compatible C++ finite-state transducer library", + "homepage": "https://github.com/mhulden/foma", + "owner": "mhulden", + "repo": "foma", + "rev": "7c9984b5ffc38a9a17300a8a64e80ce77356aa32", + "sha256": "0kqs7q600xad4dxxiy2jr4fhrb36nj0x7jk6yfyl4569msp7zw2r", + "type": "tarball", + "url": "https://github.com/mhulden/foma/archive/7c9984b5ffc38a9a17300a8a64e80ce77356aa32.tar.gz", + "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" + }, "gef": { "branch": "dev", "builtin": false, diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -61,6 +61,9 @@ lib.makeScope newScope ( ### DEVELOPMENT / LIBRARIES + foma = callPackage ./development/libraries/foma { + libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null; + }; geographiclib = callPackage ./development/libraries/geographiclib {}; libgarmin = callPackage ./development/libraries/libgarmin { automake = pkgs.automake111x; diff --git a/pkgs/development/libraries/foma/default.nix b/pkgs/development/libraries/foma/default.nix @@ -0,0 +1,28 @@ +{ stdenv, bison, flex, libtool, ncurses, readline, zlib, sources }: + +stdenv.mkDerivation rec { + pname = "foma"; + version = stdenv.lib.substring 0 7 src.rev; + src = sources.foma; + + nativeBuildInputs = [ bison flex libtool ]; + + buildInputs = [ ncurses readline zlib ]; + + postPatch = '' + substituteInPlace foma/Makefile \ + --replace "CC = gcc" "#CC = gcc" \ + --replace "-ltermcap" "-lncurses" + ''; + + preConfigure = "cd foma"; + + makeFlags = [ "prefix=$(out)" ]; + + meta = with stdenv.lib; { + inherit (src) description homepage; + license = licenses.asl20; + maintainers = with maintainers; [ sikmir ]; + platforms = platforms.unix; + }; +}