about summary refs log tree commit diff
path: root/pkgs/applications/emulators/tinyemu/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/emulators/tinyemu/default.nix')
-rw-r--r--pkgs/applications/emulators/tinyemu/default.nix41
1 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/applications/emulators/tinyemu/default.nix b/pkgs/applications/emulators/tinyemu/default.nix
new file mode 100644
index 0000000000000..c32fd24fe4770
--- /dev/null
+++ b/pkgs/applications/emulators/tinyemu/default.nix
@@ -0,0 +1,41 @@
+{ lib
+, stdenv
+, fetchurl
+, SDL
+, curl
+, openssl
+}:
+
+stdenv.mkDerivation rec {
+  pname = "tinyemu";
+  version = "2019-12-21";
+
+  src = fetchurl {
+    url = "https://bellard.org/tinyemu/${pname}-${version}.tar.gz";
+    hash = "sha256-voNR8hIYGbMXL87c5csYJvoSyH2ht+2Y8mnT6AKgVVU=";
+  };
+
+  buildInputs = [
+    SDL
+    curl
+    openssl
+  ];
+
+  makeFlags = [ "DESTDIR=$(out)" "bindir=/bin" ];
+
+  preInstall = ''
+    mkdir -p "$out/bin"
+  '';
+
+  meta = with lib; {
+    homepage = "https://bellard.org/tinyemu/";
+    description = "A system emulator for the RISC-V and x86 architectures";
+    longDescription = ''
+      TinyEMU is a system emulator for the RISC-V and x86 architectures. Its
+      purpose is to be small and simple while being complete.
+    '';
+    license = with licenses; [ mit bsd2 ];
+    maintainers = with maintainers; [ jhhuh AndersonTorres ];
+    platforms = platforms.linux;
+  };
+}