Merge pull request #131337 from angustrau/mars-mips

This commit is contained in:
Sandro 2021-08-11 17:35:58 +02:00 committed by GitHub
commit bba03493bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,49 @@
{ lib, stdenvNoCC, fetchurl, makeWrapper, copyDesktopItems, makeDesktopItem, unzip, imagemagick, jre }:
stdenvNoCC.mkDerivation rec {
pname = "mars-mips";
version = "4.5";
src = fetchurl {
url = "https://courses.missouristate.edu/KenVollmar/MARS/MARS_${lib.replaceStrings ["."] ["_"] version}_Aug2014/Mars${lib.replaceStrings ["."] ["_"] version}.jar";
sha256 = "15kh1fahkkbbf4wvb6ijzny4fi5dh4pycxyzp5325dm2ddkhnd5c";
};
dontUnpack = true;
nativeBuildInputs = [ makeWrapper copyDesktopItems unzip imagemagick ];
desktopItems = [
(makeDesktopItem {
name = pname;
desktopName = "MARS";
exec = "mars-mips";
icon = "mars-mips";
comment = "An IDE for programming in MIPS assembly language";
categories = "Development;IDE;";
})
];
installPhase = ''
runHook preInstall
export JAR=$out/share/java/${pname}/${pname}.jar
install -D $src $JAR
makeWrapper ${jre}/bin/java $out/bin/${pname} \
--add-flags "-jar $JAR"
unzip ${src} images/MarsThumbnail.gif
mkdir -p $out/share/pixmaps
convert images/MarsThumbnail.gif $out/share/pixmaps/mars-mips.png
runHook postInstall
'';
meta = with lib; {
description = "An IDE for programming in MIPS assembly language intended for educational-level use";
homepage = "https://courses.missouristate.edu/KenVollmar/MARS/";
license = licenses.mit;
maintainers = with maintainers; [ angustrau ];
platforms = platforms.all;
};
}

View File

@ -7033,6 +7033,8 @@ with pkgs;
marktext = callPackage ../applications/misc/marktext { };
mars-mips = callPackage ../development/tools/mars-mips { };
mawk = callPackage ../tools/text/mawk { };
mb2md = callPackage ../tools/text/mb2md { };