nix-home/home/osu.nix

33 lines
1 KiB
Nix
Raw Normal View History

2024-03-02 19:33:44 +00:00
{ pkgs, lib, ... }:
2021-10-09 02:52:28 +00:00
let
2024-08-17 15:03:07 +00:00
# osu-pkg = pkgs.unstable.osu-lazer-bin;
osu-pkg = with pkgs; with lib;
appimageTools.wrapType2 rec {
pname = "osu-lazer-bin";
version = "2024.817.0";
src = fetchurl {
url = "https://github.com/ppy/osu/releases/download/${version}/osu.AppImage";
sha256 = "1qzyfyciyv38flkac6v3ym5vpgr9m9h1z5hg5pz6s9h9gb8q7fq2";
};
extraPkgs = pkgs: with pkgs; [ icu ];
2023-02-17 10:28:50 +00:00
2024-08-17 15:03:07 +00:00
extraInstallCommands =
let contents = appimageTools.extract { inherit pname version src; };
in
''
mv -v $out/bin/${pname} $out/bin/osu\!
install -m 444 -D ${contents}/osu\!.desktop -t $out/share/applications
for i in 16 32 48 64 96 128 256 512 1024; do
install -D ${contents}/osu\!.png $out/share/icons/hicolor/''${i}x$i/apps/osu\!.png
done
'';
};
2021-10-09 02:52:28 +00:00
in
{
home.packages = [ osu-pkg ];
2024-07-13 00:54:31 +00:00
xdg.mimeApps.defaultApplications."x-scheme-handler/osu" = "osu!.desktop";
2023-02-17 10:28:50 +00:00
# home.packages = [ pkgs.osu-lazer ];
2021-10-09 02:52:28 +00:00
}
2024-02-02 00:10:40 +00:00