【问题标题】:Hyperledger Fabric Nix DerivationHyperledger Fabric Nix 衍生
【发布时间】:2018-12-18 19:24:19
【问题描述】:

我正在尝试为 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】:

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

    【讨论】:

      猜你喜欢
      • 2017-12-24
      • 2023-04-01
      • 2023-03-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-12-24
      • 1970-01-01
      相关资源
      最近更新 更多