feat: add zsh-skim-histdb package

This commit is contained in:
oddlama 2023-09-17 22:31:58 +02:00
parent 365736b42a
commit 485e1448fc
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
4 changed files with 33 additions and 6 deletions

View file

@ -31,5 +31,7 @@
hash = "sha256-iZUszwVcbVn6Xsqou6crSp9gJBRmm5vEqxS87h/s3PQ=";
};
});
zsh-histdb-skim = super.callPackage ./zsh-skim-histdb.nix {};
})
]

28
pkgs/zsh-skim-histdb.nix Normal file
View file

@ -0,0 +1,28 @@
{
fetchFromGitHub,
rustPlatform,
sqlite,
}:
rustPlatform.buildRustPackage rec {
pname = "zsh-histdb-skim";
version = "0.8.6";
buildInputs = [sqlite];
src = fetchFromGitHub {
owner = "m42e";
repo = "zsh-histdb-skim";
rev = "v${version}";
hash = "sha256-lJ2kpIXPHE8qP0EBnLuyvatWMtepBobNAC09e7itGas=";
};
cargoHash = "sha256-yvgyqm8WM7Oddxsbl/lfHQOmsEEiMTK6itbqea5+Ibg=";
patchPhase = ''
substituteInPlace zsh-histdb-skim-vendored.zsh \
--replace zsh-histdb-skim "$out/bin/zsh-histdb-skim"
'';
postInstall = ''
cp zsh-histdb-skim-vendored.zsh $out/zsh-histdb-skim.plugin.zsh
'';
}