···361361 */
362362 byName = attr: f: modules:
363363 foldl' (acc: module:
364364+ if !(builtins.isAttrs module.${attr}) then
365365+ throw ''
366366+ You're trying to declare a value of type `${builtins.typeOf module.${attr}}'
367367+ rather than an attribute-set for the option
368368+ `${builtins.concatStringsSep "." prefix}'!
369369+370370+ This usually happens if `${builtins.concatStringsSep "." prefix}' has option
371371+ definitions inside that are not matched. Please check how to properly define
372372+ this option by e.g. referring to `man 5 configuration.nix'!
373373+ ''
374374+ else
364375 acc // (mapAttrs (n: v:
365376 (acc.${n} or []) ++ f module v
366377 ) module.${attr}
+1-1
lib/tests/modules.sh
···169169## shorthandOnlyDefines config behaves as expected
170170checkConfigOutput "true" config.submodule.config ./declare-submoduleWith-shorthand.nix ./define-submoduleWith-shorthand.nix
171171checkConfigError 'is not of type `boolean' config.submodule.config ./declare-submoduleWith-shorthand.nix ./define-submoduleWith-noshorthand.nix
172172-checkConfigError 'value is a boolean while a set was expected' config.submodule.config ./declare-submoduleWith-noshorthand.nix ./define-submoduleWith-shorthand.nix
172172+checkConfigError "You're trying to declare a value of type \`bool'\nrather than an attribute-set for the option" config.submodule.config ./declare-submoduleWith-noshorthand.nix ./define-submoduleWith-shorthand.nix
173173checkConfigOutput "true" config.submodule.config ./declare-submoduleWith-noshorthand.nix ./define-submoduleWith-noshorthand.nix
174174175175## submoduleWith should merge all modules in one swoop
···55 "17.03" = "gs://nixos-cloud-images/nixos-image-17.03.1082.4aab5c5798-x86_64-linux.raw.tar.gz";
66 "18.03" = "gs://nixos-cloud-images/nixos-image-18.03.132536.fdb5ba4cdf9-x86_64-linux.raw.tar.gz";
77 "18.09" = "gs://nixos-cloud-images/nixos-image-18.09.1228.a4c4cbb613c-x86_64-linux.raw.tar.gz";
88- latest = self."18.09";
88+99+ # This format will be handled by the upcoming NixOPS 2.0 release.
1010+ # The old images based on a GS object are deprecated.
1111+ "20.09" = {
1212+ project = "nixos-cloud";
1313+ name = "nixos-image-20-09-3531-3858fbc08e6-x86-64-linux";
1414+ };
1515+1616+ latest = self."20.09";
917}; in self
+1-1
pkgs/applications/audio/clementine/default.nix
···1010 withCD = config.clementine.cd or true;
1111 withCloud = config.clementine.cloud or true;
12121313- # On the update after all 1.4rc, qt5.15 will be supported.
1313+ # On the update after all 1.4rc, qt5.15 and protobuf 3.15 will be supported.
1414 version = "1.4.0rc1";
15151616 src = fetchFromGitHub {
···11+From 29ec6fada935ef966e5859082435ed57daa9522d Mon Sep 17 00:00:00 2001
22+From: Samuel Dionne-Riel <samuel@dionne-riel.com>
33+Date: Tue, 16 Mar 2021 15:03:59 -0400
44+Subject: [PATCH] [NixOS] Unwrap executable name for .desktop search
55+66+Why is this necessary even though -a "$0" is used in the wrapper?
77+Because it's completely bypassing argv0! This looks at the executable
88+file in-use according to the kernel!
99+1010+Wrappers cannot affect the `/proc/.../exe` symlink!
1111+---
1212+ service_utils.h | 28 +++++++++++++++++++++++++++-
1313+ 1 file changed, 27 insertions(+), 1 deletion(-)
1414+1515+diff --git a/service_utils.h b/service_utils.h
1616+index 8a70c1fad..6674f553b 100644
1717+--- a/service_utils.h
1818++++ b/service_utils.h
1919+@@ -26,8 +26,34 @@ namespace KWin
2020+ const static QString s_waylandInterfaceName = QStringLiteral("X-KDE-Wayland-Interfaces");
2121+ const static QString s_dbusRestrictedInterfaceName = QStringLiteral("X-KDE-DBUS-Restricted-Interfaces");
2222+2323+-static QStringList fetchProcessServiceField(const QString &executablePath, const QString &fieldName)
2424++static QStringList fetchProcessServiceField(const QString &in_executablePath, const QString &fieldName)
2525+ {
2626++ // !! Start NixOS fix
2727++ // NixOS fixes many packaging issues through "wrapper" scripts that manipulates the environment or does
2828++ // miscellaneous trickeries and mischievous things to make the programs work.
2929++ // In turn, programs often employs different mischievous schemes and trickeries to do *other things.
3030++ // It often happens that they conflict.
3131++ // Here, `kwin` tries to detect the .desktop file for a given process.
3232++ // `kwin` followed the process `/proc/.../exe` up to the actual binary running.
3333++ // It normally would be fine, e.g. /usr/bin/foobar is what's in the desktop file.
3434++ // But it's not the truth here! It's extremely likely the resolved path is /nix/store/.../bin/.foobar-wrapped
3535++ // rather than what the desktop file points to, something like /nix/store/.../bin/foobar !!
3636++ // Since the wrappers for Nixpkgs *always* prepend a dot and append -wrapped, we assume here that we can keep
3737++ // `/^(.*)\/\.([^/]*)-wrapped/` until the (equivalent) regex does not match.
3838++ // This should canonicalize the wrapper name to the expected name to look for in the desktop file.
3939++
4040++ // Use a copy of the const string
4141++ QString executablePath(in_executablePath);
4242++
4343++ // While the parts needed are present, "unwrap" one layer of wrapper names.
4444++ while (executablePath.endsWith("-wrapped") && executablePath[executablePath.lastIndexOf("/")+1] == QChar('.')) {
4545++ // Approximately equivalent to s/-wrapped$//
4646++ executablePath.remove(executablePath.length() - 8, 8);
4747++ // Approximately equivalent to s;/\.;/;
4848++ executablePath.remove(executablePath.lastIndexOf("/")+1, 1);
4949++ }
5050++ // !! End NixOS fix
5151++
5252+ // needed to be able to use the logging category in a header static function
5353+ static QLoggingCategory KWIN_UTILS ("KWIN_UTILS", QtWarningMsg);
5454+ const auto servicesFound = KApplicationTrader::query([&executablePath] (const KService::Ptr &service) {
5555+--
5656+2.28.0
5757+
···11{ stdenv, callPackage, lib, fetchurl, fetchpatch, runCommand, makeWrapper
22, zip, unzip, bash, writeCBin, coreutils
33-, which, python, perl, gawk, gnused, gnutar, gnugrep, gzip, findutils
33+, which, python3, perl, gawk, gnused, gnutar, gnugrep, gzip, findutils
44# Apple dependencies
55, cctools, llvmPackages_8, CoreFoundation, CoreServices, Foundation
66# Allow to independently override the jdks used to build and run respectively
···210210 # Substitute python's stub shebang to plain python path. (see TODO add pr URL)
211211 # See also `postFixup` where python is added to $out/nix-support
212212 substituteInPlace src/main/java/com/google/devtools/build/lib/bazel/rules/python/python_stub_template.txt\
213213- --replace "/usr/bin/env python" "${python}/bin/python" \
214214- --replace "NIX_STORE_PYTHON_PATH" "${python}/bin/python" \
213213+ --replace "/usr/bin/env python" "${python3.interpreter}" \
214214+ --replace "NIX_STORE_PYTHON_PATH" "${python3.interpreter}" \
215215216216 # md5sum is part of coreutils
217217 sed -i 's|/sbin/md5|md5sum|' \
···287287 buildJdk
288288 ];
289289290290+ strictDeps = true;
291291+290292 # when a command can’t be found in a bazel build, you might also
291293 # need to add it to `defaultShellPath`.
292294 nativeBuildInputs = [
293295 zip
294294- python
296296+ python3
295297 unzip
296298 makeWrapper
297299 which
···380382 echo "${customBash} ${defaultShellPath}" >> $out/nix-support/depends
381383 # The templates get tar’d up into a .jar,
382384 # so nix can’t detect python is needed in the runtime closure
383383- echo "${python}" >> $out/nix-support/depends
385385+ echo "${python3}" >> $out/nix-support/depends
384386 '';
385387386388 dontStrip = true;