Loading pkgs/development/libraries/libevent/default.nix +6 −1 Original line number Diff line number Diff line Loading @@ -2,6 +2,8 @@ , updateAutotoolsGnuConfigScriptsHook , sslSupport ? true, openssl , fetchpatch , static ? stdenv.hostPlatform.isStatic }: stdenv.mkDerivation rec { Loading @@ -21,7 +23,10 @@ stdenv.mkDerivation rec { }) ]; configureFlags = lib.optional (!sslSupport) "--disable-openssl"; configureFlags = lib.flatten [ (lib.optional (!sslSupport) "--disable-openssl") (lib.optionals static ["--disable-shared" "--with-pic"]) ]; preConfigure = lib.optionalString (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") '' MACOSX_DEPLOYMENT_TARGET=10.16 Loading pkgs/development/libraries/yaml-cpp/default.nix +2 −1 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ , fetchFromGitHub , gitUpdater , cmake , static ? stdenv.hostPlatform.isStatic }: stdenv.mkDerivation rec { Loading @@ -24,7 +25,7 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DYAML_CPP_BUILD_TOOLS=false" "-DYAML_BUILD_SHARED_LIBS=${lib.boolToString (!stdenv.hostPlatform.isStatic)}" (lib.cmakeBool "YAML_BUILD_SHARED_LIBS" (!static)) "-DINSTALL_GTEST=false" ]; Loading pkgs/os-specific/linux/dcgm/default.nix +15 −19 Original line number Diff line number Diff line Loading @@ -16,18 +16,10 @@ , symlinkJoin , tclap_1_4 , yaml-cpp , static ? gcc11Stdenv.hostPlatform.isStatic }: let # Flags copied from DCGM's libevent build script libevent-nossl = libevent.override { sslSupport = false; }; libevent-nossl-static = libevent-nossl.overrideAttrs (super: { CFLAGS = "-Wno-cast-function-type -Wno-implicit-fallthrough -fPIC"; CXXFLAGS = "-Wno-cast-function-type -Wno-implicit-fallthrough -fPIC"; configureFlags = super.configureFlags ++ [ "--disable-shared" "--with-pic" ]; }); jsoncpp-static = jsoncpp.override { enableStatic = true; }; # DCGM depends on 3 different versions of CUDA at the same time. # The runtime closure, thankfully, is quite small because most things # are statically linked. Loading Loading @@ -86,13 +78,13 @@ let # C.f. https://github.com/NVIDIA/DCGM/blob/7e1012302679e4bb7496483b32dcffb56e528c92/dcgmbuild/build.sh#L22 in gcc11Stdenv.mkDerivation rec { pname = "dcgm"; version = "3.2.5"; # N.B: If you change this, be sure prometheus-dcgm-exporter supports this version. version = "3.3.5"; # N.B: If you change this, be sure prometheus-dcgm-exporter supports this version. src = fetchFromGitHub { owner = "NVIDIA"; repo = "DCGM"; rev = "refs/tags/v${version}"; hash = "sha256-iMyYOr3dSpdRV2S/TlB/tEOAWYhK09373ZRbd5vzogQ="; hash = "sha256-n/uWvgvxAGfr1X51XgtHfFGDOO5AMBSV5UWQQpsylpg="; }; # Add our paths to the CUDA paths so FindCuda.cmake can find them. Loading @@ -117,14 +109,18 @@ in gcc11Stdenv.mkDerivation rec { ]; buildInputs = [ plog.dev # header-only tclap_1_4 # header-only # Header-only catch2 fmt_9 jsoncpp-static libevent-nossl-static yaml-cpp plog.dev tclap_1_4 # Dependencies that can be either static or dynamic. (fmt_9.override { enableShared = !static; }) # DCGM's build uses the static outputs regardless of enableShared (yaml-cpp.override { inherit static; stdenv = gcc11Stdenv; }) # TODO: Dependencies that DCGM's CMake hard-codes to be static-only. (jsoncpp.override { enableStatic = true; }) (libevent.override { sslSupport = false; static = true; }) ]; disallowedReferences = lib.concatMap (x: x.pkgSet) cudaPackageSetByVersion; Loading pkgs/servers/monitoring/prometheus/dcgm-exporter/default.nix +3 −20 Original line number Diff line number Diff line Loading @@ -3,31 +3,19 @@ , fetchFromGitHub , autoAddDriverRunpath , dcgm , linuxPackages }: buildGoModule rec { pname = "dcgm-exporter"; # The first portion of this version string corresponds to a compatible DCGM # version. version = "3.2.5-3.1.7"; # N.B: If you change this, update dcgm as well to the matching version. version = "3.3.5-3.4.0"; # N.B: If you change this, update dcgm as well to the matching version. src = fetchFromGitHub { owner = "NVIDIA"; repo = pname; rev = "refs/tags/${version}"; hash = "sha256-+Hviq+iu1LBcy2VwmCX5xOq1I/zevfydesVlrVorGOI="; }; # Upgrade to go 1.17 during the vendoring FOD build because it fails otherwise. overrideModAttrs = _: { preBuild = '' substituteInPlace go.mod --replace 'go 1.16' 'go 1.17' go mod tidy ''; postInstall = '' cp go.mod "$out/go.mod" ''; hash = "sha256-IOVPEK+9ogBZJYns2pTyJwHUBMN8JqG1THTJPvpCwdo="; }; CGO_LDFLAGS = "-ldcgm"; Loading @@ -40,12 +28,7 @@ buildGoModule rec { # symbols are available on startup. hardeningDisable = [ "bindnow" ]; # Copy the modified go.mod we got from the vendoring process. preBuild = '' cp vendor/go.mod go.mod ''; vendorHash = "sha256-Fjvx15e/psxoqoS6c6GhiQfe7g2aI40EmPR26xLhrzg="; vendorHash = "sha256-urKa0O8QZnM8cWjPcGVhoAWhx6fCdMmhRX0JOriRaig="; nativeBuildInputs = [ autoAddDriverRunpath Loading Loading
pkgs/development/libraries/libevent/default.nix +6 −1 Original line number Diff line number Diff line Loading @@ -2,6 +2,8 @@ , updateAutotoolsGnuConfigScriptsHook , sslSupport ? true, openssl , fetchpatch , static ? stdenv.hostPlatform.isStatic }: stdenv.mkDerivation rec { Loading @@ -21,7 +23,10 @@ stdenv.mkDerivation rec { }) ]; configureFlags = lib.optional (!sslSupport) "--disable-openssl"; configureFlags = lib.flatten [ (lib.optional (!sslSupport) "--disable-openssl") (lib.optionals static ["--disable-shared" "--with-pic"]) ]; preConfigure = lib.optionalString (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") '' MACOSX_DEPLOYMENT_TARGET=10.16 Loading
pkgs/development/libraries/yaml-cpp/default.nix +2 −1 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ , fetchFromGitHub , gitUpdater , cmake , static ? stdenv.hostPlatform.isStatic }: stdenv.mkDerivation rec { Loading @@ -24,7 +25,7 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DYAML_CPP_BUILD_TOOLS=false" "-DYAML_BUILD_SHARED_LIBS=${lib.boolToString (!stdenv.hostPlatform.isStatic)}" (lib.cmakeBool "YAML_BUILD_SHARED_LIBS" (!static)) "-DINSTALL_GTEST=false" ]; Loading
pkgs/os-specific/linux/dcgm/default.nix +15 −19 Original line number Diff line number Diff line Loading @@ -16,18 +16,10 @@ , symlinkJoin , tclap_1_4 , yaml-cpp , static ? gcc11Stdenv.hostPlatform.isStatic }: let # Flags copied from DCGM's libevent build script libevent-nossl = libevent.override { sslSupport = false; }; libevent-nossl-static = libevent-nossl.overrideAttrs (super: { CFLAGS = "-Wno-cast-function-type -Wno-implicit-fallthrough -fPIC"; CXXFLAGS = "-Wno-cast-function-type -Wno-implicit-fallthrough -fPIC"; configureFlags = super.configureFlags ++ [ "--disable-shared" "--with-pic" ]; }); jsoncpp-static = jsoncpp.override { enableStatic = true; }; # DCGM depends on 3 different versions of CUDA at the same time. # The runtime closure, thankfully, is quite small because most things # are statically linked. Loading Loading @@ -86,13 +78,13 @@ let # C.f. https://github.com/NVIDIA/DCGM/blob/7e1012302679e4bb7496483b32dcffb56e528c92/dcgmbuild/build.sh#L22 in gcc11Stdenv.mkDerivation rec { pname = "dcgm"; version = "3.2.5"; # N.B: If you change this, be sure prometheus-dcgm-exporter supports this version. version = "3.3.5"; # N.B: If you change this, be sure prometheus-dcgm-exporter supports this version. src = fetchFromGitHub { owner = "NVIDIA"; repo = "DCGM"; rev = "refs/tags/v${version}"; hash = "sha256-iMyYOr3dSpdRV2S/TlB/tEOAWYhK09373ZRbd5vzogQ="; hash = "sha256-n/uWvgvxAGfr1X51XgtHfFGDOO5AMBSV5UWQQpsylpg="; }; # Add our paths to the CUDA paths so FindCuda.cmake can find them. Loading @@ -117,14 +109,18 @@ in gcc11Stdenv.mkDerivation rec { ]; buildInputs = [ plog.dev # header-only tclap_1_4 # header-only # Header-only catch2 fmt_9 jsoncpp-static libevent-nossl-static yaml-cpp plog.dev tclap_1_4 # Dependencies that can be either static or dynamic. (fmt_9.override { enableShared = !static; }) # DCGM's build uses the static outputs regardless of enableShared (yaml-cpp.override { inherit static; stdenv = gcc11Stdenv; }) # TODO: Dependencies that DCGM's CMake hard-codes to be static-only. (jsoncpp.override { enableStatic = true; }) (libevent.override { sslSupport = false; static = true; }) ]; disallowedReferences = lib.concatMap (x: x.pkgSet) cudaPackageSetByVersion; Loading
pkgs/servers/monitoring/prometheus/dcgm-exporter/default.nix +3 −20 Original line number Diff line number Diff line Loading @@ -3,31 +3,19 @@ , fetchFromGitHub , autoAddDriverRunpath , dcgm , linuxPackages }: buildGoModule rec { pname = "dcgm-exporter"; # The first portion of this version string corresponds to a compatible DCGM # version. version = "3.2.5-3.1.7"; # N.B: If you change this, update dcgm as well to the matching version. version = "3.3.5-3.4.0"; # N.B: If you change this, update dcgm as well to the matching version. src = fetchFromGitHub { owner = "NVIDIA"; repo = pname; rev = "refs/tags/${version}"; hash = "sha256-+Hviq+iu1LBcy2VwmCX5xOq1I/zevfydesVlrVorGOI="; }; # Upgrade to go 1.17 during the vendoring FOD build because it fails otherwise. overrideModAttrs = _: { preBuild = '' substituteInPlace go.mod --replace 'go 1.16' 'go 1.17' go mod tidy ''; postInstall = '' cp go.mod "$out/go.mod" ''; hash = "sha256-IOVPEK+9ogBZJYns2pTyJwHUBMN8JqG1THTJPvpCwdo="; }; CGO_LDFLAGS = "-ldcgm"; Loading @@ -40,12 +28,7 @@ buildGoModule rec { # symbols are available on startup. hardeningDisable = [ "bindnow" ]; # Copy the modified go.mod we got from the vendoring process. preBuild = '' cp vendor/go.mod go.mod ''; vendorHash = "sha256-Fjvx15e/psxoqoS6c6GhiQfe7g2aI40EmPR26xLhrzg="; vendorHash = "sha256-urKa0O8QZnM8cWjPcGVhoAWhx6fCdMmhRX0JOriRaig="; nativeBuildInputs = [ autoAddDriverRunpath Loading