mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-11 18:32:23 +08:00
nushellPlugins.dbus: refactor
This commit is contained in:
@@ -11,18 +11,17 @@
|
||||
nushell_plugin_dbus,
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "nu_plugin_dbus";
|
||||
version = "0.14.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "devyn";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
repo = "nu_plugin_dbus";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-Ga+1zFwS/v+3iKVEz7TFmJjyBW/gq6leHeyH2vjawto=";
|
||||
};
|
||||
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-7pD5LA1ytO7VqFnHwgf7vW9eS3olnZBgdsj+rmcHkbU=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ];
|
||||
@@ -35,19 +34,19 @@ rustPlatform.buildRustPackage rec {
|
||||
nu = lib.getExe nushell;
|
||||
plugin = lib.getExe nushell_plugin_dbus;
|
||||
in
|
||||
runCommand "${pname}-test" { } ''
|
||||
runCommand "${finalAttrs.pname}-test" { } ''
|
||||
touch $out
|
||||
${nu} -n -c "plugin add --plugin-config $out ${plugin}"
|
||||
${nu} -n -c "plugin use --plugin-config $out dbus"
|
||||
'';
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Nushell plugin for communicating with D-Bus";
|
||||
mainProgram = "nu_plugin_dbus";
|
||||
homepage = "https://github.com/devyn/nu_plugin_dbus";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ aftix ];
|
||||
platforms = with platforms; linux;
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ aftix ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user