Merge pull request #330634 from r-ryantm/auto-update/circumflex
[NixPkgs.git] / pkgs / servers / uhub / default.nix
blob37bddc3759f5d57d7fbe6792bcfdadfd91e51ff3
1 { lib, stdenv, fetchFromGitHub, cmake, openssl, sqlite, pkg-config
2 , systemd, tlsSupport ? false }:
4 assert tlsSupport -> openssl != null;
6 stdenv.mkDerivation rec {
7   pname = "uhub";
8   version = "unstable-2019-12-13";
10   src = fetchFromGitHub {
11     owner = "janvidar";
12     repo = "uhub";
13     rev = "35d8088b447527f56609b85b444bd0b10cd67b5c";
14     hash = "sha256-CdTTf82opnpjd7I9TTY+JDEZSfdGFPE0bq/xsafwm/w=";
15   };
17   nativeBuildInputs = [ cmake pkg-config ];
18   buildInputs = [ sqlite systemd ] ++ lib.optional tlsSupport openssl;
20   postPatch = ''
21     substituteInPlace CMakeLists.txt \
22       --replace "/usr/lib/uhub/" "$out/plugins" \
23       --replace "/etc/uhub" "$TMPDIR"
24   '';
26   cmakeFlags = [
27     "-DSYSTEMD_SUPPORT=ON"
28     "-DSSL_SUPPORT=${if tlsSupport then "ON" else "OFF"}"
29   ];
31   meta = with lib; {
32     description = "High performance peer-to-peer hub for the ADC network";
33     homepage = "https://www.uhub.org/";
34     license = licenses.gpl3;
35     maintainers = [ maintainers.ehmry ];
36     platforms = platforms.unix;
37   };