Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchurl, 5}: 6 7stdenv.mkDerivation { 8 pname = "devmem2"; 9 version = "unstable-2004-08-05"; 10 11 src = fetchurl { 12 urls = [ 13 "http://lartmaker.nl/lartware/port/devmem2.c" 14 "https://raw.githubusercontent.com/hackndev/tools/7ed212230f8fbb1da3424a15ee88de3279bf96ec/devmem2.c" 15 ]; 16 sha256 = "14f1k7v6i1yaxg4xcaaf5i4aqn0yabba857zjnbg9wiymy82qf7c"; 17 }; 18 19 hardeningDisable = [ "format" ]; # fix compile error 20 21 buildCommand = '' 22 $CC "$src" -o devmem2 23 install -D devmem2 "$out/bin/devmem2" 24 ''; 25 26 meta = with lib; { 27 description = "Simple program to read/write from/to any location in memory"; 28 mainProgram = "devmem2"; 29 homepage = "http://lartmaker.nl/lartware/port/"; 30 license = licenses.gpl2Plus; 31 platforms = platforms.linux; 32 maintainers = with maintainers; [ bjornfor ]; 33 }; 34}