Files
hearth/package/with-attic-cache/default.nix
T
yukkop 6dc2391b13
runner nix smoke / nix label and flake smoke (push) Failing after 8s
feat: workflow save to cache
2026-09-09 15:05:34 +00:00

39 lines
879 B
Nix

{ attic-client
, coreutils
, dash
, gnused
, hectic
, lib
, nix
, util-linux
}:
let
shell = "${dash}/bin/dash";
in
hectic.writeShellApplication {
inherit shell;
bashOptions = [
"errexit"
"nounset"
];
excludeShellChecks = [ "SC2039" "SC2329" ];
name = "with-attic-cache";
runtimeInputs = [ attic-client coreutils gnused nix util-linux ];
text = ''
ATTIC_BIN_DEFAULT=${attic-client}/bin/attic
COREUTILS_BIN_DEFAULT=${coreutils}/bin
HOOK_SHELL_DEFAULT=${dash}/bin/dash
NIX_BIN_DEFAULT=${nix}/bin/nix
SETSID_BIN_DEFAULT=${util-linux}/bin/setsid
TIMEOUT_BIN_DEFAULT=${coreutils}/bin/timeout
${builtins.readFile ./with-attic-cache.sh}
'';
meta = {
description = "Run a Nix command while asynchronously uploading new build outputs to Attic";
mainProgram = "with-attic-cache";
platforms = lib.platforms.linux;
};
}