Hyperledger Fabric Nix派生

问题描述 投票:0回答:1

我正在尝试为Hyperledger Fabric项目构建一个nix派生。

源根是源

with import <nixpkgs> {};

stdenv.mkDerivation {
  name = "hyperledger-fabric";
  src = builtins.fetchGit {
    url = "https://github.com/hyperledger/fabric";
    rev = "d0eaa0646fc83bf17066a82f54b3c99370914a02";
  };

  depsBuildBuild = [curl which git];
  nativeBuildInputs = [go docker];
}

当我运行nix-build fabric.nix时,我收到:

nix-build fabric.nix
these derivations will be built:
  /nix/store/8z0wlnf8897ng5wkfjja66m31fafsqyp-hyperledger-fabric.drv
building '/nix/store/8z0wlnf8897ng5wkfjja66m31fafsqyp-hyperledger-fabric.drv'...
unpacking sources
unpacking source archive /nix/store/q4mq48i1f7sp7d8f3n8w6q8kp053h9ny-source
source root is source
patching sources
configuring
no configure script, doing nothing
building
build flags: SHELL=/nix/store/n9hba031gjky8hpjgx9fnlaxhidyzxbz-bash-4.4-p23/bin/bash
gotools.mk:22: *** target pattern contains no '%'.  Stop.
builder for '/nix/store/8z0wlnf8897ng5wkfjja66m31fafsqyp-hyperledger-fabric.drv' failed with exit code 2
error: build of '/nix/store/8z0wlnf8897ng5wkfjja66m31fafsqyp-hyperledger-fabric.drv' failed

该错误指向https://github.com/hyperledger/fabric/blob/release-1.4/gotools.mk#L22

我是否需要设置环境变量或导致问题的原因?

hyperledger-fabric nix
1个回答
0
投票

使用buildGoPackage解决,请参阅https://github.com/NixOS/nixpkgs/pull/52551

© www.soinside.com 2019 - 2024. All rights reserved.