Closed qknight closed 7 years ago
in go-modules/generic/default.nix
i removed this lines:
@@ -109,13 +111,16 @@ go.stdenv.mkDerivation (
local d; local cmd;
cmd="$1"
d="$2"
echo "$d" | grep -q "\(/_\|examples\|Godeps\)" && return 0
[ -n "$excludedPackages" ] && echo "$d" | grep -q "$excludedPackages" && return 0
local OUT
if ! OUT="$(go $cmd $buildFlags "''${buildFlagsArray[@]}" -v $d 2>&1)"; then
if ! echo "$OUT" | grep -q 'no buildable Go source files'; then
- echo "$OUT" >&2
- return 1
+ #echo "$OUT" >&2
+ return 0
and now it compiled & installed
if i reduce the deps it'll just work. so there seems to be a collision of some sort which is caught but i don't understand why go2nix
outputs a deps.nix which then has too many entries.
[
{
"goPackagePath": "golang.org/x/net",
"fetch": {
"type": "git",
"url": "https://go.googlesource.com/net",
"rev": "07b51741c1d6423d4a6abab1c49940ec09cb1aaf",
"sha256": "12lvdj0k2gww4hw5f79qb9yswqpy4i3bgv1likmf3mllgdxfm20w"
}
}
]
nix-env -f /home/joachim/Desktop/projects/nixos/nixpkgs/default.nix -I nixpkgs=/home/joachim/Desktop/projects/nixos/nixpkgs -iA leaps.bin ~/Desktop/projects/nixos/nixpkgs/pkgs
replacing old ‘go1.6-leaps-20160626-5cf7328’
installing ‘go1.6-leaps-20160626-5cf7328’
these derivations will be built:
/nix/store/vfzq83lfws46wisjvx78vvc07i6d51rs-go1.6-leaps-20160626-5cf7328.drv
building path(s) ‘/nix/store/h01809qll0llrhh52jq4v7xjf4zkfrp1-go1.6-leaps-20160626-5cf7328’, ‘/nix/store/m88pyqrd5syzr8h70jnk6ag9yccx78jy-go1.6-leaps-20160626-5cf7328-bin’
unpacking sources
unpacking source archive /nix/store/27vc3vfkb7cjpjjnbdni6bmajkbbnf1a-leaps-5cf7328
source root is leaps-5cf7328
patching sources
configuring
preconfigure flux
grep: Invalid range end
preconfigure flux II
unpacking source archive /nix/store/1ki1728win67jg7jj3rqiww9nxqv8gkb-net-07b5174
building
===== getGoDirs
fluuuuuuxii 2
--11- github.com/jeffail/leaps --11-
--22- github.com/jeffail/leaps/cmd/leaps
github.com/jeffail/leaps/lib/acl
github.com/jeffail/leaps/lib/binder
github.com/jeffail/leaps/lib/curator
github.com/jeffail/leaps/lib/http
github.com/jeffail/leaps/lib/register
github.com/jeffail/leaps/lib/store
github.com/jeffail/leaps/lib/util --22-
fluuuuuuxii 2
github.com/jeffail/leaps/cmd/leaps github.com/jeffail/leaps/lib/acl github.com/jeffail/leaps/lib/binder github.com/jeffail/leaps/lib/curator github.com/jeffail/leaps/lib/http github.com/jeffail/leaps/lib/register github.com/jeffail/leaps/lib/store github.com/jeffail/leaps/lib/util
go install ... github.com/jeffail/leaps/cmd/leaps github.com/jeffail/leaps/lib/acl github.com/jeffail/leaps/lib/binder github.com/jeffail/leaps/lib/curator github.com/jeffail/leaps/lib/http github.com/jeffail/leaps/lib/register github.com/jeffail/leaps/lib/store github.com/jeffail/leaps/lib/util
===== buildGoDir install, github.com/jeffail/leaps/cmd/leaps github.com/jeffail/leaps/lib/acl github.com/jeffail/leaps/lib/binder github.com/jeffail/leaps/lib/curator github.com/jeffail/leaps/lib/http github.com/jeffail/leaps/lib/register github.com/jeffail/leaps/lib/store github.com/jeffail/leaps/lib/util
---flux 1---
---/flux 1---
---flux 11 ---
---/flux 11 ---
github.com/jeffail/leaps/vendor/github.com/garyburd/redigo/internal
github.com/jeffail/leaps/vendor/github.com/jeffail/util/log
github.com/jeffail/leaps/vendor/github.com/elazarl/go-bindata-assetfs
github.com/jeffail/leaps/vendor/github.com/garyburd/redigo/redis
github.com/jeffail/leaps/vendor/github.com/go-sql-driver/mysql
github.com/jeffail/leaps/vendor/github.com/satori/go.uuid
github.com/jeffail/leaps/vendor/github.com/lib/pq/oid
github.com/jeffail/leaps/vendor/github.com/lib/pq
github.com/jeffail/leaps/lib/util
github.com/jeffail/leaps/vendor/github.com/golang/protobuf/proto
github.com/jeffail/leaps/lib/acl
golang.org/x/net/proxy
github.com/jeffail/leaps/vendor/github.com/jeffail/gabs
golang.org/x/net/websocket
github.com/jeffail/leaps/lib/store
github.com/jeffail/leaps/lib/register
github.com/jeffail/leaps/vendor/github.com/amir/raidman/proto
github.com/jeffail/leaps/vendor/github.com/amir/raidman
github.com/jeffail/leaps/vendor/github.com/jeffail/util/metrics
github.com/jeffail/leaps/lib/binder
github.com/jeffail/leaps/lib/curator
github.com/jeffail/leaps/lib/http
github.com/jeffail/leaps/cmd/leaps
installing
/tmp/nix-build-go1.6-leaps-20160626-5cf7328.drv-0/go /tmp/nix-build-go1.6-leaps-20160626-5cf7328.drv-0
/tmp/nix-build-go1.6-leaps-20160626-5cf7328.drv-0
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/h01809qll0llrhh52jq4v7xjf4zkfrp1-go1.6-leaps-20160626-5cf7328
patching script interpreter paths in /nix/store/h01809qll0llrhh52jq4v7xjf4zkfrp1-go1.6-leaps-20160626-5cf7328
/nix/store/h01809qll0llrhh52jq4v7xjf4zkfrp1-go1.6-leaps-20160626-5cf7328/share/go/src/github.com/jeffail/leaps/vendor/github.com/golang/protobuf/ptypes/regen.sh: interpreter directive changed from "/bin/bash -e" to "/nix/store/d44582rghk696yw704sh5nbvbpnm69iv-bash-4.3-p42/bin/bash -e"
shrinking RPATHs of ELF executables and libraries in /nix/store/m88pyqrd5syzr8h70jnk6ag9yccx78jy-go1.6-leaps-20160626-5cf7328-bin
shrinking /nix/store/m88pyqrd5syzr8h70jnk6ag9yccx78jy-go1.6-leaps-20160626-5cf7328-bin/bin/leaps
stripping (with flags -S) in /nix/store/m88pyqrd5syzr8h70jnk6ag9yccx78jy-go1.6-leaps-20160626-5cf7328-bin/bin
patching script interpreter paths in /nix/store/m88pyqrd5syzr8h70jnk6ag9yccx78jy-go1.6-leaps-20160626-5cf7328-bin
building path(s) ‘/nix/store/1b4l4csk97b51j2cxavydnhkdy9n1l2h-user-environment’
created 60 symlinks in user environment
Yep, you're right there's no need to analyze dependencies from vendor
in go2nix
.
I prepared a workaround and tested it on leaps
https://github.com/kamilchm/go2nix/commit/83d4e614d26d687f5d2ee05b488decf4739d90bb
I'll try to make a test case for it later and do it then.
i've been using this go2nix and created a deps.nix which i converted into a deps.json manually.
the package
default.nix
deps.json
the error
clue
according to golang on irc this might be because the go-modules/generic/default.nix applies various vendor patches i don't understand yet.
do you have a clue what has gone wrong?