about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2020-11-04 18:42:00 +0100
committerPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2020-11-04 18:42:00 +0100
commit18455a0b20c98d83b78e85249fa1e781e7de0b15 (patch)
tree9cfaf06a63d8702f7ddb87ad22651a6507171568
parent6716405c1f2110e55f4b294c58e7c923d2a3cb10 (diff)
downloadpnpkgs-18455a0b20c98d83b78e85249fa1e781e7de0b15.tar.gz
pnpkgs-18455a0b20c98d83b78e85249fa1e781e7de0b15.zip
Add larbs-music
-rw-r--r--default.nix1
-rw-r--r--pkgs/larbs-music/default.nix55
2 files changed, 56 insertions, 0 deletions
diff --git a/default.nix b/default.nix
index 18313eb..bde51e1 100644
--- a/default.nix
+++ b/default.nix
@@ -33,6 +33,7 @@
   larbs-news = pkgs.callPackage ./pkgs/larbs-news { };
   larbs-nvim = pkgs.callPackage ./pkgs/larbs-nvim { };
   larbs-scripts = pkgs.callPackage ./pkgs/larbs-scripts { };
+  larbs-music = pkgs.callPackage ./pkgs/larbs-music { };
 
   #fx = (pkgs.callPackage ./pkgs/fx { }).package;
   # xcb-util = pkgs.callPackage ./pkgs/xcb-util { }; #unknown error
diff --git a/pkgs/larbs-music/default.nix b/pkgs/larbs-music/default.nix
new file mode 100644
index 0000000..8e9169c
--- /dev/null
+++ b/pkgs/larbs-music/default.nix
@@ -0,0 +1,55 @@
+{ stdenv, buildEnv, makeWrapper, makeDesktopItem, callPackage, ncmpcpp, libnotify }:
+with stdenv.lib;
+
+let
+  pname = "larbs-music";
+  version = "1.0";
+  voidrice = callPackage ../voidrice.nix { };
+  config = "${voidrice}/.config/ncmpcpp/config";
+  bindings = "${voidrice}/.config/ncmpcpp/config";
+  vizNcmpcpp = ncmpcpp.override {
+    visualizerSupport = true;
+  };
+
+  ncmpcppWrapped = stdenv.mkDerivation {
+    inherit pname version;
+    unpackPhase = "true";
+
+    buildInputs = [ makeWrapper ];
+
+    installPhase = ''
+      makeWrapper ${vizNcmpcpp}/bin/ncmpcpp $out/bin/ncmpcpp \
+      --add-flags "-c ${config}" \
+      --add-flags "-b ${bindings}"
+    '';
+
+  };
+
+  desktopItem = makeDesktopItem {
+    name = pname;
+    genericName = "Music player";
+    comment = "Ncmpcpp music player configuration by Luke Smith";
+    exec = "${ncmpcppWrapped}/bin/ncmpcpp";
+    # icon =
+    desktopName = pname;
+    categories = "Audio;AudioVideo";
+    terminal = "true";
+  };
+
+in
+  buildEnv {
+    name = pname;
+
+    paths = [
+      ncmpcppWrapped
+      libnotify
+      desktopItem
+    ];
+
+    meta = {
+      homepage = "https://github.com/LukeSmithXYZ/voidrice";
+      description = "NCMPCPP music player with vim bindings";
+      license = licenses.gpl3;
+      platforms = [ "x86_64-linux" "x86_64-darwin" ];
+    };
+  }