A small utility to inhibit idle on wayland for mpris clients
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Use flakelight

Ben C 0195d10e 0085e928

+59 -68
+24 -3
flake.lock
··· 1 1 { 2 2 "nodes": { 3 + "flakelight": { 4 + "inputs": { 5 + "nixpkgs": [ 6 + "nixpkgs" 7 + ] 8 + }, 9 + "locked": { 10 + "lastModified": 1739191238, 11 + "narHash": "sha256-DRuhQDWscKWXAZcatFDLQ0+pMKmGZ9lEZdxygq8rVSU=", 12 + "owner": "nix-community", 13 + "repo": "flakelight", 14 + "rev": "5656e7f5fda93676642d199fd9eb47b970d6139e", 15 + "type": "github" 16 + }, 17 + "original": { 18 + "owner": "nix-community", 19 + "repo": "flakelight", 20 + "type": "github" 21 + } 22 + }, 3 23 "nixpkgs": { 4 24 "locked": { 5 - "lastModified": 1715037484, 6 - "narHash": "sha256-OUt8xQFmBU96Hmm4T9tOWTu4oCswCzoVl+pxSq/kiFc=", 25 + "lastModified": 1739019272, 26 + "narHash": "sha256-7Fu7oazPoYCbDzb9k8D/DdbKrC3aU1zlnc39Y8jy/s8=", 7 27 "owner": "NixOS", 8 28 "repo": "nixpkgs", 9 - "rev": "ad7efee13e0d216bf29992311536fce1d3eefbef", 29 + "rev": "fa35a3c8e17a3de613240fea68f876e5b4896aec", 10 30 "type": "github" 11 31 }, 12 32 "original": { ··· 18 38 }, 19 39 "root": { 20 40 "inputs": { 41 + "flakelight": "flakelight", 21 42 "nixpkgs": "nixpkgs" 22 43 } 23 44 }
+35 -65
flake.nix
··· 1 1 { 2 - description = "Flake for wayland-mpris-idle-inhibit"; 2 + description = "Nushell Plugin DBUS"; 3 3 4 4 inputs = { 5 5 nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; 6 + flakelight.url = "github:nix-community/flakelight"; 7 + flakelight.inputs.nixpkgs.follows = "nixpkgs"; 6 8 }; 7 9 8 - outputs = { 10 + outputs = inputs @ { 9 11 self, 10 12 nixpkgs, 11 - }: let 12 - forAllSystems = nixpkgs.lib.genAttrs [ 13 - "aarch64-linux" 14 - "aarch64-darwin" 15 - "x86_64-darwin" 16 - "x86_64-linux" 17 - ]; 18 - pkgsFor = system: import nixpkgs {inherit system;}; 19 - common = pkgs: 20 - with pkgs; [ 21 - gcc 22 - pkg-config 23 - dbus 24 - ]; 25 - in { 26 - packages = forAllSystems (system: let 27 - pkgs = pkgsFor system; 28 - in { 29 - default = pkgs.rustPlatform.buildRustPackage rec { 30 - pname = "wayland-mpris-idle-inhibit"; 31 - version = "0.1.0"; 32 - 33 - src = with pkgs.lib.fileset; 34 - toSource { 35 - root = ./.; 36 - fileset = unions [ 37 - ./src 38 - ./Cargo.toml 39 - ./Cargo.lock 40 - ]; 41 - }; 13 + flakelight, 14 + }: 15 + flakelight ./. { 16 + inherit inputs; 17 + pname = "wayland-mpris-idle-inhibit"; 18 + package = { 19 + rustPlatform, 20 + dbus, 21 + nushell, 22 + pkg-config, 23 + fetchFromGitHub, 24 + lib, 25 + }: 26 + rustPlatform.buildRustPackage { 27 + pname = "wayland-mpris-idle-inhibit"; 28 + version = "0.1.0"; 42 29 43 - useFetchCargoVendor = true; 30 + src = ./.; 44 31 45 - cargoLock = { 46 - lockFile = ./Cargo.lock; 47 - }; 32 + useFetchCargoVendor = true; 33 + cargoLock.lockFile = ./Cargo.lock; 48 34 49 - nativeBuildInputs = common pkgs; 50 - buildInputs = common pkgs; 35 + nativeBuildInputs = [ 36 + pkg-config 37 + ]; 51 38 52 - doCheck = false; 39 + buildInputs = [ 40 + dbus 41 + ]; 53 42 54 - meta = with pkgs.lib; { 55 - description = "A small utility to inhibit idle on wayland for mpris clients"; 56 - homepage = "https://github.com/Bwc9876/wayland-mpris-idle-inhibit"; 57 - license = licenses.gpl3; 58 - maintainers = with maintainers; [bwc9876]; 43 + meta = with lib; { 44 + description = "A program that enables the wl-roots idle inhibitor when MPRIS reports any player"; 45 + license = licenses.mit; 46 + homepage = "https://github.com/Bwc9876/wayland-mpris-idle-inhibit"; 47 + }; 59 48 }; 60 - }; 61 - }); 62 - devShells = forAllSystems (system: let 63 - pkgs = pkgsFor system; 64 - in { 65 - default = pkgs.mkShell { 66 - name = "mpris-idle-inhibit-dev-shell"; 67 - buildInputs = with pkgs; 68 - [ 69 - rustc 70 - cargo 71 - clippy 72 - rustfmt 73 - ] 74 - ++ common pkgs; 75 - shellHook = ''''; 76 - }; 77 - }); 78 - formatter = forAllSystems (system: (pkgsFor system).alejandra); 79 - }; 49 + }; 80 50 }