@@ -0,0 +1,35 @@
1+{ fetchurl, ncurses, stdenv,
2+ updateAutotoolsGnuConfigScriptsHook }:
3+
4+stdenv.mkDerivation rec {
5+ name = "freesweep-${version}";
6+ version = "1.0.1";
7+
8+ src = fetchurl {
9+ url = "https://github.com/rwestlund/freesweep/archive/v${version}.tar.gz";
10+ sha256 = "0l2kf14558lsq9qd2hs0kcyn9bbl1jdbzwrvcs6mnyjl7zpizcpj";
11+ };
12+
13+ nativeBuildInputs = [ updateAutotoolsGnuConfigScriptsHook ];
14+ buildInputs = [ ncurses ];
15+
16+ preConfigure = ''
17+ configureFlags="$configureFlags --with-prefsdir=$out/share"
18+ '';
19+
20+ installPhase = ''
21+ runHook preInstall
22+ install -D -m 0555 freesweep $out/bin/freesweep
23+ install -D -m 0444 sweeprc $out/share/sweeprc
24+ install -D -m 0444 freesweep.6 $out/share/man/man6/freesweep.6
25+ runHook postInstall
26+ '';
27+
28+ meta = with stdenv.lib; {
29+ description = "A console minesweeper-style game written in C for Unix-like systems";
30+ homepage = https://github.com/rwestlund/freesweep;
31+ license = licenses.gpl2;
32+ maintainers = with maintainers; [ kierdavis ];
33+ platforms = platforms.unix;
34+ };
35+}