Hi, I need to setup go and a specific package, biscuit
(GitHub - dcoker/biscuit: Biscuit is a multi-region HA key-value store for your AWS infrastructure secrets.), plus other stuff (python, terraform, etc). I am working at this shell.nix:
with import <nixpkgs> {};
let
my-python-packages = python-packages: [];
my-python = python38.withPackages my-python-packages;
biscuit = buildGoPackage rec {
pname = "biscuit";
version = "0.1.3";
goPackagePath = "github.com/dcoker/biscuit";
src = fetchFromGitHub {
owner = "dcoker";
repo = "biscuit";
rev = "v${version}";
sha256 = "15wcnjniqf5npby7g6907nbv4rg3zp5ygclmi1g8mk13r30q0mqr";
};
goDeps = ./deps.nix;
};
in
pkgs.mkShell {
buildInputs = [
my-python
pkgs.elixir_1_11
pkgs.go
pkgs.nodejs-10_x
pkgs.yarn
pkgs.terraform_0_13
pkgs.awslogs
pkgs.jq
pkgs.awscli2
biscuit
];
shellHook = ''
export PATH="${toString ./.}/scripts:$PATH"
export PIP_PREFIX="$(pwd)/_build/pip_packages"
export PYTHONPATH="$(pwd)/_build/pip_packages/lib/python3.8/site-packages:$PYTHONPATH"
unset SOURCE_DATE_EPOCH
'';
}
I have the problem of the missing dependencies:
go/src/github.com/dcoker/biscuit/keymanager/awskms.go:4:2: cannot find package "github.com/aws/aws-sdk-go/aws" in any of:
/nix/store/39r82b5cjnikrib8a2p9fp2i039qkwxi-go-1.16.3/share/go/src/github.com/aws/aws-sdk-go/aws (from $GOROOT)
/build/go/src/github.com/aws/aws-sdk-go/aws (from $GOPATH)
go/src/github.com/dcoker/biscuit/main.go:7:2: cannot find package "github.com/aws/aws-sdk-go/aws/awserr" in any of:
/nix/store/39r82b5cjnikrib8a2p9fp2i039qkwxi-go-1.16.3/share/go/src/github.com/aws/aws-sdk-go/aws/awserr (from $GOROOT)
/build/go/src/github.com/aws/aws-sdk-go/aws/awserr (from $GOPATH)
go/src/github.com/dcoker/biscuit/keymanager/awskms.go:5:2: cannot find package "github.com/aws/aws-sdk-go/aws/session" in any of:
/nix/store/39r82b5cjnikrib8a2p9fp2i039qkwxi-go-1.16.3/share/go/src/github.com/aws/aws-sdk-go/aws/session (from $GOROOT)
/build/go/src/github.com/aws/aws-sdk-go/aws/session (from $GOPATH)
go/src/github.com/dcoker/biscuit/commands/awskms/cfhelper.go:8:2: cannot find package "github.com/aws/aws-sdk-go/service/cloudformation" in any of:
/nix/store/39r82b5cjnikrib8a2p9fp2i039qkwxi-go-1.16.3/share/go/src/github.com/aws/aws-sdk-go/service/cloudformation (from $GOROOT)
/build/go/src/github.com/aws/aws-sdk-go/service/cloudformation (from $GOPATH)
go/src/github.com/dcoker/biscuit/keymanager/awskms.go:6:2: cannot find package "github.com/aws/aws-sdk-go/service/kms" in any of:
/nix/store/39r82b5cjnikrib8a2p9fp2i039qkwxi-go-1.16.3/share/go/src/github.com/aws/aws-sdk-go/service/kms (from $GOROOT)
/build/go/src/github.com/aws/aws-sdk-go/service/kms (from $GOPATH)
go/src/github.com/dcoker/biscuit/commands/awskms/kmsgrantcreate.go:15:2: cannot find package "github.com/aws/aws-sdk-go/service/sts" in any of:
/nix/store/39r82b5cjnikrib8a2p9fp2i039qkwxi-go-1.16.3/share/go/src/github.com/aws/aws-sdk-go/service/sts (from $GOROOT)
/build/go/src/github.com/aws/aws-sdk-go/service/sts (from $GOPATH)
go/src/github.com/dcoker/biscuit/commands/get.go:12:2: cannot find package "github.com/mattn/go-isatty" in any of:
/nix/store/39r82b5cjnikrib8a2p9fp2i039qkwxi-go-1.16.3/share/go/src/github.com/mattn/go-isatty (from $GOROOT)
/build/go/src/github.com/mattn/go-isatty (from $GOPATH)
go/src/github.com/dcoker/biscuit/algorithms/secretbox.go:8:2: cannot find package "golang.org/x/crypto/nacl/secretbox" in any of:
/nix/store/39r82b5cjnikrib8a2p9fp2i039qkwxi-go-1.16.3/share/go/src/golang.org/x/crypto/nacl/secretbox (from $GOROOT)
/build/go/src/golang.org/x/crypto/nacl/secretbox (from $GOPATH)
go/src/github.com/dcoker/biscuit/shared/flags.go:10:2: cannot find package "gopkg.in/alecthomas/kingpin.v2" in any of:
/nix/store/39r82b5cjnikrib8a2p9fp2i039qkwxi-go-1.16.3/share/go/src/gopkg.in/alecthomas/kingpin.v2 (from $GOROOT)
/build/go/src/gopkg.in/alecthomas/kingpin.v2 (from $GOPATH)
builder for '/nix/store/hf5b30wssly59i5dly8vwl0sf22hlrfi-biscuit-0.1.3.drv' failed with exit code 1
error: build of '/nix/store/hf5b30wssly59i5dly8vwl0sf22hlrfi-biscuit-0.1.3.drv' failed
I don’t clearly understand how these deps should be handled, if this has to be a manual thing or if there’s a way to automatically take care of the deps…
Thanks for help !