1{
2 lib,
3 stdenv,
4 fetchurl,
5 ncurses,
6}:
7
8stdenv.mkDerivation rec {
9 pname = "npush";
10 version = "0.7";
11
12 src = fetchurl {
13 url = "mirror://sourceforge/project/npush/${pname}/${version}/${pname}-${version}.tgz";
14 hash = "sha256-8hbSsyeehzd4T3fUhDyebyI/oTHOHr3a8ArYAquivNk=";
15 };
16
17 outputs = [
18 "out"
19 "doc"
20 ];
21
22 buildInputs = [
23 ncurses
24 ];
25
26 dontConfigure = true;
27
28 makeFlags = [
29 "CC=${stdenv.cc.targetPrefix}c++"
30 ];
31 env.NIX_CFLAGS_COMPILE = "-Wno-error=format-security";
32
33 installPhase = ''
34 runHook preInstall
35
36 mkdir -p $out/bin $out/share/npush/levels $doc/share/doc/npush
37 cp npush $out/bin/
38 cp levels/* $out/share/npush/levels
39 cp CHANGES COPYING CREDITS index.html \
40 readme.txt screenshot1.png screenshot2.png $doc/share/doc/npush/
41
42 runHook postInstall
43 '';
44
45 meta = with lib; {
46 broken = stdenv.hostPlatform.isDarwin;
47 homepage = "https://npush.sourceforge.net/";
48 description = "Sokoban-like game";
49 mainProgram = "npush";
50 license = licenses.gpl2Plus;
51 maintainers = with maintainers; [ ];
52 platforms = with platforms; unix;
53 };
54}