diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | nix_path_env | 1 | ||||
-rwxr-xr-x | scripts/make-env | 5 | ||||
-rwxr-xr-x | scripts/nix_infos | 10 |
4 files changed, 16 insertions, 1 deletions
@@ -1 +1,2 @@ | |||
1 | /result* | 1 | /result* |
2 | /versions_log | ||
diff --git a/nix_path_env b/nix_path_env index 0ec2387..cfe37e6 100644 --- a/nix_path_env +++ b/nix_path_env | |||
@@ -9,4 +9,3 @@ fi | |||
9 | nixpkgsPrevious="$nixpkgs" | 9 | nixpkgsPrevious="$nixpkgs" |
10 | nixpkgsNext="$nixpkgs" | 10 | nixpkgsNext="$nixpkgs" |
11 | export NIX_PATH="nixpkgs=$nixpkgs:nixpkgsNext=$nixpkgsNext:nixpkgsPrevious=$nixpkgsPrevious" | 11 | export NIX_PATH="nixpkgs=$nixpkgs:nixpkgsNext=$nixpkgsNext:nixpkgsPrevious=$nixpkgsPrevious" |
12 | |||
diff --git a/scripts/make-env b/scripts/make-env index fc52adc..ebb1eed 100755 --- a/scripts/make-env +++ b/scripts/make-env | |||
@@ -4,3 +4,8 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | |||
4 | 4 | ||
5 | source $(dirname $DIR)/nix_path_env | 5 | source $(dirname $DIR)/nix_path_env |
6 | nix-env -r -i -A myEnvironments.immae-eu -f "<nixpkgs>" "$@" | 6 | nix-env -r -i -A myEnvironments.immae-eu -f "<nixpkgs>" "$@" |
7 | |||
8 | cat >> $(dirname $DIR)/versions_log <<EOF | ||
9 | # Ran $(date) with args "$@" | ||
10 | $($DIR/nix_infos | sed -e "s/^/# /") | ||
11 | EOF | ||
diff --git a/scripts/nix_infos b/scripts/nix_infos new file mode 100755 index 0000000..f824305 --- /dev/null +++ b/scripts/nix_infos | |||
@@ -0,0 +1,10 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
4 | |||
5 | source $(dirname $DIR)/nix_path_env | ||
6 | version=$(nix eval --raw nixpkgs.lib.version) | ||
7 | mainversion=$(echo $version | cut -d"." -f -2) | ||
8 | |||
9 | echo "https://releases.nixos.org/nixos/$mainversion/nixos-$version/nixexprs.tar.xz" | ||
10 | nix eval --raw nixpkgs.bc.meta.position | cut -d"/" -f-4 | ||