about summary refs log tree commit diff
path: root/pkgs/by-name/ve/vesktop/package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/ve/vesktop/package.nix')
-rw-r--r--pkgs/by-name/ve/vesktop/package.nix30
1 files changed, 15 insertions, 15 deletions
diff --git a/pkgs/by-name/ve/vesktop/package.nix b/pkgs/by-name/ve/vesktop/package.nix
index 6d65fe99d89a..02b11d55baa3 100644
--- a/pkgs/by-name/ve/vesktop/package.nix
+++ b/pkgs/by-name/ve/vesktop/package.nix
@@ -40,7 +40,7 @@ stdenv.mkDerivation (finalAttrs: {
       src
       patches
       ;
-    hash = "sha256-rizJu6v04wFEpJtakC2tfPg/uylz7gAOzJiXvUwdDI4=";
+    hash = "sha256-BOVjbaDbZw6H6X8o945M0Bx6fqnRQjFBviOLkTYVJ1I=";
   };
 
   nativeBuildInputs =
@@ -48,7 +48,7 @@ stdenv.mkDerivation (finalAttrs: {
       nodejs
       pnpm_9.configHook
     ]
-    ++ lib.optionals stdenv.isLinux [
+    ++ lib.optionals stdenv.hostPlatform.isLinux [
       # vesktop uses venmic, which is a shipped as a prebuilt node module
       # and needs to be patched
       autoPatchelfHook
@@ -57,15 +57,15 @@ stdenv.mkDerivation (finalAttrs: {
       # https://github.com/NixOS/nixpkgs/issues/172583
       makeWrapper
     ]
-    ++ lib.optionals stdenv.isDarwin [
+    ++ lib.optionals stdenv.hostPlatform.isDarwin [
       # on macos we don't need to expand variables, so we can use the faster binary wrapper
       makeBinaryWrapper
     ];
 
-  buildInputs = lib.optionals stdenv.isLinux [
+  buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
     libpulseaudio
     pipewire
-    stdenv.cc.cc.lib
+    (lib.getLib stdenv.cc.cc)
   ];
 
   patches =
@@ -81,12 +81,12 @@ stdenv.mkDerivation (finalAttrs: {
 
   # disable code signing on macos
   # https://github.com/electron-userland/electron-builder/blob/77f977435c99247d5db395895618b150f5006e8f/docs/code-signing.md#how-to-disable-code-signing-during-the-build-process-on-macos
-  postConfigure = lib.optionalString stdenv.isDarwin ''
+  postConfigure = lib.optionalString stdenv.hostPlatform.isDarwin ''
     export CSC_IDENTITY_AUTO_DISCOVERY=false
   '';
 
   # electron builds must be writable on darwin
-  preBuild = lib.optionalString stdenv.isDarwin ''
+  preBuild = lib.optionalString stdenv.hostPlatform.isDarwin ''
     cp -r ${electron.dist}/Electron.app .
     chmod -R u+w Electron.app
   '';
@@ -98,13 +98,13 @@ stdenv.mkDerivation (finalAttrs: {
     pnpm exec electron-builder \
       --dir \
       -c.asarUnpack="**/*.node" \
-      -c.electronDist=${if stdenv.isDarwin then "." else electron.dist} \
+      -c.electronDist=${if stdenv.hostPlatform.isDarwin then "." else electron.dist} \
       -c.electronVersion=${electron.version}
 
     runHook postBuild
   '';
 
-  postBuild = lib.optionalString stdenv.isLinux ''
+  postBuild = lib.optionalString stdenv.hostPlatform.isLinux ''
     pushd build
     ${libicns}/bin/icns2png -x icon.icns
     popd
@@ -114,7 +114,7 @@ stdenv.mkDerivation (finalAttrs: {
     ''
       runHook preInstall
     ''
-    + lib.optionalString stdenv.isLinux ''
+    + lib.optionalString stdenv.hostPlatform.isLinux ''
       mkdir -p $out/opt/Vesktop
       cp -r dist/*unpacked/resources $out/opt/Vesktop/
 
@@ -123,27 +123,27 @@ stdenv.mkDerivation (finalAttrs: {
         install -Dm0644 $file $out/share/icons/hicolor/''${file_suffix//x32.png}/apps/vesktop.png
       done
     ''
-    + lib.optionalString stdenv.isDarwin ''
+    + lib.optionalString stdenv.hostPlatform.isDarwin ''
       mkdir -p $out/{Applications,bin}
-      mv dist/mac*/Vesktop.App $out/Applications
+      mv dist/mac*/Vesktop.app $out/Applications/Vesktop.app
     ''
     + ''
       runHook postInstall
     '';
 
   postFixup =
-    lib.optionalString stdenv.isLinux ''
+    lib.optionalString stdenv.hostPlatform.isLinux ''
       makeWrapper ${electron}/bin/electron $out/bin/vesktop \
         --add-flags $out/opt/Vesktop/resources/app.asar \
         ${lib.optionalString withTTS "--add-flags \"--enable-speech-dispatcher\""} \
         ${lib.optionalString withMiddleClickScroll "--add-flags \"--enable-blink-features=MiddleClickAutoscroll\""} \
         --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime}}"
     ''
-    + lib.optionalString stdenv.isDarwin ''
+    + lib.optionalString stdenv.hostPlatform.isDarwin ''
       makeWrapper $out/Applications/Vesktop.app/Contents/MacOS/Vesktop $out/bin/vesktop
     '';
 
-  desktopItems = lib.optional stdenv.isLinux (makeDesktopItem {
+  desktopItems = lib.optional stdenv.hostPlatform.isLinux (makeDesktopItem {
     name = "vesktop";
     desktopName = "Vesktop";
     exec = "vesktop %U";