New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NetLogo: init 6.0.4 #49376
NetLogo: init 6.0.4 #49376
Conversation
a52e40e
to
218480d
Compare
8c80a3d
to
c7c4f66
Compare
5b073d4
to
e12767c
Compare
|
||
installPhase = '' | ||
mkdir -pv $out/share/netlogo | ||
cp -rv app readme.md $out/share/netlogo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this readme.md
will be useful in the derivation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest, I'm not sure whether that README has to be included because it documents which libraries are used within the application?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is some useful documentation, so maybe it can go to $out/share/doc
.
I noticed that they aren't distributing a desktop file, so usually it's best to generate one with I went ahead and wrote a patch if you would like to include it: diff --git a/pkgs/applications/science/misc/netlogo/default.nix b/pkgs/applications/science/misc/netlogo/default.nix
index 241fc6ed17c..40000f6e97e 100644
--- a/pkgs/applications/science/misc/netlogo/default.nix
+++ b/pkgs/applications/science/misc/netlogo/default.nix
@@ -1,4 +1,17 @@
-{ jre, stdenv, fetchurl, makeWrapper }:
+{ jre, stdenv, fetchurl, makeWrapper, makeDesktopItem }:
+
+let
+
+ netlogo = 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}";
@@ -9,16 +22,26 @@ stdenv.mkDerivation rec {
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
+ mkdir -pv $out/share/netlogo $out/share/icons/hicolor/256x256/apps $out/share/applications
cp -rv app readme.md $out/share/netlogo
# 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 ${netlogo}/share/applications/* $out/share/applications
+
'';
meta = with stdenv.lib; {
The addition of |
e12767c
to
be1dbab
Compare
@dpaetzel This looks good to merge, just need to test it one more time. One last nit-pick would be that |
Oh, you're right. Does that mean that the commit message should also be “netlogo: …”? |
Yep 👍 |
be1dbab
to
fa623ad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dpaetzel Sorry for the wait and the fuss. This looks good.
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)