about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/nfs-ganesha/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/servers/nfs-ganesha/default.nix')
-rw-r--r--nixpkgs/pkgs/servers/nfs-ganesha/default.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/nfs-ganesha/default.nix b/nixpkgs/pkgs/servers/nfs-ganesha/default.nix
index 5f32437970c9..54f0cdbd4857 100644
--- a/nixpkgs/pkgs/servers/nfs-ganesha/default.nix
+++ b/nixpkgs/pkgs/servers/nfs-ganesha/default.nix
@@ -6,6 +6,7 @@
 stdenv.mkDerivation rec {
   pname = "nfs-ganesha";
   version = "5.7";
+  outputs = [ "out" "tools" ];
 
   src = fetchFromGitHub {
     owner = "nfs-ganesha";
@@ -43,10 +44,18 @@ stdenv.mkDerivation rec {
     nfs-utils
   ];
 
+  postPatch = ''
+    substituteInPlace src/tools/mount.9P --replace "/bin/mount" "/usr/bin/env mount"
+  '';
+
   postFixup = ''
     patchelf --add-rpath $out/lib $out/bin/ganesha.nfsd
   '';
 
+  postInstall = ''
+    install -Dm755 $src/src/tools/mount.9P $tools/bin/mount.9P
+  '';
+
   meta = with lib; {
     description = "NFS server that runs in user space";
     homepage = "https://github.com/nfs-ganesha/nfs-ganesha/wiki";
@@ -54,5 +63,6 @@ stdenv.mkDerivation rec {
     platforms = platforms.linux;
     license = licenses.lgpl3Plus;
     mainProgram = "ganesha.nfsd";
+    outputsToInstall = [ "out" "tools" ];
   };
 }