about summary refs log tree commit diff
path: root/pkgs/by-name/de
diff options
context:
space:
mode:
authorColin <colin@uninsane.org>2023-12-20 09:43:46 +0000
committerWeijia Wang <9713184+wegank@users.noreply.github.com>2024-02-05 00:38:21 +0100
commitd8c12720e33c81f1133da0ca02d7c9f862d48268 (patch)
tree54a83e281d521b3560d99104674dca2c1f120290 /pkgs/by-name/de
parent8949eb60a87713593e288d8b65bfcc6ac0e895e5 (diff)
delfin: init at 0.3.0
Diffstat (limited to 'pkgs/by-name/de')
-rw-r--r--pkgs/by-name/de/delfin/package.nix84
1 files changed, 84 insertions, 0 deletions
diff --git a/pkgs/by-name/de/delfin/package.nix b/pkgs/by-name/de/delfin/package.nix
new file mode 100644
index 0000000000000..b494f6890d8ce
--- /dev/null
+++ b/pkgs/by-name/de/delfin/package.nix
@@ -0,0 +1,84 @@
+{ lib
+, stdenv
+, appstream
+, cargo
+, desktop-file-utils
+, fetchFromGitea
+, gitUpdater
+, gtk4
+, libadwaita
+, libepoxy
+, libglvnd
+, meson
+, mpv
+, ninja
+, openssl
+, pkg-config
+, rustPlatform
+, rustc
+, wrapGAppsHook4
+}:
+
+stdenv.mkDerivation rec {
+  pname = "delfin";
+  version = "0.3.0";
+
+  src = fetchFromGitea {
+    domain = "codeberg.org";
+    owner = "avery42";
+    repo = "delfin";
+    rev = "v${version}";
+    hash = "sha256-1Q3Aywf80CCXxorWSymwxJwMU1I4k7juDoWG5J18AXY=";
+  };
+
+  cargoDeps = rustPlatform.fetchCargoTarball {
+    inherit src;
+    name = "${pname}-${version}";
+    hash = "sha256-/RZD4b7hrbC1Z5MtHDdib5TFEmxAh9odjNPo4m+FqK4=";
+  };
+
+  # upstream pinned the linker to clang/mold through 0.3.0, unnecessarily.
+  # remove this patch for version > 0.3.0.
+  # see: <https://codeberg.org/avery42/delfin/commit/e6deee77e9a6a6ba2425d1cc88dcbdeb471d1fdc>
+  postPatch = ''
+    rm .cargo/config.toml
+  '';
+
+  nativeBuildInputs = [
+    appstream
+    desktop-file-utils
+    meson
+    ninja
+    pkg-config
+    rustPlatform.cargoSetupHook
+    cargo
+    rustc
+    wrapGAppsHook4
+  ];
+
+  buildInputs = [
+    gtk4
+    libadwaita
+    libglvnd
+    libepoxy
+    mpv
+    openssl
+  ];
+
+  mesonFlags = [
+    (lib.mesonOption "profile" "release")
+  ];
+
+  passthru.updateScript = gitUpdater {
+    rev-prefix = "v";
+  };
+
+  meta = with lib; {
+    description = "Stream movies and TV shows from Jellyfin";
+    homepage = "https://www.delfin.avery.cafe/";
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ colinsane ];
+    mainProgram = "delfin";
+    platforms = platforms.linux;
+  };
+}