genson
December 3, 2023, 2:58pm
1
NixOS 23.11’s nextcloud-client suffers from this . There is an easy work around to comment out a line, but I am not sure how I would do this in NixOS.
The problem is only cosmetic, but I run this on all the computers at my house and my family won’t understand “just cosmetic”.
I appreciate time anyone spends on this.
From skimming the source patching like this should do it:
nextcloud-client.overrideAttrs (attrs: {
patches = attrs.patches ++ [
# Workaround for https://github.com/nextcloud/desktop/issues/6218
(builtins.toFile "remove-desktop-implements.patch" ''
--- a/mirall.desktop.in
+++ b/mirall.desktop.in
@@ -200 +199,0 @@
-@LIBCLOUDPROVIDERS_DESKTOP_IMPLEMENTS@
'')
];
})
Though maybe someone else can offer a method that doesn’t cause the whole thing to recompile.
Also note that the upstream issue suggests that the desktop entry is correct and the .ini is the duplicate, so the more correct patch might be something like:
--- a/shell_integration/libcloudproviders/CMakeLists.txt
+++ b/shell_integration/libcloudproviders/CMakeLists.txt
@@ -37 +36,0 @@
- libcloudproviders_add_config(org.freedesktop.CloudProviders.ini.in)
genson
December 5, 2023, 3:34pm
3
Thank you for the fast response. Unfortunately, I got bogged down in work so I won’t be able to try this until the weekend, but I am looking forward to attempting this fix!
genson
December 12, 2023, 9:43pm
4
Just when I start to feel like I understand nix, I find something which I am pretty sure is elementary to the whole thing that I don’t understand.
I am trying to use your fix from above, but I can’t seem to figure out where to put it.
When I drop it into one my modules, it complains:
error: syntax error, unexpected '(', expecting '.' or '='
at /nix/store/nh03bpiwc21s4i6k0bw7izfihxvdr665-source/systems/workstation-configuration.nix:380:34:
379|
380| nextcloud-client.overrideAttrs (attrs: {
| ^
381| patches = attrs.patches ++ [
Is this supposed to be included within or instead of the
environment.systemPackages = with pkgs; [
...
nextcloud-client
...
],
or as a module of its own, a solitary flake,
_Andrew
December 12, 2023, 10:00pm
5
You should be able to use it where nextcloud-client
was, just since that’s in a list delimited by whitespace it needs to be wrapped in parentheses:
environment.systemPackages = with pkgs; [
…
(nextcloud-client.overrideAttrs (attrs: …))
…
];
1 Like