opentyrian: 2.1.20130907 -> 2.1.20220318

Updated homepage url and download url to github.
Updated assets URL.

+26 -18
+26 -18
pkgs/games/opentyrian/default.nix
··· 1 - { lib, stdenv, fetchurl, fetchzip, SDL, SDL_net }: 1 + { lib 2 + , stdenv 3 + , fetchFromGitHub 4 + , fetchzip 5 + , SDL2 6 + , SDL2_net 7 + , pkg-config 8 + }: 2 9 3 10 stdenv.mkDerivation rec { 4 11 pname = "opentyrian"; 5 - version = "2.1.20130907"; 12 + version = "2.1.20220318"; 6 13 7 - src = fetchurl { 8 - url = "https://bitbucket.org/opentyrian/opentyrian/get/${version}.tar.gz"; 9 - sha256 = "1jnrkq616pc4dhlbd4n30d65vmn25q84w6jfv9383l9q20cqf2ph"; 14 + src = fetchFromGitHub { 15 + owner = "opentyrian"; 16 + repo = "opentyrian"; 17 + rev = "v${version}"; 18 + sha256 = "01z1zxpps4ils0bnwazl9lmqdbfhfd8fkacahnh6kqyczavg40xg"; 10 19 }; 11 20 12 21 data = fetchzip { 13 - url = "http://sites.google.com/a/camanis.net/opentyrian/tyrian/tyrian21.zip"; 22 + url = "https://camanis.net/tyrian/tyrian21.zip"; 14 23 sha256 = "1biz6hf6s7qrwn8ky0g6p8w7yg715w7yklpn6258bkks1s15hpdb"; 15 24 }; 16 25 17 - buildInputs = [SDL SDL_net]; 26 + nativeBuildInputs = [ pkg-config ]; 27 + buildInputs = [ SDL2 SDL2_net ]; 18 28 19 - patchPhase = " 20 - substituteInPlace src/file.c --replace /usr/share $out/share 21 - "; 22 - buildPhase = "make release"; 23 - installPhase = " 24 - mkdir -p $out/bin 25 - cp ./opentyrian $out/bin 26 - mkdir -p $out/share/opentyrian/data 27 - cp -r $data/* $out/share/opentyrian/data 28 - "; 29 + enableParallelBuilding = true; 30 + 31 + makeFlags = [ "prefix=${placeholder "out"}" ]; 32 + 33 + postInstall = '' 34 + mkdir -p $out/share/games/tyrian 35 + cp -r $data/* $out/share/games/tyrian/ 36 + ''; 29 37 30 38 meta = { 31 39 description = ''Open source port of the game "Tyrian"''; 32 - homepage = "https://bitbucket.org/opentyrian/opentyrian"; 40 + homepage = "https://github.com/opentyrian/opentyrian"; 33 41 # This does not account of Tyrian data. 34 42 # license = lib.licenses.gpl2; 35 43 };