about summary refs log tree commit diff
path: root/tools/nixery/server
diff options
context:
space:
mode:
Diffstat (limited to 'tools/nixery/server')
-rw-r--r--tools/nixery/server/default.nix14
-rw-r--r--tools/nixery/server/main.go8
2 files changed, 16 insertions, 6 deletions
diff --git a/tools/nixery/server/default.nix b/tools/nixery/server/default.nix
index 394d2b27b4..0d0c056a56 100644
--- a/tools/nixery/server/default.nix
+++ b/tools/nixery/server/default.nix
@@ -1,3 +1,17 @@
+# Copyright 2019 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 { buildGoPackage, lib }:
 
 buildGoPackage {
diff --git a/tools/nixery/server/main.go b/tools/nixery/server/main.go
index d20ede2eb5..3e015e8587 100644
--- a/tools/nixery/server/main.go
+++ b/tools/nixery/server/main.go
@@ -123,7 +123,6 @@ func signingOptsFromEnv() *storage.SignedURLOptions {
 type config struct {
 	bucket  string                    // GCS bucket to cache & serve layers
 	signing *storage.SignedURLOptions // Signing options to use for GCS URLs
-	builder string                    // Nix derivation for building images
 	port    string                    // Port on which to launch HTTP server
 	pkgs    *pkgSource                // Source for Nix package set
 }
@@ -208,16 +207,14 @@ func buildImage(ctx *context.Context, cfg *config, image *image, bucket *storage
 	}
 
 	args := []string{
-		"--no-out-link",
-		"--show-trace",
 		"--argstr", "name", image.name,
-		"--argstr", "packages", string(packages), cfg.builder,
+		"--argstr", "packages", string(packages),
 	}
 
 	if cfg.pkgs != nil {
 		args = append(args, "--argstr", "pkgSource", cfg.pkgs.renderSource(image.tag))
 	}
-	cmd := exec.Command("nix-build", args...)
+	cmd := exec.Command("nixery-build-image", args...)
 
 	outpipe, err := cmd.StdoutPipe()
 	if err != nil {
@@ -466,7 +463,6 @@ func getConfig(key, desc string) string {
 func main() {
 	cfg := &config{
 		bucket:  getConfig("BUCKET", "GCS bucket for layer storage"),
-		builder: getConfig("NIX_BUILDER", "Nix image builder code"),
 		port:    getConfig("PORT", "HTTP port"),
 		pkgs:    pkgSourceFromEnv(),
 		signing: signingOptsFromEnv(),