mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
soi: reimplement using mkDerivation
This commit is contained in:
parent
3e21aaeb8e
commit
f3e821c6e5
@ -1,56 +1,34 @@
|
||||
x@{builderDefsPackage
|
||||
, mesa, SDL, cmake, eigen
|
||||
, ...}:
|
||||
builderDefsPackage
|
||||
(a :
|
||||
{ stdenv, fetchurl, mesa, SDL, cmake, eigen }:
|
||||
|
||||
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";
|
||||
};
|
||||
baseName = "soi";
|
||||
fileName = "Spheres%20of%20Influence";
|
||||
majorVersion = "0.1";
|
||||
minorVersion = "1";
|
||||
version = "${majorVersion}.${minorVersion}";
|
||||
name = "${baseName}-${version}";
|
||||
project = "${baseName}";
|
||||
in
|
||||
rec {
|
||||
src = a.fetchurl {
|
||||
url = sourceInfo.url;
|
||||
sha256 = sourceInfo.hash;
|
||||
name = "${sourceInfo.name}.tar.gz";
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/project/${project}/${baseName}-${majorVersion}/${fileName}-${version}-Source.tar.gz";
|
||||
sha256 = "dfc59319d2962033709bb751c71728417888addc6c32cbec3da9679087732a81";
|
||||
};
|
||||
|
||||
inherit (sourceInfo) name version;
|
||||
inherit buildInputs;
|
||||
buildInputs = [ mesa SDL cmake eigen ];
|
||||
|
||||
phaseNames = ["setVars" "doCmake" "doMakeInstall"];
|
||||
preConfigure = ''export EIGENDIR=${eigen}/include/eigen2'';
|
||||
|
||||
setVars = a.noDepEntry ''
|
||||
export EIGENDIR=${a.eigen}/include/eigen2
|
||||
'';
|
||||
|
||||
meta = {
|
||||
meta = with stdenv.lib; {
|
||||
description = "A physics-based puzzle game";
|
||||
maintainers = with a.lib.maintainers;
|
||||
maintainers = with maintainers;
|
||||
[
|
||||
raskin
|
||||
];
|
||||
platforms = with a.lib.platforms;
|
||||
linux;
|
||||
license = a.lib.licenses.free;
|
||||
platforms = platforms.linux;
|
||||
license = licenses.free;
|
||||
broken = true;
|
||||
downloadPage = "http://sourceforge.net/projects/soi/files/";
|
||||
};
|
||||
passthru = {
|
||||
updateInfo = {
|
||||
downloadPage = "http://sourceforge.net/projects/soi/files/";
|
||||
};
|
||||
};
|
||||
}) x
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user