Merge pull request #70372 from doronbehar/package-gaia
gaia: init at 2.4.5
This commit is contained in:
commit
5dfbfc06d3
85
pkgs/development/libraries/gaia/default.nix
Normal file
85
pkgs/development/libraries/gaia/default.nix
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
{ stdenv
|
||||||
|
, lib
|
||||||
|
, fetchFromGitHub
|
||||||
|
, libyaml
|
||||||
|
, swig
|
||||||
|
, pkgconfig
|
||||||
|
, wafHook
|
||||||
|
, makeWrapper
|
||||||
|
, qt4
|
||||||
|
, pythonPackages
|
||||||
|
, pythonSupport ? false
|
||||||
|
# Default to false since it breaks the build, see https://github.com/MTG/gaia/issues/11
|
||||||
|
, stlfacadeSupport ? false
|
||||||
|
, assertsSupport ? true
|
||||||
|
, cyclopsSupport ? true
|
||||||
|
}:
|
||||||
|
|
||||||
|
assert pythonSupport -> pythonPackages != null;
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "gaia";
|
||||||
|
version = "2.4.5";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "MTG";
|
||||||
|
repo = "gaia";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "12jxb354s2dblr2ghnl3w05m23jgzvrrgywfj8jaa32j3gw48fv2";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Fix installation error when waf tries to put files in /etc/
|
||||||
|
prePatch = ''
|
||||||
|
'' + lib.optionalString cyclopsSupport ''
|
||||||
|
substituteInPlace src/wscript \
|
||||||
|
--replace "/etc/cyclops" "$out/etc/cyclops" \
|
||||||
|
--replace "/etc/init.d" "$out/etc/init.d"
|
||||||
|
'';
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
wafHook
|
||||||
|
pkgconfig
|
||||||
|
swig
|
||||||
|
]
|
||||||
|
# The gaiafusion binary inside $out/bin needs a shebangs patch, and
|
||||||
|
# wrapping with the appropriate $PYTHONPATH
|
||||||
|
++ lib.optionals (pythonSupport) [
|
||||||
|
pythonPackages.wrapPython
|
||||||
|
]
|
||||||
|
;
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
libyaml
|
||||||
|
qt4
|
||||||
|
];
|
||||||
|
|
||||||
|
propagatedBuildInputs = []
|
||||||
|
++ lib.optionals (pythonSupport) [
|
||||||
|
# This is not exactly specified in upstream's README but it's needed by the
|
||||||
|
# resulting $out/bin/gaiafusion script
|
||||||
|
pythonPackages.pyyaml
|
||||||
|
]
|
||||||
|
;
|
||||||
|
|
||||||
|
wafConfigureFlags = []
|
||||||
|
++ lib.optionals (pythonSupport) [ "--with-python-bindings" ]
|
||||||
|
++ lib.optionals (stlfacadeSupport) [ "--with-stlfacade" ]
|
||||||
|
++ lib.optionals (assertsSupport) [ "--with-asserts" ]
|
||||||
|
++ lib.optionals (cyclopsSupport) [ "--with-cyclops" ]
|
||||||
|
;
|
||||||
|
|
||||||
|
postFixup = ''
|
||||||
|
''
|
||||||
|
+ lib.optionalString pythonSupport ''
|
||||||
|
wrapPythonPrograms
|
||||||
|
''
|
||||||
|
;
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
homepage = "https://github.com/MTG/gaia";
|
||||||
|
description = "General library to work with points in a semimetric space";
|
||||||
|
maintainers = with maintainers; [ doronbehar ];
|
||||||
|
platforms = platforms.all;
|
||||||
|
license = licenses.agpl3;
|
||||||
|
};
|
||||||
|
}
|
@ -857,6 +857,8 @@ in
|
|||||||
|
|
||||||
genymotion = callPackage ../development/mobile/genymotion { };
|
genymotion = callPackage ../development/mobile/genymotion { };
|
||||||
|
|
||||||
|
gaia = callPackage ../development/libraries/gaia { };
|
||||||
|
|
||||||
gamecube-tools = callPackage ../development/tools/gamecube-tools { };
|
gamecube-tools = callPackage ../development/tools/gamecube-tools { };
|
||||||
|
|
||||||
gams = callPackage ../tools/misc/gams (config.gams or {});
|
gams = callPackage ../tools/misc/gams (config.gams or {});
|
||||||
|
@ -2422,6 +2422,12 @@ in {
|
|||||||
|
|
||||||
fx2 = callPackage ../development/python-modules/fx2 { };
|
fx2 = callPackage ../development/python-modules/fx2 { };
|
||||||
|
|
||||||
|
# gaia isn't supported with python3 and it's not available from pypi
|
||||||
|
gaia = disabledIf (isPyPy || isPy3k) (toPythonModule (pkgs.gaia.override {
|
||||||
|
pythonPackages = self;
|
||||||
|
pythonSupport = true;
|
||||||
|
}));
|
||||||
|
|
||||||
gateone = callPackage ../development/python-modules/gateone { };
|
gateone = callPackage ../development/python-modules/gateone { };
|
||||||
|
|
||||||
GeoIP = callPackage ../development/python-modules/GeoIP { };
|
GeoIP = callPackage ../development/python-modules/GeoIP { };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user