nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 cmake,
6 ncurses,
7}:
8
9stdenv.mkDerivation (finalAttrs: {
10 pname = "msnake";
11 # last release tag was 13 years ago
12 version = "0.1.1-unstable-2020-02-01";
13
14 src = fetchFromGitHub {
15 owner = "mogria";
16 repo = "msnake";
17 rev = "830967fc8195216120fedcac1574113b367a0f9a";
18 hash = "sha256-5q3yT7amPF+SSvO6/eUU7IiK0k6f3nme9YYBUobSuuo=";
19 };
20
21 postPatch = ''
22 substituteInPlace CMakeLists.txt --replace-fail \
23 "cmake_minimum_required(VERSION 2.8.4)" \
24 "cmake_minimum_required(VERSION 4.0)"
25 '';
26
27 nativeBuildInputs = [
28 cmake
29 ];
30
31 buildInputs = [
32 ncurses
33 ];
34
35 meta = {
36 description = "Multiplatform command line snake game";
37 homepage = "https://github.com/mogria/msnake";
38 license = lib.licenses.mit;
39 platforms = lib.platforms.unix;
40 mainProgram = "msnake";
41 maintainers = with lib.maintainers; [ ethancedwards8 ];
42 };
43})