Skip to content

Commit

Permalink
jellyseerr: 1.9.2 -> 2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
coonce committed Dec 1, 2024
1 parent 970e93b commit 6657d09
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 363 deletions.
4 changes: 2 additions & 2 deletions nixos/modules/services/misc/jellyseerr.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ in
serviceConfig = {
Type = "exec";
StateDirectory = "jellyseerr";
WorkingDirectory = "${cfg.package}/libexec/jellyseerr/deps/jellyseerr";
WorkingDirectory = "${cfg.package}/share";
DynamicUser = true;
ExecStart = lib.getExe cfg.package;
BindPaths = [ "/var/lib/jellyseerr/:${cfg.package}/libexec/jellyseerr/deps/jellyseerr/config/" ];
BindPaths = [ "/var/lib/jellyseerr/:${cfg.package}/share/config/" ];
Restart = "on-failure";
ProtectHome = true;
ProtectSystem = "strict";
Expand Down
92 changes: 92 additions & 0 deletions pkgs/by-name/je/jellyseerr/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
{
lib,
pnpm_9,
fetchFromGitHub,
stdenv,
makeWrapper,
nodejs,
python3,
sqlite,
srcOnly,
nix-update-script,
}:

stdenv.mkDerivation (finalAttrs: {
pname = "jellyseerr";
version = "2.1.0";

src = fetchFromGitHub {
owner = "Fallenbagel";
repo = "jellyseerr";
rev = "v${finalAttrs.version}";
hash = "sha256-5kaeqhjUy9Lgx4/uFcGRlAo+ROEOdTWc2m49rq8R8Hs=";
};

pnpmDeps = pnpm_9.fetchDeps {
inherit (finalAttrs) pname version src;
hash = "sha256-xu6DeaBArQmnqEnIgjc1DTZujQebSkjuai9tMHeQWCk=";
};

buildInputs = [
sqlite
];

nativeBuildInputs = [
python3
nodejs
makeWrapper
pnpm_9.configHook
];

preBuild = ''
export npm_config_nodedir=${srcOnly nodejs}
pushd node_modules
pnpm rebuild bcrypt sqlite3
popd
'';

buildPhase = ''
runHook preBuild
pnpm build
pnpm prune --prod --ignore-scripts
rm -r .next/cache
rm -r config/*
# Clean up broken symlinks left behind by `pnpm prune`
find node_modules/.bin -xtype l -delete
runHook postBuild
'';

installPhase = ''
runHook preInstall
mkdir -p $out/share
cp -r . $out/share
runHook postInstall
'';

postInstall = ''
mkdir -p $out/bin
makeWrapper '${nodejs}/bin/node' "$out/bin/jellyseerr" \
--add-flags "$out/share/dist/index.js" \
--set NODE_ENV production
'';

passthru.updateScript = nix-update-script { };

meta = with lib; {
description = "Fork of overseerr for jellyfin support";
homepage = "https://github.com/Fallenbagel/jellyseerr";
longDescription = ''
Jellyseerr is a free and open source software application for managing
requests for your media library. It is a a fork of Overseerr built to
bring support for Jellyfin & Emby media servers!
'';
license = licenses.mit;
maintainers = with maintainers; [ camillemndn ];
platforms = platforms.linux;
mainProgram = "jellyseerr";
};
})
96 changes: 0 additions & 96 deletions pkgs/servers/jellyseerr/default.nix

This file was deleted.

Loading

0 comments on commit 6657d09

Please sign in to comment.