From f04ab690484f926070423431e1bb5b1a63ad96b2 Mon Sep 17 00:00:00 2001 From: benaryorg Date: Fri, 24 Oct 2025 09:23:46 +0000 Subject: [PATCH 1/4] pkgs/ceph: self-contained package Moving all of the custom dependency magic into the package allows us to move it to the by-name hierarchy a lot easier. This however also means breaking any overrides used downstream for the affected dependencies: - fmt - lua - arrow-cpp The last one is now also exposed via passthru for overriding purposes. All expressions evaluate to the same values though. Signed-off-by: benaryorg --- pkgs/tools/filesystems/ceph/default.nix | 21 ++++++++++++++------- pkgs/top-level/all-packages.nix | 17 +---------------- 2 files changed, 15 insertions(+), 23 deletions(-) diff --git a/pkgs/tools/filesystems/ceph/default.nix b/pkgs/tools/filesystems/ceph/default.nix index 5e8bc57366ed..1aea3ea3b5ff 100644 --- a/pkgs/tools/filesystems/ceph/default.nix +++ b/pkgs/tools/filesystems/ceph/default.nix @@ -6,13 +6,19 @@ fetchFromGitHub, fetchPypi, fetchpatch2, + callPackage, # Build time autoconf, automake, cmake, ensureNewerSourcesHook, - fmt, + # To see which `fmt` version Ceph upstream recommends, check its `src/fmt` submodule. + # + # Ceph does not currently build with `fmt_10`; see https://github.com/NixOS/nixpkgs/issues/281027#issuecomment-1899128557 + # If we want to switch for that before upstream fixes it, use this patch: + # https://github.com/NixOS/nixpkgs/pull/281858#issuecomment-1899648638 + fmt_9, git, libtool, makeWrapper, @@ -25,7 +31,7 @@ nixosTests, # Runtime dependencies - arrow-cpp, + ceph-arrow-cpp ? callPackage ./arrow-cpp-19.nix { }, babeltrace, # Note when trying to upgrade boost: # * When upgrading Ceph, it's recommended to check which boost version Ceph uses on Fedora, @@ -55,7 +61,8 @@ libxml2, lmdb, lttng-ust, - lua, + # Ceph currently requires >= 5.3 + lua5_4, lvm2, lz4, oath-toolkit, @@ -105,7 +112,6 @@ libxfs ? null, liburing ? null, zfs ? null, - ... }: # We must have one crypto library @@ -398,7 +404,7 @@ rec { autoconf # `autoreconf` is called, e.g. for `qatlib_ext` automake # `aclocal` is called, e.g. for `qatlib_ext` cmake - fmt + fmt_9 git makeWrapper libtool # used e.g. for `qatlib_ext` @@ -417,7 +423,7 @@ rec { buildInputs = cryptoLibsMap.${cryptoStr} ++ [ - arrow-cpp + ceph-arrow-cpp babeltrace boost' bzip2 @@ -437,7 +443,7 @@ rec { libxml2 lmdb lttng-ust - lua + lua5_4 lvm2 # according to `debian/control` file, e.g. `pvs` command used by `src/ceph-volume/ceph_volume/api/lvm.py` lz4 malloc @@ -594,6 +600,7 @@ rec { passthru = { inherit version; inherit python; # to be able to test our overridden packages above individually with `nix-build -A` + arrow-cpp = ceph-arrow-cpp; tests = { inherit (nixosTests) ceph-multi-node diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e885b3756794..6409aa7e6003 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2346,22 +2346,7 @@ with pkgs; cemu-ti = qt5.callPackage ../applications/science/math/cemu-ti { }; libceph = ceph.lib; - inherit - (callPackages ../tools/filesystems/ceph { - lua = lua5_4; # Ceph currently requires >= 5.3 - - # To see which `fmt` version Ceph upstream recommends, check its `src/fmt` submodule. - # - # Ceph does not currently build with `fmt_11`; see https://github.com/NixOS/nixpkgs/issues/281027#issuecomment-1899128557 - # If we want to switch for that before upstream fixes it, use this patch: - # https://github.com/NixOS/nixpkgs/pull/281858#issuecomment-1899648638 - fmt = fmt_9; - - # Remove once Ceph supports arrow-cpp >= 20, see: - # * https://tracker.ceph.com/issues/71269 - # * https://github.com/NixOS/nixpkgs/issues/406306 - arrow-cpp = callPackage ../tools/filesystems/ceph/arrow-cpp-19.nix { }; - }) + inherit (callPackages ../tools/filesystems/ceph { }) ceph ceph-client ; From 56d71be11e769402d8ca1b279373ff0707797e6c Mon Sep 17 00:00:00 2001 From: benaryorg Date: Fri, 24 Oct 2025 09:34:59 +0000 Subject: [PATCH 2/4] pkgs/ceph: client as output Moving the ceph client to a separate output allows moving the entire package to the by-name structure more easily. Signed-off-by: benaryorg --- pkgs/tools/filesystems/ceph/default.nix | 478 ++++++++++++------------ pkgs/top-level/all-packages.nix | 6 +- 2 files changed, 237 insertions(+), 247 deletions(-) diff --git a/pkgs/tools/filesystems/ceph/default.nix b/pkgs/tools/filesystems/ceph/default.nix index 1aea3ea3b5ff..a468bc88985d 100644 --- a/pkgs/tools/filesystems/ceph/default.nix +++ b/pkgs/tools/filesystems/ceph/default.nix @@ -373,262 +373,254 @@ let hash = "sha256-zlgp28C81SZbaFJ4yvQk4ZgYz4K/aZqtcISTO8LscSU="; }; in -rec { - ceph = stdenv.mkDerivation { - pname = "ceph"; - inherit src version; +stdenv.mkDerivation rec { + pname = "ceph"; + inherit src version; - patches = [ - ./boost-1.85.patch + patches = [ + ./boost-1.85.patch - (fetchpatch2 { - name = "ceph-boost-1.86-uuid.patch"; - url = "https://github.com/ceph/ceph/commit/01306208eac492ee0e67bff143fc32d0551a2a6f.patch?full_index=1"; - hash = "sha256-OnDrr72inzGXXYxPFQevsRZImSvI0uuqFHqtFU2dPQE="; - }) + (fetchpatch2 { + name = "ceph-boost-1.86-uuid.patch"; + url = "https://github.com/ceph/ceph/commit/01306208eac492ee0e67bff143fc32d0551a2a6f.patch?full_index=1"; + hash = "sha256-OnDrr72inzGXXYxPFQevsRZImSvI0uuqFHqtFU2dPQE="; + }) - # See: - # * - # * - # * - ./boost-1.86-PyModule.patch + # See: + # * + # * + # * + ./boost-1.86-PyModule.patch - (fetchpatch2 { - name = "ceph-cmake-4.patch"; - url = "https://gitlab.alpinelinux.org/ashpool/aports/-/raw/d22b70eafe33c3daabe4eea6913c5be87d9463ad/community/ceph19/cpp_redis.patch"; - hash = "sha256-wxPIsYt25CjXhJ6kmr/MXwFD58Sl4y4W+r9jAMND+uw="; - }) - ]; + (fetchpatch2 { + name = "ceph-cmake-4.patch"; + url = "https://gitlab.alpinelinux.org/ashpool/aports/-/raw/d22b70eafe33c3daabe4eea6913c5be87d9463ad/community/ceph19/cpp_redis.patch"; + hash = "sha256-wxPIsYt25CjXhJ6kmr/MXwFD58Sl4y4W+r9jAMND+uw="; + }) + ]; - nativeBuildInputs = [ - autoconf # `autoreconf` is called, e.g. for `qatlib_ext` - automake # `aclocal` is called, e.g. for `qatlib_ext` - cmake - fmt_9 - git - makeWrapper - libtool # used e.g. for `qatlib_ext` - nasm - pkg-config - python - python.pkgs.python # for the toPythonPath function - python.pkgs.wrapPython - which - (ensureNewerSourcesHook { year = "1980"; }) - # for building docs/man-pages presumably - doxygen - graphviz - ]; + nativeBuildInputs = [ + autoconf # `autoreconf` is called, e.g. for `qatlib_ext` + automake # `aclocal` is called, e.g. for `qatlib_ext` + cmake + fmt_9 + git + makeWrapper + libtool # used e.g. for `qatlib_ext` + nasm + pkg-config + python + python.pkgs.python # for the toPythonPath function + python.pkgs.wrapPython + which + (ensureNewerSourcesHook { year = "1980"; }) + # for building docs/man-pages presumably + doxygen + graphviz + ]; - buildInputs = - cryptoLibsMap.${cryptoStr} - ++ [ - ceph-arrow-cpp - babeltrace - boost' - bzip2 - # Adding `ceph-python-env` here adds the env's `site-packages` to `PYTHONPATH` during the build. - # This is important, otherwise the build system may not find the Python deps and then - # silently skip installing ceph-volume and other Ceph python tools. - ceph-python-env - cryptsetup - cunit - e2fsprogs # according to `debian/control` file, `ceph-volume` is supposed to use it - gperf - gtest - icu - libcap - libnbd - libnl - libxml2 - lmdb - lttng-ust - lua5_4 - lvm2 # according to `debian/control` file, e.g. `pvs` command used by `src/ceph-volume/ceph_volume/api/lvm.py` - lz4 - malloc - oath-toolkit - openldap - optLibatomic_ops - optLibs3 - optYasm - parted # according to `debian/control` file, used by `src/ceph-volume/ceph_volume/util/disk.py` - rdkafka - rocksdb' - snappy - openssh # according to `debian/control` file, `ssh` command used by `cephadm` - sqlite - utf8proc - xfsprogs # according to `debian/control` file, `ceph-volume` is supposed to use it - zlib - zstd - ] - ++ lib.optionals stdenv.hostPlatform.isLinux [ - keyutils - libcap_ng - liburing - libuuid - linuxHeaders - optLibaio - optLibxfs - optZfs - rabbitmq-c - rdma-core - udev - util-linux - ] - ++ lib.optionals hasRadosgw [ - optCurl - optExpat - optFuse - optLibedit - ]; - - # Picked up, amongst others, by `wrapPythonPrograms`. - pythonPath = [ + buildInputs = + cryptoLibsMap.${cryptoStr} + ++ [ + ceph-arrow-cpp + babeltrace + boost' + bzip2 + # Adding `ceph-python-env` here adds the env's `site-packages` to `PYTHONPATH` during the build. + # This is important, otherwise the build system may not find the Python deps and then + # silently skip installing ceph-volume and other Ceph python tools. ceph-python-env - "${placeholder "out"}/${ceph-python-env.sitePackages}" - ]; - - # * `unset AS` because otherwise the Ceph CMake build errors with - # configure: error: No modern nasm or yasm found as required. Nasm should be v2.11.01 or later (v2.13 for AVX512) and yasm should be 1.2.0 or later. - # because the code at - # https://github.com/intel/isa-l/blob/633add1b569fe927bace3960d7c84ed9c1b38bb9/configure.ac#L99-L191 - # doesn't even consider using `nasm` or `yasm` but instead uses `$AS` - # from `gcc-wrapper`. - # (Ceph's error message is extra confusing, because it says - # `No modern nasm or yasm found` when in fact it found e.g. `nasm` - # but then uses `$AS` instead. - # * replace /sbin and /bin based paths with direct nix store paths - # * increase the `command` buffer size since 2 nix store paths cannot fit within 128 characters - preConfigure = '' - unset AS - - substituteInPlace src/common/module.c \ - --replace "char command[128];" "char command[256];" \ - --replace "/sbin/modinfo" "${kmod}/bin/modinfo" \ - --replace "/sbin/modprobe" "${kmod}/bin/modprobe" \ - --replace "/bin/grep" "${gnugrep}/bin/grep" - - # Patch remount to use full path to mount(8), otherwise ceph-fuse fails when run - # from a systemd unit for example. - substituteInPlace src/client/fuse_ll.cc \ - --replace-fail "mount -i -o remount" "${util-linux}/bin/mount -i -o remount" - - # The install target needs to be in PYTHONPATH for "*.pth support" check to succeed - export PYTHONPATH=$PYTHONPATH:$lib/${sitePackages}:$out/${sitePackages} - patchShebangs src/ - ''; - - cmakeFlags = [ - "-DCMAKE_INSTALL_DATADIR=${placeholder "lib"}/lib" - - "-DWITH_CEPHFS_SHELL:BOOL=ON" - "-DWITH_SYSTEMD:BOOL=OFF" - # `WITH_JAEGER` requires `thrift` as a depenedncy (fine), but the build fails with: - # CMake Error at src/opentelemetry-cpp-stamp/opentelemetry-cpp-build-Release.cmake:49 (message): - # Command failed: 2 - # - # 'make' 'opentelemetry_trace' 'opentelemetry_exporter_jaeger_trace' - # - # See also - # - # /build/ceph-18.2.0/build/src/opentelemetry-cpp/src/opentelemetry-cpp-stamp/opentelemetry-cpp-build-*.log - # and that file contains: - # /build/ceph-18.2.0/src/jaegertracing/opentelemetry-cpp/exporters/jaeger/src/TUDPTransport.cc: In member function 'virtual void opentelemetry::v1::exporter::jaeger::TUDPTransport::close()': - # /build/ceph-18.2.0/src/jaegertracing/opentelemetry-cpp/exporters/jaeger/src/TUDPTransport.cc:71:7: error: '::close' has not been declared; did you mean 'pclose'? - # 71 | ::THRIFT_CLOSESOCKET(socket_); - # | ^~~~~~~~~~~~~~~~~~ - # Looks like `close()` is somehow not included. - # But the relevant code is already removed in `open-telemetry` 1.10: https://github.com/open-telemetry/opentelemetry-cpp/pull/2031 - # So it's probably not worth trying to fix that for this Ceph version, - # and instead just disable Ceph's Jaeger support. - "-DWITH_JAEGER:BOOL=OFF" - "-DWITH_TESTS:BOOL=OFF" - - # Use our own libraries, where possible - "-DWITH_SYSTEM_ARROW:BOOL=ON" # Only used if other options enable Arrow support. - "-DWITH_SYSTEM_BOOST:BOOL=ON" - "-DWITH_SYSTEM_GTEST:BOOL=ON" - "-DWITH_SYSTEM_ROCKSDB:BOOL=ON" - "-DWITH_SYSTEM_UTF8PROC:BOOL=ON" - "-DWITH_SYSTEM_ZSTD:BOOL=ON" - - # Use our own python libraries too, see: - # https://github.com/NixOS/nixpkgs/pull/344993#issuecomment-2391046329 - "-DCEPHADM_BUNDLED_DEPENDENCIES=none" - - # TODO breaks with sandbox, tries to download stuff with npm - "-DWITH_MGR_DASHBOARD_FRONTEND:BOOL=OFF" - # WITH_XFS has been set default ON from Ceph 16, keeping it optional in nixpkgs for now - ''-DWITH_XFS=${if optLibxfs != null then "ON" else "OFF"}'' + cryptsetup + cunit + e2fsprogs # according to `debian/control` file, `ceph-volume` is supposed to use it + gperf + gtest + icu + libcap + libnbd + libnl + libxml2 + lmdb + lttng-ust + lua5_4 + lvm2 # according to `debian/control` file, e.g. `pvs` command used by `src/ceph-volume/ceph_volume/api/lvm.py` + lz4 + malloc + oath-toolkit + openldap + optLibatomic_ops + optLibs3 + optYasm + parted # according to `debian/control` file, used by `src/ceph-volume/ceph_volume/util/disk.py` + rdkafka + rocksdb' + snappy + openssh # according to `debian/control` file, `ssh` command used by `cephadm` + sqlite + utf8proc + xfsprogs # according to `debian/control` file, `ceph-volume` is supposed to use it + zlib + zstd ] - ++ lib.optional stdenv.hostPlatform.isLinux "-DWITH_SYSTEM_LIBURING=ON"; - - preBuild = - # The legacy-option-headers target is not correctly empbedded in the build graph. - # It also contains some internal race conditions that we work around by building with `-j 1`. - # Upstream discussion for additional context at https://tracker.ceph.com/issues/63402. - '' - cmake --build . --target legacy-option-headers -j 1 - ''; - - postFixup = '' - wrapPythonPrograms - wrapProgram $out/bin/ceph-mgr --prefix PYTHONPATH ":" "$(toPythonPath ${placeholder "out"}):$(toPythonPath ${ceph-python-env})" - - # Test that ceph-volume exists since the build system has a tendency to - # silently drop it with misconfigurations. - test -f $out/bin/ceph-volume - ''; - - outputs = [ - "out" - "lib" - "dev" - "doc" - "man" + ++ lib.optionals stdenv.hostPlatform.isLinux [ + keyutils + libcap_ng + liburing + libuuid + linuxHeaders + optLibaio + optLibxfs + optZfs + rabbitmq-c + rdma-core + udev + util-linux + ] + ++ lib.optionals hasRadosgw [ + optCurl + optExpat + optFuse + optLibedit ]; - doCheck = false; # uses pip to install things from the internet + # Picked up, amongst others, by `wrapPythonPrograms`. + pythonPath = [ + ceph-python-env + "${placeholder "out"}/${ceph-python-env.sitePackages}" + ]; - # Takes 7+h to build with 2 cores. - requiredSystemFeatures = [ "big-parallel" ]; + # * `unset AS` because otherwise the Ceph CMake build errors with + # configure: error: No modern nasm or yasm found as required. Nasm should be v2.11.01 or later (v2.13 for AVX512) and yasm should be 1.2.0 or later. + # because the code at + # https://github.com/intel/isa-l/blob/633add1b569fe927bace3960d7c84ed9c1b38bb9/configure.ac#L99-L191 + # doesn't even consider using `nasm` or `yasm` but instead uses `$AS` + # from `gcc-wrapper`. + # (Ceph's error message is extra confusing, because it says + # `No modern nasm or yasm found` when in fact it found e.g. `nasm` + # but then uses `$AS` instead. + # * replace /sbin and /bin based paths with direct nix store paths + # * increase the `command` buffer size since 2 nix store paths cannot fit within 128 characters + preConfigure = '' + unset AS - meta = getMeta "Distributed storage system"; + substituteInPlace src/common/module.c \ + --replace "char command[128];" "char command[256];" \ + --replace "/sbin/modinfo" "${kmod}/bin/modinfo" \ + --replace "/sbin/modprobe" "${kmod}/bin/modprobe" \ + --replace "/bin/grep" "${gnugrep}/bin/grep" - passthru = { - inherit version; - inherit python; # to be able to test our overridden packages above individually with `nix-build -A` - arrow-cpp = ceph-arrow-cpp; - tests = { - inherit (nixosTests) - ceph-multi-node - ceph-single-node - ceph-single-node-bluestore - ceph-single-node-bluestore-dmcrypt - ; - }; + # Patch remount to use full path to mount(8), otherwise ceph-fuse fails when run + # from a systemd unit for example. + substituteInPlace src/client/fuse_ll.cc \ + --replace-fail "mount -i -o remount" "${util-linux}/bin/mount -i -o remount" + + # The install target needs to be in PYTHONPATH for "*.pth support" check to succeed + export PYTHONPATH=$PYTHONPATH:$lib/${sitePackages}:$out/${sitePackages} + patchShebangs src/ + ''; + + cmakeFlags = [ + "-DCMAKE_INSTALL_DATADIR=${placeholder "lib"}/lib" + + "-DWITH_CEPHFS_SHELL:BOOL=ON" + "-DWITH_SYSTEMD:BOOL=OFF" + # `WITH_JAEGER` requires `thrift` as a depenedncy (fine), but the build fails with: + # CMake Error at src/opentelemetry-cpp-stamp/opentelemetry-cpp-build-Release.cmake:49 (message): + # Command failed: 2 + # + # 'make' 'opentelemetry_trace' 'opentelemetry_exporter_jaeger_trace' + # + # See also + # + # /build/ceph-18.2.0/build/src/opentelemetry-cpp/src/opentelemetry-cpp-stamp/opentelemetry-cpp-build-*.log + # and that file contains: + # /build/ceph-18.2.0/src/jaegertracing/opentelemetry-cpp/exporters/jaeger/src/TUDPTransport.cc: In member function 'virtual void opentelemetry::v1::exporter::jaeger::TUDPTransport::close()': + # /build/ceph-18.2.0/src/jaegertracing/opentelemetry-cpp/exporters/jaeger/src/TUDPTransport.cc:71:7: error: '::close' has not been declared; did you mean 'pclose'? + # 71 | ::THRIFT_CLOSESOCKET(socket_); + # | ^~~~~~~~~~~~~~~~~~ + # Looks like `close()` is somehow not included. + # But the relevant code is already removed in `open-telemetry` 1.10: https://github.com/open-telemetry/opentelemetry-cpp/pull/2031 + # So it's probably not worth trying to fix that for this Ceph version, + # and instead just disable Ceph's Jaeger support. + "-DWITH_JAEGER:BOOL=OFF" + "-DWITH_TESTS:BOOL=OFF" + + # Use our own libraries, where possible + "-DWITH_SYSTEM_ARROW:BOOL=ON" # Only used if other options enable Arrow support. + "-DWITH_SYSTEM_BOOST:BOOL=ON" + "-DWITH_SYSTEM_GTEST:BOOL=ON" + "-DWITH_SYSTEM_ROCKSDB:BOOL=ON" + "-DWITH_SYSTEM_UTF8PROC:BOOL=ON" + "-DWITH_SYSTEM_ZSTD:BOOL=ON" + + # Use our own python libraries too, see: + # https://github.com/NixOS/nixpkgs/pull/344993#issuecomment-2391046329 + "-DCEPHADM_BUNDLED_DEPENDENCIES=none" + + # TODO breaks with sandbox, tries to download stuff with npm + "-DWITH_MGR_DASHBOARD_FRONTEND:BOOL=OFF" + # WITH_XFS has been set default ON from Ceph 16, keeping it optional in nixpkgs for now + ''-DWITH_XFS=${if optLibxfs != null then "ON" else "OFF"}'' + ] + ++ lib.optional stdenv.hostPlatform.isLinux "-DWITH_SYSTEM_LIBURING=ON"; + + preBuild = + # The legacy-option-headers target is not correctly empbedded in the build graph. + # It also contains some internal race conditions that we work around by building with `-j 1`. + # Upstream discussion for additional context at https://tracker.ceph.com/issues/63402. + '' + cmake --build . --target legacy-option-headers -j 1 + ''; + + postFixup = '' + wrapPythonPrograms + wrapProgram $out/bin/ceph-mgr --prefix PYTHONPATH ":" "$(toPythonPath ${placeholder "out"}):$(toPythonPath ${ceph-python-env})" + + # Test that ceph-volume exists since the build system has a tendency to + # silently drop it with misconfigurations. + test -f $out/bin/ceph-volume + + mkdir -p $client/{bin,etc,${sitePackages},share/bash-completion/completions} + cp -r $out/bin/{ceph,.ceph-wrapped,rados,rbd,rbdmap} $client/bin + cp -r $out/bin/ceph-{authtool,conf,dencoder,rbdnamer,syn} $client/bin + cp -r $out/bin/rbd-replay* $client/bin + cp -r $out/sbin/mount.ceph $client/bin + cp -r $out/sbin/mount.fuse.ceph $client/bin + ln -s bin $client/sbin + cp -r $out/${sitePackages}/* $client/${sitePackages} + cp -r $out/etc/bash_completion.d $client/share/bash-completion/completions + # wrapPythonPrograms modifies .ceph-wrapped, so lets just update its paths + substituteInPlace $client/bin/ceph --replace $out $client + substituteInPlace $client/bin/.ceph-wrapped --replace $out $client + ''; + + outputs = [ + "out" + "lib" + "client" + "dev" + "doc" + "man" + ]; + + doCheck = false; # uses pip to install things from the internet + + # Takes 7+h to build with 2 cores. + requiredSystemFeatures = [ "big-parallel" ]; + + meta = getMeta "Distributed storage system"; + + passthru = { + inherit version; + inherit python; # to be able to test our overridden packages above individually with `nix-build -A` + arrow-cpp = ceph-arrow-cpp; + tests = { + inherit (nixosTests) + ceph-multi-node + ceph-single-node + ceph-single-node-bluestore + ceph-single-node-bluestore-dmcrypt + ; }; }; - - ceph-client = - runCommand "ceph-client-${version}" - { - meta = getMeta "Tools needed to mount Ceph's RADOS Block Devices/Cephfs"; - } - '' - mkdir -p $out/{bin,etc,${sitePackages},share/bash-completion/completions} - cp -r ${ceph}/bin/{ceph,.ceph-wrapped,rados,rbd,rbdmap} $out/bin - cp -r ${ceph}/bin/ceph-{authtool,conf,dencoder,rbdnamer,syn} $out/bin - cp -r ${ceph}/bin/rbd-replay* $out/bin - cp -r ${ceph}/sbin/mount.ceph $out/bin - cp -r ${ceph}/sbin/mount.fuse.ceph $out/bin - ln -s bin $out/sbin - cp -r ${ceph}/${sitePackages}/* $out/${sitePackages} - cp -r ${ceph}/etc/bash_completion.d $out/share/bash-completion/completions - # wrapPythonPrograms modifies .ceph-wrapped, so lets just update its paths - substituteInPlace $out/bin/ceph --replace ${ceph} $out - substituteInPlace $out/bin/.ceph-wrapped --replace ${ceph} $out - ''; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6409aa7e6003..3c053a094c79 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2345,11 +2345,9 @@ with pkgs; cemu-ti = qt5.callPackage ../applications/science/math/cemu-ti { }; + ceph = callPackage ../tools/filesystems/ceph { }; libceph = ceph.lib; - inherit (callPackages ../tools/filesystems/ceph { }) - ceph - ceph-client - ; + ceph-client = ceph.client; ceph-dev = ceph; clementine = libsForQt5.callPackage ../applications/audio/clementine { From 72ccd1e2cbb5afde01115c223eae80e0ec5b925d Mon Sep 17 00:00:00 2001 From: benaryorg Date: Fri, 24 Oct 2025 09:38:19 +0000 Subject: [PATCH 3/4] pkgs/ceph: move to by-name Signed-off-by: benaryorg --- pkgs/{tools/filesystems => by-name/ce}/ceph/arrow-cpp-19.nix | 0 pkgs/{tools/filesystems => by-name/ce}/ceph/boost-1.85.patch | 0 .../filesystems => by-name/ce}/ceph/boost-1.86-PyModule.patch | 0 .../ce}/ceph/old-python-packages/cryptography-vectors.nix | 0 .../ce}/ceph/old-python-packages/cryptography.nix | 0 ...y-Cherry-pick-fix-for-CVE-2023-49083-on-cryptography-40.patch | 0 .../ce}/ceph/old-python-packages/trustme.nix | 0 .../filesystems/ceph/default.nix => by-name/ce/ceph/package.nix} | 0 pkgs/top-level/all-packages.nix | 1 - 9 files changed, 1 deletion(-) rename pkgs/{tools/filesystems => by-name/ce}/ceph/arrow-cpp-19.nix (100%) rename pkgs/{tools/filesystems => by-name/ce}/ceph/boost-1.85.patch (100%) rename pkgs/{tools/filesystems => by-name/ce}/ceph/boost-1.86-PyModule.patch (100%) rename pkgs/{tools/filesystems => by-name/ce}/ceph/old-python-packages/cryptography-vectors.nix (100%) rename pkgs/{tools/filesystems => by-name/ce}/ceph/old-python-packages/cryptography.nix (100%) rename pkgs/{tools/filesystems => by-name/ce}/ceph/old-python-packages/python-cryptography-Cherry-pick-fix-for-CVE-2023-49083-on-cryptography-40.patch (100%) rename pkgs/{tools/filesystems => by-name/ce}/ceph/old-python-packages/trustme.nix (100%) rename pkgs/{tools/filesystems/ceph/default.nix => by-name/ce/ceph/package.nix} (100%) diff --git a/pkgs/tools/filesystems/ceph/arrow-cpp-19.nix b/pkgs/by-name/ce/ceph/arrow-cpp-19.nix similarity index 100% rename from pkgs/tools/filesystems/ceph/arrow-cpp-19.nix rename to pkgs/by-name/ce/ceph/arrow-cpp-19.nix diff --git a/pkgs/tools/filesystems/ceph/boost-1.85.patch b/pkgs/by-name/ce/ceph/boost-1.85.patch similarity index 100% rename from pkgs/tools/filesystems/ceph/boost-1.85.patch rename to pkgs/by-name/ce/ceph/boost-1.85.patch diff --git a/pkgs/tools/filesystems/ceph/boost-1.86-PyModule.patch b/pkgs/by-name/ce/ceph/boost-1.86-PyModule.patch similarity index 100% rename from pkgs/tools/filesystems/ceph/boost-1.86-PyModule.patch rename to pkgs/by-name/ce/ceph/boost-1.86-PyModule.patch diff --git a/pkgs/tools/filesystems/ceph/old-python-packages/cryptography-vectors.nix b/pkgs/by-name/ce/ceph/old-python-packages/cryptography-vectors.nix similarity index 100% rename from pkgs/tools/filesystems/ceph/old-python-packages/cryptography-vectors.nix rename to pkgs/by-name/ce/ceph/old-python-packages/cryptography-vectors.nix diff --git a/pkgs/tools/filesystems/ceph/old-python-packages/cryptography.nix b/pkgs/by-name/ce/ceph/old-python-packages/cryptography.nix similarity index 100% rename from pkgs/tools/filesystems/ceph/old-python-packages/cryptography.nix rename to pkgs/by-name/ce/ceph/old-python-packages/cryptography.nix diff --git a/pkgs/tools/filesystems/ceph/old-python-packages/python-cryptography-Cherry-pick-fix-for-CVE-2023-49083-on-cryptography-40.patch b/pkgs/by-name/ce/ceph/old-python-packages/python-cryptography-Cherry-pick-fix-for-CVE-2023-49083-on-cryptography-40.patch similarity index 100% rename from pkgs/tools/filesystems/ceph/old-python-packages/python-cryptography-Cherry-pick-fix-for-CVE-2023-49083-on-cryptography-40.patch rename to pkgs/by-name/ce/ceph/old-python-packages/python-cryptography-Cherry-pick-fix-for-CVE-2023-49083-on-cryptography-40.patch diff --git a/pkgs/tools/filesystems/ceph/old-python-packages/trustme.nix b/pkgs/by-name/ce/ceph/old-python-packages/trustme.nix similarity index 100% rename from pkgs/tools/filesystems/ceph/old-python-packages/trustme.nix rename to pkgs/by-name/ce/ceph/old-python-packages/trustme.nix diff --git a/pkgs/tools/filesystems/ceph/default.nix b/pkgs/by-name/ce/ceph/package.nix similarity index 100% rename from pkgs/tools/filesystems/ceph/default.nix rename to pkgs/by-name/ce/ceph/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3c053a094c79..a65617f48b5d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2345,7 +2345,6 @@ with pkgs; cemu-ti = qt5.callPackage ../applications/science/math/cemu-ti { }; - ceph = callPackage ../tools/filesystems/ceph { }; libceph = ceph.lib; ceph-client = ceph.client; ceph-dev = ceph; From 1bbcb16d61c7c755529c4f2a3dd5449fa02d86e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Fri, 24 Oct 2025 12:37:26 +0000 Subject: [PATCH 4/4] ceph: Re-add comment, remove unnecessary rec --- pkgs/by-name/ce/ceph/package.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/ce/ceph/package.nix b/pkgs/by-name/ce/ceph/package.nix index a468bc88985d..4f8371cd7d2b 100644 --- a/pkgs/by-name/ce/ceph/package.nix +++ b/pkgs/by-name/ce/ceph/package.nix @@ -31,6 +31,10 @@ nixosTests, # Runtime dependencies + + # Remove once Ceph supports arrow-cpp >= 20, see: + # * https://tracker.ceph.com/issues/71269 + # * https://github.com/NixOS/nixpkgs/issues/406306 ceph-arrow-cpp ? callPackage ./arrow-cpp-19.nix { }, babeltrace, # Note when trying to upgrade boost: @@ -373,7 +377,7 @@ let hash = "sha256-zlgp28C81SZbaFJ4yvQk4ZgYz4K/aZqtcISTO8LscSU="; }; in -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "ceph"; inherit src version;