Merge pull request #324314 from LilleAila/geogebra6-wayland

geogebra6: enable wayland when NIXOS_OZONE_WL=1
This commit is contained in:
Aleksana 2024-07-04 22:06:20 +08:00 committed by GitHub
commit fafa99dd5e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 26 additions and 8 deletions

View File

@ -11429,6 +11429,13 @@
githubId = 101508537;
name = "Yuchen He";
};
LilleAila = {
name = "Olai";
email = "olai@olai.dev";
github = "LilleAila";
githubId = 67327023;
keys = [ { fingerprint = "8185 29F9 BB4C 33F0 69BB 9782 D1AC CDCF 2B9B 9799"; } ];
};
lillycham = {
email = "lillycat332@gmail.com";
github = "lillycat332";

View File

@ -1,4 +1,12 @@
{ lib, stdenv, unzip, fetchurl, electron, makeWrapper, geogebra }:
{
lib,
stdenv,
unzip,
fetchurl,
electron,
makeWrapper,
geogebra,
}:
let
pname = "geogebra";
version = "6-0-794-0";
@ -14,14 +22,17 @@ let
calculus in one easy-to-use package.
'';
homepage = "https://www.geogebra.org/";
maintainers = with maintainers; [ voidless sikmir ];
maintainers = with maintainers; [
voidless
sikmir
];
license = licenses.geogebra;
sourceProvenance = with sourceTypes; [
binaryBytecode
binaryNativeCode # some jars include native binaries
binaryNativeCode # some jars include native binaries
];
platforms = with platforms; linux ++ darwin;
hydraPlatforms = [];
hydraPlatforms = [ ];
};
linuxPkg = stdenv.mkDerivation {
@ -50,7 +61,9 @@ let
installPhase = ''
mkdir -p $out/libexec/geogebra/ $out/bin
cp -r GeoGebra-linux-x64/{resources,locales} "$out/"
makeWrapper ${lib.getBin electron}/bin/electron $out/bin/geogebra --add-flags "$out/resources/app"
makeWrapper ${lib.getBin electron}/bin/electron $out/bin/geogebra \
--add-flags "$out/resources/app" \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
install -Dm644 "${desktopItem}/share/applications/"* \
-t $out/share/applications/
@ -84,6 +97,4 @@ let
};
};
in
if stdenv.isDarwin
then darwinPkg
else linuxPkg
if stdenv.isDarwin then darwinPkg else linuxPkg