flake: add 'upcache' command
All checks were successful
continuous-integration/drone/push Build is passing

easy way to push dev env to cachix
This commit is contained in:
surtur 2022-05-21 19:41:43 +02:00
parent d0350962e9
commit 9f37caad91
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

@ -127,6 +127,15 @@
cd $(git rev-parse --show-toplevel)
go test ./...
'';
upcache = pkgs.writeShellScriptBin "upcache" ''
## refs:
## https://fzakaria.com/2020/08/11/caching-your-nix-shell.html
## https://nixos.wiki/wiki/Caching_nix_shell_build_inputs
nix-store --query --references $(nix-instantiate shell.nix) | \
xargs nix-store --realise | \
xargs nix-store --query --requisites | \
cachix push go-xkcdreader
'';
in
{
default = with pkgs; mkShell
@ -163,6 +172,7 @@
## ad-hoc cmds
gob
gota
upcache
gopls
gofumpt