2022-04-27 09:35:20 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, openssl, testers, smartdns }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "smartdns";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "43";
|
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}";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-gwbyP2duUvZafMclPwP4uZh7A7OzAvSyqjl6Eg1N6Gg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ openssl ];
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"PREFIX=${placeholder "out"}"
|
|
|
|
"SYSTEMDSYSTEMUNITDIR=${placeholder "out"}/lib/systemd/system"
|
|
|
|
"RUNSTATEDIR=/run"
|
2022-04-15 01:41:22 +00:00
|
|
|
# by default it is the build time... weird... https://github.com/pymumu/smartdns/search?q=ver
|
|
|
|
"VER=${version}"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
installFlags = [ "SYSCONFDIR=${placeholder "out"}/etc" ];
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
passthru.tests = {
|
2022-04-27 09:35:20 +00:00
|
|
|
version = testers.testVersion { package = smartdns; };
|
2022-04-15 01:41:22 +00:00
|
|
|
};
|
|
|
|
|
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;
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "smartdns";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|