Merge pull request #238407 from RaitoBezarius/licenses-for-nc-plugins

This commit is contained in:
Ryan Lahfa 2023-08-26 13:38:21 +02:00 committed by GitHub
commit 3506ce32c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 90 additions and 72 deletions

View file

@ -1,17 +1,14 @@
{ stdenv, fetchzip, applyPatches, ... }:
{ stdenv, fetchzip, applyPatches, lib, ... }:
{ url
, sha256
, appName ? null
, appVersion ? null
, license
, patches ? [ ]
, name ? null
, version ? null
, description ? null
, homepage ? null
}:
if name != null || version != null then throw ''
`pkgs.fetchNextcloudApp` has been changed to use `fetchzip`.
To update, please
* remove `name`/`version`
* update the hash
''
else applyPatches {
applyPatches ({
inherit patches;
src = fetchzip {
inherit url sha256;
@ -23,5 +20,16 @@ else applyPatches {
fi
popd &>/dev/null
'';
meta = {
license = lib.licenses.${license};
longDescription = description;
inherit homepage;
} // lib.optionalAttrs (description != null) {
longDescription = description;
} // lib.optionalAttrs (homepage != null) {
inherit homepage;
};
};
}
} // lib.optionalAttrs (appName != null && appVersion != null) {
name = "nextcloud-app-${appName}-${appVersion}";
})

View file

