mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-28 10:50:15 +00:00
openvpn3: use finalAttrs (#560826)
This commit is contained in:
@@ -35,14 +35,14 @@ let
|
||||
hash = "sha256-ZFvxwzWiRgi0s08W7RC5I3u7ATFIhmj7hkVCAiOeCGw=";
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "openvpn3";
|
||||
version = "27.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "OpenVPN";
|
||||
repo = "openvpn3-linux";
|
||||
tag = "v${version}";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-Egt6lVcvlmxnABw4v0cdROQzVdkA3DgOGGCSgl+QFdM=";
|
||||
# `openvpn3-core` is a submodule.
|
||||
# TODO: make it into a separate package
|
||||
@@ -63,7 +63,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
postPatch = ''
|
||||
echo '#define OPENVPN_VERSION "3.git:unknown:unknown"
|
||||
#define PACKAGE_GUIVERSION "v${builtins.replaceStrings [ "_" ] [ ":" ] version}"
|
||||
#define PACKAGE_GUIVERSION "v${builtins.replaceStrings [ "_" ] [ ":" ] finalAttrs.version}"
|
||||
#define PACKAGE_NAME "openvpn3-linux"
|
||||
' > ./src/build-version.h
|
||||
|
||||
@@ -134,7 +134,7 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
postFixup = ''
|
||||
wrapPythonPrograms
|
||||
wrapPythonProgramsIn "$out/libexec/openvpn3-linux" "$out ${pythonPath}"
|
||||
wrapPythonProgramsIn "$out/libexec/openvpn3-linux" "$out ${finalAttrs.pythonPath}"
|
||||
'';
|
||||
|
||||
env.NIX_LDFLAGS = "-lpthread";
|
||||
@@ -145,10 +145,10 @@ stdenv.mkDerivation rec {
|
||||
description = "OpenVPN 3 Linux client";
|
||||
license = lib.licenses.agpl3Plus;
|
||||
homepage = "https://github.com/OpenVPN/openvpn3-linux/";
|
||||
changelog = "https://github.com/OpenVPN/openvpn3-linux/releases/tag/v${version}";
|
||||
changelog = "https://github.com/OpenVPN/openvpn3-linux/releases/tag/v${finalAttrs.version}";
|
||||
maintainers = with lib.maintainers; [
|
||||
progrm_jarvis
|
||||
];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user