about summary refs log tree commit diff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/nixery/default.nix22
-rw-r--r--tools/nixery/server/default.nix16
-rw-r--r--tools/nixery/server/go-deps.nix (renamed from tools/nixery/go-deps.nix)9
-rw-r--r--tools/nixery/server/main.go (renamed from tools/nixery/main.go)0
4 files changed, 18 insertions, 29 deletions
diff --git a/tools/nixery/default.nix b/tools/nixery/default.nix
index 092c76e9c5b9..dee5713c64af 100644
--- a/tools/nixery/default.nix
+++ b/tools/nixery/default.nix
@@ -23,29 +23,11 @@ rec {
   # Users will usually not want to use this directly, instead see the
   # 'nixery' derivation below, which automatically includes runtime
   # data dependencies.
-  nixery-server = buildGoPackage {
-    name = "nixery-server";
-
-    # Technically people should not be building Nixery through 'go get'
-    # or similar (as other required files will not be included), but
-    # buildGoPackage requires a package path.
-    goPackagePath = "github.com/google/nixery";
-    goDeps = ./go-deps.nix;
-    src    = ./.;
-
-    meta = {
-      description = "Container image build serving Nix-backed images";
-      homepage    = "https://github.com/google/nixery";
-      license     = lib.licenses.asl20;
-      maintainers = [ lib.maintainers.tazjin ];
-    };
-  };
+  nixery-server = callPackage ./server {};
 
   # Nix expression (unimported!) which is used by Nixery to build
   # container images.
-  nixery-builder = runCommand "build-registry-image.nix" {} ''
-    cat ${./build-registry-image.nix} > $out
-  '';
+  nixery-builder = ./build-registry-image.nix;
 
   # nixpkgs currently has an old version of mdBook. A new version is
   # built here, but eventually the update will be upstreamed
diff --git a/tools/nixery/server/default.nix b/tools/nixery/server/default.nix
new file mode 100644
index 000000000000..394d2b27b442
--- /dev/null
+++ b/tools/nixery/server/default.nix
@@ -0,0 +1,16 @@
+{ buildGoPackage, lib }:
+
+buildGoPackage {
+  name   = "nixery-server";
+  goDeps = ./go-deps.nix;
+  src    = ./.;
+
+  goPackagePath = "github.com/google/nixery";
+
+  meta = {
+    description = "Container image builder serving Nix-backed images";
+    homepage = "https://github.com/google/nixery";
+    license = lib.licenses.asl20;
+    maintainers = [ lib.maintainers.tazjin ];
+  };
+}
diff --git a/tools/nixery/go-deps.nix b/tools/nixery/server/go-deps.nix
index ebd1576db5dd..a223ef0a7021 100644
--- a/tools/nixery/go-deps.nix
+++ b/tools/nixery/server/go-deps.nix
@@ -82,15 +82,6 @@
     };
   }
   {
-    goPackagePath = "gonum.org/v1/gonum";
-    fetch = {
-      type = "git";
-      url = "https://github.com/gonum/gonum";
-      rev = "ced62fe5104b907b6c16cb7e575c17b2e62ceddd";
-      sha256 = "1b7q6haabnp53igpmvr6a2414yralhbrldixx4kbxxg1apy8jdjg";
-    };
-  }
-  {
     goPackagePath = "google.golang.org/api";
     fetch = {
       type = "git";
diff --git a/tools/nixery/main.go b/tools/nixery/server/main.go
index d20ede2eb587..d20ede2eb587 100644
--- a/tools/nixery/main.go
+++ b/tools/nixery/server/main.go