summaryrefslogtreecommitdiff
path: root/pkgs
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2026-03-09 15:25:05 -0600
committerAlejandro Soto <alejandro@34project.org>2026-03-09 15:25:31 -0600
commitfc467dc475567cf8030d5b20aacf99f2afcbbe9e (patch)
treec9d86140482bd340f01b4ba309f9767010c9c9e5 /pkgs
parent2ae55b6ff17c2dc3e02f08611e9028cbe896dfd0 (diff)
trivionomicon: athena-bccr: add support for mirrors
Diffstat (limited to '')
-rw-r--r--pkgs/athena-bccr/default.nix3
-rw-r--r--pkgs/athena-bccr/unwrapped.nix16
2 files changed, 16 insertions, 3 deletions
diff --git a/pkgs/athena-bccr/default.nix b/pkgs/athena-bccr/default.nix
index c4a8575..038220b 100644
--- a/pkgs/athena-bccr/default.nix
+++ b/pkgs/athena-bccr/default.nix
@@ -1,6 +1,7 @@
{
callPackage,
lib,
+ mirror ? null,
}: let
latest = "deb64-rev26.2";
@@ -18,7 +19,7 @@
pkgsForRelease = release: let
inherit (unwrapped) card-driver bccr-cacerts;
- unwrapped = overrideUnwrapped {inherit release;} {};
+ unwrapped = overrideUnwrapped {inherit mirror release;} {};
pkcs11-module = "${card-driver.lib}/${card-driver.pkcs11-path}";
in {
inherit card-driver bccr-cacerts pkcs11-module;
diff --git a/pkgs/athena-bccr/unwrapped.nix b/pkgs/athena-bccr/unwrapped.nix
index 3a70144..a2b7722 100644
--- a/pkgs/athena-bccr/unwrapped.nix
+++ b/pkgs/athena-bccr/unwrapped.nix
@@ -1,5 +1,7 @@
{
+ fetchurl,
lib,
+ mirror ? null,
requireFile,
release,
gaudiHash ? null,
@@ -7,10 +9,20 @@
}: let
inherit (release) srcPaths vendor;
- src = requireFile {
- url = "https://soportefirmadigital.com";
+ url =
+ if mirror != null
+ then "${mirror}/${release.filename}"
+ else "https://soportefirmadigital.com";
+
+ fetchSrc =
+ if mirror != null
+ then fetchurl
+ else requireFile;
+
+ src = fetchSrc {
name = release.filename;
+ inherit url;
inherit (release) hash;
};