about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/mo/monophony/package.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-11-05 09:32:31 +0100
committerAlyssa Ross <hi@alyssa.is>2023-11-05 09:32:31 +0100
commit480416cc0d7e508b652c516af8d7342e3b1e59e3 (patch)
treed64d990b0d7cc1f80dca687b48563bc71628b55e /nixpkgs/pkgs/by-name/mo/monophony/package.nix
parent05f40ff2bfe9c68198664c38d65816f677ac7ed4 (diff)
parentfa804edfb7869c9fb230e174182a8a1a7e512c40 (diff)
downloadnixlib-480416cc0d7e508b652c516af8d7342e3b1e59e3.tar
nixlib-480416cc0d7e508b652c516af8d7342e3b1e59e3.tar.gz
nixlib-480416cc0d7e508b652c516af8d7342e3b1e59e3.tar.bz2
nixlib-480416cc0d7e508b652c516af8d7342e3b1e59e3.tar.lz
nixlib-480416cc0d7e508b652c516af8d7342e3b1e59e3.tar.xz
nixlib-480416cc0d7e508b652c516af8d7342e3b1e59e3.tar.zst
nixlib-480416cc0d7e508b652c516af8d7342e3b1e59e3.zip
Merge branch 'nixos-unstable' of https://github.com/NixOS/nixpkgs into HEAD
Conflicts:
	nixpkgs/pkgs/servers/pr-tracker/default.nix
Diffstat (limited to 'nixpkgs/pkgs/by-name/mo/monophony/package.nix')
-rw-r--r--nixpkgs/pkgs/by-name/mo/monophony/package.nix71
1 files changed, 71 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/by-name/mo/monophony/package.nix b/nixpkgs/pkgs/by-name/mo/monophony/package.nix
new file mode 100644
index 000000000000..eecbbca3b3f2
--- /dev/null
+++ b/nixpkgs/pkgs/by-name/mo/monophony/package.nix
@@ -0,0 +1,71 @@
+{ lib
+, fetchFromGitLab
+, python3Packages
+, wrapGAppsHook4
+, gst_all_1
+, gobject-introspection
+, yt-dlp
+, libadwaita
+, libsoup_3
+, glib-networking
+}:
+python3Packages.buildPythonApplication rec {
+  pname = "monophony";
+  version = "2.3.1";
+  format = "other";
+
+  sourceRoot = "source/source";
+  src = fetchFromGitLab {
+    owner = "zehkira";
+    repo = "monophony";
+    rev = "v${version}";
+    hash = "sha256-dpRTHsujaIwzgr+qY5LC9xtXz40g3akdpEiHuxiilZM=";
+  };
+
+  pythonPath = with python3Packages; [
+    mpris-server
+    pygobject3
+    ytmusicapi
+  ];
+
+  nativeBuildInputs = [
+    python3Packages.nuitka
+    gobject-introspection
+    wrapGAppsHook4
+  ];
+
+  buildInputs =
+    [
+      libadwaita
+      # needed for gstreamer https
+      libsoup_3
+      glib-networking
+    ]
+    ++ (with gst_all_1; [
+      gst-plugins-base
+      gst-plugins-good
+      gstreamer
+    ]);
+
+  installFlags = [ "prefix=$(out)" ];
+
+  preFixup = ''
+    buildPythonPath "$pythonPath"
+    gappsWrapperArgs+=(
+      --prefix PYTHONPATH : "$program_PYTHONPATH"
+      --prefix PATH : "${lib.makeBinPath [yt-dlp]}"
+      # needed for gstreamer https
+      --prefix LD_LIBRARY_PATH : "${libsoup_3.out}/lib"
+    )
+  '';
+
+  meta = with lib; {
+    homepage = "https://gitlab.com/zehkira/monophony";
+    description = "Linux app for streaming music from YouTube";
+    longDescription = "Monophony is a free and open source Linux app for streaming music from YouTube. It has no ads and does not require an account.";
+    license = licenses.agpl3Plus;
+    mainProgram = "monophony";
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ quadradical ];
+  };
+}