Skip to content

Commit

Permalink
fedistar: init at 1.11.0
Browse files Browse the repository at this point in the history
It's worth noting that if they ever decide to add tray icons to the
program, it will most likely suffer the same fate as cinny-desktop,
where it will not be supported (see #357482)
  • Loading branch information
Noodlez1232 committed Jan 20, 2025
1 parent 1e839b4 commit b03bdf2
Showing 1 changed file with 90 additions and 0 deletions.
90 changes: 90 additions & 0 deletions pkgs/by-name/fe/fedistar/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,

pnpm_10,
nodejs,

rustPlatform,
cargo-tauri,
wrapGAppsHook4,
pkg-config,
glib-networking,
webkitgtk_4_1,
openssl,
}:
let
pnpm = pnpm_10;
pname = "fedistar";
version = "1.11.0";
src = fetchFromGitHub {
owner = "h3poteto";
repo = "fedistar";
tag = "v${version}";
hash = "sha256-x7PljFqxC3Zht3ZEAZTA6/BClZ0g7VH2HpQLGKqQ8qo=";
};
frontend-build = stdenvNoCC.mkDerivation (finalAttrs: {
pname = "fedistar-frontend";
inherit version src;
pnpmDeps = pnpm.fetchDeps {
inherit pname version src;
hash = "sha256-RqTAb01W8/qcQonh44bT7zeeJEuLekfZW66mfT2vYYw=";
};
nativeBuildInputs = [
pnpm.configHook
pnpm
nodejs
];

buildPhase = ''
runHook preBuild
pnpm run build
runHook postBuild
'';

installPhase = ''
runHook preInstall
mkdir -p $out
cp -r out/* $out/
runHook postInstall
'';
});

in
rustPlatform.buildRustPackage {
inherit version pname src;
sourceRoot = "${src.name}/src-tauri";

cargoHash = "sha256-Nsb0UTYSGbMbgtOzo7I3X16Qv61ZeohksrwbB0Xr1Xw=";
postPatch = ''
substituteInPlace ./tauri.conf.json \
--replace '"frontendDist": "../out",' '"frontendDist": "${frontend-build}",' \
--replace '"beforeBuildCommand": "pnpm build",' '"beforeBuildCommand": "",'
'';

nativeBuildInputs = [
cargo-tauri.hook

pkg-config
wrapGAppsHook4
];

buildInputs =
[ openssl ]
++ lib.optionals stdenvNoCC.hostPlatform.isLinux [
glib-networking
webkitgtk_4_1
];

doCheck = false; # This version's tests do not pass

meta = {
description = "Multi-column Fediverse client application for desktop";
homepage = "https://fedistar.net/";
mainProgram = "fedistar";
license = lib.licenses.gpl3Only;
maintainers = [ lib.maintainers.noodlez1232 ];
changelog = "https://github.com/h3poteto/fedistar/releases/tag/v${version}";
};
}

0 comments on commit b03bdf2

Please sign in to comment.