libwebsockets: remove generic function, format

Formatted with nixpkgs-fmt.
This commit is contained in:
Rick van Schijndel 2022-07-06 22:02:40 +02:00
parent d819f15503
commit bcd5ad6d83
2 changed files with 45 additions and 57 deletions

View file

@ -9,20 +9,17 @@
, withExternalPoll ? false , withExternalPoll ? false
}: }:
let stdenv.mkDerivation rec {
generic = { version, hash, patches ? [] }: stdenv.mkDerivation rec {
pname = "libwebsockets"; pname = "libwebsockets";
inherit version; version = "4.3.2";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "warmcat"; owner = "warmcat";
repo = "libwebsockets"; repo = "libwebsockets";
rev = "v${version}"; rev = "v${version}";
inherit hash; hash = "sha256-why8LAcc4XN0JdTJ1JoNWijKENL5mOHBsi9K4wpYr2c=";
}; };
inherit patches;
buildInputs = [ openssl zlib libuv ]; buildInputs = [ openssl zlib libuv ];
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ];
@ -32,7 +29,6 @@ let
"-DLWS_WITH_IPV6=ON" "-DLWS_WITH_IPV6=ON"
"-DLWS_WITH_SOCKS5=ON" "-DLWS_WITH_SOCKS5=ON"
"-DDISABLE_WERROR=ON" "-DDISABLE_WERROR=ON"
# Required since v4.2.0
"-DLWS_BUILD_HASH=no_hash" "-DLWS_BUILD_HASH=no_hash"
] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "-DLWS_WITHOUT_TESTAPPS=ON" ] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "-DLWS_WITHOUT_TESTAPPS=ON"
++ lib.optional withExternalPoll "-DLWS_WITH_EXTERNAL_POLL=ON"; ++ lib.optional withExternalPoll "-DLWS_WITH_EXTERNAL_POLL=ON";
@ -58,11 +54,5 @@ let
maintainers = with maintainers; [ mindavi ]; maintainers = with maintainers; [ mindavi ];
platforms = platforms.all; platforms = platforms.all;
}; };
};
in {
libwebsockets_4_3 = generic {
version = "4.3.2";
hash = "sha256-why8LAcc4XN0JdTJ1JoNWijKENL5mOHBsi9K4wpYr2c=";
};
} }

View file

@ -8094,9 +8094,7 @@ with pkgs;
librest_1_0 = callPackage ../development/libraries/librest/1.0.nix { }; librest_1_0 = callPackage ../development/libraries/librest/1.0.nix { };
inherit (callPackages ../development/libraries/libwebsockets { }) libwebsockets = callPackage ../development/libraries/libwebsockets { };
libwebsockets_4_3;
libwebsockets = libwebsockets_4_3;
licensee = callPackage ../tools/package-management/licensee { }; licensee = callPackage ../tools/package-management/licensee { };