From d24cb6ae110e0c55e35c0a8bdbd04b884e1a0957 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Sat, 6 Jul 2024 22:54:08 +0300 Subject: [PATCH] varname + parallel citation --- pkgs/compress-drv/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/compress-drv/default.nix b/pkgs/compress-drv/default.nix index 254a0ef..2925fe9 100644 --- a/pkgs/compress-drv/default.nix +++ b/pkgs/compress-drv/default.nix @@ -53,14 +53,18 @@ Inputs: "compressor-${ext} needs to have exactly one '{}', found ${builtins.toString matches}"; compressorMap = lib.filterAttrs (k: _: (lib.hasPrefix "compressor-" k)) args; mkCmd = ext: prog: let - fname = builtins.replaceStrings ["{}"] ["\"$fname\""] prog; + cmdline = builtins.replaceStrings ["{}"] ["\"$fname\""] prog; in - assert validProg ext prog; "${parallel}/bin/sem --id $$ -P$NIX_BUILD_CORES ${fname}"; + assert validProg ext prog; "${parallel}/bin/sem --id $$ -P$NIX_BUILD_CORES ${cmdline}"; formatsPipe = builtins.concatStringsSep "|" formats; in runCommand "${drv.name}-compressed" {} '' mkdir $out + export PARALLEL_HOME=$(mktemp -d) + # Displaying the citation notice once per run of compressDrv is fair game + echo will cite | ${parallel}/bin/parallel --citation + ${xorg.lndir}/bin/lndir ${drv}/ $out/ while IFS= read -d "" -r fname; do