diff options
author | Ben Siraphob <bensiraphob@gmail.com> | 2022-07-12 22:22:58 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-12 22:22:58 -0700 |
commit | 08dfccb40198ebdfd0b4d99a95b5e03f66553a8e (patch) | |
tree | 3f102a1504d71b7fdce771409730e4d9c5fdd503 /pkgs/applications/emulators | |
parent | 01b8587401f41aecd4b77aa9698c0cba65a38882 (diff) | |
parent | 82f4659c4779862bb45bded7ac25257b00e24f57 (diff) |
Merge pull request #179753 from celestefox/craftos
Diffstat (limited to 'pkgs/applications/emulators')
-rw-r--r-- | pkgs/applications/emulators/craftos-pc/default.nix | 42 |
1 files changed, 34 insertions, 8 deletions
diff --git a/pkgs/applications/emulators/craftos-pc/default.nix b/pkgs/applications/emulators/craftos-pc/default.nix index 3bc9e0b81cc05..d2668c473a628 100644 --- a/pkgs/applications/emulators/craftos-pc/default.nix +++ b/pkgs/applications/emulators/craftos-pc/default.nix @@ -1,26 +1,45 @@ -{ lib, stdenv, fetchFromGitHub, poco, openssl, SDL2, SDL2_mixer }: +{ lib +, stdenv +, fetchFromGitHub +, patchelf +, unzip +, poco +, openssl +, SDL2 +, SDL2_mixer +, ncurses +, libpng +, pngpp +, libwebp +}: let craftos2-lua = fetchFromGitHub { owner = "MCJack123"; repo = "craftos2-lua"; - rev = "v2.4.4"; - sha256 = "1q63ki4sxx8bxaa6ag3xj153p7a8a12ivm0k33k935p41k6y2k64"; + rev = "v2.6.6"; + sha256 = "cCXH1GTRqJQ57/6sWIxik366YBx/ii3nzQwx4YpEh1w="; + }; + craftos2-rom = fetchFromGitHub { + owner = "McJack123"; + repo = "craftos2-rom"; + rev = "v2.6.6"; + sha256 = "VzIqvf83k121DxuH5zgZfFS9smipDonyqqhVgj2kgYw="; }; in stdenv.mkDerivation rec { pname = "craftos-pc"; - version = "2.4.5"; + version = "2.6.6"; src = fetchFromGitHub { owner = "MCJack123"; repo = "craftos2"; rev = "v${version}"; - sha256 = "00a4p365krbdprlv4979d13mm3alhxgzzj3vqz2g67795plf64j4"; + sha256 = "9lpAWYFli3/OBfmu2dQxKi+/TaHaBQNpZsCURvl0h/E="; }; - buildInputs = [ poco openssl SDL2 SDL2_mixer ]; + buildInputs = [ patchelf poco openssl SDL2 SDL2_mixer ncurses libpng pngpp libwebp ]; preBuild = '' cp -R ${craftos2-lua}/* ./craftos2-lua/ @@ -28,16 +47,23 @@ stdenv.mkDerivation rec { make -C craftos2-lua linux ''; + dontStrip = true; + installPhase = '' - mkdir -p $out/bin + mkdir -p $out/bin $out/lib $out/share/craftos $out/include DESTDIR=$out/bin make install + cp ./craftos2-lua/src/liblua.so $out/lib + patchelf --replace-needed craftos2-lua/src/liblua.so liblua.so $out/bin/craftos + cp -R api $out/include/CraftOS-PC + cp -R ${craftos2-rom}/* $out/share/craftos ''; meta = with lib; { description = "An implementation of the CraftOS-PC API written in C++ using SDL"; homepage = "https://www.craftos-pc.cc"; - license = licenses.mit; + license = with licenses; [ mit free ]; platforms = platforms.linux; maintainers = [ maintainers.siraben ]; + mainProgram = "craftos"; }; } |