2023-07-15 17:15:38 +00:00
|
|
|
{ lib, fetchFromGitHub, jdk8, maven, makeWrapper, jre8_headless, pcsclite }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
let
|
|
|
|
mavenJdk8 = maven.override {
|
|
|
|
jdk = jdk8;
|
|
|
|
};
|
|
|
|
in
|
|
|
|
mavenJdk8.buildMavenPackage rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "global-platform-pro";
|
|
|
|
version = "18.09.14";
|
|
|
|
GPPRO_VERSION = "18.09.14-0-gb439b52"; # git describe --tags --always --long --dirty
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "martinpaljak";
|
|
|
|
repo = "GlobalPlatformPro";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "1vws6cbgm3mrwc2xz9j1y262vw21x3hjc9m7rqc4hn3m7gjpwsvg";
|
|
|
|
};
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
mvnHash = "sha256-xFcEZpJ0+ApJTDTuA63LgvUwLrxATVKoj5Mh3WZyfq8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
nativeBuildInputs = [ jdk8 makeWrapper ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out/lib/java" "$out/share/java"
|
|
|
|
cp target/gp.jar "$out/share/java"
|
2023-07-15 17:15:38 +00:00
|
|
|
makeWrapper "${jre8_headless}/bin/java" "$out/bin/gp" \
|
2020-04-24 23:36:52 +00:00
|
|
|
--add-flags "-jar '$out/share/java/gp.jar'" \
|
|
|
|
--prefix LD_LIBRARY_PATH : "${pcsclite.out}/lib"
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Command-line utility for managing applets and keys on Java Cards";
|
|
|
|
longDescription = ''
|
|
|
|
This command-line utility can be used to manage applets and keys
|
|
|
|
on Java Cards. It is made available as the `gp` executable.
|
|
|
|
|
|
|
|
The executable requires the PC/SC daemon running for correct execution.
|
|
|
|
If you run NixOS, it can be enabled with `services.pcscd.enable = true;`.
|
|
|
|
'';
|
|
|
|
homepage = "https://github.com/martinpaljak/GlobalPlatformPro";
|
2022-06-16 17:23:12 +00:00
|
|
|
sourceProvenance = with sourceTypes; [
|
|
|
|
fromSource
|
2023-08-04 22:07:22 +00:00
|
|
|
binaryBytecode # deps
|
2022-06-16 17:23:12 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
license = with licenses; [ lgpl3 ];
|
|
|
|
maintainers = with maintainers; [ ekleog ];
|
2022-04-27 09:35:20 +00:00
|
|
|
mainProgram = "gp";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|