···1+# mpiCheckPhaseHook {#setup-hook-mpi-check}
2+3+4+This hook can be used to setup a check phase that
5+requires running a MPI application. It detects the
6+used present MPI implementaion type and exports
7+the neceesary environment variables to use
8+`mpirun` and `mpiexec` in a Nix sandbox.
9+10+11+Example:
12+13+```nix
14+ { mpiCheckPhaseHook, mpi, ... }:
15+16+ ...
17+18+ nativeCheckInputs = [
19+ openssh
20+ mpiCheckPhaseHook
21+ ];
22+```
23+24+
···1+preCheckHooks+=('setupMpiCheck')
2+preInstallCheckHooks+=('setupMpiCheck')
3+4+5+setupMpiCheck() {
6+ # Find out which MPI implementation we are using
7+ # and set safe defaults that are guaranteed to run
8+ # on any build machine
9+10+ mpiType="NONE"
11+12+ # OpenMPI signature
13+ if command ompi_info &> /dev/null; then
14+ mpiType="openmpi"
15+ fi
16+17+ # MPICH based implementations
18+ if command mpichversion &> /dev/null; then
19+ if [ "$mpiType" != "NONE" ]; then
20+ echo "WARNING: found OpenMPI and MPICH/MVAPICH executables"
21+ fi
22+23+ version=$(mpichversion)
24+ if [[ "$version" == *"MPICH"* ]]; then
25+ mpiType="MPICH"
26+ fi
27+ if [[ "$version" == *"MVAPICH"* ]]; then
28+ mpiType="MVAPICH"
29+ fi
30+ fi
31+32+ echo "Found MPI implementation: $mpiType"
33+34+ case $mpiType in
35+ openmpi)
36+ # make sure the test starts even if we have less than the requested amount of cores
37+ export OMPI_MCA_rmaps_base_oversubscribe=1
38+ # Disable CPU pinning
39+ export OMPI_MCA_hwloc_base_binding_policy=none
40+ ;;
41+ MPICH)
42+ # Fix to make mpich run in a sandbox
43+ export HYDRA_IFACE=lo
44+ ;;
45+ MVAPICH)
46+ # Disable CPU pinning
47+ export MV2_ENABLE_AFFINITY=0
48+ ;;
49+ esac
50+51+ # Limit number of OpenMP threads. Default is "all cores".
52+ export OMP_NUM_THREADS=1
53+}
54+
+6-2
pkgs/build-support/trivial-builders/default.nix
···905 ) + "-patched"
906 , patches ? []
907 , postPatch ? ""
908- }: stdenvNoCC.mkDerivation {
0909 inherit name src patches postPatch;
910 preferLocalBuild = true;
911 allowSubstitutes = false;
912 phases = "unpackPhase patchPhase installPhase";
913 installPhase = "cp -R ./ $out";
914- };
000915916 /* An immutable file in the store with a length of 0 bytes. */
917 emptyFile = runCommand "empty-file" {
···905 ) + "-patched"
906 , patches ? []
907 , postPatch ? ""
908+ , ...
909+ }@args: stdenvNoCC.mkDerivation {
910 inherit name src patches postPatch;
911 preferLocalBuild = true;
912 allowSubstitutes = false;
913 phases = "unpackPhase patchPhase installPhase";
914 installPhase = "cp -R ./ $out";
915+ }
916+ # Carry `meta` information from the underlying `src` if present.
917+ // (optionalAttrs (src?meta) { inherit (src) meta; })
918+ // (removeAttrs args [ "src" "name" "patches" "postPatch" ]);
919920 /* An immutable file in the store with a length of 0 bytes. */
921 emptyFile = runCommand "empty-file" {
···12 # Many Wine and native games need 32-bit libraries.
13 multiArch = true;
1400015 targetPkgs = pkgs: with pkgs; [
16 heroic-unwrapped
17 gamemode
···12 # Many Wine and native games need 32-bit libraries.
13 multiArch = true;
1415+ # required by Electron
16+ unshareIpc = false;
17+18 targetPkgs = pkgs: with pkgs; [
19 heroic-unwrapped
20 gamemode
···3 "sha256": "1kdpma5f3rb9g29j364lqv6bkar5qgwlvcxmhpmzllwlkmjpc9w8",
4 "url": "https://github.com/nextcloud/bookmarks/releases/download/v12.1.0/bookmarks-12.1.0.tar.gz",
5 "version": "12.1.0",
6- "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",
7 "homepage": "https://github.com/nextcloud/bookmarks",
8 "licenses": [
9 "agpl"
···140 ]
141 },
142 "news": {
143- "sha256": "1z08k8xnyv71zj0djlv339faq9lx23mlqgjanf2jhv6jhh8cy5c6",
144- "url": "https://github.com/nextcloud/news/releases/download/22.0.0/news.tar.gz",
145- "version": "22.0.0",
146 "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)",
147 "homepage": "https://github.com/nextcloud/news",
148 "licenses": [
···170 ]
171 },
172 "onlyoffice": {
173- "sha256": "10axh9a4w8y3iw95xdjn4q8wjg5459dki42xb6cax5ikimyfv07j",
174- "url": "https://github.com/ONLYOFFICE/onlyoffice-nextcloud/releases/download/v7.8.0/onlyoffice.tar.gz",
175- "version": "7.8.0",
176 "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.",
177 "homepage": "https://www.onlyoffice.com",
178 "licenses": [
···3 "sha256": "1kdpma5f3rb9g29j364lqv6bkar5qgwlvcxmhpmzllwlkmjpc9w8",
4 "url": "https://github.com/nextcloud/bookmarks/releases/download/v12.1.0/bookmarks-12.1.0.tar.gz",
5 "version": "12.1.0",
6+ "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",
7 "homepage": "https://github.com/nextcloud/bookmarks",
8 "licenses": [
9 "agpl"
···140 ]
141 },
142 "news": {
143+ "sha256": "1j9dhqz5anwsmw3f8hbhvqc2h1fp15zmxzdbpnz1p3vwqf8f5cjs",
144+ "url": "https://github.com/nextcloud/news/releases/download/23.0.0/news.tar.gz",
145+ "version": "23.0.0",
146 "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)",
147 "homepage": "https://github.com/nextcloud/news",
148 "licenses": [
···170 ]
171 },
172 "onlyoffice": {
173+ "sha256": "12hzmngps86ha4lcfwaf62svfz41aywykq0z419r644g5i4v7raq",
174+ "url": "https://github.com/ONLYOFFICE/onlyoffice-nextcloud/releases/download/v7.9.0/onlyoffice.tar.gz",
175+ "version": "7.9.0",
176 "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.",
177 "homepage": "https://www.onlyoffice.com",
178 "licenses": [
+10-10
pkgs/servers/nextcloud/packages/26.json
···1{
2 "bookmarks": {
3- "sha256": "0xx331bgly91y8ncxk36ha3ncrr2xlivblfi7rix6ffkrdx73yb9",
4- "url": "https://github.com/nextcloud/bookmarks/releases/download/v13.0.1/bookmarks-13.0.1.tar.gz",
5- "version": "13.0.1",
6- "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",
7 "homepage": "https://github.com/nextcloud/bookmarks",
8 "licenses": [
9 "agpl"
···140 ]
141 },
142 "news": {
143- "sha256": "1z08k8xnyv71zj0djlv339faq9lx23mlqgjanf2jhv6jhh8cy5c6",
144- "url": "https://github.com/nextcloud/news/releases/download/22.0.0/news.tar.gz",
145- "version": "22.0.0",
146 "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)",
147 "homepage": "https://github.com/nextcloud/news",
148 "licenses": [
···170 ]
171 },
172 "onlyoffice": {
173- "sha256": "10axh9a4w8y3iw95xdjn4q8wjg5459dki42xb6cax5ikimyfv07j",
174- "url": "https://github.com/ONLYOFFICE/onlyoffice-nextcloud/releases/download/v7.8.0/onlyoffice.tar.gz",
175- "version": "7.8.0",
176 "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.",
177 "homepage": "https://www.onlyoffice.com",
178 "licenses": [
···1{
2 "bookmarks": {
3+ "sha256": "16j10gj5nghgji36jhng60291wl4h9c3vndjx9j8jij9qn6hz23f",
4+ "url": "https://github.com/nextcloud/bookmarks/releases/download/v13.1.0/bookmarks-13.1.0.tar.gz",
5+ "version": "13.1.0",
6+ "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",
7 "homepage": "https://github.com/nextcloud/bookmarks",
8 "licenses": [
9 "agpl"
···140 ]
141 },
142 "news": {
143+ "sha256": "1j9dhqz5anwsmw3f8hbhvqc2h1fp15zmxzdbpnz1p3vwqf8f5cjs",
144+ "url": "https://github.com/nextcloud/news/releases/download/23.0.0/news.tar.gz",
145+ "version": "23.0.0",
146 "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)",
147 "homepage": "https://github.com/nextcloud/news",
148 "licenses": [
···170 ]
171 },
172 "onlyoffice": {
173+ "sha256": "12hzmngps86ha4lcfwaf62svfz41aywykq0z419r644g5i4v7raq",
174+ "url": "https://github.com/ONLYOFFICE/onlyoffice-nextcloud/releases/download/v7.9.0/onlyoffice.tar.gz",
175+ "version": "7.9.0",
176 "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.",
177 "homepage": "https://www.onlyoffice.com",
178 "licenses": [
+7-7
pkgs/servers/nextcloud/packages/27.json
···1{
2 "bookmarks": {
3- "sha256": "0xx331bgly91y8ncxk36ha3ncrr2xlivblfi7rix6ffkrdx73yb9",
4- "url": "https://github.com/nextcloud/bookmarks/releases/download/v13.0.1/bookmarks-13.0.1.tar.gz",
5- "version": "13.0.1",
6- "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",
7 "homepage": "https://github.com/nextcloud/bookmarks",
8 "licenses": [
9 "agpl"
···140 ]
141 },
142 "news": {
143- "sha256": "1z08k8xnyv71zj0djlv339faq9lx23mlqgjanf2jhv6jhh8cy5c6",
144- "url": "https://github.com/nextcloud/news/releases/download/22.0.0/news.tar.gz",
145- "version": "22.0.0",
146 "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)",
147 "homepage": "https://github.com/nextcloud/news",
148 "licenses": [
···1{
2 "bookmarks": {
3+ "sha256": "16j10gj5nghgji36jhng60291wl4h9c3vndjx9j8jij9qn6hz23f",
4+ "url": "https://github.com/nextcloud/bookmarks/releases/download/v13.1.0/bookmarks-13.1.0.tar.gz",
5+ "version": "13.1.0",
6+ "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",
7 "homepage": "https://github.com/nextcloud/bookmarks",
8 "licenses": [
9 "agpl"
···140 ]
141 },
142 "news": {
143+ "sha256": "1j9dhqz5anwsmw3f8hbhvqc2h1fp15zmxzdbpnz1p3vwqf8f5cjs",
144+ "url": "https://github.com/nextcloud/news/releases/download/23.0.0/news.tar.gz",
145+ "version": "23.0.0",
146 "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)",
147 "homepage": "https://github.com/nextcloud/news",
148 "licenses": [
+9-3
pkgs/servers/nextcloud/packages/default.nix
···9 generatedJson = {
10 inherit apps;
11 };
01213 in {
14 # Create a derivation from the official Nextcloud apps.
15 # This takes the data generated from the go tool.
16- mkNextcloudDerivation = self.callPackage ({ }: { data }:
17 pkgs.fetchNextcloudApp {
18- inherit (data) url sha256;
00019 }) {};
2021- } // lib.mapAttrs (type: pkgs: lib.makeExtensible (_: lib.mapAttrs (pname: data: self.mkNextcloudDerivation { inherit data; }) pkgs)) generatedJson;
002223in (lib.makeExtensible (_: (lib.makeScope newScope packages))).extend (selfNC: superNC: {})
···9 generatedJson = {
10 inherit apps;
11 };
12+ appBaseDefs = builtins.fromJSON (builtins.readFile ./nextcloud-apps.json);
1314 in {
15 # Create a derivation from the official Nextcloud apps.
16 # This takes the data generated from the go tool.
17+ mkNextcloudDerivation = self.callPackage ({ }: { pname, data }:
18 pkgs.fetchNextcloudApp {
19+ appName = pname;
20+ appVersion = data.version;
21+ license = appBaseDefs.${pname};
22+ inherit (data) url sha256 description homepage;
23 }) {};
2425+ } // lib.mapAttrs (type: pkgs:
26+ lib.makeExtensible (_: lib.mapAttrs (pname: data: self.mkNextcloudDerivation { inherit pname; inherit data; }) pkgs))
27+ generatedJson;
2829in (lib.makeExtensible (_: (lib.makeScope newScope packages))).extend (selfNC: superNC: {})
···3738 more-itertools = callPackage ../development/python2-modules/more-itertools { };
3940+ # ninja python stub was created to help simplify python builds using PyPA's
41+ # build tool in Python 3, but it does not yet support Python 2
42+ ninja = pkgs.buildPackages.ninja;
43+44 packaging = callPackage ../development/python2-modules/packaging { };
4546 pip = callPackage ../development/python2-modules/pip { };