summary refs log tree commit diff
path: root/pkgs/games/jamp/default.nix
blob: b551b9b6dfce43ee39c76d41ccfd5cf00fb734e1 (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
a :  
let 
  s = import ./src-for-default.nix;
  buildInputs = with a; [
    mesa SDL SDL_mixer SDL_image

  ];
in
rec {
  src = a.fetchUrlFromSrcInfo s;

  inherit (s) name;
  inherit buildInputs;
  configureFlags = [];

  preBuild = a.fullDepEntry (''
    sed -e "s@/usr/games@$out/bin@g" -i Makefile
    sed -e "s@/usr/@$out/@g" -i Makefile
    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${a.SDL}/include/SDL"
  '') ["minInit" "addInputs" "doUnpack"];

  /* doConfigure should be removed if not needed */
  phaseNames = ["preBuild" "doMakeInstall"];
      
  meta = {
    description = "A physics-based game";
    maintainers = [
      a.lib.maintainers.raskin
    ];
    platforms = with a.lib.platforms; 
      linux ++ darwin;
  };
}