add tic-80 to curve

This commit is contained in:
Anish Lakhwara 2022-12-15 20:29:19 +10:00
parent 5b589f7df8
commit 260de2ef60
3 changed files with 65 additions and 0 deletions

View file

@ -90,6 +90,7 @@ in
calendar-cli
wyrd
tex
tic-80
];

View file

@ -3,4 +3,5 @@
{ pkgs ? (import ../nixpkgs.nix) { } }: {
plymouth-themes = pkgs.callPackage ./plymouth.nix { };
tic-80 = pkgs.callPackage ./tic-80.nix { };
}

63
pkgs/tic-80.nix Normal file
View file

@ -0,0 +1,63 @@
# Stolen from: https://gist.github.com/jjwatt/c83c02e6903c8ffaf546fe5eb27e7d25?permalink_comment_id=3305141#gistcomment-3305141
{ pkgs, ... }:
stdenv.mkDerivation rec {
name = "tic-80";
src = builtins.fetchGit {
fetchSubmodules = true;
url = "https://github.com/nesbox/TIC-80";
rev = "0feb848378fc40d16aaa609ed7a2148d7a064ac4";
sha256 = "12fl9wfc1577rmzcll50r3hq582010bpwd3yi15ji2vadc2q1w9l";
};
buildInputs = with pkgs; [
gcc
pkgconfig
autoconf
automake
libtool
pcre
gnumake
SDL2
SDL2_gfx
SDL_image
SDL2_ttf
SDL2_mixer
harfbuzz
curl
gtk3
gtk3-x11
cmake
cmakeCurses
elementary-cmake-modules
extra-cmake-modules
libglvnd
mesa_glu
mesa_glu
freeglut
alsaLib
];
configurePhase = ''
echo [DIRECTORY] $(pwd)
sed -i 's/BUILD_PRO "Build PRO version" FALSE/BUILD_PRO "Build PRO version" TRUE/' CMakeLists.txt
cd build/
cmake ..
'';
buildPhase = ''
make -j4
'';
installPhase = ''
mkdir -p $out/bin
chmod a+x bin/tic80
cp -v bin/tic80 $out/bin
'';
tic80Item = makeDesktopItem {
name = "TIC-80";
exec = "tic80";
comment = "Tiny Computer";
categories = "Development;Game";
desktopName = "TIC-80";
};
}