Skip to content

Commit

Permalink
nix: remove nix-filter dependency (#874)
Browse files Browse the repository at this point in the history
  • Loading branch information
anmonteiro authored Feb 10, 2025
1 parent 4321639 commit 4f95a34
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 42 deletions.
16 changes: 0 additions & 16 deletions flake.lock

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

54 changes: 28 additions & 26 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
description = "Reason React Nix Flake";

inputs = {
nix-filter.url = "github:numtide/nix-filter";
nixpkgs.url = "github:nix-ocaml/nix-overlays";
};

outputs = { self, nixpkgs, nix-filter }:
outputs = { self, nixpkgs }:
let
forAllSystems = f: nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed (system:
let
Expand All @@ -29,39 +28,42 @@
reason-react-ppx = buildDunePackage {
pname = "reason-react-ppx";
version = "n/a";
src = with nix-filter.lib; filter {
root = ./.;
include = [
"dune-project"
"dune"
"reason-react-ppx.opam"
"reason-react.opam"
"ppx"
];
};

src =
let fs = pkgs.lib.fileset; in
fs.toSource {
root = ./.;
fileset = fs.unions [
./dune-project
./dune
./reason-react-ppx.opam
./ppx
];
};

# Due to a Reason version mismatch, the generated OCaml PPX diff
# looks different
doCheck = false;
checkInputs = [ ];
checkPhase = "dune build @runtest -p reason-react,reason-react-ppx";
nativeCheckInputs = [ reason merlin pkgs.jq ];
propagatedBuildInputs = [ ppxlib ];
};

reason-react = buildDunePackage {
pname = "reason-react";
version = "n/a";
src = with nix-filter.lib; filter {
root = ./.;
include = [
"dune-project"
"dune"
"reason-react-ppx.opam"
"reason-react.opam"
"src"
"test"
];
};

src =
let fs = pkgs.lib.fileset; in
fs.toSource {
root = ./.;
fileset = fs.unions [
./dune-project
./dune
./reason-react.opam
./src
./test
];
};

doCheck = true;
nativeBuildInputs = [ melange reason ];
propagatedBuildInputs = [ melange reason-react-ppx ];
Expand Down

0 comments on commit 4f95a34

Please sign in to comment.