mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 03:43:06 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
51 lines
1.5 KiB
Nix
51 lines
1.5 KiB
Nix
{ lib, stdenv, fetchFromGitHub
|
|
, makeWrapper, pkg-config, perl
|
|
, gnutls, libgcrypt, vpnc-scripts
|
|
, opensslSupport ? false, openssl # Distributing this is a GPL violation.
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
pname = "vpnc";
|
|
version = "unstable-2021-11-04";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "streambinder";
|
|
repo = "vpnc";
|
|
rev = "c8bb5371b881f8853f191c495e762f834c9def5d";
|
|
sha256 = "1j1p83nfc2fpwczjcggsby0b44hk97ky0s6vns6md3awlbpgdn57";
|
|
fetchSubmodules = true;
|
|
};
|
|
|
|
nativeBuildInputs = [ makeWrapper ]
|
|
++ lib.optional (!opensslSupport) pkg-config;
|
|
buildInputs = [ libgcrypt perl ]
|
|
++ (if opensslSupport then [ openssl ] else [ gnutls ]);
|
|
|
|
makeFlags = [
|
|
"PREFIX=$(out)"
|
|
"ETCDIR=$(out)/etc/vpnc"
|
|
"SCRIPT_PATH=${vpnc-scripts}/bin/vpnc-script"
|
|
] ++ lib.optional opensslSupport "OPENSSL_GPL_VIOLATION=yes";
|
|
|
|
env = lib.optionalAttrs stdenv.cc.isGNU {
|
|
NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
|
|
};
|
|
|
|
postPatch = ''
|
|
patchShebangs src/makeman.pl
|
|
'';
|
|
|
|
enableParallelBuilding = true;
|
|
# Missing install depends:
|
|
# install: target '...-vpnc-unstable-2021-11-04/share/doc/vpnc': No such file or directory
|
|
# make: *** [Makefile:149: install-doc] Error 1
|
|
enableParallelInstalling = false;
|
|
|
|
meta = with lib; {
|
|
homepage = "https://davidepucci.it/doc/vpnc/";
|
|
description = "Virtual private network (VPN) client for Cisco's VPN concentrators";
|
|
license = if opensslSupport then licenses.unfree else licenses.gpl2Plus;
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|