From 06ffd2b2b73ed61a5526cae7de77abc9e01e20af Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Mon, 24 Jun 2019 13:48:05 +0200 Subject: [PATCH] linuxptp: init at 2.0 --- pkgs/os-specific/linux/linuxptp/default.nix | 33 +++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 35 insertions(+) create mode 100644 pkgs/os-specific/linux/linuxptp/default.nix diff --git a/pkgs/os-specific/linux/linuxptp/default.nix b/pkgs/os-specific/linux/linuxptp/default.nix new file mode 100644 index 00000000000..84a0f4a10d5 --- /dev/null +++ b/pkgs/os-specific/linux/linuxptp/default.nix @@ -0,0 +1,33 @@ +{ stdenv, fetchurl, linuxHeaders } : + + +stdenv.mkDerivation rec { + pname = "linuxptp"; + version = "2.0"; + + src = fetchurl { + url = "mirror://sourceforge/linuxptp/${pname}-${version}.tgz"; + sha256 = "0zcw8nllla06451r7bfsa31q4z8jj56j67i07l1azm473r0dj90a"; + }; + + postPatch = '' + substituteInPlace incdefs.sh --replace \ + '/usr/include/linux/' "${linuxHeaders}/include/linux/" + ''; + + makeFlags = [ "prefix=" ]; + + preInstall = '' + export DESTDIR=$out + ''; + + enableParallelBuilding = true; + + meta = with stdenv.lib; { + description = "Implementation of the Precision Time Protocol (PTP) according to IEEE standard 1588 for Linux"; + homepage = "http://linuxptp.sourceforge.net/"; + maintainers = [ maintainers.markuskowa ]; + license = licenses.gpl2; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4b89c63b949..1f0c4986508 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1671,6 +1671,8 @@ in link-grammar = callPackage ../tools/text/link-grammar { }; + linuxptp = callPackage ../os-specific/linux/linuxptp { }; + loadwatch = callPackage ../tools/system/loadwatch { }; loccount = callPackage ../development/tools/misc/loccount { };