about summary refs log tree commit diff
path: root/nixpkgs/pkgs/misc/emulators/dlx/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/misc/emulators/dlx/default.nix')
-rw-r--r--nixpkgs/pkgs/misc/emulators/dlx/default.nix34
1 files changed, 16 insertions, 18 deletions
diff --git a/nixpkgs/pkgs/misc/emulators/dlx/default.nix b/nixpkgs/pkgs/misc/emulators/dlx/default.nix
index 3360d45ccc83..9573dd6d48dc 100644
--- a/nixpkgs/pkgs/misc/emulators/dlx/default.nix
+++ b/nixpkgs/pkgs/misc/emulators/dlx/default.nix
@@ -1,31 +1,29 @@
-{ lib, stdenv, fetchurl, unzip }:
+{ lib, stdenv, fetchzip }:
 
-stdenv.mkDerivation {
-  name = "dlx-2012.07.08";
+stdenv.mkDerivation rec {
+  pname = "dlx";
+  version = "2012-07-08";
 
-  src = fetchurl {
+  src = fetchzip {
     url = "https://www.davidviner.com/zip/dlx/dlx.zip";
-    sha256 = "0q5hildq2xcig7yrqi26n7fqlanyssjirm7swy2a9icfxpppfpkn";
+    sha256 = "0508linnar9ivy3xr99gzrb2l027ngx12dlxaxs7w67cnwqnb0dg";
   };
 
-  buildInputs = [ unzip ];
-
-  makeFlags = [ "LINK=gcc" "CFLAGS=-O2" ];
-
+  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 -v masm mon dasm $out/bin/
-    mv -v *.i auto.a $out/include/dlx/
-    mv -v *.a *.m $out/share/dlx/examples/
-    mv -v README.txt MANUAL.TXT $out/share/dlx/doc/
+    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 = {
-    homepage = "http://www.davidviner.com/dlx.php";
-    description = "DLX Simulator";
-    license = lib.licenses.gpl2;
-    platforms = lib.platforms.linux;
+  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;
   };
 }