Skip to content

Conversation

@bmwagner18
Copy link

https://github.com/Droid-MAX/SNANDer

C program for reading and flashing flash chips using CH341A programmers.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@NixOSInfra NixOSInfra added the 12.first-time contribution This PR is the author's first one; please be gentle! label Apr 23, 2025
@github-actions github-actions bot added the 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` label Apr 23, 2025
@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Apr 23, 2025
Copy link
Contributor

@illdefined illdefined left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a few recommendations for changes.

You could also consider providing an update script. Something like passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; }; might just work, but I remember that nix-update had difficulties with unstable Git versions in the past.

@bmwagner18
Copy link
Author

I left a few recommendations for changes.

You could also consider providing an update script. Something like passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; }; might just work, but I remember that nix-update had difficulties with unstable Git versions in the past.

I added the update script. Is there a way to test it?

@0xda157
Copy link
Contributor

0xda157 commented Apr 27, 2025

I added the update script. Is there a way to test it?

you can run nix-shell -p nix-update --run "nix-update snander", which is what nix-update-script does automatically.

@bmwagner18
Copy link
Author

I added the update script. Is there a way to test it?

you can run nix-shell -p nix-update --run "nix-update snander", which is what nix-update-script does automatically.

The author of this project uses v.<major>.<minor>.<patch> for their versions and this seems to break nix-update because it finds version .1.7.8. I tried to fix it with the --version-regex argument in nix-update but to no avail.

passthru.updateScript = nix-update-script { extraArgs = [ "--version-regex='v.(.*)'" ]; };

@0xda157
Copy link
Contributor

0xda157 commented Apr 27, 2025

The author of this project uses v.<major>.<minor>.<patch> for their versions and this seems to break nix-update because it finds version .1.7.8. I tried to fix it with the --version-regex argument in nix-update but to no avail.

passthru.updateScript = nix-update-script { extraArgs = [ "--version-regex='v.(.*)'" ]; };

I believe you need to escape the ., like this: "--version-regex='v\.(.*)'"

@bmwagner18
Copy link
Author

The author of this project uses v.<major>.<minor>.<patch> for their versions and this seems to break nix-update because it finds version .1.7.8. I tried to fix it with the --version-regex argument in nix-update but to no avail.
passthru.updateScript = nix-update-script { extraArgs = [ "--version-regex='v.(.*)'" ]; };

I believe you need to escape the ., like this: "--version-regex='v\.(.*)'"

Oh duh... I'm not super familiar with regex but obviously the '.' character is special in regex. I was able to get it to work and I've pushed an updated commit

@bmwagner18 bmwagner18 changed the title snander: init at 1.7.5-unstable-2025-03-28 snander: init at 1.7.8 Apr 27, 2025
Copy link
Contributor

@0xda157 0xda157 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should just have snander: init at 1.7.8 and snander: init at 1.7.8 as your only commits (an interactive rebase is probably the best way to get there)

@bmwagner18
Copy link
Author

you should just have snander: init at 1.7.8 and snander: init at 1.7.8 as your only commits (an interactive rebase is probably the best way to get there)

Whew ok I think I got it. Thanks for your patience... This is one of my first times working on a repo that isn't just me.

Copy link
Contributor

@0xda157 0xda157 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

otherwise LGTM

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you use double quotes, you’ll have to escape the backslash character with another one. As this quickly becomes unreadable, I suggest to use double single quotes instead for this kind of regex.

Suggested change
"^v\.(\d+\.\d+\.\d+)$"
''^v\.(\d+\.\d+\.\d+)$''

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I amended my personal fork's commit and force pushed it. The change is reflected in my personal repo, but the change didn't seem to propagate to this PR. Any suggestions?

snander: init at 1.7.8

Fix formatting; use finalAttrs instead of rec
@illdefined
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 401003


x86_64-linux

✅ 1 package built:
  • snander

aarch64-linux

✅ 1 package built:
  • snander

@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label May 17, 2025
@nixpkgs-ci nixpkgs-ci bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: merge conflict This PR has merge conflicts with the target branch 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 12.first-time contribution This PR is the author's first one; please be gentle!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants