I’m trying to patch qt5ct and qt6ct with their kde patch, which im doing like so:

  home.packages = with pkgs; [
    kdePackages.qt6ct.overrideAttrs (finalAttrs: previousAttrs: {
      patches = [
        fetchpatch {
          url = "https://aur.archlinux.org/cgit/aur.git/plain/qt6ct-shenanigans.patch?h=qt6ct-kde";
          hash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
        }
      ];
    })

    libsForQt5.qt5ct.override {
      patches = [
        fetchpatch {
          url = "https://aur.archlinux.org/cgit/aur.git/plain/qt5ct-shenanigans.patch?h=qt5ct-kde";
          hash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
        }
      ];
    }
  ];

but that im getting this error

error: A definition for option `home-manager.users.claymorwan.home.packages."[definition 10-entry 3]"' is not of type `package'. Definition values:
       - In `/nix/store/2p2nainh0h91ijj2724bpg1pc1z8ska5-source/NixOS/modules/home/qt.nix': <function, args: {fetchurl, lib, mkDerivation, qmake, qtbase, qtsvg, qttools}>
  • Corngood@lemmy.ml
    link
    fedilink
    English
    arrow-up
    3
    ·
    2 months ago

    Maybe you need to use overrideAttrs for both packages? it doesn’t seem to take patches as an argument

    • claymorwan@lemmy.blahaj.zoneOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 months ago

      yea that worked, now im getting this tho:

             … while calling the 'head' builtin
               at /nix/store/kfcxqcxb9hcq6x33sg4cmwakbb1ifwg9-source/lib/attrsets.nix:1713:13:
               1712|           if length values == 1 || pred here (elemAt values 1) (head values) then
               1713|             head values
                   |             ^
               1714|           else
      
             … while evaluating the attribute 'value'
               at /nix/store/kfcxqcxb9hcq6x33sg4cmwakbb1ifwg9-source/lib/modules.nix:1118:7:
               1117|     // {
               1118|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
                   |       ^
               1119|       inherit (res.defsFinal') highestPrio;
      
             … while evaluating the option `system.build.toplevel':
      
             … while evaluating definitions from `/nix/store/kfcxqcxb9hcq6x33sg4cmwakbb1ifwg9-source/nixos/modules/system/activation/top-level.nix':
      
             … while evaluating the option `warnings':
      
             … while evaluating definitions from `/nix/store/kfcxqcxb9hcq6x33sg4cmwakbb1ifwg9-source/nixos/modules/system/boot/systemd.nix':
      
             … while evaluating the option `systemd.services.home-manager-claymorwan.serviceConfig':
      
             … while evaluating definitions from `/nix/store/x4cardk9amcfpx2r02v8ic20aclgjxf4-source/nixos':
      
             … while evaluating the option `home-manager.users.claymorwan.home.file."/home/claymorwan/.config/fontconfig/conf.d/10-hm-fonts.conf".source':
      
             … while evaluating definitions from `/nix/store/x4cardk9amcfpx2r02v8ic20aclgjxf4-source/modules/files.nix':
      
             … while evaluating the option `home-manager.users.claymorwan.home.file."/home/claymorwan/.config/fontconfig/conf.d/10-hm-fonts.conf".text':
      
             … while evaluating definitions from `/nix/store/x4cardk9amcfpx2r02v8ic20aclgjxf4-source/modules/misc/xdg.nix':
      
             … while evaluating the option `home-manager.users.claymorwan.xdg.configFile."fontconfig/conf.d/10-hm-fonts.conf".text':
      
             … while evaluating definitions from `/nix/store/x4cardk9amcfpx2r02v8ic20aclgjxf4-source/modules/misc/fontconfig.nix':
      
             … while evaluating the option `home-manager.users.claymorwan.fonts.fontconfig.configFile.fonts.text':
      
             … while evaluating definitions from `/nix/store/x4cardk9amcfpx2r02v8ic20aclgjxf4-source/modules/misc/fontconfig.nix':
      
             (stack trace truncated; use '--show-trace' to show the full, detailed trace)
      
             error: cannot coerce a set to a string: { __functionArgs = «thunk»; __functor = «lambda __functor @ /nix/store/kfcxqcxb9hcq6x33sg4cmwakbb1ifwg9-source/lib/trivial.nix:1017:17»; override = «thunk»; tests = «thunk»; version = 1; }
      
      • balsoft@lemmy.ml
        link
        fedilink
        English
        arrow-up
        3
        ·
        2 months ago

        Seems unrelated to the other issue, look through the stacktrace, it’s complaining about home-manager.users.claymorwan.fonts.fontconfig.configFile.fonts.text

      • Corngood@lemmy.ml
        link
        fedilink
        English
        arrow-up
        2
        ·
        2 months ago

        Are you sure that’s related to the packages? It says it’s evaluating font config.