mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-14 09:43:14 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
48 lines
1.5 KiB
Nix
48 lines
1.5 KiB
Nix
{ lib, stdenv, fetchFromGitHub, openssl, testers, smartdns }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "smartdns";
|
|
version = "46";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "pymumu";
|
|
repo = pname;
|
|
rev = "Release${version}";
|
|
hash = "sha256-7JNP8vacYENBbbCxBtSpVu9j5vCBVBsQ/OeVPoRxlE4=";
|
|
};
|
|
|
|
buildInputs = [ openssl ];
|
|
|
|
makeFlags = [
|
|
"PREFIX=${placeholder "out"}"
|
|
"SYSTEMDSYSTEMUNITDIR=${placeholder "out"}/lib/systemd/system"
|
|
"RUNSTATEDIR=/run"
|
|
# by default it is the build time... weird... https://github.com/pymumu/smartdns/search?q=ver
|
|
"VER=${version}"
|
|
];
|
|
|
|
installFlags = [ "SYSCONFDIR=${placeholder "out"}/etc" ];
|
|
|
|
passthru.tests = {
|
|
version = testers.testVersion {
|
|
package = smartdns;
|
|
command = "smartdns -v";
|
|
};
|
|
};
|
|
|
|
meta = with 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;
|
|
mainProgram = "smartdns";
|
|
};
|
|
}
|