nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchurl,
5 cmake,
6 pkg-config,
7 makeWrapper,
8 SDL,
9 SDL_mixer,
10 SDL_net,
11 wxGTK32,
12}:
13
14stdenv.mkDerivation rec {
15 pname = "odamex";
16 version = "0.9.5";
17
18 src = fetchurl {
19 url = "mirror://sourceforge/${pname}/${pname}-src-${version}.tar.bz2";
20 sha256 = "sha256-WBqO5fWzemw1kYlY192v0nnZkbIEVuWmjWYMy+1ODPQ=";
21 };
22
23 nativeBuildInputs = [
24 cmake
25 pkg-config
26 makeWrapper
27 ];
28
29 buildInputs = [
30 SDL
31 SDL_mixer
32 SDL_net
33 wxGTK32
34 ];
35
36 installPhase = ''
37 runHook preInstall
38 ''
39 + (
40 if stdenv.hostPlatform.isDarwin then
41 ''
42 mkdir -p $out/{Applications,bin}
43 mv odalaunch/odalaunch.app $out/Applications
44 makeWrapper $out/{Applications/odalaunch.app/Contents/MacOS,bin}/odalaunch
45 ''
46 else
47 ''
48 make install
49 ''
50 )
51 + ''
52 runHook postInstall
53 '';
54
55 meta = {
56 homepage = "http://odamex.net/";
57 description = "Client/server port for playing old-school Doom online";
58 license = lib.licenses.gpl2Only;
59 platforms = lib.platforms.unix;
60 maintainers = [ ];
61 };
62}