Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchurl, linuxHeaders } : 2 3 4stdenv.mkDerivation rec { 5 pname = "linuxptp"; 6 version = "3.1.1"; 7 8 src = fetchurl { 9 url = "mirror://sourceforge/linuxptp/${pname}-${version}.tgz"; 10 sha256 = "1nf0w4xyzg884v8blb81zkk6q8p6zbiq9lx61jdqwbbzkdgqbmll"; 11 }; 12 13 postPatch = '' 14 substituteInPlace incdefs.sh --replace \ 15 '/usr/include/linux/' "${linuxHeaders}/include/linux/" 16 ''; 17 18 makeFlags = [ "prefix=" ]; 19 20 preInstall = '' 21 export DESTDIR=$out 22 ''; 23 24 enableParallelBuilding = true; 25 26 meta = with lib; { 27 description = "Implementation of the Precision Time Protocol (PTP) according to IEEE standard 1588 for Linux"; 28 homepage = "https://linuxptp.sourceforge.net/"; 29 maintainers = [ maintainers.markuskowa ]; 30 license = licenses.gpl2Only; 31 platforms = platforms.linux; 32 }; 33}