about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2019-10-05T13·54+0100
committerVincent Ambo <github@tazj.in>2019-10-06T22·05+0100
commit0642f7044dea2127b1c7dab1d88d90638536183a (patch)
tree29a68d7f787b0f52a8a9b763f65d1855ce643db3
parentf4bf3518f63501ddff42592b255fd5feaf846863 (diff)
fix(server): Amend package path for Go tooling compatibility
With these changes it is possible to keep Nixery in $GOPATH and build
the server in there, while still having things work correctly via Nix.
-rw-r--r--tools/nixery/default.nix2
-rw-r--r--tools/nixery/server/builder/archive.go2
-rw-r--r--tools/nixery/server/builder/builder.go6
-rw-r--r--tools/nixery/server/builder/cache.go2
-rw-r--r--tools/nixery/server/default.nix2
-rw-r--r--tools/nixery/server/main.go6
6 files changed, 10 insertions, 10 deletions
diff --git a/tools/nixery/default.nix b/tools/nixery/default.nix
index b194079b9a29..c1a3c9f7dca5 100644
--- a/tools/nixery/default.nix
+++ b/tools/nixery/default.nix
@@ -43,7 +43,7 @@ rec {
   nixery-bin = writeShellScriptBin "nixery" ''
     export WEB_DIR="${nixery-book}"
     export PATH="${nixery-build-image}/bin:$PATH"
-    exec ${nixery-server}/bin/nixery
+    exec ${nixery-server}/bin/server
   '';
 
   # Container image containing Nixery and Nix itself. This image can
diff --git a/tools/nixery/server/builder/archive.go b/tools/nixery/server/builder/archive.go
index 6d5033f13182..6a2bd8e4b0f0 100644
--- a/tools/nixery/server/builder/archive.go
+++ b/tools/nixery/server/builder/archive.go
@@ -13,7 +13,7 @@ import (
 	"os"
 	"path/filepath"
 
-	"github.com/google/nixery/layers"
+	"github.com/google/nixery/server/layers"
 	log "github.com/sirupsen/logrus"
 )
 
diff --git a/tools/nixery/server/builder/builder.go b/tools/nixery/server/builder/builder.go
index 3f085c565554..b675da0f7763 100644
--- a/tools/nixery/server/builder/builder.go
+++ b/tools/nixery/server/builder/builder.go
@@ -34,9 +34,9 @@ import (
 	"strings"
 
 	"cloud.google.com/go/storage"
-	"github.com/google/nixery/config"
-	"github.com/google/nixery/layers"
-	"github.com/google/nixery/manifest"
+	"github.com/google/nixery/server/config"
+	"github.com/google/nixery/server/layers"
+	"github.com/google/nixery/server/manifest"
 	log "github.com/sirupsen/logrus"
 	"golang.org/x/oauth2/google"
 )
diff --git a/tools/nixery/server/builder/cache.go b/tools/nixery/server/builder/cache.go
index 4a060ba5ea17..5b6bf078b228 100644
--- a/tools/nixery/server/builder/cache.go
+++ b/tools/nixery/server/builder/cache.go
@@ -22,7 +22,7 @@ import (
 	"os"
 	"sync"
 
-	"github.com/google/nixery/manifest"
+	"github.com/google/nixery/server/manifest"
 	log "github.com/sirupsen/logrus"
 )
 
diff --git a/tools/nixery/server/default.nix b/tools/nixery/server/default.nix
index 9df52721857c..573447a6c3df 100644
--- a/tools/nixery/server/default.nix
+++ b/tools/nixery/server/default.nix
@@ -19,7 +19,7 @@ buildGoPackage {
   goDeps = ./go-deps.nix;
   src = ./.;
 
-  goPackagePath = "github.com/google/nixery";
+  goPackagePath = "github.com/google/nixery/server";
 
   # Enable checks and configure check-phase to include vet:
   doCheck = true;
diff --git a/tools/nixery/server/main.go b/tools/nixery/server/main.go
index bad4c190c680..878e59ff6d50 100644
--- a/tools/nixery/server/main.go
+++ b/tools/nixery/server/main.go
@@ -35,9 +35,9 @@ import (
 	"time"
 
 	"cloud.google.com/go/storage"
-	"github.com/google/nixery/builder"
-	"github.com/google/nixery/config"
-	"github.com/google/nixery/layers"
+	"github.com/google/nixery/server/builder"
+	"github.com/google/nixery/server/config"
+	"github.com/google/nixery/server/layers"
 	log "github.com/sirupsen/logrus"
 )