diff --git a/pkgs/by-name/ni/nix-index/cnfOutput.patch b/pkgs/by-name/ni/nix-index/cnfOutput.patch new file mode 100644 index 0000000..8564d9b --- /dev/null +++ b/pkgs/by-name/ni/nix-index/cnfOutput.patch @@ -0,0 +1,66 @@ +diff --git a/command-not-found.sh b/command-not-found.sh +index 5f30bad..3854297 100755 +--- a/command-not-found.sh ++++ b/command-not-found.sh +@@ -73,51 +73,30 @@ EOF + else + if [ -e "$HOME/.nix-profile/manifest.json" ]; then + >&2 cat <&2 cat <&2 cat <&2 echo " nix profile install $toplevel#$attr" +- else +- >&2 echo " nix-env -iA $toplevel.$attr" +- fi +- done <<< "$attrs" +- +- >&2 cat <&2 echo " nix shell $toplevel#$attr -c $cmd ..." ++ >&2 echo " nix shell $toplevel#$attr" + else +- >&2 echo " nix-shell -p $attr --run '$cmd ...'" ++ >&2 echo " nix-shell -p $attr" + fi + done <<< "$attrs" + ;; diff --git a/pkgs/by-name/ni/nix-index/override.nix b/pkgs/by-name/ni/nix-index/override.nix new file mode 100644 index 0000000..e0513e4 --- /dev/null +++ b/pkgs/by-name/ni/nix-index/override.nix @@ -0,0 +1,9 @@ +{self, super, package }: + +package.override { + nix-index-unwrapped = self.nix-index-unwrapped.overrideAttrs (oldAttrs: { + patches = oldAttrs.patches or [] ++ [ + ./cnfOutput.patch + ]; + }); +}