diff options
author | worldofpeace <worldofpeace@users.noreply.github.com> | 2018-11-21 21:37:01 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-21 21:37:01 -0500 |
commit | 2e70b40f5873d0b30b47947319600309b55f0737 (patch) | |
tree | 0a10ca5bd3d986c4685261ba151a9057ff0c5ab3 /pkgs/applications/science | |
parent | 823cd6e8ffc5c7247488e996a5993954ea3d94a7 (diff) | |
parent | fa623ad828eeecb27de6d3671872ab99daac3b52 (diff) | |
download | nixlib-2e70b40f5873d0b30b47947319600309b55f0737.tar nixlib-2e70b40f5873d0b30b47947319600309b55f0737.tar.gz nixlib-2e70b40f5873d0b30b47947319600309b55f0737.tar.bz2 nixlib-2e70b40f5873d0b30b47947319600309b55f0737.tar.lz nixlib-2e70b40f5873d0b30b47947319600309b55f0737.tar.xz nixlib-2e70b40f5873d0b30b47947319600309b55f0737.tar.zst nixlib-2e70b40f5873d0b30b47947319600309b55f0737.zip |
Merge pull request #49376 from dpaetzel/package-netlogo
NetLogo: init 6.0.4
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r-- | pkgs/applications/science/misc/netlogo/default.nix | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/pkgs/applications/science/misc/netlogo/default.nix b/pkgs/applications/science/misc/netlogo/default.nix new file mode 100644 index 000000000000..76f958cc3a81 --- /dev/null +++ b/pkgs/applications/science/misc/netlogo/default.nix @@ -0,0 +1,58 @@ +{ jre, stdenv, fetchurl, makeWrapper, makeDesktopItem }: + +let + + desktopItem = makeDesktopItem rec { + name = "netlogo"; + exec = name; + icon = name; + comment = "A multi-agent programmable modeling environment"; + desktopName = "NetLogo"; + categories = "Science;"; + }; + +in + +stdenv.mkDerivation rec { + name = "netlogo-${version}"; + version = "6.0.4"; + + src = fetchurl { + url = "https://ccl.northwestern.edu/netlogo/${version}/NetLogo-${version}-64.tgz"; + sha256 = "0dcd9df4dfb218826a74f9df42163fa588908a1dfe58864106936f8dfb76acec"; + }; + + src1 = fetchurl { + name = "netlogo.png"; + url = "https://netlogoweb.org/assets/images/desktopicon.png"; + sha256 = "1i43lhr31lzva8d2r0dxpcgr58x496gb5vmb0h2da137ayvifar8"; + }; + + nativeBuildInputs = [ makeWrapper ]; + + installPhase = '' + mkdir -pv $out/share/netlogo $out/share/icons/hicolor/256x256/apps $out/share/applications $out/share/doc + cp -rv app $out/share/netlogo + cp -v readme.md $out/share/doc/ + + # launcher with `cd` is required b/c otherwise the model library isn't usable + makeWrapper "${jre}/bin/java" "$out/bin/netlogo" \ + --run "cd $out/share/netlogo/app" \ + --add-flags "-jar netlogo-${version}.jar" + + cp $src1 $out/share/icons/hicolor/256x256/apps/netlogo.png + cp ${desktopItem}/share/applications/* $out/share/applications + ''; + + meta = with stdenv.lib; { + description = "A multi-agent programmable modeling environment"; + longDescription = '' + NetLogo is a multi-agent programmable modeling environment. It is used by + many tens of thousands of students, teachers and researchers worldwide. + ''; + homepage = https://ccl.northwestern.edu/netlogo/index.shtml; + license = licenses.gpl2; + maintainers = [ maintainers.dpaetzel ]; + platforms = platforms.linux; + }; +} |