dnsname-cni: init at 1.1.1
(cherry picked from commit 5826e9020636c8ba3bc311294ce78b6466fd2b24)
This commit is contained in:
parent
73f566b2ad
commit
d33aa3d0d3
32
pkgs/applications/networking/cluster/dnsname-cni/default.nix
Normal file
32
pkgs/applications/networking/cluster/dnsname-cni/default.nix
Normal file
@ -0,0 +1,32 @@
|
||||
{ buildGoModule, fetchFromGitHub, lib, dnsmasq }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "cni-plugin-dnsname";
|
||||
version = "1.1.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "containers";
|
||||
repo = "dnsname";
|
||||
rev = "v${version}";
|
||||
sha256 = "090kpq2ppan9ayajdk5vwbvww30nphylgajn2p3441d4jg2nvsm3";
|
||||
};
|
||||
|
||||
patches = [ ./hardcode-dnsmasq-path.patch ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace plugins/meta/dnsname/service.go --replace '@DNSMASQ@' '${dnsmasq}/bin/dnsmasq'
|
||||
'';
|
||||
|
||||
vendorSha256 = null;
|
||||
subPackages = [ "plugins/meta/dnsname" ];
|
||||
|
||||
doCheck = false; # NOTE: requires root privileges
|
||||
|
||||
meta = with lib; {
|
||||
description = "DNS name resolution for containers";
|
||||
homepage = "https://github.com/containers/dnsname";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ mikroskeem ];
|
||||
};
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
diff --git a/plugins/meta/dnsname/service.go b/plugins/meta/dnsname/service.go
|
||||
index fc05f75..f6b4caf 100644
|
||||
--- a/plugins/meta/dnsname/service.go
|
||||
+++ b/plugins/meta/dnsname/service.go
|
||||
@@ -16,10 +16,14 @@ import (
|
||||
|
||||
// newDNSMasqFile creates a new instance of a dnsNameFile
|
||||
func newDNSMasqFile(domainName, networkInterface, networkName string) (dnsNameFile, error) {
|
||||
+ /*
|
||||
dnsMasqBinary, err := exec.LookPath("dnsmasq")
|
||||
if err != nil {
|
||||
return dnsNameFile{}, errors.Errorf("the dnsmasq cni plugin requires the dnsmasq binary be in PATH")
|
||||
}
|
||||
+ */
|
||||
+ _ = errors.Errorf // XXX(mikroskeem): reduce diff
|
||||
+ dnsMasqBinary := "@DNSMASQ@"
|
||||
masqConf := dnsNameFile{
|
||||
ConfigFile: makePath(networkName, confFileName),
|
||||
Domain: domainName,
|
@ -22851,6 +22851,8 @@ in
|
||||
cni = callPackage ../applications/networking/cluster/cni {};
|
||||
cni-plugins = callPackage ../applications/networking/cluster/cni/plugins.nix {};
|
||||
|
||||
dnsname-cni = callPackage ../applications/networking/cluster/dnsname-cni {};
|
||||
|
||||
cntr = callPackage ../applications/virtualization/cntr { };
|
||||
|
||||
communi = libsForQt5.callPackage ../applications/networking/irc/communi { };
|
||||
|
Loading…
x
Reference in New Issue
Block a user