tangled
alpha
login
or
join now
hyl.st
/
helm
2
fork
atom
nix config
2
fork
atom
overview
issues
pulls
pipelines
let tic-80 compile on osx when there's no alsa
Anish Lakhwara
3 years ago
b2d450ed
efbaf0ff
+11
-4
1 changed file
expand all
collapse all
unified
split
pkgs
tic-80.nix
+11
-4
pkgs/tic-80.nix
···
33
33
mesa_glu
34
34
mesa_glu
35
35
freeglut
36
36
-
alsaLib
37
37
-
];
36
36
+
] ++ lib.optional stdenv.isLinux alsaLib;
38
37
39
38
configurePhase = ''
40
39
echo [DIRECTORY] $(pwd)
···
51
50
mkdir -p $out/bin
52
51
chmod a+x bin/tic80
53
52
cp -v bin/tic80 $out/bin
53
53
+
54
54
+
# Create Desktop Item
55
55
+
mkdir -p "$out/share/applications"
56
56
+
ln -s "${desktopItem}"/share/applications/* "$out/share/applications/"
57
57
+
58
58
+
mkdir -p "$out/share/icons/hicolor/128x128/apps" # the long folder path is crucial, just using $out/share/icons does not work
59
59
+
ln -s "$out/build/linux/tic80.png" "$out/share/icons/hicolor/128x128/apps/tic-80.png"
54
60
'';
55
61
56
56
-
tic80Item = pkgs.makeDesktopItem {
62
62
+
desktopItem = pkgs.makeDesktopItem {
57
63
name = "TIC-80";
58
58
-
exec = "tic80";
64
64
+
exec = "tic80 %U";
59
65
comment = "Tiny Computer";
60
66
categories = [ "Development" "Game" ];
61
67
desktopName = "TIC-80";
68
68
+
icon = "tic-80";
62
69
};
63
70
}