summaryrefslogtreecommitdiffstats
path: root/pkgs/applications/emulators/tinyemu/default.nix
blob: ca3f8acd88ca2dd8f7b019f1cd16815e73f10e94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{ 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 = [
    "CC:=$(CC)"
    "STRIP:=$(STRIP)"
    "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;
  };
}