dotfiles/vcsh: populate nix store with dotfiles mirror
This commit is contained in:
parent
a71fe67e78
commit
e7f6744be5
5 changed files with 49 additions and 22 deletions
5
nix/scripts/pre-eval-fixed.sh
Executable file
5
nix/scripts/pre-eval-fixed.sh
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
INFILE="${1:?Please set arg1 to INFILE}"
|
||||
OUTFILE="${2:?Please set arg2 to OUTFILE}"
|
||||
hash=$(nix-build ${INFILE} --arg pkgs 'import <nixpkgs> {}' --arg config 'null' 2>&1 | grep -oE '[0-9a-z]{52}' | head -n1)
|
||||
sed -E "s/0{52}/${hash}/" ${INFILE} > ${OUTFILE}
|
Loading…
Add table
Add a link
Reference in a new issue