nix,steveej-t480s-work: introduce pure versioning
This commit is contained in:
parent
17c8ccb8c2
commit
c5c4b160a1
12 changed files with 55 additions and 13 deletions
|
@ -1,5 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
set -xe
|
||||
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)
|
||||
hash=$(nix-build ${INFILE} --arg pkgs 'import <channels-nixos-stable> {}' --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