Merge remote-tracking branch 'origin/master' into staging-next
Conflicts: pkgs/shells/ion/default.nix pkgs/tools/misc/cicero-tui/default.nix
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "caddy";
|
||||
version = "2.4.0";
|
||||
version = "2.4.1";
|
||||
|
||||
subPackages = [ "cmd/caddy" ];
|
||||
|
||||
@@ -10,7 +10,7 @@ buildGoModule rec {
|
||||
owner = "caddyserver";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-gPw6o9B1jV1XQ86zlfrbJqUtVWMWArV8zMHIm6Wkz1M=";
|
||||
sha256 = "sha256-Wc7eNw5FZWoUT6IP84NhROC59bf4/RCw/gOWLuYI2dc=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-ZOrhR03m+cs+mTQio3qEIf+1B0IP0i2+x+vcml5AMco=";
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "dex";
|
||||
version = "2.27.0";
|
||||
version = "2.28.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "dexidp";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "0n66nm91qcmm00mz8f8x39xqr3y05qxk34fvka53s6xax1gxvxxi";
|
||||
sha256 = "sha256-MdrkQ4qclylkan8y845BjLiL+W16iqRuNMmvWsKo+zw=";
|
||||
};
|
||||
|
||||
vendorSha256 = "1k87q3ic02n2b632y3lmnclac1iaidmsl3f9py61myi5r02p03lp";
|
||||
vendorSha256 = "sha256-rAqqvnP72BQY/qbSvqNzxh2ZUlF/rP0MR/+yqJai+KY=";
|
||||
|
||||
subPackages = [
|
||||
"cmd/dex"
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "pdns-recursor";
|
||||
version = "4.4.3";
|
||||
version = "4.5.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://downloads.powerdns.com/releases/pdns-recursor-${version}.tar.bz2";
|
||||
sha256 = "01dypbqq6ynrdr3dqwbz8dzpkd2ykgaz9mqhaz3i1hqc21c14hgq";
|
||||
sha256 = "0yaf25jg3gfsi9c9rnxz1ywy3b563plv33aibxrq79iqwk8a289p";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
|
||||
enableParallelBuilding = true;
|
||||
|
||||
passthru.tests = {
|
||||
nixos = nixosTests.pdns-recursor;
|
||||
inherit (nixosTests) pdns-recursor ncdns;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
|
||||
@@ -1,7 +1,26 @@
|
||||
{ stdenv, lib, fetchurl, unzip, sqlite, makeWrapper, dotnetCorePackages, ffmpeg,
|
||||
fontconfig, freetype, nixosTests }:
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, fetchurl
|
||||
, linkFarmFromDrvs
|
||||
, makeWrapper
|
||||
, nixosTests
|
||||
, stdenv
|
||||
, dotnetCorePackages
|
||||
, dotnetPackages
|
||||
, ffmpeg
|
||||
, fontconfig
|
||||
, freetype
|
||||
, jellyfin-web
|
||||
, sqlite
|
||||
}:
|
||||
|
||||
let
|
||||
runtimeDeps = [
|
||||
ffmpeg
|
||||
fontconfig
|
||||
freetype
|
||||
];
|
||||
|
||||
os = if stdenv.isDarwin then "osx" else "linux";
|
||||
arch =
|
||||
with stdenv.hostPlatform;
|
||||
@@ -13,39 +32,82 @@ let
|
||||
musl = lib.optionalString stdenv.hostPlatform.isMusl
|
||||
(lib.warnIf (arch != "x64") "Some image processing features might be unavailable for non x86-64 with Musl"
|
||||
"musl-");
|
||||
runtimeDir = "${os}-${musl}${arch}";
|
||||
# https://docs.microsoft.com/en-us/dotnet/core/rid-catalog#using-rids
|
||||
runtimeId = "${os}-${musl}${arch}";
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
dotnet-sdk = dotnetCorePackages.sdk_5_0;
|
||||
dotnet-net = dotnetCorePackages.net_5_0;
|
||||
dotnet-aspnetcore = dotnetCorePackages.aspnetcore_5_0;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "jellyfin";
|
||||
version = "10.7.2";
|
||||
version = "10.7.5"; # ensure that jellyfin-web has matching version
|
||||
|
||||
# Impossible to build anything offline with dotnet
|
||||
src = fetchurl {
|
||||
url = "https://repo.jellyfin.org/releases/server/portable/versions/stable/combined/${version}/jellyfin_${version}.tar.gz";
|
||||
sha256 = "sha256-l2tQmKez06cekq/QLper+OrcSU/0lWpZ85xY2wZcK1s=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "jellyfin";
|
||||
repo = "jellyfin";
|
||||
rev = "v${version}";
|
||||
sha256 = "DlbNZpomNki9zrfG0C7He0Xrq79vx4Rn8ixpekvk34E=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
unzip
|
||||
dotnet-sdk
|
||||
dotnetPackages.Nuget
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
dotnetCorePackages.aspnetcore_5_0
|
||||
dotnet-aspnetcore
|
||||
sqlite
|
||||
];
|
||||
|
||||
preferLocalBuild = true;
|
||||
nugetDeps = linkFarmFromDrvs "${pname}-nuget-deps" (import ./nuget-deps.nix {
|
||||
fetchNuGet = { name, version, sha256 }: fetchurl {
|
||||
name = "nuget-${name}-${version}.nupkg";
|
||||
url = "https://www.nuget.org/api/v2/package/${name}/${version}";
|
||||
inherit sha256;
|
||||
};
|
||||
});
|
||||
|
||||
configurePhase = ''
|
||||
runHook preConfigure
|
||||
|
||||
export HOME=$(mktemp -d)
|
||||
|
||||
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||
export DOTNET_NOLOGO=1
|
||||
|
||||
nuget sources Add -Name nixos -Source "$PWD/nixos"
|
||||
nuget init "$nugetDeps" "$PWD/nixos"
|
||||
|
||||
# FIXME: https://github.com/NuGet/Home/issues/4413
|
||||
mkdir -p $HOME/.nuget/NuGet
|
||||
cp $HOME/.config/NuGet/NuGet.Config $HOME/.nuget/NuGet
|
||||
|
||||
runHook postConfigure
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
dotnet publish Jellyfin.Server \
|
||||
--configuration Release \
|
||||
--runtime ${runtimeId} \
|
||||
--no-self-contained \
|
||||
--output $out/opt/jellyfin
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
install -dm 755 "$out/opt/jellyfin"
|
||||
cp -r * "$out/opt/jellyfin"
|
||||
makeWrapper "${dotnetCorePackages.aspnetcore_5_0}/bin/dotnet" $out/bin/jellyfin \
|
||||
--prefix LD_LIBRARY_PATH : "${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"
|
||||
|
||||
makeWrapper ${dotnet-aspnetcore}/bin/dotnet $out/bin/jellyfin \
|
||||
--suffix LD_LIBRARY_PATH : "${lib.makeLibraryPath runtimeDeps}" \
|
||||
--add-flags "$out/opt/jellyfin/jellyfin.dll" \
|
||||
--add-flags "--ffmpeg ${ffmpeg}/bin/ffmpeg" \
|
||||
--add-flags "--webdir ${jellyfin-web}/share/jellyfin-web"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
@@ -53,11 +115,13 @@ in stdenv.mkDerivation rec {
|
||||
smoke-test = nixosTests.jellyfin;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
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 ];
|
||||
maintainers = with maintainers; [ nyanloutre minijackson purcell jojosch ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# This file has been generated by node2nix 1.9.0. Do not edit!
|
||||
|
||||
{pkgs ? import <nixpkgs> {
|
||||
inherit system;
|
||||
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-12_x"}:
|
||||
|
||||
let
|
||||
nodeEnv = import ../../development/node-packages/node-env.nix {
|
||||
inherit (pkgs) stdenv lib python2 runCommand writeTextFile;
|
||||
inherit pkgs nodejs;
|
||||
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
|
||||
};
|
||||
in
|
||||
import ./node-deps.nix {
|
||||
inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit;
|
||||
inherit nodeEnv;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Executable
+52
@@ -0,0 +1,52 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl jq common-updater-scripts dotnetCorePackages.sdk_5_0 gnused nix coreutils findutils
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||
export DOTNET_NOLOGO=1
|
||||
|
||||
latestVersion="$(curl -s "https://api.github.com/repos/jellyfin/jellyfin/releases?per_page=1" | jq -r ".[0].tag_name" | sed 's/^v//')"
|
||||
currentVersion=$(nix-instantiate --eval -E "with import ./. {}; jellyfin.version or (lib.getVersion jellyfin)" | tr -d '"')
|
||||
|
||||
if [[ "$currentVersion" == "$latestVersion" ]]; then
|
||||
echo "jellyfin is up-to-date: $currentVersion"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
pushd "$(dirname "${BASH_SOURCE[0]}")"
|
||||
nugetDepsFile=$(realpath ./nuget-deps.nix)
|
||||
popd
|
||||
|
||||
update-source-version jellyfin "$latestVersion"
|
||||
|
||||
store_src="$(nix-build . -A jellyfin.src --no-out-link)"
|
||||
src="$(mktemp -d /tmp/jellyfin-src.XXX)"
|
||||
echo "Temp src dir: $src"
|
||||
cp -rT "$store_src" "$src"
|
||||
chmod -R +w "$src"
|
||||
|
||||
pushd "$src"
|
||||
|
||||
mkdir ./nuget_tmp.packages
|
||||
dotnet restore Jellyfin.Server --packages ./nuget_tmp.packages --runtime linux-x64
|
||||
|
||||
echo "# This file has been generated by the jellyfin updateScript. Do not edit!" >"$nugetDepsFile"
|
||||
echo "{ fetchNuGet }: [" >>"$nugetDepsFile"
|
||||
while read -r pkg_spec; do
|
||||
{ read -r pkg_name; read -r pkg_version; } < <(
|
||||
# Build version part should be ignored: `3.0.0-beta2.20059.3+77df2220` -> `3.0.0-beta2.20059.3`
|
||||
sed -nE 's/.*<id>([^<]*).*/\1/p; s/.*<version>([^<+]*).*/\1/p' "$pkg_spec")
|
||||
pkg_sha256="$(nix-hash --type sha256 --flat --base32 "$(dirname "$pkg_spec")"/*.nupkg)"
|
||||
cat >>"$nugetDepsFile" <<EOF
|
||||
(fetchNuGet {
|
||||
name = "$pkg_name";
|
||||
version = "$pkg_version";
|
||||
sha256 = "$pkg_sha256";
|
||||
})
|
||||
EOF
|
||||
done < <(find ./nuget_tmp.packages -name '*.nuspec' | sort)
|
||||
echo "]" >>"$nugetDepsFile"
|
||||
|
||||
popd
|
||||
rm -r "$src"
|
||||
Executable
+30
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl common-updater-scripts nodePackages.node2nix gnused nix coreutils jq
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
latestVersion="$(curl -s "https://api.github.com/repos/jellyfin/jellyfin-web/releases?per_page=1" | jq -r ".[0].tag_name" | sed 's/^v//')"
|
||||
currentVersion=$(nix-instantiate --eval -E "with import ./. {}; jellyfin-web.version or (lib.getVersion jellyfin-web)" | tr -d '"')
|
||||
|
||||
if [[ "$currentVersion" == "$latestVersion" ]]; then
|
||||
echo "jellyfin-web is up-to-date: $currentVersion"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
update-source-version jellyfin-web 0 0000000000000000000000000000000000000000000000000000000000000000
|
||||
update-source-version jellyfin-web "$latestVersion"
|
||||
|
||||
# use patched source
|
||||
store_src="$(nix-build . -A jellyfin-web.src --no-out-link)"
|
||||
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")"
|
||||
|
||||
# TODO: use package-lock.json on the next major release
|
||||
# https://github.com/jellyfin/jellyfin-web/commit/6efef9680d55a93f4333ef8bfb65a8a650c99a49
|
||||
node2nix \
|
||||
--nodejs-12 \
|
||||
--development \
|
||||
--node-env ../../development/node-packages/node-env.nix \
|
||||
--output ./node-deps.nix \
|
||||
--input "$store_src/package.json" \
|
||||
--composition ./node-composition.nix
|
||||
@@ -0,0 +1,81 @@
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, pkgs
|
||||
, stdenv
|
||||
, nodejs
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "jellyfin-web";
|
||||
version = "10.7.5";
|
||||
# TODO: on the next major release remove src.postFetch
|
||||
# and use the lock file in web-update.sh:
|
||||
# https://github.com/jellyfin/jellyfin-web/commit/6efef9680d55a93f4333ef8bfb65a8a650c99a49
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jellyfin";
|
||||
repo = "jellyfin-web";
|
||||
rev = "v${version}";
|
||||
sha256 = "5y6hWEDxY5WbOUdjujmuMV3bQVvYU2J9oIANBVN5XOc=";
|
||||
postFetch = ''
|
||||
mkdir -p $out
|
||||
cd $out
|
||||
tar -xzf $downloadedFile --strip-components=1
|
||||
|
||||
# replace unsupported dependency url
|
||||
# https://github.com/svanderburg/node2nix/issues/163
|
||||
substituteInPlace package.json \
|
||||
--replace \
|
||||
"https://github.com/jellyfin/JavascriptSubtitlesOctopus#4.0.0-jf-smarttv" \
|
||||
"https://github.com/jellyfin/JavascriptSubtitlesOctopus/archive/refs/tags/4.0.0-jf-smarttv.tar.gz"
|
||||
'';
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
nodejs
|
||||
];
|
||||
|
||||
buildPhase =
|
||||
let
|
||||
nodeDependencies = ((import ./node-composition.nix {
|
||||
inherit pkgs nodejs;
|
||||
inherit (stdenv.hostPlatform) system;
|
||||
}).nodeDependencies.override (old: {
|
||||
# access to path '/nix/store/...-source' is forbidden in restricted mode
|
||||
src = src;
|
||||
|
||||
# dont run the prepare script:
|
||||
# Error: Cannot find module '/nix/store/...-node-dependencies-jellyfin-web-.../jellyfin-web/scripts/prepare.js
|
||||
# npm run build:production runs the same command
|
||||
dontNpmInstall = true;
|
||||
}));
|
||||
in
|
||||
''
|
||||
runHook preBuild
|
||||
|
||||
ln -s ${nodeDependencies}/lib/node_modules ./node_modules
|
||||
export PATH="${nodeDependencies}/bin:$PATH"
|
||||
|
||||
npm run build:production
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/share
|
||||
cp -a dist $out/share/jellyfin-web
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru.updateScript = ./web-update.sh;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Web Client for Jellyfin";
|
||||
homepage = "https://jellyfin.org/";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ nyanloutre minijackson purcell jojosch ];
|
||||
};
|
||||
}
|
||||
@@ -13,6 +13,8 @@ stdenv.mkDerivation rec {
|
||||
nativeBuildInputs = [ jre makeWrapper unzip ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -d -m 755 "$out/lib/${pname}"
|
||||
cp -dpr --no-preserve=ownership "lib" "readme.md" "$out/lib/nzbhydra2"
|
||||
install -D -m 755 "nzbhydra2wrapperPy3.py" "$out/lib/nzbhydra2/nzbhydra2wrapperPy3.py"
|
||||
@@ -20,6 +22,8 @@ stdenv.mkDerivation rec {
|
||||
makeWrapper ${python3}/bin/python $out/bin/nzbhydra2 \
|
||||
--add-flags "$out/lib/nzbhydra2/nzbhydra2wrapperPy3.py" \
|
||||
--prefix PATH ":" ${jre}/bin
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
||||
Reference in New Issue
Block a user