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

81 lines
1.4 KiB
Nix
Raw 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
, ninja
, openssl
, pkg-config
, rustc
, rustPlatform
2023-12-15 08:30:20 +00:00
, wrapGAppsHook4
2023-12-15 08:08:11 +00:00
}:
stdenv.mkDerivation rec {
pname = "delfin";
2024-02-21 09:04:49 +00:00
version = "0.4.1";
2023-12-15 08:08:11 +00:00
src = fetchFromGitea {
domain = "codeberg.org";
owner = "avery42";
repo = "delfin";
rev = "v${version}";
2024-02-21 09:04:49 +00:00
hash = "sha256-LBdHWEGz6dujcF3clrJbViohgiBTyWR7Y70totimVJ8=";
2023-12-15 08:08:11 +00:00
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
2024-02-21 09:04:49 +00:00
hash = "sha256-TaUYqq4rkMBXhIM+0ZH6O0F+SUOpT1ImgLx2HCzJPrM=";
2023-12-15 08:08:11 +00:00
};
2024-02-21 09:04:49 +00:00
postPatch = ''
substituteInPlace delfin/Cargo.toml \
--replace-warn 'rust-version = "1.76.0"' 'rust-version = "1.75.0"'
'';
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
2023-12-15 08:08:11 +00:00
];
buildInputs = [
gtk4
libadwaita
libglvnd
libepoxy
mpv
openssl
];
mesonFlags = [
"-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 ];
};
}