nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 53 lines 1.6 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 openssl, 6 testers, 7 smartdns, 8}: 9 10stdenv.mkDerivation rec { 11 pname = "smartdns"; 12 version = "46.1"; 13 14 src = fetchFromGitHub { 15 owner = "pymumu"; 16 repo = "smartdns"; 17 rev = "Release${version}"; 18 hash = "sha256-IvaED1V1pP0/Qk2oND3fVr7PMXSnT9jFeuikEkndX0o="; 19 }; 20 21 buildInputs = [ openssl ]; 22 23 makeFlags = [ 24 "PREFIX=${placeholder "out"}" 25 "SYSTEMDSYSTEMUNITDIR=${placeholder "out"}/lib/systemd/system" 26 "RUNSTATEDIR=/run" 27 # by default it is the build time... weird... https://github.com/pymumu/smartdns/search?q=ver 28 "VER=${version}" 29 ]; 30 31 installFlags = [ "SYSCONFDIR=${placeholder "out"}/etc" ]; 32 33 passthru.tests = { 34 version = testers.testVersion { 35 package = smartdns; 36 command = "smartdns -v"; 37 }; 38 }; 39 40 meta = with lib; { 41 description = "Local DNS server to obtain the fastest website IP for the best Internet experience"; 42 longDescription = '' 43 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. 44 Avoiding DNS pollution and improving network access speed, supports high-performance ad filtering. 45 Unlike dnsmasq's all-servers, smartdns returns the fastest access resolution. 46 ''; 47 homepage = "https://github.com/pymumu/smartdns"; 48 maintainers = [ maintainers.lexuge ]; 49 license = licenses.gpl3Plus; 50 platforms = platforms.linux; 51 mainProgram = "smartdns"; 52 }; 53}