2024-06-24 18:47:55 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
mkYarnPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
fetchYarnDeps,
|
|
|
|
makeWrapper,
|
|
|
|
nodejs,
|
|
|
|
python3,
|
|
|
|
sqlite,
|
2023-03-15 16:39:30 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
mkYarnPackage rec {
|
|
|
|
pname = "jellyseerr";
|
2024-07-01 15:47:52 +00:00
|
|
|
version = "1.9.2";
|
2023-03-15 16:39:30 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Fallenbagel";
|
|
|
|
repo = "jellyseerr";
|
|
|
|
rev = "v${version}";
|
2024-07-01 15:47:52 +00:00
|
|
|
hash = "sha256-TXe/k/pb7idu7G1wGu6TZksnoFQ5/PN0voVlve3k1UI=";
|
2023-03-15 16:39:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
packageJSON = ./package.json;
|
|
|
|
|
|
|
|
offlineCache = fetchYarnDeps {
|
|
|
|
yarnLock = "${src}/yarn.lock";
|
2024-07-01 15:47:52 +00:00
|
|
|
hash = "sha256-2iRxguxEI+YKm8ddhRgZMvfZuUgQmCK5ER4jMCFJQMQ=";
|
2023-03-15 16:39:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
nodejs
|
|
|
|
makeWrapper
|
|
|
|
];
|
|
|
|
|
|
|
|
# Fixes "SQLite package has not been found installed" at launch
|
|
|
|
pkgConfig.sqlite3 = {
|
2024-06-24 18:47:55 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
nodejs.pkgs.node-pre-gyp
|
|
|
|
python3
|
|
|
|
sqlite
|
|
|
|
];
|
2023-03-15 16:39:30 +00:00
|
|
|
postInstall = ''
|
|
|
|
export CPPFLAGS="-I${nodejs}/include/node"
|
2024-06-24 18:47:55 +00:00
|
|
|
node-pre-gyp install --prefer-offline --build-from-source --nodedir=${nodejs}/include/node --sqlite=${sqlite.dev}
|
2023-03-15 16:39:30 +00:00
|
|
|
rm -r build-tmp-napi-v6
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
pkgConfig.bcrypt = {
|
2024-06-24 18:47:55 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
nodejs.pkgs.node-pre-gyp
|
|
|
|
python3
|
|
|
|
];
|
2023-03-15 16:39:30 +00:00
|
|
|
postInstall = ''
|
|
|
|
export CPPFLAGS="-I${nodejs}/include/node"
|
|
|
|
node-pre-gyp install --prefer-offline --build-from-source --nodedir=${nodejs}/include/node
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
(
|
|
|
|
shopt -s dotglob
|
|
|
|
cd deps/jellyseerr
|
|
|
|
rm -r config/*
|
|
|
|
yarn build
|
|
|
|
rm -r .next/cache
|
|
|
|
)
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
makeWrapper '${nodejs}/bin/node' "$out/bin/jellyseerr" \
|
|
|
|
--add-flags "$out/libexec/jellyseerr/deps/jellyseerr/dist/index.js" \
|
|
|
|
--set NODE_ENV production
|
|
|
|
'';
|
|
|
|
|
2024-06-24 18:47:55 +00:00
|
|
|
doDist = false;
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
passthru.updateScript = ./update.sh;
|
|
|
|
|
|
|
|
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;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "jellyseerr";
|
2023-03-15 16:39:30 +00:00
|
|
|
};
|
|
|
|
}
|