Skip to content

globalplatform: init at 2.4.0-unstable-2025-03-23 #392260

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

Merged
merged 1 commit into from
Mar 28, 2025
Merged

Conversation

StarGate01
Copy link
Member

This PR adds the libraries and tools of https://github.com/kaoh/globalplatform , most notably the gpshell smartcard management tool. It provides a similar functionality to the already packaged global-platform-pro software, but uses scripted batch processing instead of an interactive CLI.

I wanted to package the upstream 2.4.0 tagged release directly, but since then some very useful PRs were accepted, without which the software does not even compile properly on NixOS. I have also taken care to enable and run all provided automatic tests.

I have added support for Darwin on a best-effort basis, but I do not have a system to test with. Upstream claims to support it.

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

@github-actions github-actions bot added 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Mar 23, 2025
@StarGate01 StarGate01 requested a review from h7x4 March 23, 2025 03:21
@JayRovacsek
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 392260


aarch64-darwin

✅ 1 package built:
  • globalplatform

Copy link
Contributor

@bjornfor bjornfor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, another gpshell user :-)

I have a local expression that I didn't upstream yet. Here's the notable differences against mine:

  • Version 2.4.0 can be used directly if adding this little snippet:
+  # Fails on out-of-source builds. Proposed fix here:                                                                                                                                                                                                                                                                                                                                                                                                                                        
+  # https://github.com/kaoh/globalplatform/pull/96                                                                                                                                                                                                                                                                                                                                                                                                                                           
+  dontUseCmakeBuildDir = true;                                                                                                                                                                                                                                                                                                                                                                                                                                                               
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
+  postPatch = ''                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
+    # Fix incorrect version number.                                                                                                                                                                                                                                                                                                                                                                                                                                                          
+    substituteInPlace gpshell/src/gpshell.1.md \                                                                                                                                                                                                                                                                                                                                                                                                                                             
+        --replace-fail "2.2.0" "${finalAttrs.version}"                                                                                                                                                                                                                                                                                                                                                                                                                                       
+  '';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        

And I ended up with this license:

+    # https://github.com/kaoh/globalplatform/issues/81 ("Clarify license for GPShell")                                                                                                                                                                                                                                                                                                                                                                                                       
+    license = lib.licenses.gpl3Plus;                                                                                                                                                                                                                                                                                                                                                                                                                                                         

@StarGate01
Copy link
Member Author

StarGate01 commented Mar 23, 2025

@bjornfor Thank you for your suggestions, I have implemented the license change.

Since there were quite some PRs merged into upstream which make building easier (cmake, versions, etc - also one of my own fixes which I need to be there, kaoh/globalplatform#101), I kind of don't want to pull in a whole range of PRs as separate patches, and would instead suggest to build this unreleased version. What do you think?

@bjornfor
Copy link
Contributor

I kind of don't want to pull in a whole range of PRs as separate patches, and would instead suggest to build this unreleased version. What do you think?

Ok :-) (I didn't know about the additional PRs.)

@h7x4
Copy link
Member

h7x4 commented Mar 27, 2025

@ofborg eval

@h7x4
Copy link
Member

h7x4 commented Mar 27, 2025

Not sure what's up with ofborg. Maybe you could try retriggering it by fixing up the version in the commit message as well?

@StarGate01 StarGate01 changed the title globalplatform: init at 2.4.0-unreleased globalplatform: init at 2.4.0-unstable-2025-03-23 Mar 27, 2025
@StarGate01
Copy link
Member Author

@h7x4 Okay, thanks for noticing!

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one person. label Mar 28, 2025
@h7x4 h7x4 merged commit 1db9f4c into NixOS:master Mar 28, 2025
37 of 38 checks passed
@h7x4
Copy link
Member

h7x4 commented Mar 28, 2025

Thanks :)

@nixpkgs-ci
Copy link
Contributor

nixpkgs-ci bot commented Mar 29, 2025

Successfully created backport PR for release-24.11:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants