From 630934a2631d9429b4e46c1b6ec0f6640f332384 Mon Sep 17 00:00:00 2001 From: seth Date: Mon, 22 May 2023 02:35:15 -0400 Subject: !hercules-ci -> hydra --- hosts/atlas/cachix.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 hosts/atlas/cachix.nix (limited to 'hosts/atlas/cachix.nix') diff --git a/hosts/atlas/cachix.nix b/hosts/atlas/cachix.nix new file mode 100644 index 0000000..1dc1830 --- /dev/null +++ b/hosts/atlas/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 + ''; +} -- cgit v1.2.3