about summary refs log tree commit diff
path: root/pkgs/tools/networking/phodav/default.nix
blob: 7a3ce12b55fb2ea71cbfe229eade6d7a8883f251 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{ stdenv
, lib
, fetchurl
, pkg-config
, libsoup_3
, libxml2
, meson
, ninja
, gnome
}:

stdenv.mkDerivation rec {
  pname = "phodav";
  version = "3.0";

  outputs = [ "out" "dev" "lib" ];

  src = fetchurl {
    url = "mirror://gnome/sources/phodav/${version}/phodav-${version}.tar.xz";
    sha256 = "OS7C0G1QMA3P8e8mmiqYUwTim841IAAvyiny7cHRONE=";
  };

  nativeBuildInputs = [
    pkg-config
    meson
    ninja
  ];

  buildInputs = [
    libsoup_3
    libxml2
  ];

  mesonFlags = [
    "-Davahi=disabled"
    "-Dsystemdsystemunitdir=${placeholder "out"}/lib/systemd/system"
    "-Dgtk_doc=disabled"
    "-Dudevrulesdir=${placeholder "out"}/lib/udev/rules.d"
  ];

  NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-lintl";

  passthru = {
    updateScript = gnome.updateScript {
      packageName = pname;
    };
  };

  # We need to do this in pre-configure before the data/ folder disappears.
  preConfigure = ''
    install -vDt $out/lib/udev/rules.d/ data/*-spice-webdavd.rules
  '';

  meta = with lib; {
    description = "WebDav server implementation and library using libsoup";
    homepage = "https://wiki.gnome.org/phodav";
    license = licenses.lgpl21Plus;
    maintainers = with maintainers; [ wegank ];
    platforms = platforms.unix;
  };
}