about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/audio/jellycli
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2022-03-15 10:36:38 +0000
committerAlyssa Ross <hi@alyssa.is>2022-03-16 11:37:19 +0000
commitd435710923ac6e6f9fc155534800745004f2ce93 (patch)
tree386f9401476f96bdc6ec25173a090198942b5d5b /nixpkgs/pkgs/applications/audio/jellycli
parentc725f0011e91ae49d351b981690eb66b862b6104 (diff)
parent3239fd2b8f728106491154b44625662e10259af2 (diff)
downloadnixlib-d435710923ac6e6f9fc155534800745004f2ce93.tar
nixlib-d435710923ac6e6f9fc155534800745004f2ce93.tar.gz
nixlib-d435710923ac6e6f9fc155534800745004f2ce93.tar.bz2
nixlib-d435710923ac6e6f9fc155534800745004f2ce93.tar.lz
nixlib-d435710923ac6e6f9fc155534800745004f2ce93.tar.xz
nixlib-d435710923ac6e6f9fc155534800745004f2ce93.tar.zst
nixlib-d435710923ac6e6f9fc155534800745004f2ce93.zip
Merge commit '3239fd2b8f728106491154b44625662e10259af2'
Conflicts:
	nixpkgs/pkgs/applications/window-managers/sway/default.nix
Diffstat (limited to 'nixpkgs/pkgs/applications/audio/jellycli')
-rw-r--r--nixpkgs/pkgs/applications/audio/jellycli/default.nix33
-rw-r--r--nixpkgs/pkgs/applications/audio/jellycli/fix-test-dir.patch13
2 files changed, 46 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/audio/jellycli/default.nix b/nixpkgs/pkgs/applications/audio/jellycli/default.nix
new file mode 100644
index 000000000000..cfb9deb58726
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/jellycli/default.nix
@@ -0,0 +1,33 @@
+{ lib, fetchFromGitHub, buildGoModule, alsa-lib }:
+
+buildGoModule rec {
+  pname = "jellycli";
+  version = "0.9.1";
+
+  src = fetchFromGitHub {
+    owner = "tryffel";
+    repo = "jellycli";
+    rev = "v${version}";
+    sha256 = "1awzcxnf175a794rhzbmqxxjss77mfa1yrr0wgdxaivrlkibxjys";
+  };
+
+  vendorSha256 = "02fwsnrhj09m0aa199plpqlsjrwpmrk4c80fszzm07s5vmjqvnfy";
+
+  patches = [
+    # Fixes log file path for tests.
+    ./fix-test-dir.patch
+  ];
+
+  buildInputs = [ alsa-lib ];
+
+  meta = with lib; {
+    description = "Jellyfin terminal client";
+    longDescription = ''
+      Terminal music player, works with Jellyfin (>= 10.6) , Emby (>= 4.4), and
+      Subsonic comptabile servers (API >= 1.16), e.g., Navidrome.
+    '';
+    homepage = "https://github.com/tryffel/jellycli";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ oxzi ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/jellycli/fix-test-dir.patch b/nixpkgs/pkgs/applications/audio/jellycli/fix-test-dir.patch
new file mode 100644
index 000000000000..83cacfe9af0c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/jellycli/fix-test-dir.patch
@@ -0,0 +1,13 @@
+diff --git a/config/config_test.go b/config/config_test.go
+index 9f63a7e..7e790b8 100644
+--- a/config/config_test.go
++++ b/config/config_test.go
+@@ -110,7 +110,7 @@ func TestInitEmptyConfig(t *testing.T) {
+ 		Subsonic: Subsonic{},
+ 		Player: Player{
+ 			Server:                "jellyfin",
+-			LogFile:               "/tmp/jellycli.log",
++			LogFile:               "/build/jellycli.log",
+ 			LogLevel:              "info",
+ 			AudioBufferingMs:      150,
+ 			HttpBufferingS:        5,