!QCCCSJHEsTIfozrZxz:nixos.org

Nix + Go

241 Members
Go packaging for and with Nixpkgs. | Be excellent to each other.51 Servers

Load older messages


SenderMessageTime
7 Mar 2023
@qbit:tapenet.org@qbit:tapenet.orgheck12:55:14
@qbit:tapenet.org@qbit:tapenet.orgdamn13:00:04
@qbit:tapenet.org@qbit:tapenet.orghttp://sprunge.us/HEulsy13:00:24
@sandro:supersandro.deSandro 🐧You can just paste that into matrix. The legacy IRC gruft can be left behind.13:18:46
@sandro:supersandro.deSandro 🐧Did you invalidate the vendor hash?13:18:53
@qbit:tapenet.org@qbit:tapenet.org meaning set it to "" and re-build? 13:21:10
@qbit:tapenet.org@qbit:tapenet.orgif so, yes13:21:15
@sandro:supersandro.deSandro 🐧yes then no idea, go mod being itself again13:36:27
@qbit:tapenet.org@qbit:tapenet.orgwell, thanks for reviewing :D - i'll keep poking it for now13:38:36
@qbit:tapenet.org@qbit:tapenet.orghuh, it's the postBUild14:16:46
@qbit:tapenet.org@qbit:tapenet.org * huh, it's the postBuild 14:16:55
@qbit:tapenet.org@qbit:tapenet.org well.. idk now.. maybe post* is incompat with proxyVendor ?! 14:53:43
14 Mar 2023
@xor_alchemist:matrix.org@xor_alchemist:matrix.org joined the room.20:40:59
@butterchicken:hive-mind.networkbutterchicken joined the room.23:01:00
16 Mar 2023
@wtfiscrq:matrix.org@wtfiscrq:matrix.org left the room.21:26:19
23 Mar 2023
@quentinmit:matrix.orgquentin joined the room.20:01:00
24 Mar 2023
@garionion:entr0py.degarionion joined the room.10:44:44
@hannes4761:matrix.orghannes4761 joined the room.21:49:33
26 Mar 2023
@rbutani:matrix.orgrbutani joined the room.00:33:11
29 Mar 2023
@peddie:matrix.org@peddie:matrix.org joined the room.01:31:43
@peddie:matrix.org@peddie:matrix.org hi friends, I'm relatively new to nix and totally unfamiliar with the go language and ecosystem. I am trying to write a flake for https://github.com/MickMake/GoSungrow and using buildGoModule to inform nix how to build it. All seems to go well, but since I don't know what to do for the vendorSha256, I've passed lib.fakeSha256 expecting an informative error. Instead, I only get go: updates to go.mod needed; to update it: go mod tidy. If I instead pass null for vendorSha256, I receive To sync the vendor directory, run: go mod vendor. is there a correct way to run one of these go commands during the build process? am I going about this the wrong way? 01:34:56
@qbit:tapenet.org@qbit:tapenet.orgSet it to “” and you should get the actual hash for the vendor stuff01:45:34
@qbit:tapenet.org@qbit:tapenet.orgIs the project using CGO?01:45:45
@qbit:tapenet.org@qbit:tapenet.org(Doesn’t seem like it from an initial glance :D)01:46:49
@qbit:tapenet.org@qbit:tapenet.orgIf it doesn’t print the hash, it would be helpful if you could post what you currently have02:00:37
@peddie:matrix.org@peddie:matrix.orgusing "" doesn't seem to change anything. no CGO as far as I can tell02:06:25
@peddie:matrix.org@peddie:matrix.org

here is the flake.nix:

 {
  description = "Go interface to Sungrow solar inverters";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
    flake-utils.url = "github:numtide/flake-utils";
    go-sungrow-repo = {
      url = "github:MickMake/GoSungrow";
      flake = false;
    };
  };

  outputs = { self, nixpkgs, ... }@inputs:
    inputs.flake-utils.lib.eachDefaultSystem (system:
      let
        pkgs = import nixpkgs { inherit system; };
        python = pkgs.python311Packages;

        go-sungrow = pkgs.buildGoModule {
          pname = "GoSungrow";
          version = "3.0.4";
          src = inputs.go-sungrow-repo;
          vendorSha256 = ""; # pkgs.lib.fakeSha256;

          meta = with pkgs.lib; {
            description =
              "GoLang implementation to access the iSolarButt API updated by SunGrow inverters";
            homepage = "https://github.com/MickMake/GoSungrow";
            license = licenses.gpl2;
          };
        };
      in {
        packages.default = go-sungrow;
        packages.tod0 = go-sungrow;
      });
}
02:07:02
@peddie:matrix.org@peddie:matrix.org *

here is the flake.nix:

 {
  description = "Go interface to Sungrow solar inverters";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
    flake-utils.url = "github:numtide/flake-utils";
    go-sungrow-repo = {
      url = "github:MickMake/GoSungrow";
      flake = false;
    };
  };

  outputs = { self, nixpkgs, ... }@inputs:
    inputs.flake-utils.lib.eachDefaultSystem (system:
      let
        pkgs = import nixpkgs { inherit system; };

        go-sungrow = pkgs.buildGoModule {
          pname = "GoSungrow";
          version = "3.0.4";
          src = inputs.go-sungrow-repo;
          vendorSha256 = ""; # pkgs.lib.fakeSha256;

          meta = with pkgs.lib; {
            description =
              "GoLang implementation to access the iSolarButt API updated by SunGrow inverters";
            homepage = "https://github.com/MickMake/GoSungrow";
            license = licenses.gpl2;
          };
        };
      in {
        packages.default = go-sungrow;
        packages.tod0 = go-sungrow;
      });
}
02:09:11
@qbit:tapenet.org@qbit:tapenet.orgisolarbutt, lel02:10:40
@peddie:matrix.org@peddie:matrix.orgoops, copy-pasted from a browser with a fun plugin ;)02:11:35

Show newer messages


Back to Room ListRoom Version: 9