about summary refs log tree commit diff
path: root/pkgs/by-name/fe/feishin/package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/fe/feishin/package.nix')
-rw-r--r--pkgs/by-name/fe/feishin/package.nix14
1 files changed, 7 insertions, 7 deletions
diff --git a/pkgs/by-name/fe/feishin/package.nix b/pkgs/by-name/fe/feishin/package.nix
index 99307c37dcea..0ed5aed53c6a 100644
--- a/pkgs/by-name/fe/feishin/package.nix
+++ b/pkgs/by-name/fe/feishin/package.nix
@@ -34,8 +34,8 @@ buildNpmPackage {
   env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
 
   nativeBuildInputs =
-    lib.optionals (stdenv.isLinux) [ copyDesktopItems ]
-    ++ lib.optionals stdenv.isDarwin [ darwin.autoSignDarwinBinariesHook ];
+    lib.optionals (stdenv.hostPlatform.isLinux) [ copyDesktopItems ]
+    ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.autoSignDarwinBinariesHook ];
 
   postPatch =
     ''
@@ -47,7 +47,7 @@ buildNpmPackage {
       substituteInPlace src/main/main.ts \
         --replace-fail "autoUpdater.checkForUpdatesAndNotify();" ""
     ''
-    + lib.optionalString stdenv.isLinux ''
+    + lib.optionalString stdenv.hostPlatform.isLinux ''
       # https://github.com/electron/electron/issues/31121
       substituteInPlace src/main/main.ts \
         --replace-fail "process.resourcesPath" "'$out/share/feishin/resources'"
@@ -77,7 +77,7 @@ buildNpmPackage {
     '';
 
   postBuild =
-    lib.optionalString stdenv.isDarwin ''
+    lib.optionalString stdenv.hostPlatform.isDarwin ''
       # electron-builder appears to build directly on top of Electron.app, by overwriting the files in the bundle.
       cp -r ${electron.dist}/Electron.app ./
       find ./Electron.app -name 'Info.plist' | xargs -d '\n' chmod +rw
@@ -90,7 +90,7 @@ buildNpmPackage {
     + ''
       npm exec electron-builder -- \
         --dir \
-        -c.electronDist=${if stdenv.isDarwin then "./" else electron.dist} \
+        -c.electronDist=${if stdenv.hostPlatform.isDarwin then "./" else electron.dist} \
         -c.electronVersion=${electron.version} \
         -c.npmRebuild=false
     '';
@@ -99,12 +99,12 @@ buildNpmPackage {
     ''
       runHook preInstall
     ''
-    + lib.optionalString stdenv.isDarwin ''
+    + lib.optionalString stdenv.hostPlatform.isDarwin ''
       mkdir -p $out/{Applications,bin}
       cp -r release/build/**/Feishin.app $out/Applications/
       makeWrapper $out/Applications/Feishin.app/Contents/MacOS/Feishin $out/bin/feishin
     ''
-    + lib.optionalString stdenv.isLinux ''
+    + lib.optionalString stdenv.hostPlatform.isLinux ''
       mkdir -p $out/share/feishin
       pushd release/build/*/
       cp -r locales resources{,.pak} $out/share/feishin