2021-12-26 15:17:12 +00:00
|
|
|
{ lib
|
|
|
|
, stdenvNoCC
|
|
|
|
, buildDotnetModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, makeDesktopItem
|
|
|
|
, copyDesktopItems
|
|
|
|
, ffmpeg
|
|
|
|
, alsa-lib
|
|
|
|
, SDL2
|
|
|
|
, lttng-ust
|
|
|
|
, numactl
|
2022-04-09 04:52:53 +01:00
|
|
|
, dotnetCorePackages
|
2020-04-11 19:12:04 +01:00
|
|
|
}:
|
|
|
|
|
2021-12-26 15:17:12 +00:00
|
|
|
buildDotnetModule rec {
|
2020-04-11 19:12:04 +01:00
|
|
|
pname = "osu-lazer";
|
2022-04-09 04:52:53 +01:00
|
|
|
version = "2022.409.0";
|
2020-04-11 19:12:04 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ppy";
|
|
|
|
repo = "osu";
|
|
|
|
rev = version;
|
2022-04-09 04:52:53 +01:00
|
|
|
sha256 = "sha256-qG9797SA0iMq9IF5SzQLgnhoUd2FKSAVXUPem1LQc1M=";
|
2020-04-11 19:12:04 +01:00
|
|
|
};
|
|
|
|
|
2021-12-26 15:17:12 +00:00
|
|
|
projectFile = "osu.Desktop/osu.Desktop.csproj";
|
|
|
|
nugetDeps = ./deps.nix;
|
2020-04-11 19:12:04 +01:00
|
|
|
|
2022-04-09 04:52:53 +01:00
|
|
|
dotnet-sdk = dotnetCorePackages.sdk_6_0;
|
|
|
|
dotnet-runtime = dotnetCorePackages.runtime_6_0;
|
|
|
|
|
2021-12-26 15:17:12 +00:00
|
|
|
nativeBuildInputs = [ copyDesktopItems ];
|
2020-04-11 19:12:04 +01:00
|
|
|
|
2021-12-26 15:17:12 +00:00
|
|
|
preConfigure = ''
|
|
|
|
dotnetFlags+=(
|
|
|
|
--runtime linux-x64
|
|
|
|
)
|
2020-04-11 19:12:04 +01:00
|
|
|
'';
|
|
|
|
|
2021-12-26 15:17:12 +00:00
|
|
|
runtimeDeps = [
|
|
|
|
ffmpeg
|
|
|
|
alsa-lib
|
|
|
|
SDL2
|
|
|
|
lttng-ust
|
|
|
|
numactl
|
|
|
|
];
|
2020-04-11 19:12:04 +01:00
|
|
|
|
2021-12-26 15:17:12 +00:00
|
|
|
executables = [ "osu!" ];
|
2020-04-11 19:12:04 +01:00
|
|
|
|
2021-12-26 15:17:12 +00:00
|
|
|
fixupPhase = ''
|
|
|
|
runHook preFixup
|
2020-04-11 19:12:04 +01:00
|
|
|
|
|
|
|
for i in 16 32 48 64 96 128 256 512 1024; do
|
|
|
|
install -D ./assets/lazer.png $out/share/icons/hicolor/''${i}x$i/apps/osu\!.png
|
|
|
|
done
|
|
|
|
|
2021-12-26 15:17:12 +00:00
|
|
|
ln -sft $out/lib/${pname} ${SDL2}/lib/libSDL2${stdenvNoCC.hostPlatform.extensions.sharedLibrary}
|
|
|
|
cp -f ${./osu.runtimeconfig.json} "$out/lib/${pname}/osu!.runtimeconfig.json"
|
2020-04-11 19:12:04 +01:00
|
|
|
|
2020-12-08 19:02:20 +00:00
|
|
|
runHook postFixup
|
|
|
|
'';
|
|
|
|
|
2021-12-26 15:17:12 +00:00
|
|
|
desktopItems = [(makeDesktopItem {
|
|
|
|
desktopName = "osu!";
|
|
|
|
name = "osu";
|
|
|
|
exec = "osu!";
|
|
|
|
icon = "osu!";
|
|
|
|
comment = meta.description;
|
|
|
|
type = "Application";
|
2022-02-22 14:56:15 +00:00
|
|
|
categories = [ "Game" ];
|
2021-12-26 15:17:12 +00:00
|
|
|
})];
|
2020-04-11 19:12:04 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Rhythm is just a *click* away";
|
|
|
|
homepage = "https://osu.ppy.sh";
|
2020-08-19 19:54:11 +01:00
|
|
|
license = with licenses; [
|
|
|
|
mit
|
|
|
|
cc-by-nc-40
|
|
|
|
unfreeRedistributable # osu-framework contains libbass.so in repository
|
|
|
|
];
|
2020-04-11 19:12:04 +01:00
|
|
|
maintainers = with maintainers; [ oxalica ];
|
|
|
|
platforms = [ "x86_64-linux" ];
|
2021-10-08 17:41:39 +01:00
|
|
|
mainProgram = "osu!";
|
2020-04-11 19:12:04 +01:00
|
|
|
};
|
|
|
|
passthru.updateScript = ./update.sh;
|
|
|
|
}
|