]> git.immae.eu Git - perso/Immae/Config/Nix/NUR.git/commitdiff
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>
Fri, 24 Apr 2020 22:04:20 +0000 (00:04 +0200)
nix_path_env

index 901cd693d3bf9beb3baa8e16fc07b6ce2b8fbdee..19f7ccaf5ddda3e94db79ae4eda8c08b0f58ebeb 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 "$@"
+}