Skip to content

Nix: filter src robustly with gitignore.nix#459

Open
doronbehar wants to merge 1 commit into
pinnacle-comp:mainfrom
doronbehar:nix-filter-src
Open

Nix: filter src robustly with gitignore.nix#459
doronbehar wants to merge 1 commit into
pinnacle-comp:mainfrom
doronbehar:nix-filter-src

Conversation

@doronbehar

Copy link
Copy Markdown
Contributor

I noticed this can be useful when playing with Nix files. The lack of sufficient VERGEN_* environment variables might tilt you towards not accepting it, but maybe I can think of different solutions - maybe without gitignore.nix.

@cassandracomar

Copy link
Copy Markdown
Contributor

this makes it much harder to keep the package in-sync with what can be upstreamed to nixpkgs (PR pending). writing a real filter function for the source seems like a better idea.

@doronbehar

Copy link
Copy Markdown
Contributor Author

this makes it much harder to keep the package in-sync with what can be upstreamed to nixpkgs (PR pending).

I had a very similar experience as here when I helped sile write their Nix files, and I'm not sure what exactly makes it harder.

writing a real filter function for the source seems like a better idea.

What isn't real with gitignore.nix? :)

@cassandracomar

Copy link
Copy Markdown
Contributor

we can't use gitignore.nix in nixpkgs

@doronbehar

Copy link
Copy Markdown
Contributor Author

we can't use gitignore.nix in nixpkgs

But of course you won't need to. If you are talking about the experience of modifying the nix/packages/default.nix file make it work for nixpkgs/pkgs/by-name/pi/pinnacle/package.nix, even now you have to replace the src arguments in the current expression with a real src = fetchFromGitHub. This PR barely makes that experience less comfortable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants