Nix: Make less annoying.

This commit is contained in:
Dmitry Voronin 2024-12-17 09:24:13 +03:00
parent 77fc59f744
commit 6c998e51a5
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k

View file

@ -27,7 +27,7 @@
pkgs+=("nixpkgs#''${pkg}") pkgs+=("nixpkgs#''${pkg}")
done done
SHELL_NAME="''${tag}" NIXPKGS_ALLOW_UNFREE=1 nix shell --impure ''${pkgs[@]} SHELL_NAME="''${tag}" NIXPKGS_ALLOW_INSECURE=1 NIXPKGS_ALLOW_UNFREE=1 nix shell --impure ''${pkgs[@]}
} }
function nix_depends() { function nix_depends() {
@ -48,7 +48,7 @@
[[ "''${cmd}" = "" ]] && cmd="''${pkg}" [[ "''${cmd}" = "" ]] && cmd="''${pkg}"
SHELL_NAME="''${pkg}" NIXPKGS_ALLOW_UNFREE=1 nix shell --impure github:NixOS/nixpkgs/''${rev}#''${pkg} -c ''${cmd} SHELL_NAME="''${pkg}" NIXPKGS_ALLOW_INSECURE=1 NIXPKGS_ALLOW_UNFREE=1 nix shell --impure github:NixOS/nixpkgs/''${rev}#''${pkg} -c ''${cmd}
} }
# Prefetch to nix store. # Prefetch to nix store.
@ -83,7 +83,7 @@
fi fi
local name=''${*##*#} local name=''${*##*#}
SHELL_NAME="''${name}" NIXPKGS_ALLOW_UNFREE=1 nix --option max-jobs $(_core_count) --builders "" --substituters https://cache.nixos.org shell --impure ''${@} SHELL_NAME="''${name}" NIXPKGS_ALLOW_INSECURE=1 NIXPKGS_ALLOW_UNFREE=1 nix --option max-jobs $(_core_count) --builders "" --substituters https://cache.nixos.org shell --impure ''${@}
} }
''; '';
} }