tweag / opam-nix

Turn opam-based OCaml projects into Nix derivations
MIT License
111 stars 33 forks source link

Filtering `project` without `--impure` option for `build*Project` #17

Closed SnO2WMaN closed 2 years ago

SnO2WMaN commented 2 years ago

Is your feature request related to a problem? Please describe. Currently, in buildDuneProject (and probably also in buildOpamProject), in the project argument with filtering ./. will require --impure. It would be nice to be able to do without it.

I am using https://github.com/numtide/nix-filter, but it would happen with lib.sources.sourceFilesBySuffices or buildins.path also.

I think it is very important to filter src. Currently, building with this flake is getting involved with flake.nix and other files that are not needed for the build ocaml project because can't filtering without --impure, so even if I change unrelated parts of those files, they get re-built, which annoys me.

Describe the solution you'd like Build with filtering project arg, without --impure option.

Describe alternatives you've considered Use --impure

Additional context

This problem is occurring while working on this branch. https://github.com/SnO2WMaN/SATySFi/tree/sno2wman/nix-flake for PR

SnO2WMaN commented 2 years ago

I apologize this was my mistake.