-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
nexusmods-app: use enableUnfree
in name + description
#321405
Conversation
I considered adding the package to the check-nixfmt workflow, however that'd mean we'd have to format deps.nix too. Details
diff --git a/.github/workflows/check-nix-format.yml b/.github/workflows/check-nix-format.yml
index 131803213cb5..999955e352b9 100644
--- a/.github/workflows/check-nix-format.yml
+++ b/.github/workflows/check-nix-format.yml
@@ -32,6 +32,8 @@ jobs:
# Each environment variable beginning with NIX_FMT_PATHS_ is a list of
# paths to check with nixfmt.
env:
+ NIX_FMT_PATHS_BY_NAME: |
+ pkgs/by-name/ne/nexusmods-app
NIX_FMT_PATHS_BSD: pkgs/os-specific/bsd
NIX_FMT_PATHS_MPVSCRIPTS: pkgs/applications/video/mpv/scripts
# Format paths related to the Nixpkgs CUDA ecosystem. |
I'd be in favour of adding it, even if we have to reformat deps.nix. Making all the code (including generated code) easier to read will help. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
- reformatted using nixfmt (RFC166) - added nixfmt to the update script - simplify some string concatenation - refactor tests declaration
Ok, I've updated the PR to do that then:
|
I don't see us in the check-format logs, but I guess that's because the security policy enforces using the workflow file from master? Logs
https://github.com/NixOS/nixpkgs/actions/runs/9618191097/job/26531550883?pr=321405 |
Updated the new description to comply with https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#meta-attributes In particular:
The description is now:
Or:
I'm not a massive fan of following a list ("installer, creator and manager", quoted from upstream's readme) with another comma, but the rules state one sentence. I'm tempted to simplifying that part down to just "Game mod manager", since we probably don't need to be as verbose as upstream here. |
Agreed. We absolutely don't need to copy upstream, that was just the most convenient place to start. |
- Append `-unfree` to package name - Append whether or not RAR format mods are supported to the description
NIX_FMT_PATHS_BY_NAME: | | ||
pkgs/by-name/ne/nexusmods-app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Why split this into two lines?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'll reduce future diff sizes if other by-name packages are added, consider these diffs:
@@ -32,7 +32,9 @@ jobs:
# Each environment variable beginning with NIX_FMT_PATHS_ is a list of
# paths to check with nixfmt.
env:
- NIX_FMT_PATHS_BY_NAME: pkgs/by-name/ne/nexusmods-app
+ NIX_FMT_PATHS_BY_NAME: |
+ pkgs/by-name/ne/nexusmods-app
+ pkgs/by-name/so/some-other
NIX_FMT_PATHS_BSD: pkgs/os-specific/bsd
NIX_FMT_PATHS_MPVSCRIPTS: pkgs/applications/video/mpv/scripts
# Format paths related to the Nixpkgs CUDA ecosystem.
vs
--- a/.github/workflows/check-nix-format.yml
+++ b/.github/workflows/check-nix-format.yml
@@ -34,6 +34,7 @@ jobs:
env:
NIX_FMT_PATHS_BY_NAME: |
pkgs/by-name/ne/nexusmods-app
+ pkgs/by-name/so/some-other
NIX_FMT_PATHS_BSD: pkgs/os-specific/bsd
NIX_FMT_PATHS_MPVSCRIPTS: pkgs/applications/video/mpv/scripts
# Format paths related to the Nixpkgs CUDA ecosystem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 In general I'd probably take the standard automated formatter approach and take that hit once if we ever actually extend the list. But again, just nitpicking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not aware of an automated formatter being used for nixpkgs yaml files, but I'll format it however the ci/workflow maintainers prefer.
( | ||
tname: args: | ||
runCommand "${pname}-test-${tname}" { } '' | ||
${lib.getExe nexusmods-app} ${args} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the simpler way to get the executable. 👍
Done |
nix-update "$package" | ||
"$(nix-build --attr "$package".fetch-deps --no-out-link)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting. Is this something that nix-update maybe should implement?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps. I think it's used commonly throughout dotnet packages, IDK how widespread it is elsewhere.
Result of 2 packages failed to build:
|
I get the following error:
|
Also fails in ofborg. |
Thanks for reviewing! There shouldn't be any functional changes to the package (or its tests) in this PR, other than a slight refactor to use I suspect the issue may already be in nixpkgs? If so, hopefully the update PR will resolve: #318647 Otherwise is there anything I should be checking on my end? (Happy to chat on matrix if easier) |
Description of changes
-unfree
to package namemapAttrs
)nexusmods-app
's description:nexusmods-app-unfree
description:Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.