summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2020-01-22 18:00:22 +0100
committerGitHub <noreply@github.com>2020-01-22 18:00:22 +0100
commit79bf9ef3b5bb1cf498bc7be3056e154c7a3af79f (patch)
tree5493a8b619d97051da2754080b144def57d1485b /pkgs/tools
parentf82528a92b73aab573fa36de46a49185f1e69c99 (diff)
parent585ac580df589acd201ce708f0f978f05ec47023 (diff)
downloadnixpkgs-79bf9ef3b5bb1cf498bc7be3056e154c7a3af79f.tar
nixpkgs-79bf9ef3b5bb1cf498bc7be3056e154c7a3af79f.tar.gz
nixpkgs-79bf9ef3b5bb1cf498bc7be3056e154c7a3af79f.tar.bz2
nixpkgs-79bf9ef3b5bb1cf498bc7be3056e154c7a3af79f.tar.lz
nixpkgs-79bf9ef3b5bb1cf498bc7be3056e154c7a3af79f.tar.xz
nixpkgs-79bf9ef3b5bb1cf498bc7be3056e154c7a3af79f.tar.zst
nixpkgs-79bf9ef3b5bb1cf498bc7be3056e154c7a3af79f.zip
Merge pull request #78243 from srhb/ceph-revert-lost-ceph-volume
ceph: Bring back ceph-volume
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/filesystems/ceph/default.nix12
1 files changed, 9 insertions, 3 deletions
diff --git a/pkgs/tools/filesystems/ceph/default.nix b/pkgs/tools/filesystems/ceph/default.nix
index f3e985edbff..aa3622ed057 100644
--- a/pkgs/tools/filesystems/ceph/default.nix
+++ b/pkgs/tools/filesystems/ceph/default.nix
@@ -91,6 +91,7 @@ let
     ps.six
     ps.pyyaml
   ]);
+  sitePackages = ceph-python-env.python.sitePackages;
 
   version = "14.2.6";
 in rec {
@@ -135,7 +136,8 @@ in rec {
 
       # for pybind/rgw to find internal dep
       export LD_LIBRARY_PATH="$PWD/build/lib:$LD_LIBRARY_PATH"
-      # install target needs to be in PYTHONPATH for "*.pth support" check to succeed
+      # set PYTHONPATH, so the build system doesn't silently skip installing ceph-volume and others
+      export PYTHONPATH=${ceph-python-env}/${sitePackages}:$lib/${sitePackages}:$out/${sitePackages}
 
       patchShebangs src/script src/spdk src/test src/tools
     '';
@@ -159,6 +161,10 @@ in rec {
     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
     '';
 
     enableParallelBuilding = true;
@@ -187,11 +193,11 @@ in rec {
         platforms = [ "x86_64-linux" ];
       };
     } ''
-      mkdir -p $out/{bin,etc,lib/python3.7/site-packages}
+      mkdir -p $out/{bin,etc,${sitePackages}}
       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}/lib/python3.7/site-packages $out/lib/python3.7/
+      cp -r ${ceph}/${sitePackages} $out/${sitePackages}
       cp -r ${ceph}/etc/bash_completion.d $out/etc
       # wrapPythonPrograms modifies .ceph-wrapped, so lets just update its paths
       substituteInPlace $out/bin/ceph          --replace ${ceph} $out