@@ -0,0 +1,31 @@
1+{ stdenv, fetchurl, fetchpatch }:
2+
3+stdenv.mkDerivation rec {
4+ name= "nextcloud-${version}";
5+ version = "10.0.0";
6+
7+ src = fetchurl {
8+ url = "https://download.nextcloud.com/server/releases/${name}.tar.bz2";
9+ sha256 = "07vnhw3xrady7p7y2hc3sm9bcdj21gxyx9rwgawmy28019y1gahs";
10+ };
11+
12+ patches = [
13+ (fetchpatch {
14+ name = "env-variable.patch";
15+ url = "https://github.com/nextcloud/server/commit/4277051442c2b6025da936493cb674dcf754d34c.patch";
16+ sha256 = "1r1xcka9j9n0mkvj2nnhlwvhzicv9jjnxcszxs5g5ji88i1y0md2";
17+ }) # exposes $NEXTCLOUD_CONFIG_DIR for Nextcloud 10 and below
18+ ];
19+
20+ installPhase = ''
21+ mkdir -p $out/
22+ cp -R ./* $out/
23+ '';
24+
25+ meta = {
26+ description = "Sharing solution for files, calendars, contacts and more";
27+ homepage = https://nextcloud.com;
28+ license = stdenv.lib.licenses.agpl3Plus;
29+ platforms = with stdenv.lib.platforms; unix;
30+ };
31+}