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
pythonPackages.dkimpy: 0.6.2 -> 0.8.1 #43219
Conversation
Please also make all changes requested in #34980. |
Is |
Btw, CONTRIBUTING.md tells you to use |
pname = "authres"; | ||
version = "${majorversion}.${minorversion}"; | ||
|
||
src = fetchurl { |
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.
Any reason not to use fetchPypi
?
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.
No particular reason. This is the upstream/source. Of course pypi is mirrored, so if you want I can change.
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.
Yes, please do. This will facilitate (semi-)automatic upgrades.
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.
And it will allow us to get rid of majorversion
and minorversion
.
majorversion = "0.6"; | ||
minorversion = "2"; | ||
majorversion = "0.8"; | ||
minorversion = "1"; | ||
in buildPythonApplication rec { | ||
pname = "dkimpy"; | ||
version = "${majorversion}.${minorversion}"; | ||
|
||
src = fetchurl { |
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.
Any reason not to use fetchPypi
?
}; | ||
|
||
checkInputs = [ pytest ]; | ||
propagatedBuildInputs = [ openssl dnspython ]; | ||
propagatedBuildInputs = [ openssl dnspython pynacl authres ]; |
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.
openssl
is not needed here
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.
My assumption was that since one of the tools (dknewkey) needs an openssl binary, this would have to be part of the path - and thus be a propagated input. Is that not the case?
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.
If it's needed in the path, then one of the following solutions should be used:
- Patch the path into the source code as you're doing it for
dknewkey
(preferred) - Use
makeWrapper
So, if the substituteInPlace
you're doing patches all places where openssl
is called you should be fine and won't need openssl
in *buildInputs
.
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.
But isn't it more robust to make it explicit that it needs this input? I can imagine some kind of future optimisation that creates minimal chroot environments with only the declared propagatedBuildInputs... There seems no harm in not having the very smallest closure if it is clearer for the future?
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.
Yes, there is harm. You don't want any project using dkimpy to have openssl in its path. That should be made explicit.
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.
propagatedBuildInputs
should generally never be used. Sadly, for Python libraries there's currently no better solution.
majorversion = "0.6"; | ||
minorversion = "2"; | ||
majorversion = "0.8"; | ||
minorversion = "1"; | ||
in buildPythonApplication rec { |
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.
buildPythonPackage
@@ -615,7 +615,7 @@ with pkgs; | |||
|
|||
dgsh = callPackage ../shells/dgsh { }; | |||
|
|||
dkimpy = pythonPackages.dkimpy; | |||
dkimpy = with pythonPackages; toPythonApplication dkimpy; |
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 still do use the |
makeWrapper "$out/libexec/dkimsign.py" $out/bin/dkimsign | ||
makeWrapper "$out/libexec/arcverify.py" $out/bin/arcverify | ||
makeWrapper "$out/libexec/arcsign.py" $out/bin/arcsign | ||
makeWrapper "$out/libexec/dknewkey.py" $out/bin/dknewkey |
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.
Don't you want to rename the executables any more?
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.
Upstream is doing that for me...
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.
Perfect.
|
@GrahamcOfBorg build python2.pkgs.authres python3.pkgs.authres |
Success on x86_64-linux (full log) Attempted: python2.pkgs.authres, python3.pkgs.authres Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: python2.pkgs.dkimpy, python3.pkgs.dkimpy Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: python2.pkgs.authres, python3.pkgs.authres Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: python2.pkgs.dkimpy, python3.pkgs.dkimpy Partial log (click to expand)
|
Motivation for this change
Bumped version. Packaged dependency (authres) as separate commit.
Note that dkimpy both serves as a library and contains a set of tools.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)