mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 17:33:09 +00:00
Merge pull request #93654 from Church-/jellyfin_10.6.0
jellyfin 10.5.5 -> 10.6.0
This commit is contained in:
commit
e7139f46cd
@ -16,6 +16,14 @@ in
|
||||
description = "User account under which Jellyfin runs.";
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
example = literalExample "pkgs.jellyfin";
|
||||
description = ''
|
||||
Jellyfin package to use.
|
||||
'';
|
||||
};
|
||||
|
||||
group = mkOption {
|
||||
type = types.str;
|
||||
default = "jellyfin";
|
||||
@ -35,11 +43,16 @@ in
|
||||
Group = cfg.group;
|
||||
StateDirectory = "jellyfin";
|
||||
CacheDirectory = "jellyfin";
|
||||
ExecStart = "${pkgs.jellyfin}/bin/jellyfin --datadir '/var/lib/${StateDirectory}' --cachedir '/var/cache/${CacheDirectory}'";
|
||||
ExecStart = "${cfg.package}/bin/jellyfin --datadir '/var/lib/${StateDirectory}' --cachedir '/var/cache/${CacheDirectory}'";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
};
|
||||
|
||||
services.jellyfin.package = mkDefault (
|
||||
if versionAtLeast config.system.stateVersion "20.09" then pkgs.jellyfin
|
||||
else pkgs.jellyfin_10_5
|
||||
);
|
||||
|
||||
users.users = mkIf (cfg.user == "jellyfin") {
|
||||
jellyfin = {
|
||||
group = cfg.group;
|
||||
|
61
pkgs/servers/jellyfin/10.5.x.nix
Normal file
61
pkgs/servers/jellyfin/10.5.x.nix
Normal file
@ -0,0 +1,61 @@
|
||||
{ stdenv, lib, fetchurl, unzip, sqlite, makeWrapper, dotnetCorePackages, ffmpeg,
|
||||
fontconfig, freetype, nixosTests }:
|
||||
|
||||
let
|
||||
os = if stdenv.isDarwin then "osx" else "linux";
|
||||
arch =
|
||||
with stdenv.hostPlatform;
|
||||
if isx86_32 then "x86"
|
||||
else if isx86_64 then "x64"
|
||||
else if isAarch32 then "arm"
|
||||
else if isAarch64 then "arm64"
|
||||
else lib.warn "Unsupported architecture, some image processing features might be unavailable" "unknown";
|
||||
musl = lib.optionalString stdenv.hostPlatform.isMusl
|
||||
(if (arch != "x64")
|
||||
then lib.warn "Some image processing features might be unavailable for non x86-64 with Musl" "musl-"
|
||||
else "musl-");
|
||||
runtimeDir = "${os}-${musl}${arch}";
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "jellyfin";
|
||||
version = "10.5.5";
|
||||
|
||||
# Impossible to build anything offline with dotnet
|
||||
src = fetchurl {
|
||||
url = "https://github.com/jellyfin/jellyfin/releases/download/v${version}/jellyfin_${version}_portable.tar.gz";
|
||||
sha256 = "1s3hva1j5w74qc9wyqnmr5clk4smzfi7wvx8qrzrwy81mx7r5w27";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
unzip
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
dotnetCorePackages.aspnetcore_3_1
|
||||
sqlite
|
||||
];
|
||||
|
||||
preferLocalBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
install -dm 755 "$out/opt/jellyfin"
|
||||
cp -r * "$out/opt/jellyfin"
|
||||
makeWrapper "${dotnetCorePackages.aspnetcore_3_1}/bin/dotnet" $out/bin/jellyfin \
|
||||
--prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [
|
||||
sqlite fontconfig freetype stdenv.cc.cc.lib
|
||||
]}:$out/opt/jellyfin/runtimes/${runtimeDir}/native/" \
|
||||
--add-flags "$out/opt/jellyfin/jellyfin.dll --ffmpeg ${ffmpeg}/bin/ffmpeg"
|
||||
'';
|
||||
|
||||
passthru.tests = {
|
||||
smoke-test = nixosTests.jellyfin;
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "The Free Software Media System";
|
||||
homepage = "https://jellyfin.org/";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ nyanloutre minijackson ];
|
||||
};
|
||||
}
|
@ -18,12 +18,12 @@ let
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "jellyfin";
|
||||
version = "10.5.5";
|
||||
version = "10.6.2";
|
||||
|
||||
# Impossible to build anything offline with dotnet
|
||||
src = fetchurl {
|
||||
url = "https://github.com/jellyfin/jellyfin/releases/download/v${version}/jellyfin_${version}_portable.tar.gz";
|
||||
sha256 = "1s3hva1j5w74qc9wyqnmr5clk4smzfi7wvx8qrzrwy81mx7r5w27";
|
||||
url = "https://repo.jellyfin.org/releases/server/portable/stable/combined/jellyfin_${version}.tar.gz";
|
||||
sha256 = "16yib2k9adch784p6p0whgfb6lrjzwiigg1n14cp88dx64hyhxhb";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
@ -41,7 +41,6 @@ in stdenv.mkDerivation rec {
|
||||
installPhase = ''
|
||||
install -dm 755 "$out/opt/jellyfin"
|
||||
cp -r * "$out/opt/jellyfin"
|
||||
|
||||
makeWrapper "${dotnetCorePackages.aspnetcore_3_1}/bin/dotnet" $out/bin/jellyfin \
|
||||
--prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [
|
||||
sqlite fontconfig freetype stdenv.cc.cc.lib
|
||||
@ -55,7 +54,7 @@ in stdenv.mkDerivation rec {
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "The Free Software Media System";
|
||||
homepage = "https://jellyfin.github.io/";
|
||||
homepage = "https://jellyfin.org/";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ nyanloutre minijackson ];
|
||||
};
|
||||
|
@ -2057,6 +2057,8 @@ in
|
||||
|
||||
jellyfin = callPackage ../servers/jellyfin { };
|
||||
|
||||
jellyfin_10_5 = callPackage ../servers/jellyfin/10.5.x.nix { };
|
||||
|
||||
jellyfin-mpv-shim = python3Packages.callPackage ../applications/video/jellyfin-mpv-shim { };
|
||||
|
||||
jotta-cli = callPackage ../applications/misc/jotta-cli { };
|
||||
|
Loading…
Reference in New Issue
Block a user