about summary refs log tree commit diff
path: root/pkgs/applications/emulators/dlx/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/emulators/dlx/default.nix')
-rw-r--r--pkgs/applications/emulators/dlx/default.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/pkgs/applications/emulators/dlx/default.nix b/pkgs/applications/emulators/dlx/default.nix
new file mode 100644
index 0000000000000..9573dd6d48dc3
--- /dev/null
+++ b/pkgs/applications/emulators/dlx/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchzip }:
+
+stdenv.mkDerivation rec {
+  pname = "dlx";
+  version = "2012-07-08";
+
+  src = fetchzip {
+    url = "https://www.davidviner.com/zip/dlx/dlx.zip";
+    sha256 = "0508linnar9ivy3xr99gzrb2l027ngx12dlxaxs7w67cnwqnb0dg";
+  };
+
+  makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "LINK=${stdenv.cc.targetPrefix}cc" "CFLAGS=-O2" ];
+  hardeningDisable = [ "format" ];
+
+  installPhase = ''
+    mkdir -p $out/include/dlx $out/share/dlx/{examples,doc} $out/bin
+    mv masm mon dasm $out/bin/
+    mv *.i auto.a $out/include/dlx/
+    mv *.a *.m $out/share/dlx/examples/
+    mv README.txt MANUAL.TXT $out/share/dlx/doc/
+  '';
+
+  meta = with lib; {
+    homepage = "https://www.davidviner.com/dlx.html?name=DLX+Simulator";
+    description = "An DLX simulator written in C";
+    license = licenses.gpl2Only;
+    platforms = platforms.linux;
+  };
+}