5 , stripJavaArchivesHook
22 pname = "cie-middleware-linux";
25 src = fetchFromGitHub {
29 sha256 = "sha256-M3Xwg3G2ZZhPRV7uhFVXQPyvuuY4zI5Z+D/Dt26KVM0=";
34 # Shared libraries needed by the Java application
35 libraries = lib.makeLibraryPath [ ghostscript ];
40 inherit pname src version;
42 hardeningDisable = [ "format" ];
63 patches = [ ./use-system-podofo.patch ];
66 # substitute the cieid command with this $out/bin/cieid
67 substituteInPlace libs/pkcs11/src/CSP/AbilitaCIE.cpp \
68 --replace 'file = "cieid"' 'file = "'$out'/bin/cieid"'
71 # Note: we use pushd/popd to juggle between the
72 # libraries and the Java application builds.
73 preConfigure = "pushd libs";
75 mitmCache = gradle.fetchDeps {
81 "-Dorg.gradle.java.home=${jre}"
82 "--build-file" "cie-java/build.gradle"
85 gradleBuildTask = "standalone";
114 # Install the Java application
115 install -Dm755 cie-java/build/libs/CIEID-standalone.jar \
116 "$out/share/cieid/cieid.jar"
120 makeWrapper "${jre}/bin/java" "$out/bin/cieid" \
121 --add-flags "-Djna.library.path='$out/lib:${libraries}'" \
122 --add-flags '-Dawt.useSystemAAFontSettings=on' \
123 --add-flags "-cp $out/share/cieid/cieid.jar" \
124 --add-flags "it.ipzs.cieid.MainApplication"
126 # Install other files
127 install -Dm644 data/cieid.desktop "$out/share/applications/cieid.desktop"
128 install -Dm755 data/logo.png "$out/share/pixmaps/cieid.png"
129 install -Dm644 LICENSE "$out/share/licenses/cieid/LICENSE"
132 preGradleUpdate = "cd ../..";
135 homepage = "https://github.com/M0Rf30/cie-middleware-linux";
136 description = "Middleware for the Italian Electronic Identity Card (CIE)";
138 Software for the usage of the Italian Electronic Identity Card (CIE).
139 Access to PA services, signing and verification of documents
141 Warning: this is an unofficial fork because the original software, as
142 distributed by the Italian government, is essentially lacking a build
143 system and is in violation of the license of the PoDoFo library.
145 license = licenses.bsd3;
146 platforms = platforms.unix;
147 # Note: fails due to a lot of broken type conversions
148 badPlatforms = platforms.darwin;
149 maintainers = with maintainers; [ rnhmjoj ];