diff options
| author | Alejandro Soto <alejandro@34project.org> | 2025-08-02 20:31:01 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2025-08-02 20:31:27 -0600 |
| commit | 789a5a9563f1c3e5270205d39d9eece50909b739 (patch) | |
| tree | d606e0d8ccf7f5a9372448d6ed9a429667f91195 | |
| parent | 565089cfa6fe3b102d63d17ec1ad488be223326e (diff) | |
pkgs/athena-bccr: split ase-idprotect bin and lib outputs
Diffstat (limited to '')
| -rw-r--r-- | pkgs/athena-bccr/default.nix | 5 | ||||
| -rw-r--r-- | pkgs/athena-bccr/gaudi-env.nix | 2 | ||||
| -rw-r--r-- | pkgs/athena-bccr/unwrapped.nix | 10 | ||||
| -rw-r--r-- | sys/hardware/athena.nix | 14 |
4 files changed, 19 insertions, 12 deletions
diff --git a/pkgs/athena-bccr/default.nix b/pkgs/athena-bccr/default.nix index cda0b62..f9276c1 100644 --- a/pkgs/athena-bccr/default.nix +++ b/pkgs/athena-bccr/default.nix @@ -17,11 +17,12 @@ let pkgsForRelease = release: let - libasep11 = "${unwrapped.ase-idprotect}/lib/x64-athena/libASEP11.so"; + ase-pkcs11 = unwrapped.ase-idprotect.lib; + libasep11 = "${ase-pkcs11}/lib/x64-athena/libASEP11.so"; unwrapped = overrideUnwrapped { inherit release; } { }; in { - inherit libasep11; + inherit ase-pkcs11 libasep11; inherit (unwrapped) ase-idprotect bccr-cacerts; gaudi = callPackage ./gaudi-env.nix { inherit unwrapped; }; diff --git a/pkgs/athena-bccr/gaudi-env.nix b/pkgs/athena-bccr/gaudi-env.nix index 0b98e08..1ced54e 100644 --- a/pkgs/athena-bccr/gaudi-env.nix +++ b/pkgs/athena-bccr/gaudi-env.nix @@ -13,7 +13,7 @@ buildFHSEnv { name = "gaudi"; targetPkgs = pkgs: [ - unwrappedWithGaudi.ase-idprotect + unwrappedWithGaudi.ase-idprotect.lib unwrappedWithGaudi.gaudi (writeShellScriptBin "launch-gaudi" '' diff --git a/pkgs/athena-bccr/unwrapped.nix b/pkgs/athena-bccr/unwrapped.nix index 200e998..55ef107 100644 --- a/pkgs/athena-bccr/unwrapped.nix +++ b/pkgs/athena-bccr/unwrapped.nix @@ -67,19 +67,21 @@ in autoPatchelfHook ]; + outputs = [ "out" "lib" ]; + installPhase = '' runHook preInstall - install -m755 -d $out/{bin,etc,lib/x64-athena} + install -m755 -d $out/bin $lib/{etc,lib/x64-athena} install -m755 usr/bin/IDProtect{_Manager,PINTool} $out/bin/ - install -m755 usr/lib/x64-athena/* $out/lib/x64-athena - cp -r etc/Athena $out/etc/Athena + install -m755 usr/lib/x64-athena/* $lib/lib/x64-athena + cp -r etc/Athena $lib/etc/Athena runHook postInstall ''; preFixup = '' - patchelf --set-rpath $out/lib/x64-athena $out/bin/* + patchelf --set-rpath $lib/lib/x64-athena $out/bin/* ''; }; diff --git a/sys/hardware/athena.nix b/sys/hardware/athena.nix index b9a230b..9df7aac 100644 --- a/sys/hardware/athena.nix +++ b/sys/hardware/athena.nix @@ -16,12 +16,16 @@ in }; config = mkIf cfg.enable { - environment.etc = { - "Athena".source = "${athena.ase-idprotect}/etc/Athena"; + environment = { + etc = { + "Athena".source = "${athena.ase-pkcs11}/etc/Athena"; - "pkcs11/modules/asep11".text = '' - module: ${athena.libasep11} - ''; + "pkcs11/modules/asep11".text = '' + module: ${athena.libasep11} + ''; + }; + + systemPackages = [ athena.ase-pkcs11 ]; }; services = { |
