Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at fix-function-merge 65 lines 1.4 kB view raw
1{ lib 2, stdenv 3, fetchFromGitHub 4, zlib 5}: 6 7stdenv.mkDerivation rec { 8 pname = "atasm"; 9 version = "1.23"; 10 11 src = fetchFromGitHub { 12 owner = "CycoPH"; 13 repo = "atasm"; 14 rev = "V${version}"; 15 hash = "sha256-U1HNYTiXO6WZEQJl2icY0ZEVy82CsL1mKR7Xgj9OZ14="; 16 }; 17 18 makefile = "Makefile"; 19 20 patches = [ 21 # make install fails because atasm.txt was moved; report to upstream 22 ./0000-file-not-found.diff 23 # select flags for compilation 24 ./0001-select-flags.diff 25 ]; 26 27 dontConfigure = true; 28 29 buildInputs = [ 30 zlib 31 ]; 32 33 preBuild = '' 34 makeFlagsArray+=( 35 -C ./src 36 CC=cc 37 USEZ="-DZLIB_CAPABLE -I${zlib}/include" 38 ZLIB="-L${zlib}/lib -lz" 39 UNIX="-DUNIX" 40 ) 41 ''; 42 43 preInstall = '' 44 mkdir -p $out/bin/ 45 install -d $out/share/doc/${pname} $out/man/man1 46 installFlagsArray+=( 47 DESTDIR=$out/bin/ 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://github.com/CycoPH/atasm"; 59 description = "Commandline 6502 assembler compatible with Mac/65"; 60 license = licenses.gpl2Plus; 61 changelog = "https://github.com/CycoPH/atasm/releases/tag/V${version}"; 62 maintainers = with maintainers; [ AndersonTorres ]; 63 platforms = with platforms; unix; 64 }; 65}