mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 06:31:02 +00:00
Use programs.sqlite from the NixOS channel
This commit is contained in:
parent
b5e2ff4bed
commit
1568b6858d
|
@ -28,7 +28,7 @@ in
|
|||
# This function is called whenever a command is not found.
|
||||
command_not_found_handle() {
|
||||
local p=/run/current-system/sw/bin/command-not-found
|
||||
if [ -x $p -a -f /var/lib/nixos/programs.sqlite ]; then
|
||||
if [ -x $p -a -f /nix/var/nix/profiles/per-user/root/channels/nixos/programs.sqlite ]; then
|
||||
# Run the helper program.
|
||||
$p "$1"
|
||||
# Retry the command if we just installed it.
|
||||
|
|
|
@ -7,7 +7,7 @@ use Config;
|
|||
|
||||
my $program = $ARGV[0];
|
||||
|
||||
my $dbPath = "/var/lib/nixos/programs.sqlite";
|
||||
my $dbPath = "/nix/var/nix/profiles/per-user/root/channels/nixos/programs.sqlite";
|
||||
|
||||
my $dbh = DBI->connect("dbi:SQLite:dbname=$dbPath", "", "")
|
||||
or die "cannot open database `$dbPath'";
|
||||
|
|
Loading…
Reference in a new issue