Compare commits
3 Commits
478a90e01b
...
108b714fcb
| Author | SHA1 | Date | |
|---|---|---|---|
| 108b714fcb | |||
| a146a2b5c3 | |||
| 169df46bc2 |
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
/PinePods-0.8.2
|
||||||
|
PinePods-0.8.2/
|
||||||
3245
Cargo.frontend.lock
Normal file
3245
Cargo.frontend.lock
Normal file
File diff suppressed because it is too large
Load Diff
4918
Cargo.lock
generated
Normal file
4918
Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
149
pinepods.nix
149
pinepods.nix
@@ -1,25 +1,156 @@
|
|||||||
{
|
{ lib
|
||||||
stdenv,
|
, fetchFromGitHub
|
||||||
fetchFromGitHub,
|
, rustPlatform
|
||||||
|
, pkg-config
|
||||||
|
, wrapGAppsHook3
|
||||||
|
, webkitgtk_4_1
|
||||||
|
, gtk3
|
||||||
|
, glib
|
||||||
|
, cairo
|
||||||
|
, gdk-pixbuf
|
||||||
|
, pango
|
||||||
|
, atk
|
||||||
|
, libsoup_3
|
||||||
|
, librsvg
|
||||||
|
, dbus
|
||||||
|
, openssl
|
||||||
|
, at-spi2-atk
|
||||||
|
, at-spi2-core
|
||||||
|
, glib-networking
|
||||||
|
, gsettings-desktop-schemas
|
||||||
|
, wasm-bindgen-cli
|
||||||
|
, trunk
|
||||||
|
, makeWrapper
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
let
|
||||||
pname = "PinePods";
|
pname = "pinepods";
|
||||||
version = "0.8.2";
|
version = "0.8.2";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "madeofpendletonwool";
|
owner = "madeofpendletonwool";
|
||||||
repo = "PinePods";
|
repo = "PinePods";
|
||||||
rev = "0.8.2";
|
rev = version;
|
||||||
sha256 = "1ivqazhzg3wwlqzz0dv0g48hv265c3qqhvxl02j20361j4mqn6rp";
|
sha256 = "1ivqazhzg3wwlqzz0dv0g48hv265c3qqhvxl02j20361j4mqn6rp";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ ];
|
# ── Step 1: Build the Yew/WASM frontend with trunk ──────────────────────────
|
||||||
|
frontend = rustPlatform.buildRustPackage {
|
||||||
|
pname = "pinepods-frontend";
|
||||||
|
inherit version src;
|
||||||
|
|
||||||
|
sourceRoot = "source/web";
|
||||||
|
cargoRoot = ".";
|
||||||
|
|
||||||
|
postUnpack = ''
|
||||||
|
cp ${builtins.toString ./.}/Cargo.frontend.lock $sourceRoot/Cargo.lock
|
||||||
|
'';
|
||||||
|
|
||||||
|
cargoLock = {
|
||||||
|
lockFile = "${builtins.toString ./.}/Cargo.frontend.lock";
|
||||||
|
outputHashes = {
|
||||||
|
"i18nrs-0.1.7" = "sha256-LEHQ8GI3eVKwhtxetxyIY4HV16TS3D9n+2Hh+sm5j74=";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ trunk wasm-bindgen-cli ];
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
cp -r . $NIX_BUILD_TOP/web-build
|
||||||
|
chmod -R u+w $NIX_BUILD_TOP/web-build
|
||||||
|
cd $NIX_BUILD_TOP/web-build
|
||||||
|
mkdir -p dist
|
||||||
|
RUSTFLAGS="--cfg=web_sys_unstable_apis" trunk build --release
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
cp -r $NIX_BUILD_TOP/web-build/dist $out
|
||||||
|
'';
|
||||||
|
|
||||||
|
doCheck = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
# ── Step 2: Build the Tauri binary, pointing it at the pre-built frontend ────
|
||||||
|
rustPlatform.buildRustPackage {
|
||||||
|
inherit pname version src;
|
||||||
|
|
||||||
|
sourceRoot = "source/web/src-tauri";
|
||||||
|
cargoRoot = ".";
|
||||||
|
|
||||||
|
postUnpack = ''
|
||||||
|
cp ${builtins.toString ./.}/Cargo.lock $sourceRoot/Cargo.lock
|
||||||
|
'';
|
||||||
|
|
||||||
|
cargoLock = {
|
||||||
|
lockFile = "${builtins.toString ./.}/Cargo.lock";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
pkg-config
|
||||||
|
wrapGAppsHook3
|
||||||
|
makeWrapper
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
openssl
|
||||||
|
dbus
|
||||||
|
glib
|
||||||
|
gtk3
|
||||||
|
cairo
|
||||||
|
gdk-pixbuf
|
||||||
|
pango
|
||||||
|
atk
|
||||||
|
at-spi2-atk
|
||||||
|
at-spi2-core
|
||||||
|
libsoup_3
|
||||||
|
webkitgtk_4_1
|
||||||
|
librsvg
|
||||||
|
glib-networking
|
||||||
|
gsettings-desktop-schemas
|
||||||
|
];
|
||||||
|
|
||||||
|
OPENSSL_NO_VENDOR = "1";
|
||||||
|
TAURI_SKIP_DEVSERVER_CHECK = "true";
|
||||||
|
|
||||||
|
preBuild = ''
|
||||||
|
# Link the pre-built frontend dist where tauri.conf.json expects it (../ from src-tauri)
|
||||||
|
ln -s ${frontend} $NIX_BUILD_TOP/source/web/dist
|
||||||
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
mkdir -p $out/bin
|
|
||||||
cp PinePods $out/bin
|
install -Dm755 target/release/pinepods $out/bin/pinepods
|
||||||
|
|
||||||
|
if [ -f ../../pinepods.desktop ]; then
|
||||||
|
install -Dm644 ../../pinepods.desktop $out/share/applications/pinepods.desktop
|
||||||
|
fi
|
||||||
|
|
||||||
|
for size in 32x32 64x64 128x128 256x256; do
|
||||||
|
if [ -f icons/''${size}.png ]; then
|
||||||
|
install -Dm644 icons/''${size}.png \
|
||||||
|
$out/share/icons/hicolor/''${size}/apps/pinepods.png
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
postFixup = ''
|
||||||
|
wrapProgram $out/bin/pinepods \
|
||||||
|
--set WEBKIT_DISABLE_COMPOSITING_MODE 1 \
|
||||||
|
--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"
|
||||||
|
'';
|
||||||
|
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "PinePods desktop client - self-hosted podcast manager (Tauri v2)";
|
||||||
|
homepage = "https://github.com/madeofpendletonwool/PinePods";
|
||||||
|
license = licenses.gpl3Only;
|
||||||
|
platforms = platforms.linux;
|
||||||
|
mainProgram = "pinepods";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user