pkgs: diff-flake: quote attribute names

Since we don't know if they contain `.` or other characters that might
need quoting.
This commit is contained in:
Bruno BELANYI 2023-03-16 11:47:18 +00:00
parent 66fc43f7ca
commit 08740e846f

View file

@ -26,15 +26,15 @@ current_system() {
add_shell() { add_shell() {
# Use 'inputDerivation' attribute to make sure that it is build-able # Use 'inputDerivation' attribute to make sure that it is build-able
FLAKE_OUTPUTS+=("devShells.$(current_system).\"$1\".inputDerivation") FLAKE_OUTPUTS+=("devShells.\"$(current_system)\".\"$1\".inputDerivation")
} }
add_home() { add_home() {
FLAKE_OUTPUTS+=("homeConfigurations.$1.activationPackage") FLAKE_OUTPUTS+=("homeConfigurations.\"$1\".activationPackage")
} }
add_host() { add_host() {
FLAKE_OUTPUTS+=("nixosConfigurations.$1.config.system.build.toplevel") FLAKE_OUTPUTS+=("nixosConfigurations.\"$1\".config.system.build.toplevel")
} }
usage() { usage() {
@ -151,7 +151,7 @@ list_nixos_configurations() {
} }
list_dev_shells() { list_dev_shells() {
nix eval ".#devShells.$(current_system)" \ nix eval ".#devShells.\"$(current_system)\"" \
--apply 'attrs: with builtins; concatStringsSep "\n" (attrNames attrs)' \ --apply 'attrs: with builtins; concatStringsSep "\n" (attrNames attrs)' \
--raw --raw
} }