diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-12-13 21:25:24 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-05-24 01:40:13 +0200 |
commit | 24fd1fe6c62b7a9fc347794fde043285da272f5c (patch) | |
tree | 65557bf1d241ca389b619dbd24d18d51932ee030 /scripts | |
download | NUR-24fd1fe6c62b7a9fc347794fde043285da272f5c.tar.gz NUR-24fd1fe6c62b7a9fc347794fde043285da272f5c.tar.zst NUR-24fd1fe6c62b7a9fc347794fde043285da272f5c.zip |
Initial commit published for NUR
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/make-env | 11 | ||||
-rwxr-xr-x | scripts/nix_infos | 10 |
2 files changed, 21 insertions, 0 deletions
diff --git a/scripts/make-env b/scripts/make-env new file mode 100755 index 00000000..ebb1eed2 --- /dev/null +++ b/scripts/make-env | |||
@@ -0,0 +1,11 @@ | |||
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 | 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 00000000..f824305e --- /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 | ||