nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, stdenv, fetchurl, SDL, SDL_image, SDL_mixer }:
2
3stdenv.mkDerivation rec {
4 pname = "teeter-torture";
5 version = "2005-10-18";
6 src = fetchurl {
7 url = "ftp://ftp.tuxpaint.org/unix/x/teetertorture/source/teetertorture-${version}.tar.gz";
8 sha256 = "175gdbkx3m82icyzvwpyzs4v2fd69c695k5n8ca0lnjv81wnw2hr";
9 };
10
11 buildInputs = [ SDL SDL_image SDL_mixer];
12
13 configurePhase = ''
14 sed -i s,data/,$out/share/teetertorture/, src/teetertorture.c
15 '';
16
17 patchPhase = ''
18 sed -i '/free(home)/d' src/teetertorture.c
19 '';
20
21 installPhase = ''
22 mkdir -p $out/bin $out/share/teetertorture
23 cp teetertorture $out/bin
24 cp -R data/* $out/share/teetertorture
25 '';
26
27 meta = {
28 homepage = "http://www.newbreedsoftware.com/teetertorture/";
29 description = "Simple shooting game with your cannon is sitting atop a teeter totter";
30 license = lib.licenses.gpl2Plus;
31 platforms = lib.platforms.linux;
32 };
33}