2
0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-02-16 09:03:42 +00:00
nixpkgs/pkgs/by-name/_7/_7kaa/package.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

90 lines
1.8 KiB
Nix

{
lib,
stdenv,
gccStdenv,
autoreconfHook,
autoconf-archive,
pkg-config,
fetchurl,
fetchFromGitHub,
openal,
enet,
SDL2,
curl,
gettext,
libiconv,
}:
let
version = "2.15.6";
musicVersion = lib.versions.majorMinor version;
music = stdenv.mkDerivation {
pname = "7kaa-music";
version = musicVersion;
src = fetchurl {
url = "https://www.7kfans.com/downloads/7kaa-music-${musicVersion}.tar.bz2";
hash = "sha256-sNdntuJXGaFPXzSpN0SoAi17wkr2YnW+5U38eIaVwcM=";
};
installPhase = ''
mkdir -p $out
cp -r * $out/
'';
meta.license = lib.licenses.unfree;
};
in
gccStdenv.mkDerivation (finalAttrs: {
pname = "7kaa";
inherit version;
src = fetchFromGitHub {
owner = "the3dfxdude";
repo = "7kaa";
rev = "v${finalAttrs.version}";
hash = "sha256-kkM+kFQ+tGHS5NrVPeDMRWFQb7waESt8xOLfFGaGdgo=";
};
nativeBuildInputs = [
autoreconfHook
autoconf-archive
pkg-config
];
buildInputs = [
openal
enet
SDL2
curl
gettext
libiconv
];
preAutoreconf = ''
autoupdate
'';
hardeningDisable = lib.optionals (stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.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 ];
};
})