2024-05-25 09:35:19 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, bison, cmake, flex, pkg-config, readline, zlib }:
|
2021-01-07 02:54:02 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "foma";
|
2024-05-25 09:35:19 +00:00
|
|
|
version = "0.10.0alpha-unstable-03-13-2024";
|
2021-01-07 02:54:02 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mhulden";
|
|
|
|
repo = "foma";
|
2024-05-25 09:35:19 +00:00
|
|
|
rev = "e0d8122bda4bbd56f18510bdfe840617f9736ae7";
|
|
|
|
hash = "sha256-UbwuHTilKWo4sVD3igcSlTqH78N6JQFvRD35QwfoX10=";
|
2021-01-07 02:54:02 +00:00
|
|
|
};
|
|
|
|
|
2022-07-06 19:22:52 +00:00
|
|
|
sourceRoot = "${src.name}/foma";
|
2021-01-07 02:54:02 +00:00
|
|
|
|
2024-05-25 09:35:19 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
2021-01-07 02:54:02 +00:00
|
|
|
|
2024-05-25 09:35:19 +00:00
|
|
|
nativeBuildInputs = [ bison cmake flex pkg-config ];
|
|
|
|
buildInputs = [ readline zlib ];
|
2021-05-15 12:13:11 +00:00
|
|
|
|
2024-05-25 09:35:19 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
# the cmake package does not handle absolute CMAKE_INSTALL_XXXDIR
|
|
|
|
# correctly (setting it to an absolute path causes include files to go to
|
|
|
|
# $out/$out/include, because the absolute path is interpreted with root at
|
|
|
|
# $out).
|
|
|
|
"-DCMAKE_INSTALL_INCLUDEDIR=include"
|
|
|
|
"-DCMAKE_INSTALL_LIBDIR=lib"
|
|
|
|
];
|
2021-01-07 02:54:02 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2021-01-07 02:54:02 +00:00
|
|
|
description = "Multi-purpose finite-state toolkit designed for applications ranging from natural language processing to research in automata theory";
|
|
|
|
homepage = "https://github.com/mhulden/foma";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.tckmn ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|