From 0ede7366409e14482017f70f1efc53426279b8d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Sun, 5 May 2019 19:06:39 +0200 Subject: Move nextcloud and apps to pkgs --- pkgs/webapps/default.nix | 14 ++++++- pkgs/webapps/nextcloud/apps/audioplayer.nix | 7 ++++ pkgs/webapps/nextcloud/apps/bookmarks.nix | 7 ++++ pkgs/webapps/nextcloud/apps/calendar.nix | 7 ++++ pkgs/webapps/nextcloud/apps/contacts.nix | 7 ++++ pkgs/webapps/nextcloud/apps/deck.nix | 7 ++++ pkgs/webapps/nextcloud/apps/files_markdown.nix | 7 ++++ pkgs/webapps/nextcloud/apps/gpxedit.nix | 7 ++++ pkgs/webapps/nextcloud/apps/gpxpod.nix | 7 ++++ pkgs/webapps/nextcloud/apps/keeweb.nix | 12 ++++++ pkgs/webapps/nextcloud/apps/music.nix | 7 ++++ pkgs/webapps/nextcloud/apps/notes.nix | 7 ++++ pkgs/webapps/nextcloud/apps/ocsms.nix | 12 ++++++ pkgs/webapps/nextcloud/apps/passman.nix | 7 ++++ pkgs/webapps/nextcloud/apps/spreed.nix | 7 ++++ pkgs/webapps/nextcloud/apps/tasks.nix | 7 ++++ pkgs/webapps/nextcloud/default.nix | 51 ++++++++++++++++++++++++++ 17 files changed, 178 insertions(+), 2 deletions(-) create mode 100644 pkgs/webapps/nextcloud/apps/audioplayer.nix create mode 100644 pkgs/webapps/nextcloud/apps/bookmarks.nix create mode 100644 pkgs/webapps/nextcloud/apps/calendar.nix create mode 100644 pkgs/webapps/nextcloud/apps/contacts.nix create mode 100644 pkgs/webapps/nextcloud/apps/deck.nix create mode 100644 pkgs/webapps/nextcloud/apps/files_markdown.nix create mode 100644 pkgs/webapps/nextcloud/apps/gpxedit.nix create mode 100644 pkgs/webapps/nextcloud/apps/gpxpod.nix create mode 100644 pkgs/webapps/nextcloud/apps/keeweb.nix create mode 100644 pkgs/webapps/nextcloud/apps/music.nix create mode 100644 pkgs/webapps/nextcloud/apps/notes.nix create mode 100644 pkgs/webapps/nextcloud/apps/ocsms.nix create mode 100644 pkgs/webapps/nextcloud/apps/passman.nix create mode 100644 pkgs/webapps/nextcloud/apps/spreed.nix create mode 100644 pkgs/webapps/nextcloud/apps/tasks.nix create mode 100644 pkgs/webapps/nextcloud/default.nix (limited to 'pkgs/webapps') diff --git a/pkgs/webapps/default.nix b/pkgs/webapps/default.nix index 24c184d..6afccde 100644 --- a/pkgs/webapps/default.nix +++ b/pkgs/webapps/default.nix @@ -1,8 +1,18 @@ -{ callPackage, mylibs }: -{ +{ callPackage, mylibs, lib }: +rec { diaspora = callPackage ./diaspora { inherit mylibs; }; mastodon = callPackage ./mastodon { inherit mylibs; }; awl = callPackage ./awl {}; davical = callPackage ./davical {}; infcloud = callPackage ./infcloud {}; + nextcloud = callPackage ./nextcloud {}; + nextcloud-apps = let + names = [ + "audioplayer" "bookmarks" "calendar" "contacts" "deck" + "files_markdown" "gpxedit" "gpxpod" "keeweb" "music" + "notes" "ocsms" "passman" "spreed" "tasks" + ]; + in + lib.attrsets.genAttrs names + (name: callPackage (./nextcloud/apps + "/${name}.nix") { buildApp = nextcloud.buildApp; }); } diff --git a/pkgs/webapps/nextcloud/apps/audioplayer.nix b/pkgs/webapps/nextcloud/apps/audioplayer.nix new file mode 100644 index 0000000..e8cd307 --- /dev/null +++ b/pkgs/webapps/nextcloud/apps/audioplayer.nix @@ -0,0 +1,7 @@ +{ buildApp }: +buildApp rec { + appName = "audioplayer"; + version = "2.6.0"; + url = "https://github.com/Rello/${appName}/releases/download/${version}/${appName}-${version}.tar.gz"; + sha256 = "08apm7dhnljagcvq8b1dsqcck4nqwmz60bf3mx44xvbhiaq6nim4"; +} diff --git a/pkgs/webapps/nextcloud/apps/bookmarks.nix b/pkgs/webapps/nextcloud/apps/bookmarks.nix new file mode 100644 index 0000000..3667c16 --- /dev/null +++ b/pkgs/webapps/nextcloud/apps/bookmarks.nix @@ -0,0 +1,7 @@ +{ buildApp }: +buildApp rec { + appName = "bookmarks"; + version = "0.16.2"; + url = "https://github.com/nextcloud/${appName}/releases/download/v${version}/${appName}-${version}.tar.gz"; + sha256 = "0ghk71iyk5xlqsfahg0d0lpp9lparpdnv2qx11a7j64pc9gzcfl4"; +} diff --git a/pkgs/webapps/nextcloud/apps/calendar.nix b/pkgs/webapps/nextcloud/apps/calendar.nix new file mode 100644 index 0000000..1162f57 --- /dev/null +++ b/pkgs/webapps/nextcloud/apps/calendar.nix @@ -0,0 +1,7 @@ +{ buildApp }: +buildApp rec { + appName = "calendar"; + version = "1.6.4"; + url = "https://github.com/nextcloud/${appName}/releases/download/v${version}/${appName}.tar.gz"; + sha256 = "00dijvcvy7snsjslfbyzvpp9anhms22zp1f0zkj89ln33jmana63"; +} diff --git a/pkgs/webapps/nextcloud/apps/contacts.nix b/pkgs/webapps/nextcloud/apps/contacts.nix new file mode 100644 index 0000000..f553210 --- /dev/null +++ b/pkgs/webapps/nextcloud/apps/contacts.nix @@ -0,0 +1,7 @@ +{ buildApp }: +buildApp rec { + appName = "contacts"; + version = "3.0.3"; + url = "https://github.com/nextcloud/${appName}/releases/download/v${version}/${appName}.tar.gz"; + sha256 = "026hfigfzqb1cvq6a7mg9656nkm21c19a6ipqzgv00ycf38qyk95"; +} diff --git a/pkgs/webapps/nextcloud/apps/deck.nix b/pkgs/webapps/nextcloud/apps/deck.nix new file mode 100644 index 0000000..9b4e8c4 --- /dev/null +++ b/pkgs/webapps/nextcloud/apps/deck.nix @@ -0,0 +1,7 @@ +{ buildApp }: +buildApp rec { + appName = "deck"; + version = "0.5.2"; + url = "https://github.com/nextcloud/${appName}/releases/download/v${version}/${appName}.tar.gz"; + sha256 = "1kygzixxdkp3dbma009p3pw0fj8wgcqcv39n7pay78lh6zi3nic7"; +} diff --git a/pkgs/webapps/nextcloud/apps/files_markdown.nix b/pkgs/webapps/nextcloud/apps/files_markdown.nix new file mode 100644 index 0000000..9ccfe18 --- /dev/null +++ b/pkgs/webapps/nextcloud/apps/files_markdown.nix @@ -0,0 +1,7 @@ +{ buildApp }: +buildApp rec { + appName = "files_markdown"; + version = "2.0.5"; + url = "https://github.com/icewind1991/${appName}/releases/download/v${version}/${appName}.tar.gz"; + sha256 = "1dzvy4c6vff2qmkwqw13dx92xdkafaxgnipswjw44mh0ncc2n9ym"; +} diff --git a/pkgs/webapps/nextcloud/apps/gpxedit.nix b/pkgs/webapps/nextcloud/apps/gpxedit.nix new file mode 100644 index 0000000..afd2410 --- /dev/null +++ b/pkgs/webapps/nextcloud/apps/gpxedit.nix @@ -0,0 +1,7 @@ +{ buildApp }: +buildApp rec { + appName = "gpxedit"; + version = "0.0.10"; + url = "https://gitlab.com/eneiluj/gpxedit-oc/wikis/uploads/33d187268c5f6f6a55350d656305701c/${appName}-${version}.tar.gz"; + sha256 = "0ynpaxm0xhvcj8xax6rm1w0p6j57wbqidhi7bhn268n483gwl2sw"; +} diff --git a/pkgs/webapps/nextcloud/apps/gpxpod.nix b/pkgs/webapps/nextcloud/apps/gpxpod.nix new file mode 100644 index 0000000..c2e9a80 --- /dev/null +++ b/pkgs/webapps/nextcloud/apps/gpxpod.nix @@ -0,0 +1,7 @@ +{ buildApp }: +buildApp rec { + appName = "gpxpod"; + version = "3.0.1"; + url = "https://gitlab.com/eneiluj/gpxpod-oc/wikis/uploads/3f5fbc895de15f11f90582c4872839dc/${appName}-${version}.tar.gz"; + sha256 = "1g3602phrdpybamr4bnk5niv1znmwp19lqyw6d8yxmc84lg99dny"; +} diff --git a/pkgs/webapps/nextcloud/apps/keeweb.nix b/pkgs/webapps/nextcloud/apps/keeweb.nix new file mode 100644 index 0000000..cff6bca --- /dev/null +++ b/pkgs/webapps/nextcloud/apps/keeweb.nix @@ -0,0 +1,12 @@ +{ buildApp }: +buildApp rec { + appName = "keeweb"; + version = "0.4.0"; + url = "https://github.com/jhass/nextcloud-keeweb/releases/download/v${version}/${appName}-${version}.tar.gz"; + sha256 = "0453kkb0a8vfivmibpwpx4bvhyn64jhns6cdfjacmnvbm6d75nj1"; + installPhase = '' + mkdir -p $out + cp -R . $out/ + sed -i -e 's/max-version="12"/max-version="16"/' $out/appinfo/info.xml + ''; +} diff --git a/pkgs/webapps/nextcloud/apps/music.nix b/pkgs/webapps/nextcloud/apps/music.nix new file mode 100644 index 0000000..4cb1c9b --- /dev/null +++ b/pkgs/webapps/nextcloud/apps/music.nix @@ -0,0 +1,7 @@ +{ buildApp }: +buildApp rec { + appName = "music"; + version = "0.9.3"; + url = "https://github.com/owncloud/${appName}/archive/v${version}.tar.gz"; + sha256 = "1x4c2v8hnm9yi3fzjglfwd2brzn99v8zavgfczc5jfj30v3n555z"; +} diff --git a/pkgs/webapps/nextcloud/apps/notes.nix b/pkgs/webapps/nextcloud/apps/notes.nix new file mode 100644 index 0000000..1edb5f4 --- /dev/null +++ b/pkgs/webapps/nextcloud/apps/notes.nix @@ -0,0 +1,7 @@ +{ buildApp }: +buildApp rec { + appName = "notes"; + version = "2.5.1"; + url = "https://github.com/nextcloud/${appName}/releases/download/v${version}/${appName}.tar.gz"; + sha256 = "1albzqqsdirzyw8vhvs7r0qm2wqp8vm9vmxm4crhncd85bk01hmh"; +} diff --git a/pkgs/webapps/nextcloud/apps/ocsms.nix b/pkgs/webapps/nextcloud/apps/ocsms.nix new file mode 100644 index 0000000..a1d5e0e --- /dev/null +++ b/pkgs/webapps/nextcloud/apps/ocsms.nix @@ -0,0 +1,12 @@ +{ buildApp }: +buildApp rec { + appName = "ocsms"; + version = "2.1.1"; + url = "https://github.com/nextcloud/${appName}/releases/download/${version}/${appName}-${version}.tar.gz"; + sha256 = "0sgfbmy1c8rgzjvf9snc7rzgp8aqsc65zfwgi6qcsf2g6gam5n7a"; + installPhase = '' + sed -i -e "/addScript.*devel/d" -e "s@//\(.*addScript.*app.min\)@\1@" templates/main.php + mkdir -p $out + cp -R . $out/ + ''; +} diff --git a/pkgs/webapps/nextcloud/apps/passman.nix b/pkgs/webapps/nextcloud/apps/passman.nix new file mode 100644 index 0000000..869acb3 --- /dev/null +++ b/pkgs/webapps/nextcloud/apps/passman.nix @@ -0,0 +1,7 @@ +{ buildApp }: +buildApp rec { + appName = "passman"; + version = "2.2.1"; + url = "https://releases.passman.cc/${appName}_${version}.tar.gz"; + sha256 = "064pq9d0pl3y1vcywpi19fg47zy7j4h0jaxy6jklwzwcrmzagbka"; +} diff --git a/pkgs/webapps/nextcloud/apps/spreed.nix b/pkgs/webapps/nextcloud/apps/spreed.nix new file mode 100644 index 0000000..dba9bae --- /dev/null +++ b/pkgs/webapps/nextcloud/apps/spreed.nix @@ -0,0 +1,7 @@ +{ buildApp }: +buildApp rec { + appName = "spreed"; + version = "5.0.2"; + url = "https://github.com/nextcloud/${appName}/releases/download/v${version}/${appName}-${version}.tar.gz"; + sha256 = "0z9zhpkq485lhwirc2f04427rd47hzv0r8frz72dkrszb037qjvv"; +} diff --git a/pkgs/webapps/nextcloud/apps/tasks.nix b/pkgs/webapps/nextcloud/apps/tasks.nix new file mode 100644 index 0000000..950bd2d --- /dev/null +++ b/pkgs/webapps/nextcloud/apps/tasks.nix @@ -0,0 +1,7 @@ +{ buildApp }: +buildApp rec { + appName = "tasks"; + version = "0.9.8"; + url = "https://github.com/nextcloud/${appName}/releases/download/v${version}/${appName}.tar.gz"; + sha256 = "089m124lfsfk09fqj50x9n7zndq97jp5afgb8s001rpmzym4g6ny"; +} diff --git a/pkgs/webapps/nextcloud/default.nix b/pkgs/webapps/nextcloud/default.nix new file mode 100644 index 0000000..c3471fe --- /dev/null +++ b/pkgs/webapps/nextcloud/default.nix @@ -0,0 +1,51 @@ +{ varDir ? "/var/lib/nextcloud", lib, stdenv, fetchurl }: +let + buildApp = { appName, version, url, sha256, installPhase ? "mkdir -p $out && cp -R . $out/" }: + stdenv.mkDerivation rec { + name = "nextcloud-app-${appName}-${version}"; + inherit version; + phases = "unpackPhase installPhase"; + inherit installPhase; + src = fetchurl { inherit url sha256; }; + passthru.appName = appName; + }; + withApps = apps: package.overrideAttrs(old: { + name = "${old.name}-with-apps"; + + installPhase = old.installPhase + ( + builtins.concatStringsSep "\n" ( + map (value: "ln -sf ${value} $out/apps/${value.appName}") apps + )); + passthru.apps = apps; + passthru.withApps = moreApps: old.withApps (moreApps ++ apps); + }); + + package = stdenv.mkDerivation rec { + name = "nextcloud-${version}"; + version = "15.0.4"; + + src = fetchurl { + url = "https://download.nextcloud.com/server/releases/${name}.tar.bz2"; + sha256 = "0xwg7p31y1pkjk1pzygh9shpqxnfkafrab52j7in7xblq53v0zgq"; + }; + + installPhase = '' + mkdir -p $out/ + cp -R . $out/ + rm -r $out/config + ln -sf ${varDir}/config $out/config + ''; + + passthru = { + apps = []; + inherit buildApp withApps varDir; + }; + meta = { + description = "Sharing solution for files, calendars, contacts and more"; + homepage = https://nextcloud.com; + maintainers = with lib.maintainers; [ schneefux bachp globin fpletz ]; + license = lib.licenses.agpl3Plus; + platforms = with lib.platforms; unix; + }; + }; +in package -- cgit v1.2.3