lol
1{ lib, stdenv
2, fetchurl
3, autoreconfHook
4, neon
5, procps
6, substituteAll
7, zlib
8, wrapperDir ? "/run/wrappers/bin"
9}:
10
11stdenv.mkDerivation rec {
12 pname = "davfs2";
13 version = "1.7.0";
14
15 src = fetchurl {
16 url = "mirror://savannah/davfs2/davfs2-${version}.tar.gz";
17 sha256 = "sha256-JR23Wic4DMoTMLG5cXAMXl3MDJDlpHYiKF8BQO3+Oi8=";
18 };
19
20 nativeBuildInputs = [
21 autoreconfHook
22 ];
23
24 buildInputs = [
25 zlib
26 ];
27
28 patches = [
29 ./fix-sysconfdir.patch
30 ./disable-suid.patch
31 (substituteAll {
32 src = ./0001-umount_davfs-substitute-ps-command.patch;
33 ps = "${procps}/bin/ps";
34 })
35 (substituteAll {
36 src = ./0002-Make-sure-that-the-setuid-wrapped-umount-is-invoked.patch;
37 inherit wrapperDir;
38 })
39 ];
40
41 configureFlags = [
42 "--sysconfdir=/etc"
43 "--with-neon=${lib.getLib neon}"
44 ];
45
46 meta = {
47 homepage = "https://savannah.nongnu.org/projects/davfs2";
48 description = "Mount WebDAV shares like a typical filesystem";
49 license = lib.licenses.gpl3Plus;
50
51 longDescription = ''
52 Web Distributed Authoring and Versioning (WebDAV), an extension to
53 the HTTP-protocol, allows authoring of resources on a remote web
54 server. davfs2 provides the ability to access such resources like
55 a typical filesystem, allowing for use by standard applications
56 with no built-in support for WebDAV.
57 '';
58
59 platforms = lib.platforms.linux;
60 maintainers = with lib.maintainers; [ fgaz ];
61 };
62}