nixpkgs/pkgs/by-name/nq/nqptp/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

46 lines
1.1 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, autoreconfHook
, pkg-config
, gitUpdater
}:
stdenv.mkDerivation rec {
version = "1.2.4";
pname = "nqptp";
src = fetchFromGitHub {
owner = "mikebrady";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-roTNcr3v2kzE6vQ5plAVtlw1+2yJplltOYsGGibtoZo=";
};
patches = [
# these patches should be removed when > 1.2.4
./remove-setcap.patch
./systemd-service-capability.patch
];
nativeBuildInputs = [ autoreconfHook pkg-config ];
passthru.updateScript = gitUpdater {
ignoredVersions = ".*(-dev|d0)";
};
postInstall = ''
mkdir -p $out/lib/systemd/system
cp nqptp.service $out/lib/systemd/system
'';
meta = {
homepage = "https://github.com/mikebrady/nqptp";
description = "Daemon and companion application to Shairport Sync that monitors timing data from any PTP clocks";
license = lib.licenses.gpl2Only;
mainProgram = "nqptp";
maintainers = with lib.maintainers; [ jordanisaacs adamcstephens ];
platforms = lib.platforms.linux ++ lib.platforms.freebsd;
};
}