nixpkgs/pkgs/games/empty-epsilon/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

98 lines
3.1 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, cmake, sfml, libX11, glew, python3, fetchpatch, applyPatches, glm}:
2018-04-26 23:22:35 +00:00
let
major = "2021";
minor = "06";
patch.seriousproton = "23";
patch.emptyepsilon = "23";
version.seriousproton = "${major}.${minor}.${patch.seriousproton}";
version.emptyepsilon = "${major}.${minor}.${patch.emptyepsilon}";
2018-04-26 23:22:35 +00:00
2019-08-13 21:52:01 +00:00
serious-proton = stdenv.mkDerivation {
pname = "serious-proton";
version = version.seriousproton;
2018-04-26 23:22:35 +00:00
src = applyPatches {
src = fetchFromGitHub {
owner = "daid";
repo = "SeriousProton";
rev = "EE-${version.seriousproton}";
sha256 = "sha256-02cHHWKoe99257qLgxtMjeXnhi0UYajh4v87B57felM=";
};
patches = [
# Various CMake fixes for `json11`. Can be removed on the next release.
(fetchpatch {
url = "https://github.com/daid/SeriousProton/commit/adbba45fd9ae5e020e43e5d7f9326f1355391209.patch";
sha256 = "sha256-gMTpIGPGCREmZ/ZxvEc7RVsVUxWXbu2BPUCE3A62sCI=";
})
# Simplified variant of
# * https://github.com/daid/SeriousProton/commit/0d1ac45b738195db5e2785531db713328f547e60
# * https://github.com/daid/SeriousProton/commit/32509f2db91a58b9528aeb1bb505e9426b52b825
#
# To fix configure errors when building EmptyEpsilon, can be removed on the next release.
./0001-bundle-system-glm-in-seriousproton.patch
];
2018-04-26 23:22:35 +00:00
};
nativeBuildInputs = [ cmake ];
buildInputs = [ sfml libX11 glm ];
2018-04-26 23:22:35 +00:00
meta = with lib; {
description = "C++ game engine coded on top of SFML used for EmptyEpsilon";
homepage = "https://github.com/daid/SeriousProton";
2018-04-26 23:22:35 +00:00
license = licenses.mit;
maintainers = with maintainers; [ fpletz ];
platforms = platforms.linux;
};
};
in
2019-08-13 21:52:01 +00:00
stdenv.mkDerivation {
pname = "empty-epsilon";
version = version.emptyepsilon;
2018-04-26 23:22:35 +00:00
src = fetchFromGitHub {
owner = "daid";
repo = "EmptyEpsilon";
rev = "EE-${version.emptyepsilon}";
sha256 = "sha256-dc/Ic1/DULTQO6y9xSop2HxFvUh4kN57oSF/HBmbmF4=";
2018-04-26 23:22:35 +00:00
};
patches = [
# Various CMake fixes that can be removed when upgrading to the next release.
(fetchpatch {
url = "https://github.com/daid/EmptyEpsilon/commit/ee0cd42bfe5fd20b8339e8e02eb7f69766168d57.patch";
sha256 = "sha256-8dXtl/izfzqbwHtjuugjH34vYP+d4AobqZhxL2GXTzw=";
})
(fetchpatch {
url = "https://github.com/daid/EmptyEpsilon/commit/69d93e6acdae3259755924f9d35e7e5ae949d377.patch";
sha256 = "sha256-30AGo4mi73GrW9GNS3vF3mTOS7J5/41LvjOzNjeFhOg=";
})
];
2018-04-26 23:22:35 +00:00
nativeBuildInputs = [ cmake ];
buildInputs = [ serious-proton sfml glew libX11 python3 glm ];
2018-04-26 23:22:35 +00:00
cmakeFlags = [
"-DSERIOUS_PROTON_DIR=${serious-proton.src}"
"-DCPACK_PACKAGE_VERSION=${version.emptyepsilon}"
"-DCPACK_PACKAGE_VERSION_MAJOR=${major}"
"-DCPACK_PACKAGE_VERSION_MINOR=${minor}"
"-DCPACK_PACKAGE_VERSION_PATCH=${patch.emptyepsilon}"
2018-04-26 23:22:35 +00:00
];
meta = with lib; {
description = "Open source bridge simulator based on Artemis";
homepage = "https://daid.github.io/EmptyEpsilon/";
2018-04-26 23:22:35 +00:00
license = licenses.gpl2Plus;
2020-03-12 20:05:43 +00:00
maintainers = with maintainers; [ fpletz lheckemann ma27 ];
2018-04-26 23:22:35 +00:00
platforms = platforms.linux;
};
}