diff --git a/nixos/tests/paisa.nix b/nixos/tests/paisa.nix index a1ffb02a1d5f..0a16990606e3 100644 --- a/nixos/tests/paisa.nix +++ b/nixos/tests/paisa.nix @@ -2,12 +2,12 @@ { name = "paisa"; nodes.machine = - { pkgs, ... }: + { pkgs, lib, ... }: { systemd.services.paisa = { description = "Paisa"; wantedBy = [ "multi-user.target" ]; - serviceConfig.ExecStart = "${pkgs.paisa}/bin/paisa serve"; + serviceConfig.ExecStart = "${lib.getExe pkgs.paisa} serve"; }; }; testScript = '' diff --git a/pkgs/by-name/pa/paisa/package.nix b/pkgs/by-name/pa/paisa/package.nix index cfb7c438c935..2e92515d2873 100644 --- a/pkgs/by-name/pa/paisa/package.nix +++ b/pkgs/by-name/pa/paisa/package.nix @@ -3,11 +3,10 @@ buildGoModule, buildNpmPackage, fetchFromGitHub, - # nodejs_22, nodejs_20, versionCheckHook, node-gyp, - python311, + python3, pkg-config, cairo, giflib, @@ -59,11 +58,7 @@ buildGoModule (finalAttrs: { ]; nativeBuildInputs = [ - # building node-canvas with node-gyp will fail if using a newer python - # version: - # File "/build/source/node_modules/node-gyp/gyp/gyp_main.py", line 42, in - # npm error ModuleNotFoundError: No module named 'distutils' - python311 + (python3.withPackages (ps: with ps; [ distutils ])) pkg-config node-gyp ]; @@ -84,14 +79,17 @@ buildGoModule (finalAttrs: { ]; versionCheckProgramArg = "version"; - passthru.tests = { - inherit (nixosTests) paisa; - }; - preBuild = '' cp -r ${finalAttrs.frontend}/web/static ./web ''; + passthru = { + inherit (finalAttrs) frontend; + tests = { + inherit (nixosTests) paisa; + }; + }; + meta = { homepage = "https://paisa.fyi/"; changelog = "https://github.com/ananthakumaran/paisa/releases/tag/v${finalAttrs.version}";