Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 40 lines 945 B view raw
1{ 2 lib, 3 stdenv, 4 fetchzip, 5}: 6 7stdenv.mkDerivation { 8 pname = "dlx"; 9 version = "0-unstable-2012-07-08"; 10 11 src = fetchzip { 12 url = "https://www.davidviner.com/zip/dlx/dlx.zip"; 13 hash = "sha256-r4FlMbfsGH50V502EfqzRwAqVv4vpdyH3zFlZW2kCBQ="; 14 }; 15 16 preBuild = '' 17 makeFlagsArray+=( 18 CC="${stdenv.cc.targetPrefix}cc" 19 LINK="${stdenv.cc.targetPrefix}cc" 20 CFLAGS="-O2 -Wno-implicit-function-declaration" 21 ) 22 ''; 23 24 hardeningDisable = [ "format" ]; 25 26 installPhase = '' 27 mkdir -p $out/include/dlx $out/share/dlx/{examples,doc} $out/bin 28 mv masm mon dasm $out/bin/ 29 mv *.i auto.a $out/include/dlx/ 30 mv *.a *.m $out/share/dlx/examples/ 31 mv README.txt MANUAL.TXT $out/share/dlx/doc/ 32 ''; 33 34 meta = { 35 homepage = "https://www.davidviner.com/dlx.html?name=DLX+Simulator"; 36 description = "DLX simulator written in C"; 37 license = lib.licenses.gpl2Only; 38 platforms = lib.platforms.linux; 39 }; 40}