nixpkgs/pkgs/tools/filesystems/sshfs-fuse/default.nix

44 lines
1.1 KiB
Nix
Raw Normal View History

2017-09-23 13:16:14 -07:00
{ stdenv, fetchFromGitHub, meson, pkgconfig, ninja, glib, fuse3
, buildManPages ? true, docutils
}:
2017-09-23 13:16:14 -07:00
let
inherit (stdenv.lib) optional;
rpath = stdenv.lib.makeLibraryPath [ fuse3 glib ];
in stdenv.mkDerivation rec {
version = "3.3.0";
2016-03-06 08:22:17 -08:00
name = "sshfs-fuse-${version}";
2016-02-25 03:27:18 -08:00
src = fetchFromGitHub {
owner = "libfuse";
2017-08-13 13:29:00 -07:00
repo = "sshfs";
2016-03-06 08:22:17 -08:00
rev = "sshfs-${version}";
2017-09-23 13:16:14 -07:00
sha256 = "1hn5c0059ppjqygdhvapxm7lrqm5bnpwaxgjylskz04c0vr8nygp";
};
2017-09-23 13:16:14 -07:00
patches = optional buildManPages ./build-man-pages.patch;
nativeBuildInputs = [ meson pkgconfig ninja ];
buildInputs = [ fuse3 glib ] ++ optional buildManPages docutils;
2016-02-25 03:27:18 -08:00
NIX_CFLAGS_COMPILE = stdenv.lib.optional
(stdenv.system == "i686-linux")
"-D_FILE_OFFSET_BITS=64";
postInstall = ''
mkdir -p $out/sbin
ln -sf $out/bin/sshfs $out/sbin/mount.sshfs
'';
2017-09-23 13:16:14 -07:00
postFixup = ''
patchelf --set-rpath '${rpath}' "$out/bin/sshfs"
'';
2015-06-21 23:25:07 -07:00
meta = with stdenv.lib; {
2017-08-13 13:29:00 -07:00
inherit (src.meta) homepage;
description = "FUSE-based filesystem that allows remote filesystems to be mounted over SSH";
2015-06-21 23:25:07 -07:00
platforms = platforms.linux;
2017-08-13 13:29:00 -07:00
maintainers = with maintainers; [ primeos ];
};
}