Build nixops_custom on the fly
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Fri, 24 May 2019 11:55:43 +0000 (13:55 +0200)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Mon, 27 May 2019 22:40:06 +0000 (00:40 +0200)
nix_path_env

index 901cd69..19f7cca 100644 (file)
@@ -9,3 +9,9 @@ fi
 nixpkgsPrevious="$nixpkgs"
 nixpkgsNext="$nixpkgs"
 export NIX_PATH="nixpkgs=$nixpkgs:nixpkgsNext=$nixpkgsNext:nixpkgsPrevious=$nixpkgsPrevious"
+
+nixops_custom () {
+  DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
+  d=$(nix-build --no-out-link -E "with import <nixpkgs> { overlays = builtins.attrValues (import $DIR/overlays); }; nixops")
+  ${d}/bin/nixops "$@"
+}