Merge remote-tracking branch 'ni/master'
This commit is contained in:
commit
9fc1e0fba2
|
@ -1,2 +1,3 @@
|
||||||
- /.git
|
- /.git
|
||||||
- /.graveyard
|
- /.graveyard
|
||||||
|
P /.version-suffix
|
||||||
|
|
|
@ -13,12 +13,12 @@ in
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "populate";
|
name = "populate";
|
||||||
version = "1.2.2";
|
version = "1.2.3";
|
||||||
|
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = http://cgit.ni.krebsco.de/populate;
|
url = http://cgit.ni.krebsco.de/populate;
|
||||||
rev = "refs/tags/v${version}";
|
rev = "refs/tags/v${version}";
|
||||||
sha256 = "041rpyhss6kby3jm14k7lhvagmg7hwvwxli06b00p76s110is40w";
|
sha256 = "14p9v28d5vcr5384qgycmgjh1angi2zx7qvi51651i7nd9qkjzmi";
|
||||||
};
|
};
|
||||||
|
|
||||||
phases = [
|
phases = [
|
||||||
|
|
13
shell.nix
13
shell.nix
|
@ -9,6 +9,7 @@ let
|
||||||
# usage: deploy
|
# usage: deploy
|
||||||
# [--force-populate]
|
# [--force-populate]
|
||||||
# [--quiet]
|
# [--quiet]
|
||||||
|
# [--source=PATH]
|
||||||
# --system=SYSTEM
|
# --system=SYSTEM
|
||||||
# [--target=TARGET]
|
# [--target=TARGET]
|
||||||
# [--user=USER]
|
# [--user=USER]
|
||||||
|
@ -20,6 +21,7 @@ let
|
||||||
\test -n "''${quiet-}" || quiet=false
|
\test -n "''${quiet-}" || quiet=false
|
||||||
\test -n "''${target-}" || target=$system
|
\test -n "''${target-}" || target=$system
|
||||||
\test -n "''${user-}" || user=$LOGNAME
|
\test -n "''${user-}" || user=$LOGNAME
|
||||||
|
\test -n "''${source_file}" || source_file=$user/1systems/$system/source.nix
|
||||||
. ${init.env}
|
. ${init.env}
|
||||||
. ${init.proxy}
|
. ${init.proxy}
|
||||||
|
|
||||||
|
@ -29,6 +31,7 @@ let
|
||||||
# usage: install
|
# usage: install
|
||||||
# [--force-populate]
|
# [--force-populate]
|
||||||
# [--quiet]
|
# [--quiet]
|
||||||
|
# [--source=PATH]
|
||||||
# --system=SYSTEM
|
# --system=SYSTEM
|
||||||
# --target=TARGET
|
# --target=TARGET
|
||||||
# [--user=USER]
|
# [--user=USER]
|
||||||
|
@ -39,6 +42,7 @@ let
|
||||||
. ${init.args}
|
. ${init.args}
|
||||||
\test -n "''${quiet-}" || quiet=false
|
\test -n "''${quiet-}" || quiet=false
|
||||||
\test -n "''${user-}" || user=$LOGNAME
|
\test -n "''${user-}" || user=$LOGNAME
|
||||||
|
\test -n "''${source_file}" || source_file=$user/1systems/$system/source.nix
|
||||||
. ${init.env}
|
. ${init.env}
|
||||||
|
|
||||||
if \test "''${using_proxy-}" != true; then
|
if \test "''${using_proxy-}" != true; then
|
||||||
|
@ -76,6 +80,7 @@ let
|
||||||
# usage: test
|
# usage: test
|
||||||
# [--force-populate]
|
# [--force-populate]
|
||||||
# [--quiet]
|
# [--quiet]
|
||||||
|
# [--source=PATH]
|
||||||
# --system=SYSTEM
|
# --system=SYSTEM
|
||||||
# --target=TARGET
|
# --target=TARGET
|
||||||
# [--user=USER]
|
# [--user=USER]
|
||||||
|
@ -88,6 +93,7 @@ let
|
||||||
. ${init.args}
|
. ${init.args}
|
||||||
\test -n "''${quiet-}" || quiet=false
|
\test -n "''${quiet-}" || quiet=false
|
||||||
\test -n "''${user-}" || user=$LOGNAME
|
\test -n "''${user-}" || user=$LOGNAME
|
||||||
|
\test -n "''${source_file}" || source_file=$user/1systems/$system/source.nix
|
||||||
. ${init.env}
|
. ${init.env}
|
||||||
. ${init.proxy}
|
. ${init.proxy}
|
||||||
|
|
||||||
|
@ -160,14 +166,16 @@ let
|
||||||
init.args = pkgs.writeText "init.args" /* sh */ ''
|
init.args = pkgs.writeText "init.args" /* sh */ ''
|
||||||
args=$(${pkgs.utillinux}/bin/getopt -n "$command" -s sh \
|
args=$(${pkgs.utillinux}/bin/getopt -n "$command" -s sh \
|
||||||
-o Qs:t:u: \
|
-o Qs:t:u: \
|
||||||
-l force-populate,quiet,system:,target:,user: \
|
-l force-populate,quiet,source:,system:,target:,user: \
|
||||||
-- "$@")
|
-- "$@")
|
||||||
if \test $? != 0; then exit 1; fi
|
if \test $? != 0; then exit 1; fi
|
||||||
eval set -- "$args"
|
eval set -- "$args"
|
||||||
force_populate=false
|
force_populate=false
|
||||||
|
source_file=
|
||||||
while :; do case $1 in
|
while :; do case $1 in
|
||||||
--force-populate) force_populate=true; shift;;
|
--force-populate) force_populate=true; shift;;
|
||||||
-Q|--quiet) quiet=true; shift;;
|
-Q|--quiet) quiet=true; shift;;
|
||||||
|
--source) source_file=$2; shift 2;;
|
||||||
-s|--system) system=$2; shift 2;;
|
-s|--system) system=$2; shift 2;;
|
||||||
-t|--target) target=$2; shift 2;;
|
-t|--target) target=$2; shift 2;;
|
||||||
-u|--user) user=$2; shift 2;;
|
-u|--user) user=$2; shift 2;;
|
||||||
|
@ -196,7 +204,6 @@ let
|
||||||
init.proxy = pkgs.writeText "init.proxy" /* sh */ ''
|
init.proxy = pkgs.writeText "init.proxy" /* sh */ ''
|
||||||
if \test "''${using_proxy-}" != true; then
|
if \test "''${using_proxy-}" != true; then
|
||||||
|
|
||||||
source_file=$user/1systems/$system/source.nix
|
|
||||||
source=$(get-source "$source_file")
|
source=$(get-source "$source_file")
|
||||||
qualified_target=$target_user@$target_host:$target_port$target_path
|
qualified_target=$target_user@$target_host:$target_port$target_path
|
||||||
if \test "$force_populate" = true; then
|
if \test "$force_populate" = true; then
|
||||||
|
@ -269,7 +276,7 @@ in pkgs.stdenv.mkDerivation {
|
||||||
name = "stockholm";
|
name = "stockholm";
|
||||||
shellHook = /* sh */ ''
|
shellHook = /* sh */ ''
|
||||||
export OLD_PATH="$PATH"
|
export OLD_PATH="$PATH"
|
||||||
export NIX_PATH=stockholm=$PWD:nixpkgs=${toString <nixpkgs>}
|
export NIX_PATH=stockholm=${toString ./.}:nixpkgs=${toString <nixpkgs>}
|
||||||
if test -e /nix/var/nix/daemon-socket/socket; then
|
if test -e /nix/var/nix/daemon-socket/socket; then
|
||||||
export NIX_REMOTE=daemon
|
export NIX_REMOTE=daemon
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user