Adding golly (a cellular automata program)
svn path=/nixpkgs/trunk/; revision=22391
This commit is contained in:
@@ -0,0 +1,48 @@
|
|||||||
|
x@{builderDefsPackage,
|
||||||
|
wxGTK, perl, python, zlib
|
||||||
|
, ...}:
|
||||||
|
builderDefsPackage
|
||||||
|
(a :
|
||||||
|
let
|
||||||
|
s = import ./src-for-default.nix;
|
||||||
|
helperArgNames = ["builderDefsPackage"] ++
|
||||||
|
[];
|
||||||
|
buildInputs = map (n: builtins.getAttr n x)
|
||||||
|
(builtins.attrNames (builtins.removeAttrs x helperArgNames));
|
||||||
|
in
|
||||||
|
rec {
|
||||||
|
src = a.fetchUrlFromSrcInfo s;
|
||||||
|
|
||||||
|
inherit (s) name;
|
||||||
|
inherit buildInputs;
|
||||||
|
|
||||||
|
/* doConfigure should be removed if not needed */
|
||||||
|
phaseNames = ["setVars" "doMake" "doDeploy"];
|
||||||
|
setVars = a.noDepEntry ''
|
||||||
|
export NIX_LDFLAGS="$NIX_LDFLAGS -lperl -L$(echo "${perl}"/lib/perl5/5*/*/CORE)"
|
||||||
|
pythonLib="$(echo "${python}"/lib/libpython*.so)"
|
||||||
|
pythonLib="''${pythonLib##*/lib}"
|
||||||
|
pythonLib="''${pythonLib%%.so}"
|
||||||
|
export NIX_LDFLAGS="$NIX_LDFLAGS -l$pythonLib"
|
||||||
|
echo "Flags: $NIX_LDFLAGS"
|
||||||
|
'';
|
||||||
|
goSrcDir = ''cd */'';
|
||||||
|
makeFlags = [
|
||||||
|
"-f makefile-gtk"
|
||||||
|
];
|
||||||
|
doDeploy = a.fullDepEntry ''
|
||||||
|
cat < ${./make-install.make} >> makefile-gtk
|
||||||
|
make -f makefile-gtk out="$out" install
|
||||||
|
'' ["minInit" "doMake" "defEnsureDir"];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Cellular automata simulation program";
|
||||||
|
maintainers = with a.lib.maintainers;
|
||||||
|
[
|
||||||
|
raskin
|
||||||
|
];
|
||||||
|
platforms = with a.lib.platforms;
|
||||||
|
linux;
|
||||||
|
};
|
||||||
|
}) x
|
||||||
|
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
install_file = echo "\#! /bin/sh" > "$(out)/bin/$(binfile)"; echo "$(out)/share/golly/$(binfile)" >> "$(out)/bin/$(binfile)"; chmod a+x "$(out)/bin/$(binfile)";
|
||||||
|
|
||||||
|
install:
|
||||||
|
mkdir -p "$(out)/share/golly"
|
||||||
|
mkdir -p "$(out)/bin"
|
||||||
|
cp -r $(BINFILES) $(SHAREDFILES) "$(out)/share/golly"
|
||||||
|
$(foreach binfile,$(BINFILES),$(install_file))
|
||||||
|
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
rec {
|
||||||
|
version="2.1-src";
|
||||||
|
name="golly-2.1-src";
|
||||||
|
hash="0m9sz0b7pwsxpgvscdvab2q8qnncr337gg3anzgzw83z5zyn3rdz";
|
||||||
|
url="http://downloads.sourceforge.net/project/golly/golly/golly-2.1/golly-2.1-src.tar.gz";
|
||||||
|
advertisedUrl="http://downloads.sourceforge.net/project/golly/golly/golly-2.1/golly-2.1-src.tar.gz";
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
downloadPage = "http://sourceforge.net/projects/golly/files/";
|
||||||
|
method="fetchSF";
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
x@{builderDefsPackage
|
||||||
|
(abort "Specify dependencies")
|
||||||
|
, ...}:
|
||||||
|
builderDefsPackage
|
||||||
|
(a :
|
||||||
|
let
|
||||||
|
s = import ./src-for-default.nix;
|
||||||
|
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
|
||||||
|
[(abort "Specify helper argument names")];
|
||||||
|
buildInputs = map (n: builtins.getAttr n x)
|
||||||
|
(builtins.attrNames (builtins.removeAttrs x helperArgNames));
|
||||||
|
in
|
||||||
|
rec {
|
||||||
|
src = a.fetchUrlFromSrcInfo s;
|
||||||
|
|
||||||
|
inherit (s) name;
|
||||||
|
inherit buildInputs;
|
||||||
|
|
||||||
|
/* doConfigure should be removed if not needed */
|
||||||
|
phaseNames = ["doConfigure" "doMakeInstall"];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "${abort ''Specify description''}";
|
||||||
|
maintainers = with a.lib.maintainers;
|
||||||
|
[
|
||||||
|
(abort "Specify maintainers")
|
||||||
|
];
|
||||||
|
platforms = with a.lib.platforms;
|
||||||
|
(abort "Specify platforms");
|
||||||
|
};
|
||||||
|
}) x
|
||||||
|
|
||||||
@@ -9583,6 +9583,11 @@ let
|
|||||||
|
|
||||||
### SCIENCE / MISC
|
### SCIENCE / MISC
|
||||||
|
|
||||||
|
golly = import ../applications/science/misc/golly {
|
||||||
|
inherit builderDefsPackage wxGTK perl zlib
|
||||||
|
python;
|
||||||
|
};
|
||||||
|
|
||||||
simgrid = import ../applications/science/misc/simgrid {
|
simgrid = import ../applications/science/misc/simgrid {
|
||||||
inherit fetchurl cmake ruby;
|
inherit fetchurl cmake ruby;
|
||||||
stdenv = stdenv2;
|
stdenv = stdenv2;
|
||||||
|
|||||||
Reference in New Issue
Block a user