depot/third_party/nixpkgs/pkgs/servers/jellyfin/default.nix
Default email 5c370c0b2a Project import generated by Copybara.
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
2024-05-15 17:35:15 +02:00

64 lines
1.4 KiB
Nix

{ lib
, fetchFromGitHub
, fetchurl
, nixosTests
, stdenv
, dotnetCorePackages
, buildDotnetModule
, ffmpeg
, fontconfig
, freetype
, jellyfin-web
, sqlite
}:
buildDotnetModule rec {
pname = "jellyfin";
version = "10.9.1"; # ensure that jellyfin-web has matching version
src = fetchFromGitHub {
owner = "jellyfin";
repo = "jellyfin";
rev = "v${version}";
sha256 = "sha256-ZvXz4gnpYE9bMvOHbmLhqJLUomPmk1K9ysw+Wlsyhr4=";
};
propagatedBuildInputs = [
sqlite
];
projectFile = "Jellyfin.Server/Jellyfin.Server.csproj";
executables = [ "jellyfin" ];
nugetDeps = ./nuget-deps.nix;
runtimeDeps = [
ffmpeg
fontconfig
freetype
];
dotnet-sdk = dotnetCorePackages.sdk_8_0;
dotnet-runtime = dotnetCorePackages.aspnetcore_8_0;
dotnetBuildFlags = [ "--no-self-contained" ];
preInstall = ''
makeWrapperArgs+=(
--add-flags "--ffmpeg ${ffmpeg}/bin/ffmpeg"
--add-flags "--webdir ${jellyfin-web}/share/jellyfin-web"
)
'';
passthru.tests = {
smoke-test = nixosTests.jellyfin;
};
passthru.updateScript = ./update.sh;
meta = with lib; {
description = "The Free Software Media System";
homepage = "https://jellyfin.org/";
# https://github.com/jellyfin/jellyfin/issues/610#issuecomment-537625510
license = licenses.gpl2Plus;
maintainers = with maintainers; [ nyanloutre minijackson purcell jojosch ];
mainProgram = "jellyfin";
platforms = dotnet-runtime.meta.platforms;
};
}