2018-08-28 17:59:16 +02:00
|
|
|
{ stdenv, fetchFromGitHub, meson, pkgconfig, ninja, docutils
|
|
|
|
, fuse3, glib
|
|
|
|
, which, python3Packages
|
2017-09-23 22:16:14 +02:00
|
|
|
}:
|
2007-01-06 18:36:03 +01:00
|
|
|
|
2018-07-20 21:36:12 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-04-13 11:39:12 +02:00
|
|
|
version = "3.5.2";
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "sshfs-fuse";
|
2017-09-22 17:10:12 +02:00
|
|
|
|
2016-02-25 12:27:18 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "libfuse";
|
2017-08-13 22:29:00 +02:00
|
|
|
repo = "sshfs";
|
2016-03-06 17:22:17 +01:00
|
|
|
rev = "sshfs-${version}";
|
2019-04-13 11:39:12 +02:00
|
|
|
sha256 = "0gvk8snivpi2sjidjnd9ypc66ny7lr0z9v4swl56rwjv539dkbx2";
|
2007-01-06 18:36:03 +01:00
|
|
|
};
|
2017-09-22 17:10:12 +02:00
|
|
|
|
2017-12-26 17:55:48 +01:00
|
|
|
nativeBuildInputs = [ meson pkgconfig ninja docutils ];
|
|
|
|
buildInputs = [ fuse3 glib ];
|
2018-08-28 17:59:16 +02:00
|
|
|
checkInputs = [ which python3Packages.pytest ];
|
2016-02-25 12:27:18 +01:00
|
|
|
|
2017-09-22 17:10:12 +02:00
|
|
|
NIX_CFLAGS_COMPILE = stdenv.lib.optional
|
2018-08-20 21:11:29 +02:00
|
|
|
(stdenv.hostPlatform.system == "i686-linux")
|
2017-09-22 17:10:12 +02:00
|
|
|
"-D_FILE_OFFSET_BITS=64";
|
|
|
|
|
2011-08-09 22:38:55 +02:00
|
|
|
postInstall = ''
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/sbin
|
2011-08-09 22:38:55 +02:00
|
|
|
ln -sf $out/bin/sshfs $out/sbin/mount.sshfs
|
|
|
|
'';
|
2007-12-24 14:27:07 +01:00
|
|
|
|
2018-08-28 17:59:16 +02:00
|
|
|
#doCheck = true;
|
2018-08-08 23:34:52 +02:00
|
|
|
checkPhase = ''
|
2018-08-28 17:59:16 +02:00
|
|
|
# The tests need fusermount:
|
|
|
|
mkdir bin && cp ${fuse3}/bin/fusermount3 bin/fusermount
|
|
|
|
export PATH=bin:$PATH
|
|
|
|
# Can't access /dev/fuse within the sandbox: "FUSE kernel module does not seem to be loaded"
|
|
|
|
substituteInPlace test/util.py --replace "/dev/fuse" "/dev/null"
|
|
|
|
# TODO: "fusermount executable not setuid, and we are not root"
|
|
|
|
# We should probably use a VM test instead
|
2018-08-08 23:34:52 +02:00
|
|
|
python3 -m pytest test/
|
|
|
|
'';
|
|
|
|
|
2015-06-22 08:25:07 +02:00
|
|
|
meta = with stdenv.lib; {
|
2017-08-13 22:29:00 +02:00
|
|
|
inherit (src.meta) homepage;
|
2007-12-24 14:27:07 +01:00
|
|
|
description = "FUSE-based filesystem that allows remote filesystems to be mounted over SSH";
|
2015-06-22 08:25:07 +02:00
|
|
|
platforms = platforms.linux;
|
2018-08-11 14:33:17 +02:00
|
|
|
license = licenses.gpl2;
|
2017-08-13 22:29:00 +02:00
|
|
|
maintainers = with maintainers; [ primeos ];
|
2007-12-24 14:27:07 +01:00
|
|
|
};
|
2007-01-06 18:36:03 +01:00
|
|
|
}
|