summaryrefslogtreecommitdiff
path: root/flake.nix
blob: a87fc9036c6e90334fa8834466534da14071d868 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{
  inputs = {
    utils.url = "github:numtide/flake-utils";
  };

  outputs = { self, nixpkgs, utils, ... }:
    utils.lib.eachDefaultSystem (system:
      let
        pname = "grump";
        version = "0.0.0";
        pkgs = nixpkgs.legacyPackages."${system}";

        ocaml-print-intf = pkgs.ocamlPackages.buildDunePackage rec {
          pname = "ocaml-print-intf";
          version = "1.2.0";
          useDune2 = true;
          src = pkgs.fetchgit {
            url = "https://github.com/avsm/ocaml-print-intf";
            sha256 = "sha256-16LVvyTHew7sYfr4x0WR/jikXq4dy7Yi9yyrHA99hEM=";
          };
          propagatedBuildInputs = with pkgs.ocamlPackages; [
            dune-build-info
            bos
          ];
        };


        buildInputs = with pkgs.ocamlPackages; [
          utop
          pkgs.nixUnstable
          pkgs.fswatch
          ocaml-print-intf
        ];

      in
      with pkgs;
      rec {
        defaultPackage = ocamlPackages.buildDunePackage rec {
          inherit pname version buildInputs;
          useDune2 = true;
          src = ./.;
        };
      });
}