!QhvgabMQzwEQeWehhZ:lossy.network

NixOS Home Automation

516 Members
Declarative Home Automation and other Sidequests | https://wiki.nixos.org/wiki/Home_Assistant130 Servers

Load older messages


SenderMessageTime
21 Nov 2024
@hexa:lossy.network@hexa:lossy.network
Nov 20 16:18:59 aleph0 frigate[5661]:     edge_tpu_delegate = load_delegate("libedgetpu.so.1.0", device_config)
Nov 20 16:18:59 aleph0 frigate[5661]:                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
00:38:08
@netpleb:matrix.orgnetpleb
In reply to @hexa:lossy.network
your trace shows that the patch didn't get applied

strange.. could it be the or [ ] ++ [ ...? here is what I added to my config:

    # override the frigate package to include our patch (necessary for coral usb tpu)
    package = pkgs.frigate.overrideAttrs (oldAttrs: {
      patches = oldAttrs.patches or [ ] ++ [
        (pkgs.substituteAll {
          src = ./patches/libedgetpu.patch;
          libedgetpu = "${lib.getLib pkgs.libedgetpu}/lib/libedgetpu.so.1.0";
        })
      ];
    });
00:39:05
@hexa:lossy.network@hexa:lossy.networkit looks like this on my PR00:39:17
@hexa:lossy.network@hexa:lossy.network
41:            edge_tpu_delegate = load_delegate("/nix/store/fvjzhbpnvdfn00ngw53nyc9qngkh5j5m-libedgetpu-0-unstable-2024-03-14/lib/libedgetpu.so.1.0", device_config)
00:39:19
@hexa:lossy.network@hexa:lossy.networkwhich looks pretty solid to me00:39:26
@hexa:lossy.network@hexa:lossy.networkdid the service get restarted?00:39:57
@netpleb:matrix.orgnetpleb
In reply to @hexa:lossy.network
which looks pretty solid to me
yes, that looks solid. So somehow there is a difference between your PR and me overriding the package locally. Is it possible that the frigate package does not respect the patching process?
00:40:22
@hexa:lossy.network@hexa:lossy.networkohhhhh00:40:36
@hexa:lossy.network@hexa:lossy.networkmy bad00:40:38
@hexa:lossy.network@hexa:lossy.network instead of overrideAttrs use overridePythonAttrs 00:40:46
@netpleb:matrix.orgnetpleb
In reply to @hexa:lossy.network
instead of overrideAttrs use overridePythonAttrs
ok, updated and tried it. Still getting the same error which makes me think the patch is still not applying somehow. I also got this on my redeploy: warning: The interpretation of store paths arguments ending in .drv recently changed. If this command is now failing try again with '/nix/store/d0qg4fms4bmwmp2jz2padxpj9pycqx34-nixos-system-aleph0-25.05.20241115.5e4fbfb.drv^*'
00:44:11
@hexa:lossy.network@hexa:lossy.networkthat warning is unrelated00:44:28
@netpleb:matrix.orgnetpleb
In reply to @hexa:lossy.network
your trace shows that the patch didn't get applied
*

strange.. could it be the or [ ] ++ [ ...? here is what I added to my config:

    # override the frigate package to include our patch (necessary for coral usb tpu)
    package = pkgs.frigate.overridePythonAttrs (oldAttrs: {
      patches = oldAttrs.patches or [ ] ++ [
        (pkgs.substituteAll {
          src = ./patches/libedgetpu.patch;
          libedgetpu = "${lib.getLib pkgs.libedgetpu}/lib/libedgetpu.so.1.0";
        })
      ];
    });
00:45:11
@netpleb:matrix.orgnetpleb
In reply to @hexa:lossy.network
instead of overrideAttrs use overridePythonAttrs
all I changed was this
00:45:49
@hexa:lossy.network@hexa:lossy.networkdid this result in a package rebuild?00:45:59
@netpleb:matrix.orgnetpleb
In reply to @hexa:lossy.network
instead of overrideAttrs use overridePythonAttrs
* all I changed was this (edited above in the chat too for consistency)
00:46:03
@netpleb:matrix.orgnetpleb
In reply to @hexa:lossy.network
did this result in a package rebuild?
not sure about the package rebuild, but it did result in a restart of the frigate service
00:46:29
@hexa:lossy.network@hexa:lossy.networkuh, looks like I might have broken overrides00:46:56
@hexa:lossy.network@hexa:lossy.networkmy bad00:47:00
@hexa:lossy.network@hexa:lossy.network
    pythonPath =(python.pkgs.makePythonPath propagatedBuildInputs) + ":${frigate}/${python.sitePackages}";
00:47:13
@hexa:lossy.network@hexa:lossy.networkthe frigate consumed here remains unpatched00:47:19
@netpleb:matrix.orgnetplebwell, if it helps, I am learning a lot by you doing this...despite having a flakes based nixos system as my primary system for a while, i never really figured out overlays properly00:48:16
@netpleb:matrix.orgnetpleband patches for that matter00:48:20
@hexa:lossy.network@hexa:lossy.network
{ lib, pkgs, ... }:
{
  nixpkgs.overlays = [
    (self: super: {
      frigate = super.frigate.overridePythonAttrs (oldAttrs: {
        patches = oldAttrs.patches or [ ] ++ [
          (pkgs.substituteAll {
            src = ./libedgetpu.patch;
            libedgetpu = "${lib.getLib pkgs.libedgetpu}/lib/libedgetpu.so.1.0";
           })
        ];
      });
     }) ];
    }
00:48:54
@hexa:lossy.network@hexa:lossy.network *
{ lib, pkgs, ... }:
{
  nixpkgs.overlays = [
    (self: super: {
      frigate = super.frigate.overridePythonAttrs (oldAttrs: {
        patches = oldAttrs.patches or [ ] ++ [
          (pkgs.substituteAll {
            src = ./libedgetpu.patch;
            libedgetpu = "${lib.getLib pkgs.libedgetpu}/lib/libedgetpu.so.1.0";
           })
        ];
      });
     }) ];
    }
00:48:59
@hexa:lossy.network@hexa:lossy.networkand overlay should work 🫣00:49:06
@hexa:lossy.network@hexa:lossy.network *
{ lib, pkgs, ... }:
{
  nixpkgs.overlays = [
    (self: super: {
      frigate = super.frigate.overridePythonAttrs (oldAttrs: {
        patches = oldAttrs.patches or [ ] ++ [
          (pkgs.substituteAll {
            src = ./libedgetpu.patch;
            libedgetpu = "${lib.getLib pkgs.libedgetpu}/lib/libedgetpu.so.1.0";
           })
        ];
      });
     })
  ];
}
00:49:41
@netpleb:matrix.orgnetpleb
In reply to @hexa:lossy.network
{ lib, pkgs, ... }:
{
  nixpkgs.overlays = [
    (self: super: {
      frigate = super.frigate.overridePythonAttrs (oldAttrs: {
        patches = oldAttrs.patches or [ ] ++ [
          (pkgs.substituteAll {
            src = ./libedgetpu.patch;
            libedgetpu = "${lib.getLib pkgs.libedgetpu}/lib/libedgetpu.so.1.0";
           })
        ];
      });
     })
  ];
}
ok, so I get rid of my services.frigate.package = ... and instead add the above?
00:49:45
@hexa:lossy.network@hexa:lossy.networkyes00:49:49
@hexa:lossy.network@hexa:lossy.networkmaybe I messed up the brackets, not sure00:49:57

Show newer messages


Back to Room ListRoom Version: 6