mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
nushellPlugins.skim: init at 0.7.0
This commit is contained in:
parent
a7b7cd78c3
commit
fbe78043e0
@ -10,4 +10,5 @@ lib.makeScope newScope (self: with self; {
|
||||
units = callPackage ./units.nix { };
|
||||
highlight = callPackage ./highlight.nix { };
|
||||
dbus = callPackage ./dbus.nix { inherit dbus; nushell_plugin_dbus = self.dbus; };
|
||||
skim = callPackage ./skim.nix { inherit IOKit CoreFoundation; };
|
||||
})
|
||||
|
55
pkgs/shells/nushell/plugins/skim.nix
Normal file
55
pkgs/shells/nushell/plugins/skim.nix
Normal file
@ -0,0 +1,55 @@
|
||||
{
|
||||
stdenv,
|
||||
runCommand,
|
||||
lib,
|
||||
rustPlatform,
|
||||
nix-update-script,
|
||||
fetchFromGitHub,
|
||||
IOKit,
|
||||
CoreFoundation,
|
||||
nushell,
|
||||
skim,
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "nu_plugin_skim";
|
||||
version = "0.8.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "idanarye";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-3q2qt35lZ07N8E3p4/BoYX1H4B8qcKXJWnZhdJhgpJE=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-+RYrQsB8LVjxZsQ7dVDK6GT6nXSM4b+qpILOe0Q2SjA=";
|
||||
|
||||
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ rustPlatform.bindgenHook ];
|
||||
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
IOKit
|
||||
CoreFoundation
|
||||
];
|
||||
|
||||
passthru = {
|
||||
updateScript = nix-update-script { };
|
||||
tests.check =
|
||||
let
|
||||
nu = lib.getExe nushell;
|
||||
plugin = lib.getExe skim;
|
||||
in
|
||||
runCommand "${pname}-test" { } ''
|
||||
touch $out
|
||||
${nu} -n -c "plugin add --plugin-config $out ${plugin}"
|
||||
${nu} -n -c "plugin use --plugin-config $out skim"
|
||||
'';
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "A nushell plugin that adds integrates the skim fuzzy finder";
|
||||
mainProgram = "nu_plugin_skim";
|
||||
homepage = "https://github.com/idanarye/nu_plugin_skim";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ aftix ];
|
||||
platforms = with platforms; all;
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user