about summary refs log tree commit diff
diff options
context:
space:
mode:
authorThomas Strobel <ts468@cam.ac.uk>2014-12-18 11:20:03 +0100
committerThomas Strobel <ts468@cam.ac.uk>2014-12-18 11:20:03 +0100
commitd07154b3bc8876ef531a2922f7504e96e1510325 (patch)
tree031c75ea9e6d19a688d9312141320c010a1f688d
parent972868c7e160764541090f4b115414823c80b110 (diff)
downloadnixlib-d07154b3bc8876ef531a2922f7504e96e1510325.tar
nixlib-d07154b3bc8876ef531a2922f7504e96e1510325.tar.gz
nixlib-d07154b3bc8876ef531a2922f7504e96e1510325.tar.bz2
nixlib-d07154b3bc8876ef531a2922f7504e96e1510325.tar.lz
nixlib-d07154b3bc8876ef531a2922f7504e96e1510325.tar.xz
nixlib-d07154b3bc8876ef531a2922f7504e96e1510325.tar.zst
nixlib-d07154b3bc8876ef531a2922f7504e96e1510325.zip
FIX: Change local state dir, which must be writable, from "/nix/store/...glusterfs..." to "/var"
-rw-r--r--pkgs/tools/filesystems/glusterfs/default.nix13
1 files changed, 12 insertions, 1 deletions
diff --git a/pkgs/tools/filesystems/glusterfs/default.nix b/pkgs/tools/filesystems/glusterfs/default.nix
index a101958d8284..47aae427bd11 100644
--- a/pkgs/tools/filesystems/glusterfs/default.nix
+++ b/pkgs/tools/filesystems/glusterfs/default.nix
@@ -19,12 +19,17 @@ stdenv.mkDerivation
 rec {
   inherit (s) name version;
   inherit buildInputs;
+
   preConfigure = ''
     ./autogen.sh
     '';
+
   configureFlags = [
-    ''--with-mountutildir="$out/sbin"''
+    ''--with-mountutildir="$out/sbin" --localstatedir=/var''
     ];
+
+  makeFlags = "DESTDIR=$(out)";
+
   preInstall = ''
     substituteInPlace api/examples/Makefile --replace '$(DESTDIR)' $out
     substituteInPlace geo-replication/syncdaemon/Makefile --replace '$(DESTDIR)' $out
@@ -32,6 +37,12 @@ rec {
     substituteInPlace xlators/features/glupy/examples/Makefile --replace '$(DESTDIR)' $out
     substituteInPlace xlators/features/glupy/src/Makefile --replace '$(DESTDIR)' $out
     '';
+
+  postInstall = ''
+    cp -r $out/$out/* $out
+    rm -r $out/nix
+    '';
+
   src = fetchurl {
     inherit (s) url sha256;
   };