summary refs log tree commit diff
path: root/pkgs/tools/networking/smartdns/default.nix
diff options
context:
space:
mode:
authorHarry Ying <lexugeyky@outlook.com>2020-03-13 00:13:12 +0800
committerHarry Ying <lexugeyky@outlook.com>2020-03-13 00:13:12 +0800
commit25300d75be2336ad9e938bd5102ad8ba11149eb7 (patch)
tree0cbc2621510b0266bbb96c414b607538ad3db994 /pkgs/tools/networking/smartdns/default.nix
parent9bdb928d360530119860eee1be545bc79a869fb9 (diff)
downloadnixpkgs-25300d75be2336ad9e938bd5102ad8ba11149eb7.tar
nixpkgs-25300d75be2336ad9e938bd5102ad8ba11149eb7.tar.gz
nixpkgs-25300d75be2336ad9e938bd5102ad8ba11149eb7.tar.bz2
nixpkgs-25300d75be2336ad9e938bd5102ad8ba11149eb7.tar.lz
nixpkgs-25300d75be2336ad9e938bd5102ad8ba11149eb7.tar.xz
nixpkgs-25300d75be2336ad9e938bd5102ad8ba11149eb7.tar.zst
nixpkgs-25300d75be2336ad9e938bd5102ad8ba11149eb7.zip
smartdns: init at 30
Diffstat (limited to 'pkgs/tools/networking/smartdns/default.nix')
-rw-r--r--pkgs/tools/networking/smartdns/default.nix38
1 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/tools/networking/smartdns/default.nix b/pkgs/tools/networking/smartdns/default.nix
new file mode 100644
index 00000000000..62a9aaf216c
--- /dev/null
+++ b/pkgs/tools/networking/smartdns/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, fetchFromGitHub, openssl }:
+
+stdenv.mkDerivation rec {
+  pname = "smartdns";
+  version =
+    "30"; # This would be used later in the next release as the FHS commit integrated into realse 31.
+
+  src = fetchFromGitHub {
+    owner = "pymumu";
+    repo = pname;
+    rev = "3ad7cd7f454eec2fbdf338c0eb0541da301f1e73";
+    sha256 = "1y9p8gxpj2k4a10maggkxg8l55jvr7x1wyxi69waxf56ggh2dvv0";
+  };
+
+  buildInputs = [ openssl ];
+
+  makeFlags = [
+    "PREFIX=${placeholder "out"}"
+    "SYSTEMDSYSTEMUNITDIR=${placeholder "out"}/lib/systemd/system"
+    "RUNSTATEDIR=/run"
+  ];
+
+  installFlags = [ "SYSCONFDIR=${placeholder "out"}/etc" ];
+
+  meta = with stdenv.lib; {
+    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;
+  };
+}