depot/third_party/nixpkgs/pkgs/os-specific/linux/linuxptp/default.nix
Default email 23b612e36f Project import generated by Copybara.
GitOrigin-RevId: ae5c332cbb5827f6b1f02572496b141021de335f
2024-01-25 23:12:00 +09:00

36 lines
873 B
Nix

{ lib, stdenv, fetchurl, linuxHeaders } :
stdenv.mkDerivation rec {
pname = "linuxptp";
version = "4.2";
src = fetchurl {
url = "mirror://sourceforge/linuxptp/${pname}-${version}.tgz";
hash = "sha256-cOOOXSdk4CF0Q9pvFOiEb+QBpHIpOsE42EGcB6ZlRHo=";
};
postPatch = ''
substituteInPlace incdefs.sh --replace \
'/usr/include/linux/' "${linuxHeaders}/include/linux/"
'';
makeFlags = [
"prefix="
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
];
preInstall = ''
export DESTDIR=$out
'';
enableParallelBuilding = true;
meta = with lib; {
description = "Implementation of the Precision Time Protocol (PTP) according to IEEE standard 1588 for Linux";
homepage = "https://linuxptp.sourceforge.net/";
maintainers = [ maintainers.markuskowa ];
license = licenses.gpl2Only;
platforms = platforms.linux;
};
}