Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/actual: init at 24.10.1 #347825

Merged
merged 2 commits into from
Dec 20, 2024
Merged

Conversation

oddlama
Copy link
Contributor

@oddlama oddlama commented Oct 11, 2024

This adds a package, module and basic test for Actual, a privacy-focused app for managing finances. Closes #269069.

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: documentation This PR adds or changes documentation 8.has: changelog 8.has: module (update) This PR changes an existing module in `nixos/` labels Oct 11, 2024
@oddlama oddlama changed the title nixos/actual-budget: init at 24.10.1 nixos/actual: init at 24.10.1 Oct 11, 2024
@oddlama oddlama force-pushed the feat-actual-budget branch from 0503788 to 4590c78 Compare October 11, 2024 01:20
@ofborg ofborg bot added the 8.has: package (new) This PR adds a new package label Oct 11, 2024
@ofborg ofborg bot requested a review from PatrickDaG October 11, 2024 05:40
@ofborg ofborg bot added 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Oct 11, 2024
@h7x4 h7x4 added 8.has: module (new) This PR adds a module in `nixos/` 8.has: tests This PR has tests labels Oct 11, 2024
Copy link
Contributor

@PatrickDaG PatrickDaG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, Thx for finishing the module.

nixos/modules/services/web-apps/actual.nix Outdated Show resolved Hide resolved
nixos/modules/services/web-apps/actual.nix Show resolved Hide resolved
nixos/modules/services/web-apps/actual.nix Outdated Show resolved Hide resolved
pkgs/by-name/ac/actual-server/package.nix Show resolved Hide resolved
pkgs/by-name/ac/actual-server/package.nix Show resolved Hide resolved
@oddlama oddlama force-pushed the feat-actual-budget branch from 4590c78 to 91adb3e Compare October 11, 2024 12:40
@oddlama
Copy link
Contributor Author

oddlama commented Oct 11, 2024

Fair points, all comments were addressed

@ofborg ofborg bot requested a review from PatrickDaG October 11, 2024 17:05
@wegank wegank added 12.approvals: 1 This PR was reviewed and approved by one reputable person 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in the package labels Oct 15, 2024
@oddlama oddlama force-pushed the feat-actual-budget branch from 91adb3e to 78d7057 Compare October 24, 2024 19:24
@ofborg ofborg bot requested a review from PatrickDaG October 24, 2024 22:53
@wegank wegank removed 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in the package 12.approvals: 1 This PR was reviewed and approved by one reputable person labels Oct 29, 2024
@PatrickDaG
Copy link
Contributor

diff --git a/pkgs/by-name/ac/actual-server/package.nix b/pkgs/by-name/ac/actual-server/package.nix
index c2daf4ea2060..c3284a8e3381 100644
--- a/pkgs/by-name/ac/actual-server/package.nix
+++ b/pkgs/by-name/ac/actual-server/package.nix
@@ -9,14 +9,15 @@
   nodejs,
   yarn,
   nixosTests,
+  nix-update-script,
 }:
 let
-  version = "24.10.1";
+  version = "24.11.0";
   src = fetchFromGitHub {
     owner = "actualbudget";
     repo = "actual-server";
     rev = "v${version}";
-    hash = "sha256-VJAD+lNamwuYmiPJLXkum6piGi5zLOHBp8cUeZagb4s=";
+    hash = "sha256-tEanuY2GRufLbyjkhwFcsn8Nl3wlf/PbVJjzJfTTk7g=";
   };
 
   # We cannot use fetchYarnDeps because that doesn't support yarn2/berry
@@ -72,7 +73,7 @@ let
 
     outputHashAlgo = "sha256";
     outputHashMode = "recursive";
-    outputHash = "sha256-eNpOS21pkamugoYVhzsEnstxeVN/J06yDZcshfr0Ek4=";
+    outputHash = "sha256-yda1GdnPRHOoaJzkGz755Lm9/J60lFDsVvBgf/2e+3I=";
   };
 in
 stdenv.mkDerivation {
@@ -101,6 +102,7 @@ stdenv.mkDerivation {
   passthru = {
     inherit offlineCache;
     tests = nixosTests.actual;
+    passthru.updateScript = nix-update-script { };
   };
 
   meta = {

@oddlama oddlama force-pushed the feat-actual-budget branch from 78d7057 to ea062fb Compare November 3, 2024 16:47
@ofborg ofborg bot added 10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin labels Nov 4, 2024
@oddlama
Copy link
Contributor Author

oddlama commented Dec 14, 2024

  • Switched to nodejs_18 as this is the recommended version by actual
  • Rebased on master

@FliegendeWurst
Copy link
Member

FliegendeWurst commented Dec 14, 2024

Nodejs 18 will be removed before the 25.05 release. Actual recommends an LTS version, v20 is one.

Copy link
Contributor

@ambroisie ambroisie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small nit.

pkgs/by-name/ac/actual-server/package.nix Outdated Show resolved Hide resolved
@oddlama
Copy link
Contributor Author

oddlama commented Dec 14, 2024

Nodejs 18 will be removed before the 25.05 release. Actual recommends an LTS version, v20 is one.

Oh i see, I got the info from their Dockerfile which is still based on 18.
I've changed it to 20 now.

@wegank wegank removed 12.approvals: 2 This PR was reviewed and approved by two reputable people 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in the package labels Dec 15, 2024
@FliegendeWurst
Copy link
Member

I've also opened actualbudget/actual-server#524 for Node 22 support upstream.

@ofborg ofborg bot requested a review from PatrickDaG December 15, 2024 08:15
Comment on lines +60 to +61
yarn config set --json supportedArchitectures "$SUPPORTED_ARCHITECTURES"
yarn
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately this will only build the native libraries for the current platform, meaning the content hash will vary (as seen by ofborg).

I already tried to fix it (by building in the package derivation), but couldn't make it work.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The solution would be to use fetchYarnDeps but we can't since it doesn't support v2/berry lockfiles yet. So i guess the best workaround we have is to set the output hash conditionally, at least this is what is done in the grafana build which also does that.

I guess this will make updates a bit more tedious, but we probably have no other choice.

@oddlama
Copy link
Contributor Author

oddlama commented Dec 15, 2024

  • Added hashes for aarch64 and darwin

@oddlama
Copy link
Contributor Author

oddlama commented Dec 19, 2024

  • Fixed documentation link

@oddlama
Copy link
Contributor Author

oddlama commented Dec 20, 2024

  • Updated package hashes

@FliegendeWurst FliegendeWurst merged commit 9420039 into NixOS:master Dec 20, 2024
24 of 25 checks passed
@MangoIV
Copy link
Contributor

MangoIV commented Dec 20, 2024

Neat, thanks yall

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: changelog 8.has: documentation This PR adds or changes documentation 8.has: module (new) This PR adds a module in `nixos/` 8.has: module (update) This PR changes an existing module in `nixos/` 8.has: package (new) This PR adds a new package 8.has: tests This PR has tests 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Package request: Actual
8 participants