mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-14 05:37:40 +03:00
Adding golly (a cellular automata program)
svn path=/nixpkgs/trunk/; revision=22391
This commit is contained in:
parent
44216c2ef8
commit
558251da4a
48
pkgs/applications/science/misc/golly/default.nix
Normal file
48
pkgs/applications/science/misc/golly/default.nix
Normal file
@ -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
|
||||
|
9
pkgs/applications/science/misc/golly/make-install.make
Normal file
9
pkgs/applications/science/misc/golly/make-install.make
Normal file
@ -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))
|
||||
|
9
pkgs/applications/science/misc/golly/src-for-default.nix
Normal file
9
pkgs/applications/science/misc/golly/src-for-default.nix
Normal 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";
|
||||
}
|
32
pkgs/build-support/builder-defs/template-auto-callable.nix
Normal file
32
pkgs/build-support/builder-defs/template-auto-callable.nix
Normal file
@ -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
|
||||
|
||||
golly = import ../applications/science/misc/golly {
|
||||
inherit builderDefsPackage wxGTK perl zlib
|
||||
python;
|
||||
};
|
||||
|
||||
simgrid = import ../applications/science/misc/simgrid {
|
||||
inherit fetchurl cmake ruby;
|
||||
stdenv = stdenv2;
|
||||
|
Loading…
Reference in New Issue
Block a user