biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / games / snipes / default.nix
blob7212d6d816705959354a7002a2efdf595a17bf67
1 { lib, stdenv, fetchFromGitHub, fetchurl, SDL2, SDL2_ttf }:
3 let
4   font = fetchurl {
5     url    = "http://kingbird.myphotos.cc/ee22d44076adb8a34d8e20df4be3730a/SnipesConsole.ttf";
6     sha256 = "06n8gq18js0bv4svx84ljzhs9zmi81wy0zqcqj3b4g0rsrkr20a7";
7   };
9 in stdenv.mkDerivation {
10   pname = "snipes";
11   version = "20240317";
13   src = fetchFromGitHub {
14     owner  = "Davidebyzero";
15     repo   = "Snipes";
16     rev    = "caa2ce036a9f6461ccdb7ef8306edbd126dd4081";
17     sha256 = "sha256-iIoh5odCziX1cKs5qf4hJdXpUhy9kdht0YMLLfhvKZA=";
18   };
20   postPatch = ''
21     substitute config-sample.h config.h \
22       --replace SnipesConsole.ttf $out/share/snipes/SnipesConsole.ttf
23   '';
25   enableParallelBuilding = true;
27   buildInputs = [ SDL2 SDL2_ttf ];
29   installPhase = ''
30     runHook preInstall
32     install -Dm755 -t $out/bin snipes
33     install -Dm644 -t $out/share/doc/snipes *.md
34     install -Dm644 ${font} $out/share/snipes/SnipesConsole.ttf
36     runHook postInstall
37   '';
39   meta = with lib; {
40     description = "Modern port of the classic 1982 text-mode game Snipes";
41     mainProgram = "snipes";
42     homepage    = "https://www.vogons.org/viewtopic.php?f=7&t=49073";
43     license     = licenses.free; # This reverse-engineered source code is released with the original authors' permission.
44     maintainers = with maintainers; [ peterhoeg cybershadow ];
45     broken      = stdenv.hostPlatform.isDarwin; # not supported upstream - https://github.com/Davidebyzero/Snipes/issues/8#issuecomment-433720046
46   };