mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 15:33:13 +00:00
mosdns: init at 5.3.1
This commit is contained in:
parent
a34b46771f
commit
0cdbfe30b5
53
pkgs/by-name/mo/mosdns/package.nix
Normal file
53
pkgs/by-name/mo/mosdns/package.nix
Normal file
@ -0,0 +1,53 @@
|
||||
{
|
||||
lib,
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
testers,
|
||||
mosdns,
|
||||
stdenv,
|
||||
installShellFiles,
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "mosdns";
|
||||
version = "5.3.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "IrineSistiana";
|
||||
repo = "mosdns";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-QujkDx899GAImEtQE28ru7H0Zym5SYXJbJEfSBkJYjo=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-0J5hXb1W8UruNG0KFaJBOQwHl2XiWg794A6Ktgv+ObM=";
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
"-X main.version=${version}"
|
||||
];
|
||||
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd mosdns \
|
||||
--bash <($out/bin/mosdns completion bash) \
|
||||
--fish <($out/bin/mosdns completion fish) \
|
||||
--zsh <($out/bin/mosdns completion zsh)
|
||||
'';
|
||||
|
||||
passthru.tests = {
|
||||
version = testers.testVersion {
|
||||
package = mosdns;
|
||||
command = "${lib.getExe mosdns} version";
|
||||
};
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Modular, pluggable DNS forwarder";
|
||||
homepage = "https://github.com/IrineSistiana/mosdns";
|
||||
license = lib.licenses.gpl3Only;
|
||||
maintainers = with lib.maintainers; [ moraxyc ];
|
||||
mainProgram = "mosdns";
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user