1{
2 lib,
3 haskellPackages,
4 fetchFromGitHub,
5}:
6
7haskellPackages.mkDerivation {
8 pname = "lngen";
9 version = "0-unstable-2024-10-22";
10 src = fetchFromGitHub {
11 owner = "plclub";
12 repo = "lngen";
13 rev = "c034c8d95264e6a5d490bc4096534ccd54f0d393";
14 hash = "sha256-XzcB/mNXure6aZRmwgUWGHSEaknrbP8Onk2CisVuhiw=";
15 };
16
17 isLibrary = true;
18 isExecutable = true;
19
20 libraryHaskellDepends = with haskellPackages; [
21 base
22 syb
23 parsec
24 containers
25 mtl
26 ];
27 executableHaskellDepends = with haskellPackages; [ base ];
28
29 # Fix build on GHC >=9.8.1, where using partial functions was made an error with `-Werror`
30 preBuild = ''
31 substituteInPlace lngen.cabal --replace-fail "-Werror" "-Werror -Wwarn=x-partial"
32 '';
33
34 homepage = "https://github.com/plclub/lngen";
35 description = "Tool for generating Locally Nameless definitions and proofs in Coq, working together with Ott";
36 maintainers = with lib.maintainers; [ chen ];
37 license = lib.licenses.mit;
38 mainProgram = "lngen";
39}