-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
unFTP: init at 0.14.5 #281588
base: master
Are you sure you want to change the base?
unFTP: init at 0.14.5 #281588
Conversation
6445b0b
to
42c3589
Compare
|
||
src = fetchFromGitHub { | ||
owner = "bolcom"; | ||
repo = pname; |
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.
pname and repo are not considered the same and can cause issues down the path.
repo = pname; | |
repo = "unFTP"; |
owner = "bolcom"; | ||
repo = pname; | ||
rev = "v${version}"; | ||
sha256 = "sha256-CPq4CH7reS5AI145l8U1nekm2MKnmoBfVqENR9QOKF4"; |
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.
sha256 = "sha256-CPq4CH7reS5AI145l8U1nekm2MKnmoBfVqENR9QOKF4"; | |
hash = "sha256-CPq4CH7reS5AI145l8U1nekm2MKnmoBfVqENR9QOKF4"; |
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.
Why is hash
preferred over sha256
? I used to use hash
, but thought being explicit on the hash type was better.
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.
The "sha256-" part of the hash is already making it specific (:
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'll provide some more details.
This comes from nix adding support for SRI hashes, using the hash
argument. There are several reasons why SRI hashes are preferred to normal hashes, but I believe most of it comes down to compatibility with the rest of the ecosystem. Somewhere along the road, the old to-be-deprecated-at-some-point arguments like sha256
also started accepting SRI hashes, creating a bit of confusion. There has been discussions around disabling this behavior to be more consistent, but nothing has been done at the moment. Also see RFC 131 for some relevant discussions.
You'll frequently see reviewers add this suggestion to both new packages, but also version bumps for packages that still use the "legacy" hashes (with legacy in quotes because AFAIK they haven't been officially deprecated anywhere)
unFTP = callPackage ../servers/unftp { }; | ||
|
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.
The package should be placed under the pkgs/by-name/so/some-package/package.nix
hierarchy. Which would make this unnecessary.
unFTP = callPackage ../servers/unftp { }; |
rafaelsgirao = { | ||
email = "[email protected]"; | ||
github = "rafaelsgirao"; | ||
githubId = 7544832; | ||
name = "Rafael Girão"; | ||
}; |
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.
The commit adding you as a maintainer should come before the package commit (:
|
||
cargoSha256 = "sha256-vFu1D2GYItVGeTmd/rwmZHM/mf4zQ3tzBLux7vb+yZ0="; | ||
|
||
meta = with lib; { |
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.
Please add the meta.mainProgram
tag.
}: | ||
|
||
rustPlatform.buildRustPackage rec { | ||
pname = "unFTP"; |
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.
pname = "unFTP"; | |
pname = "unftp"; |
pname
must not contain uppercase letters.
homepage = "https://unftp.rs"; | ||
license = licenses.asl20; | ||
maintainers = with maintainers; [ rafaelsgirao ]; | ||
platforms = platforms.unix; |
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 a bit unsure if this is reasonable, considering that we build it with gnu
features and use linux-pam
. I haven't looked further into it, but it sounds like this package would only run on linux, and not something like OpenBSD.
Description of changes
https://unftp.rs
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.