···304304 </listitem>
305305 <listitem>
306306 <para>
307307+ The <literal>wordpress</literal> derivation no longer contains
308308+ any builtin plugins or themes. If you need them you have to
309309+ add them back to prevent your site from breaking. You can find
310310+ them in <literal>wordpressPackages.{plugins,themes}</literal>.
311311+ </para>
312312+ </listitem>
313313+ <listitem>
314314+ <para>
307315 <literal>llvmPackages_rocm.llvm</literal> will not contain
308316 <literal>clang</literal> or <literal>compiler-rt</literal>.
309317 <literal>llvmPackages_rocm.clang</literal> will not contain
···356364 under 10 packages in nixpkgs, largely unmaintained upstream as
357365 well, however, out-of-tree package expressions may need to be
358366 updated manually.
367367+ </para>
368368+ </listitem>
369369+ <listitem>
370370+ <para>
371371+ The
372372+ <link linkend="opt-services.wordpress.sites._name_.plugins">services.wordpress.sites.<name>.plugins</link>
373373+ and
374374+ <link linkend="opt-services.wordpress.sites._name_.themes">services.wordpress.sites.<name>.themes</link>
375375+ options have been converted from sets to attribute sets to
376376+ allow for consumers to specify explicit install paths via
377377+ attribute name.
359378 </para>
360379 </listitem>
361380 <listitem>
+4
nixos/doc/manual/release-notes/rl-2305.section.md
···77777878- `tut` has been updated from 1.0.34 to 2.0.0, and now uses the TOML format for the configuration file instead of INI. Additional information can be found [here](https://github.com/RasmusLindroth/tut/releases/tag/2.0.0).
79798080+- The `wordpress` derivation no longer contains any builtin plugins or themes. If you need them you have to add them back to prevent your site from breaking. You can find them in `wordpressPackages.{plugins,themes}`.
8181+8082- `llvmPackages_rocm.llvm` will not contain `clang` or `compiler-rt`. `llvmPackages_rocm.clang` will not contain `llvm`. `llvmPackages_rocm.clangNoCompilerRt` has been removed in favor of using `llvmPackages_rocm.clang-unwrapped`.
81838284- The EC2 image module previously detected and automatically mounted ext3-formatted instance store devices and partitions in stage-1 (initramfs), storing `/tmp` on the first discovered device. This behaviour, which only catered to very specific use cases and could not be disabled, has been removed. Users relying on this should provide their own implementation, and probably use ext4 and perform the mount in stage-2.
···8890- Calling `makeSetupHook` without passing a `name` argument is deprecated.
89919092- Qt 5.12 and 5.14 have been removed, as the corresponding branches have been EOL upstream for a long time. This affected under 10 packages in nixpkgs, largely unmaintained upstream as well, however, out-of-tree package expressions may need to be updated manually.
9393+9494+- The [services.wordpress.sites.<name>.plugins](#opt-services.wordpress.sites._name_.plugins) and [services.wordpress.sites.<name>.themes](#opt-services.wordpress.sites._name_.themes) options have been converted from sets to attribute sets to allow for consumers to specify explicit install paths via attribute name.
91959296- In `mastodon` it is now necessary to specify location of file with `PostgreSQL` database password. In `services.mastodon.database.passwordFile` parameter default value `/var/lib/mastodon/secrets/db-password` has been changed to `null`.
9397
+23-40
nixos/modules/services/web-apps/wordpress.nix
···3232 # Since hard linking directories is not allowed, copying is the next best thing.
33333434 # copy additional plugin(s), theme(s) and language(s)
3535- ${concatMapStringsSep "\n" (theme: "cp -r ${theme} $out/share/wordpress/wp-content/themes/${theme.name}") cfg.themes}
3636- ${concatMapStringsSep "\n" (plugin: "cp -r ${plugin} $out/share/wordpress/wp-content/plugins/${plugin.name}") cfg.plugins}
3535+ ${concatStringsSep "\n" (mapAttrsToList (name: theme: "cp -r ${theme} $out/share/wordpress/wp-content/themes/${name}") cfg.themes)}
3636+ ${concatStringsSep "\n" (mapAttrsToList (name: plugin: "cp -r ${plugin} $out/share/wordpress/wp-content/plugins/${name}") cfg.plugins)}
3737 ${concatMapStringsSep "\n" (language: "cp -r ${language} $out/share/wordpress/wp-content/languages/") cfg.languages}
3838 '';
3939 };
···130130 };
131131132132 plugins = mkOption {
133133- type = types.listOf types.path;
134134- default = [];
133133+ type = with types; coercedTo
134134+ (listOf path)
135135+ (l: warn "setting this option with a list is deprecated"
136136+ listToAttrs (map (p: nameValuePair (p.name or (throw "${p} does not have a name")) p) l))
137137+ (attrsOf path);
138138+ default = {};
135139 description = lib.mdDoc ''
136136- List of path(s) to respective plugin(s) which are copied from the 'plugins' directory.
140140+ Path(s) to respective plugin(s) which are copied from the 'plugins' directory.
137141138142 ::: {.note}
139143 These plugins need to be packaged before use, see example.
140144 :::
141145 '';
142146 example = literalExpression ''
143143- let
144144- # Wordpress plugin 'embed-pdf-viewer' installation example
145145- embedPdfViewerPlugin = pkgs.stdenv.mkDerivation {
146146- name = "embed-pdf-viewer-plugin";
147147- # Download the theme from the wordpress site
148148- src = pkgs.fetchurl {
149149- url = "https://downloads.wordpress.org/plugin/embed-pdf-viewer.2.0.3.zip";
150150- sha256 = "1rhba5h5fjlhy8p05zf0p14c9iagfh96y91r36ni0rmk6y891lyd";
151151- };
152152- # We need unzip to build this package
153153- nativeBuildInputs = [ pkgs.unzip ];
154154- # Installing simply means copying all files to the output directory
155155- installPhase = "mkdir -p $out; cp -R * $out/";
156156- };
157157- # And then pass this theme to the themes list like this:
158158- in [ embedPdfViewerPlugin ]
147147+ {
148148+ inherit (pkgs.wordpressPackages.plugins) embed-pdf-viewer-plugin;
149149+ }
159150 '';
160151 };
161152162153 themes = mkOption {
163163- type = types.listOf types.path;
164164- default = [];
154154+ type = with types; coercedTo
155155+ (listOf path)
156156+ (l: warn "setting this option with a list is deprecated"
157157+ listToAttrs (map (p: nameValuePair (p.name or (throw "${p} does not have a name")) p) l))
158158+ (attrsOf path);
159159+ default = { inherit (pkgs.wordpressPackages.themes) twentytwentythree; };
160160+ defaultText = literalExpression "{ inherit (pkgs.wordpressPackages.themes) twentytwentythree; }";
165161 description = lib.mdDoc ''
166166- List of path(s) to respective theme(s) which are copied from the 'theme' directory.
162162+ Path(s) to respective theme(s) which are copied from the 'theme' directory.
167163168164 ::: {.note}
169165 These themes need to be packaged before use, see example.
170166 :::
171167 '';
172168 example = literalExpression ''
173173- let
174174- # Let's package the responsive theme
175175- responsiveTheme = pkgs.stdenv.mkDerivation {
176176- name = "responsive-theme";
177177- # Download the theme from the wordpress site
178178- src = pkgs.fetchurl {
179179- url = "https://downloads.wordpress.org/theme/responsive.3.14.zip";
180180- sha256 = "0rjwm811f4aa4q43r77zxlpklyb85q08f9c8ns2akcarrvj5ydx3";
181181- };
182182- # We need unzip to build this package
183183- nativeBuildInputs = [ pkgs.unzip ];
184184- # Installing simply means copying all files to the output directory
185185- installPhase = "mkdir -p $out; cp -R * $out/";
186186- };
187187- # And then pass this theme to the themes list like this:
188188- in [ responsiveTheme ]
169169+ {
170170+ inherit (pkgs.wordpressPackages.themes) responsive-theme;
171171+ }
189172 '';
190173 };
191174
···321321 && !(stdenv.targetPlatform.useLLVM or false)
322322 && gccForLibs != null) ''
323323 echo "--gcc-toolchain=${gccForLibs}" >> $out/nix-support/cc-cflags
324324+325325+ # Pull in 'cc.out' target to get 'libstdc++fs.a'. It should be in
326326+ # 'cc.lib'. But it's a gcc package bug.
327327+ # TODO(trofi): remove once gcc is fixed to move libraries to .lib output.
328328+ echo "-L${gccForLibs}/${optionalString (targetPlatform != hostPlatform) "/${targetPlatform.config}"}/lib" >> $out/nix-support/cc-ldflags
324329 ''
325330326331 ##
···11+diff --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake
22+index 37364341ff8b..7f74c1a3e257 100644
33+--- a/cmake/modules/LLDBConfig.cmake
44++++ b/cmake/modules/LLDBConfig.cmake
55+@@ -257,7 +257,7 @@ if (NOT TARGET clang-resource-headers)
66+ # Iterate over the possible places where the external resource directory
77+ # could be and pick the first that exists.
88+ foreach(CANDIDATE "${Clang_DIR}/../.." "${LLVM_DIR}" "${LLVM_LIBRARY_DIRS}"
99+- "${LLVM_BUILD_LIBRARY_DIR}"
1010++ "${LLVM_BUILD_LIBRARY_DIR}" "@clangLibDir@"
1111+ "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}")
1212+ # Build the resource directory path by appending 'clang/<version number>'.
1313+ set(CANDIDATE_RESOURCE_DIR "${CANDIDATE}/clang/${LLDB_CLANG_RESOURCE_DIR_NAME}")
···11+{ lib, stdenv, llvm_meta
22+, pkgsBuildBuild
33+, monorepoSrc
44+, runCommand
55+, fetchpatch
66+, cmake
77+, darwin
88+, ninja
99+, python3
1010+, python3Packages
1111+, libffi
1212+, libbfd
1313+, libpfm
1414+, libxml2
1515+, ncurses
1616+, version
1717+, release_version
1818+, zlib
1919+, which
2020+, sysctl
2121+, buildLlvmTools
2222+, debugVersion ? false
2323+, doCheck ? (!stdenv.isx86_32 /* TODO: why */) && (!stdenv.hostPlatform.isMusl)
2424+ && (stdenv.hostPlatform == stdenv.buildPlatform)
2525+, enableManpages ? false
2626+, enableSharedLibraries ? !stdenv.hostPlatform.isStatic
2727+, enablePFM ? stdenv.isLinux /* PFM only supports Linux */
2828+ # broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245
2929+ # broken for the armv7l builder
3030+ && !stdenv.hostPlatform.isAarch
3131+, enablePolly ? true
3232+} @args:
3333+3434+let
3535+ inherit (lib) optional optionals optionalString;
3636+3737+ # Used when creating a version-suffixed symlink of libLLVM.dylib
3838+ shortVersion = with lib;
3939+ concatStringsSep "." (take 1 (splitString "." release_version));
4040+4141+ # Ordinarily we would just the `doCheck` and `checkDeps` functionality
4242+ # `mkDerivation` gives us to manage our test dependencies (instead of breaking
4343+ # out `doCheck` as a package level attribute).
4444+ #
4545+ # Unfortunately `lit` does not forward `$PYTHONPATH` to children processes, in
4646+ # particular the children it uses to do feature detection.
4747+ #
4848+ # This means that python deps we add to `checkDeps` (which the python
4949+ # interpreter is made aware of via `$PYTHONPATH` – populated by the python
5050+ # setup hook) are not picked up by `lit` which causes it to skip tests.
5151+ #
5252+ # Adding `python3.withPackages (ps: [ ... ])` to `checkDeps` also doesn't work
5353+ # because this package is shadowed in `$PATH` by the regular `python3`
5454+ # package.
5555+ #
5656+ # So, we "manually" assemble one python derivation for the package to depend
5757+ # on, taking into account whether checks are enabled or not:
5858+ python = if doCheck then
5959+ # Note that we _explicitly_ ask for a python interpreter for our host
6060+ # platform here; the splicing that would ordinarily take care of this for
6161+ # us does not seem to work once we use `withPackages`.
6262+ let
6363+ checkDeps = ps: with ps; [ psutil ];
6464+ in pkgsBuildBuild.targetPackages.python3.withPackages checkDeps
6565+ else python3;
6666+6767+in stdenv.mkDerivation (rec {
6868+ pname = "llvm";
6969+ inherit version;
7070+7171+ src = runCommand "${pname}-src-${version}" {} (''
7272+ mkdir -p "$out"
7373+ cp -r ${monorepoSrc}/cmake "$out"
7474+ cp -r ${monorepoSrc}/${pname} "$out"
7575+ cp -r ${monorepoSrc}/third-party "$out"
7676+ '' + lib.optionalString enablePolly ''
7777+ chmod u+w "$out/${pname}/tools"
7878+ cp -r ${monorepoSrc}/polly "$out/${pname}/tools"
7979+ '');
8080+8181+ sourceRoot = "${src.name}/${pname}";
8282+8383+ outputs = [ "out" "lib" "dev" "python" ];
8484+8585+ nativeBuildInputs = [ cmake ninja python ]
8686+ ++ optionals enableManpages [
8787+ # Note: we intentionally use `python3Packages` instead of `python3.pkgs`;
8888+ # splicing does *not* work with the latter. (TODO: fix)
8989+ python3Packages.sphinx python3Packages.recommonmark
9090+ ];
9191+9292+ buildInputs = [ libxml2 libffi ]
9393+ ++ optional enablePFM libpfm; # exegesis
9494+9595+ propagatedBuildInputs = [ ncurses zlib ];
9696+9797+ nativeCheckInputs = [
9898+ which
9999+ ] ++ lib.optional stdenv.isDarwin sysctl;
100100+101101+ patches = [
102102+ ./gnu-install-dirs.patch
103103+104104+ # Running the tests involves invoking binaries (like `opt`) that depend on
105105+ # the LLVM dylibs and reference them by absolute install path (i.e. their
106106+ # nix store path).
107107+ #
108108+ # Because we have not yet run the install phase (we're running these tests
109109+ # as part of `checkPhase` instead of `installCheckPhase`) these absolute
110110+ # paths do not exist yet; to work around this we point the loader (`ld` on
111111+ # unix, `dyld` on macOS) at the `lib` directory which will later become this
112112+ # package's `lib` output.
113113+ #
114114+ # Previously we would just set `LD_LIBRARY_PATH` to include the build `lib`
115115+ # dir but:
116116+ # - this doesn't generalize well to other platforms; `lit` doesn't forward
117117+ # `DYLD_LIBRARY_PATH` (macOS):
118118+ # + https://github.com/llvm/llvm-project/blob/0d89963df354ee309c15f67dc47c8ab3cb5d0fb2/llvm/utils/lit/lit/TestingConfig.py#L26
119119+ # - even if `lit` forwarded this env var, we actually cannot set
120120+ # `DYLD_LIBRARY_PATH` in the child processes `lit` launches because
121121+ # `DYLD_LIBRARY_PATH` (and `DYLD_FALLBACK_LIBRARY_PATH`) is cleared for
122122+ # "protected processes" (i.e. the python interpreter that runs `lit`):
123123+ # https://stackoverflow.com/a/35570229
124124+ # - other LLVM subprojects deal with this issue by having their `lit`
125125+ # configuration set these env vars for us; it makes sense to do the same
126126+ # for LLVM:
127127+ # + https://github.com/llvm/llvm-project/blob/4c106cfdf7cf7eec861ad3983a3dd9a9e8f3a8ae/clang-tools-extra/test/Unit/lit.cfg.py#L22-L31
128128+ #
129129+ # !!! TODO: look into upstreaming this patch
130130+ ./llvm-lit-cfg-add-libs-to-dylib-path.patch
131131+132132+ # `lit` has a mode where it executes run lines as a shell script which is
133133+ # constructs; this is problematic for macOS because it means that there's
134134+ # another process in between `lit` and the binaries being tested. As noted
135135+ # above, this means that `DYLD_LIBRARY_PATH` is cleared which means that our
136136+ # tests fail with dyld errors.
137137+ #
138138+ # To get around this we patch `lit` to reintroduce `DYLD_LIBRARY_PATH`, when
139139+ # present in the test configuration.
140140+ #
141141+ # It's not clear to me why this isn't an issue for LLVM developers running
142142+ # on macOS (nothing about this _seems_ nix specific)..
143143+ ./lit-shell-script-runner-set-dyld-library-path.patch
144144+ ] ++ lib.optionals enablePolly [
145145+ ./gnu-install-dirs-polly.patch
146146+147147+ # Just like the `llvm-lit-cfg` patch, but for `polly`.
148148+ ./polly-lit-cfg-add-libs-to-dylib-path.patch
149149+ ];
150150+151151+ postPatch = optionalString stdenv.isDarwin ''
152152+ substituteInPlace cmake/modules/AddLLVM.cmake \
153153+ --replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)" \
154154+ --replace 'set(_install_rpath "@loader_path/../''${CMAKE_INSTALL_LIBDIR}''${LLVM_LIBDIR_SUFFIX}" ''${extra_libdir})' ""
155155+156156+ # As of LLVM 15, marked as XFAIL on arm64 macOS but lit doesn't seem to pick
157157+ # this up: https://github.com/llvm/llvm-project/blob/c344d97a125b18f8fed0a64aace73c49a870e079/llvm/test/MC/ELF/cfi-version.ll#L7
158158+ rm test/MC/ELF/cfi-version.ll
159159+160160+ # This test tries to call `sw_vers` by absolute path (`/usr/bin/sw_vers`)
161161+ # and thus fails under the sandbox:
162162+ substituteInPlace unittests/Support/Host.cpp \
163163+ --replace '/usr/bin/sw_vers' "${(builtins.toString darwin.DarwinTools) + "/bin/sw_vers" }"
164164+ '' + optionalString (stdenv.isDarwin && stdenv.hostPlatform.isx86) ''
165165+ # This test tries to call the intrinsics `@llvm.roundeven.f32` and
166166+ # `@llvm.roundeven.f64` which seem to (incorrectly?) lower to `roundevenf`
167167+ # and `roundeven` on x86_64 macOS.
168168+ #
169169+ # However these functions are glibc specific so the test fails:
170170+ # - https://www.gnu.org/software/gnulib/manual/html_node/roundevenf.html
171171+ # - https://www.gnu.org/software/gnulib/manual/html_node/roundeven.html
172172+ #
173173+ # TODO(@rrbutani): this seems to run fine on `aarch64-darwin`, why does it
174174+ # pass there?
175175+ substituteInPlace test/ExecutionEngine/Interpreter/intrinsics.ll \
176176+ --replace "%roundeven32 = call float @llvm.roundeven.f32(float 0.000000e+00)" "" \
177177+ --replace "%roundeven64 = call double @llvm.roundeven.f64(double 0.000000e+00)" ""
178178+179179+ # This test fails on darwin x86_64 because `sw_vers` reports a different
180180+ # macOS version than what LLVM finds by reading
181181+ # `/System/Library/CoreServices/SystemVersion.plist` (which is passed into
182182+ # the sandbox on macOS).
183183+ #
184184+ # The `sw_vers` provided by nixpkgs reports the macOS version associated
185185+ # with the `CoreFoundation` framework with which it was built. Because
186186+ # nixpkgs pins the SDK for `aarch64-darwin` and `x86_64-darwin` what
187187+ # `sw_vers` reports is not guaranteed to match the macOS version of the host
188188+ # that's building this derivation.
189189+ #
190190+ # Astute readers will note that we only _patch_ this test on aarch64-darwin
191191+ # (to use the nixpkgs provided `sw_vers`) instead of disabling it outright.
192192+ # So why does this test pass on aarch64?
193193+ #
194194+ # Well, it seems that `sw_vers` on aarch64 actually links against the _host_
195195+ # CoreFoundation framework instead of the nixpkgs provided one.
196196+ #
197197+ # Not entirely sure what the right fix is here. I'm assuming aarch64
198198+ # `sw_vers` doesn't intentionally link against the host `CoreFoundation`
199199+ # (still digging into how this ends up happening, will follow up) but that
200200+ # aside I think the more pertinent question is: should we be patching LLVM's
201201+ # macOS version detection logic to use `sw_vers` instead of reading host
202202+ # paths? This *is* a way in which details about builder machines can creep
203203+ # into the artifacts that are produced, affecting reproducibility, but it's
204204+ # not clear to me when/where/for what this even gets used in LLVM.
205205+ #
206206+ # TODO(@rrbutani): fix/follow-up
207207+ substituteInPlace unittests/Support/Host.cpp \
208208+ --replace "getMacOSHostVersion" "DISABLED_getMacOSHostVersion"
209209+210210+ # This test fails with a `dysmutil` crash; have not yet dug into what's
211211+ # going on here (TODO(@rrbutani)).
212212+ rm test/tools/dsymutil/ARM/obfuscated.test
213213+ '' + ''
214214+ # FileSystem permissions tests fail with various special bits
215215+ substituteInPlace unittests/Support/CMakeLists.txt \
216216+ --replace "Path.cpp" ""
217217+ rm unittests/Support/Path.cpp
218218+ substituteInPlace unittests/IR/CMakeLists.txt \
219219+ --replace "PassBuilderCallbacksTest.cpp" ""
220220+ rm unittests/IR/PassBuilderCallbacksTest.cpp
221221+ rm test/tools/llvm-objcopy/ELF/mirror-permissions-unix.test
222222+ '' + optionalString stdenv.hostPlatform.isMusl ''
223223+ patch -p1 -i ${../../TLI-musl.patch}
224224+ substituteInPlace unittests/Support/CMakeLists.txt \
225225+ --replace "add_subdirectory(DynamicLibrary)" ""
226226+ rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp
227227+ # valgrind unhappy with musl or glibc, but fails w/musl only
228228+ rm test/CodeGen/AArch64/wineh4.mir
229229+ '' + optionalString stdenv.hostPlatform.isAarch32 ''
230230+ # skip failing X86 test cases on 32-bit ARM
231231+ rm test/DebugInfo/X86/convert-debugloc.ll
232232+ rm test/DebugInfo/X86/convert-inlined.ll
233233+ rm test/DebugInfo/X86/convert-linked.ll
234234+ rm test/tools/dsymutil/X86/op-convert.test
235235+ rm test/tools/gold/X86/split-dwarf.ll
236236+ rm test/tools/llvm-dwarfdump/X86/prettyprint_types.s
237237+ rm test/tools/llvm-dwarfdump/X86/simplified-template-names.s
238238+239239+ # !!! Note: these tests are removed in LLVM 16.
240240+ #
241241+ # See here for context: https://github.com/NixOS/nixpkgs/pull/194634#discussion_r999790443
242242+ rm test/CodeGen/RISCV/rv32zbp.ll
243243+ rm test/CodeGen/RISCV/rv64zbp.ll
244244+ '' + optionalString (stdenv.hostPlatform.system == "armv6l-linux") ''
245245+ # Seems to require certain floating point hardware (NEON?)
246246+ rm test/ExecutionEngine/frem.ll
247247+ '' + ''
248248+ patchShebangs test/BugPoint/compile-custom.ll.py
249249+ '';
250250+251251+ preConfigure = ''
252252+ # Workaround for configure flags that need to have spaces
253253+ cmakeFlagsArray+=(
254254+ -DLLVM_LIT_ARGS="-svj''${NIX_BUILD_CORES} --no-progress-bar"
255255+ )
256256+ '';
257257+258258+ # Defensive check: some paths (that we make symlinks to) depend on the release
259259+ # version, for example:
260260+ # - https://github.com/llvm/llvm-project/blob/406bde9a15136254f2b10d9ef3a42033b3cb1b16/clang/lib/Headers/CMakeLists.txt#L185
261261+ #
262262+ # So we want to sure that the version in the source matches the release
263263+ # version we were given.
264264+ #
265265+ # We do this check here, in the LLVM build, because it happens early.
266266+ postConfigure = let
267267+ v = lib.versions;
268268+ major = v.major release_version;
269269+ minor = v.minor release_version;
270270+ patch = v.patch release_version;
271271+ in ''
272272+ # $1: part, $2: expected
273273+ check_version() {
274274+ part="''${1^^}"
275275+ part="$(cat include/llvm/Config/llvm-config.h | grep "#define LLVM_VERSION_''${part} " | cut -d' ' -f3)"
276276+277277+ if [[ "$part" != "$2" ]]; then
278278+ echo >&2 \
279279+ "mismatch in the $1 version! we have version ${release_version}" \
280280+ "and expected the $1 version to be '$2'; the source has '$part' instead"
281281+ exit 3
282282+ fi
283283+ }
284284+285285+ check_version major ${major}
286286+ check_version minor ${minor}
287287+ check_version patch ${patch}
288288+ '';
289289+290290+ # E.g. mesa.drivers use the build-id as a cache key (see #93946):
291291+ LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1";
292292+293293+ cmakeFlags = with stdenv; let
294294+ # These flags influence llvm-config's BuildVariables.inc in addition to the
295295+ # general build. We need to make sure these are also passed via
296296+ # CROSS_TOOLCHAIN_FLAGS_NATIVE when cross-compiling or llvm-config-native
297297+ # will return different results from the cross llvm-config.
298298+ #
299299+ # Some flags don't need to be repassed because LLVM already does so (like
300300+ # CMAKE_BUILD_TYPE), others are irrelevant to the result.
301301+ flagsForLlvmConfig = [
302302+ "-DLLVM_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/cmake/llvm"
303303+ "-DLLVM_ENABLE_RTTI=ON"
304304+ ] ++ optionals enableSharedLibraries [
305305+ "-DLLVM_LINK_LLVM_DYLIB=ON"
306306+ ];
307307+ in flagsForLlvmConfig ++ [
308308+ "-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}"
309309+ "-DLLVM_INSTALL_UTILS=ON" # Needed by rustc
310310+ "-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}"
311311+ "-DLLVM_ENABLE_FFI=ON"
312312+ "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
313313+ "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
314314+ "-DLLVM_ENABLE_DUMP=ON"
315315+ ] ++ optionals stdenv.hostPlatform.isStatic [
316316+ # Disables building of shared libs, -fPIC is still injected by cc-wrapper
317317+ "-DLLVM_ENABLE_PIC=OFF"
318318+ "-DLLVM_BUILD_STATIC=ON"
319319+ "-DLLVM_LINK_LLVM_DYLIB=off"
320320+ # libxml2 needs to be disabled because the LLVM build system ignores its .la
321321+ # file and doesn't link zlib as well.
322322+ # https://github.com/ClangBuiltLinux/tc-build/issues/150#issuecomment-845418812
323323+ "-DLLVM_ENABLE_LIBXML2=OFF"
324324+ ] ++ optionals enableManpages [
325325+ "-DLLVM_BUILD_DOCS=ON"
326326+ "-DLLVM_ENABLE_SPHINX=ON"
327327+ "-DSPHINX_OUTPUT_MAN=ON"
328328+ "-DSPHINX_OUTPUT_HTML=OFF"
329329+ "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
330330+ ] ++ optionals (!isDarwin) [
331331+ "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
332332+ ] ++ optionals isDarwin [
333333+ "-DLLVM_ENABLE_LIBCXX=ON"
334334+ "-DCAN_TARGET_i386=false"
335335+ ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
336336+ "-DCMAKE_CROSSCOMPILING=True"
337337+ "-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen"
338338+ (
339339+ let
340340+ nativeCC = pkgsBuildBuild.targetPackages.stdenv.cc;
341341+ nativeBintools = nativeCC.bintools.bintools;
342342+ nativeToolchainFlags = [
343343+ "-DCMAKE_C_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}cc"
344344+ "-DCMAKE_CXX_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}c++"
345345+ "-DCMAKE_AR=${nativeBintools}/bin/${nativeBintools.targetPrefix}ar"
346346+ "-DCMAKE_STRIP=${nativeBintools}/bin/${nativeBintools.targetPrefix}strip"
347347+ "-DCMAKE_RANLIB=${nativeBintools}/bin/${nativeBintools.targetPrefix}ranlib"
348348+ ];
349349+ # We need to repass the custom GNUInstallDirs values, otherwise CMake
350350+ # will choose them for us, leading to wrong results in llvm-config-native
351351+ nativeInstallFlags = [
352352+ "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}"
353353+ "-DCMAKE_INSTALL_BINDIR=${placeholder "out"}/bin"
354354+ "-DCMAKE_INSTALL_INCLUDEDIR=${placeholder "dev"}/include"
355355+ "-DCMAKE_INSTALL_LIBDIR=${placeholder "lib"}/lib"
356356+ "-DCMAKE_INSTALL_LIBEXECDIR=${placeholder "lib"}/libexec"
357357+ ];
358358+ in "-DCROSS_TOOLCHAIN_FLAGS_NATIVE:list="
359359+ + lib.concatStringsSep ";" (lib.concatLists [
360360+ flagsForLlvmConfig
361361+ nativeToolchainFlags
362362+ nativeInstallFlags
363363+ ])
364364+ )
365365+ ];
366366+367367+ postInstall = ''
368368+ mkdir -p $python/share
369369+ mv $out/share/opt-viewer $python/share/opt-viewer
370370+ moveToOutput "bin/llvm-config*" "$dev"
371371+ substituteInPlace "$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \
372372+ --replace "\''${_IMPORT_PREFIX}/lib/lib" "$lib/lib/lib" \
373373+ --replace "$out/bin/llvm-config" "$dev/bin/llvm-config"
374374+ substituteInPlace "$dev/lib/cmake/llvm/LLVMConfig.cmake" \
375375+ --replace 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}")' 'set(LLVM_BINARY_DIR "'"$lib"'")'
376376+ ''
377377+ + optionalString (stdenv.isDarwin && enableSharedLibraries) ''
378378+ ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
379379+ ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
380380+ ''
381381+ + optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
382382+ cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
383383+ '';
384384+385385+ inherit doCheck;
386386+387387+ checkTarget = "check-all";
388388+389389+ # For the update script:
390390+ passthru.monorepoSrc = monorepoSrc;
391391+392392+ requiredSystemFeatures = [ "big-parallel" ];
393393+ meta = llvm_meta // {
394394+ homepage = "https://llvm.org/";
395395+ description = "A collection of modular and reusable compiler and toolchain technologies";
396396+ longDescription = ''
397397+ The LLVM Project is a collection of modular and reusable compiler and
398398+ toolchain technologies. Despite its name, LLVM has little to do with
399399+ traditional virtual machines. The name "LLVM" itself is not an acronym; it
400400+ is the full name of the project.
401401+ LLVM began as a research project at the University of Illinois, with the
402402+ goal of providing a modern, SSA-based compilation strategy capable of
403403+ supporting both static and dynamic compilation of arbitrary programming
404404+ languages. Since then, LLVM has grown to be an umbrella project consisting
405405+ of a number of subprojects, many of which are being used in production by
406406+ a wide variety of commercial and open source projects as well as being
407407+ widely used in academic research. Code in the LLVM project is licensed
408408+ under the "Apache 2.0 License with LLVM exceptions".
409409+ '';
410410+ };
411411+} // lib.optionalAttrs enableManpages {
412412+ pname = "llvm-manpages";
413413+414414+ propagatedBuildInputs = [];
415415+416416+ ninjaFlags = [ "docs-llvm-man" ];
417417+ installTargets = [ "install-docs-llvm-man" ];
418418+419419+ postPatch = null;
420420+ postInstall = null;
421421+422422+ outputs = [ "out" ];
423423+424424+ doCheck = false;
425425+426426+ meta = llvm_meta // {
427427+ description = "man pages for LLVM ${version}";
428428+ };
429429+})
···11+diff --git a/utils/lit/lit/TestRunner.py b/utils/lit/lit/TestRunner.py
22+index 0242e0b75af3..d732011306f7 100644
33+--- a/utils/lit/lit/TestRunner.py
44++++ b/utils/lit/lit/TestRunner.py
55+@@ -1029,6 +1029,12 @@ def executeScript(test, litConfig, tmpBase, commands, cwd):
66+ f.write('@echo off\n')
77+ f.write('\n@if %ERRORLEVEL% NEQ 0 EXIT\n'.join(commands))
88+ else:
99++ # This env var is *purged* when invoking subprocesses so we have to
1010++ # manually set it from within the bash script in order for the commands
1111++ # in run lines to see this var:
1212++ if "DYLD_LIBRARY_PATH" in test.config.environment:
1313++ f.write(f'export DYLD_LIBRARY_PATH="{test.config.environment["DYLD_LIBRARY_PATH"]}"\n')
1414++
1515+ for i, ln in enumerate(commands):
1616+ match = re.match(kPdbgRegex, ln)
1717+ if match:
1818+@@ -1363,7 +1369,7 @@ def applySubstitutions(script, substitutions, conditions={},
1919+ return processed
2020+2121+ process = processLine if recursion_limit is None else processLineToFixedPoint
2222+-
2323++
2424+ return [unescapePercents(process(ln)) for ln in script]
2525+2626+
···3636, CoreServices
3737, Foundation
3838, Combine
3939+, MacOSX-SDK
3940, CLTools_Executables
4041}:
4142···169170 chmod a+x "$targetFile"
170171 '';
171172173173+ # On Darwin, we need to use BOOTSTRAPPING-WITH-HOSTLIBS because of ABI
174174+ # stability, and have to provide the definitions for the system stdlib.
175175+ appleSwiftCore = stdenv.mkDerivation {
176176+ name = "apple-swift-core";
177177+ dontUnpack = true;
178178+179179+ installPhase = ''
180180+ mkdir -p $out/lib/swift
181181+ cp -r \
182182+ "${MacOSX-SDK}/usr/lib/swift/Swift.swiftmodule" \
183183+ "${MacOSX-SDK}/usr/lib/swift/libswiftCore.tbd" \
184184+ $out/lib/swift/
185185+ '';
186186+ };
187187+172188in stdenv.mkDerivation {
173189 pname = "swift";
174190 inherit (sources) version;
···263279 patch -p1 -d swift -i ${./patches/swift-wrap.patch}
264280 patch -p1 -d swift -i ${./patches/swift-nix-resource-root.patch}
265281 patch -p1 -d swift -i ${./patches/swift-linux-fix-linking.patch}
266266- patch -p1 -d swift -i ${./patches/swift-darwin-fix-bootstrap.patch}
267282 patch -p1 -d swift -i ${substituteAll {
268283 src = ./patches/swift-darwin-plistbuddy-workaround.patch;
269284 inherit swiftArch;
···395410 "
396411 buildProject llvm llvm-project/llvm
397412413413+ '' + lib.optionalString stdenv.isDarwin ''
414414+ # Add appleSwiftCore to the search paths. We can't simply add it to
415415+ # buildInputs, because it is potentially an older stdlib than the one we're
416416+ # building. We have to remove it again after the main Swift build, or later
417417+ # build steps may fail. (Specific case: Concurrency backdeploy uses the
418418+ # Sendable protocol, which appears to not be present in the macOS 11 SDK.)
419419+ OLD_NIX_SWIFTFLAGS_COMPILE="$NIX_SWIFTFLAGS_COMPILE"
420420+ OLD_NIX_LDFLAGS="$NIX_LDFLAGS"
421421+ export NIX_SWIFTFLAGS_COMPILE+=" -I ${appleSwiftCore}/lib/swift"
422422+ export NIX_LDFLAGS+=" -L ${appleSwiftCore}/lib/swift"
423423+ '' + ''
424424+398425 # Some notes:
399399- # - Building with libswift defaults to OFF in CMake, but is enabled in
400400- # standard builds, so we enable it as well.
426426+ # - BOOTSTRAPPING_MODE defaults to OFF in CMake, but is enabled in standard
427427+ # builds, so we enable it as well. On Darwin, we have to use the system
428428+ # Swift libs because of ABI-stability, but this may be trouble if the
429429+ # builder is an older macOS.
401430 # - Experimental features are OFF by default in CMake, but some are
402431 # required to build the stdlib.
403432 # - SWIFT_STDLIB_ENABLE_OBJC_INTEROP is set explicitely because its check
···405434 # Fixed in: https://github.com/apple/swift/commit/84083afef1de5931904d5c815d53856cdb3fb232
406435 cmakeFlags="
407436 -GNinja
408408- -DBOOTSTRAPPING_MODE=BOOTSTRAPPING
437437+ -DBOOTSTRAPPING_MODE=BOOTSTRAPPING${lib.optionalString stdenv.isDarwin "-WITH-HOSTLIBS"}
409438 -DSWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY=ON
410439 -DLLVM_DIR=$SWIFT_BUILD_ROOT/llvm/lib/cmake/llvm
411440 -DClang_DIR=$SWIFT_BUILD_ROOT/llvm/lib/cmake/clang
···417446 -DSWIFT_STDLIB_ENABLE_OBJC_INTEROP=${if stdenv.isDarwin then "ON" else "OFF"}
418447 "
419448 buildProject swift
449449+450450+ '' + lib.optionalString stdenv.isDarwin ''
451451+ # Restore search paths to remove appleSwiftCore.
452452+ export NIX_SWIFTFLAGS_COMPILE="$OLD_NIX_SWIFTFLAGS_COMPILE"
453453+ export NIX_LDFLAGS="$OLD_NIX_LDFLAGS"
454454+ '' + ''
420455421456 # These are based on flags in `utils/build-script-impl`.
422457 #
···11-This patch fixes dylib references during bootstrapping. It's possible
22-`LIBSWIFT_BUILD_MODE=BOOTSTRAPPING` is not really well tested on Darwin,
33-because official builds don't use it.
44-55-In the near future, Swift will require an existing Swift toolchain to
66-bootstrap, and we will likely have to replace this any way.
77-88---- a/stdlib/cmake/modules/AddSwiftStdlib.cmake
99-+++ b/stdlib/cmake/modules/AddSwiftStdlib.cmake
1010-@@ -1035,6 +1035,10 @@ function(add_swift_target_library_single target name)
1111- set(install_name_dir "${SWIFTLIB_SINGLE_DARWIN_INSTALL_NAME_DIR}")
1212- endif()
1313-1414-+ if(DEFINED SWIFTLIB_SINGLE_BOOTSTRAPPING)
1515-+ set(install_name_dir "${lib_dir}/${output_sub_dir}")
1616-+ endif()
1717-+
1818- set_target_properties("${target}"
1919- PROPERTIES
2020- INSTALL_NAME_DIR "${install_name_dir}")
···10101111buildGoModule rec {
1212 pname = "buf";
1313- version = "1.12.0";
1313+ version = "1.13.1";
14141515 src = fetchFromGitHub {
1616 owner = "bufbuild";
1717 repo = pname;
1818 rev = "v${version}";
1919- hash = "sha256-tEeAr1QSec1Sayfg2/erk5u6wBZDodZIMYq9MaU7ATA=";
1919+ hash = "sha256-FEc83SVFCsGDrCg7IYmn8iZ6NozYFsIUJ3QORBYUdMI=";
2020 };
21212222- vendorHash = "sha256-FCAxqyacDdt3mR628/sguvrBx+nG10648XqF5hA8z+s=";
2222+ vendorHash = "sha256-Zmias6mJWYh+PCyBdnRlNyKIoFqEYJZNF19i559SGTI=";
23232424 patches = [
2525 # Skip a test that requires networking to be available to work.
+3-3
pkgs/development/tools/cocogitto/default.nix
···2233rustPlatform.buildRustPackage rec {
44 pname = "cocogitto";
55- version = "5.3.0";
55+ version = "5.3.1";
6677 src = fetchFromGitHub {
88 owner = "oknozor";
99 repo = pname;
1010 rev = version;
1111- sha256 = "sha256-BqyV4hJw7H9yN5Kj/XwhYS6hElXdKUJEUi5M/PNlPO0=";
1111+ sha256 = "sha256-Z0snC5NomUWzxI2qcRMxdZbC1aOQ8P2Ll9EdVfhP7ZU=";
1212 };
13131414- cargoHash = "sha256-MA3XW2tPn0qVx7ve+UqCoG4nQ7UyuvXEebrPuLKqS4g=";
1414+ cargoHash = "sha256-P/xwE3oLVsIoxPmG+S0htSHhZxCj79z2ARGe2WzWCEo=";
15151616 # Test depend on git configuration that would likly exist in a normal user enviroment
1717 # and might be failing to create the test repository it works in.
+10
pkgs/misc/uboot/default.nix
···92929393 passAsFile = [ "extraConfig" ];
94949595+ # Workaround '-idirafter' ordering bug in staging-next:
9696+ # https://github.com/NixOS/nixpkgs/pull/210004
9797+ # where libc '-idirafter' gets added after user's idirafter and
9898+ # breaks.
9999+ # TODO(trofi): remove it in staging once fixed in cc-wrapper.
100100+ preConfigure = ''
101101+ export NIX_CFLAGS_COMPILE_BEFORE_${lib.replaceStrings ["-" "."] ["_" "_"] buildPackages.stdenv.hostPlatform.config}=$(< ${buildPackages.stdenv.cc}/nix-support/libc-cflags)
102102+ export NIX_CFLAGS_COMPILE_BEFORE_${lib.replaceStrings ["-" "."] ["_" "_"] stdenv.hostPlatform.config}=$(< ${stdenv.cc}/nix-support/libc-cflags)
103103+ '';
104104+95105 configurePhase = ''
96106 runHook preConfigure
97107
···2020 ]
2121 },
2222 "contacts": {
2323- "sha256": "0qv3c7wmf9j74562xbjvhk6kbpna6ansiw3724dh4w8j5sldqysd",
2424- "url": "https://github.com/nextcloud-releases/contacts/releases/download/v4.2.3/contacts-v4.2.3.tar.gz",
2525- "version": "4.2.3",
2323+ "sha256": "1996f97w74slmh7ihv8p1lxl32rri5nnzp90mbb1imclpgac2i63",
2424+ "url": "https://github.com/nextcloud-releases/contacts/releases/download/v4.2.4/contacts-v4.2.4.tar.gz",
2525+ "version": "4.2.4",
2626 "description": "The Nextcloud contacts app is a user interface for Nextcloud's CardDAV server. Easily sync contacts from various devices with your Nextcloud and edit them online.\n\n* 🚀 **Integration with other Nextcloud apps!** Currently Mail and Calendar – more to come.\n* 🎉 **Never forget a birthday!** You can sync birthdays and other recurring events with your Nextcloud Calendar.\n* 👥 **Sharing of Adressbooks!** You want to share your contacts with your friends or coworkers? No problem!\n* 🙈 **We’re not reinventing the wheel!** Based on the great and open SabreDAV library.",
2727 "homepage": "https://github.com/nextcloud/contacts#readme",
2828 "licenses": [
···110110 ]
111111 },
112112 "news": {
113113- "sha256": "0pnriarr2iqci2v2hn6vpvszf4m4pkcxsd2i13bp7n1zqkg6swd7",
114114- "url": "https://github.com/nextcloud/news/releases/download/20.0.0/news.tar.gz",
115115- "version": "20.0.0",
113113+ "sha256": "0iz1yrl7h60yhc1d1gkalkzc5vlj8sq6lff0ggns6a6qpsdpn9c5",
114114+ "url": "https://github.com/nextcloud/news/releases/download/20.0.1/news.tar.gz",
115115+ "version": "20.0.1",
116116 "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)",
117117 "homepage": "https://github.com/nextcloud/news",
118118 "licenses": [
···140140 ]
141141 },
142142 "polls": {
143143- "sha256": "b6ef0e8b34cdb5169341e30340bc9cefaa1254a1a6020e951f86e828f8591a11",
144144- "url": "https://github.com/nextcloud/polls/releases/download/v3.8.3/polls.tar.gz",
145145- "version": "3.8.3",
143143+ "sha256": "0qdm0hnljkv0df1s929awyjj1gsp3d6xv9llr52cxv66kkfx086y",
144144+ "url": "https://github.com/nextcloud/polls/releases/download/v3.8.4/polls.tar.gz",
145145+ "version": "3.8.4",
146146 "description": "A polls app, similar to Doodle/Dudle with the possibility to restrict access (members, certain groups/users, hidden and public).",
147147 "homepage": "https://github.com/nextcloud/polls",
148148 "licenses": [
···160160 ]
161161 },
162162 "spreed": {
163163- "sha256": "0frilxny4mvp34fxw0k8al3r5apy3q6vq7z35jkph3vaq1889m9k",
164164- "url": "https://github.com/nextcloud-releases/spreed/releases/download/v14.0.7/spreed-v14.0.7.tar.gz",
165165- "version": "14.0.7",
163163+ "sha256": "0c5b46g5vi8fsjcd2r0wqza7iqyvbgznwww5zcyajf29a32950c6",
164164+ "url": "https://github.com/nextcloud-releases/spreed/releases/download/v14.0.8/spreed-v14.0.8.tar.gz",
165165+ "version": "14.0.8",
166166 "description": "Chat, video & audio-conferencing using WebRTC\n\n* 💬 **Chat integration!** Nextcloud Talk comes with a simple text chat. Allowing you to share files from your Nextcloud and mentioning other participants.\n* 👥 **Private, group, public and password protected calls!** Just invite somebody, a whole group or send a public link to invite to a call.\n* 💻 **Screen sharing!** Share your screen with participants of your call. You just need to use Firefox version 66 (or newer), latest Edge or Chrome 72 (or newer, also possible using Chrome 49 with this [Chrome extension](https://chrome.google.com/webstore/detail/screensharing-for-nextclo/kepnpjhambipllfmgmbapncekcmabkol)).\n* 🚀 **Integration with other Nextcloud apps** like Files, Contacts and Deck. More to come.\n\nAnd in the works for the [coming versions](https://github.com/nextcloud/spreed/milestones/):\n* ✋ [Federated calls](https://github.com/nextcloud/spreed/issues/21), to call people on other Nextclouds",
167167 "homepage": "https://github.com/nextcloud/spreed",
168168 "licenses": [
+15-15
pkgs/servers/nextcloud/packages/25.json
···1010 ]
1111 },
1212 "calendar": {
1313- "sha256": "04g1xm3q46j7harxr0n56r7kkkqjxvah7xijddyq5fj7icr6qf5d",
1414- "url": "https://github.com/nextcloud-releases/calendar/releases/download/v4.2.1/calendar-v4.2.1.tar.gz",
1515- "version": "4.2.1",
1313+ "sha256": "0yqpfp5nbzd7zar2rbcx3bhfgjxrp1sy6a57fdagndfi4y0r56hq",
1414+ "url": "https://github.com/nextcloud-releases/calendar/releases/download/v4.2.2/calendar-v4.2.2.tar.gz",
1515+ "version": "4.2.2",
1616 "description": "The Calendar app is a user interface for Nextcloud's CalDAV server. Easily sync events from various devices with your Nextcloud and edit them online.\n\n* 🚀 **Integration with other Nextcloud apps!** Currently Contacts - more to come.\n* 🌐 **WebCal Support!** Want to see your favorite team’s matchdays in your calendar? No problem!\n* 🙋 **Attendees!** Invite people to your events\n* ⌚️ **Free/Busy!** See when your attendees are available to meet\n* ⏰ **Reminders!** Get alarms for events inside your browser and via email\n* 🔍 Search! Find your events at ease\n* ☑️ Tasks! See tasks with a due date directly in the calendar\n* 🙈 **We’re not reinventing the wheel!** Based on the great [c-dav library](https://github.com/nextcloud/cdav-library), [ical.js](https://github.com/mozilla-comm/ical.js) and [fullcalendar](https://github.com/fullcalendar/fullcalendar) libraries.",
1717 "homepage": "https://github.com/nextcloud/calendar/",
1818 "licenses": [
···2020 ]
2121 },
2222 "contacts": {
2323- "sha256": "097a71if6kkc7nphfc8b6llqlsskjwp1vg83134hzgfscvllvaj8",
2424- "url": "https://github.com/nextcloud-releases/contacts/releases/download/v5.0.2/contacts-v5.0.2.tar.gz",
2525- "version": "5.0.2",
2323+ "sha256": "181lycyz4v7v1yir6ylmblgha625sn23nf3661g3izq1whi0wgr9",
2424+ "url": "https://github.com/nextcloud-releases/contacts/releases/download/v5.0.3/contacts-v5.0.3.tar.gz",
2525+ "version": "5.0.3",
2626 "description": "The Nextcloud contacts app is a user interface for Nextcloud's CardDAV server. Easily sync contacts from various devices with your Nextcloud and edit them online.\n\n* 🚀 **Integration with other Nextcloud apps!** Currently Mail and Calendar – more to come.\n* 🎉 **Never forget a birthday!** You can sync birthdays and other recurring events with your Nextcloud Calendar.\n* 👥 **Sharing of Adressbooks!** You want to share your contacts with your friends or coworkers? No problem!\n* 🙈 **We’re not reinventing the wheel!** Based on the great and open SabreDAV library.",
2727 "homepage": "https://github.com/nextcloud/contacts#readme",
2828 "licenses": [
···9090 ]
9191 },
9292 "news": {
9393- "sha256": "0pnriarr2iqci2v2hn6vpvszf4m4pkcxsd2i13bp7n1zqkg6swd7",
9494- "url": "https://github.com/nextcloud/news/releases/download/20.0.0/news.tar.gz",
9595- "version": "20.0.0",
9393+ "sha256": "0iz1yrl7h60yhc1d1gkalkzc5vlj8sq6lff0ggns6a6qpsdpn9c5",
9494+ "url": "https://github.com/nextcloud/news/releases/download/20.0.1/news.tar.gz",
9595+ "version": "20.0.1",
9696 "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)",
9797 "homepage": "https://github.com/nextcloud/news",
9898 "licenses": [
···120120 ]
121121 },
122122 "polls": {
123123- "sha256": "1amywiw91acp4g90wazmqmnw51s7z6rf27bdrzxrcqryd8igsniq",
124124- "url": "https://github.com/nextcloud/polls/releases/download/v4.1.0-beta4/polls.tar.gz",
125125- "version": "4.1.0-beta4",
123123+ "sha256": "0mqc9zmxrm98byy6v13si3hwii8hx85998c4kv91vk6ad0sfxjhb",
124124+ "url": "https://github.com/nextcloud/polls/releases/download/v4.1.2/polls.tar.gz",
125125+ "version": "4.1.2",
126126 "description": "A polls app, similar to Doodle/Dudle with the possibility to restrict access (members, certain groups/users, hidden and public).",
127127 "homepage": "https://github.com/nextcloud/polls",
128128 "licenses": [
···140140 ]
141141 },
142142 "spreed": {
143143- "sha256": "1w5v866lkd0skv666vhz75zwalr2w83shrhdvv354kill9k53awh",
144144- "url": "https://github.com/nextcloud-releases/spreed/releases/download/v15.0.2/spreed-v15.0.2.tar.gz",
145145- "version": "15.0.2",
143143+ "sha256": "07nh7nlz8di69ms1156fklj29526i3phlvki5vf2mxnlcz8ihg27",
144144+ "url": "https://github.com/nextcloud-releases/spreed/releases/download/v15.0.3/spreed-v15.0.3.tar.gz",
145145+ "version": "15.0.3",
146146 "description": "Chat, video & audio-conferencing using WebRTC\n\n* 💬 **Chat integration!** Nextcloud Talk comes with a simple text chat. Allowing you to share files from your Nextcloud and mentioning other participants.\n* 👥 **Private, group, public and password protected calls!** Just invite somebody, a whole group or send a public link to invite to a call.\n* 💻 **Screen sharing!** Share your screen with participants of your call. You just need to use Firefox version 66 (or newer), latest Edge or Chrome 72 (or newer, also possible using Chrome 49 with this [Chrome extension](https://chrome.google.com/webstore/detail/screensharing-for-nextclo/kepnpjhambipllfmgmbapncekcmabkol)).\n* 🚀 **Integration with other Nextcloud apps** like Files, Contacts and Deck. More to come.\n\nAnd in the works for the [coming versions](https://github.com/nextcloud/spreed/milestones/):\n* ✋ [Federated calls](https://github.com/nextcloud/spreed/issues/21), to call people on other Nextclouds",
147147 "homepage": "https://github.com/nextcloud/spreed",
148148 "licenses": [
+62
pkgs/servers/nextcloud/packages/26.json
···11+{
22+ "calendar": {
33+ "sha256": "0yqpfp5nbzd7zar2rbcx3bhfgjxrp1sy6a57fdagndfi4y0r56hq",
44+ "url": "https://github.com/nextcloud-releases/calendar/releases/download/v4.2.2/calendar-v4.2.2.tar.gz",
55+ "version": "4.2.2",
66+ "description": "The Calendar app is a user interface for Nextcloud's CalDAV server. Easily sync events from various devices with your Nextcloud and edit them online.\n\n* 🚀 **Integration with other Nextcloud apps!** Currently Contacts - more to come.\n* 🌐 **WebCal Support!** Want to see your favorite team’s matchdays in your calendar? No problem!\n* 🙋 **Attendees!** Invite people to your events\n* ⌚️ **Free/Busy!** See when your attendees are available to meet\n* ⏰ **Reminders!** Get alarms for events inside your browser and via email\n* 🔍 Search! Find your events at ease\n* ☑️ Tasks! See tasks with a due date directly in the calendar\n* 🙈 **We’re not reinventing the wheel!** Based on the great [c-dav library](https://github.com/nextcloud/cdav-library), [ical.js](https://github.com/mozilla-comm/ical.js) and [fullcalendar](https://github.com/fullcalendar/fullcalendar) libraries.",
77+ "homepage": "https://github.com/nextcloud/calendar/",
88+ "licenses": [
99+ "agpl"
1010+ ]
1111+ },
1212+ "files_texteditor": {
1313+ "sha256": "0rmk14iw34pd81snp3lm01k07wm5j2nh9spcd4j0m43l20b7kxss",
1414+ "url": "https://github.com/nextcloud-releases/files_texteditor/releases/download/v2.15.0/files_texteditor.tar.gz",
1515+ "version": "2.15.0",
1616+ "description": "This application enables Nextcloud users to open, save and edit text files in the web browser. If enabled, an entry called \"Text file\" in the \"New\" button menu at the top of the web browser appears. When clicked, a new text file opens in the browser and the file can be saved into the current Nextcloud directory. Further, when a text file is clicked in the web browser, it will be opened and editable. If the privileges allow, a user can also edit shared files and save these changes back into the web browser.\nMore information is available in the text editor documentation.",
1717+ "homepage": "https://github.com/nextcloud/files_texteditor",
1818+ "licenses": [
1919+ "agpl"
2020+ ]
2121+ },
2222+ "mail": {
2323+ "sha256": "",
2424+ "url": "https://github.com/nextcloud-releases/mail/releases/download/v2.2.2/mail-v2.2.2.tar.gz",
2525+ "version": "2.2.2",
2626+ "description": "**💌 A mail app for Nextcloud**\n\n- **🚀 Integration with other Nextcloud apps!** Currently Contacts, Calendar & Files – more to come.\n- **📥 Multiple mail accounts!** Personal and company account? No problem, and a nice unified inbox. Connect any IMAP account.\n- **🔒 Send & receive encrypted mails!** Using the great [Mailvelope](https://mailvelope.com) browser extension.\n- **🙈 We’re not reinventing the wheel!** Based on the great [Horde](https://horde.org) libraries.\n- **📬 Want to host your own mail server?** We do not have to reimplement this as you could set up [Mail-in-a-Box](https://mailinabox.email)!",
2727+ "homepage": "https://github.com/nextcloud/mail#readme",
2828+ "licenses": [
2929+ "agpl"
3030+ ]
3131+ },
3232+ "notes": {
3333+ "sha256": "1jcgv3awr45jq3n3qv851qlpbdl2plixba0iq2s54dmhciypdckl",
3434+ "url": "https://github.com/nextcloud/notes/releases/download/v4.6.0/notes.tar.gz",
3535+ "version": "4.6.0",
3636+ "description": "The Notes app is a distraction free notes taking app for [Nextcloud](https://www.nextcloud.com/). It provides categories for better organization and supports formatting using [Markdown](https://en.wikipedia.org/wiki/Markdown) syntax. Notes are saved as files in your Nextcloud, so you can view and edit them with every Nextcloud client. Furthermore, a separate [REST API](https://github.com/nextcloud/notes/blob/master/docs/api/README.md) allows for an easy integration into third-party apps (currently, there are notes apps for [Android](https://github.com/stefan-niedermann/nextcloud-notes), [iOS](https://github.com/owncloud/notes-iOS-App) and the [console](https://git.danielmoch.com/nncli/about) which allow convenient access to your Nextcloud notes). Further features include marking notes as favorites.",
3737+ "homepage": "https://github.com/nextcloud/notes",
3838+ "licenses": [
3939+ "agpl"
4040+ ]
4141+ },
4242+ "tasks": {
4343+ "sha256": "0jm13d6nm7cfsw27yfiq1il9xjlh0qrq8xby2yz9dmggn7lk1dx5",
4444+ "url": "https://github.com/nextcloud/tasks/releases/download/v0.14.5/tasks.tar.gz",
4545+ "version": "0.14.5",
4646+ "description": "Once enabled, a new Tasks menu will appear in your Nextcloud apps menu. From there you can add and delete tasks, edit their title, description, start and due dates and mark them as important. Tasks can be shared between users. Tasks can be synchronized using CalDav (each task list is linked to an Nextcloud calendar, to sync it to your local client: Thunderbird, Evolution, KDE Kontact, iCal … - just add the calendar as a remote calendar in your client). You can download your tasks as ICS files using the download button for each calendar.",
4747+ "homepage": "https://github.com/nextcloud/tasks/",
4848+ "licenses": [
4949+ "agpl"
5050+ ]
5151+ },
5252+ "unsplash": {
5353+ "sha256": "17qqn6kwpvkq21c92jyy3pfvjaj5xms1hr07fnn39zxg0nmwjdd8",
5454+ "url": "https://github.com/nextcloud/unsplash/releases/download/v2.1.1/unsplash.tar.gz",
5555+ "version": "2.1.1",
5656+ "description": "Show a new random featured nature photo in your nextcloud. Now with choosable motives!",
5757+ "homepage": "https://github.com/nextcloud/unsplash/",
5858+ "licenses": [
5959+ "agpl"
6060+ ]
6161+ }
6262+}
···11+From fc3e14155b3c4300b691ab46579830e725457a54 Mon Sep 17 00:00:00 2001
22+From: Maximilian Bosch <maximilian@mbosch.me>
33+Date: Sat, 10 Sep 2022 15:18:05 +0200
44+Subject: [PATCH] Setup: remove custom dbuser creation behavior
55+66+Both PostgreSQL and MySQL can be authenticated against from Nextcloud by
77+supplying a database password. Now, during setup the following things
88+happen:
99+1010+* When using postgres and the db user has elevated permissions, a new
1111+ unprivileged db user is created and the settings `dbuser`/`dbpass` are
1212+ altered in `config.php`.
1313+1414+* When using MySQL, the password is **always** regenerated since
1515+ 24.0.5/23.0.9[1].
1616+1717+I consider both cases problematic: the reason why people do configuration
1818+management is to have it as single source of truth! So, IMHO any
1919+application that silently alters config and thus causes deployed
2020+nodes to diverge from the configuration is harmful for that.
2121+2222+I guess it was sheer luck that it worked for so long in NixOS because
2323+nobody has apparently used password authentication with a privileged
2424+user to operate Nextcloud (which is a good thing in fact).
2525+2626+[1] https://github.com/nextcloud/server/pull/33513
2727+---
2828+ lib/private/Setup/MySQL.php | 53 --------------------------------
2929+ lib/private/Setup/PostgreSQL.php | 37 ----------------------
3030+ 2 files changed, 90 deletions(-)
3131+3232+diff --git a/lib/private/Setup/MySQL.php b/lib/private/Setup/MySQL.php
3333+index e3004c269bc..bc958e84e44 100644
3434+--- a/lib/private/Setup/MySQL.php
3535++++ b/lib/private/Setup/MySQL.php
3636+@@ -141,62 +141,6 @@
3737+ $rootUser = $this->dbUser;
3838+ $rootPassword = $this->dbPassword;
3939+4040+- //create a random password so we don't need to store the admin password in the config file
4141+- $saveSymbols = str_replace(['\"', '\\', '\'', '`'], '', ISecureRandom::CHAR_SYMBOLS);
4242+- $password = $this->random->generate(22, ISecureRandom::CHAR_ALPHANUMERIC . $saveSymbols)
4343+- . $this->random->generate(2, ISecureRandom::CHAR_UPPER)
4444+- . $this->random->generate(2, ISecureRandom::CHAR_LOWER)
4545+- . $this->random->generate(2, ISecureRandom::CHAR_DIGITS)
4646+- . $this->random->generate(2, $saveSymbols)
4747+- ;
4848+- $this->dbPassword = str_shuffle($password);
4949+-
5050+- try {
5151+- //user already specified in config
5252+- $oldUser = $this->config->getValue('dbuser', false);
5353+-
5454+- //we don't have a dbuser specified in config
5555+- if ($this->dbUser !== $oldUser) {
5656+- //add prefix to the admin username to prevent collisions
5757+- $adminUser = substr('oc_' . $username, 0, 16);
5858+-
5959+- $i = 1;
6060+- while (true) {
6161+- //this should be enough to check for admin rights in mysql
6262+- $query = 'SELECT user FROM mysql.user WHERE user=?';
6363+- $result = $connection->executeQuery($query, [$adminUser]);
6464+-
6565+- //current dbuser has admin rights
6666+- $data = $result->fetchAll();
6767+- $result->closeCursor();
6868+- //new dbuser does not exist
6969+- if (count($data) === 0) {
7070+- //use the admin login data for the new database user
7171+- $this->dbUser = $adminUser;
7272+- $this->createDBUser($connection);
7373+-
7474+- break;
7575+- } else {
7676+- //repeat with different username
7777+- $length = strlen((string)$i);
7878+- $adminUser = substr('oc_' . $username, 0, 16 - $length) . $i;
7979+- $i++;
8080+- }
8181+- }
8282+- } else {
8383+- // Reuse existing password if a database config is already present
8484+- $this->dbPassword = $rootPassword;
8585+- }
8686+- } catch (\Exception $ex) {
8787+- $this->logger->info('Can not create a new MySQL user, will continue with the provided user.', [
8888+- 'exception' => $ex,
8989+- 'app' => 'mysql.setup',
9090+- ]);
9191+- // Restore the original credentials
9292+- $this->dbUser = $rootUser;
9393+- $this->dbPassword = $rootPassword;
9494+- }
9595+-
9696+ $this->config->setValues([
9797+ 'dbuser' => $this->dbUser,
9898+ 'dbpassword' => $this->dbPassword,
9999+diff --git a/lib/private/Setup/PostgreSQL.php b/lib/private/Setup/PostgreSQL.php
100100+index af816c7ad04..e49e5508e15 100644
101101+--- a/lib/private/Setup/PostgreSQL.php
102102++++ b/lib/private/Setup/PostgreSQL.php
103103+@@ -45,43 +45,6 @@ class PostgreSQL extends AbstractDatabase {
104104+ $connection = $this->connect([
105105+ 'dbname' => 'postgres'
106106+ ]);
107107+- //check for roles creation rights in postgresql
108108+- $builder = $connection->getQueryBuilder();
109109+- $builder->automaticTablePrefix(false);
110110+- $query = $builder
111111+- ->select('rolname')
112112+- ->from('pg_roles')
113113+- ->where($builder->expr()->eq('rolcreaterole', new Literal('TRUE')))
114114+- ->andWhere($builder->expr()->eq('rolname', $builder->createNamedParameter($this->dbUser)));
115115+-
116116+- try {
117117+- $result = $query->execute();
118118+- $canCreateRoles = $result->rowCount() > 0;
119119+- } catch (DatabaseException $e) {
120120+- $canCreateRoles = false;
121121+- }
122122+-
123123+- if ($canCreateRoles) {
124124+- $connectionMainDatabase = $this->connect();
125125+- //use the admin login data for the new database user
126126+-
127127+- //add prefix to the postgresql user name to prevent collisions
128128+- $this->dbUser = 'oc_' . strtolower($username);
129129+- //create a new password so we don't need to store the admin config in the config file
130130+- $this->dbPassword = \OC::$server->getSecureRandom()->generate(30, ISecureRandom::CHAR_ALPHANUMERIC);
131131+-
132132+- $this->createDBUser($connection);
133133+-
134134+- // Go to the main database and grant create on the public schema
135135+- // The code below is implemented to make installing possible with PostgreSQL version 15:
136136+- // https://www.postgresql.org/docs/release/15.0/
137137+- // From the release notes: For new databases having no need to defend against insider threats, granting CREATE permission will yield the behavior of prior releases
138138+- // Therefore we assume that the database is only used by one user/service which is Nextcloud
139139+- // Additional services should get installed in a separate database in order to stay secure
140140+- // Also see https://www.postgresql.org/docs/15/ddl-schemas.html#DDL-SCHEMAS-PATTERNS
141141+- $connectionMainDatabase->executeQuery('GRANT CREATE ON SCHEMA public TO ' . addslashes($this->dbUser));
142142+- $connectionMainDatabase->close();
143143+- }
144144+145145+ $this->config->setValues([
146146+ 'dbuser' => $this->dbUser,
147147+--
148148+2.38.1
149149+