diff --git a/pkgs/tools/networking/badvpn/default.nix b/pkgs/tools/networking/badvpn/default.nix index fd7c3b23adfe..8d1174ac328a 100644 --- a/pkgs/tools/networking/badvpn/default.nix +++ b/pkgs/tools/networking/badvpn/default.nix @@ -1,39 +1,29 @@ -{lib, stdenv, fetchurl, cmake, openssl, nss, pkg-config, nspr, bash, debug ? false}: -let - s = # Generated upstream information - rec { - baseName="badvpn"; - version="1.999.130"; - name="${baseName}-${version}"; - hash="02b1fra43l75mljkhrq45vcrrqv0znicjn15g7nbqx3jppzbpm5z"; - url="https://github.com/ambrop72/badvpn/archive/1.999.130.tar.gz"; - sha256="02b1fra43l75mljkhrq45vcrrqv0znicjn15g7nbqx3jppzbpm5z"; +{ lib, stdenv, fetchurl, cmake, openssl, nss, pkg-config, nspr, bash, debug ? false }: + +stdenv.mkDerivation rec { + pname = "badvpn"; + version = "1.999.130"; + src = fetchurl { + url = "https://github.com/ambrop72/badvpn/archive/${version}.tar.gz"; + sha256 = "sha256-v9S7/r1ydLzseSVYyaL9YOOc2S4EZzglreXQQVR2YQk="; }; - - - compileFlags = "-O3 ${lib.optionalString (!debug) "-DNDEBUG"}"; -in -stdenv.mkDerivation { - inherit (s) name version; nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ - openssl nss nspr + openssl + nss + nspr ]; - src = fetchurl { - inherit (s) url sha256; - }; preConfigure = '' find . -name '*.sh' -exec sed -e 's@#!/bin/sh@${stdenv.shell}@' -i '{}' ';' find . -name '*.sh' -exec sed -e 's@#!/bin/bash@${bash}/bin/bash@' -i '{}' ';' - cmakeFlagsArray=("-DCMAKE_BUILD_TYPE=" "-DCMAKE_C_FLAGS=${compileFlags}"); + cmakeFlagsArray=("-DCMAKE_BUILD_TYPE=" "-DCMAKE_C_FLAGS=-O3 ${lib.optionalString (!debug) "-DNDEBUG"}"); ''; - meta = { - inherit (s) version; + meta = with lib; { description = "A set of network-related (mostly VPN-related) tools"; - license = lib.licenses.bsd3 ; - maintainers = [lib.maintainers.raskin]; - platforms = lib.platforms.linux; + license = licenses.bsd3; + maintainers = with maintainers; [ raskin ]; + platforms = platforms.linux; }; } diff --git a/pkgs/tools/networking/badvpn/default.upstream b/pkgs/tools/networking/badvpn/default.upstream deleted file mode 100644 index 2a85ba7cb519..000000000000 --- a/pkgs/tools/networking/badvpn/default.upstream +++ /dev/null @@ -1,3 +0,0 @@ -url https://github.com/ambrop72/badvpn/releases -version_link '[0-9][.]tar[.][a-z0-9]+$' -version '.*/([0-9.]+)[.]tar[.].*' '\1'