Compare commits

...

2 Commits

Author SHA1 Message Date
Tom Alexander
c694c6ae4c
Make zsh-histdb use sqlite3 directly instead of depending on systemPackages. 2025-01-18 13:12:24 -05:00
Tom Alexander
f524aa168a
Stick with imv instead of swayimg. 2025-01-18 12:16:11 -05:00
4 changed files with 11 additions and 4 deletions

View File

@ -327,7 +327,7 @@
}, },
"locked": { "locked": {
"lastModified": 1, "lastModified": 1,
"narHash": "sha256-TFks1dvPwAXKQeePh9jmxj06ZfXArH1pN9yXVQWeL6w=", "narHash": "sha256-5DWw7GnwVZ98HUp/UUJcyUmmy9Bh/mcQB8MQQ0t3ZRo=",
"path": "flakes/zsh-histdb", "path": "flakes/zsh-histdb",
"type": "path" "type": "path"
}, },

View File

@ -21,9 +21,16 @@ stdenv.mkDerivation {
sha256 = "sha256-vtG1poaRVbfb/wKPChk1WpPgDq+7udLqLfYfLqap4Vg="; sha256 = "sha256-vtG1poaRVbfb/wKPChk1WpPgDq+7udLqLfYfLqap4Vg=";
}; };
buildInputs = [ sqlite ]; buildInputs = [ sqlite ];
phases = [ "installPhase" ]; phases = [
"installPhase"
];
installPhase = '' installPhase = ''
runHook preInstall
mkdir -p $out/share/zsh/plugins/zsh-histdb mkdir -p $out/share/zsh/plugins/zsh-histdb
cp -r $src/histdb-* $src/*.zsh $src/db_migrations $out/share/zsh/plugins/zsh-histdb/ cp -r $src/histdb-* $src/*.zsh $src/db_migrations $out/share/zsh/plugins/zsh-histdb/
runHook postInstall
'';
postInstall = ''
substituteInPlace $out/share/zsh/plugins/zsh-histdb/sqlite-history.zsh $out/share/zsh/plugins/zsh-histdb/histdb-merge $out/share/zsh/plugins/zsh-histdb/histdb-migrate --replace-fail "sqlite3" "${sqlite}/bin/sqlite3"
''; '';
} }

View File

@ -41,7 +41,8 @@ in
mpv mpv
evince evince
gimp gimp
imv # TODO: Maybe replace with https://github.com/artemsen/swayimg because imv is looking for a new maintainer # So far I prefer imv over swayimg because imv supports the 'p' hotkey to print the currently-viewed file to stdout (useful for pipelines) and afaik doesn't support the exec:// protocol which seems like a massive risk.
imv
]; ];
}) })
(lib.mkIf (config.me.graphicsCardType == "amd" || config.me.graphicsCardType == "intel") { (lib.mkIf (config.me.graphicsCardType == "amd" || config.me.graphicsCardType == "intel") {

View File

@ -64,7 +64,6 @@ in
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
zsh zsh
sqlite # TODO: can this be pulled into zsh-histdb automatically?
]; ];
users.users.talexander.shell = pkgs.zsh; users.users.talexander.shell = pkgs.zsh;