Skip to content
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

python312Packages.pyscard: fix build #352828

Closed
wants to merge 2 commits into from
Closed

Conversation

itepastra
Copy link
Member

@itepastra itepastra commented Nov 1, 2024

this package got a build failure in 2bdb00d,
this was because swig got added to the required build-inputs.
Adding it to the nix build-inputs did not work so I made a replace which fixed it.

closes #352598

ZHF #352882

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/)
  • 24.11 Release Notes (or backporting 23.11 and 24.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.

@itepastra
Copy link
Member Author

itepastra commented Nov 1, 2024

Hmm, now the yubikey-manager-qt package crashes seconds after starting. So there's probably something still wrong
Edit: the non qt version does seem to be stable, except that it doesn't recognize my yubikey when it's inserted

@ofborg ofborg bot requested a review from layus November 1, 2024 15:25
@itepastra itepastra marked this pull request as ready for review November 1, 2024 18:00
@itepastra itepastra added the 0.kind: ZHF Fixes Fixes during the Zero Hydra Failures (ZHF) campaign label Nov 1, 2024
steeef pushed a commit to steeef/dotfiles that referenced this pull request Nov 1, 2024
@Aleksanaa
Copy link
Member

Adding it to the nix build-inputs did not work so I made a replace which fixed it.

Because you've not packaged https://pypi.org/project/swig/ ? Swig doesn't have python binding itself.

This is not a fix.

@Aleksanaa Aleksanaa marked this pull request as draft November 2, 2024 08:08
@itepastra
Copy link
Member Author

I've packaged swig-pypi, the swig bindings for python and used that package for pyscard instead.
It looks like it uses swig correctly in the build now

@itepastra itepastra marked this pull request as ready for review November 2, 2024 12:00
@nix-owners nix-owners bot requested a review from natsukium November 2, 2024 12:02
@Aleksanaa
Copy link
Member

@natsukium is it needed to keep attribute name the same with pypi name?

@ofborg ofborg bot added the 8.has: package (new) This PR adds a new package label Nov 2, 2024
@NickCao
Copy link
Member

NickCao commented Nov 2, 2024

Better fix in #353230, and upstream issue for yubikey-manager-qt: Yubico/yubikey-manager-qt#366

@natsukium
Copy link
Member

is it needed to keep attribute name the same with pypi name?

Yes, the pypi name needs to be adopted and then normalized according to PEP503.

Attribute names in python-packages.nix as well as pnames should match the library's name on PyPI, but be normalized according to PEP 0503. This means that characters should be converted to lowercase and . and _ should be replaced by a single - (foo-bar-baz instead of Foo__Bar.baz). If necessary, pname has to be given a different value within fetchPypi.

https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/python.section.md#contributing-guidelines-contributing-guidelines

@natsukium natsukium changed the title pythonPackages.pyscard: fix build python312Packages.pyscard: fix build Nov 3, 2024
@natsukium
Copy link
Member

Regarding swig-pypi, if we want to package it, we should create our own stub like cmake/ninja.

@itepastra
Copy link
Member Author

I will make a stub like cmake/ninja for swig if we want to, but this branch isn't needed anymore

@itepastra itepastra closed this Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: ZHF Fixes Fixes during the Zero Hydra Failures (ZHF) campaign 6.topic: python 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 11-100 10.rebuild-linux: 11-100
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build failure: pythonPackages.pyscard
4 participants