diff options
author | Anderson Torres <torres.anderson.85@protonmail.com> | 2020-11-15 10:04:04 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-15 10:04:04 -0300 |
commit | b6deb94192cd95990a0f6ce2c4ad1253c5a5cf7f (patch) | |
tree | 780f3788dcfc07f8291b5bdb71e01a60f00c09d3 /pkgs/misc/emulators | |
parent | f4c29b86188014a463c0b9fed5c961ceaf58b048 (diff) | |
parent | c7463be402da29b10396e8fb6b62823b625aa838 (diff) |
Merge pull request #103839 from AndersonTorres/wip-simh
simh: init at 3.11-1
Diffstat (limited to 'pkgs/misc/emulators')
-rw-r--r-- | pkgs/misc/emulators/simh/default.nix | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/pkgs/misc/emulators/simh/default.nix b/pkgs/misc/emulators/simh/default.nix new file mode 100644 index 000000000000..50e02a8f2403 --- /dev/null +++ b/pkgs/misc/emulators/simh/default.nix @@ -0,0 +1,62 @@ +{ stdenv +, fetchFromGitHub +, SDL2 +, SDL2_ttf +, libpcap +, vde2 +, pcre +}: + +stdenv.mkDerivation rec { + pname = "simh"; + version = "3.11-1"; + + src = fetchFromGitHub { + owner = "simh"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-65+YfOWpVXPeT64TZcSaWJY+ODQ0q/pwF9jb8xGdpIs="; + }; + + buildInputs = [ SDL2 SDL2_ttf libpcap vde2 pcre ]; + + dontConfigure = true; + + makeFlags = [ "GCC=cc" "CC_STD=-std=c99" "LDFLAGS=-lm" ]; + + preInstall = '' + install -d ${placeholder "out"}/bin + install -d ${placeholder "out"}/share/simh + ''; + + installPhase = '' + runHook preInstall + for i in BIN/*; do + install -D $i ${placeholder "out"}/bin + done + for i in VAX/*bin; do + install -D $i ${placeholder "out"}/share/simh + done + runHook postInstall + ''; + + postInstall = '' + (cd $out/bin; for i in *; do ln -s $i simh-$i; done) + ''; + + meta = with stdenv.lib; { + homepage = "http://simh.trailing-edge.com/"; + description = "A collection of simulators of historic hardware"; + longDescription = '' + SimH (History Simulator) is a collection of simulators for historically + significant or just plain interesting computer hardware and software from + the past. The goal of the project is to create highly portable system + simulators and to publish them as freeware on the Internet, with freely + available copies of significant or representative software. + ''; + license = with licenses; mit; + maintainers = with maintainers; [ AndersonTorres ]; + platforms = with platforms; unix; + }; +} +# TODO: install documentation |