2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, openssl }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "smartdns";
|
2021-09-18 10:52:07 +00:00
|
|
|
version = "35";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pymumu";
|
|
|
|
repo = pname;
|
2020-10-07 09:15:18 +00:00
|
|
|
rev = "Release${version}";
|
2021-09-18 10:52:07 +00:00
|
|
|
sha256 = "sha256-5822qe3mdn4wPO8fHW5AsgMA7xbJnMjZn9DbiMU3GX0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ openssl ];
|
|
|
|
|
2021-09-22 15:38:15 +00:00
|
|
|
# Force the systemd service file to be regenerated from it's template. This
|
|
|
|
# file is erroneously added in version 35 and it has already been deleted from
|
|
|
|
# upstream's git repository. So this "postPatch" phase can be deleted in next
|
|
|
|
# release.
|
|
|
|
postPatch = ''
|
|
|
|
rm -f systemd/smartdns.service
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
makeFlags = [
|
|
|
|
"PREFIX=${placeholder "out"}"
|
|
|
|
"SYSTEMDSYSTEMUNITDIR=${placeholder "out"}/lib/systemd/system"
|
|
|
|
"RUNSTATEDIR=/run"
|
|
|
|
];
|
|
|
|
|
|
|
|
installFlags = [ "SYSCONFDIR=${placeholder "out"}/etc" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +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;
|
|
|
|
};
|
|
|
|
}
|