nixpkgs/pkgs/development/compilers/teyjus/default.nix
Artturin f9fdf2d402 treewide: move NIX_CFLAGS_COMPILE to the env attrset
with structuredAttrs lists will be bash arrays which cannot be exported
which will be a issue with some patches and some wrappers like cc-wrapper

this makes it clearer that NIX_CFLAGS_COMPILE must be a string as lists
in env cause a eval failure
2023-02-22 21:23:04 +02:00

45 lines
1,023 B
Nix

{ lib, stdenv, fetchFromGitHub, omake, ocaml, flex, bison }:
stdenv.mkDerivation rec {
pname = "teyjus";
version = "unstable-2019-07-26";
src = fetchFromGitHub {
owner = "teyjus";
repo = "teyjus";
rev = "e63f40aa9f1d0ea5e7bac41aae5e479c3616545c";
sha256 = "sha256-gaAWKd5/DZrIPaaQzx9l0KtCMW9LPw17vvNPsnopZA0=";
};
patches = [
./fix-lex-to-flex.patch
];
postPatch = ''
sed -i "/TST/d" source/OMakefile
rm -rf source/front/caml
'';
strictDeps = true;
nativeBuildInputs = [ omake ocaml flex bison ];
hardeningDisable = [ "format" ];
env.NIX_CFLAGS_COMPILE = "-I${ocaml}/include";
buildPhase = "omake all";
checkPhase = "omake check";
installPhase = "mkdir -p $out/bin && cp tj* $out/bin";
meta = with lib; {
description = "An efficient implementation of the Lambda Prolog language";
homepage = "https://github.com/teyjus/teyjus";
license = lib.licenses.gpl3;
maintainers = [ maintainers.bcdarwin ];
platforms = platforms.unix;
};
}