From 9bfbc8d47abd74e639284648ce8bc95d1819a2cf Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Sun, 16 Jul 2023 17:32:55 +0530 Subject: [PATCH] create rofi-bluetooth package --- packages/default.nix | 1 + packages/rofi-bluetooth/default.nix | 33 +++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 packages/rofi-bluetooth/default.nix diff --git a/packages/default.nix b/packages/default.nix index 7eb5c66..80e9125 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -3,4 +3,5 @@ self: super: { dracula-gtk = super.callPackage ./dracula-gtk {}; newaita-icon-theme = super.callPackage ./newaita-icon-theme {}; scripts = super.callPackage ./scripts {}; + rofi-bluetooth = super.callPackage ./rofi-bluetooth {}; } diff --git a/packages/rofi-bluetooth/default.nix b/packages/rofi-bluetooth/default.nix new file mode 100644 index 0000000..d665bd8 --- /dev/null +++ b/packages/rofi-bluetooth/default.nix @@ -0,0 +1,33 @@ +{ + lib, + fetchFromGitHub, + makeWrapper, + stdenvNoCC, + bluez, + rofi-wayland +}: +stdenvNoCC.mkDerivation { + pname = "rofi-bluetooth"; + version = "git"; + src = fetchFromGitHub { + owner = "nickclyde"; + repo = "rofi-bluetooth"; + rev = "9d91c048ff129819f4c6e9e48a17bd54343bbffb"; + hash = "sha256-1Xe3QFThIvJDCUznDP5ZBzwZEMuqmxpDIV+BcVvQDG8="; + }; + + nativeBuildInputs = [makeWrapper]; + + installPhase = '' + mkdir -p $out/bin + + cp rofi-bluetooth $out/bin/rofi-bluetooth + chmod +x $out/bin/rofi-bluetooth + + runHook postInstall + ''; + + postInstall = '' + wrapProgram $out/bin/rofi-bluetooth --prefix PATH : ${lib.makeBinPath [bluez rofi-wayland]} + ''; +}