3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/servers/jellyfin/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

69 lines
1.5 KiB
Nix
Raw Normal View History

2021-04-24 12:43:46 +01:00
{ lib
, fetchFromGitHub
, fetchurl
, nixosTests
, stdenv
, dotnetCorePackages
2022-03-28 09:48:16 +01:00
, buildDotnetModule
2021-04-24 12:43:46 +01:00
, ffmpeg
, fontconfig
, freetype
, jellyfin-web
, sqlite
}:
2022-03-28 09:48:16 +01:00
buildDotnetModule rec {
2019-03-07 21:22:37 +00:00
pname = "jellyfin";
2022-11-30 17:54:50 +00:00
version = "10.8.8"; # ensure that jellyfin-web has matching version
2019-03-07 21:22:37 +00:00
2021-04-24 12:43:46 +01:00
src = fetchFromGitHub {
owner = "jellyfin";
repo = "jellyfin";
rev = "v${version}";
2022-11-30 17:54:50 +00:00
sha256 = "3+JwcHZGENX9PgHdtRmzffi6p2p68Ngs3WOiEwAY8zU=";
2019-03-07 21:22:37 +00:00
};
2022-03-28 09:48:16 +01:00
patches = [
# when building some warnings are reported as error and fail the build.
./disable-warnings.patch
2019-03-07 21:22:37 +00:00
];
propagatedBuildInputs = [
sqlite
];
2022-03-28 09:48:16 +01:00
projectFile = "Jellyfin.Server/Jellyfin.Server.csproj";
executables = [ "jellyfin" ];
nugetDeps = ./nuget-deps.nix;
runtimeDeps = [
ffmpeg
fontconfig
freetype
];
dotnet-sdk = dotnetCorePackages.sdk_6_0;
dotnet-runtime = dotnetCorePackages.aspnetcore_6_0;
dotnetBuildFlags = [ "--no-self-contained" ];
preInstall = ''
makeWrapperArgs+=(
--add-flags "--ffmpeg ${ffmpeg}/bin/ffmpeg"
2021-04-24 12:43:46 +01:00
--add-flags "--webdir ${jellyfin-web}/share/jellyfin-web"
2022-03-28 09:48:16 +01:00
)
2019-03-07 21:22:37 +00:00
'';
2020-04-13 11:47:26 +01:00
passthru.tests = {
smoke-test = nixosTests.jellyfin;
};
2021-04-24 12:43:46 +01:00
passthru.updateScript = ./update.sh;
meta = with lib; {
2019-03-07 21:22:37 +00:00
description = "The Free Software Media System";
homepage = "https://jellyfin.org/";
# https://github.com/jellyfin/jellyfin/issues/610#issuecomment-537625510
license = licenses.gpl2Plus;
2021-04-24 12:43:46 +01:00
maintainers = with maintainers; [ nyanloutre minijackson purcell jojosch ];
2022-03-28 09:48:16 +01:00
platforms = dotnet-runtime.meta.platforms;
2019-03-07 21:22:37 +00:00
};
}