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 crane

Ben C f0aa83b7 2d21359c

+46 -27
+20 -4
flake.lock
··· 1 1 { 2 2 "nodes": { 3 + "crane": { 4 + "locked": { 5 + "lastModified": 1762538466, 6 + "narHash": "sha256-8zrIPl6J+wLm9MH5ksHcW7BUHo7jSNOu0/hA0ohOOaM=", 7 + "owner": "ipetkov", 8 + "repo": "crane", 9 + "rev": "0cea393fffb39575c46b7a0318386467272182fe", 10 + "type": "github" 11 + }, 12 + "original": { 13 + "owner": "ipetkov", 14 + "repo": "crane", 15 + "type": "github" 16 + } 17 + }, 3 18 "flakelight": { 4 19 "inputs": { 5 20 "nixpkgs": [ ··· 22 37 }, 23 38 "nixpkgs": { 24 39 "locked": { 25 - "lastModified": 1762604901, 26 - "narHash": "sha256-Pr2jpryIaQr9Yx8p6QssS03wqB6UifnnLr3HJw9veDw=", 40 + "lastModified": 1762977756, 41 + "narHash": "sha256-4PqRErxfe+2toFJFgcRKZ0UI9NSIOJa+7RXVtBhy4KE=", 27 42 "owner": "NixOS", 28 43 "repo": "nixpkgs", 29 - "rev": "f6b44b2401525650256b977063dbcf830f762369", 44 + "rev": "c5ae371f1a6a7fd27823bc500d9390b38c05fa55", 30 45 "type": "github" 31 46 }, 32 47 "original": { 33 48 "owner": "NixOS", 34 - "ref": "nixpkgs-unstable", 49 + "ref": "nixos-unstable", 35 50 "repo": "nixpkgs", 36 51 "type": "github" 37 52 } 38 53 }, 39 54 "root": { 40 55 "inputs": { 56 + "crane": "crane", 41 57 "flakelight": "flakelight", 42 58 "nixpkgs": "nixpkgs" 43 59 }
+26 -23
flake.nix
··· 1 1 { 2 - description = "Nushell Plugin DBUS"; 2 + description = "Wayland Mpris Idle Inhibit"; 3 3 4 4 inputs = { 5 - nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; 5 + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 6 6 flakelight.url = "github:nix-community/flakelight"; 7 7 flakelight.inputs.nixpkgs.follows = "nixpkgs"; 8 + crane.url = "github:ipetkov/crane"; 8 9 }; 9 10 10 11 outputs = 11 - inputs @ { self 12 + inputs@{ self 12 13 , nixpkgs 13 14 , flakelight 15 + , crane 14 16 , 15 17 }: 16 18 flakelight ./. { ··· 23 25 , pkg-config 24 26 , fetchFromGitHub 25 27 , lib 28 + , pkgs 26 29 , 27 30 }: 28 - rustPlatform.buildRustPackage { 29 - pname = "wayland-mpris-idle-inhibit"; 30 - version = "0.1.0"; 31 - 31 + let 32 + craneLib = crane.mkLib pkgs; 32 33 src = ./.; 33 - 34 - cargoLock.lockFile = ./Cargo.lock; 35 - 36 - nativeBuildInputs = [ 37 - pkg-config 38 - ]; 39 - 40 - buildInputs = [ 41 - dbus 42 - ]; 43 - 44 - meta = with lib; { 45 - description = "A program that enables the wl-roots idle inhibitor when MPRIS reports any player"; 46 - license = licenses.mit; 47 - homepage = "https://github.com/Bwc9876/wayland-mpris-idle-inhibit"; 34 + commonArgs = { 35 + inherit src; 36 + strictDeps = true; 37 + nativeBuildInputs = [ 38 + pkg-config 39 + ]; 40 + buildInputs = [ 41 + dbus 42 + ]; 48 43 }; 49 - }; 44 + cargoArtifacts = craneLib.buildDepsOnly commonArgs; 45 + wayland-mpris-idle-inhibit = craneLib.buildPackage ( 46 + commonArgs 47 + // { 48 + inherit cargoArtifacts; 49 + } 50 + ); 51 + in 52 + wayland-mpris-idle-inhibit; 50 53 }; 51 54 }