nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ fetchFromGitHub, fetchpatch, ncurses, lib, stdenv
2, updateAutotoolsGnuConfigScriptsHook, installShellFiles }:
3
4stdenv.mkDerivation rec {
5 pname = "freesweep";
6 version = "1.0.2";
7
8 src = fetchFromGitHub {
9 owner = "rwestlund";
10 repo = "freesweep";
11 rev = "v${version}";
12 hash = "sha256-iuu81yHbNrjdPsimBrPK58PJ0d8i3ySM7rFUG/d8NJM";
13 };
14
15 nativeBuildInputs = [ updateAutotoolsGnuConfigScriptsHook installShellFiles ];
16 buildInputs = [ ncurses ];
17
18 configureFlags = [ "--with-prefsdir=$out/share" ];
19
20 enableParallelBuilding = true;
21
22 installPhase = ''
23 runHook preInstall
24 install -D -m 0555 freesweep $out/bin/freesweep
25 install -D -m 0444 sweeprc $out/share/sweeprc
26 installManPage freesweep.6
27 runHook postInstall
28 '';
29
30 meta = with lib; {
31 description = "A console minesweeper-style game written in C for Unix-like systems";
32 homepage = "https://github.com/rwestlund/freesweep";
33 license = licenses.gpl2;
34 maintainers = with maintainers; [ kierdavis ];
35 platforms = platforms.unix;
36 };
37}