1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 cmake,
6 ninja,
7 libtiff,
8 libwebp,
9 SDL2,
10 SDL2_image,
11 SDL2_ttf,
12 SDL2_mixer,
13 nix-update-script,
14}:
15
16stdenv.mkDerivation (finalAttrs: {
17 pname = "minesector";
18 version = "1.1.5";
19
20 src = fetchFromGitHub {
21 owner = "grassdne";
22 repo = "minesector";
23 tag = finalAttrs.version;
24 hash = "sha256-VMTXZ4CIk9RpE4R9shHPl0R/T7mJUKY2b8Zi0DPW0/Q=";
25 };
26
27 nativeBuildInputs = [
28 cmake
29 ninja
30 ];
31
32 buildInputs = [
33 libtiff
34 libwebp
35 SDL2
36 SDL2_image
37 SDL2_ttf
38 SDL2_mixer
39 ];
40
41 strictDeps = true;
42
43 postPatch = ''
44 substituteInPlace CMakeLists.txt \
45 --replace-fail "set(STATIC_LINK" "# set(STATIC_LINK"
46 '';
47
48 passthru.updateScript = nix-update-script { };
49
50 meta = {
51 mainProgram = "minesector";
52 description = "Snazzy Minesweeper-based game built with SDL2";
53 homepage = "https://github.com/grassdne/minesector";
54 license = lib.licenses.mit;
55 platforms = lib.platforms.unix;
56 maintainers = with lib.maintainers; [ federicoschonborn ];
57 };
58})