nix config

let tic-80 compile on osx when there's no alsa

+11 -4
+11 -4
pkgs/tic-80.nix
··· 33 33 mesa_glu 34 34 mesa_glu 35 35 freeglut 36 - alsaLib 37 - ]; 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 + 54 + # Create Desktop Item 55 + mkdir -p "$out/share/applications" 56 + ln -s "${desktopItem}"/share/applications/* "$out/share/applications/" 57 + 58 + mkdir -p "$out/share/icons/hicolor/128x128/apps" # the long folder path is crucial, just using $out/share/icons does not work 59 + ln -s "$out/build/linux/tic80.png" "$out/share/icons/hicolor/128x128/apps/tic-80.png" 54 60 ''; 55 61 56 - tic80Item = pkgs.makeDesktopItem { 62 + desktopItem = pkgs.makeDesktopItem { 57 63 name = "TIC-80"; 58 - exec = "tic80"; 64 + exec = "tic80 %U"; 59 65 comment = "Tiny Computer"; 60 66 categories = [ "Development" "Game" ]; 61 67 desktopName = "TIC-80"; 68 + icon = "tic-80"; 62 69 }; 63 70 }