!QCCCSJHEsTIfozrZxz:nixos.org

Nix + Go

232 Members
Go packaging for and with Nixpkgs. | Be excellent to each other.48 Servers

Load older messages


SenderMessageTime
5 Jan 2024
@qbit:tapenet.org@qbit:tapenet.orgtake a look at other packages in the tree 15:33:37
@qbit:tapenet.org@qbit:tapenet.org grep -r buildGoModule 15:33:44
@faust403:matrix.orgVladislav VasilevI already tried, they have no any troubles with deps15:36:12
@faust403:matrix.orgVladislav VasilevI think they are exisiting here because some of deps are not listed in go.mod15:36:32
@faust403:matrix.orgVladislav VasilevSo, they are imported directly15:36:46
@qbit:tapenet.org@qbit:tapenet.orgthen upstream needs to regen go.mod and whatnot 15:36:59
@qbit:tapenet.org@qbit:tapenet.orgwhat's the error?15:37:19
@faust403:matrix.orgVladislav Vasilevshrinking RPATHs of ELF executables and libraries in /nix/store/zzkwzmabvdb6w36ia8acxvzl8aavcnl4-neutrond shrinking /nix/store/zzkwzmabvdb6w36ia8acxvzl8aavcnl4-neutrond/bin/neutrond checking for references to /build/ in /nix/store/zzkwzmabvdb6w36ia8acxvzl8aavcnl4-neutrond... RPATH of binary /nix/store/zzkwzmabvdb6w36ia8acxvzl8aavcnl4-neutrond/bin/neutrond contains a forbidden reference to /build/ /nix/store/d4jf1cbbk494zwgbqz31pxgigpsbh6w2-stdenv-linux/setup: line 74: pop_var_context: head of shell_variables not a function context /nix/store/d4jf1cbbk494zwgbqz31pxgigpsbh6w2-stdenv-linux/setup: line 1414: pop_var_context: head of shell_variables not a function context /nix/store/d4jf1cbbk494zwgbqz31pxgigpsbh6w2-stdenv-linux/setup: line 1553: pop_var_context: head of shell_variables not a function context15:37:40
@faust403:matrix.orgVladislav VasilevPatchelf: here we go again15:37:53
@faust403:matrix.orgVladislav VasilevSomeone hardcoded paths as I suppose15:38:08
@qbit:tapenet.org@qbit:tapenet.orgso it's building fine 15:38:24
@qbit:tapenet.org@qbit:tapenet.orgso not a dep issue15:38:28
@qbit:tapenet.org@qbit:tapenet.orgremove the nativeBuildInputs15:38:39
@faust403:matrix.orgVladislav VasilevThere is nothing now15:38:50
@faust403:matrix.orgVladislav VasilevI removed it15:39:00
@faust403:matrix.orgVladislav Vasilev

config:

{ fetchFromGitHub
, stdenv
, pkgs
, lib
}: pkgs.buildGoModule rec {
  name = "neutrond";

  version = "2.0.0";

  src = (fetchFromGitHub {
    owner = "neutron-org";
    repo = "neutron";
    rev = "d30ed2fd6dc230a9525c4a73c511428e8086eb32";
    sha256 = "sha256-NuoOlrciBeL2f/A7wlQBqYlYJhSYucXRhLgxdasfyhI=";
  });

  vendorHash = "sha256-uLInKbuL886cfXCyQvIDZJHUC8AK9fR39yNBHDO+Qzc=";
  # vendorSha256 = lib.fakeSha256;

  doCheck = false;
  
  meta = with lib; {
    description = "Neutron node";

    longDescription = ''
      Neutron node to interact with neutron blockchain
    '';

    homepage = "https://github.com/neutron-org/neutron";
    
    license = licenses.asl20; # Apache license

    maintainers = with maintainers; [
      pr0n00gler
      foxpy
    ];

    platforms = platforms.all;
  };
}
15:39:06
@faust403:matrix.orgVladislav VasilevI will replace ${version} later15:39:26
@qbit:tapenet.org@qbit:tapenet.orgrev should be `rev = "v${version}"15:39:39
@qbit:tapenet.org@qbit:tapenet.org * rev should be `rev = "v${version}"` 15:39:42
@qbit:tapenet.org@qbit:tapenet.org name should be pname 15:40:03
@faust403:matrix.orgVladislav VasilevLike that ? It's v2 in commits15:41:29
@faust403:matrix.orgVladislav Vasilevimage.png
Download image.png
15:41:32
@faust403:matrix.orgVladislav VasilevAh, I got it15:44:53
@faust403:matrix.orgVladislav VasilevOKay15:44:55
@faust403:matrix.orgVladislav Vasilev

Now it's this

{ fetchFromGitHub
, stdenv
, pkgs
, lib
}: pkgs.buildGoModule rec {
  pname = "neutrond";

  version = "2.0.0";

  src = (fetchFromGitHub {
    owner = "neutron-org";
    repo = "neutron";
    rev = "v${version}";
    sha256 = "sha256-NuoOlrciBeL2f/A7wlQBqYlYJhSYucXRhLgxdasfyhI=";
  });

  vendorHash = "sha256-uLInKbuL886cfXCyQvIDZJHUC8AK9fR39yNBHDO+Qzc=";
  # vendorSha256 = lib.fakeSha256;

  doCheck = false;
  
  meta = with lib; {
    description = "Neutron node";

    longDescription = ''
      Neutron node to interact with neutron blockchain
    '';

    homepage = "https://github.com/neutron-org/neutron";
    
    license = licenses.asl20; # Apache license

    maintainers = with maintainers; [
      pr0n00gler
      foxpy
    ];

    platforms = platforms.all;
  };
}
15:45:03
@faust403:matrix.orgVladislav VasilevBut error is still the same15:45:33
@faust403:matrix.orgVladislav VasilevRPATH of binary /nix/store/v5c6pldfn9wfn4k2q4ap07z8369fzap5-neutrond-2.0.0/bin/neutrond contains a forbidden reference to /build/ I think we should change relative path15:47:02
@qbit:tapenet.org@qbit:tapenet.org

what if you add:

  ldflags = [ "-w -s" ];
16:07:19
@qbit:tapenet.org@qbit:tapenet.orgyou will need it for adding some -X flags too16:07:30
@qbit:tapenet.org@qbit:tapenet.orghttps://github.com/neutron-org/neutron/blob/main/Makefile#L66-L7016:07:37

Show newer messages


Back to Room ListRoom Version: 9