Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, stdenv 3, fetchurl 4, unzip 5, zlib 6}: 7 8stdenv.mkDerivation rec { 9 pname = "atasm"; 10 version = "1.09"; 11 12 src = fetchurl { 13 url = "https://atari.miribilist.com/${pname}/${pname}${builtins.replaceStrings ["."] [""] version}.zip"; 14 hash = "sha256-26shhw2r30GZIPz6S1rf6dOLKRpgpLwrqCRZX3+8PvA="; 15 }; 16 17 patches = [ 18 # make install fails because atasm.txt was moved; report to upstream 19 ./0000-file-not-found.diff 20 # select flags for compilation 21 ./0001-select-flags.diff 22 ]; 23 24 dontConfigure = true; 25 26 nativeBuildInputs = [ 27 unzip 28 ]; 29 30 buildInputs = [ 31 zlib 32 ]; 33 34 preBuild = '' 35 makeFlagsArray+=( 36 -C ./src 37 CC=cc 38 USEZ="-DZLIB_CAPABLE -I${zlib}/include" 39 ZLIB="-L${zlib}/lib -lz" 40 UNIX="-DUNIX" 41 ) 42 ''; 43 44 preInstall = '' 45 install -d $out/share/doc/${pname} $out/man/man1 46 installFlagsArray+=( 47 DESTDIR=$out 48 DOCDIR=$out/share/doc/${pname} 49 MANDIR=$out/man/man1 50 ) 51 ''; 52 53 postInstall = '' 54 mv docs/* $out/share/doc/${pname} 55 ''; 56 57 meta = with lib; { 58 homepage = "https://atari.miribilist.com/atasm/"; 59 description = "A commandline 6502 assembler compatible with Mac/65"; 60 license = licenses.gpl2Plus; 61 maintainers = with maintainers; [ AndersonTorres ]; 62 platforms = with platforms; unix; 63 }; 64}