File tree Expand file tree Collapse file tree 6 files changed +161
-0
lines changed Expand file tree Collapse file tree 6 files changed +161
-0
lines changed Original file line number Diff line number Diff line change 1+ watch_file lib/versioncheck.php
2+ watch_file package.json
3+ use flake
Original file line number Diff line number Diff line change @@ -182,3 +182,5 @@ core/js/mimetypelist.js
182182cypress /downloads
183183cypress /snapshots
184184cypress /videos
185+
186+ /.direnv
Original file line number Diff line number Diff line change @@ -342,3 +342,7 @@ License: CC0-1.0
342342Files: apps/theming/fonts/OpenDyslexic-Bold.otf apps/theming/fonts/OpenDyslexic-Regular.otf
343343Copyright: 2012-2019 Abbie Gonzalez <https://abbiecod.es|support@abbiecod.es>, with Reserved Font Name OpenDyslexic.
344344License: 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
Original file line number Diff line number Diff line change 1111 '.. ' ,
1212 '.devcontainer ' ,
1313 '.editorconfig ' ,
14+ '.envrc ' ,
1415 '.eslintignore ' ,
1516 '.eslintrc.js ' ,
1617 '.git ' ,
6263 'cypress.d.ts ' ,
6364 'cypress ' ,
6465 'dist ' ,
66+ 'flake.lock ' ,
67+ 'flake.nix ' ,
6568 'index.html ' ,
6669 'index.php ' ,
6770 'jest.config.ts ' ,
Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments