lol
1{ lib
2, makeDesktopItem
3, copyDesktopItems
4, wrapGAppsHook
5, glib
6, gnome
7, mkCoqDerivation
8, coq
9, version ? null }:
10
11mkCoqDerivation rec {
12 pname = "coqide";
13 inherit version;
14
15 inherit (coq) src;
16 release."${coq.version}" = {};
17
18 defaultVersion = if lib.versions.isGe "8.14" coq.version then coq.version else null;
19
20 preConfigure = ''
21 patchShebangs dev/tools/
22 '';
23 prefixKey = "-prefix ";
24
25 useDune = true;
26
27 buildInputs = [
28 copyDesktopItems
29 wrapGAppsHook
30 coq.ocamlPackages.lablgtk3-sourceview3
31 glib
32 gnome.adwaita-icon-theme
33 ];
34
35 buildPhase = ''
36 runHook preBuild
37 dune build -p ${pname} -j $NIX_BUILD_CORES
38 runHook postBuild
39 '';
40 installPhase = ''
41 runHook preInstall
42 dune install --prefix $out ${pname}
43 runHook postInstall
44 '';
45
46 desktopItems = makeDesktopItem {
47 name = "coqide";
48 exec = "coqide";
49 icon = "coq";
50 desktopName = "CoqIDE";
51 comment = "Graphical interface for the Coq proof assistant";
52 categories = [ "Development" "Science" "Math" "IDE" "GTK" ];
53 };
54
55 meta = with lib; {
56 homepage = "https://coq.inria.fr";
57 description = "The CoqIDE user interface for the Coq proof assistant";
58 license = licenses.lgpl21Plus;
59 maintainers = [ maintainers.Zimmi48 ];
60 };
61}