diff --git a/default.nix b/default.nix index bf0d9907d8..5494df23d5 100644 --- a/default.nix +++ b/default.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation { wrapQtAppsHook pkg-config installShellFiles -] ++ lib.optionals stdenv.isLinux [ xvfb-run ] ++ lib.optionals stdenv.isDarwin [ makeWrapper ]; + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ xvfb-run ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ makeWrapper ]; buildInputs = [ qtbase @@ -41,7 +41,7 @@ stdenv.mkDerivation { qtsvg qtwebsockets botan2 - ] ++ lib.optionals stdenv.isLinux [ qtwayland ]; + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ qtwayland ]; cmakeFlags = [ "-DQON_QT6_BUILD=ON" @@ -49,7 +49,7 @@ stdenv.mkDerivation { ]; # Install shell completion on Linux (with xvfb-run) - postInstall = lib.optionalString stdenv.isLinux '' + postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' installShellCompletion --cmd ${appname} \ --bash <(xvfb-run $out/bin/${appname} --completion bash) \ --fish <(xvfb-run $out/bin/${appname} --completion fish) @@ -64,12 +64,11 @@ stdenv.mkDerivation { --fish <($out/bin/${appname} --completion fish) '' # Create a lowercase symlink for Linux - + lib.optionalString stdenv.isLinux '' + + lib.optionalString stdenv.hostPlatform.isLinux '' ln -s $out/bin/${appname} $out/bin/${pname} '' # Remame application for macOS as lowercase binary - + lib.optionalString stdenv.isDarwin '' - find $out + + lib.optionalString stdenv.hostPlatform.isDarwin '' # Prevent "same file" error mv $out/bin/${appname} $out/bin/${pname}.bin mv $out/bin/${pname}.bin $out/bin/${pname}