Nushell plugin for interacting with D-Bus
at main 66 lines 1.6 kB view raw
1{ 2 description = "Nushell Plugin DBUS"; 3 4 inputs = { 5 nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 6 flakelight.url = "github:nix-community/flakelight"; 7 flakelight.inputs.nixpkgs.follows = "nixpkgs"; 8 crane.url = "github:ipetkov/crane"; 9 }; 10 11 outputs = 12 inputs@{ self 13 , nixpkgs 14 , flakelight 15 , crane 16 , 17 }: 18 flakelight ./. { 19 inherit inputs; 20 pname = "nu_plugin_dbus"; 21 package = 22 { rustPlatform 23 , dbus 24 , nushell 25 , pkg-config 26 , fetchFromGitHub 27 , lib 28 , pkgs 29 , 30 }: 31 let 32 craneLib = crane.mkLib pkgs; 33 src = ./.; 34 commonArgs = { 35 inherit src; 36 strictDeps = true; 37 nativeBuildInputs = [ 38 pkg-config 39 ]; 40 buildInputs = [ 41 dbus 42 ]; 43 }; 44 cargoArtifacts = craneLib.buildDepsOnly commonArgs; 45 nu_plugin_dbus = craneLib.buildPackage ( 46 commonArgs 47 // { 48 inherit cargoArtifacts; 49 50 meta = with lib; { 51 description = "A nushell plugin for interacting with dbus"; 52 license = licenses.mit; 53 mainProgram = "nu_plugin_dbus"; 54 homepage = "https://github.com/devyn/nu_plugin_dbus"; 55 }; 56 } 57 ); 58 nu_version = "0.111.0"; 59 in 60 if nushell.version == nu_version then 61 nu_plugin_dbus 62 else 63 abort "Nushell Version mismatch\nPlugin: ${nu_version}\tnixpkgs: ${nushell.version}"; 64 65 }; 66}