let tic-80 compile on osx when there's no alsa
This commit is contained in:
parent
efbaf0ff11
commit
b2d450ed08
|
@ -33,8 +33,7 @@ pkgs.stdenv.mkDerivation rec {
|
||||||
mesa_glu
|
mesa_glu
|
||||||
mesa_glu
|
mesa_glu
|
||||||
freeglut
|
freeglut
|
||||||
alsaLib
|
] ++ lib.optional stdenv.isLinux alsaLib;
|
||||||
];
|
|
||||||
|
|
||||||
configurePhase = ''
|
configurePhase = ''
|
||||||
echo [DIRECTORY] $(pwd)
|
echo [DIRECTORY] $(pwd)
|
||||||
|
@ -51,13 +50,21 @@ pkgs.stdenv.mkDerivation rec {
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
chmod a+x bin/tic80
|
chmod a+x bin/tic80
|
||||||
cp -v bin/tic80 $out/bin
|
cp -v bin/tic80 $out/bin
|
||||||
|
|
||||||
|
# Create Desktop Item
|
||||||
|
mkdir -p "$out/share/applications"
|
||||||
|
ln -s "${desktopItem}"/share/applications/* "$out/share/applications/"
|
||||||
|
|
||||||
|
mkdir -p "$out/share/icons/hicolor/128x128/apps" # the long folder path is crucial, just using $out/share/icons does not work
|
||||||
|
ln -s "$out/build/linux/tic80.png" "$out/share/icons/hicolor/128x128/apps/tic-80.png"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
tic80Item = pkgs.makeDesktopItem {
|
desktopItem = pkgs.makeDesktopItem {
|
||||||
name = "TIC-80";
|
name = "TIC-80";
|
||||||
exec = "tic80";
|
exec = "tic80 %U";
|
||||||
comment = "Tiny Computer";
|
comment = "Tiny Computer";
|
||||||
categories = [ "Development" "Game" ];
|
categories = [ "Development" "Game" ];
|
||||||
desktopName = "TIC-80";
|
desktopName = "TIC-80";
|
||||||
|
icon = "tic-80";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue