paisa: implement feedback

This commit is contained in:
Sebastian Kowalak 2025-07-01 18:38:29 +02:00
parent 322ba968e1
commit a5531469e5
No known key found for this signature in database
2 changed files with 11 additions and 13 deletions

View File

@ -2,12 +2,12 @@
{ {
name = "paisa"; name = "paisa";
nodes.machine = nodes.machine =
{ pkgs, ... }: { pkgs, lib, ... }:
{ {
systemd.services.paisa = { systemd.services.paisa = {
description = "Paisa"; description = "Paisa";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
serviceConfig.ExecStart = "${pkgs.paisa}/bin/paisa serve"; serviceConfig.ExecStart = "${lib.getExe pkgs.paisa} serve";
}; };
}; };
testScript = '' testScript = ''

View File

@ -3,11 +3,10 @@
buildGoModule, buildGoModule,
buildNpmPackage, buildNpmPackage,
fetchFromGitHub, fetchFromGitHub,
# nodejs_22,
nodejs_20, nodejs_20,
versionCheckHook, versionCheckHook,
node-gyp, node-gyp,
python311, python3,
pkg-config, pkg-config,
cairo, cairo,
giflib, giflib,
@ -59,11 +58,7 @@ buildGoModule (finalAttrs: {
]; ];
nativeBuildInputs = [ nativeBuildInputs = [
# building node-canvas with node-gyp will fail if using a newer python (python3.withPackages (ps: with ps; [ distutils ]))
# version:
# File "/build/source/node_modules/node-gyp/gyp/gyp_main.py", line 42, in
# <module> npm error ModuleNotFoundError: No module named 'distutils'
python311
pkg-config pkg-config
node-gyp node-gyp
]; ];
@ -84,14 +79,17 @@ buildGoModule (finalAttrs: {
]; ];
versionCheckProgramArg = "version"; versionCheckProgramArg = "version";
passthru.tests = {
inherit (nixosTests) paisa;
};
preBuild = '' preBuild = ''
cp -r ${finalAttrs.frontend}/web/static ./web cp -r ${finalAttrs.frontend}/web/static ./web
''; '';
passthru = {
inherit (finalAttrs) frontend;
tests = {
inherit (nixosTests) paisa;
};
};
meta = { meta = {
homepage = "https://paisa.fyi/"; homepage = "https://paisa.fyi/";
changelog = "https://github.com/ananthakumaran/paisa/releases/tag/v${finalAttrs.version}"; changelog = "https://github.com/ananthakumaran/paisa/releases/tag/v${finalAttrs.version}";