3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/servers/uhub/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
1 KiB
Nix
Raw Permalink Normal View History

2021-05-17 12:47:15 +01:00
{ lib, stdenv, fetchpatch, fetchFromGitHub, cmake, openssl, sqlite, pkg-config
, systemd, tlsSupport ? false }:
assert tlsSupport -> openssl != null;
stdenv.mkDerivation rec {
pname = "uhub";
2021-05-17 12:47:15 +01:00
version = "unstable-2019-12-13";
src = fetchFromGitHub {
owner = "janvidar";
repo = "uhub";
2021-05-17 12:47:15 +01:00
rev = "35d8088b447527f56609b85b444bd0b10cd67b5c";
hash = "sha256-CdTTf82opnpjd7I9TTY+JDEZSfdGFPE0bq/xsafwm/w=";
};
nativeBuildInputs = [ cmake pkg-config ];
2021-01-15 07:07:56 +00:00
buildInputs = [ sqlite systemd ] ++ lib.optional tlsSupport openssl;
2021-05-17 12:47:15 +01:00
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace "/usr/lib/uhub/" "$out/plugins" \
--replace "/etc/uhub" "$TMPDIR"
'';
2019-10-29 22:21:22 +00:00
cmakeFlags = [
"-DSYSTEMD_SUPPORT=ON"
2021-05-17 12:47:15 +01:00
"-DSSL_SUPPORT=${if tlsSupport then "ON" else "OFF"}"
2019-10-29 22:21:22 +00:00
];
meta = with lib; {
description = "High performance peer-to-peer hub for the ADC network";
homepage = "https://www.uhub.org/";
license = licenses.gpl3;
maintainers = [ maintainers.ehmry ];
platforms = platforms.unix;
};
}