2020-03-21 11:12:00 +00:00
|
|
|
{ stdenv, fetchFromGitHub, buildGoModule, installShellFiles, nixosTests, Security }:
|
2019-08-29 09:11:11 +01:00
|
|
|
|
2019-10-07 09:00:04 +01:00
|
|
|
buildGoModule rec {
|
2019-08-29 09:11:11 +01:00
|
|
|
pname = "zsh-history";
|
2019-12-10 12:09:40 +00:00
|
|
|
version = "2019-12-10";
|
2019-08-29 09:11:11 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "b4b4r07";
|
|
|
|
repo = "history";
|
2019-12-10 12:09:40 +00:00
|
|
|
rev = "8da016bd91b0c2eb53c9980f00eee6abdbb097e2";
|
|
|
|
sha256 = "13n643ik1zjvpk8h9458yd9ffahhbdnigmbrbmpn7b7g23wqqsi3";
|
2019-08-29 09:11:11 +01:00
|
|
|
};
|
|
|
|
|
2019-09-28 11:50:30 +01:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2020-03-21 11:12:00 +00:00
|
|
|
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];
|
|
|
|
|
2019-10-07 09:00:04 +01:00
|
|
|
modSha256 = "0f10b86gyn7m7lw43c8y1m30mdg0i092a319v3cb2qj05jb9vn42";
|
2019-09-27 12:50:47 +01:00
|
|
|
goPackagePath = "github.com/b4b4r07/history";
|
2019-08-29 09:11:11 +01:00
|
|
|
|
2019-09-27 12:50:47 +01:00
|
|
|
postInstall = ''
|
2019-08-29 09:11:11 +01:00
|
|
|
install -d $out/share
|
2019-10-07 09:00:04 +01:00
|
|
|
cp -r "$NIX_BUILD_TOP/source/misc/"* "$out/share"
|
2019-09-28 11:50:30 +01:00
|
|
|
installShellCompletion --zsh --name _history $out/share/zsh/completions/_history
|
2019-08-29 09:11:11 +01:00
|
|
|
'';
|
|
|
|
|
2020-03-21 11:12:00 +00:00
|
|
|
meta = with stdenv.lib; {
|
2019-10-07 20:02:56 +01:00
|
|
|
description = "A CLI to provide enhanced history for your ZSH shell";
|
2019-08-29 09:11:11 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
homepage = https://github.com/b4b4r07/history;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ kampka ];
|
|
|
|
};
|
2019-12-13 20:47:15 +00:00
|
|
|
|
|
|
|
passthru.tests = {
|
|
|
|
zsh-history-shell-integration = nixosTests.zsh-history;
|
|
|
|
};
|
2019-08-29 09:11:11 +01:00
|
|
|
}
|