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: cd83cecdc8ac
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a2075a2c314c
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Jun 25, 2019

  1. freeciv_qt: init at 2.6.0

    peterhoeg committed Jun 25, 2019

    Verified

    This commit was signed with the committer’s verified signature.
    jtojnar Jan Tojnar
    Copy the full SHA
    31c33e3 View commit details
  2. Merge pull request #63760 from peterhoeg/f/freeciv

    freeciv_qt: init at 2.6.0
    peterhoeg authored Jun 25, 2019

    Verified

    This commit was signed with the committer’s verified signature.
    jtojnar Jan Tojnar
    Copy the full SHA
    a2075a2 View commit details
Showing with 35 additions and 17 deletions.
  1. +30 −17 pkgs/games/freeciv/default.nix
  2. +5 −0 pkgs/top-level/all-packages.nix
47 changes: 30 additions & 17 deletions pkgs/games/freeciv/default.nix
Original file line number Diff line number Diff line change
@@ -1,38 +1,51 @@
{ stdenv, fetchurl, zlib, bzip2, pkgconfig, curl, lzma, gettext, libiconv
{ stdenv, fetchFromGitHub, autoreconfHook, lua5_3, pkgconfig, python
, zlib, bzip2, curl, lzma, gettext, libiconv
, sdlClient ? true, SDL, SDL_mixer, SDL_image, SDL_ttf, SDL_gfx, freetype, fluidsynth
, gtkClient ? false, gtk2
, gtkClient ? false, gtk3
, qtClient ? false, qt5
, server ? true, readline
, enableSqlite ? true, sqlite
}:

let
inherit (stdenv.lib) optional optionals;

name = "freeciv";
in stdenv.mkDerivation rec {
pname = "freeciv";
version = "2.6.0";
in
stdenv.mkDerivation {
name = "${name}-${version}";
inherit version;

src = fetchurl {
url = "mirror://sourceforge/freeciv/${name}-${version}.tar.bz2";
sha256 = "16f9wsnn7073s6chzbm3819swd0iw019p9nrzr3diiynk28kj83w";

src = fetchFromGitHub {
owner = "freeciv";
repo = "freeciv";
rev = "R${builtins.replaceStrings [ "." ] [ "_" ] version}";
sha256 = "1b3q5k9wpv7z24svz01ybw8d8wlzkkdr6ia5hgp6cxk6vq67n67s";
};

nativeBuildInputs = [ pkgconfig ];
postPatch = ''
for f in {common,utility}/*.py; do
substituteInPlace $f \
--replace '/usr/bin/env python' ${python.interpreter}
done
'';

nativeBuildInputs = [ autoreconfHook pkgconfig ];

buildInputs = [ zlib bzip2 curl lzma gettext libiconv ]
buildInputs = [ lua5_3 zlib bzip2 curl lzma gettext libiconv ]
++ optionals sdlClient [ SDL SDL_mixer SDL_image SDL_ttf SDL_gfx freetype fluidsynth ]
++ optionals gtkClient [ gtk2 ]
++ optionals gtkClient [ gtk3 ]
++ optionals qtClient [ qt5.qtbase ]
++ optional server readline
++ optional enableSqlite sqlite;

configureFlags = [ "--enable-shared" ]
++ optional sdlClient "--enable-client=sdl"
++ optionals qtClient [
"--enable-client=qt"
"--with-qt5-includes=${qt5.qtbase.dev}/include"
]
++ optional enableSqlite "--enable-fcdb=sqlite3"
++ optional (!gtkClient) "--enable-fcmp=cli"
++ optional (!server) "--disable-server";
++ optional (!server) "--disable-server";

enableParallelBuilding = true;

@@ -46,11 +59,11 @@ stdenv.mkDerivation {
to the space age...
'';

homepage = http://freeciv.wikia.com/;
homepage = http://www.freeciv.org; # http only
license = licenses.gpl2;

maintainers = with maintainers; [ pierron ];
platforms = platforms.unix;
hydraPlatforms = stdenv.lib.platforms.linux; # sdl-config times out on darwin
hydraPlatforms = platforms.linux; # sdl-config times out on darwin
};
}
5 changes: 5 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
@@ -21545,6 +21545,11 @@ in
sdlClient = false;
};

freeciv_qt = freeciv.override {
qtClient = true;
sdlClient = false;
};

freedink = callPackage ../games/freedink { };

freeorion = callPackage ../games/freeorion { };