Skip to content

Commit 299bb11

Browse files
committed
osu-mime: rename icons to "osu!mime"
1 parent 479f15b commit 299bb11

File tree

3 files changed

+61
-6
lines changed

3 files changed

+61
-6
lines changed

pkgs/osu-mime/default.nix

+12-5
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,16 @@ in
2121
url = "https://raw.githubusercontent.com/ppy/osu-web/${osu-web-rev}/public/images/layout/osu-logo-white.svg";
2222
sha256 = "XvYBIGyvTTfMAozMP9gmr3uYEJaMcvMaIzwO7ZILrkY=";
2323
})
24-
(fetchurl {
25-
url = "https://aur.archlinux.org/cgit/aur.git/plain/osu-file-extensions.xml?h=osu-mime&id=${osu-mime-spec-rev}";
26-
sha256 = "MgQNW0RpnEYTC0ym6wB8cA6a8GCED1igsjOtHPXNZVo=";
24+
(stdenvNoCC.mkDerivation {
25+
name = "osu-file-extensions";
26+
src = fetchurl {
27+
url = "https://aur.archlinux.org/cgit/aur.git/plain/osu-file-extensions.xml?h=osu-mime&id=${osu-mime-spec-rev}";
28+
sha256 = "MgQNW0RpnEYTC0ym6wB8cA6a8GCED1igsjOtHPXNZVo=";
29+
};
30+
unpackPhase = "cp $src ./osu-file-extensions.xml";
31+
installPhase = "cp osu-file-extensions.xml $out";
32+
# Patch to change the icon names from "osu!" to "osu!mime".
33+
patches = [ ./osu-mime-change-icon.patch ];
2734
})
2835
];
2936

@@ -51,10 +58,10 @@ in
5158
# Generate icon
5259
rsvg-convert -w "$size" -h "$size" -f png -o "osu-logo-triangles.png" "''${srcs[0]}"
5360
rsvg-convert -w "$size" -h "$size" -f png -o "osu-logo-white.png" "''${srcs[1]}"
54-
convert -composite "osu-logo-triangles.png" "osu-logo-white.png" -gravity center 'osu!.png'
61+
convert -composite "osu-logo-triangles.png" "osu-logo-white.png" -gravity center 'osu!mime.png'
5562
5663
mkdir -p "$icon_dir"
57-
mv 'osu!.png' "$icon_dir"
64+
mv 'osu!mime.png' "$icon_dir"
5865
done
5966
6067
cp "''${srcs[2]}" "$mime_dir/osu.xml"
+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
diff --git a/osu-file-extensions.xml b/osu-file-extensions.xml
2+
index 9270d15..43add11 100644
3+
--- a/osu-file-extensions.xml
4+
+++ b/osu-file-extensions.xml
5+
@@ -6,37 +6,37 @@
6+
<magic priority="60">
7+
<match type="string" offset="0" value="osu file format v"/>
8+
</magic>
9+
- <icon name="osu!"/>
10+
+ <icon name="osu!mime"/>
11+
<comment>osu! beatmap</comment>
12+
</mime-type>
13+
<mime-type type="application/x-osu-storyboard">
14+
<glob pattern="*.osb"/>
15+
<sub-class-of type="text/plain"/>
16+
- <icon name="osu!"/>
17+
+ <icon name="osu!mime"/>
18+
<comment>osu! storyboard</comment>
19+
</mime-type>
20+
<mime-type type="application/x-osu-skin-archive">
21+
<glob pattern="*.osk"/>
22+
<sub-class-of type="application/zip"/>
23+
- <icon name="osu!"/>
24+
+ <icon name="osu!mime"/>
25+
<comment>osu! skin archive</comment>
26+
</mime-type>
27+
<mime-type type="application/x-osu-replay">
28+
<glob pattern="*.osr"/>
29+
<sub-class-of type="application/octet-stream"/>
30+
- <icon name="osu!"/>
31+
+ <icon name="osu!mime"/>
32+
<comment>osu! replay</comment>
33+
</mime-type>
34+
<mime-type type="application/x-osu-beatmap-archive">
35+
<glob pattern="*.osz"/>
36+
<sub-class-of type="application/zip"/>
37+
- <icon name="osu!"/>
38+
+ <icon name="osu!mime"/>
39+
<comment>osu! beatmap archive</comment>
40+
</mime-type>
41+
<mime-type type="application/x-osu-beatmap-archive">
42+
<glob pattern="*.osz2"/>
43+
<sub-class-of type="application/zip"/>
44+
- <icon name="osu!"/>
45+
+ <icon name="osu!mime"/>
46+
<comment>osu! beatmap archive</comment>
47+
</mime-type>
48+
</mime-info>

pkgs/osu-stable/default.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
desktopItems = makeDesktopItem {
6363
name = pname;
6464
exec = "${script}/bin/${pname} %U";
65-
icon = "osu!"; # icon comes from the osu-mime package
65+
icon = "osu!mime"; # icon comes from the osu-mime package
6666
comment = "Rhythm is just a *click* away";
6767
desktopName = "osu!stable";
6868
categories = ["Game"];

0 commit comments

Comments
 (0)