From 296833651a6adfe5928486a1654a242d710a2005 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 15 Oct 2021 17:09:03 +0200 Subject: [PATCH] pkgs: add rofi-bluetooth --- pkgs/default.nix | 2 ++ pkgs/rofi-bluetooth/default.nix | 40 +++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 pkgs/rofi-bluetooth/default.nix diff --git a/pkgs/default.nix b/pkgs/default.nix index c599247..46fa4ab 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -22,6 +22,8 @@ pkgs.lib.makeScope pkgs.newScope (pkgs: { nolimips = pkgs.callPackage ./nolimips { }; + rofi-bluetooth = pkgs.callPackage ./rofi-bluetooth { }; + unbound-zones-adblock = pkgs.callPackage ./unbound-zones-adblock { }; unified-hosts-lists = pkgs.callPackage ./unified-hosts-lists { }; diff --git a/pkgs/rofi-bluetooth/default.nix b/pkgs/rofi-bluetooth/default.nix new file mode 100644 index 0000000..2ff40a1 --- /dev/null +++ b/pkgs/rofi-bluetooth/default.nix @@ -0,0 +1,40 @@ +{ lib, bluez, fetchFromGitHub, makeWrapper, rofi, stdenvNoCC }: +stdenvNoCC.mkDerivation rec { + pname = "rofi-bluetooth"; + version = "unstable-2021-10-15"; + + src = fetchFromGitHub { + owner = "nickclyde"; + repo = "rofi-bluetooth"; + rev = "893db1f2b549e7bc0e9c62e7670314349a29cdf2"; + sha256 = "sha256-3oROJKEQCuSnLfbJ+JSSc9hcmJTPrLHRQJsrUcaOMss="; + }; + + buildInputs = [ + makeWrapper + ]; + + installPhase = '' + mkdir -p $out/bin + cp $src/rofi-bluetooth $out/bin/ + chmod a+x $out/bin/rofi-bluetooth + ''; + + wrapperPath = lib.makeBinPath [ + rofi + bluez + ]; + + fixupPhase = '' + patchShebangs $out/bin/${pname} + wrapProgram $out/bin/${pname} --prefix PATH : "${wrapperPath}" + ''; + + meta = with lib; { + description = "A rofi menu for managing bluetooth connections"; + homepage = "https://github.com/nickclyde/rofi-bluetooth/commit/"; + license = with licenses; [ gpl3Only ]; + platforms = platforms.linux; + maintainers = with maintainers; [ ambroisie ]; + }; +}