btrbk: add mainProgram (#356350)
[NixPkgs.git] / pkgs / by-name / nd / ndppd / package.nix
blob65b5ee1269ee3b3679c89015c5b3117984699879
1 { lib, stdenv, fetchFromGitHub, gzip, nixosTests }:
3 stdenv.mkDerivation rec {
4   pname = "ndppd";
5   version = "0.2.5";
7   src = fetchFromGitHub {
8     owner = "DanielAdolfsson";
9     repo = "ndppd";
10     rev = version;
11     sha256 = "0niri5q9qyyyw5lmjpxk19pv3v4srjvmvyd5k6ks99mvqczjx9c0";
12   };
14   nativeBuildInputs = [ gzip ];
16   makeFlags = [
17     "PREFIX=$(out)"
18   ];
20   preConfigure = ''
21     substituteInPlace Makefile --replace /bin/gzip gzip
22   '';
24   postInstall = ''
25     mkdir -p $out/etc
26     cp ndppd.conf-dist $out/etc/ndppd.conf
27   '';
29   passthru.tests = { inherit (nixosTests) ndppd; };
31   meta = with lib; {
32     description = "Daemon that proxies NDP (Neighbor Discovery Protocol) messages between interfaces";
33     homepage = "https://github.com/DanielAdolfsson/ndppd";
34     license = licenses.gpl3;
35     platforms = platforms.linux;
36     maintainers = with maintainers; [ fadenb ];
37     mainProgram = "ndppd";
38   };