diff --git a/pkgs/development/libraries/eigen/default.nix b/pkgs/development/libraries/eigen/default.nix new file mode 100644 index 000000000000..bd705fac9835 --- /dev/null +++ b/pkgs/development/libraries/eigen/default.nix @@ -0,0 +1,49 @@ +x@{builderDefsPackage + , cmake + , ...}: +builderDefsPackage +(a : +let + helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ + []; + + buildInputs = map (n: builtins.getAttr n x) + (builtins.attrNames (builtins.removeAttrs x helperArgNames)); + sourceInfo = rec { + baseName="eigen"; + version="2.0.15"; + name="${baseName}-${version}"; + ext="tar.bz2"; + project="${baseName}"; + url="http://bitbucket.org/${project}/${baseName}/get/${version}.${ext}"; + hash="c68509b80ec2570d025a98e6c4279062b801593c5165ba3d683852e7dbff1569"; + }; +in +rec { + src = a.fetchurl { + url = sourceInfo.url; + sha256 = sourceInfo.hash; + name="${sourceInfo.name}.${sourceInfo.ext}"; + }; + + inherit (sourceInfo) name version; + inherit buildInputs; + + phaseNames = ["doCmake" "doMakeInstall"]; + + meta = { + description = "A C++ linear algebra template header"; + maintainers = with a.lib.maintainers; + [ + raskin + ]; + platforms = with a.lib.platforms; + linux; + license = a.lib.licenses.lgpl3Plus; + }; + passthru = { + updateInfo = { + downloadPage = "http://eigen.tuxfamily.org/index.php?title=Main_Page"; + }; + }; +}) x diff --git a/pkgs/games/soi/default.nix b/pkgs/games/soi/default.nix new file mode 100644 index 000000000000..811d8d432ceb --- /dev/null +++ b/pkgs/games/soi/default.nix @@ -0,0 +1,55 @@ +x@{builderDefsPackage + , mesa, SDL, cmake, eigen + , ...}: +builderDefsPackage +(a : +let + helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ + []; + + buildInputs = map (n: builtins.getAttr n x) + (builtins.attrNames (builtins.removeAttrs x helperArgNames)); + sourceInfo = rec { + baseName="soi"; + fileName="Spheres%20of%20Influence"; + majorVersion="0.1"; + minorVersion="1"; + version="${majorVersion}.${minorVersion}"; + name="${baseName}-${version}"; + project="${baseName}"; + url="mirror://sourceforge/project/${project}/${baseName}-${majorVersion}/${fileName}-${version}-Source.tar.gz"; + hash="dfc59319d2962033709bb751c71728417888addc6c32cbec3da9679087732a81"; + }; +in +rec { + src = a.fetchurl { + url = sourceInfo.url; + sha256 = sourceInfo.hash; + name = "${sourceInfo.name}.tar.gz"; + }; + + inherit (sourceInfo) name version; + inherit buildInputs; + + phaseNames = ["setVars" "doCmake" "doMakeInstall"]; + + setVars = a.noDepEntry '' + export EIGENDIR=${a.eigen}/include/eigen2 + ''; + + meta = { + description = "A physics-based puzzle game"; + maintainers = with a.lib.maintainers; + [ + raskin + ]; + platforms = with a.lib.platforms; + linux; + license = "free-noncopyleft"; + }; + passthru = { + updateInfo = { + downloadPage = "http://sourceforge.net/projects/soi/files/"; + }; + }; +}) x diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 67fda049989f..45946c9dd1b0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2907,6 +2907,8 @@ let stdenv = overrideGCC stdenv gcc45; }; + eigen = callPackage ../development/libraries/eigen {}; + enchant = callPackage ../development/libraries/enchant { inherit (gnome) glib; }; @@ -7009,6 +7011,8 @@ let inherit (kde3) arts kdelibs; }; + soi = callPackage ../games/soi {}; + # You still can override by passing more arguments. spaceOrbit = callPackage ../games/orbit { inherit (gnome) esound; };