netlogo: 6.1.1 -> 6.4.0

emaryn 7cfb6636 496fcd4a

+39 -36
+39 -36
pkgs/by-name/ne/netlogo/package.nix
··· 1 { 2 - jre, 3 lib, 4 stdenv, 5 fetchurl, 6 - makeWrapper, 7 makeDesktopItem, 8 }: 9 10 let 11 - 12 - desktopItem = makeDesktopItem rec { 13 - name = "netlogo"; 14 - exec = name; 15 - icon = name; 16 - comment = "A multi-agent programmable modeling environment"; 17 - desktopName = "NetLogo"; 18 - categories = [ "Science" ]; 19 }; 20 - 21 in 22 - 23 - stdenv.mkDerivation rec { 24 pname = "netlogo"; 25 - version = "6.1.1"; 26 27 src = fetchurl { 28 - url = "https://ccl.northwestern.edu/netlogo/${version}/NetLogo-${version}-64.tgz"; 29 - sha256 = "1j08df68pgggxqkmpzd369w4h97q0pivmmljdb48hjghx7hacblp"; 30 }; 31 32 - src1 = fetchurl { 33 - name = "netlogo.png"; 34 - url = "https://netlogoweb.org/assets/images/desktopicon.png"; 35 - sha256 = "1i43lhr31lzva8d2r0dxpcgr58x496gb5vmb0h2da137ayvifar8"; 36 - }; 37 38 - nativeBuildInputs = [ makeWrapper ]; 39 40 installPhase = '' 41 - mkdir -pv $out/share/netlogo $out/share/icons/hicolor/256x256/apps $out/share/applications $out/share/doc 42 - cp -rv app $out/share/netlogo 43 - cp -v readme.md $out/share/doc/ 44 45 # launcher with `cd` is required b/c otherwise the model library isn't usable 46 - makeWrapper "${jre}/bin/java" "$out/bin/netlogo" \ 47 - --chdir "$out/share/netlogo/app" \ 48 - --add-flags "-jar netlogo-${version}.jar" 49 50 - cp $src1 $out/share/icons/hicolor/256x256/apps/netlogo.png 51 - cp ${desktopItem}/share/applications/* $out/share/applications 52 ''; 53 54 - meta = with lib; { 55 description = "Multi-agent programmable modeling environment"; 56 mainProgram = "netlogo"; 57 longDescription = '' ··· 59 many tens of thousands of students, teachers and researchers worldwide. 60 ''; 61 homepage = "https://ccl.northwestern.edu/netlogo/index.shtml"; 62 - sourceProvenance = with sourceTypes; [ binaryBytecode ]; 63 - license = licenses.gpl2; 64 - maintainers = [ maintainers.dpaetzel ]; 65 - platforms = platforms.linux; 66 }; 67 - }
··· 1 { 2 lib, 3 stdenv, 4 fetchurl, 5 + jre, 6 + makeBinaryWrapper, 7 + copyDesktopItems, 8 makeDesktopItem, 9 }: 10 11 let 12 + desktopicon = fetchurl { 13 + name = "netlogo.png"; 14 + url = "https://netlogoweb.org/assets/images/desktopicon.png"; 15 + hash = "sha256-KCsXt1dnBNUEBKvusp5JpKOSH7u9gSwaUvvTMDKkg8Q="; 16 }; 17 in 18 + stdenv.mkDerivation (finalAttrs: { 19 pname = "netlogo"; 20 + version = "6.4.0"; 21 22 src = fetchurl { 23 + url = "https://ccl.northwestern.edu/netlogo/${finalAttrs.version}/NetLogo-${finalAttrs.version}-64.tgz"; 24 + hash = "sha256-hkciO0KC4L4+YtycRSB/gkELpj3SiSsIrylAy6pq0d4="; 25 }; 26 27 + nativeBuildInputs = [ 28 + makeBinaryWrapper 29 + copyDesktopItems 30 + ]; 31 32 + desktopItems = [ 33 + (makeDesktopItem { 34 + name = "netlogo"; 35 + exec = "netlogo"; 36 + icon = "netlogo"; 37 + comment = "A multi-agent programmable modeling environment"; 38 + desktopName = "NetLogo"; 39 + categories = [ "Science" ]; 40 + }) 41 + ]; 42 43 installPhase = '' 44 + runHook preInstall 45 46 + mkdir -p $out/opt 47 + cp -r lib/app $out/opt/netlogo 48 # launcher with `cd` is required b/c otherwise the model library isn't usable 49 + makeWrapper ${jre}/bin/java $out/bin/netlogo \ 50 + --chdir $out/opt/netlogo \ 51 + --add-flags "-jar netlogo-${finalAttrs.version}.jar" 52 + install -Dm644 ${desktopicon} $out/share/pixmaps/netlogo.png 53 54 + runHook postInstall 55 ''; 56 57 + meta = { 58 description = "Multi-agent programmable modeling environment"; 59 mainProgram = "netlogo"; 60 longDescription = '' ··· 62 many tens of thousands of students, teachers and researchers worldwide. 63 ''; 64 homepage = "https://ccl.northwestern.edu/netlogo/index.shtml"; 65 + sourceProvenance = with lib.sourceTypes; [ binaryBytecode ]; 66 + license = lib.licenses.gpl2; 67 + maintainers = [ lib.maintainers.dpaetzel ]; 68 + platforms = lib.platforms.linux; 69 }; 70 + })