summary refs log tree commit diff
path: root/pkgs/tools/filesystems/ceph/generic.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/filesystems/ceph/generic.nix')
-rw-r--r--pkgs/tools/filesystems/ceph/generic.nix12
1 files changed, 9 insertions, 3 deletions
diff --git a/pkgs/tools/filesystems/ceph/generic.nix b/pkgs/tools/filesystems/ceph/generic.nix
index 4d358d6a9c5..b899192aa3c 100644
--- a/pkgs/tools/filesystems/ceph/generic.nix
+++ b/pkgs/tools/filesystems/ceph/generic.nix
@@ -113,7 +113,9 @@ stdenv.mkDerivation {
   ];
 
   nativeBuildInputs = [ autoconf automake makeWrapper pkgconfig libtool which ]
-    ++ optionals (versionAtLeast version "10.0.0") [ pythonPackages.setuptools ];
+    ++ optionals (versionAtLeast version "9.0.2") [
+      pythonPackages.setuptools pythonPackages.argparse
+    ];
   buildInputs = buildInputs ++ cryptoLibsMap.${cryptoStr} ++ [
     boost python libxml2 optYasm optLibatomic_ops optLibs3 malloc pythonPackages.flask zlib
   ] ++ optional (versionAtLeast version "9.0.0") [
@@ -147,7 +149,7 @@ stdenv.mkDerivation {
   preConfigure = ''
     # Ceph expects the arch command to be usable during configure
     # for detecting the assembly type
-    mkdir mybin
+    mkdir -p mybin
     echo "#${stdenv.shell} -e" >> mybin/arch
     echo "uname -m" >> mybin/arch
     chmod +x mybin/arch
@@ -157,6 +159,10 @@ stdenv.mkDerivation {
 
     # Fix the python site-packages install directory
     sed -i "s,\(PYTHON\(\|_EXEC\)_PREFIX=\).*,\1'$lib',g" configure
+
+    # Fix the PYTHONPATH for installing ceph-detect-init to $out
+    mkdir -p "$(toPythonPath $out)"
+    export PYTHONPATH="$(toPythonPath $out):$PYTHONPATH"
   '';
 
   configureFlags = [
@@ -200,7 +206,7 @@ stdenv.mkDerivation {
   ] ++ optional (versionAtLeast version "9.0.1") [
     (mkWith   false                        "tcmalloc-minimal"    null)
     (mkWith   false                        "valgrind"            null)
-  ] ++ optional (versionAtLeast version "10.0.0") [
+  ] ++ optional (versionAtLeast version "9.0.2") [
     (mkWith   true                         "man-pages"           null)
     (mkWith   true                         "systemd-libexec-dir" "\${TMPDIR}")
   ];