about summary refs log tree commit diff
path: root/pkgs/applications/emulators/pcem/default.nix
blob: e680dd450d304a385df5b6672b1224c68d935f35 (plain) (blame)
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
{ stdenv, lib, fetchzip, wxGTK32, coreutils, SDL2, openal, alsa-lib, pkg-config, gtk3, wrapGAppsHook
, autoreconfHook, withNetworking ? true, withALSA ? true }:

stdenv.mkDerivation rec {
  pname = "pcem";
  version = "17";

  src = fetchzip {
    url = "https://pcem-emulator.co.uk/files/PCemV${version}Linux.tar.gz";
    stripRoot = false;
    sha256 = "067pbnc15h6a4pnnym82klr1w8qwfm6p0pkx93gx06wvwqsxvbdv";
  };

  nativeBuildInputs = [ autoreconfHook pkg-config wrapGAppsHook ];
  buildInputs = [ wxGTK32 coreutils SDL2 openal gtk3 ]
    ++ lib.optional withALSA alsa-lib;

  configureFlags = [ "--enable-release-build" ]
    ++ lib.optional withNetworking "--enable-networking"
    ++ lib.optional withALSA "--enable-alsa";

  meta = with lib; {
    description = "Emulator for IBM PC computers and clones";
    mainProgram = "pcem";
    homepage = "https://pcem-emulator.co.uk/";
    license = licenses.gpl2Only;
    maintainers = [ maintainers.terin ];
    platforms = platforms.linux ++ platforms.windows;
  };
}