2022-04-20 14:40:48 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, openssl, testers, smartdns }:
|
2020-03-12 16:13:12 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "smartdns";
|
2022-04-09 20:06:43 +00:00
|
|
|
version = "36.1";
|
2020-03-12 16:13:12 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pymumu";
|
|
|
|
repo = pname;
|
2020-10-02 01:01:45 +00:00
|
|
|
rev = "Release${version}";
|
2022-04-09 20:06:43 +00:00
|
|
|
sha256 = "sha256-5pAt7IjgbCCGaHeSoQvuoc6KPD9Yn5iXL1CAawgBeY0=";
|
2020-03-12 16:13:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ openssl ];
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"PREFIX=${placeholder "out"}"
|
|
|
|
"SYSTEMDSYSTEMUNITDIR=${placeholder "out"}/lib/systemd/system"
|
|
|
|
"RUNSTATEDIR=/run"
|
2022-04-03 19:46:07 +00:00
|
|
|
# by default it is the build time... weird... https://github.com/pymumu/smartdns/search?q=ver
|
|
|
|
"VER=${version}"
|
2020-03-12 16:13:12 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
installFlags = [ "SYSCONFDIR=${placeholder "out"}/etc" ];
|
|
|
|
|
2022-04-03 19:46:07 +00:00
|
|
|
passthru.tests = {
|
2022-04-20 14:40:48 +00:00
|
|
|
version = testers.testVersion { package = smartdns; };
|
2022-04-03 19:46:07 +00:00
|
|
|
};
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-03-12 16:13:12 +00:00
|
|
|
description =
|
|
|
|
"A local DNS server to obtain the fastest website IP for the best Internet experience";
|
|
|
|
longDescription = ''
|
|
|
|
SmartDNS is a local DNS server. SmartDNS accepts DNS query requests from local clients, obtains DNS query results from multiple upstream DNS servers, and returns the fastest access results to clients.
|
|
|
|
Avoiding DNS pollution and improving network access speed, supports high-performance ad filtering.
|
|
|
|
Unlike dnsmasq's all-servers, smartdns returns the fastest access resolution.
|
|
|
|
'';
|
|
|
|
homepage = "https://github.com/pymumu/smartdns";
|
|
|
|
maintainers = [ maintainers.lexuge ];
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|