From 443481a2f20d7c38d3daf6fe77c894d4ec9dbb64 Mon Sep 17 00:00:00 2001 From: Harish Rajagopal Date: Sat, 4 Jul 2026 02:21:36 +0200 Subject: [PATCH 1/2] feishin: add override for web version (cherry picked from commit a9b06ca330b2c6f3c4dd206d5eb0c6f80e5fd539) --- pkgs/by-name/fe/feishin/package.nix | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/pkgs/by-name/fe/feishin/package.nix b/pkgs/by-name/fe/feishin/package.nix index f8a1a7ee214c..242b0cfa105b 100644 --- a/pkgs/by-name/fe/feishin/package.nix +++ b/pkgs/by-name/fe/feishin/package.nix @@ -14,6 +14,7 @@ copyDesktopItems, makeDesktopItem, nix-update-script, + webVersion ? false, }: let pname = "feishin"; @@ -34,6 +35,7 @@ buildNpmPackage { inherit src; npmConfigHook = pnpmConfigHook; + npmBuildScript = if webVersion then "build:web" else "build"; npmDeps = null; pnpmDeps = fetchPnpmDeps { @@ -52,8 +54,8 @@ buildNpmPackage { nativeBuildInputs = [ pnpm_10 ] - ++ lib.optionals (stdenv.hostPlatform.isLinux) [ copyDesktopItems ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ + ++ lib.optionals (stdenv.hostPlatform.isLinux && !webVersion) [ copyDesktopItems ] + ++ lib.optionals (stdenv.hostPlatform.isDarwin && !webVersion) [ darwin.autoSignDarwinBinariesHook actool ]; @@ -73,7 +75,7 @@ buildNpmPackage { ln -s ${dart-sass}/bin/dart-sass "$dir"/sass ''; - postBuild = '' + postBuild = lib.optionalString (!webVersion) '' cp -r ${electron.dist} electron-dist chmod -R u+w electron-dist @@ -88,14 +90,18 @@ buildNpmPackage { installPhase = '' runHook preInstall '' - + lib.optionalString stdenv.hostPlatform.isDarwin '' + + lib.optionalString webVersion '' + mkdir -p $out + cp -r out/web/* $out + '' + + lib.optionalString (stdenv.hostPlatform.isDarwin && !webVersion) '' mkdir -p $out/{Applications,bin} cp -r dist/**/Feishin.app $out/Applications/ makeWrapper $out/Applications/Feishin.app/Contents/MacOS/Feishin $out/bin/feishin \ --prefix PATH : "${lib.makeBinPath [ mpv-unwrapped ]}" \ --set DISABLE_AUTO_UPDATES 1 '' - + lib.optionalString stdenv.hostPlatform.isLinux '' + + lib.optionalString (stdenv.hostPlatform.isLinux && !webVersion) '' mkdir -p $out/share/feishin pushd dist/*-unpacked/ @@ -126,7 +132,7 @@ buildNpmPackage { runHook postInstall ''; - desktopItems = [ + desktopItems = lib.optionals (!webVersion) [ (makeDesktopItem { name = "feishin"; desktopName = "Feishin"; @@ -152,11 +158,11 @@ buildNpmPackage { sourceProvenance = with lib.sourceTypes; [ fromSource ]; license = lib.licenses.gpl3Plus; platforms = lib.platforms.unix; - mainProgram = "feishin"; maintainers = with lib.maintainers; [ BatteredBunny onny jlbribeiro ]; - }; + } + // lib.optionalAttrs (!webVersion) { mainProgram = "feishin"; }; } From 219caa76f22d3a4a6a93a1937ff60d3c13c2ef11 Mon Sep 17 00:00:00 2001 From: Harish Rajagopal Date: Sat, 11 Jul 2026 14:35:49 +0200 Subject: [PATCH 2/2] feishin-web: init at 1.13.0 (cherry picked from commit 93de10dc0d3b4ee080f1cdb70da6cc9bdf10883a) --- pkgs/by-name/fe/feishin/package.nix | 2 ++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 4 insertions(+) diff --git a/pkgs/by-name/fe/feishin/package.nix b/pkgs/by-name/fe/feishin/package.nix index 242b0cfa105b..ba20d7cc33bd 100644 --- a/pkgs/by-name/fe/feishin/package.nix +++ b/pkgs/by-name/fe/feishin/package.nix @@ -34,6 +34,8 @@ buildNpmPackage { inherit src; + __structuredAttrs = true; + npmConfigHook = pnpmConfigHook; npmBuildScript = if webVersion then "build:web" else "build"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b70b8212d637..c4086f2ee2f3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11692,4 +11692,6 @@ with pkgs; gpac-unstable = callPackage ../by-name/gp/gpac/package.nix { releaseChannel = "unstable"; }; + + feishin-web = feishin.override { webVersion = true; }; }