push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
{
lib,
stdenv,
fetchzip,
perlPackages,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "dc3dd";
version = "7.3.1";
src = fetchzip {
url = "mirror://sourceforge/dc3dd/dc3dd-${finalAttrs.version}.zip";
hash = "sha256-SYDoqGlsROHX1a0jJX11F+yp6CeFK+tZbYOOnScC6Ig=";
};
outputs = [
"out"
"man"
];
preConfigure = ''
chmod +x configure
'';
buildInputs = [ perlPackages.LocaleGettext ];
makeFlags = [
"PREFIX=$out"
"CC=${stdenv.cc.targetPrefix}cc"
];
enableParallelBuilding = true;
meta = with lib; {
description = "Patched version of dd that includes a number of features useful for computer forensics";
mainProgram = "dc3dd";
homepage = "https://sourceforge.net/projects/dc3dd/";
maintainers = with maintainers; [ d3vil0p3r ];
platforms = platforms.linux;
license = licenses.gpl3Plus; # Refer to https://sourceforge.net/p/dc3dd/code/HEAD/tree/COPYING
};
})

View File

@@ -0,0 +1,30 @@
{
lib,
stdenv,
fetchFromGitHub,
}:
stdenv.mkDerivation rec {
pname = "dcadec";
version = "0.2.0";
src = fetchFromGitHub {
owner = "foo86";
repo = "dcadec";
rev = "v" + version;
sha256 = "07nd0ajizrp1w02bsyfcv18431r8m8rq8gjfmz9wmckpg7cxj2hs";
};
installPhase = "make PREFIX=/ DESTDIR=$out install";
doCheck = false; # fails with "ERROR: Run 'git submodule update --init test/samples' first."
meta = with lib; {
description = "DTS Coherent Acoustics decoder with support for HD extensions";
mainProgram = "dcadec";
maintainers = with maintainers; [ edwtjo ];
homepage = "https://github.com/foo86/dcadec";
license = licenses.lgpl21;
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,62 @@
{
stdenv,
lib,
fetchFromGitHub,
autoconf,
automake,
libtool,
zlib,
cunit,
libxcrypt,
}:
stdenv.mkDerivation rec {
pname = "dcap";
version = "2.47.14";
src = fetchFromGitHub {
owner = "dCache";
repo = "dcap";
rev = version;
sha256 = "sha256-hn4nkFTIbSUUhvf9UfsEqVhphAdNWmATaCrv8jOuC0Y=";
};
nativeBuildInputs = [
autoconf
automake
libtool
];
buildInputs = [
zlib
libxcrypt
];
strictDeps = true;
preConfigure = ''
patchShebangs --build bootstrap.sh
./bootstrap.sh
'';
doCheck = true;
checkInputs = [ cunit ];
outputs = [
"bin"
"dev"
"out"
"man"
"doc"
];
meta = with lib; {
broken = stdenv.hostPlatform.isDarwin;
description = "dCache access protocol client library";
homepage = "https://github.com/dCache/dcap";
changelog = "https://github.com/dCache/dcap/blob/master/ChangeLog";
license = licenses.lgpl2Only;
platforms = platforms.all;
mainProgram = "dccp";
maintainers = with maintainers; [ ShamrockLee ];
};
}

View File

@@ -0,0 +1,38 @@
{
autoreconfHook,
fetchFromGitHub,
lib,
pkg-config,
stdenv,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "dcfldd";
version = "1.9.3";
src = fetchFromGitHub {
owner = "resurrecting-open-source-projects";
repo = "dcfldd";
tag = "v${finalAttrs.version}";
hash = "sha256-xn1+8hLiLQMOv0q0Jkuqha9EZSJWMbCksnq/G6n4vQ8=";
};
strictDeps = true;
nativeBuildInputs = [
autoreconfHook
pkg-config
];
meta = {
description = "Enhanced version of GNU dd";
homepage = "https://github.com/resurrecting-open-source-projects/dcfldd";
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ qknight ];
mainProgram = "dcfldd";
};
})

View File

@@ -0,0 +1,40 @@
diff --git a/cmake/FindJsoncpp.cmake b/cmake/FindJsoncpp.cmake
index abedf7bb85..d7a52f5c7b 100644
--- a/cmake/FindJsoncpp.cmake
+++ b/cmake/FindJsoncpp.cmake
@@ -16,8 +16,8 @@
if (NOT TARGET JsonCpp::JsonCpp)
find_package(jsoncpp REQUIRED CONFIG)
- set(JSONCPP_STATIC_LIBS jsoncpp_static)
- set(JSONCPP_INCLUDE_PATH $<TARGET_PROPERTY:jsoncpp_static,INTERFACE_INCLUDE_DIRECTORIES>)
+ set(JSONCPP_STATIC_LIBS jsoncpp)
+ set(JSONCPP_INCLUDE_PATH $<TARGET_PROPERTY:jsoncpp,INTERFACE_INCLUDE_DIRECTORIES>)
endif()
# set(Jsoncpp_PATH_PREFIXES /usr/local "${Jsoncpp_ROOT}" "$ENV{HOME}")
# foreach(prefix ${Jsoncpp_PATH_PREFIXES})
diff --git a/cmake/FindLibevent.cmake b/cmake/FindLibevent.cmake
index 354d6f9b99..38aca9534e 100644
--- a/cmake/FindLibevent.cmake
+++ b/cmake/FindLibevent.cmake
@@ -26,16 +26,12 @@
endforeach()
find_path(LIBEVENT_INCLUDE_DIR evhttp.h event.h PATHS ${Libevent_INCLUDE_PATHS})
-find_library(LIBEVENT_STATIC_LIB NAMES libevent.a libevent_core.a libevent_extra.a PATHS ${Libevent_LIB_PATHS})
-find_library(LIBEVENT_PTHREAD_STATIC_LIB NAMES libevent_pthreads.a PATHS ${Libevent_LIB_PATHS})
+find_library(LIBEVENT_STATIC_LIB NAMES libevent.so libevent_core.so libevent_extra.so PATHS ${Libevent_LIB_PATHS})
+find_library(LIBEVENT_PTHREAD_STATIC_LIB NAMES libevent_pthreads.so PATHS ${Libevent_LIB_PATHS})
-if (LIBEVENT_INCLUDE_DIR AND LIBEVENT_STATIC_LIB AND LIBEVENT_PTHREAD_STATIC_LIB)
+if (LIBEVENT_INCLUDE_DIR AND LIBEVENT_STATIC_LIB)
set(Libevent_FOUND TRUE)
- add_library(libevent_event_static STATIC IMPORTED)
- set_target_properties(libevent_event_static PROPERTIES IMPORTED_LOCATION ${LIBEVENT_STATIC_LIB})
- add_library(libevent_event_pthread STATIC IMPORTED)
- set_target_properties(libevent_event_pthread PROPERTIES IMPORTED_LOCATION ${LIBEVENT_PTHREAD_STATIC_LIB})
- set(LIBEVENT_STATIC_LIBS libevent_event_static libevent_event_pthread)
+ set(LIBEVENT_STATIC_LIBS ${LIBEVENT_STATIC_LIB} ${LIBEVENT_PTHREAD_STATIC_LIB})
else ()
set(Libevent_FOUND FALSE)
endif ()

View File

