{ buildNpmPackage, fetchFromGitHub, nodePackages, lib, writeShellScriptBin, }: buildNpmPackage { pname = "spliit2"; version = "master-20250420"; src = fetchFromGitHub { repo = "spliit"; owner = "spliit-app"; rev = "a11efc79c13298c0d282e47496d132538752405f"; hash = "sha256-v4gaPzLzBbbqw/LDYxe1fiyficcrqcGOop23YPiTrdc="; }; npmDepsHash = "sha256-sd0/7ruNUFxUKTeTwx/v8Vc/G3llkXP6RSDE78h3qVU="; npmRebuildFlags = ["--ignore-scripts"]; doCheck = false; postPatch = '' cp -v .env.example .env ''; # nixpkgs/pkgs/applications/office/documenso/default.nix (git)-[master] 05:36:05 preBuild = '' # somehow for linux, npm is not finding the prisma package with the # packages installed with the lockfile. # This generates a prisma version incompatibility warning and is a kludge # until the upstream package-lock is modified. ${lib.getExe nodePackages.prisma} generate ''; postInstall = '' install -Dvm755 -t $out/bin ${lib.getExe (writeShellScriptBin "spliit2" '' set -euxo pipefail cd @out@/lib/node_modules/spliit2 export PATH="$PWD/node_modules/.bin:$PATH" export NEXT_TELEMETRY_DISABLED=1 prisma migrate deploy exec next start '')} #kk? #${lib.getExe nodePackages.prisma} migrate deploy substituteInPlace $out/bin/spliit2 \ --replace @out@ $out ''; meta = { description = "Free and Open Source Alternative to Splitwise. Share expenses with your friends and family."; homepage = "https://spliit.app"; license = lib.licenses.mit; maintainers = with lib.maintainers; []; }; }