summary refs log tree commit diff
path: root/pkgs/games/endless-sky/default.nix
blob: f993ad1b8e099d2b019bae4c048a4140ea8af675 (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{ stdenv, fetchFromGitHub
, SDL2, libpng, libjpeg, glew, openal, scons
}:

let
  version = "0.9.4";

in
stdenv.mkDerivation rec {
  name = "endless-sky-${version}";

  src = fetchFromGitHub {
    owner = "endless-sky";
    repo = "endless-sky";
    rev = "v${version}";
    sha256 = "1mirdcpap0a280j472lhmhqg605b7glvdr4l93qcapk8an8d46m7";
  };

  enableParallelBuilding = true;

  buildInputs = [
    SDL2 libpng libjpeg glew openal scons
  ];

  patches = [
    ./fixes.patch
  ];

  buildPhase = ''
    scons -j$NIX_BUILD_CORES PREFIX="$out"
  '';

  installPhase = ''
    scons -j$NIX_BUILD_CORES install PREFIX="$out"
  '';

  meta = with stdenv.lib; {
    description = "A sandbox-style space exploration game similar to Elite, Escape Velocity, or Star Control";
    homepage = "https://endless-sky.github.io/";
    license = with licenses; [
      gpl3Plus cc-by-sa-30 cc-by-sa-40 publicDomain
    ];
    maintainers = with maintainers; [ lheckemann ];
    platforms = with platforms; allBut darwin;
  };
}