diff options
| author | seth <[email protected]> | 2023-05-22 02:35:15 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2023-05-23 11:05:28 -0400 |
| commit | 630934a2631d9429b4e46c1b6ec0f6640f332384 (patch) | |
| tree | d8bd14cafb0ac382625bc5dca79b84d497e9bab7 /hosts/p-body/cachix.nix | |
| parent | 2cb6cfab9553184c1e6a10303cb832fe96080d00 (diff) | |
!hercules-ci -> hydra
Diffstat (limited to 'hosts/p-body/cachix.nix')
| -rw-r--r-- | hosts/p-body/cachix.nix | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/hosts/p-body/cachix.nix b/hosts/p-body/cachix.nix new file mode 100644 index 0000000..1dc1830 --- /dev/null +++ b/hosts/p-body/cachix.nix @@ -0,0 +1,18 @@ +{pkgs, ...}: let + uploadToCachix = pkgs.writeScriptBin "upload-to-cachix" '' + #!/bin/sh + set -euf + + OUT_END=$(echo ''${OUT_PATHS: -10}) + if [ "$OUT_END" == "-spec.json" ]; then + exit 0 + fi + + export HOME=/root + exec ${pkgs.cachix}/bin/cachix -c /etc/cachix/cachix.dhall push getchoo $OUT_PATHS > /tmp/hydra_cachix 2>&1 + ''; +in { + nix.extraOptions = '' + post-build-hook = ${uploadToCachix}/bin/upload-to-cachix + ''; +} |
