mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 22:36:23 +01: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
38 lines
1 KiB
Nix
38 lines
1 KiB
Nix
{ lib, stdenv, fetchurl
|
|
, openssl, readline, ncurses, zlib
|
|
, dataDir ? "/var/lib/softether" }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "softether";
|
|
version = "4.29";
|
|
build = "9680";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/SoftEtherVPN/SoftEtherVPN_Stable/releases/download/v${version}-${build}-rtm/softether-src-v${version}-${build}-rtm.tar.gz";
|
|
sha256 = "1r169s5dr31060r2mxkmm08riy6zrxgapmrc6kdrpxdav6kmy0z6";
|
|
};
|
|
|
|
buildInputs = [ openssl readline ncurses zlib ];
|
|
|
|
preConfigure = ''
|
|
./configure
|
|
'';
|
|
|
|
buildPhase = ''
|
|
mkdir -p $out/bin
|
|
sed -i \
|
|
-e "/INSTALL_BINDIR=/s|/usr/bin|/bin|g" \
|
|
-e "/_DIR=/s|/usr|${dataDir}|g" \
|
|
-e "s|\$(INSTALL|$out/\$(INSTALL|g" \
|
|
-e "/echo/s|echo $out/|echo |g" \
|
|
Makefile
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "An Open-Source Free Cross-platform Multi-protocol VPN Program";
|
|
homepage = "https://www.softether.org/";
|
|
license = licenses.asl20;
|
|
maintainers = [ maintainers.rick68 ];
|
|
platforms = [ "x86_64-linux" ];
|
|
};
|
|
}
|