From fddecffa02196f67ac4df9a6f1bd4cfb9c6f58af Mon Sep 17 00:00:00 2001 From: h7x4 Date: Sat, 26 Nov 2022 21:01:29 +0100 Subject: [PATCH] naming consistency: `nix-attrs-*` -> `nix-attr-*` --- shell.nix | 6 +++--- templates/option-preview-template-color.nix | 2 +- templates/option-preview-template.nix | 2 +- utils/format.nix | 2 +- utils/hlint.nix | 2 +- utils/ormolu.nix | 2 +- utils/test-json2nix.nix | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/shell.nix b/shell.nix index bbd308d..deb95f3 100644 --- a/shell.nix +++ b/shell.nix @@ -7,8 +7,8 @@ pkgs.mkShell { hlint = pkgs.callPackage ./utils/hlint.nix { }; ormolu = pkgs.callPackage ./utils/ormolu.nix { }; in '' - alias nasf=${format}/bin/nix-attrs-search-format - alias nashl=${hlint}/bin/nix-attrs-search-hlint - alias nashf=${ormolu}/bin/nix-attrs-search-ormolu + alias nasf=${format}/bin/nix-attr-search-format + alias nashl=${hlint}/bin/nix-attr-search-hlint + alias nashf=${ormolu}/bin/nix-attr-search-ormolu ''; } diff --git a/templates/option-preview-template-color.nix b/templates/option-preview-template-color.nix index 8c99250..e0af484 100644 --- a/templates/option-preview-template-color.nix +++ b/templates/option-preview-template-color.nix @@ -2,7 +2,7 @@ let inherit (pkgs.callPackage ../internals/lib.nix { }) flatten red bold blinkred green yellow magenta blue clear; -in pkgs.writeText "nix-attrs-search-internal-option-template" (flatten '' +in pkgs.writeText "nix-attr-search-internal-option-template" (flatten '' {{ define "colorize" -}} {{ strings.ShellQuote . | strings.Trim "'" }} {{- end -}} diff --git a/templates/option-preview-template.nix b/templates/option-preview-template.nix index ecaacf1..4ad6ffc 100644 --- a/templates/option-preview-template.nix +++ b/templates/option-preview-template.nix @@ -1,6 +1,6 @@ { pkgs }: let inherit (pkgs.callPackage ../internals/lib.nix { }) flatten; -in pkgs.writeText "nix-attrs-search-internal-option-template" (flatten '' +in pkgs.writeText "nix-attr-search-internal-option-template" (flatten '' {{ with (ds "opt")}} {{- $origTitle := join .loc "." }} {{- $title := join .loc "." }} diff --git a/utils/format.nix b/utils/format.nix index 8608120..9979f15 100644 --- a/utils/format.nix +++ b/utils/format.nix @@ -1,4 +1,4 @@ { pkgs, ... }: -pkgs.writeScriptBin "nix-attrs-search-format" '' +pkgs.writeScriptBin "nix-attr-search-format" '' find -name '*.nix' -exec '${pkgs.nixfmt}/bin/nixfmt' {} \; '' diff --git a/utils/hlint.nix b/utils/hlint.nix index c3e77dc..95fc84e 100644 --- a/utils/hlint.nix +++ b/utils/hlint.nix @@ -1,4 +1,4 @@ { pkgs, ... }: -pkgs.writeScriptBin "nix-attrs-search-hlint" '' +pkgs.writeScriptBin "nix-attr-search-hlint" '' find -name '*.hs' -exec '${pkgs.hlint}/bin/hlint' {} \; '' diff --git a/utils/ormolu.nix b/utils/ormolu.nix index 92c83a2..a92152e 100644 --- a/utils/ormolu.nix +++ b/utils/ormolu.nix @@ -1,4 +1,4 @@ { pkgs, ... }: -pkgs.writeScriptBin "nix-attrs-search-ormolu" '' +pkgs.writeScriptBin "nix-attr-search-ormolu" '' find -name '*.hs' -exec '${pkgs.ormolu}/bin/ormolu' --mode inplace {} \; '' diff --git a/utils/test-json2nix.nix b/utils/test-json2nix.nix index 7728dc9..d2d65cc 100644 --- a/utils/test-json2nix.nix +++ b/utils/test-json2nix.nix @@ -1,5 +1,5 @@ { pkgs, home-manager-options, json2nix }: -pkgs.writers.writeBash "nix-attrs-search-test-json2nix" '' +pkgs.writers.writeBash "nix-attr-search-test-json2nix" '' ELEMENT_COUNT=$(${jq} 'keys | length' ${home-manager-options}/share/doc/home-manager/options.json) echo "Trying $(($ELEMENT_COUNT - 1)) elements" for i in $(seq 0 $(($ELEMENT_COUNT - 1))); do