uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
84
pkgs/tools/networking/openvpn/default.nix
Normal file
84
pkgs/tools/networking/openvpn/default.nix
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, pkg-config
|
||||
, iproute2
|
||||
, lzo
|
||||
, openssl
|
||||
, pam
|
||||
, useSystemd ? stdenv.isLinux
|
||||
, systemd
|
||||
, update-systemd-resolved
|
||||
, util-linux
|
||||
, pkcs11Support ? false
|
||||
, pkcs11helper
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (lib) versionOlder optional optionals optionalString;
|
||||
|
||||
generic = { version, sha256 }:
|
||||
let
|
||||
withIpRoute = stdenv.isLinux && (versionOlder version "2.5.4");
|
||||
in
|
||||
stdenv.mkDerivation
|
||||
rec {
|
||||
pname = "openvpn";
|
||||
inherit version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://swupdate.openvpn.net/community/releases/${pname}-${version}.tar.gz";
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [ lzo openssl ]
|
||||
++ optional stdenv.isLinux pam
|
||||
++ optional withIpRoute iproute2
|
||||
++ optional useSystemd systemd
|
||||
++ optional pkcs11Support pkcs11helper;
|
||||
|
||||
configureFlags = optionals withIpRoute [
|
||||
"--enable-iproute2"
|
||||
"IPROUTE=${iproute2}/sbin/ip"
|
||||
]
|
||||
++ optional useSystemd "--enable-systemd"
|
||||
++ optional pkcs11Support "--enable-pkcs11"
|
||||
++ optional stdenv.isDarwin "--disable-plugin-auth-pam";
|
||||
|
||||
# We used to vendor the update-systemd-resolved script inside libexec,
|
||||
# but a separate package was made, that uses libexec/openvpn. Copy it
|
||||
# into libexec in case any consumers expect it to be there even though
|
||||
# they should use the update-systemd-resolved package instead.
|
||||
postInstall = ''
|
||||
mkdir -p $out/share/doc/openvpn/examples
|
||||
cp -r sample/sample-{config-files,keys,scripts}/ $out/share/doc/openvpn/examples
|
||||
'' + optionalString useSystemd ''
|
||||
install -Dm555 -t $out/libexec ${update-systemd-resolved}/libexec/openvpn/*
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "A robust and highly flexible tunneling application";
|
||||
downloadPage = "https://openvpn.net/community-downloads/";
|
||||
homepage = "https://openvpn.net/";
|
||||
license = licenses.gpl2Only;
|
||||
maintainers = with maintainers; [ viric peterhoeg ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
openvpn_24 = generic {
|
||||
version = "2.4.12";
|
||||
sha256 = "1vjx82nlkxrgzfiwvmmlnz8ids5m2fiqz7scy1smh3j9jnf2v5b6";
|
||||
};
|
||||
|
||||
openvpn = generic {
|
||||
version = "2.5.6";
|
||||
sha256 = "0gdd88rcan9vfiwkzsqn6fxxdim7kb1bsxrcra59c5xksprpwfik";
|
||||
};
|
||||
}
|
||||
61
pkgs/tools/networking/openvpn/openvpn-auth-ldap.nix
Normal file
61
pkgs/tools/networking/openvpn/openvpn-auth-ldap.nix
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, autoreconfHook
|
||||
, gnustep
|
||||
, re2c
|
||||
, openldap
|
||||
, openssl
|
||||
, openvpn
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "openvpn-auth-ldap";
|
||||
version = "2.0.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "threerings";
|
||||
repo = "openvpn-auth-ldap";
|
||||
rev = "auth-ldap-${version}";
|
||||
sha256 = "1j30sygj8nm8wjqxzpb7pfzr3dxqxggswzxd7z5yk7y04c0yp1hb";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
gnustep.base
|
||||
gnustep.libobjc
|
||||
gnustep.make
|
||||
re2c
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
openldap
|
||||
openssl
|
||||
openvpn
|
||||
];
|
||||
|
||||
configureFlags = [
|
||||
"--with-objc-runtime=GNU"
|
||||
"--with-openvpn=${openvpn}/include"
|
||||
"--libdir=$(out)/lib/openvpn"
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
preInstall = ''
|
||||
mkdir -p $out/lib/openvpn $out/share/doc/openvpn/examples
|
||||
cp README.md $out/share/doc/openvpn/
|
||||
cp auth-ldap.conf $out/share/doc/openvpn/examples/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "LDAP authentication plugin for OpenVPN";
|
||||
homepage = "https://github.com/threerings/openvpn-auth-ldap";
|
||||
license = [
|
||||
licenses.asl20
|
||||
licenses.bsd3
|
||||
];
|
||||
maintainers = [ maintainers.benley ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
29
pkgs/tools/networking/openvpn/openvpn_learnaddress.nix
Normal file
29
pkgs/tools/networking/openvpn/openvpn_learnaddress.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ lib, stdenv, fetchgit, makeWrapper, coreutils, gawk, util-linux }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "openvpn-learnaddress";
|
||||
version = "unstable-2013-10-21";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://gist.github.com/4058733.git";
|
||||
rev = "19b03c3beb0190df46ea07bf4b68244acb8eae80";
|
||||
sha256 = "16pcyvyhwsx34i0cjkkx906lmrwdd9gvznvqdwlad4ha8l8f8z42";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildInputs = [ coreutils gawk util-linux ];
|
||||
|
||||
installPhase = ''
|
||||
install -Dm555 ovpn-learnaddress $out/libexec/openvpn/openvpn-learnaddress
|
||||
|
||||
wrapProgram $out/libexec/openvpn/openvpn-learnaddress \
|
||||
--prefix PATH : ${lib.makeBinPath [ coreutils gawk util-linux ]}
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Openvpn learn-address script to manage a hosts-like file";
|
||||
homepage = "https://gist.github.com/offlinehacker/4058733/";
|
||||
maintainers = [ lib.maintainers.offline ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
36
pkgs/tools/networking/openvpn/update-resolv-conf.nix
Normal file
36
pkgs/tools/networking/openvpn/update-resolv-conf.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ stdenv, lib, fetchFromGitHub, makeWrapper, openresolv, coreutils, systemd }:
|
||||
|
||||
let
|
||||
binPath = lib.makeBinPath [ coreutils openresolv systemd ];
|
||||
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "update-resolv-conf";
|
||||
version = "unstable-2017-06-21";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "masterkorp";
|
||||
repo = "openvpn-update-resolv-conf";
|
||||
rev = "43093c2f970bf84cd374e18ec05ac6d9cae444b8";
|
||||
sha256 = "1lf66bsgv2w6nzg1iqf25zpjf4ckcr45adkpgdq9gvhkfnvlp8av";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
installPhase = ''
|
||||
install -Dm555 update-resolv-conf.sh $out/libexec/openvpn/update-resolv-conf
|
||||
install -Dm555 update-systemd-network.sh $out/libexec/openvpn/update-systemd-network
|
||||
|
||||
for i in $out/libexec/openvpn/*; do
|
||||
wrapProgram $i --prefix PATH : ${binPath}
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Script to update your /etc/resolv.conf with DNS settings that come from the received push dhcp-options";
|
||||
homepage = "https://github.com/masterkorp/openvpn-update-resolv-conf/";
|
||||
maintainers = with maintainers; [ abbradar ];
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
42
pkgs/tools/networking/openvpn/update-systemd-resolved.nix
Normal file
42
pkgs/tools/networking/openvpn/update-systemd-resolved.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, iproute2
|
||||
, runtimeShell
|
||||
, systemd
|
||||
, coreutils
|
||||
, util-linux
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "update-systemd-resolved";
|
||||
# when updating this, check if additional binaries need injecting into PATH
|
||||
version = "1.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jonathanio";
|
||||
repo = "update-systemd-resolved";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-lYJTR3oBmpENcqNHa9PFXsw7ly6agwjBWf4UXf1d8Kc=";
|
||||
};
|
||||
|
||||
# set SCRIPT_NAME in case we are wrapped and inject PATH
|
||||
patches = [
|
||||
./update-systemd-resolved.patch
|
||||
];
|
||||
|
||||
PREFIX = "${placeholder "out"}/libexec/openvpn";
|
||||
|
||||
postInstall = ''
|
||||
substituteInPlace ${PREFIX}/update-systemd-resolved \
|
||||
--subst-var-by PATH ${lib.makeBinPath [ coreutils iproute2 runtimeShell systemd util-linux ]}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Helper script for OpenVPN to directly update the DNS settings of a link through systemd-resolved via DBus";
|
||||
homepage = "https://github.com/jonathanio/update-systemd-resolved";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ eadwu ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
26
pkgs/tools/networking/openvpn/update-systemd-resolved.patch
Normal file
26
pkgs/tools/networking/openvpn/update-systemd-resolved.patch
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index 524b6b7..8a880f1 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -9,7 +9,6 @@ all: install info
|
||||
|
||||
install:
|
||||
@install -Dm750 $(SRC) $(DEST)
|
||||
- @install -Dm644 $(SRC).conf $(DEST).conf
|
||||
|
||||
info:
|
||||
@printf 'Successfully installed %s to %s.\n' $(SRC) $(DEST)
|
||||
diff --git a/update-systemd-resolved b/update-systemd-resolved
|
||||
index 1452e1a..39641cb 100755
|
||||
--- a/update-systemd-resolved
|
||||
+++ b/update-systemd-resolved
|
||||
@@ -29,7 +29,8 @@
|
||||
DBUS_DEST="org.freedesktop.resolve1"
|
||||
DBUS_NODE="/org/freedesktop/resolve1"
|
||||
|
||||
-SCRIPT_NAME="${BASH_SOURCE[0]##*/}"
|
||||
+PATH="@PATH@"
|
||||
+SCRIPT_NAME="update-systemd-resolved"
|
||||
|
||||
log() {
|
||||
logger -s -t "$SCRIPT_NAME" "$@"
|
||||
Loading…
Add table
Add a link
Reference in a new issue