diff --git a/pkgs/development/tools/lc3tools/0004-configure-use-cc.patch b/pkgs/development/tools/lc3tools/0004-configure-use-cc.patch new file mode 100644 index 000000000000..caaec2200008 --- /dev/null +++ b/pkgs/development/tools/lc3tools/0004-configure-use-cc.patch @@ -0,0 +1,22 @@ +diff --git a/configure b/configure +index dfc1b3e..55577af 100755 +--- a/configure ++++ b/configure +@@ -18,7 +18,7 @@ esac + # Some binaries that we'll need, and the places that we might find them. + + IFS=: +-binlist="uname:flex:gcc:wish:rm:cp:mkdir:chmod:sed" ++binlist="uname:flex:cc:wish:rm:cp:mkdir:chmod:sed" + pathlist=$PATH + libpathlist=$LIBS + incpathlist=$INCLUDES +@@ -109,7 +109,7 @@ fi + # Splice it all in to Makefile.def to create the Makefile. + + rm -f Makefile +-sed -e "s __GCC__ $gcc g" -e "s __FLEX__ $flex g" -e "s __EXE__ $EXE g" \ ++sed -e "s __GCC__ $cc g" -e "s __FLEX__ $flex g" -e "s __EXE__ $EXE g" \ + -e "s*__OS_SIM_LIBS__*$OS_SIM_LIBS*g" -e "s __RM__ $rm g" \ + -e "s __CP__ $cp g" -e "s __MKDIR__ $mkdir g" -e "s __CHMOD__ $chmod g" \ + -e "s __USE_READLINE__ $USE_READLINE g" -e "s*__RLLPATH__*$RLLPATH*g" \ diff --git a/pkgs/development/tools/lc3tools/default.nix b/pkgs/development/tools/lc3tools/default.nix index 3e7f81bb4e7b..c6120a227a99 100644 --- a/pkgs/development/tools/lc3tools/default.nix +++ b/pkgs/development/tools/lc3tools/default.nix @@ -19,6 +19,9 @@ stdenv.mkDerivation { # lc3sim-tk looks for lc3sim in $out/bin instead of $out ./0003-lc3sim-tk-path.patch + + # use `cc` instead of `gcc`; on macOS the latter is not present + ./0004-configure-use-cc.patch ]; nativeBuildInputs = [ unzip ]; @@ -40,8 +43,15 @@ stdenv.mkDerivation { ''; meta = with lib; { + longDescription = '' + The LC-3 tools package contains the lc3as assembler, the lc3sim simulator, + and lc3sim-tk, a Tcl/Tk-based GUI frontend to the simulator. + ''; description = "Toolchain and emulator for the LC-3 architecture"; + homepage = "https://highered.mheducation.com/sites/0072467509/student_view0/lc-3_simulator.html"; license = licenses.gpl2; maintainers = with maintainers; [ anna328p ]; + mainProgram = "lc3sim-tk"; + platforms = with lib.platforms; unix ++ windows; }; }