···
+
version = "2.0.0-rc.4";
+
src = fetchFromGitHub {
+
hash = "sha256-RUOIOXrpoNGxoKwUlgkPsk4kTnA95E+iwYIjBzSBoTA=";
+
description = "Kanban-style project mastering tool for everyone";
+
homepage = "https://docs.planka.cloud/";
+
fullName = "Planka Community License";
+
url = "https://github.com/plankanban/planka/blob/master/LICENSE.md";
+
redistributable = true;
+
maintainers = with lib.maintainers; [ pyrox0 ];
+
frontend = stdenv.mkDerivation (finalAttrs: {
+
pname = "planka-frontend";
+
inherit version src meta;
+
sourceRoot = "${finalAttrs.src.name}/client";
+
npmDeps = fetchNpmDeps {
+
inherit (finalAttrs) src sourceRoot;
+
hash = "sha256-XtVwO8253XBVtG0jrikeVr1yaS1PpphCbN5B6jz54qc=";
+
# Replace dart path in sass-embedded since node_modules doesn't have the native binary
+
substituteInPlace node_modules/sass-embedded/dist/lib/src/compiler-path.js \
+
--replace-fail 'compilerCommand = (() => {' 'compilerCommand = (() => { return ["${lib.getExe dart-sass}"];'
+
serverPython = python3.withPackages (ps: [ ps.apprise ]);
+
stdenv.mkDerivation (finalAttrs: {
+
inherit version src meta;
+
sourceRoot = "${finalAttrs.src.name}/server";
+
npmDeps = fetchNpmDeps {
+
inherit (finalAttrs) src sourceRoot;
+
hash = "sha256-yW9uzPALGdPrrUV129ToXayLyeLbAK9mCl2emCPYUdc=";
+
npmFlags = [ "--ignore-scripts" ];
+
# Patch notifs helper to use nixpkgs' python
+
substituteInPlace api/helpers/utils/send-notifications.js \
+
--replace-fail '(`$' '(`' \
+
--replace-fail "{sails.config.appPath}/.venv/bin/python3" "${lib.getExe serverPython}"
+
npm prune --omit=dev --no-save $npmFlags "$${npmFlagsArray[@]}"
+
find node_modules -maxdepth 1 -type d -empty -delete
+
mkdir -p $out/lib/node_modules/planka
+
mv * $out/lib/node_modules/planka
+
cp -t $out/lib/node_modules/planka/public -r ${frontend}/dist/*
+
cp ${frontend}/dist/index.html $out/lib/node_modules/planka/views/index.html
+
ln -s $out/lib/node_modules/planka/start.sh $out/bin/planka
+
passthru.updateScript = nix-update-script { extraArgs = [ "--version=unstable" ]; };