Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 84067b7ef1f3
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cb4b210894b4
Choose a head ref
  • 2 commits
  • 3 files changed
  • 2 contributors

Commits on Mar 29, 2019

  1. assaultcube: unstable-2017-05-01 -> unstable-2018-05-20

    Bignaux Ronan committed Mar 29, 2019

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    NeQuissimus Tim Steinbach
    Copy the full SHA
    0a38c27 View commit details
  2. Merge pull request #58533 from bignaux/assaultcube

    assaultcube: unstable-2017-05-01 -> unstable-2018-05-20
    ryantm authored Mar 29, 2019

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    NeQuissimus Tim Steinbach
    Copy the full SHA
    cb4b210 View commit details
Showing with 20 additions and 60 deletions.
  1. +0 −11 pkgs/games/assaultcube/assaultcube-next.patch
  2. +20 −29 pkgs/games/assaultcube/default.nix
  3. +0 −20 pkgs/games/assaultcube/launcher.sh
11 changes: 0 additions & 11 deletions pkgs/games/assaultcube/assaultcube-next.patch

This file was deleted.

49 changes: 20 additions & 29 deletions pkgs/games/assaultcube/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ fetchFromGitHub, stdenv, makeDesktopItem, openal, pkgconfig, libogg,
libvorbis, SDL, SDL_image, makeWrapper, zlib,
libvorbis, SDL, SDL_image, makeWrapper, zlib, file,
client ? true, server ? true }:

with stdenv.lib;
@@ -8,38 +8,21 @@ stdenv.mkDerivation rec {

# master branch has legacy (1.2.0.2) protocol 1201 and gcc 6 fix.
pname = "assaultcube";
version = "unstable-2017-05-01";

meta = {
description = "Fast and fun first-person-shooter based on the Cube fps";
homepage = https://assault.cubers.net;
maintainers = [ maintainers.genesis ];
platforms = platforms.linux; # should work on darwin with a little effort.
license = stdenv.lib.licenses.zlib;
};
version = "unstable-2018-05-20";

src = fetchFromGitHub {
owner = "assaultcube";
repo = "AC";
rev = "9f537b0876a39d7686e773040469fbb1417de18b";
sha256 = "0nvckn67mmfaa7x3j41xyxjllxqzfx1dxg8pnqsaak3kkzds34pl";
rev = "f58ea22b46b5013a520520670434b3c235212371";
sha256 = "1vfn3d55vmmipdykrcfvgk6dddi9y95vlclsliirm7jdp20f15hd";
};

# ${branch} not accepted as a value ?
# TODO: write a functional BUNDLED_ENET option and restore it in deps.
patches = [ ./assaultcube-next.patch ];

nativeBuildInputs = [ pkgconfig ];

# add optional for server only ?
buildInputs = [ makeWrapper openal SDL SDL_image libogg libvorbis zlib ];
nativeBuildInputs = [ makeWrapper pkgconfig ];

#makeFlags = [ "CXX=g++" ];
buildInputs = [ file zlib ] ++ optionals client [ openal SDL SDL_image libogg libvorbis ];

targets = (optionalString server "server") + (optionalString client " client");
buildPhase = ''
make -C source/src ${targets}
'';
makeFlags = [ "-C source/src" "CXX=c++" "${targets}" ];

desktop = makeDesktopItem {
name = "AssaultCube";
@@ -61,21 +44,29 @@ stdenv.mkDerivation rec {
cp -r config packages $out/$gamedatadir
# install custom script
substituteAll ${./launcher.sh} $bindir/assaultcube
chmod +x $bindir/assaultcube
if (test -e source/src/ac_client) then
cp source/src/ac_client $bindir
mkdir -p $out/share/applications
cp ${desktop}/share/applications/* $out/share/applications
install -Dpm644 packages/misc/icon.png $out/share/icons/assaultcube.png
install -Dpm644 packages/misc/icon.png $out/share/pixmaps/assaultcube.png
makeWrapper $out/bin/ac_client $out/bin/${pname} \
--run "cd $out/$gamedatadir" --add-flags "--home=\$HOME/.assaultcube/v1.2next --init"
fi
if (test -e source/src/ac_server) then
cp source/src/ac_server $bindir
ln -s $bindir/${pname} $bindir/${pname}-server
makeWrapper $out/bin/ac_server $out/bin/${pname}-server \
--run "cd $out/$gamedatadir" --add-flags "-Cconfig/servercmdline.txt"
fi
'';

meta = {
description = "Fast and fun first-person-shooter based on the Cube fps";
homepage = https://assault.cubers.net;
maintainers = [ maintainers.genesis ];
platforms = platforms.linux; # should work on darwin with a little effort.
license = stdenv.lib.licenses.zlib;
};
}
20 changes: 0 additions & 20 deletions pkgs/games/assaultcube/launcher.sh

This file was deleted.