Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchFromGitHub, zlib }: 2let 3 libs-src = fetchFromGitHub { 4 owner = "megatokio"; 5 repo = "Libraries"; 6 # 2021-02-02 7 rev = "c5cb3ed512c677db6f33e2d3539dfbb6e547030b"; 8 sha256 = "sha256-GiplhZf640uScVdKL6E/fegOgtC9SE1xgBqcX86XADk="; 9 }; 10in 11stdenv.mkDerivation rec { 12 pname = "zasm"; 13 version = "4.4.7"; 14 15 src = fetchFromGitHub { 16 owner = "megatokio"; 17 repo = "zasm"; 18 rev = version; 19 sha256 = "sha256-Zbno8kmzss1H2FjwzHB4U7UXxa6oDfsPV80MVVFfM68="; 20 postFetch = '' 21 # remove folder containing files with weird names (causes the hash to turn out differently under macOS vs. Linux) 22 rm -rv $out/Test 23 ''; 24 }; 25 26 buildInputs = [ zlib ]; 27 28 configurePhase = '' 29 ln -sf ${libs-src} Libraries 30 ''; 31 32 makeFlags = [ 33 "CC=${stdenv.cc.targetPrefix}cc" 34 "CXX=${stdenv.cc.targetPrefix}c++" 35 "LINK=${stdenv.cc.targetPrefix}c++" 36 "STRIP=${stdenv.cc.targetPrefix}strip" 37 ]; 38 39 installPhase = '' 40 install -Dm755 -t $out/bin zasm 41 ''; 42 43 meta = with lib; { 44 description = "Z80 / 8080 / Z180 assembler (for unix-style OS)"; 45 homepage = "https://k1.spdns.de/Develop/Projects/zasm/Distributions/"; 46 license = licenses.bsd2; 47 maintainers = [ maintainers.turbomack ]; 48 platforms = platforms.unix; 49 badPlatforms = platforms.aarch64; 50 }; 51}