javacard-devkit: allow overriding the java binary (#45416)
This commit is contained in:
parent
8d5c22c989
commit
1cbc8c1e57
@ -35,6 +35,7 @@ stdenv.mkDerivation rec {
|
|||||||
*.so) install -vD "$i" "$out/libexec/$pname/$(basename "$i")";;
|
*.so) install -vD "$i" "$out/libexec/$pname/$(basename "$i")";;
|
||||||
*) target="$out/bin/$(basename "$i")"
|
*) target="$out/bin/$(basename "$i")"
|
||||||
install -vD "$i" "$target"
|
install -vD "$i" "$target"
|
||||||
|
sed -i -e 's|^$JAVA_HOME/bin/java|''${JAVA:-$JAVA_HOME/bin/java}|' "$target"
|
||||||
wrapProgram "$target" \
|
wrapProgram "$target" \
|
||||||
--set JAVA_HOME "$JAVA_HOME" \
|
--set JAVA_HOME "$JAVA_HOME" \
|
||||||
--prefix CLASSPATH : "$out/share/$pname/api_export_files"
|
--prefix CLASSPATH : "$out/share/$pname/api_export_files"
|
||||||
@ -55,7 +56,9 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
First, compile your '.java' (NixOS-specific: you should not need to set the class path -- if you need, it's a bug):
|
First, compile your '.java' (NixOS-specific: you should not need to set the class path -- if you need, it's a bug):
|
||||||
javacardc -source 1.5 -target 1.5 [MyJavaFile].java
|
javacardc -source 1.5 -target 1.5 [MyJavaFile].java
|
||||||
Then, convert the '.class' file into a '.cap':
|
Then, test with 'jcwde' (NixOS-specific: you can change the java version used to run jcwde with eg. JAVA=jdb):
|
||||||
|
CLASSPATH=. jcwde [MyJcwdeConfig].app & sleep 1 && apdutool [MyApdus].apdu
|
||||||
|
Finally, convert the '.class' file into a '.cap':
|
||||||
converter -applet [AppletAID] [MyApplet] [myPackage] [PackageAID] [Version]
|
converter -applet [AppletAID] [MyApplet] [myPackage] [PackageAID] [Version]
|
||||||
For more details, please refer to the documentation by Oracle
|
For more details, please refer to the documentation by Oracle
|
||||||
'';
|
'';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user