Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchurl, unzip }: 2 3stdenv.mkDerivation rec { 4 pname = "rasm"; 5 version = "0.117"; 6 7 src = fetchurl { 8 url = "http://www.roudoudou.com/export/cpc/rasm/${pname}_v0117_src.zip"; 9 sha256 = "1hwily4cfays59qm7qd1ax48i7cpbxhs5l9mfpyn7m2lxsfqrl3z"; 10 }; 11 12 sourceRoot = "."; 13 14 nativeBuildInputs = [ unzip ]; 15 16 buildPhase = '' 17 # according to official documentation 18 ${stdenv.cc.targetPrefix}cc rasm_v*.c -O2 -lm -o rasm 19 ''; 20 21 installPhase = '' 22 install -Dt $out/bin rasm 23 ''; 24 25 meta = with lib; { 26 homepage = "http://www.roudoudou.com/rasm/"; 27 description = "Z80 assembler"; 28 # use -n option to display all licenses 29 license = licenses.mit; # expat version 30 maintainers = [ ]; 31 platforms = platforms.all; 32 }; 33}