summaryrefslogtreecommitdiff
path: root/pkgs/athena-bccr/unwrapped.nix
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2025-08-24 18:55:06 -0600
committerAlejandro Soto <alejandro@34project.org>2025-08-24 18:55:06 -0600
commitd7ac88762db111a7962c4e14b5f4e37ab85ccac7 (patch)
tree0c2c8c4383bef74215e3b7c48a2f6b0117f084bc /pkgs/athena-bccr/unwrapped.nix
parent504589d1035f27b766bd33040b415b2725ece4ca (diff)
tree-wide: reformat using alejandra after enabling trivionomicon
Diffstat (limited to '')
-rw-r--r--pkgs/athena-bccr/unwrapped.nix157
1 files changed, 80 insertions, 77 deletions
diff --git a/pkgs/athena-bccr/unwrapped.nix b/pkgs/athena-bccr/unwrapped.nix
index 55ef107..d6f3f38 100644
--- a/pkgs/athena-bccr/unwrapped.nix
+++ b/pkgs/athena-bccr/unwrapped.nix
@@ -1,11 +1,10 @@
-{ lib
-, requireFile
-
-, release
-, gaudiHash ? null
-, ...
-}:
-let
+{
+ lib,
+ requireFile,
+ release,
+ gaudiHash ? null,
+ ...
+}: let
inherit (release) srcPaths;
src = requireFile {
@@ -15,40 +14,47 @@ let
inherit (release) hash;
};
- gaudiUpdateSrc = { update-gaudi }: requireFile {
- url = "${update-gaudi}";
- name = "gaudi-update-${release.name}.zip";
+ gaudiUpdateSrc = {update-gaudi}:
+ requireFile {
+ url = "${update-gaudi}";
+ name = "gaudi-update-${release.name}.zip";
- hash = gaudiHash;
- };
+ hash = gaudiHash;
+ };
- moduleFromDeb = name: args@{ stdenv, dpkg, unzip, srcPath, ... }:
+ moduleFromDeb = name: args @ {
+ stdenv,
+ dpkg,
+ unzip,
+ srcPath,
+ ...
+ }:
stdenv.mkDerivation ({
- pname = "${name}-unwrapped";
- version = release.name;
-
- inherit src;
-
- nativeBuildInputs = [ dpkg unzip ] ++ (args.nativeBuildInputs or [ ]);
-
- postUnpack = ''
- dpkg -x ${lib.escapeShellArg "${release.basename}/${srcPath}"} ${lib.escapeShellArg release.basename}
- '';
- } // lib.removeAttrs args [ "stdenv" "dpkg" "unzip" "srcPath" "nativeBuildInputs" ]);
-in
-{
- ase-idprotect =
- { autoPatchelfHook
- , dpkg
- , fontconfig
- , freetype
- , pcsclite
- , stdenv
- , unzip
- , xorg
- , zlib
- , ...
- }:
+ pname = "${name}-unwrapped";
+ version = release.name;
+
+ inherit src;
+
+ nativeBuildInputs = [dpkg unzip] ++ (args.nativeBuildInputs or []);
+
+ postUnpack = ''
+ dpkg -x ${lib.escapeShellArg "${release.basename}/${srcPath}"} ${lib.escapeShellArg release.basename}
+ '';
+ }
+ // lib.removeAttrs args ["stdenv" "dpkg" "unzip" "srcPath" "nativeBuildInputs"]);
+in {
+ ase-idprotect = {
+ autoPatchelfHook,
+ dpkg,
+ fontconfig,
+ freetype,
+ pcsclite,
+ stdenv,
+ unzip,
+ xorg,
+ zlib,
+ ...
+ }:
moduleFromDeb "ase-idprotect" {
inherit dpkg stdenv unzip;
srcPath = srcPaths.idprotect;
@@ -67,7 +73,7 @@ in
autoPatchelfHook
];
- outputs = [ "out" "lib" ];
+ outputs = ["out" "lib"];
installPhase = ''
runHook preInstall
@@ -85,28 +91,26 @@ in
'';
};
- gaudi =
- { autoPatchelfHook
- , dpkg
- , makeWrapper
- , openjdk
- , pkgs
- , stdenv
- , unzip
- , writeShellScriptBin
-
- , update-gaudi
- , ...
- }:
- let
- jdk = openjdk.override {
- enableJavaFX = true;
- openjfx_jdk = pkgs."openjfx${lib.head (lib.splitString "." openjdk.version)}".override { withWebKit = true; };
- };
-
- fakeSudo = writeShellScriptBin "sudo" "";
- gaudiUpdate = gaudiUpdateSrc { inherit update-gaudi; };
- in
+ gaudi = {
+ autoPatchelfHook,
+ dpkg,
+ makeWrapper,
+ openjdk,
+ pkgs,
+ stdenv,
+ unzip,
+ writeShellScriptBin,
+ update-gaudi,
+ ...
+ }: let
+ jdk = openjdk.override {
+ enableJavaFX = true;
+ openjfx_jdk = pkgs."openjfx${lib.head (lib.splitString "." openjdk.version)}".override {withWebKit = true;};
+ };
+
+ fakeSudo = writeShellScriptBin "sudo" "";
+ gaudiUpdate = gaudiUpdateSrc {inherit update-gaudi;};
+ in
moduleFromDeb "gaudi" {
inherit dpkg stdenv unzip;
srcPath = srcPaths.gaudi;
@@ -159,12 +163,12 @@ in
'';
};
- bccr-cacerts =
- { openssl
- , stdenv
- , unzip
- , ...
- }:
+ bccr-cacerts = {
+ openssl,
+ stdenv,
+ unzip,
+ ...
+ }:
stdenv.mkDerivation {
pname = "bccr-cacerts";
version = release.name;
@@ -182,14 +186,13 @@ in
'';
};
- update-gaudi =
- { wget
- , writeShellScript
- , zip
-
- , bccr-cacerts
- , ...
- }:
+ update-gaudi = {
+ wget,
+ writeShellScript,
+ zip,
+ bccr-cacerts,
+ ...
+ }:
writeShellScript "update-gaudi" ''
set -o errexit
set -o pipefail
@@ -199,7 +202,7 @@ in
trap 'cd / && rm -rf -- "$temp_dir"' EXIT
cd "$temp_dir"
- PATH="${lib.makeBinPath [ wget zip ]}:$PATH"
+ PATH="${lib.makeBinPath [wget zip]}:$PATH"
ca_cert="${bccr-cacerts}/root-ca.pem"
base_url="https://www.firmadigital.go.cr/Bccr.Firma.Fva.Actualizador.ClienteFirmadorJava//recursosLiberica17/actualizador"