feat: added nixpkgs overlay
This commit is contained in:
parent
9670f735a2
commit
be2cfd9402
|
@ -116,6 +116,7 @@
|
|||
pkgs = import nixpkgs {
|
||||
overlays =
|
||||
import ./lib inputs
|
||||
++ import ./pkgs
|
||||
++ [
|
||||
inputs.nixpkgs-wayland.overlay
|
||||
];
|
||||
|
|
6
pkgs/default.nix
Normal file
6
pkgs/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
[
|
||||
(_self: super: {
|
||||
zsh-histdb-skim = super.callPackage ./zsh-histdb-skim.nix {};
|
||||
zsh-histdb = super.callPackage ./zsh-histdb.nix {};
|
||||
})
|
||||
]
|
22
pkgs/zsh-histdb-skim.nix
Normal file
22
pkgs/zsh-histdb-skim.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
rustPlatform,
|
||||
sqlite,
|
||||
fetchFromGitHub,
|
||||
}:
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "zsh-histd-skim";
|
||||
version = "0.8.6";
|
||||
buildInputs = [sqlite];
|
||||
src = fetchFromGitHub {
|
||||
owner = "m42e";
|
||||
repo = "zsh-histdb-skim";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-lJ2kpIXPHE8qP0EBnLuyvatWMtepBobNAC09e7itGas=";
|
||||
};
|
||||
cargoHash = "sha256-BMy9Shy9KAx5+VbvH2WaA0wMFUNM5dqU/dssUNE1NWY=";
|
||||
postInstall = ''
|
||||
substituteInPlace zsh-histdb-skim-vendored.zsh \
|
||||
--replace "zsh-histdb-skim" "$out/bin/zsh-histdb-skim"
|
||||
cp zsh-histdb-skim-vendored.zsh $out/zsh-histdb-skim.plugin.zsh
|
||||
'';
|
||||
}
|
22
pkgs/zsh-histdb.nix
Normal file
22
pkgs/zsh-histdb.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
sqlite,
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
name = "zsh-histdb";
|
||||
src = fetchFromGitHub {
|
||||
owner = "larkery";
|
||||
repo = "zsh-histdb";
|
||||
rev = "30797f0c50c31c8d8de32386970c5d480e5ab35d";
|
||||
hash = "sha256-PQIFF8kz+baqmZWiSr+wc4EleZ/KD8Y+lxW2NT35/bg=";
|
||||
};
|
||||
patchPhase = ''
|
||||
substituteInPlace "sqlite-history.zsh" "histdb-migrate" "histdb-merge" \
|
||||
--replace "sqlite3" "${sqlite}/bin/sqlite3"
|
||||
'';
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -r * $out
|
||||
'';
|
||||
}
|
|
@ -25,5 +25,6 @@
|
|||
|
||||
zf = "zathura --fork";
|
||||
gdb = "${pkgs.pwndbg}/bin/pwndbg";
|
||||
build = "nix build --no-link --print-out-paths";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -57,43 +57,11 @@
|
|||
{
|
||||
# TODO change to separate packages
|
||||
name = "zsh-histdb";
|
||||
src = pkgs.stdenv.mkDerivation {
|
||||
name = "zsh-histdb";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "larkery";
|
||||
repo = "zsh-histdb";
|
||||
rev = "30797f0c50c31c8d8de32386970c5d480e5ab35d";
|
||||
hash = "sha256-PQIFF8kz+baqmZWiSr+wc4EleZ/KD8Y+lxW2NT35/bg=";
|
||||
};
|
||||
patchPhase = ''
|
||||
substituteInPlace "sqlite-history.zsh" "histdb-migrate" "histdb-merge" \
|
||||
--replace "sqlite3" "${pkgs.sqlite}/bin/sqlite3"
|
||||
'';
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -r * $out
|
||||
'';
|
||||
};
|
||||
src = pkgs.zsh-histdb;
|
||||
}
|
||||
{
|
||||
name = "zsh-histdb-skim";
|
||||
src = pkgs.rustPlatform.buildRustPackage rec {
|
||||
pname = "zsh-histd-skim";
|
||||
version = "0.8.6";
|
||||
buildInputs = [pkgs.sqlite];
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "m42e";
|
||||
repo = "zsh-histdb-skim";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-lJ2kpIXPHE8qP0EBnLuyvatWMtepBobNAC09e7itGas=";
|
||||
};
|
||||
cargoHash = "sha256-BMy9Shy9KAx5+VbvH2WaA0wMFUNM5dqU/dssUNE1NWY=";
|
||||
postInstall = ''
|
||||
substituteInPlace zsh-histdb-skim-vendored.zsh \
|
||||
--replace "zsh-histdb-skim" "$out/bin/zsh-histdb-skim"
|
||||
cp zsh-histdb-skim-vendored.zsh $out/zsh-histdb-skim.plugin.zsh
|
||||
'';
|
||||
};
|
||||
src = pkgs.zsh-histdb-skim;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue