diff options
author | 1000101 <b1000101@pm.me> | 2022-02-02 02:40:41 +0100 |
---|---|---|
committer | 1000101 <b1000101@pm.me> | 2022-02-03 16:46:27 +0100 |
commit | 7446e158d8b9f13d4770b71b066dc0383456f8f9 (patch) | |
tree | e7e567d22089af72d00f24e9bb38ee32faa7a9ea /pkgs/games/7kaa | |
parent | c7d68f57c842d56046d31688dee4e0956bc90438 (diff) |
7kaa: init at 2.15.4p1
Diffstat (limited to 'pkgs/games/7kaa')
-rw-r--r-- | pkgs/games/7kaa/default.nix | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/pkgs/games/7kaa/default.nix b/pkgs/games/7kaa/default.nix new file mode 100644 index 0000000000000..2b74306cd2533 --- /dev/null +++ b/pkgs/games/7kaa/default.nix @@ -0,0 +1,79 @@ +{ lib +, stdenv +, gccStdenv +, autoreconfHook +, pkg-config +, fetchurl +, fetchFromGitHub +, openal +, libtool +, enet +, SDL2 +, curl +, gettext +, libiconv +}: + +let + + name = "7kaa"; + versionMajor = "2.15"; + versionMinor = "4p1"; + + music = stdenv.mkDerivation rec { + pname = "${name}-music"; + version = "${versionMajor}"; + + src = fetchurl { + url = "https://www.7kfans.com/downloads/${name}-music-${versionMajor}.tar.bz2"; + sha256 = "sha256-sNdntuJXGaFPXzSpN0SoAi17wkr2YnW+5U38eIaVwcM="; + }; + + installPhase = '' + mkdir -p $out + cp -r * $out/ + ''; + + meta.license = lib.licenses.unfree; + + }; + +in + +gccStdenv.mkDerivation rec { + pname = "${name}"; + version = "v${versionMajor}.${versionMinor}"; + + src = fetchFromGitHub { + owner = "the3dfxdude"; + repo = pname; + rev = "9db2a43e1baee25a44b7aa7e9cedde9a107ed34b"; + sha256 = "sha256-OAKaRuPP0/n8pO3wIUvGKs6n+U+EmZXUTywXYDAan1o="; + }; + + nativeBuildInputs = [ autoreconfHook pkg-config ]; + buildInputs = [ openal enet SDL2 curl gettext libiconv ]; + + preAutoreconf = '' + autoupdate + ''; + + hardeningDisable = lib.optionals (stdenv.isAarch64 && stdenv.isDarwin) [ "stackprotector" ]; + + postInstall = '' + mkdir $out/share/7kaa/MUSIC + cp -R ${music}/MUSIC $out/share/7kaa/ + cp ${music}/COPYING-Music.txt $out/share/7kaa/MUSIC + cp ${music}/COPYING-Music.txt $out/share/doc/7kaa + ''; + + # Multiplayer is auto-disabled for non-x86 system + + meta = with lib; { + homepage = "https://www.7kfans.com"; + description = "GPL release of the Seven Kingdoms with multiplayer (available only on x86 platforms)"; + license = licenses.gpl2Only; + platforms = platforms.x86_64 ++ platforms.aarch64; + maintainers = with maintainers; [ _1000101 ]; + }; +} |