From 6dbf077be2a569e44381e756e18c96ae931bdb73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 31 Jan 2023 15:06:57 +0100 Subject: [PATCH] sysdig: remove with lib over entire file --- pkgs/os-specific/linux/sysdig/default.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/os-specific/linux/sysdig/default.nix b/pkgs/os-specific/linux/sysdig/default.nix index 21f232d0c2da..e316423f01a0 100644 --- a/pkgs/os-specific/linux/sysdig/default.nix +++ b/pkgs/os-specific/linux/sysdig/default.nix @@ -3,7 +3,6 @@ , libyamlcpp, nlohmann_json, re2 }: -with lib; let # Compare with https://github.com/draios/sysdig/blob/dev/cmake/modules/falcosecurity-libs.cmake libsRev = "0.9.1"; @@ -54,7 +53,7 @@ stdenv.mkDerivation rec { libyamlcpp jsoncpp nlohmann_json - ] ++ optionals (kernel != null) kernel.moduleBuildDependencies; + ] ++ lib.optionals (kernel != null) kernel.moduleBuildDependencies; hardeningDisable = [ "pic" ]; @@ -82,7 +81,7 @@ stdenv.mkDerivation rec { "-DUSE_BUNDLED_TBB=OFF" "-DUSE_BUNDLED_RE2=OFF" "-DCREATE_TEST_TARGETS=OFF" - ] ++ optional (kernel == null) "-DBUILD_DRIVER=OFF"; + ] ++ lib.optional (kernel == null) "-DBUILD_DRIVER=OFF"; # needed since luajit-2.1.0-beta3 NIX_CFLAGS_COMPILE = "-DluaL_reg=luaL_Reg -DluaL_getn(L,i)=((int)lua_objlen(L,i))"; @@ -93,7 +92,7 @@ stdenv.mkDerivation rec { exit 1 fi cmakeFlagsArray+=(-DCMAKE_EXE_LINKER_FLAGS="-ltbb -lcurl -labsl_synchronization") - '' + optionalString (kernel != null) '' + '' + lib.optionalString (kernel != null) '' export INSTALL_MOD_PATH="$out" export KERNELDIR="${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ''; @@ -106,7 +105,7 @@ stdenv.mkDerivation rec { rmdir $out/etc/bash_completion.d rmdir $out/etc '' - + optionalString (kernel != null) '' + + lib.optionalString (kernel != null) '' make install_driver kernel_dev=${kernel.dev} kernel_dev=''${kernel_dev#/nix/store/} @@ -121,7 +120,7 @@ stdenv.mkDerivation rec { ''; - meta = { + meta = with lib; { description = "A tracepoint-based system tracing tool for Linux (with clients for other OSes)"; license = with licenses; [ asl20 gpl2 mit ]; maintainers = [maintainers.raskin];