@ -905,13 +905,17 @@ rec {
) + "-patched"
, patches ? []
, postPatch ? ""
}: stdenvNoCC.mkDerivation {
, ...
}@args: stdenvNoCC.mkDerivation {
inherit name src patches postPatch;
preferLocalBuild = true;
allowSubstitutes = false;
phases = "unpackPhase patchPhase installPhase";
installPhase = "cp -R ./ $out";
};
}
# Carry `meta` information from the underlying `src` if present.
// (optionalAttrs (src?meta) { inherit (src) meta; })
// (removeAttrs args [ "src" "name" "patches" "postPatch" ]);
/* An immutable file in the store with a length of 0 bytes. */
emptyFile = runCommand "empty-file" {

View file

@ -3,7 +3,7 @@
"sha256": "1kdpma5f3rb9g29j364lqv6bkar5qgwlvcxmhpmzllwlkmjpc9w8",
"url": "https://github.com/nextcloud/bookmarks/releases/download/v12.1.0/bookmarks-12.1.0.tar.gz",
"version": "12.1.0",
"description": "- 📂 Sort bookmarks into folders\n- 🏷 Add tags and personal notes\n- 🔍 Full-text search\n- 📲 Synchronize with all your browsers and devices\n- 👪 Share bookmarks with other users and publicly\n- ☠ Find broken links\n- ⚛ Generate RSS feeds of your collections\n- 📔 Read archived versions of your links in case they are depublished\n- 💬 Create new bookmarks directly from within Nextcloud Talk\n- 💼 Built-in Dashboard widgets for frequent and recent links\n\nRequirements:\n - PHP v7.4+\n - PHP extensions:\n - intl: *\n - mbstring: *\n - when using MySQL, use at least v8.0",
"description": "- 📂 Sort bookmarks into folders\n- 🏷 Add tags and personal notes\n- 🔍 Full-text search\n- 📲 Synchronize with all your browsers and devices\n- 👪 Share bookmarks with other users and publicly\n- ☠ Find broken links\n- ⚛ Generate RSS feeds of your collections\n- 📔 Read archived versions of your links in case they are depublished\n- 💬 Create new bookmarks directly from within Nextcloud Talk\n- 💼 Built-in Dashboard widgets for frequent and recent links\n\nRequirements:\n - PHP extensions:\n - intl: *\n - mbstring: *\n - when using MySQL, use at least v8.0",
"homepage": "https://github.com/nextcloud/bookmarks",
"licenses": [
"agpl"
@ -140,9 +140,9 @@
]
},
"news": {
"sha256": "1z08k8xnyv71zj0djlv339faq9lx23mlqgjanf2jhv6jhh8cy5c6",
"url": "https://github.com/nextcloud/news/releases/download/22.0.0/news.tar.gz",
"version": "22.0.0",
"sha256": "1j9dhqz5anwsmw3f8hbhvqc2h1fp15zmxzdbpnz1p3vwqf8f5cjs",
"url": "https://github.com/nextcloud/news/releases/download/23.0.0/news.tar.gz",
"version": "23.0.0",
"description": "📰 A RSS/Atom Feed reader App for Nextcloud\n\n- 📲 Synchronize your feeds with multiple mobile or desktop [clients](https://nextcloud.github.io/news/clients/)\n- 🔄 Automatic updates of your news feeds\n- 🆓 Free and open source under AGPLv3, no ads or premium functions\n\n**System Cron is currently required for this app to work**\n\nRequirements can be found [here](https://nextcloud.github.io/news/install/#dependencies)\n\nThe Changelog is available [here](https://github.com/nextcloud/news/blob/master/CHANGELOG.md)\n\nCreate a [bug report](https://github.com/nextcloud/news/issues/new/choose)\n\nCreate a [feature request](https://github.com/nextcloud/news/discussions/new)\n\nReport a [feed issue](https://github.com/nextcloud/news/discussions/new)",
"homepage": "https://github.com/nextcloud/news",
"licenses": [
@ -170,9 +170,9 @@
]
},
"onlyoffice": {
"sha256": "10axh9a4w8y3iw95xdjn4q8wjg5459dki42xb6cax5ikimyfv07j",
"url": "https://github.com/ONLYOFFICE/onlyoffice-nextcloud/releases/download/v7.8.0/onlyoffice.tar.gz",
"version": "7.8.0",
"sha256": "12hzmngps86ha4lcfwaf62svfz41aywykq0z419r644g5i4v7raq",
"url": "https://github.com/ONLYOFFICE/onlyoffice-nextcloud/releases/download/v7.9.0/onlyoffice.tar.gz",
"version": "7.9.0",
"description": "ONLYOFFICE connector allows you to view, edit and collaborate on text documents, spreadsheets and presentations within Nextcloud using ONLYOFFICE Docs. This will create a new Edit in ONLYOFFICE action within the document library for Office documents. This allows multiple users to co-author documents in real time from the familiar web interface and save the changes back to your file storage.",
"homepage": "https://www.onlyoffice.com",
"licenses": [

View file

@ -1,9 +1,9 @@
{
"bookmarks": {
"sha256": "0xx331bgly91y8ncxk36ha3ncrr2xlivblfi7rix6ffkrdx73yb9",
"url": "https://github.com/nextcloud/bookmarks/releases/download/v13.0.1/bookmarks-13.0.1.tar.gz",
"version": "13.0.1",
"description": "- 📂 Sort bookmarks into folders\n- 🏷 Add tags and personal notes\n- 🔍 Full-text search\n- 📲 Synchronize with all your browsers and devices\n- 👪 Share bookmarks with other users and publicly\n- ☠ Find broken links\n- ⚛ Generate RSS feeds of your collections\n- 📔 Read archived versions of your links in case they are depublished\n- 💬 Create new bookmarks directly from within Nextcloud Talk\n- 💼 Built-in Dashboard widgets for frequent and recent links\n\nRequirements:\n - PHP v7.4+\n - PHP extensions:\n - intl: *\n - mbstring: *\n - when using MySQL, use at least v8.0",
"sha256": "16j10gj5nghgji36jhng60291wl4h9c3vndjx9j8jij9qn6hz23f",
"url": "https://github.com/nextcloud/bookmarks/releases/download/v13.1.0/bookmarks-13.1.0.tar.gz",
"version": "13.1.0",
"description": "- 📂 Sort bookmarks into folders\n- 🏷 Add tags and personal notes\n- 🔍 Full-text search\n- 📲 Synchronize with all your browsers and devices\n- 👪 Share bookmarks with other users and publicly\n- ☠ Find broken links\n- ⚛ Generate RSS feeds of your collections\n- 📔 Read archived versions of your links in case they are depublished\n- 💬 Create new bookmarks directly from within Nextcloud Talk\n- 💼 Built-in Dashboard widgets for frequent and recent links\n\nRequirements:\n - PHP extensions:\n - intl: *\n - mbstring: *\n - when using MySQL, use at least v8.0",
"homepage": "https://github.com/nextcloud/bookmarks",
"licenses": [
"agpl"
@ -140,9 +140,9 @@
]
},
"news": {
"sha256": "1z08k8xnyv71zj0djlv339faq9lx23mlqgjanf2jhv6jhh8cy5c6",
"url": "https://github.com/nextcloud/news/releases/download/22.0.0/news.tar.gz",
"version": "22.0.0",
"sha256": "1j9dhqz5anwsmw3f8hbhvqc2h1fp15zmxzdbpnz1p3vwqf8f5cjs",
"url": "https://github.com/nextcloud/news/releases/download/23.0.0/news.tar.gz",
"version": "23.0.0",
"description": "📰 A RSS/Atom Feed reader App for Nextcloud\n\n- 📲 Synchronize your feeds with multiple mobile or desktop [clients](https://nextcloud.github.io/news/clients/)\n- 🔄 Automatic updates of your news feeds\n- 🆓 Free and open source under AGPLv3, no ads or premium functions\n\n**System Cron is currently required for this app to work**\n\nRequirements can be found [here](https://nextcloud.github.io/news/install/#dependencies)\n\nThe Changelog is available [here](https://github.com/nextcloud/news/blob/master/CHANGELOG.md)\n\nCreate a [bug report](https://github.com/nextcloud/news/issues/new/choose)\n\nCreate a [feature request](https://github.com/nextcloud/news/discussions/new)\n\nReport a [feed issue](https://github.com/nextcloud/news/discussions/new)",
"homepage": "https://github.com/nextcloud/news",
"licenses": [
@ -170,9 +170,9 @@
]
},
"onlyoffice": {
"sha256": "10axh9a4w8y3iw95xdjn4q8wjg5459dki42xb6cax5ikimyfv07j",
"url": "https://github.com/ONLYOFFICE/onlyoffice-nextcloud/releases/download/v7.8.0/onlyoffice.tar.gz",
"version": "7.8.0",
"sha256": "12hzmngps86ha4lcfwaf62svfz41aywykq0z419r644g5i4v7raq",
"url": "https://github.com/ONLYOFFICE/onlyoffice-nextcloud/releases/download/v7.9.0/onlyoffice.tar.gz",
"version": "7.9.0",
"description": "ONLYOFFICE connector allows you to view, edit and collaborate on text documents, spreadsheets and presentations within Nextcloud using ONLYOFFICE Docs. This will create a new Edit in ONLYOFFICE action within the document library for Office documents. This allows multiple users to co-author documents in real time from the familiar web interface and save the changes back to your file storage.",
"homepage": "https://www.onlyoffice.com",
"licenses": [

View file

@ -1,9 +1,9 @@
{
"bookmarks": {
"sha256": "0xx331bgly91y8ncxk36ha3ncrr2xlivblfi7rix6ffkrdx73yb9",
"url": "https://github.com/nextcloud/bookmarks/releases/download/v13.0.1/bookmarks-13.0.1.tar.gz",
"version": "13.0.1",
"description": "- 📂 Sort bookmarks into folders\n- 🏷 Add tags and personal notes\n- 🔍 Full-text search\n- 📲 Synchronize with all your browsers and devices\n- 👪 Share bookmarks with other users and publicly\n- ☠ Find broken links\n- ⚛ Generate RSS feeds of your collections\n- 📔 Read archived versions of your links in case they are depublished\n- 💬 Create new bookmarks directly from within Nextcloud Talk\n- 💼 Built-in Dashboard widgets for frequent and recent links\n\nRequirements:\n - PHP v7.4+\n - PHP extensions:\n - intl: *\n - mbstring: *\n - when using MySQL, use at least v8.0",
"sha256": "16j10gj5nghgji36jhng60291wl4h9c3vndjx9j8jij9qn6hz23f",
"url": "https://github.com/nextcloud/bookmarks/releases/download/v13.1.0/bookmarks-13.1.0.tar.gz",
"version": "13.1.0",
"description": "- 📂 Sort bookmarks into folders\n- 🏷 Add tags and personal notes\n- 🔍 Full-text search\n- 📲 Synchronize with all your browsers and devices\n- 👪 Share bookmarks with other users and publicly\n- ☠ Find broken links\n- ⚛ Generate RSS feeds of your collections\n- 📔 Read archived versions of your links in case they are depublished\n- 💬 Create new bookmarks directly from within Nextcloud Talk\n- 💼 Built-in Dashboard widgets for frequent and recent links\n\nRequirements:\n - PHP extensions:\n - intl: *\n - mbstring: *\n - when using MySQL, use at least v8.0",
"homepage": "https://github.com/nextcloud/bookmarks",
"licenses": [
"agpl"
@ -140,9 +140,9 @@
]
},
"news": {
"sha256": "1z08k8xnyv71zj0djlv339faq9lx23mlqgjanf2jhv6jhh8cy5c6",
"url": "https://github.com/nextcloud/news/releases/download/22.0.0/news.tar.gz",
"version": "22.0.0",
"sha256": "1j9dhqz5anwsmw3f8hbhvqc2h1fp15zmxzdbpnz1p3vwqf8f5cjs",
"url": "https://github.com/nextcloud/news/releases/download/23.0.0/news.tar.gz",
"version": "23.0.0",
"description": "📰 A RSS/Atom Feed reader App for Nextcloud\n\n- 📲 Synchronize your feeds with multiple mobile or desktop [clients](https://nextcloud.github.io/news/clients/)\n- 🔄 Automatic updates of your news feeds\n- 🆓 Free and open source under AGPLv3, no ads or premium functions\n\n**System Cron is currently required for this app to work**\n\nRequirements can be found [here](https://nextcloud.github.io/news/install/#dependencies)\n\nThe Changelog is available [here](https://github.com/nextcloud/news/blob/master/CHANGELOG.md)\n\nCreate a [bug report](https://github.com/nextcloud/news/issues/new/choose)\n\nCreate a [feature request](https://github.com/nextcloud/news/discussions/new)\n\nReport a [feed issue](https://github.com/nextcloud/news/discussions/new)",
"homepage": "https://github.com/nextcloud/news",
"licenses": [

View file

@ -9,15 +9,21 @@ let packages = self:
generatedJson = {
inherit apps;
};
appBaseDefs = builtins.fromJSON (builtins.readFile ./nextcloud-apps.json);
in {
# Create a derivation from the official Nextcloud apps.
# This takes the data generated from the go tool.
mkNextcloudDerivation = self.callPackage ({ }: { data }:
mkNextcloudDerivation = self.callPackage ({ }: { pname, data }:
pkgs.fetchNextcloudApp {
inherit (data) url sha256;
appName = pname;
appVersion = data.version;
license = appBaseDefs.${pname};
inherit (data) url sha256 description homepage;
}) {};
} // lib.mapAttrs (type: pkgs: lib.makeExtensible (_: lib.mapAttrs (pname: data: self.mkNextcloudDerivation { inherit data; }) pkgs)) generatedJson;
} // lib.mapAttrs (type: pkgs:
lib.makeExtensible (_: lib.mapAttrs (pname: data: self.mkNextcloudDerivation { inherit pname; inherit data; }) pkgs))
generatedJson;
in (lib.makeExtensible (_: (lib.makeScope newScope packages))).extend (selfNC: superNC: {})

View file

@ -8,7 +8,7 @@ set -x
export NEXTCLOUD_VERSIONS=$(nix-instantiate --eval -E 'import ./nc-versions.nix {}' -A e)
APPS=`cat nextcloud-apps.json | jq -r '.[]' | sed -z 's/\n/,/g;s/,$/\n/'`
APPS=`cat nextcloud-apps.json | jq -r 'keys|.[]' | sed -z 's/\n/,/g;s/,$/\n/'`
nc4nix -apps $APPS
rm *.log

View file

@ -1,31 +1,31 @@
[
"bookmarks"
, "calendar"
, "contacts"
, "cospend"
, "deck"
, "files_texteditor"
, "files_markdown"
, "forms"
, "groupfolders"
, "impersonate"
, "keeweb"
, "mail"
, "maps"
, "memories"
, "news"
, "notes"
, "notify_push"
, "onlyoffice"
, "polls"
, "previewgenerator"
, "qownnotesapi"
, "registration"
, "spreed"
, "tasks"
, "twofactor_nextcloud_notification"
, "twofactor_totp"
, "twofactor_webauthn"
, "unsplash"
, "user_saml"
]
{
"bookmarks": "agpl3Plus"
, "calendar": "agpl3Plus"
, "contacts": "agpl3Plus"
, "cospend": "agpl3Plus"
, "deck": "agpl3Plus"
, "files_texteditor": "agpl3Plus"
, "files_markdown": "agpl3Plus"
, "forms": "agpl3Plus"
, "groupfolders": "agpl3Plus"
, "impersonate": "agpl3Plus"
, "keeweb": "agpl3Plus"
, "mail": "agpl3Plus"
, "maps": "agpl3Plus"
, "memories": "agpl3Plus"
, "news": "agpl3Plus"
, "notes": "agpl3Plus"
, "notify_push": "agpl3Plus"
, "onlyoffice": "asl20"
, "polls": "agpl3Plus"
, "previewgenerator": "agpl3Plus"
, "qownnotesapi": "agpl3Plus"
, "registration": "agpl3Plus"
, "spreed": "agpl3Plus"
, "tasks": "agpl3Plus"
, "twofactor_nextcloud_notification": "agpl3Only"
, "twofactor_totp": "agpl3Plus"
, "twofactor_webauthn": "agpl3Plus"
, "unsplash": "agpl3Only"
, "user_saml": "agpl3Plus"
}