summaryrefslogtreecommitdiff
path: root/trivionomicon/pkgs/athena-bccr/unwrapped.nix
diff options
context:
space:
mode:
Diffstat (limited to 'trivionomicon/pkgs/athena-bccr/unwrapped.nix')
-rw-r--r--trivionomicon/pkgs/athena-bccr/unwrapped.nix58
1 files changed, 57 insertions, 1 deletions
diff --git a/trivionomicon/pkgs/athena-bccr/unwrapped.nix b/trivionomicon/pkgs/athena-bccr/unwrapped.nix
index e2e0bbd..c7781e4 100644
--- a/trivionomicon/pkgs/athena-bccr/unwrapped.nix
+++ b/trivionomicon/pkgs/athena-bccr/unwrapped.nix
@@ -9,7 +9,7 @@
src = requireFile {
url = "https://soportefirmadigital.com";
- name = "${release.basename}.zip";
+ name = release.filename;
inherit (release) hash;
};
@@ -92,6 +92,59 @@
passthru.pkcs11-path = "lib/x64-athena/libASEP11.so";
};
+
+ scmiddleware = {
+ autoPatchelfHook,
+ dpkg,
+ glib,
+ gtk3,
+ libappindicator-gtk3,
+ libnotify,
+ openssl,
+ pcsclite,
+ stdenv,
+ unzip,
+ webkitgtk_4_1,
+ ...
+ }:
+ moduleFromDeb "idopte-scmiddleware" {
+ inherit dpkg stdenv unzip;
+ srcPath = srcPaths.idopte;
+
+ buildInputs = [
+ glib
+ gtk3
+ libappindicator-gtk3
+ libnotify
+ openssl
+ pcsclite
+ stdenv.cc.cc.lib
+ webkitgtk_4_1
+ ];
+
+ nativeBuildInputs = [
+ autoPatchelfHook
+ ];
+
+ outputs = ["out" "lib"];
+
+ installPhase = ''
+ runHook preInstall
+
+ install -m755 -d $out/bin $lib/{etc,lib/SCMiddleware}
+ install -m755 usr/lib/SCMiddleware/{idocachesrv,SCManager} $out/bin
+ install -m755 usr/lib/SCMiddleware/*.so $lib/lib/SCMiddleware
+ cp -r etc/id* $lib/etc
+
+ runHook postInstall
+ '';
+
+ preFixup = ''
+ patchelf --set-rpath $lib/lib/SCMiddleware $lib/lib/SCMiddleware/* $out/bin/*
+ '';
+
+ passthru.pkcs11-path = "lib/SCMiddleware/libidop11.so";
+ };
in
{
gaudi = {
@@ -230,3 +283,6 @@ in
// lib.optionalAttrs (vendor == "athena") {
card-driver = ase-idprotect;
}
+ // lib.optionalAttrs (vendor == "idopte") {
+ card-driver = scmiddleware;
+ }