From d07154b3bc8876ef531a2922f7504e96e1510325 Mon Sep 17 00:00:00 2001 From: Thomas Strobel Date: Thu, 18 Dec 2014 11:20:03 +0100 Subject: [PATCH] FIX: Change local state dir, which must be writable, from "/nix/store/...glusterfs..." to "/var" --- pkgs/tools/filesystems/glusterfs/default.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/filesystems/glusterfs/default.nix b/pkgs/tools/filesystems/glusterfs/default.nix index a101958d828..47aae427bd1 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; };