about summary refs log tree commit diff
path: root/nixpkgs/pkgs/misc/emulators/dlx/default.nix
blob: ad111a6151422740e677a44f75530508c98c4fd4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ stdenv, fetchurl, unzip }:

stdenv.mkDerivation {
  name = "dlx-2012.07.08";

  src = fetchurl {
    url = "https://www.davidviner.com/zip/dlx/dlx.zip";
    sha256 = "0q5hildq2xcig7yrqi26n7fqlanyssjirm7swy2a9icfxpppfpkn";
  };

  buildInputs = [ unzip ];

  makeFlags = [ "LINK=gcc" "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/
  '';

  meta = {
    homepage = http://www.davidviner.com/dlx.php;
    description = "DLX Simulator";
    license = stdenv.lib.licenses.gpl2;
    platforms = stdenv.lib.platforms.linux;
  };
}