Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / games / opentyrian / default.nix
blobf01874ce9435a4925457f019228ff789a7041fb4
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , fetchzip
5 , SDL2
6 , SDL2_net
7 , pkg-config
8 }:
10 stdenv.mkDerivation rec {
11   pname = "opentyrian";
12   version = "2.1.20221123";
14   src = fetchFromGitHub {
15     owner = "opentyrian";
16     repo = "opentyrian";
17     rev = "v${version}";
18     sha256 = "sha256-fVcc8v1c9uU72X6afEo4VoMo6YuDECQSwDQ/TQjgwUY=";
19   };
21   data = fetchzip {
22     url = "https://camanis.net/tyrian/tyrian21.zip";
23     sha256 = "1biz6hf6s7qrwn8ky0g6p8w7yg715w7yklpn6258bkks1s15hpdb";
24   };
26   nativeBuildInputs = [ pkg-config ];
27   buildInputs = [ SDL2 SDL2_net ];
29   enableParallelBuilding = true;
31   makeFlags = [ "prefix=${placeholder "out"}" ];
33   postInstall = ''
34     mkdir -p $out/share/games/tyrian
35     cp -r $data/* $out/share/games/tyrian/
36   '';
38   meta = {
39     description = ''Open source port of the game "Tyrian"'';
40     homepage = "https://github.com/opentyrian/opentyrian";
41     # This does not account of Tyrian data.
42     # license = lib.licenses.gpl2;
43   };