Created
November 27, 2020 14:27
-
-
Save zimbatm/aad9571e788f38108d085c64254fb951 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: nixpkgs/cachix-flakes:nixos-20.03 | |
build: | |
before_script: | |
- mkdir -p /etc/nix | |
- echo "experimental-features = nix-command flakes ca-references recursive-nix" >> /etc/nix/nix.conf | |
- cachix use numtide | |
- nix path-info --all > /tmp/store-path-pre-build | |
script: | |
- nix flake check | |
after_script: | |
- nix develop -c ./cachix-upload.sh /tmp/store-path-pre-build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euo pipefail | |
echo "Pushing paths" | |
comm -13 \ | |
<(sort "$1" | grep -v '\.drv$') \ | |
<(nix path-info --all | grep -v '\.drv$' | sort) \ | |
| cachix push numtide | |
echo "Pushing flake archives" | |
nix flake archive --json \ | |
| jq -r '.path,(.inputs|to_entries[].value.path)' \ | |
| cachix push numtide |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment