-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
pynitrokey: 0.4.9 -> 0.4.26 #183099
pynitrokey: 0.4.9 -> 0.4.26 #183099
Conversation
patches = [ | ||
# Fix build with GCC 11 | ||
(fetchpatch { | ||
url = "https://github.com/NordicSemiconductor/pc-ble-driver/commit/37258e65bdbcd0b4369ae448faf650dd181816ec.patch"; |
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.
url = "https://github.com/NordicSemiconductor/pc-ble-driver/commit/37258e65bdbcd0b4369ae448faf650dd181816ec.patch"; | |
name = "gcc11-fix.patch"; | |
url = "https://github.com/NordicSemiconductor/pc-ble-driver/commit/37258e65bdbcd0b4369ae448faf650dd181816ec.patch"; |
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.
This is directly taken from #180075, so you would need to review this there.
Looking good. I'd suggest adding |
23ac66e
to
f06024c
Compare
Thank you for the review! I implemented your suggestions (except for the one from the depending PR). It should now also work on Darwin, though I have no system to test this with. I left the comments to the patches there in addition to the patch names, because I think they add valuable information, though I’m open to removing them. |
f06024c
to
1b72377
Compare
1b72377
to
bebebf6
Compare
bebebf6
to
1af5041
Compare
I rebased the PR on top of latest master and will merge it in the coming days if nobody says otherwise (or merges before me). |
Works fine with my Nitrokey start. |
|
||
installPhase = '' | ||
runHook preInstall | ||
install -D bin/${binDirPrefix}$(uname -m)/libusbsio.${libSuffix} $out/lib/libusbsio.${libSuffix} |
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 don't think we want to use uname -m here. Can't we get that from a nix variable or use a wildcard?
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 makefile uses uname -m
to determine the directory, so I think it should be used to get the same path that the build uses. Or is there a nixpkgs function/constant that returns this?
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 don't know but I would suspect that it could be a source for impurity.
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 replaced it with stdenv.targetPlatform.parsed.cpu.name
.
asn1crypto | ||
astunparse | ||
bincopy | ||
binutils.bintools # required for ctypes to find libcrypto (https://github.com/dbt-labs/dbt-core/issues/3366#issuecomment-849764321) |
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.
Can we patch the code instead?
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.
That would probably require patching the python interpreter (see #176917)
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.
thats strange
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.
binutils (objdump) is indeed one of the methods for ctypes to find dependencies.
Still, in Nixpkgs we patch out ctypes calls in the calling code. This is not for the interpreter.
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 patched the calls in the oscrypto
library, from where they originate. This should also fix #176917.
461e03b
to
05d5a88
Compare
Can this be merged now @SuperSandro2000? |
05d5a88
to
de4cbc3
Compare
Many thanks to David Runge (dvzrv), who made an effort to get this available under a free license earlier this year: nxp-mcuxpresso/spsdk#36
Its version is synced with libusbsio.
The ctypes call did not work, because it requires binutils.bintools to be available in every downstream dependency. Fixes NixOS#176917.
de4cbc3
to
d6bbf7d
Compare
I rebased it onto latest master and fixed an issue with cross-compilation ( |
Description of changes
This updates pynitrokey as part of the Summer of Nix.
It introduces a few new packages that are new dependencies of pynitrokey.
A few notes on how this is packaged:
binutils.bintools
to the downstream packages and wrapping the binaries with aLD_LIBRARY_PATH
including OpenSSL. I don’t know if this is the preferred way to do this.Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes