Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ grep = "0.2.12"
headers = "0.3.8"
http = "0.2.9"
hyper-proxy = "0.9.1"
indoc = "2.0.1"
atty = "0.2.14"
memchr = "2.5.0"
num_cpus = "1.15.0"
Expand Down
135 changes: 0 additions & 135 deletions command-not-found.sh

This file was deleted.

3 changes: 3 additions & 0 deletions etc/command-not-found.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
command_not_found_handle() {
@out@/bin/nix-locate --command-not-found "$@"
}
3 changes: 3 additions & 0 deletions etc/command-not-found.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
function fish_command_not_found
@out@/bin/nix-locate --command-not-found $argv
end
3 changes: 3 additions & 0 deletions etc/command-not-found.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
command_not_found_handler() {
@out@/bin/nix-locate --command-not-found "$@"
}
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@
inherit ((lib.importTOML ./Cargo.toml).package) version;

src = lib.sourceByRegex self [
"(examples|src)(/.*)?"
"(etc|examples|src)(/.*)?"
''Cargo\.(toml|lock)''
''command-not-found\.sh''
];

cargoLock = {
Expand All @@ -37,9 +36,9 @@
++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];

postInstall = ''
substituteInPlace command-not-found.sh \
substituteInPlace etc/command-not-found.* \
--subst-var out
install -Dm555 command-not-found.sh -t $out/etc/profile.d
install -Dm444 etc/command-not-found.* -t $out/etc/profile.d
'';

meta = with lib; {
Expand Down
Loading