Skip to content

snow-plow: init at 0.1.0 #368273

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

snow-plow: init at 0.1.0 #368273

wants to merge 1 commit into from

Conversation

jthulhu
Copy link
Contributor

@jthulhu jthulhu commented Dec 26, 2024

Added new package snow-plow, a utility package to update several flakes at once.

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.

@jthulhu jthulhu force-pushed the add-snow-plow branch 2 times, most recently from 4b10e87 to 836ef44 Compare December 26, 2024 09:11
@github-actions github-actions bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Dec 26, 2024
@jthulhu
Copy link
Contributor Author

jthulhu commented Dec 26, 2024

@NixOS/nix-formatting nixfmt-check fails, yet I have run nixfmt on pkgs/by-name/sn/snow-plow/package.nix. I have synced with master just a couple of minutes before doing so. I don't know exactly why nixfmt-check is complaining.

@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Dec 26, 2024
@infinisil
Copy link
Member

There's no need to manually get the right nixfmt version, the CI failure mentions:

Please format them using the Nixpkgs-specific nixfmt by going to the Nixpkgs root directory, running nix-shell, then:

@jthulhu
Copy link
Contributor Author

jthulhu commented Dec 26, 2024

@infinisil

There's no need to manually get the right nixfmt version, the CI failure mentions:

Please format them using the Nixpkgs-specific nixfmt by going to the Nixpkgs root directory, running nix-shell, then:

I thought I did that, but apparently doing it again did something. And it works! Thanks.

@github-actions github-actions bot removed 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Dec 26, 2024
@ofborg ofborg bot added 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Dec 26, 2024
Copy link
Member

@Moraxyc Moraxyc left a comment

Choose a reason for hiding this comment

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

Thanks! Otherwise LGTM

src = fetchFromGitHub {
owner = "JeanCASPAR";
repo = pname;
rev = "v${version}";
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
rev = "v${version}";
tag = "v${version}";


nativeBuildInputs = [ installShellFiles ];

postInstall = ''
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
postInstall = ''
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''

See #368256

Comment on lines +20 to +36
mkdir $out/artifacts
pushd $out/artifacts

$out/bin/snow-plow gen-man
for shell in bash fish zsh; do
$out/bin/snow-plow gen-completion $shell
done
popd

installManPage $out/artifacts/*.1
installShellCompletion \
--cmd snow-plow \
--bash $out/artifacts/snow-plow.bash \
--fish $out/artifacts/snow-plow.fish \
--zsh $out/artifacts/_snow-plow

rm -r $out/artifacts
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
mkdir $out/artifacts
pushd $out/artifacts
$out/bin/snow-plow gen-man
for shell in bash fish zsh; do
$out/bin/snow-plow gen-completion $shell
done
popd
installManPage $out/artifacts/*.1
installShellCompletion \
--cmd snow-plow \
--bash $out/artifacts/snow-plow.bash \
--fish $out/artifacts/snow-plow.fish \
--zsh $out/artifacts/_snow-plow
rm -r $out/artifacts
pushd $(mktemp -d)
$out/bin/snow-plow gen-man
for shell in bash fish zsh; do
$out/bin/snow-plow gen-completion $shell
done
installManPage *.1
installShellCompletion \
--cmd snow-plow \
--bash snow-plow.bash \
--fish snow-plow.fish \
--zsh _snow-plow
popd

'';

cargoHash = "sha256-y8o3rn6+0Q/mDfi31sPYGynp4kMF5yFAWYp6vQgQEJc=";

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = [ "--version" ];

Just a suggestion: we can add versionCheckHook for a simple check.

@nixpkgs-ci nixpkgs-ci bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Aug 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package 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. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants