Skip to content

Commit ef3b98d

Browse files
Merge pull request #52952 from nextcloud/backport/52891/stable30
2 parents 119727d + 0a9e637 commit ef3b98d

File tree

6 files changed

+161
-0
lines changed

6 files changed

+161
-0
lines changed

.envrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
watch_file lib/versioncheck.php
2+
watch_file package.json
3+
use flake

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,3 +182,5 @@ core/js/mimetypelist.js
182182
cypress/downloads
183183
cypress/snapshots
184184
cypress/videos
185+
186+
/.direnv

.reuse/dep5

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,3 +342,7 @@ License: CC0-1.0
342342
Files: apps/theming/fonts/OpenDyslexic-Bold.otf apps/theming/fonts/OpenDyslexic-Regular.otf
343343
Copyright: 2012-2019 Abbie Gonzalez <https://abbiecod.es|support@abbiecod.es>, with Reserved Font Name OpenDyslexic.
344344
License: OFL-1.1-RFN
345+
346+
Files: .envrc flake.nix flake.lock
347+
Copyright: 2025 Nextcloud GmbH and Nextcloud contributors
348+
License: AGPL-3.0-or-later

build/files-checker.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
'..',
1212
'.devcontainer',
1313
'.editorconfig',
14+
'.envrc',
1415
'.eslintignore',
1516
'.eslintrc.js',
1617
'.git',
@@ -62,6 +63,8 @@
6263
'cypress.d.ts',
6364
'cypress',
6465
'dist',
66+
'flake.lock',
67+
'flake.nix',
6568
'index.html',
6669
'index.php',
6770
'jest.config.ts',

flake.lock

Lines changed: 61 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
{
2+
inputs = {
3+
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
4+
flake-utils.url = "github:numtide/flake-utils";
5+
};
6+
7+
outputs = { nixpkgs, flake-utils, ... }:
8+
flake-utils.lib.eachDefaultSystem (system:
9+
let
10+
pkgs = nixpkgs.legacyPackages.${system};
11+
lib = pkgs.lib;
12+
in
13+
{
14+
devShells.default =
15+
let
16+
php_version = lib.strings.concatStrings (builtins.match ".*PHP_VERSION_ID < ([0-9])0([0-9])00.*" (builtins.readFile ./lib/versioncheck.php));
17+
php = pkgs.pkgs."php${php_version}".buildEnv {
18+
# Based off https://docs.nextcloud.com/server/latest/admin_manual/installation/php_configuration.html
19+
extensions = ({ enabled, all }: enabled ++ (with all; [
20+
# Required
21+
ctype
22+
curl
23+
dom
24+
fileinfo
25+
filter
26+
gd
27+
mbstring
28+
openssl
29+
posix
30+
session
31+
simplexml
32+
xmlreader
33+
xmlwriter
34+
zip
35+
zlib
36+
# Database connectors
37+
pdo_sqlite
38+
pdo_mysql
39+
pdo_pgsql
40+
# Recommended
41+
intl
42+
sodium
43+
# Required for specific apps
44+
ldap
45+
smbclient
46+
ftp
47+
imap
48+
# Recommended for specific apps (optional)
49+
gmp
50+
exif
51+
# For enhanced server performance (optional)
52+
apcu
53+
memcached
54+
redis
55+
# For preview generation (optional)
56+
imagick
57+
# For command line processing (optional)
58+
pcntl
59+
60+
# Debugging
61+
xdebug
62+
]));
63+
64+
extraConfig = ''
65+
max_execution_time=300
66+
memory_limit=-1
67+
68+
xdebug.mode=debug
69+
'';
70+
};
71+
node_version = builtins.substring 1 (-1) (builtins.elemAt (lib.strings.splitString "." (builtins.fromJSON (builtins.readFile ./package.json)).engines.node) 0);
72+
node = pkgs."nodejs_${node_version}";
73+
in
74+
pkgs.mkShell {
75+
NOCOVERAGE = 1;
76+
77+
packages = [
78+
php
79+
php.packages.composer
80+
node
81+
# Preview generation
82+
pkgs.ffmpeg
83+
pkgs.libreoffice
84+
];
85+
};
86+
}
87+
);
88+
}

0 commit comments

Comments
 (0)