Failed to build desktop application #256
Replies: 3 comments 1 reply
-
@frisodubach look at the Makefile, I think you should start with I will move this to discussion, as it's not a bug rather a question. |
Beta Was this translation helpful? Give feedback.
-
Hey @ananthakumaran, thanks for the reply. I actually made a lot of progress on the desktop flake already. This is the addition to the flake currently, however it's failing to build. It's specifically failing with the packages.paisa-desktop = let
version = "0.6.6";
inherit (pkgs) mkdocs stdenv lib;
in stdenv.mkDerivation {
name = "paisa-desktop-${version}";
# src = pkgs.fetchurl {
# url = "https://github.com/ananthakumaran/paisa";
# sha256 = "";
# };
src = ./.;
dontUnpack = true;
sourceRoot = ./.;
nativeBuildInputs = [
pkgs.nodejs-18_x
pkgs.wails
pkgs.pkg-config
pkgs.patchelf
pkgs.webkitgtk
pkgs.gtk3
pkgs.go_1_21
];
buildInputs = [ pkgs.ledger ];
configurePhase = ''
ln -s ${nodeDependencies}/lib/node_modules ./node_modules
export PATH="${nodeDependencies}/.bin:$PATH"
npm run build
'';
buildPhase = ''
go mod download && go mod verify
go build
cd desktop
wails build -o paisa-desktop -clean
'';
installPhase = ''
mkdir -p $out/bin
cp paisa-desktop $out/bin
'';
meta = {
homepage = "https://paisa.fyi/";
description = "Paisa – Personal Finance Manager.";
};
}; I've been stuck on this for about a day now, struggling to debug the issue. Running each individual build phase separately with Any help / suggestions would be appreciated, as I think it's close to being done but the whole Exact build error for reference:
|
Beta Was this translation helpful? Give feedback.
-
I got it to mostly work (after having a broken laptop for over a week). packages.paisa-desktop = let
fs = lib.fileset;
sourceFiles = ./.;
version = "0.6.6";
inherit (pkgs) mkdocs stdenv lib;
in pkgs.buildGoModule {
pname = "paisa-desktop-${version}";
meta.mainProgram = "paisa-desktop";
version = version;
# src = pkgs.fetchurl {
# url = "https://github.com/ananthakumaran/paisa";
# sha256 = "";
# };
src = fs.toSource {
root = ./.;
fileset = sourceFiles;
};
dontUnpack = false;
nativeBuildInputs = [
pkgs.nodejs-18_x
pkgs.wails
pkgs.pkg-config
pkgs.patchelf
pkgs.webkitgtk
pkgs.gtk3
pkgs.go_1_21
];
vendorHash = "sha256-ztpPOYxPajS9fhbVxirplQS1E899UW9P6Q2D5XHAfv4=";
# vendorSha256 = lib.fakeHash;
CGO_ENABLED = 1;
doCheck = false;
subPackages = [ "." ];
buildInputs = [ pkgs.ledger ];
preConfigure = ''
ln -s ${nodeDependencies}/lib/node_modules ./node_modules
export PATH="${nodeDependencies}/.bin:$PATH"
npm run build
'';
# preBuild = ''
# go mod download && go mod verify
# go build
# '';
buildPhase = ''
# go mod download && go mod verify
# go build
go mod vendor
cd desktop
# wails build -o paisa-desktop -clean
wails build -o paisa-desktop
'';
installPhase = ''
mkdir -p $out/bin
cp paisa-desktop $out/bin
'';
# proxyVendor = true;
meta = {
homepage = "https://paisa.fyi/";
description = "Paisa – Personal Finance Manager.";
};
};
However, I'm running into issues with the go-modules being fetched. Namely, I get the error: error: builder for '/nix/store/91j2ny5gy5m9y3inw2b5n2kdiv6n5s89-paisa-desktop-0.6.6-0.6.6.drv' failed with exit code 1;
last 10 log lines:
> github.com/throttled/throttled/v2/store/memstore: module lookup disabled by GOPROXY=off
> go: github.com/ananthakumaran/paisa/internal/utils imports
> github.com/onrik/gorm-logrus: module lookup disabled by GOPROXY=off
> go: github.com/ananthakumaran/paisa/internal/utils imports
> golang.org/x/exp/constraints: module lookup disabled by GOPROXY=off
> go: github.com/ananthakumaran/paisa/internal/utils imports
> gorm.io/driver/sqlite: module lookup disabled by GOPROXY=off
> go: github.com/ananthakumaran/paisa/internal/ledger tested by
> github.com/ananthakumaran/paisa/internal/ledger.test imports
> github.com/stretchr/testify/assert: module lookup disabled by GOPROXY=off
For full logs, run 'nix log /nix/store/91j2ny5gy5m9y3inw2b5n2kdiv6n5s89-paisa-desktop-0.6.6-0.6.6.drv'. I can't really figure out what to do to fix this, so I'm currently stuck. |
Beta Was this translation helpful? Give feedback.
-
Describe your Environment
OS: NixOS 24.05
Paisa Version: 0.6.6
App Variant: Desktop
Describe the bug
Failure to build desktop application using the nix dev shell on NixOS 24.05.
To Reproduce
Steps to reproduce the behavior:
nix develop
wails build
I tried searching for any file matching
static
, and noticed there is a entry in the.gitignore
:web/static
.Is there a step I'm possibly missing regarding the build process?
There is no documentation on how the application should be built, so I'm not too sure on what to do.
I was trying to build the desktop app such that I could see if I can add it to the nix-flake, but I'm a bit lost here.
Expected behavior
A successful build of the desktop application using wails.
Beta Was this translation helpful? Give feedback.
All reactions