From 324aa9696bb5f07df247dcddc06643ca5238873a Mon Sep 17 00:00:00 2001 From: Puck Meerburg Date: Mon, 23 Jun 2025 12:22:20 +0000 Subject: [PATCH] zilch-cli-go: fixup Change-Id: I6a6a6964284b0d7d37cb9f659cc2bf1e057c3ca9 --- cli/zilch-go.scm | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/cli/zilch-go.scm b/cli/zilch-go.scm index 3d14ea7..c8ffb3d 100644 --- a/cli/zilch-go.scm +++ b/cli/zilch-go.scm @@ -9,12 +9,10 @@ (write-string (string-append msg "\n\n") (current-error-port))) (write-string "Usage: zilch-cli-go [OPTION] [PACKAGE...] Process the given module (or the current directory, if unspecified) and -output derivations for each package given on the command line (or all -executables in the module, if unspecified) +output the store path for each package given on the command line (or +all executables in the module, if unspecified) -h, --help Print this help message. - -b, --build Build the store paths, rather than show their - derivations. -j, --max-jobs COUNT The maximum amount of builds to run. Defaults to the amount of cores. -v, --verbose Increase the verbosity configured in the Nix @@ -34,7 +32,6 @@ executables in the module, if unspecified) (define-values (options args) (getopt '((help #f #\h) - (build #f #\b) (max-jobs #t #\j) (verbose #f #\v) (print-build-logs #f #\L) @@ -71,13 +68,12 @@ executables in the module, if unspecified) (import (scheme file) (chicken file) (chicken format) - (zilch magic) + (zilch magic) (zilch vfs) (zilch lang go mod) (zilch lang go vfs) (zilch lang go) (zilch nix drv) (zilch lang go)) (define module-dir (if (assoc 'module-dir options) (cdr (assoc 'module-dir options)) (current-directory))) -(define do-build (assoc 'build options)) (define do-debug (assoc 'debug options)) (unless (file-exists? (string-append module-dir "/go.mod")) @@ -112,12 +108,7 @@ executables in the module, if unspecified) (if (string=? (go-package-name package) "main") (let ((linked (go-package-link package))) (write-string (string-append package-name "\t")) - (store-path-materialize linked) - (if do-build - (begin - (store-path-build linked) - (write-string (store-path-realisation linked))) - (write-string (derivation-path (store-path-drv linked)))) + (write-string (store-path-realised linked)) (newline)) (unless skip-if-not-bin (write-string (string-append package-name "\tnot a binary\n")))))))