mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 08:33:54 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
42 lines
1.3 KiB
Nix
42 lines
1.3 KiB
Nix
{ lib, stdenv, fetchurl, pkgconfig, openssl ? null, gnutls ? null, gmp, libxml2, stoken, zlib, fetchgit, darwin } :
|
|
|
|
assert (openssl != null) == (gnutls == null);
|
|
|
|
let vpnc = fetchgit {
|
|
url = "git://git.infradead.org/users/dwmw2/vpnc-scripts.git";
|
|
rev = "c0122e891f7e033f35f047dad963702199d5cb9e";
|
|
sha256 = "11b1ls012mb704jphqxjmqrfbbhkdjb64j2q4k8wb5jmja8jnd14";
|
|
};
|
|
|
|
in stdenv.mkDerivation rec {
|
|
pname = "openconnect";
|
|
version = "8.10";
|
|
|
|
src = fetchurl {
|
|
urls = [
|
|
"ftp://ftp.infradead.org/pub/openconnect/${pname}-${version}.tar.gz"
|
|
];
|
|
sha256 = "1cdsx4nsrwawbsisfkldfc9i4qn60g03vxb13nzppr2br9p4rrih";
|
|
};
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
configureFlags = [
|
|
"--with-vpnc-script=${vpnc}/vpnc-script"
|
|
"--disable-nls"
|
|
"--without-openssl-version-check"
|
|
];
|
|
|
|
buildInputs = [ openssl gnutls gmp libxml2 stoken zlib ]
|
|
++ stdenv.lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.PCSC;
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
meta = with lib; {
|
|
description = "VPN Client for Cisco's AnyConnect SSL VPN";
|
|
homepage = "http://www.infradead.org/openconnect/";
|
|
license = licenses.lgpl21;
|
|
maintainers = with maintainers; [ pradeepchhetri tricktron ];
|
|
platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin;
|
|
};
|
|
}
|