nix-files/pkgs/additional/delfin/default.nix

85 lines
1.5 KiB
Nix
Raw Permalink Normal View History

2023-12-15 08:08:11 +00:00
{ lib
, stdenv
, appstream
, cargo
, desktop-file-utils
, fetchFromGitea
2023-12-19 17:43:07 +00:00
, gitUpdater
2023-12-15 08:08:11 +00:00
, gtk4
, libadwaita
, libglvnd
, libepoxy
, meson
, mpv-unwrapped
2023-12-15 08:08:11 +00:00
, ninja
, openssl
, pkg-config
, rustc
, rustPlatform
2023-12-15 08:30:20 +00:00
, wrapGAppsHook4
, devBuild ? false, git
2023-12-15 08:08:11 +00:00
}:
stdenv.mkDerivation rec {
pname = "delfin";
version = "0.4.0";
2023-12-15 08:08:11 +00:00
src = if devBuild then fetchFromGitea {
domain = "git.uninsane.org";
owner = "colin";
repo = "delfin";
rev = "dev-sane";
hash = "sha256-l/Lm9dUtYfWbf8BoqNodF/5s0FzxhI/dyPevcaeyPME=";
} else fetchFromGitea {
2023-12-15 08:08:11 +00:00
domain = "codeberg.org";
owner = "avery42";
repo = "delfin";
rev = "v${version}";
hash = "sha256-QwxdNPLL7PBokq5WaPylD4bBmXmJWyEQsWKN7DM2utk=";
2023-12-15 08:08:11 +00:00
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-ElB9TbfmYn/A1Y3+oQ752zHqkC+f2RJPxfGXH0m5C/E=";
2023-12-15 08:08:11 +00:00
};
nativeBuildInputs = [
2023-12-15 08:43:10 +00:00
appstream
2023-12-15 08:08:11 +00:00
desktop-file-utils
meson
ninja
pkg-config
rustPlatform.cargoSetupHook
cargo
rustc
2023-12-15 08:30:20 +00:00
wrapGAppsHook4
] ++ lib.optionals devBuild [
git
2023-12-15 08:08:11 +00:00
];
buildInputs = [
gtk4
libadwaita
libglvnd
libepoxy
mpv-unwrapped
2023-12-15 08:08:11 +00:00
openssl
];
mesonFlags = lib.optionals (!devBuild) [
2023-12-15 08:08:11 +00:00
"-Dprofile=release"
];
2023-12-19 17:43:07 +00:00
passthru.updateScript = gitUpdater {
rev-prefix = "v";
};
2023-12-15 08:08:11 +00:00
meta = with lib; {
description = "stream movies and TV shows from Jellyfin";
homepage = "https://www.delfin.avery.cafe/";
license = licenses.gpl3Only;
maintainers = with maintainers; [ colinsane ];
};
}