2020-01-04 10:51:37 -08:00
|
|
|
{ stdenv, fetchFromGitHub
|
|
|
|
, meson, pkgconfig, ninja, docutils, makeWrapper
|
2018-08-28 08:59:16 -07:00
|
|
|
, fuse3, glib
|
|
|
|
, which, python3Packages
|
2019-10-13 02:41:10 -07:00
|
|
|
, openssh
|
2017-09-23 13:16:14 -07:00
|
|
|
}:
|
2007-01-06 09:36:03 -08:00
|
|
|
|
2018-07-20 12:36:12 -07:00
|
|
|
stdenv.mkDerivation rec {
|
2020-01-04 10:51:37 -08:00
|
|
|
version = "3.7.0";
|
2019-08-15 05:41:18 -07:00
|
|
|
pname = "sshfs-fuse";
|
2017-09-22 08:10:12 -07:00
|
|
|
|
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}";
|
2020-01-04 10:51:37 -08:00
|
|
|
sha256 = "119qvjaai3nqs2psqk2kv4gxjchrnrcfnmlwk7yxnj3v59pgyxhv";
|
2007-01-06 09:36:03 -08:00
|
|
|
};
|
2017-09-22 08:10:12 -07:00
|
|
|
|
2019-10-13 02:41:10 -07:00
|
|
|
nativeBuildInputs = [ meson pkgconfig ninja docutils makeWrapper ];
|
2017-12-26 08:55:48 -08:00
|
|
|
buildInputs = [ fuse3 glib ];
|
2018-08-28 08:59:16 -07:00
|
|
|
checkInputs = [ which python3Packages.pytest ];
|
2016-02-25 03:27:18 -08:00
|
|
|
|
2019-10-29 18:29:30 -07:00
|
|
|
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString
|
2018-08-20 12:11:29 -07:00
|
|
|
(stdenv.hostPlatform.system == "i686-linux")
|
2017-09-22 08:10:12 -07:00
|
|
|
"-D_FILE_OFFSET_BITS=64";
|
|
|
|
|
2011-08-09 13:38:55 -07:00
|
|
|
postInstall = ''
|
2012-01-18 12:16:00 -08:00
|
|
|
mkdir -p $out/sbin
|
2011-08-09 13:38:55 -07:00
|
|
|
ln -sf $out/bin/sshfs $out/sbin/mount.sshfs
|
2019-10-13 02:41:10 -07:00
|
|
|
wrapProgram $out/bin/sshfs --prefix PATH : "${openssh}/bin"
|
2011-08-09 13:38:55 -07:00
|
|
|
'';
|
2007-12-24 05:27:07 -08:00
|
|
|
|
2018-08-28 08:59:16 -07:00
|
|
|
#doCheck = true;
|
2018-08-08 14:34:52 -07:00
|
|
|
checkPhase = ''
|
2018-08-28 08:59:16 -07: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 14:34:52 -07:00
|
|
|
python3 -m pytest test/
|
|
|
|
'';
|
|
|
|
|
2015-06-21 23:25:07 -07:00
|
|
|
meta = with stdenv.lib; {
|
2017-08-13 13:29:00 -07:00
|
|
|
inherit (src.meta) homepage;
|
2007-12-24 05:27:07 -08:00
|
|
|
description = "FUSE-based filesystem that allows remote filesystems to be mounted over SSH";
|
2015-06-21 23:25:07 -07:00
|
|
|
platforms = platforms.linux;
|
2018-08-11 05:33:17 -07:00
|
|
|
license = licenses.gpl2;
|
2017-08-13 13:29:00 -07:00
|
|
|
maintainers = with maintainers; [ primeos ];
|
2007-12-24 05:27:07 -08:00
|
|
|
};
|
2007-01-06 09:36:03 -08:00
|
|
|
}
|