Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 makeWrapper, 6 bluez, 7 dmenu, 8 nix-update-script, 9}: 10 11stdenv.mkDerivation (finalAttrs: { 12 pname = "dmenu-bluetooth"; 13 version = "0-unstable-2023-07-16"; 14 15 src = fetchFromGitHub { 16 owner = "Layerex"; 17 repo = "dmenu-bluetooth"; 18 rev = "96e2e3e1dd7ea2d2ab0c20bf21746aba8d70cc46"; 19 hash = "sha256-0G2PXWq9/JsLHnbOIJWSWWqfnBgOxaA8N2VyCbTUGmI="; 20 }; 21 22 nativeBuildInputs = [ makeWrapper ]; 23 24 installPhase = '' 25 runHook preInstall 26 27 install -D --target-directory=$out/bin/ ./dmenu-bluetooth 28 29 wrapProgram $out/bin/dmenu-bluetooth \ 30 --prefix PATH ":" ${ 31 lib.makeBinPath [ 32 dmenu 33 bluez 34 ] 35 } 36 37 runHook postInstall 38 ''; 39 40 passthru.updateScript = nix-update-script { }; 41 42 meta = { 43 description = "Script that generates a dmenu menu that uses bluetoothctl to connect to bluetooth devices and display status info"; 44 mainProgram = "dmenu-bluetooth"; 45 homepage = "https://github.com/Layerex/dmenu-bluetooth"; 46 license = lib.licenses.gpl3Only; 47 maintainers = with lib.maintainers; [ ludovicopiero ]; 48 platforms = lib.platforms.linux; 49 }; 50})