osu-lazer: fix build and update to 2021.1120.0

This commit is contained in:
LavaDesu 2021-11-21 13:04:39 +07:00
parent 26bba2abfb
commit c4d00b3af1
Signed by: cilly
GPG key ID: 6500251E087653C9
3 changed files with 75 additions and 79 deletions

View file

@ -1,6 +1,6 @@
self: super:
let
version = "2021.1113.0";
version = "2021.1120.0";
in rec {
osu-lazer-unwrapped = super.osu-lazer.overrideAttrs(old: {
inherit version;
@ -10,11 +10,16 @@ in rec {
owner = "ppy";
repo = "osu";
rev = version;
sha256 = "0pq2vvj1f0bkyq9dwi18qwh1wmjqf770vjl5jgxd34f3d46bfd8h";
sha256 = "1mp379vbvmgcsq2cmhk4pci92ks4p88fig6lax32nsyfjcmnpyn0";
};
buildPhase = super.lib.replaceStrings [ old.version ] [ version ] old.buildPhase;
postInstall = ''
chmod -R 755 $out/share/applications
rm -r $out/share/applications
'';
nugetDeps = super.linkFarmFromDrvs "${old.pname}-nuget-deps" (import ./patches/deps.nix {
fetchNuGet = { name, version, sha256 }: super.fetchurl {
name = "nuget-${name}-${version}.nupkg";
@ -30,23 +35,16 @@ in rec {
osu-lazer =
let
startScript = super.writeShellScript "osu-lazer" ''
DRI_PRIME=1 vblank_mode=0 PIPEWIRE_LATENCY=64/48000 ${super.pipewire}/bin/pw-jack ${osu-lazer-unwrapped.outPath}/bin/osu\\!
DRI_PRIME=1 vblank_mode=0 PIPEWIRE_LATENCY=64/48000 ${super.pipewire}/bin/pw-jack ${osu-lazer-unwrapped.outPath}/bin/osu\!
'';
desktopEntry = super.makeDesktopItem {
desktopName = "osu!";
name = "osu";
name = "osu-lazer";
exec = startScript.outPath;
icon = "osu!";
comment = osu-lazer-unwrapped.meta.description;
type = "Application";
categories = "Game;";
};
in super.stdenvNoCC.mkDerivation {
inherit version;
pname = "osu-lazer";
buildPhase = ''
cp ${desktopEntry}/share/applications $out/share
'';
};
in desktopEntry;
}