summaryrefslogtreecommitdiff
path: root/pkgs/athena-bccr/unwrapped.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/athena-bccr/unwrapped.nix')
-rw-r--r--pkgs/athena-bccr/unwrapped.nix157
1 files changed, 77 insertions, 80 deletions
diff --git a/pkgs/athena-bccr/unwrapped.nix b/pkgs/athena-bccr/unwrapped.nix
index d6f3f38..55ef107 100644
--- a/pkgs/athena-bccr/unwrapped.nix
+++ b/pkgs/athena-bccr/unwrapped.nix
@@ -1,10 +1,11 @@
-{
- lib,
- requireFile,
- release,
- gaudiHash ? null,
- ...
-}: let
+{ lib
+, requireFile
+
+, release
+, gaudiHash ? null
+, ...
+}:
+let
inherit (release) srcPaths;
src = requireFile {
@@ -14,47 +15,40 @@
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;
@@ -73,7 +67,7 @@ in {
autoPatchelfHook
];
- outputs = ["out" "lib"];
+ outputs = [ "out" "lib" ];
installPhase = ''
runHook preInstall
@@ -91,26 +85,28 @@ 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;
@@ -163,12 +159,12 @@ in {
'';
};
- bccr-cacerts = {
- openssl,
- stdenv,
- unzip,
- ...
- }:
+ bccr-cacerts =
+ { openssl
+ , stdenv
+ , unzip
+ , ...
+ }:
stdenv.mkDerivation {
pname = "bccr-cacerts";
version = release.name;
@@ -186,13 +182,14 @@ in {
'';
};
- update-gaudi = {
- wget,
- writeShellScript,
- zip,
- bccr-cacerts,
- ...
- }:
+ update-gaudi =
+ { wget
+ , writeShellScript
+ , zip
+
+ , bccr-cacerts
+ , ...
+ }:
writeShellScript "update-gaudi" ''
set -o errexit
set -o pipefail
@@ -202,7 +199,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"