nixpkgs/pkgs/tools/networking/vtun/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
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
2021-01-11 10:38:22 +01:00

37 lines
1.1 KiB
Nix

{ lib, stdenv, fetchurl, fetchpatch, openssl, lzo, zlib, yacc, flex }:
stdenv.mkDerivation rec {
name = "vtun-3.0.4";
src = fetchurl {
url = "mirror://sourceforge/vtun/${name}.tar.gz";
sha256 = "1fcqzn2bdjw31j1hvv6lg99v2phhszm29kp2xambxzp32mmxzy5b";
};
patches = [
(fetchpatch { url = "http://sources.debian.net/data/main/v/vtun/3.0.3-2.2/debian/patches/08-gcc5-inline.patch";
sha256 = "18sys97v2hx6vac5zp3ld7sa6kz4izv3g9dnkm0lflbaxhym2vs1";
})
];
postPatch = ''
sed -i -e 's/-m 755//' -e 's/-o root -g 0//' Makefile.in
sed -i '/strip/d' Makefile.in
'';
buildInputs = [ lzo openssl zlib yacc flex ];
configureFlags = [
"--with-lzo-headers=${lzo}/include/lzo"
"--with-ssl-headers=${openssl.dev}/include/openssl"
"--with-blowfish-headers=${openssl.dev}/include/openssl"
];
meta = with lib; {
description = "Virtual Tunnels over TCP/IP with traffic shaping, compression and encryption";
homepage = "http://vtun.sourceforge.net/";
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = with maintainers; [ pSub ];
};
}