Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 59 lines 1.2 kB view raw
1{ 2 stdenv, 3 lib, 4 fetchzip, 5 wxGTK32, 6 coreutils, 7 SDL2, 8 openal, 9 alsa-lib, 10 pkg-config, 11 gtk3, 12 wrapGAppsHook3, 13 autoreconfHook, 14 withNetworking ? true, 15 withALSA ? true, 16}: 17 18stdenv.mkDerivation rec { 19 pname = "pcem"; 20 version = "17"; 21 22 src = fetchzip { 23 url = "https://pcem-emulator.co.uk/files/PCemV${version}Linux.tar.gz"; 24 stripRoot = false; 25 sha256 = "067pbnc15h6a4pnnym82klr1w8qwfm6p0pkx93gx06wvwqsxvbdv"; 26 }; 27 28 nativeBuildInputs = [ 29 autoreconfHook 30 pkg-config 31 wrapGAppsHook3 32 ]; 33 buildInputs = [ 34 wxGTK32 35 coreutils 36 SDL2 37 openal 38 gtk3 39 ] 40 ++ lib.optional withALSA alsa-lib; 41 42 configureFlags = [ 43 "--enable-release-build" 44 ] 45 ++ lib.optional withNetworking "--enable-networking" 46 ++ lib.optional withALSA "--enable-alsa"; 47 48 # Fix GCC 14 build 49 env.NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration -Wno-error=incompatible-pointer-types"; 50 51 meta = with lib; { 52 description = "Emulator for IBM PC computers and clones"; 53 mainProgram = "pcem"; 54 homepage = "https://pcem-emulator.co.uk/"; 55 license = licenses.gpl2Only; 56 maintainers = [ maintainers.terin ]; 57 platforms = platforms.linux ++ platforms.windows; 58 }; 59}