@@ -0,0 +1,252 @@
diff --git a/common/LsHw.cpp b/common/LsHw.cpp
index 8d0f35cd89..12fe26957f 100644
--- a/common/LsHw.cpp
+++ b/common/LsHw.cpp
@@ -145,7 +145,7 @@
{
static std::string const cmd = "lshw -json";
std::string cmdOutput;
- static std::array<std::string, 2> const cmdPathPrefix { "/usr/bin/", "/usr/sbin/" };
+ static std::array<std::string, 1> const cmdPathPrefix { "@lshw@/bin/" };
dcgmReturn_t result = DCGM_ST_OK;
for (auto const &prefix : cmdPathPrefix)
@@ -162,4 +162,4 @@
}
return cmdOutput;
-}
\ No newline at end of file
+}
diff --git a/common/tests/LsHwTests.cpp b/common/tests/LsHwTests.cpp
index edb65e599e..5950fb8d9e 100644
--- a/common/tests/LsHwTests.cpp
+++ b/common/tests/LsHwTests.cpp
@@ -609,7 +609,7 @@
std::unique_ptr<MockRunningUserChecker> checker = std::make_unique<MockRunningUserChecker>();
checker->MockIsRoot(true);
std::unique_ptr<MockRunCmdHelper> runCmdHelper = std::make_unique<MockRunCmdHelper>();
- runCmdHelper->MockCmdOutput("/usr/bin/lshw -json", DCGM_ST_OK, lshwMultipleCpusAbridgedValidJson);
+ runCmdHelper->MockCmdOutput("@lshw@/bin/lshw -json", DCGM_ST_OK, lshwMultipleCpusAbridgedValidJson);
LsHw lshw;
lshw.SetChecker(std::move(checker));
@@ -626,7 +626,7 @@
std::unique_ptr<MockRunningUserChecker> checker = std::make_unique<MockRunningUserChecker>();
checker->MockIsRoot(true);
std::unique_ptr<MockRunCmdHelper> runCmdHelper = std::make_unique<MockRunCmdHelper>();
- runCmdHelper->MockCmdOutput("/usr/bin/lshw -json", DCGM_ST_OK, lshwSingleCpuAbridgedValidJson);
+ runCmdHelper->MockCmdOutput("@lshw@/bin/lshw -json", DCGM_ST_OK, lshwSingleCpuAbridgedValidJson);
LsHw lshw;
lshw.SetChecker(std::move(checker));
@@ -642,7 +642,7 @@
std::unique_ptr<MockRunningUserChecker> checker = std::make_unique<MockRunningUserChecker>();
checker->MockIsRoot(true);
std::unique_ptr<MockRunCmdHelper> runCmdHelper = std::make_unique<MockRunCmdHelper>();
- runCmdHelper->MockCmdOutput("/usr/bin/lshw -json", DCGM_ST_OK, lshwSingleCpuNoSerialNumberAbridgedValidJson);
+ runCmdHelper->MockCmdOutput("@lshw@/bin/lshw -json", DCGM_ST_OK, lshwSingleCpuNoSerialNumberAbridgedValidJson);
LsHw lshw;
lshw.SetChecker(std::move(checker));
@@ -658,7 +658,7 @@
std::unique_ptr<MockRunningUserChecker> checker = std::make_unique<MockRunningUserChecker>();
checker->MockIsRoot(true);
std::unique_ptr<MockRunCmdHelper> runCmdHelper = std::make_unique<MockRunCmdHelper>();
- runCmdHelper->MockCmdOutput("/usr/bin/lshw -json", DCGM_ST_OK, lshwSingleNonNvidiaCpuAbridgedValidJson);
+ runCmdHelper->MockCmdOutput("@lshw@/bin/lshw -json", DCGM_ST_OK, lshwSingleNonNvidiaCpuAbridgedValidJson);
LsHw lshw;
lshw.SetChecker(std::move(checker));
@@ -673,7 +673,7 @@
std::unique_ptr<MockRunningUserChecker> checker = std::make_unique<MockRunningUserChecker>();
checker->MockIsRoot(true);
std::unique_ptr<MockRunCmdHelper> runCmdHelper = std::make_unique<MockRunCmdHelper>();
- runCmdHelper->MockCmdOutput("/usr/bin/lshw -json", DCGM_ST_OK, lshwIncorrectIdValueTypeJson);
+ runCmdHelper->MockCmdOutput("@lshw@/bin/lshw -json", DCGM_ST_OK, lshwIncorrectIdValueTypeJson);
LsHw lshw;
lshw.SetChecker(std::move(checker));
@@ -687,7 +687,7 @@
std::unique_ptr<MockRunningUserChecker> checker = std::make_unique<MockRunningUserChecker>();
checker->MockIsRoot(true);
std::unique_ptr<MockRunCmdHelper> runCmdHelper = std::make_unique<MockRunCmdHelper>();
- runCmdHelper->MockCmdOutput("/usr/bin/lshw -json", DCGM_ST_OK, lshwMissingCpuJson);
+ runCmdHelper->MockCmdOutput("@lshw@/bin/lshw -json", DCGM_ST_OK, lshwMissingCpuJson);
LsHw lshw;
lshw.SetChecker(std::move(checker));
@@ -702,7 +702,7 @@
std::unique_ptr<MockRunningUserChecker> checker = std::make_unique<MockRunningUserChecker>();
checker->MockIsRoot(true);
std::unique_ptr<MockRunCmdHelper> runCmdHelper = std::make_unique<MockRunCmdHelper>();
- runCmdHelper->MockCmdOutput("/usr/bin/lshw -json", DCGM_ST_OK, lshwBadSyntaxJson);
+ runCmdHelper->MockCmdOutput("@lshw@/bin/lshw -json", DCGM_ST_OK, lshwBadSyntaxJson);
LsHw lshw;
lshw.SetChecker(std::move(checker));
@@ -716,6 +716,7 @@
{
SECTION("Will try /usr/sbin/")
{
+ SKIP("Nixpkgs patches this out");
std::unique_ptr<MockRunningUserChecker> checker = std::make_unique<MockRunningUserChecker>();
checker->MockIsRoot(true);
std::unique_ptr<MockRunCmdHelper> runCmdHelper = std::make_unique<MockRunCmdHelper>();
@@ -730,4 +731,4 @@
REQUIRE(cpuSerials.value()[0] == "0x000000017820B1C80400000015FF81C0");
REQUIRE(cpuSerials.value()[1] == "0x000000017820B1C8040000000A0200C0");
}
-}
\ No newline at end of file
+}
diff --git a/modules/diag/DcgmDiagManager.cpp b/modules/diag/DcgmDiagManager.cpp
index d0a75dcede..ccd4347719 100644
--- a/modules/diag/DcgmDiagManager.cpp
+++ b/modules/diag/DcgmDiagManager.cpp
@@ -253,7 +253,7 @@
int result;
// Default NVVS binary path
- cmd = "/usr/libexec/datacenter-gpu-manager-4/nvvs";
+ cmd = "@dcgm_out@/libexec/datacenter-gpu-manager-4/nvvs";
// Check for NVVS binary path enviroment variable
value = std::getenv("NVVS_BIN_PATH");
diff --git a/modules/mndiag/dcgm_mndiag_structs.hpp b/modules/mndiag/dcgm_mndiag_structs.hpp
index 40e61a8fd0..7e43ce8bed 100644
--- a/modules/mndiag/dcgm_mndiag_structs.hpp
+++ b/modules/mndiag/dcgm_mndiag_structs.hpp
@@ -33,8 +33,8 @@
constexpr std::string_view ENV_ALLOW_RUN_AS_ROOT = "DCGM_MPIRUN_ALLOW_RUN_AS_ROOT";
// Default paths
-constexpr std::string_view DEFAULT_MPIRUN_PATH = "/usr/bin/mpirun";
-constexpr std::string_view DEFAULT_MNUBERGEMM_PATH = "/usr/libexec/datacenter-gpu-manager-4/plugins/cuda12/mnubergemm";
+constexpr std::string_view DEFAULT_MPIRUN_PATH = "@mpi@/bin/mpirun";
+constexpr std::string_view DEFAULT_MNUBERGEMM_PATH = "@dcgm_out@/libexec/datacenter-gpu-manager-4/plugins/cuda12/mnubergemm";
} //namespace MnDiagConstants
// Message types
diff --git a/modules/mndiag/tests/MnDiagManagerTests.cpp b/modules/mndiag/tests/MnDiagManagerTests.cpp
index 40dbda3b72..5ec8dafa1c 100644
--- a/modules/mndiag/tests/MnDiagManagerTests.cpp
+++ b/modules/mndiag/tests/MnDiagManagerTests.cpp
@@ -2228,7 +2228,7 @@
mockStateMachine->SetMnubergemmPathCallback([&capturedPath](std::string const &path) { capturedPath = path; });
// Set env to custom path
- std::string customPath = "/bin/true";
+ std::string customPath = "@coreutils@/bin/true";
setenv(MnDiagConstants::ENV_MNUBERGEMM_PATH.data(), customPath.c_str(), 1);
auto mockCoreProxy = std::make_unique<MockDcgmCoreProxy>();
@@ -3112,7 +3112,7 @@
{
// Save current environment state
auto savedPath = saveEnvVar(MnDiagConstants::ENV_MNUBERGEMM_PATH.data());
- std::string customPath = "/bin/true";
+ std::string customPath = "@coreutils@/bin/true";
setenv(MnDiagConstants::ENV_MNUBERGEMM_PATH.data(), customPath.c_str(), 1);
// Setup mock DCGM API with callback to inspect request
@@ -3251,7 +3251,7 @@
auto savedPath = saveEnvVar(MnDiagConstants::ENV_MNUBERGEMM_PATH.data());
// Use a known executable that exists
- std::string customPath = "/bin/true";
+ std::string customPath = "@coreutils@/bin/true";
setenv(MnDiagConstants::ENV_MNUBERGEMM_PATH.data(), customPath.c_str(), 1);
// Call the method and verify path
diff --git a/modules/mndiag/tests/MnDiagProcessUtilsTests.cpp b/modules/mndiag/tests/MnDiagProcessUtilsTests.cpp
index 633e327c42..168ed91db2 100644
--- a/modules/mndiag/tests/MnDiagProcessUtilsTests.cpp
+++ b/modules/mndiag/tests/MnDiagProcessUtilsTests.cpp
@@ -71,7 +71,7 @@
{
// Start a long-running process
DcgmNs::Common::Subprocess::ChildProcessBuilder builder;
- builder.SetExecutable("/bin/sleep").AddArg("0.5");
+ builder.SetExecutable("@coreutils@/bin/sleep").AddArg("0.5");
IoContext ioContext {};
auto process = std::make_unique<DcgmNs::Common::Subprocess::ChildProcess>(builder.Build(ioContext));
@@ -155,4 +155,4 @@
REQUIRE(result.empty());
}
-}
\ No newline at end of file
+}
diff --git a/modules/mndiag/tests/MpiRunnerTests.cpp b/modules/mndiag/tests/MpiRunnerTests.cpp
index 526c80fd47..1e8596d3b7 100755
--- a/modules/mndiag/tests/MpiRunnerTests.cpp
+++ b/modules/mndiag/tests/MpiRunnerTests.cpp
@@ -60,7 +60,7 @@
std::string GetMpiBinPath() const override
{
- return "/bin/bash";
+ return "@shell@";
}
private:
@@ -138,9 +138,9 @@
runner.ConstructMpiCommand(&config);
// Verify command construction
- REQUIRE(runner.GetMpiBinPath() == "/bin/bash");
+ REQUIRE(runner.GetMpiBinPath() == "@shell@");
std::string fullCommand = runner.GetLastCommand();
- REQUIRE(fullCommand.find("/bin/bash -c") != std::string::npos);
+ REQUIRE(fullCommand.find("@shell@ -c") != std::string::npos);
REQUIRE(fullCommand.find("sleep 1") != std::string::npos);
REQUIRE(fullCommand.find("Output from sleep process") != std::string::npos);
@@ -244,4 +244,4 @@
// Test with invalid parameter (null pointer)
REQUIRE(runner.PopulateResponse(nullptr, nodeInfoMap_t()) == DCGM_ST_BADPARAM);
}
-}
\ No newline at end of file
+}
diff --git a/modules/sysmon/DcgmCpuTopology.cpp b/modules/sysmon/DcgmCpuTopology.cpp
index 786d3877fc..ccbeccc81d 100644
--- a/modules/sysmon/DcgmCpuTopology.cpp
+++ b/modules/sysmon/DcgmCpuTopology.cpp
@@ -136,7 +136,7 @@
{
static std::string cmd = "lscpu --json";
std::string cmdOutput;
- static std::array<std::string, 2> cmdPathPrefix = { "/usr/bin/", "/usr/sbin/" };
+ static std::array<std::string, 1> cmdPathPrefix = { "@util-linux@/bin/" };
dcgmReturn_t result = DCGM_ST_OK;
for (auto const &prefix : cmdPathPrefix)
diff --git a/nvvs/plugin_src/nvbandwidth/NVBandwidthPlugin.cpp b/nvvs/plugin_src/nvbandwidth/NVBandwidthPlugin.cpp
index 261bba4490..4d439ad452 100644
--- a/nvvs/plugin_src/nvbandwidth/NVBandwidthPlugin.cpp
+++ b/nvvs/plugin_src/nvbandwidth/NVBandwidthPlugin.cpp
@@ -238,7 +238,7 @@
std::vector<std::string> const search_paths
= { GetCurrentModuleLocation(),
fmt::format("./apps/nvvs/plugins/cuda{}", m_cudaDriverMajorVersion),
- fmt::format("/usr/libexec/datacenter-gpu-manager-4/plugins/cuda{}", m_cudaDriverMajorVersion),
+ fmt::format("@dcgm_out@/libexec/datacenter-gpu-manager-4/plugins/cuda{}", m_cudaDriverMajorVersion),
GetNvvsBinCheckPath(m_cudaDriverMajorVersion) };
std::stringstream path_buf;
diff --git a/testing/TestDiagManager.cpp b/testing/TestDiagManager.cpp
index 8087123a49..a6333b3a3d 100644
--- a/testing/TestDiagManager.cpp
+++ b/testing/TestDiagManager.cpp
@@ -236,7 +236,7 @@
if (nvvsPathEnv)
nvvsBinPath = std::string(nvvsPathEnv) + "/nvvs";
else
- nvvsBinPath = "/usr/libexec/datacenter-gpu-manager-4/nvvs";
+ nvvsBinPath = "@dcgm_out@/libexec/datacenter-gpu-manager-4/nvvs";
std::string diagResponseVersionArg = fmt::format("--response-version {}", dcgmDiagResponse_version12);
expected.push_back(nvvsBinPath + " --channel-fd 3 " + diagResponseVersionArg

View File

@@ -0,0 +1,177 @@
{
lib,
stdenv,
fetchFromGitHub,
autoAddDriverRunpath,
catch2_3,
cmake,
ctestCheckHook,
coreutils,
mpi,
mpiCheckPhaseHook,
ninja,
cudaPackages_12,
boost186,
fmt_10,
git,
jsoncpp,
libevent,
lshw,
plog,
python3,
replaceVars,
symlinkJoin,
tclap_1_4,
util-linux,
yaml-cpp,
}:
let
# DCGM can depend on multiple versions of CUDA at the same time.
# The runtime closure, thankfully, is quite small as it does not
# include the CUDA libraries.
cudaPackageSets = [
cudaPackages_12
];
# Select needed redist packages from cudaPackages
# C.f. https://github.com/NVIDIA/DCGM/blob/7e1012302679e4bb7496483b32dcffb56e528c92/dcgmbuild/scripts/0080_cuda.sh#L24-L39
getCudaPackages =
p: with p; [
cuda_cccl
cuda_cudart
cuda_nvcc
cuda_nvml_dev
libcublas
libcufft
libcurand
];
# Builds CMake flags to add CUDA paths for include and lib.
mkCudaFlags =
cudaPackages:
let
version = cudaPackages.cudaMajorVersion;
# The DCGM CMake assumes that the folder containing cuda.h contains all headers, so we must
# combine everything together for headers to work.
headers = symlinkJoin {
name = "cuda-headers-combined-${version}";
paths = lib.map (pkg: "${lib.getInclude pkg}/include") (getCudaPackages cudaPackages);
};
in
[
(lib.cmakeFeature "CUDA${version}_INCLUDE_DIR" "${headers}")
(lib.cmakeFeature "CUDA${version}_LIBS" "${cudaPackages.cuda_cudart.stubs}/lib/stubs/libcuda.so")
(lib.cmakeFeature "CUDA${version}_STATIC_LIBS" "${lib.getLib cudaPackages.cuda_cudart}/lib/libcudart.so")
(lib.cmakeFeature "CUDA${version}_STATIC_CUBLAS_LIBS" (
lib.concatStringsSep ";" [
"${lib.getLib cudaPackages.libcublas}/lib/libcublas.so"
"${lib.getLib cudaPackages.libcublas}/lib/libcublasLt.so"
]
))
];
in
stdenv.mkDerivation {
pname = "dcgm";
version = "4.3.1"; # N.B: If you change this, be sure prometheus-dcgm-exporter supports this version.
src = fetchFromGitHub {
owner = "NVIDIA";
repo = "DCGM";
# No tag for 4.3.1 yet.
#tag = "v${version}";
rev = "1477d8785e899ab3450fdff2b486102e9bed096b";
hash = "sha256-FebqG28aodENGLNBBbiGpckzzeuP+y44dCALtYnN1yU=";
};
patches = [
./remove-cuda-11.patch
./dynamic-libs.patch
(replaceVars ./fix-paths.patch {
inherit coreutils;
inherit util-linux;
inherit lshw;
inherit mpi;
inherit (stdenv) shell;
dcgm_out = null;
})
];
hardeningDisable = [ "all" ];
strictDeps = true;
nativeBuildInputs = [
# autoAddDriverRunpath does not actually depend on or incur any dependency
# of cudaPackages. It merely adds an impure, non-Nix PATH to the RPATHs of
# executables that need to use cuda at runtime.
autoAddDriverRunpath
cmake
ninja
git
python3
];
buildInputs = [
# Header-only
boost186
catch2_3
plog.dev
tclap_1_4
fmt_10
yaml-cpp
jsoncpp
libevent
];
nativeCheckInputs = [
mpi
ctestCheckHook
mpiCheckPhaseHook
];
disabledTests = [
# Fail due to lack of `/sys` in the sandbox.
"DcgmModuleSysmon::PauseResume Module resumed after initialization"
"DcgmModuleSysmon PauseResume Module rejects invalid messages"
"DcgmModuleSysmon PauseResume Module accepts valid messages"
"DcgmModuleSysmon Watches"
"DcgmModuleSysmon maxSampleAge"
"DcgmModuleSysmon::CalculateCoreUtilization"
"DcgmModuleSysmon::ParseProcStatCpuLine"
"DcgmModuleSysmon::ParseThermalFileContentsAndStore"
"DcgmModuleSysmon::PopulateTemperatureFileMap"
"DcgmModuleSysmon::ReadCoreSpeed"
"DcgmModuleSysmon::ReadTemperature"
"Sysmon: initialize module"
];
# Add our paths to the CMake flags so FindCuda.cmake can find them.
cmakeFlags = lib.concatMap mkCudaFlags cudaPackageSets;
# Lots of dodgy C++.
env.NIX_CFLAGS_COMPILE = "-Wno-error";
doCheck = true;
dontUseNinjaCheck = true;
postPatch = ''
while read -r -d "" file; do
substituteInPlace "$file" --replace-quiet @dcgm_out@ "$out"
done < <(find . '(' -name '*.h' -or -name '*.cpp' ')' -print0)
'';
disallowedReferences = lib.concatMap getCudaPackages cudaPackageSets;
__structuredAttrs = true;
meta = with lib; {
description = "Data Center GPU Manager (DCGM) is a daemon that allows users to monitor NVIDIA data-center GPUs";
homepage = "https://developer.nvidia.com/dcgm";
license = licenses.asl20;
teams = [ teams.deshaw ];
mainProgram = "dcgmi";
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,289 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 11317ae20f..7a6b1d5b75 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -269,10 +269,8 @@
add_library(testing_dcgm_cublas_stubs STATIC)
endif()
-add_executable(BwChecker_11)
add_executable(BwChecker_12)
add_executable(dcgmi)
-add_executable(dcgmproftester11)
add_executable(dcgmproftester12)
add_executable(nv-hostengine)
add_executable(nvvs)
@@ -327,9 +325,7 @@
add_library(childprocess STATIC)
add_library(common_watch_objects STATIC)
add_library(dcgm_common STATIC)
-add_library(dcgm_cuda_worker11 STATIC)
add_library(dcgm_cuda_worker12 STATIC)
-add_library(dcgm_cuda_lib11 STATIC)
add_library(dcgm_cuda_lib12 STATIC)
add_library(dcgm_entity_types STATIC)
add_library(dcgm_logging STATIC)
@@ -342,7 +338,6 @@
add_library(nvvs_without_main_objects OBJECT)
add_library(nvvs_main_objects OBJECT)
add_library(nvvs_plugins_common_objects OBJECT)
-add_library(pluginCudaCommon_11 STATIC)
add_library(pluginCudaCommon_12 STATIC)
add_library(remoteconn STATIC)
add_library(sdk_nvml_essentials_objects STATIC)
@@ -368,24 +363,16 @@
add_library(dcgmmodulepolicy SHARED)
add_library(dcgmmodulesysmon SHARED)
-add_library(ContextCreate_11 SHARED)
add_library(ContextCreate_12 SHARED)
-add_library(Diagnostic_11 SHARED)
add_library(Diagnostic_12 SHARED)
-add_library(Memory_11 SHARED)
add_library(Memory_12 SHARED)
-add_library(Memtest_11 SHARED)
add_library(Memtest_12 SHARED)
add_library(NVBandwidth_12 SHARED)
-add_library(Pcie_11 SHARED)
add_library(Pcie_12 SHARED)
-add_library(TargetedPower_11 SHARED)
add_library(TargetedPower_12 SHARED)
-add_library(TargetedStress_11 SHARED)
add_library(TargetedStress_12 SHARED)
add_library(dcgm SHARED)
-add_library(dcgm_cublas_proxy11 SHARED)
add_library(dcgm_cublas_proxy12 SHARED)
add_library(pluginCommon SHARED)
@@ -395,20 +382,13 @@
add_library(DCGM::dcgm ALIAS dcgm)
set_target_properties(
- ContextCreate_11
ContextCreate_12
- Diagnostic_11
Diagnostic_12
- Memory_11
Memory_12
- Memtest_11
Memtest_12
NVBandwidth_12
- Pcie_11
Pcie_12
- TargetedPower_11
TargetedPower_12
- TargetedStress_11
TargetedStress_12
dcgm
dcgmmoduleconfig
@@ -419,7 +399,6 @@
dcgmmodulenvswitch
dcgmmodulepolicy
dcgmmodulesysmon
- dcgm_cublas_proxy11
dcgm_cublas_proxy12
pluginCommon
PROPERTIES
@@ -433,7 +412,6 @@
RUNTIME_OUTPUT_DIRECTORY nvvs)
set_target_properties(
- BwChecker_11
BwChecker_12
PROPERTIES
INSTALL_RPATH "${DCGM_RPATH}:$ORIGIN/../../../${DCGM_TESTS_ARCH}")
@@ -441,27 +419,19 @@
set_target_properties(dcgmi PROPERTIES RUNTIME_OUTPUT_DIRECTORY dcgmi)
set_target_properties(
- ContextCreate_11
ContextCreate_12
- Diagnostic_11
Diagnostic_12
- Memory_11
Memory_12
- Memtest_11
Memtest_12
NVBandwidth_12
- Pcie_11
Pcie_12
- TargetedPower_11
TargetedPower_12
- TargetedStress_11
TargetedStress_12
nvml_injection
nvmli_public
nvvs_without_main_objects
nvvs_plugins_common_objects
pluginCommon
- pluginCudaCommon_11
pluginCudaCommon_12
PROPERTIES
C_VISIBILITY_PRESET default
@@ -594,18 +564,6 @@
COMPONENT Core)
install(
- TARGETS
- dcgm_cublas_proxy11
- dcgmproftester11
- LIBRARY
- DESTINATION "${CMAKE_INSTALL_LIBDIR}"
- COMPONENT Cuda11
- NAMELINK_SKIP
- RUNTIME
- DESTINATION "${CMAKE_INSTALL_BINDIR}"
- COMPONENT Cuda11)
-
-install(
TARGETS pluginCommon
LIBRARY
DESTINATION "${CMAKE_INSTALL_LIBEXECDIR}/${PROJECT_NAME}/plugins/cudaless"
@@ -618,29 +576,6 @@
LIBRARY
DESTINATION "${CMAKE_INSTALL_LIBEXECDIR}/${PROJECT_NAME}/plugins/cudaless"
COMPONENT Core)
-
-install(
- TARGETS
- BwChecker_11
- ContextCreate_11
- Diagnostic_11
- Memory_11
- Memtest_11
- Pcie_11
- TargetedPower_11
- TargetedStress_11
- LIBRARY
- DESTINATION "${CMAKE_INSTALL_LIBEXECDIR}/${PROJECT_NAME}/plugins/cuda11"
- PERMISSIONS
- OWNER_READ OWNER_WRITE OWNER_EXECUTE
- GROUP_READ GROUP_EXECUTE
- WORLD_READ WORLD_EXECUTE
- COMPONENT Cuda11
- NAMELINK_SKIP
- RUNTIME
- DESTINATION "${CMAKE_INSTALL_LIBEXECDIR}/${PROJECT_NAME}/plugins/cuda11"
- COMPONENT Cuda11)
-
install(
TARGETS
dcgm_cublas_proxy12
@@ -686,7 +621,6 @@
install(
TARGETS
dcgm
- dcgm_cublas_proxy11
dcgm_cublas_proxy12
dcgmi
dcgmmoduleconfig
@@ -697,7 +631,6 @@
dcgmmodulenvswitch
dcgmmodulepolicy
dcgmmodulesysmon
- dcgmproftester11
dcgmproftester12
nv-hostengine
nvml_injection
@@ -725,28 +658,6 @@
install(
TARGETS
- BwChecker_11
- ContextCreate_11
- Diagnostic_11
- Memory_11
- Memtest_11
- Pcie_11
- TargetedPower_11
- TargetedStress_11
- LIBRARY
- DESTINATION "${CMAKE_INSTALL_DATADIR}/dcgm_tests/apps/nvvs/plugins/cuda11"
- PERMISSIONS
- OWNER_READ OWNER_WRITE OWNER_EXECUTE
- GROUP_READ GROUP_EXECUTE
- WORLD_READ WORLD_EXECUTE
- COMPONENT Tests
- NAMELINK_SKIP
- RUNTIME
- DESTINATION "${CMAKE_INSTALL_DATADIR}/dcgm_tests/apps/nvvs/plugins/cuda11"
- COMPONENT Tests)
-
-install(
- TARGETS
BwChecker_12
ContextCreate_12
Diagnostic_12
diff --git a/cmake/FindCuda.cmake b/cmake/FindCuda.cmake
index 3c1769597a..cf3e54d332 100644
--- a/cmake/FindCuda.cmake
+++ b/cmake/FindCuda.cmake
@@ -94,10 +94,6 @@
endmacro()
-if (NOT DEFINED CUDA11_INCLUDE_DIR)
- load_cuda(11)
-endif()
-
if (NOT DEFINED CUDA12_INCLUDE_DIR)
load_cuda(12)
endif()
diff --git a/common/CudaLib/CMakeLists.txt b/common/CudaLib/CMakeLists.txt
index 0b2b0e0217..ea6fd17d8d 100644
--- a/common/CudaLib/CMakeLists.txt
+++ b/common/CudaLib/CMakeLists.txt
@@ -40,7 +40,6 @@
CudaLib.h)
endmacro()
-define_dcgm_cuda_lib(11)
define_dcgm_cuda_lib(12)
target_include_directories(cuda_lib_base_interface INTERFACE
diff --git a/common/CudaWorker/CMakeLists.txt b/common/CudaWorker/CMakeLists.txt
index 958ace542f..f2c6ae748e 100644
--- a/common/CudaWorker/CMakeLists.txt
+++ b/common/CudaWorker/CMakeLists.txt
@@ -35,5 +35,4 @@
DcgmDgemm.cpp)
endmacro()
-define_dcgm_cuda_worker(11)
define_dcgm_cuda_worker(12)
diff --git a/cublas_proxy/CMakeLists.txt b/cublas_proxy/CMakeLists.txt
index 90dff9e0d2..fe6dd40861 100755
--- a/cublas_proxy/CMakeLists.txt
+++ b/cublas_proxy/CMakeLists.txt
@@ -38,5 +38,4 @@
rt)
endmacro()
-add_subdirectory(Cuda11)
add_subdirectory(Cuda12)
diff --git a/dcgmproftester/CMakeLists.txt b/dcgmproftester/CMakeLists.txt
index 9d18940bf1..97aa78321f 100755
--- a/dcgmproftester/CMakeLists.txt
+++ b/dcgmproftester/CMakeLists.txt
@@ -62,7 +62,6 @@
${COMMON_SRCS})
endmacro()
-define_dcgmproftester(11)
define_dcgmproftester(12)
install(
diff --git a/nvvs/plugin_src/CMakeLists.txt b/nvvs/plugin_src/CMakeLists.txt
index 21d0131c4a..5a3d371c29 100644
--- a/nvvs/plugin_src/CMakeLists.txt
+++ b/nvvs/plugin_src/CMakeLists.txt
@@ -71,7 +71,7 @@
target_link_libraries(nvvs_plugins INTERFACE "${PLUGIN_NAME}_${CUDA_VER}")
endmacro()
-set(SUPPORTED_CUDA_VERSIONS 11 12)
+set(SUPPORTED_CUDA_VERSIONS 12)
add_subdirectory(common)
add_subdirectory(contextcreate)

View File

@@ -0,0 +1,43 @@
{
lib,
stdenv,
fetchFromGitHub,
haskellPackages,
}:
haskellPackages.mkDerivation {
pname = "dclock";
version = "0.1.0";
src = fetchFromGitHub {
owner = "travgm";
repo = "dclock";
rev = "main";
sha256 = "sha256-IJsbEg1dFiyIJSlVWy8x+tsa49YxLK8mNkJESFyUQoU=";
};
isLibrary = false;
isExecutable = true;
jailbreak = true;
doCheck = false;
executableHaskellDepends = with haskellPackages; [
base
QuickCheck
ansi-terminal
hspec
hspec-discover
lens
machines
optparse-applicative
text
time
process
];
description = "Decimal clock that breaks your day into a 1000 decimal minutes";
homepage = "https://github.com/travgm/dclock";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ travgm ];
mainProgram = "dclock";
}

View File

@@ -0,0 +1,41 @@
{
lib,
stdenv,
fetchFromGitHub,
}:
stdenv.mkDerivation {
pname = "dclxvi";
version = "0-unstable-2013-01-27";
src = fetchFromGitHub {
owner = "agl";
repo = "dclxvi";
rev = "74009d58f2305be3b95d88717619bde8ecbdd9a2";
sha256 = "1kx4h8iv7yb30c6zjmj8zs9x12vxhi0jwkiwxsxj9swf6bww6p1g";
};
buildFlags = [ "libdclxvipairing.so" ];
patchPhase = ''
substituteInPlace Makefile \
--replace "gcc" "cc"
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace Makefile \
--replace "-soname=libdclxvipairing.so" "-install_name,libdclxvipairing.so"
'';
installPhase = ''
mkdir -p $out/{include,lib}
find . -name \*.h -exec cp {} $out/include \;
find . -name \*.so -exec cp {} $out/lib \;
'';
meta = with lib; {
homepage = "https://github.com/agl/dclxvi";
description = "Naehrig, Niederhagen and Schwabe's pairings code, massaged into a shared library";
platforms = platforms.x86_64;
license = licenses.publicDomain;
};
}

View File

@@ -0,0 +1,25 @@
diff --git a/SuperBuild/External-CLOUDFLARE-ZLIB.cmake b/SuperBuild/External-CLOUDFLARE-ZLIB.cmake
index 9f064eb..fe74df5 100644
--- a/SuperBuild/External-CLOUDFLARE-ZLIB.cmake
+++ b/SuperBuild/External-CLOUDFLARE-ZLIB.cmake
@@ -1,8 +1,5 @@
-set(CLOUDFLARE_BRANCH gcc.amd64) # Cloudflare zlib branch
-
ExternalProject_Add(zlib
- GIT_REPOSITORY "https://github.com/ningfei/zlib.git"
- GIT_TAG "${CLOUDFLARE_BRANCH}"
+ URL file://@cloudflareZlib@
SOURCE_DIR cloudflare-zlib
BINARY_DIR cloudflare-zlib-build
CMAKE_ARGS
diff --git a/SuperBuild/SuperBuild.cmake b/SuperBuild/SuperBuild.cmake
index 2a0a956..81354a7 100644
--- a/SuperBuild/SuperBuild.cmake
+++ b/SuperBuild/SuperBuild.cmake
@@ -1,6 +1,1 @@
-# Check if git exists
-find_package(Git)
-if(NOT GIT_FOUND)
- message(FATAL_ERROR "Cannot find Git. Git is required for Superbuild")
-endif()

View File

@@ -0,0 +1,92 @@
{
lib,
stdenv,
fetchFromGitHub,
makeBinaryWrapper,
replaceVars,
cmake,
openjpeg,
pigz,
yaml-cpp,
batchVersion ? false,
withJpegLs ? true,
withOpenJpeg ? true,
withPigz ? true,
withCloudflareZlib ? true,
}:
let
cloudflareZlib = fetchFromGitHub {
owner = "ningfei";
repo = "zlib";
# HEAD revision of the gcc.amd64 branch on 2025-01-05. Reminder to update
# whenever bumping package version.
rev = "1cb075520d254005cde193982f1856b877fd39d8";
hash = "sha256-1+V7XwYOYqSzcFK86V+gDILGwAqKGQ+HSlXphWtqSvk=";
};
in
stdenv.mkDerivation (finalAttrs: {
version = "1.0.20241211";
pname = "dcm2niix";
src = fetchFromGitHub {
owner = "rordenlab";
repo = "dcm2niix";
tag = "v${finalAttrs.version}";
hash = "sha256-NpvtMCcyVfYlnvXjyvTDsa71IxUhi8FepX82qRSG7TA=";
};
patches = lib.optionals withCloudflareZlib [
(replaceVars ./dont-fetch-external-libs.patch {
inherit cloudflareZlib;
})
];
nativeBuildInputs = [
cmake
makeBinaryWrapper
];
buildInputs =
lib.optionals batchVersion [ yaml-cpp ]
++ lib.optionals withOpenJpeg [
openjpeg
openjpeg.dev
];
cmakeFlags =
lib.optionals batchVersion [
"-DBATCH_VERSION=ON"
"-DYAML-CPP_DIR=${yaml-cpp}/lib/cmake/yaml-cpp"
]
++ lib.optionals withJpegLs [
"-DUSE_JPEGLS=ON"
]
++ lib.optionals withOpenJpeg [
"-DUSE_OPENJPEG=ON"
"-DOpenJPEG_DIR=${openjpeg}/lib/${openjpeg.pname}-${lib.versions.majorMinor openjpeg.version}"
]
++ lib.optionals withCloudflareZlib [
"-DZLIB_IMPLEMENTATION=Cloudflare"
];
postInstall = lib.optionalString withPigz ''
wrapProgram $out/bin/dcm2niix --prefix PATH : "${lib.makeBinPath [ pigz ]}"
'';
meta = {
description = "DICOM to NIfTI converter";
mainProgram = "dcm2niix";
longDescription = ''
dcm2niix is designed to convert neuroimaging data from the DICOM format to the NIfTI format.
'';
homepage = "https://www.nitrc.org/projects/dcm2nii";
changelog = "https://github.com/rordenlab/dcm2niix/releases/tag/v${finalAttrs.version}";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [
ashgillman
rbreslow
];
platforms = lib.platforms.all;
};
})

View File

@@ -0,0 +1,105 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchurl,
zlib,
libtiff,
libxml2,
openssl,
libiconv,
libpng,
cmake,
}:
stdenv.mkDerivation rec {
pname = "dcmtk";
version = "3.6.9";
src = fetchFromGitHub {
owner = "DCMTK";
repo = "dcmtk";
tag = "DCMTK-${version}";
hash = "sha256-mdI/YqM38WhnCbsylIlmqLLWC5/QR+a8Wn9CNcN7KXU=";
};
# The following patches are taken from the Debian package
# See https://salsa.debian.org/med-team/dcmtk
patches = [
(fetchurl {
url = "https://salsa.debian.org/med-team/dcmtk/-/raw/debian/3.6.9-4/debian/patches/01_dcmtk_3.6.0-1.patch";
hash = "sha256-kDEZvPqcF8+PYID24srMoPSBPltmnGiJ67LHsLVcPYM=";
})
(fetchurl {
url = "https://salsa.debian.org/med-team/dcmtk/-/raw/debian/3.6.9-4/debian/patches/07_dont_export_all_executables.patch";
hash = "sha256-5slFod+S7Yuj0u2CfTUw+MWZYuqQs4hgoGmh3KAUo+c=";
})
(fetchurl {
url = "https://salsa.debian.org/med-team/dcmtk/-/raw/debian/3.6.9-4/debian/patches/remove_version.patch";
hash = "sha256-jcV2xQzKdNiBgcaFtaxdJpJCCSVOqGIsi/A4iqVM8U8=";
})
(fetchurl {
url = "https://salsa.debian.org/med-team/dcmtk/-/raw/debian/3.6.9-4/debian/patches/0007-CVE-2024-47796.patch";
hash = "sha256-QYWgSbyIcOq3CVg2ynVSPCHBIrDj9uqX4ese1huoOoU=";
})
(fetchurl {
url = "https://salsa.debian.org/med-team/dcmtk/-/raw/debian/3.6.9-4/debian/patches/0008-CVE-2024-52333.patch";
hash = "sha256-/4NdauuH0v6CPMh+duMM91wWfylp6l4L2LTO80dDh9g=";
})
(fetchurl {
url = "https://salsa.debian.org/med-team/dcmtk/-/raw/debian/3.6.9-4/debian/patches/0009-CVE-2025-25475.patch";
hash = "sha256-ApuVw6aBoasuVlJ3fh/aufB2WRm2hFgLYCq1k3MPrsU=";
})
(fetchurl {
url = "https://salsa.debian.org/med-team/dcmtk/-/raw/debian/3.6.9-4/debian/patches/0010-CVE-2025-25474.patch";
hash = "sha256-aX8em1o88ND4srsYkG696elPsAIlvkRRZMT8wzD2GdQ=";
})
(fetchurl {
url = "https://salsa.debian.org/med-team/dcmtk/-/raw/debian/3.6.9-4/debian/patches/0011-CVE-2025-25472.patch";
hash = "sha256-o3/PykJFbYlasAFgPNWp09hRuH183tQuvGuaOV4MOoo=";
})
];
nativeBuildInputs = [ cmake ];
buildInputs = [
libpng
zlib
libtiff
libxml2
openssl
libiconv
];
cmakeFlags = [
(lib.cmakeFeature "CMAKE_CXX_STANDARD" "17")
(lib.cmakeBool "CMAKE_SKIP_RPATH" true)
"-DCMAKE_VERBOSE_MAKEFILE=ON"
(lib.cmakeBool "DCMTK_ENABLE_PRIVATE_TAGS" true)
(lib.cmakeBool "DCMTK_ENABLE_STL" true)
(lib.cmakeBool "DCMTK_WITH_ICONV" true)
(lib.cmakeBool "DCMTK_WITH_ICU" true)
(lib.cmakeBool "DCMTK_WITH_OPENSSL" true)
(lib.cmakeBool "DCMTK_WITH_TIFF" true)
(lib.cmakeBool "DCMTK_WITH_XML" true)
(lib.cmakeBool "DCMTK_WITH_ZLIB" true)
(lib.cmakeBool "USE_COMPILER_HIDDEN_VISIBILITY" true)
(lib.cmakeBool "BUILD_TESTING" false)
];
doCheck = true;
meta = {
description = "Collection of libraries and applications implementing large parts of the DICOM standard";
longDescription = ''
DCMTK is a collection of libraries and applications implementing large parts of the DICOM standard.
It includes software for examining, constructing and converting DICOM image files, handling offline media,
sending and receiving images over a network connection, as well as demonstrative image storage and worklist servers.
DCMTK is is written in a mixture of ANSI C and C++.
It comes in complete source code and is made available as "open source" software.
'';
homepage = "https://dicom.offis.de/dcmtk";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ iimog ];
platforms = with lib.platforms; linux ++ darwin;
};
}

View File

@@ -0,0 +1,81 @@
{
lib,
stdenv,
fetchurl,
fetchpatch,
desktop-file-utils,
meson,
ninja,
vala,
libxslt,
pkg-config,
glib,
gtk3,
libhandy,
gnome,
dconf,
libxml2,
gettext,
docbook-xsl-nons,
wrapGAppsHook3,
gobject-introspection,
}:
stdenv.mkDerivation rec {
pname = "dconf-editor";
version = "45.0.1";
src = fetchurl {
url = "mirror://gnome/sources/dconf-editor/${lib.versions.major version}/dconf-editor-${version}.tar.xz";
hash = "sha256-EYApdnju2uYhfMUUomOMGH0vHR7ycgy5B5t0DEKZQd0=";
};
patches = [
# Fix crash with GSETTINGS_SCHEMA_DIR env var.
(fetchpatch {
url = "https://gitlab.gnome.org/GNOME/dconf-editor/-/commit/baf183737d459dcde065c9f8f6fe5be7ed874de6.patch";
hash = "sha256-Vp0qjJChDr6IarUD+tZPLJhdI8v8r6EzWNfqFSnGvqQ=";
})
# Look for compiled schemas in NIX_GSETTINGS_OVERRIDES_DIR
# environment variable, to match what we patched GLib to do.
./schema-override-variable.patch
];
nativeBuildInputs = [
desktop-file-utils
meson
ninja
vala
libxslt
pkg-config
wrapGAppsHook3
gettext
docbook-xsl-nons
libxml2
gobject-introspection
];
buildInputs = [
glib
gtk3
libhandy
dconf
];
passthru = {
updateScript = gnome.updateScript {
packageName = "dconf-editor";
};
};
meta = {
description = "GSettings editor for GNOME";
mainProgram = "dconf-editor";
homepage = "https://apps.gnome.org/DconfEditor/";
changelog = "https://gitlab.gnome.org/GNOME/dconf-editor/-/blob/${version}/NEWS?ref_type=tags";
license = lib.licenses.gpl3Plus;
teams = [ lib.teams.gnome ];
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,14 @@
diff --git a/editor/source-manager.vala b/editor/source-manager.vala
index 27b2b17a..87f7ba86 100644
--- a/editor/source-manager.vala
+++ b/editor/source-manager.vala
@@ -121,6 +121,9 @@ private class SourceManager : Object
source = try_prepend_dir (source, Path.build_filename (system_data_dirs [i], "glib-2.0", "schemas"));
string user_data_dir = GLib.Environment.get_user_data_dir ();
source = try_prepend_dir (source, Path.build_filename (user_data_dir, "glib-2.0", "schemas"));
+ string? nix_var_schema_dir = GLib.Environment.get_variable ("NIX_GSETTINGS_OVERRIDES_DIR");
+ if (nix_var_schema_dir != null)
+ source = try_prepend_dir (source, (!) nix_var_schema_dir);
string? var_schema_dir = GLib.Environment.get_variable ("GSETTINGS_SCHEMA_DIR");
if (var_schema_dir != null) {
string[] extra_schema_dirs = ((!) var_schema_dir).split (Path.SEARCHPATH_SEPARATOR_S);

View File

@@ -0,0 +1,106 @@
{
lib,
stdenv,
fetchurl,
meson,
mesonEmulatorHook,
ninja,
python3,
vala,
libxslt,
pkg-config,
glib,
bash-completion,
dbus,
gnome,
gtk-doc,
docbook-xsl-nons,
docbook_xml_dtd_42,
nixosTests,
buildPackages,
gobject-introspection,
withIntrospection ?
lib.meta.availableOn stdenv.hostPlatform gobject-introspection
&& stdenv.hostPlatform.emulatorAvailable buildPackages,
withDocs ? withIntrospection,
}:
stdenv.mkDerivation rec {
pname = "dconf";
version = "0.40.0";
outputs = [
"out"
"lib"
"dev"
]
++ lib.optional withDocs "devdoc";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "0cs5nayg080y8pb9b7qccm1ni8wkicdmqp1jsgc22110r6j24zyg";
};
nativeBuildInputs = [
meson
ninja
pkg-config
python3
libxslt
glib
docbook-xsl-nons
docbook_xml_dtd_42
gtk-doc
]
++ lib.optionals (withDocs && !stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
mesonEmulatorHook # gtkdoc invokes the host binary to produce documentation
];
buildInputs = [
glib
bash-completion
dbus
]
++ lib.optionals withIntrospection [
vala
];
mesonFlags = [
"--sysconfdir=/etc"
(lib.mesonBool "gtk_doc" withDocs)
(lib.mesonBool "vapi" withIntrospection)
];
nativeCheckInputs = [
dbus # for dbus-daemon
];
doCheck =
!stdenv.hostPlatform.isAarch32 && !stdenv.hostPlatform.isAarch64 && !stdenv.hostPlatform.isDarwin;
postPatch = ''
chmod +x meson_post_install.py tests/test-dconf.py
patchShebangs meson_post_install.py
patchShebangs tests/test-dconf.py
'';
passthru = {
updateScript = gnome.updateScript {
packageName = pname;
versionPolicy = "odd-unstable";
};
tests = { inherit (nixosTests) dconf; };
};
meta = with lib; {
homepage = "https://gitlab.gnome.org/GNOME/dconf";
license = licenses.lgpl21Plus;
platforms = platforms.unix;
badPlatforms = [
# Mandatory libdconfsettings shared library.
lib.systems.inspect.platformPatterns.isStatic
];
teams = [ teams.gnome ];
mainProgram = "dconf";
};
}

View File

@@ -0,0 +1,55 @@
{
lib,
stdenv,
fetchurl,
libjpeg,
lcms2,
gettext,
libiconv,
}:
stdenv.mkDerivation rec {
pname = "dcraw";
version = "9.28.0";
src = fetchurl {
url = "https://www.dechifro.org/dcraw/archive/dcraw-${version}.tar.gz";
sha256 = "1fdl3xa1fbm71xzc3760rsjkvf0x5jdjrvdzyg2l9ka24vdc7418";
};
nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin libiconv;
buildInputs = [
libjpeg
lcms2
gettext
];
# Jasper is disabled because the library is abandoned and has many
# CVEs.
patchPhase = ''
substituteInPlace install \
--replace 'prefix=/usr/local' 'prefix=$out' \
--replace gcc '$CC' \
--replace '-ljasper' '-DNO_JASPER=1'
'';
buildPhase = ''
mkdir -p $out/bin
sh -e install
'';
meta = {
homepage = "https://www.dechifro.org/dcraw/";
description = "Decoder for many camera raw picture formats";
license = lib.licenses.free;
platforms = lib.platforms.unix; # Once had cygwin problems
maintainers = [ ];
knownVulnerabilities = [
"CVE-2018-19655"
"CVE-2018-19565"
"CVE-2018-19566"
"CVE-2018-19567"
"CVE-2018-19568"
];
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "dcrctl";
version = "1.8.0";
src = fetchFromGitHub {
owner = "decred";
repo = "dcrctl";
rev = "release-v${version}";
hash = "sha256-Nm1r3hHTlW5ob2CLKUgMjVsdzR2gxlFuT6Q3j0pPDSg=";
};
vendorHash = "sha256-Ry3wR2u+vr97icP9jwAVWcFO98JVDo9TrDg9D8hfv5I=";
ldflags = [
"-s"
"-w"
];
meta = {
homepage = "https://decred.org";
description = "Secure Decred wallet daemon written in Go (golang)";
license = with lib.licenses; [ isc ];
maintainers = [ ];
mainProgram = "dcrctl";
};
}

View File

@@ -0,0 +1,46 @@
{
lib,
buildGoModule,
fetchFromGitHub,
fetchpatch,
}:
buildGoModule rec {
pname = "dcrd";
version = "1.8.1";
src = fetchFromGitHub {
owner = "decred";
repo = "dcrd";
tag = "release-v${version}";
hash = "sha256-nSocqwXgJhvfbdElddbb1gGxoygmtVtK6DbiSuMxYew=";
};
patches = [
(fetchpatch {
name = "dcrd-appdata-env-variable.patch";
url = "https://github.com/decred/dcrd/pull/3152/commits/216132d7d852f3f2e2a6bf7f739f47ed62ac9387.patch";
hash = "sha256-R1GzP0qVP5XW1GnSJqFOpJVnwrVi/62tL1L2mc33+Dw=";
})
];
vendorHash = "sha256-Napcfj1+KjQ21Jb/qpIzg2W/grzun2Pz5FV5yIBXoTo=";
subPackages = [
"."
"cmd/promptsecret"
];
__darwinAllowLocalNetworking = true;
preCheck = ''
export DCRD_APPDATA="$TMPDIR"
'';
meta = {
homepage = "https://decred.org";
description = "Decred daemon in Go (golang)";
license = with lib.licenses; [ isc ];
maintainers = with lib.maintainers; [ juaningan ];
};
}

View File

@@ -0,0 +1,36 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "dcrwallet";
version = "2.0.6";
src = fetchFromGitHub {
owner = "decred";
repo = "dcrwallet";
rev = "release-v${version}";
hash = "sha256-MrQrDip8vE0l5XHkx/zIegSZd/AkWq1aFZLUVPdMy50=";
};
vendorHash = "sha256-Ulh6RxK+PvS70mJ7TYiGMzKFsR79+asWuQ5W1FAI23I=";
subPackages = [ "." ];
checkFlags = [
# Test fails with:
# 'x509_test.go:201: server did not report bad certificate error;
# instead errored with [...] tls: unknown certificate authority (*url.Error)'
"-skip=^TestUntrustedClientCert$"
];
meta = {
homepage = "https://decred.org";
description = "Secure Decred wallet daemon written in Go (golang)";
license = with lib.licenses; [ isc ];
maintainers = with lib.maintainers; [ juaningan ];
mainProgram = "dcrwallet";
};
}

View File

@@ -0,0 +1,47 @@
{
lib,
buildGoModule,
fetchFromGitHub,
yuicompressor,
zopfli,
stdenv,
}:
buildGoModule {
pname = "dcs";
version = "0-unstable-2021-04-07";
src = fetchFromGitHub {
owner = "Debian";
repo = "dcs";
rev = "da46accc4d55e9bfde1a6852ac5a9e730fcbbb2c";
hash = "sha256-N+6BXlKn1YTlh0ZdPNWa0nuJNcQtlUIc9TocM8cbzQk=";
};
vendorHash = "sha256-l2mziuisx0HzuP88rS5M+Wha6lu8P036wJYZlmzjWfs=";
# Depends on dcs binaries
doCheck = false;
nativeBuildInputs = [
yuicompressor
zopfli
];
postBuild = ''
make -C static -j$NIX_BUILD_CORES
'';
postInstall = ''
mkdir -p $out/share/dcs
cp -r cmd/dcs-web/templates $out/share/dcs
cp -r static $out/share/dcs
'';
meta = with lib; {
description = "Debian Code Search";
homepage = "https://github.com/Debian/dcs";
license = licenses.bsd3;
maintainers = [ ];
broken = stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/dcs.x86_64-darwin
};
}

View File

@@ -0,0 +1,44 @@
{
lib,
stdenv,
fetchFromGitHub,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "dcw-gmt";
version = "2.2.0";
src = fetchFromGitHub {
owner = "GenericMappingTools";
repo = "dcw-gmt";
tag = finalAttrs.version;
hash = "sha256-OgFonNbhvzRfQZksnwIbgASbMGnL0bmD4wkXZBl3kIU=";
};
installPhase = ''
mkdir -p $out/share/dcw-gmt
cp -rv ./* $out/share/dcw-gmt
'';
meta = with lib; {
homepage = "https://github.com/GenericMappingTools/dcw-gmt";
description = "Vector basemap of the world, for use with GMT";
longDescription = ''
The Digital Chart of the World is a comprehensive 1:1,000,000 scale vector
basemap of the world. The charts were designed to meet the needs of pilots
and air crews in medium- and low-altitude en route navigation and to
support military operational planning, intelligence briefings, and other
needs. For basic background information about DCW, see the [Wikipedia
entry](http://en.wikipedia.org/wiki/Digital_Chart_of_the_World).
DCW-GMT is an enhancement to DCW in a few ways:
- It contains more state boundaries (the largest 8 countries, Great Britain and Norway are now represented).
- The data have been reformatted to save space and are distributed as a single deflated netCDF-4 file.
'';
license = licenses.lgpl3Plus;
maintainers = with lib.maintainers; [ tviti ];
teams = [ lib.teams.geospatial ];
};
})