Skip to content

Instantly share code, notes, and snippets.

@qknight
Created June 17, 2016 12:45
Show Gist options
  • Save qknight/ec772db7ab484296c64af008de628d9e to your computer and use it in GitHub Desktop.
Save qknight/ec772db7ab484296c64af008de628d9e to your computer and use it in GitHub Desktop.
➜ pandoc-online-editor git:(master) ✗ cat default.nix ~/Desktop/projects/nixcloud/pandoc-online-editor
with import <nixpkgs> { };
buildGoPackage rec {
name = "nixcloud-${version}";
version = "0.0.1";
goPackagePath = "github.com/nixcloud/websocket";
subPackages = [ "." ];
buildInputs = [ pandoc ];
goDeps = ./deps.json;
}
➜ pandoc-online-editor git:(master) ✗ cat deps.json ~/Desktop/projects/nixcloud/pandoc-online-editor
[
{
"include": "../../libs.json",
"packages": [
"golang.org/x/net",
"golang.org/x/net/websocket"
]
}
]% ➜ pandoc-online-editor git:(master) ✗ nix-shell --command "cd websocket-pandoc/src; go run main.go" ~/Desktop/projects/nixcloud/pandoc-online-editor
chat/client.go:8:2: cannot find package "golang.org/x/net/websocket" in any of:
/nix/store/0189nqxk2r4mb11fnd9g106ljzidg0h2-go-1.6.2/share/go/src/golang.org/x/net/websocket (from $GOROOT)
/nix/store/fchfr2xqql0f2d9jiavr7fqvsnb5kk32-go1.6-govers-20150109-3b5f175/share/go/src/golang.org/x/net/websocket (from $GOPATH)
➜ pandoc-online-editor git:(master) ✗
@kamilchm
Copy link

Does nix-build works for you here? I think that this could be related to nix-shell NixOS/nixpkgs#15490
I'll try to find some way to make it work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment