Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter derivation by regex #73

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

shimunn
Copy link

@shimunn shimunn commented Jul 17, 2023

Addresses #72

Adds an extra optional flag to attic push: --filter which can be used like so:

attic push /run/current-system/ --filter '^((steam|appimage)-run|(nvidia|rust).*)$'

Which would push the whole system closure execpt store paths matching the regex such as stream-run, appimage-run or rust releated derivations.

I guess it would make sense, to integrate this functionally into other commands such as watch-store as well, I'll be happy to patch those commands as well if this feature is of interest.

@shimunn
Copy link
Author

shimunn commented Jul 17, 2023

It might even make sense to extend this to not only serve as blacklist but as a general filter. Maybe even to check if the path has been built with 'perferLocalBuild'.

@gador
Copy link

gador commented Jul 9, 2024

Just wanted to say that I use this PR and it works like a charm. I'd love to see this merged

@msfjarvis
Copy link

msfjarvis commented Oct 13, 2024

I've rebased this PR's changes on e5c8d2d in case someone else also needs it, I haven't tested it yet other than running nix flake check.

0001-feat-push-filter-derivation-by-regex.txt

Edit: had a typo 😬

0001-feat-push-filter-derivation-by-regex.txt

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.

3 participants