hercules-ci / gitignore.nix

Nix functions for filtering local git sources
The Unlicense
243 stars 20 forks source link

The "impurities" #13

Open roberth opened 5 years ago

roberth commented 5 years ago

gitignore uses home, which can be considered "impure", but is your worktree really "pure" without ignoring your local tools' mess?

lorenzleutgeb commented 3 years ago

I came here trying to figure out whether this library works with Flakes and pure builds. This issue seems to indicate that it doesn't, mentioning home. Maybe add a sentence to README.md about purity?

roberth commented 3 years ago

My understanding is that pure mode will pretend home does not exist, which is handled gracefully.

I can't confirm this because for some reason pure-eval seems to enable restricted mode as well and it's unable to load the very file I'm asking it to build. Maybe you'll have more luck.

I should also note that flakes invoke builtins.fetchGit and then import from there which kind of works but has drawbacks as well. Using gitignore.nix with flakes may be redundant, unless you're exporting functions that will be used in a non-flake context.