builds correctly, errors on open

This commit is contained in:
2026-03-03 19:12:18 -05:00
parent 288a60cfa1
commit f0e7b822eb
3 changed files with 17 additions and 7 deletions

1
.gitignore vendored
View File

@@ -1,2 +1,3 @@
/PinePods-0.8.2
PinePods-0.8.2/
result

View File

@@ -3,6 +3,9 @@ let
pkgs = import nixpkgs { config = {}; overlays = []; };
in
{
pinepods = pkgs.callPackage ./pinepods.nix { };
pinepods = pkgs.callPackage ./pinepods.nix {
wasm-bindgen-cli = pkgs.wasm-bindgen-cli_0_2_105;
inherit (pkgs) binaryen tailwindcss_3;
};
pinepods-frontend = (pkgs.callPackage ./pinepods.nix { }).frontend;
}

View File

@@ -4,6 +4,8 @@
, pkg-config
, wrapGAppsHook3
, llvmPackages
, binaryen
, tailwindcss_3
, webkitgtk_4_1
, gtk3
, glib
@@ -22,6 +24,7 @@
, wasm-bindgen-cli
, trunk
, makeWrapper
, libayatana-appindicator
}:
let
@@ -50,7 +53,7 @@ let
};
};
nativeBuildInputs = [ trunk wasm-bindgen-cli llvmPackages.lld ];
nativeBuildInputs = [ trunk wasm-bindgen-cli llvmPackages.lld binaryen tailwindcss_3 ];
buildPhase = ''
cp -r . $NIX_BUILD_TOP/web-build
@@ -61,10 +64,9 @@ let
export HOME=$NIX_BUILD_TOP
export XDG_CACHE_HOME=$NIX_BUILD_TOP/cache
mkdir -p $NIX_BUILD_TOP/cache
# Use nixpkgs wasm-bindgen, skip trunk's version check
export WASM_BINDGEN=$(which wasm-bindgen)
export TRUNK_SKIP_VERSION_CHECK=true
export TRUNK_TOOLS_WASM_BINDGEN=0.2.105
export TRUNK_TOOLS_WASM_OPT=version_124
RUSTFLAGS="--cfg=web_sys_unstable_apis" trunk build --release
'';
@@ -83,6 +85,7 @@ rustPlatform.buildRustPackage {
sourceRoot = "source/web/src-tauri";
cargoRoot = ".";
cargoExtraArgs = "--bin app";
cargoLock = {
lockFile = ./Cargo.lock;
@@ -110,19 +113,21 @@ rustPlatform.buildRustPackage {
librsvg
glib-networking
gsettings-desktop-schemas
libayatana-appindicator
];
OPENSSL_NO_VENDOR = "1";
TAURI_SKIP_DEVSERVER_CHECK = "true";
preBuild = ''
chmod -R u+w $NIX_BUILD_TOP/source
ln -s ${frontend} $NIX_BUILD_TOP/source/web/dist
'';
installPhase = ''
runHook preInstall
install -Dm755 target/release/pinepods $out/bin/pinepods
install -Dm755 target/x86_64-unknown-linux-gnu/release/app $out/bin/pinepods
if [ -f ../../pinepods.desktop ]; then
install -Dm644 ../../pinepods.desktop $out/share/applications/pinepods.desktop
@@ -141,6 +146,7 @@ rustPlatform.buildRustPackage {
postFixup = ''
wrapProgram $out/bin/pinepods \
--set WEBKIT_DISABLE_COMPOSITING_MODE 1 \
--prefix LD_LIBRARY_PATH : "${libayatana-appindicator}/lib" \
--prefix XDG_DATA_DIRS : "${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:${gtk3}/share/gsettings-schemas/${gtk3.name}" \
--prefix GIO_EXTRA_MODULES : "${glib-networking}/lib/gio/modules"
'';