Skip to content

Commit

Permalink
chore: add nix support (#54)
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <[email protected]>
  • Loading branch information
rgrinberg authored Sep 26, 2023
1 parent cfa1f30 commit ae268a3
Show file tree
Hide file tree
Showing 2 changed files with 108 additions and 0 deletions.
76 changes: 76 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 32 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
description = "spawn Nix Flake";

inputs.nix-filter.url = "github:numtide/nix-filter";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.nixpkgs.url = "github:nixos/nixpkgs";

outputs = { self, nixpkgs, flake-utils, nix-filter }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages."${system}";
inherit (pkgs.ocamlPackages) buildDunePackage;
in
rec {
packages = rec {
default = spawn;
spawn = buildDunePackage {
pname = "spawn";
version = "n/a";
src = ./.;
duneVersion = "3";
propagatedBuildInputs = with pkgs.ocamlPackages; [ ];
checkInputs = with pkgs.ocamlPackages; [ ppx_expect ppx_bench ];
doCheck = true;
};
};
devShells.default = pkgs.mkShell {
inputsFrom = pkgs.lib.attrValues packages;
buildInputs = with pkgs.ocamlPackages; [ ocaml-lsp pkgs.ocamlformat_0_19_0 ];
};
});
}

0 comments on commit ae268a3

Please sign in to comment.