From d7ac88762db111a7962c4e14b5f4e37ab85ccac7 Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Sun, 24 Aug 2025 18:55:06 -0600 Subject: tree-wide: reformat using alejandra after enabling trivionomicon --- pkgs/athena-bccr/unwrapped.nix | 157 +++++++++++++++++++++-------------------- 1 file changed, 80 insertions(+), 77 deletions(-) (limited to 'pkgs/athena-bccr/unwrapped.nix') 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" -- cgit v1.2.3