git.iko.soy/typeable/nixpkgs
on master help sign in
7kaa: init at 2.15.4p1
commit7446e158d8b9f13d4770b71b066dc0383456f8f9 author1000101 <b1000101@pm.me> dateWed 2 Feb 2022, 02:40 (5 years ago) parentc7d68f5
2 files changed+81
pkgs/games/7kaa/default.nix+79 pkgs/top-level/all-packages.nix+2
pkgs/games/7kaa/default.nixnew file+79
@@ -0,0 +1,79 @@
1+{ lib
2+, stdenv
3+, gccStdenv
4+, autoreconfHook
5+, pkg-config
6+, fetchurl
7+, fetchFromGitHub
8+, openal
9+, libtool
10+, enet
11+, SDL2
12+, curl
13+, gettext
14+, libiconv
15+}:
16+
17+let
18+
19+ name = "7kaa";
20+ versionMajor = "2.15";
21+ versionMinor = "4p1";
22+
23+ music = stdenv.mkDerivation rec {
24+ pname = "${name}-music";
25+ version = "${versionMajor}";
26+
27+ src = fetchurl {
28+ url = "https://www.7kfans.com/downloads/${name}-music-${versionMajor}.tar.bz2";
29+ sha256 = "sha256-sNdntuJXGaFPXzSpN0SoAi17wkr2YnW+5U38eIaVwcM=";
30+ };
31+
32+ installPhase = ''
33+ mkdir -p $out
34+ cp -r * $out/
35+ '';
36+
37+ meta.license = lib.licenses.unfree;
38+
39+ };
40+
41+in
42+
43+gccStdenv.mkDerivation rec {
44+ pname = "${name}";
45+ version = "v${versionMajor}.${versionMinor}";
46+
47+ src = fetchFromGitHub {
48+ owner = "the3dfxdude";
49+ repo = pname;
50+ rev = "9db2a43e1baee25a44b7aa7e9cedde9a107ed34b";
51+ sha256 = "sha256-OAKaRuPP0/n8pO3wIUvGKs6n+U+EmZXUTywXYDAan1o=";
52+ };
53+
54+ nativeBuildInputs = [ autoreconfHook pkg-config ];
55+ buildInputs = [ openal enet SDL2 curl gettext libiconv ];
56+
57+ preAutoreconf = ''
58+ autoupdate
59+ '';
60+
61+ hardeningDisable = lib.optionals (stdenv.isAarch64 && stdenv.isDarwin) [ "stackprotector" ];
62+
63+ postInstall = ''
64+ mkdir $out/share/7kaa/MUSIC
65+ cp -R ${music}/MUSIC $out/share/7kaa/
66+ cp ${music}/COPYING-Music.txt $out/share/7kaa/MUSIC
67+ cp ${music}/COPYING-Music.txt $out/share/doc/7kaa
68+ '';
69+
70+ # Multiplayer is auto-disabled for non-x86 system
71+
72+ meta = with lib; {
73+ homepage = "https://www.7kfans.com";
74+ description = "GPL release of the Seven Kingdoms with multiplayer (available only on x86 platforms)";
75+ license = licenses.gpl2Only;
76+ platforms = platforms.x86_64 ++ platforms.aarch64;
77+ maintainers = with maintainers; [ _1000101 ];
78+ };
79+}
pkgs/top-level/all-packages.nix+2
@@ -31766,6 +31766,8 @@ with pkgs;
3176631766
3176731767 _0verkill = callPackage ../games/0verkill { };
3176831768
31769+ _7kaa = callPackage ../games/7kaa { };
31770+
3176931771 hhexen = callPackage ../games/hhexen { };
3177031772
3177131773 wyvern = callPackage ../games/wyvern { };