summaryrefslogtreecommitdiffstats
path: root/pkgs/applications/emulators/craftos-pc
diff options
context:
space:
mode:
authorAndersonTorres <torres.anderson.85@protonmail.com>2022-02-15 23:28:16 -0300
committerAndersonTorres <torres.anderson.85@protonmail.com>2022-02-16 01:38:20 -0300
commit8d65e832f0a18f60e2040940c80d96373ac8b88c (patch)
tree3d6ade66b2a81403e3852b80b9e7c660699b6ed6 /pkgs/applications/emulators/craftos-pc
parent19574af0af3ffaf7c9e359744ed32556f34536bd (diff)
Move misc/emulators to applications/emulators - part 1
Emulators form a class by themselves. So, they should be moved to applications/.
Diffstat (limited to 'pkgs/applications/emulators/craftos-pc')
-rw-r--r--pkgs/applications/emulators/craftos-pc/default.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/applications/emulators/craftos-pc/default.nix b/pkgs/applications/emulators/craftos-pc/default.nix
new file mode 100644
index 000000000000..3bc9e0b81cc0
--- /dev/null
+++ b/pkgs/applications/emulators/craftos-pc/default.nix
@@ -0,0 +1,43 @@
+{ lib, stdenv, fetchFromGitHub, poco, openssl, SDL2, SDL2_mixer }:
+
+let
+ craftos2-lua = fetchFromGitHub {
+ owner = "MCJack123";
+ repo = "craftos2-lua";
+ rev = "v2.4.4";
+ sha256 = "1q63ki4sxx8bxaa6ag3xj153p7a8a12ivm0k33k935p41k6y2k64";
+ };
+in
+
+stdenv.mkDerivation rec {
+ pname = "craftos-pc";
+ version = "2.4.5";
+
+ src = fetchFromGitHub {
+ owner = "MCJack123";
+ repo = "craftos2";
+ rev = "v${version}";
+ sha256 = "00a4p365krbdprlv4979d13mm3alhxgzzj3vqz2g67795plf64j4";
+ };
+
+ buildInputs = [ poco openssl SDL2 SDL2_mixer ];
+
+ preBuild = ''
+ cp -R ${craftos2-lua}/* ./craftos2-lua/
+ chmod -R u+w ./craftos2-lua
+ make -C craftos2-lua linux
+ '';
+
+ installPhase = ''
+ mkdir -p $out/bin
+ DESTDIR=$out/bin make install
+ '';
+
+ 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;
+ platforms = platforms.linux;
+ maintainers = [ maintainers.siraben ];
+ };
+}