Compare commits
2 Commits
023bd6005b
...
2a1898dedd
Author | SHA1 | Date |
---|---|---|
|
2a1898dedd | |
|
5a1c7084be |
|
@ -22,7 +22,7 @@
|
||||||
description = "A library to make it easy to write colorized and styled output in terminals that support ANSI escape codes (most command lines).";
|
description = "A library to make it easy to write colorized and styled output in terminals that support ANSI escape codes (most command lines).";
|
||||||
sourceProvenance = [(((lib).sourceTypes).fromSource)];
|
sourceProvenance = [(((lib).sourceTypes).fromSource)];
|
||||||
broken = false;
|
broken = false;
|
||||||
license = ((lib).licenses).lgpl3Plus;
|
license = [(((lib).licensesSpdx)."LGPL-3.0-or-later")];
|
||||||
homepage = "https://github.com/renatoathaydes/ansi-color/tree/HEAD/README.md";
|
homepage = "https://github.com/renatoathaydes/ansi-color/tree/HEAD/README.md";
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
|
@ -21,6 +21,6 @@
|
||||||
description = "fork of `parser-tools-lib` for Beautiful Racket";
|
description = "fork of `parser-tools-lib` for Beautiful Racket";
|
||||||
sourceProvenance = [(((lib).sourceTypes).fromSource)];
|
sourceProvenance = [(((lib).sourceTypes).fromSource)];
|
||||||
broken = false;
|
broken = false;
|
||||||
license = [(((lib).licenses).lgpl3Plus)];
|
license = [(((lib).licensesSpdx)."LGPL-3.0-or-later")];
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
|
@ -22,6 +22,6 @@
|
||||||
description = "";
|
description = "";
|
||||||
sourceProvenance = [(((lib).sourceTypes).fromSource)];
|
sourceProvenance = [(((lib).sourceTypes).fromSource)];
|
||||||
broken = false;
|
broken = false;
|
||||||
license = [(((lib).licenses).mit)];
|
license = [(((lib).licensesSpdx)."MIT")];
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
|
@ -23,6 +23,6 @@
|
||||||
description = "API for BCP47 extensions to CLDR";
|
description = "API for BCP47 extensions to CLDR";
|
||||||
sourceProvenance = [(((lib).sourceTypes).fromSource)];
|
sourceProvenance = [(((lib).sourceTypes).fromSource)];
|
||||||
broken = false;
|
broken = false;
|
||||||
license = [(((lib).licenses).mit) (((lib).licenses).unicodeTOU)];
|
license = [(((lib).licensesSpdx)."MIT") (((lib).licensesSpdx)."Unicode-TOU")];
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
|
@ -23,6 +23,6 @@
|
||||||
description = "API for cldr-core data set";
|
description = "API for cldr-core data set";
|
||||||
sourceProvenance = [(((lib).sourceTypes).fromSource)];
|
sourceProvenance = [(((lib).sourceTypes).fromSource)];
|
||||||
broken = false;
|
broken = false;
|
||||||
license = [(((lib).licenses).mit) (((lib).licenses).unicodeTOU)];
|
license = [(((lib).licensesSpdx)."MIT") (((lib).licensesSpdx)."Unicode-TOU")];
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
|
@ -23,6 +23,6 @@
|
||||||
description = "API for cldr-dates-modern data set";
|
description = "API for cldr-dates-modern data set";
|
||||||
sourceProvenance = [(((lib).sourceTypes).fromSource)];
|
sourceProvenance = [(((lib).sourceTypes).fromSource)];
|
||||||
broken = false;
|
broken = false;
|
||||||
license = [(((lib).licenses).mit) (((lib).licenses).unicodeTOU)];
|
license = [(((lib).licensesSpdx)."MIT") (((lib).licensesSpdx)."Unicode-TOU")];
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
|
@ -23,6 +23,6 @@
|
||||||
description = "API for cldr-localenames-modern data set";
|
description = "API for cldr-localenames-modern data set";
|
||||||
sourceProvenance = [(((lib).sourceTypes).fromSource)];
|
sourceProvenance = [(((lib).sourceTypes).fromSource)];
|
||||||
broken = false;
|
broken = false;
|
||||||
license = [(((lib).licenses).mit) (((lib).licenses).unicodeTOU)];
|
license = [(((lib).licensesSpdx)."MIT") (((lib).licensesSpdx)."Unicode-TOU")];
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
|
@ -23,6 +23,6 @@
|
||||||
description = "API for cldr-numbers-modern data set";
|
description = "API for cldr-numbers-modern data set";
|
||||||
sourceProvenance = [(((lib).sourceTypes).fromSource)];
|
sourceProvenance = [(((lib).sourceTypes).fromSource)];
|
||||||
broken = false;
|
broken = false;
|
||||||
license = [(((lib).licenses).mit) (((lib).licenses).unicodeTOU)];
|
license = [(((lib).licensesSpdx)."MIT") (((lib).licensesSpdx)."Unicode-TOU")];
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
|
@ -22,6 +22,6 @@
|
||||||
description = "Scala-style anonymous functions";
|
description = "Scala-style anonymous functions";
|
||||||
sourceProvenance = [(((lib).sourceTypes).fromSource)];
|
sourceProvenance = [(((lib).sourceTypes).fromSource)];
|
||||||
broken = false;
|
broken = false;
|
||||||
license = [(((lib).licenses).mit)];
|
license = [(((lib).licensesSpdx)."MIT")];
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
description = "An extensible code formatter for Racket";
|
description = "An extensible code formatter for Racket";
|
||||||
sourceProvenance = [(((lib).sourceTypes).fromSource)];
|
sourceProvenance = [(((lib).sourceTypes).fromSource)];
|
||||||
broken = false;
|
broken = false;
|
||||||
license = [(((lib).licenses).asl20) (((lib).licenses).mit)];
|
license = [(((lib).licensesSpdx)."Apache-2.0") (((lib).licensesSpdx)."MIT")];
|
||||||
homepage = "https://github.com/sorawee/fmt/tree/HEAD/README.md";
|
homepage = "https://github.com/sorawee/fmt/tree/HEAD/README.md";
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
description = "Code part of the gregor date and time library";
|
description = "Code part of the gregor date and time library";
|
||||||
sourceProvenance = [(((lib).sourceTypes).fromSource)];
|
sourceProvenance = [(((lib).sourceTypes).fromSource)];
|
||||||
broken = false;
|
broken = false;
|
||||||
license = [(((lib).licenses).mit)];
|
license = [(((lib).licensesSpdx)."MIT")];
|
||||||
homepage = "https://github.com/97jaz/gregor/tree/HEAD/README.md";
|
homepage = "https://github.com/97jaz/gregor/tree/HEAD/README.md";
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
description = "Macros similar to Swift's \"guard statements\".";
|
description = "Macros similar to Swift's \"guard statements\".";
|
||||||
sourceProvenance = [(((lib).sourceTypes).fromSource)];
|
sourceProvenance = [(((lib).sourceTypes).fromSource)];
|
||||||
broken = false;
|
broken = false;
|
||||||
license = [(((lib).licenses).asl20) (((lib).licenses).mit)];
|
license = [(((lib).licensesSpdx)."Apache-2.0") (((lib).licensesSpdx)."MIT")];
|
||||||
homepage = "https://github.com/jackfirth/guard/tree/HEAD/README.md";
|
homepage = "https://github.com/jackfirth/guard/tree/HEAD/README.md";
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
description = "core library for memoize";
|
description = "core library for memoize";
|
||||||
sourceProvenance = [(((lib).sourceTypes).fromSource)];
|
sourceProvenance = [(((lib).sourceTypes).fromSource)];
|
||||||
broken = false;
|
broken = false;
|
||||||
license = [(((lib).licenses).mit)];
|
license = [(((lib).licensesSpdx)."MIT")];
|
||||||
homepage = "https://github.com/jbclements/memoize/tree/master/README.md";
|
homepage = "https://github.com/jbclements/memoize/tree/master/README.md";
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
description = "A database migration tool.";
|
description = "A database migration tool.";
|
||||||
sourceProvenance = [(((lib).sourceTypes).fromSource)];
|
sourceProvenance = [(((lib).sourceTypes).fromSource)];
|
||||||
broken = false;
|
broken = false;
|
||||||
license = [(((lib).licenses).bsd3)];
|
license = [(((lib).licensesSpdx)."BSD-3-Clause")];
|
||||||
homepage = "https://github.com/Bogdanp/racket-north/tree/HEAD/README.md";
|
homepage = "https://github.com/Bogdanp/racket-north/tree/HEAD/README.md";
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
description = "A pretty expressive printer";
|
description = "A pretty expressive printer";
|
||||||
sourceProvenance = [(((lib).sourceTypes).fromSource)];
|
sourceProvenance = [(((lib).sourceTypes).fromSource)];
|
||||||
broken = false;
|
broken = false;
|
||||||
license = [(((lib).licenses).asl20) (((lib).licenses).mit)];
|
license = [(((lib).licensesSpdx)."Apache-2.0") (((lib).licensesSpdx)."MIT")];
|
||||||
homepage = "https://github.com/sorawee/pretty-expressive/tree/main/README.md";
|
homepage = "https://github.com/sorawee/pretty-expressive/tree/main/README.md";
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
description = "A collection of infrastructure libraries";
|
description = "A collection of infrastructure libraries";
|
||||||
sourceProvenance = [(((lib).sourceTypes).fromSource)];
|
sourceProvenance = [(((lib).sourceTypes).fromSource)];
|
||||||
broken = false;
|
broken = false;
|
||||||
license = [(((lib).licenses).asl20)];
|
license = [(((lib).licensesSpdx)."Apache-2.0")];
|
||||||
homepage = "https://github.com/jackfirth/rebellion/tree/HEAD/README.md";
|
homepage = "https://github.com/jackfirth/rebellion/tree/HEAD/README.md";
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
description = "A refactoring tool built on top of syntax-parse.";
|
description = "A refactoring tool built on top of syntax-parse.";
|
||||||
sourceProvenance = [(((lib).sourceTypes).fromSource)];
|
sourceProvenance = [(((lib).sourceTypes).fromSource)];
|
||||||
broken = false;
|
broken = false;
|
||||||
license = [(((lib).licenses).asl20)];
|
license = [(((lib).licensesSpdx)."Apache-2.0")];
|
||||||
homepage = "https://github.com/jackfirth/resyntax/tree/HEAD/README.md";
|
homepage = "https://github.com/jackfirth/resyntax/tree/HEAD/README.md";
|
||||||
mainProgram = "resyntax";
|
mainProgram = "resyntax";
|
||||||
};
|
};
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
description = "API for querying the IANA tz database";
|
description = "API for querying the IANA tz database";
|
||||||
sourceProvenance = [(((lib).sourceTypes).fromSource)];
|
sourceProvenance = [(((lib).sourceTypes).fromSource)];
|
||||||
broken = false;
|
broken = false;
|
||||||
license = [(((lib).licenses).mit)];
|
license = [(((lib).licensesSpdx)."MIT")];
|
||||||
homepage = "https://github.com/97jaz/tzinfo/tree/HEAD/README.md";
|
homepage = "https://github.com/97jaz/tzinfo/tree/HEAD/README.md";
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
166
racket2nix.rkt
166
racket2nix.rkt
|
@ -49,13 +49,6 @@
|
||||||
(define-runtime-path overrides-path "racket-catalog-overrides.rktd")
|
(define-runtime-path overrides-path "racket-catalog-overrides.rktd")
|
||||||
(define catalog-overrides (file->value overrides-path))
|
(define catalog-overrides (file->value overrides-path))
|
||||||
|
|
||||||
(define *license-mapping*
|
|
||||||
(hash
|
|
||||||
'BSD-3-Clause '(dot (dot lib licenses) bsd3)
|
|
||||||
'MIT '(dot (dot lib licenses) mit)
|
|
||||||
'Apache-2.0 '(dot (dot lib licenses) asl20)
|
|
||||||
'LGPL-3.0-or-later '(dot (dot lib licenses) lgpl3Plus)
|
|
||||||
'Unicode-TOU '(dot (dot lib licenses) unicodeTOU)))
|
|
||||||
|
|
||||||
(define (racket-license->nix-license license)
|
(define (racket-license->nix-license license)
|
||||||
(if license
|
(if license
|
||||||
|
@ -65,13 +58,11 @@
|
||||||
(displayln "WARNING: no license for package -- using unfree")
|
(displayln "WARNING: no license for package -- using unfree")
|
||||||
'(dot (dot lib licenses) unfree))))
|
'(dot (dot lib licenses) unfree))))
|
||||||
|
|
||||||
|
|
||||||
(define (cvtl lic-expr)
|
(define (cvtl lic-expr)
|
||||||
(match lic-expr
|
(match lic-expr
|
||||||
[(? symbol? _)
|
[(? symbol? _)
|
||||||
(list
|
(list `(dot (dot lib licensesSpdx) ,(symbol->string lic-expr)))]
|
||||||
(or
|
|
||||||
(hash-ref *license-mapping* lic-expr #f)
|
|
||||||
(error "no license mapping defined for" lic-expr)))]
|
|
||||||
[`(,a OR ,b)
|
[`(,a OR ,b)
|
||||||
(append (cvtl a) (cvtl b))]
|
(append (cvtl a) (cvtl b))]
|
||||||
[`(,a AND ,b)
|
[`(,a AND ,b)
|
||||||
|
@ -160,7 +151,7 @@
|
||||||
|
|
||||||
(define (extract-free-vars expr [scope (set)])
|
(define (extract-free-vars expr [scope (set)])
|
||||||
(match expr
|
(match expr
|
||||||
[`(dot ,a ,(? symbol? b))
|
[`(dot ,a ,(or (? symbol? b) (? string? b)))
|
||||||
(extract-free-vars a)]
|
(extract-free-vars a)]
|
||||||
[`(app ,fun ,arg)
|
[`(app ,fun ,arg)
|
||||||
(append (extract-free-vars fun scope)
|
(append (extract-free-vars fun scope)
|
||||||
|
@ -243,31 +234,40 @@
|
||||||
(write-string "}")])
|
(write-string "}")])
|
||||||
(void))
|
(void))
|
||||||
|
|
||||||
(struct nix-repl [proc stdout stdin])
|
|
||||||
|
|
||||||
(define current-nix-repl (make-parameter #f))
|
(define (call-with-subprocess-env thk)
|
||||||
|
|
||||||
(define (with-nix-repl thk)
|
|
||||||
(parameterize ([current-subprocess-custodian-mode 'kill]
|
(parameterize ([current-subprocess-custodian-mode 'kill]
|
||||||
[current-environment-variables
|
[current-environment-variables
|
||||||
(environment-variables-copy (current-environment-variables))])
|
(environment-variables-copy (current-environment-variables))])
|
||||||
(putenv "TERM" "dumb")
|
(putenv "TERM" "dumb")
|
||||||
(putenv "NO_COLOR" "1")
|
(putenv "NO_COLOR" "1")
|
||||||
(call-with-custodian-shutdown
|
(call-with-custodian-shutdown
|
||||||
(lambda ()
|
thk)))
|
||||||
(define-values (proc stdout stdin stderr)
|
|
||||||
(subprocess
|
(define (subprocess/path/piped . args)
|
||||||
#f #f 'stdout
|
(define-values [proc stdout stdin stderr]
|
||||||
"/usr/bin/env"
|
(apply subprocess #f #f 'stdout "/usr/bin/env" args))
|
||||||
"nix"
|
(values proc stdout stdin))
|
||||||
"--extra-experimental-features"
|
|
||||||
"nix-command flakes pipe-operator repl-automation"
|
|
||||||
"repl" "--impure" "."))
|
(struct nix-repl [proc stdout stdin])
|
||||||
|
(define current-nix-repl (make-parameter #f))
|
||||||
|
|
||||||
|
|
||||||
|
(define (call-with-nix-repl thk)
|
||||||
|
(call-with-subprocess-env
|
||||||
|
(lambda ()
|
||||||
|
(define-values [proc stdout stdin]
|
||||||
|
(subprocess/path/piped
|
||||||
|
"nix"
|
||||||
|
"--extra-experimental-features"
|
||||||
|
"nix-command flakes pipe-operator repl-automation"
|
||||||
|
"repl" "--impure" "."))
|
||||||
|
|
||||||
(sync (regexp-match-evt #px"^[^\x05]+\x05" stdout))
|
(sync (regexp-match-evt #px"^[^\x05]+\x05" stdout))
|
||||||
|
|
||||||
(parameterize ([current-nix-repl (nix-repl proc stdout stdin)])
|
(parameterize ([current-nix-repl (nix-repl proc stdout stdin)])
|
||||||
(thk))))))
|
(thk)))))
|
||||||
|
|
||||||
(define (nix-eval line)
|
(define (nix-eval line)
|
||||||
(match-define (nix-repl _ stdout stdin) (current-nix-repl))
|
(match-define (nix-repl _ stdout stdin) (current-nix-repl))
|
||||||
|
@ -284,46 +284,33 @@
|
||||||
(define (nix-format file*)
|
(define (nix-format file*)
|
||||||
(displayln "formatting generated nix")
|
(displayln "formatting generated nix")
|
||||||
(define file (path->string file*))
|
(define file (path->string file*))
|
||||||
(parameterize ([current-subprocess-custodian-mode 'kill]
|
(call-with-subprocess-env
|
||||||
[current-environment-variables
|
(lambda ()
|
||||||
(environment-variables-copy (current-environment-variables))])
|
(define-values [proc stdout stdin]
|
||||||
(putenv "TERM" "dumb")
|
(subprocess/path/piped
|
||||||
(putenv "NO_COLOR" "1")
|
"alejandra" "--quiet" file))
|
||||||
(call-with-custodian-shutdown
|
(port->string stdout)
|
||||||
(lambda ()
|
(subprocess-wait proc)))
|
||||||
(define-values (proc stdout stdin stderr)
|
(void))
|
||||||
(subprocess
|
|
||||||
#f #f 'stdout
|
|
||||||
"/usr/bin/env"
|
|
||||||
"alejandra"
|
|
||||||
"--quiet"
|
|
||||||
file))
|
|
||||||
(port->string stdout)
|
|
||||||
(subprocess-wait proc)))
|
|
||||||
(void)))
|
|
||||||
|
|
||||||
(define (add-to-git-maybe file*)
|
(define (add-to-git-maybe file*)
|
||||||
(define file (path->string file*))
|
(define file (path->string file*))
|
||||||
(parameterize ([current-subprocess-custodian-mode 'kill])
|
(call-with-subprocess-env
|
||||||
(call-with-custodian-shutdown
|
(lambda ()
|
||||||
(lambda ()
|
(define-values (proc stdout stdin)
|
||||||
(define-values (proc stdout stdin stderr)
|
(subprocess/path/piped
|
||||||
(subprocess
|
"git" "rev-parse" "--show-toplevel"))
|
||||||
#f #f 'stdout
|
(port->string stdout)
|
||||||
"/usr/bin/env"
|
(subprocess-wait proc)
|
||||||
"git"
|
|
||||||
"rev-parse"
|
(when (= 0 (subprocess-status proc))
|
||||||
"--show-toplevel"))
|
(define-values [proc stdout stdin]
|
||||||
|
(subprocess/path/piped
|
||||||
|
"git" "add" file))
|
||||||
(port->string stdout)
|
(port->string stdout)
|
||||||
(subprocess-wait proc)
|
(subprocess-wait proc)))))
|
||||||
(when (= 0 (subprocess-status proc))
|
|
||||||
(define-values (proc stdout stdin stderr)
|
|
||||||
(subprocess
|
|
||||||
#f #f 'stdout
|
|
||||||
"/usr/bin/env"
|
|
||||||
"git" "add" file))
|
|
||||||
(port->string stdout)
|
|
||||||
(subprocess-wait proc))))))
|
|
||||||
|
|
||||||
(define (racket2nix
|
(define (racket2nix
|
||||||
pkg-name
|
pkg-name
|
||||||
|
@ -427,8 +414,7 @@
|
||||||
,@(if readme `((homepage ,readme)) '())
|
,@(if readme `((homepage ,readme)) '())
|
||||||
,@(if (and racket-launchers (not (empty? racket-launchers)))
|
,@(if (and racket-launchers (not (empty? racket-launchers)))
|
||||||
`((mainProgram ,(first racket-launchers)))
|
`((mainProgram ,(first racket-launchers)))
|
||||||
'())
|
'())))
|
||||||
))
|
|
||||||
|
|
||||||
(define nix-passthru
|
(define nix-passthru
|
||||||
`(attrs
|
`(attrs
|
||||||
|
@ -467,20 +453,38 @@
|
||||||
|
|
||||||
(displayln "fetching source")
|
(displayln "fetching source")
|
||||||
|
|
||||||
(with-nix-repl
|
(call-with-nix-repl
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(define drv-def-out (nix-eval
|
(define drv-def-out
|
||||||
(format "drv = with legacyPackages.${builtins.currentSystem}; instrumentedFetch (racketPackages.~a.src)" pkg-name)))
|
(nix-eval
|
||||||
(nix-eval ":b drv")
|
(format "drv = with legacyPackages.${builtins.currentSystem}; instrumentedFetch (racketPackages.~a.src)" pkg-name)))
|
||||||
|
|
||||||
|
(unless (equal? drv-def-out "Added drv.")
|
||||||
|
(error "failed to eval package def" drv-def-out))
|
||||||
|
|
||||||
|
(define build-output (nix-eval ":b drv"))
|
||||||
(define build-log (nix-eval ":log drv"))
|
(define build-log (nix-eval ":log drv"))
|
||||||
(match-define (list _ real-hash)
|
(define real-hash
|
||||||
(regexp-match #px"FETCH_HASH:([^:]+):FETCH_HASH" build-log))
|
(match build-log
|
||||||
|
[(pregexp #px"FETCH_HASH:([^:]+):FETCH_HASH" (list _ real-hash))
|
||||||
|
real-hash]
|
||||||
|
[_ (error "failed to retrieve src hash" build-output build-log)]))
|
||||||
|
|
||||||
(define subpath (generate-spec real-hash))
|
(define subpath (generate-spec real-hash))
|
||||||
|
|
||||||
(nix-eval ":r")
|
(nix-eval ":r")
|
||||||
(nix-eval
|
(define drv-def-out-r
|
||||||
(format "drv = with legacyPackages.${builtins.currentSystem}; instrumentedFetch (racketPackages.~a.src)" pkg-name))
|
(nix-eval
|
||||||
|
(format "drv = with legacyPackages.${builtins.currentSystem}; instrumentedFetch (racketPackages.~a.src)" pkg-name)))
|
||||||
|
|
||||||
|
(unless (equal? drv-def-out-r "Added drv.")
|
||||||
|
(error "failed to eval package def" drv-def-out-r))
|
||||||
|
|
||||||
(define out-path (nix-eval ":p drv.outPath"))
|
(define out-path (nix-eval ":p drv.outPath"))
|
||||||
(nix-eval ":b drv")
|
(define build-log-2 (nix-eval ":b drv"))
|
||||||
|
|
||||||
|
(unless (directory-exists? out-path)
|
||||||
|
(error "failed to fetch source" out-path build-log-2))
|
||||||
|
|
||||||
(define info-proc (get-info/full (build-path out-path subpath)))
|
(define info-proc (get-info/full (build-path out-path subpath)))
|
||||||
|
|
||||||
|
@ -491,13 +495,23 @@
|
||||||
(and raco-commands*
|
(and raco-commands*
|
||||||
(map first raco-commands*)))
|
(map first raco-commands*)))
|
||||||
|
|
||||||
; generate final nix file
|
|
||||||
(generate-spec real-hash version racket-launchers raco-commands #t)
|
(generate-spec real-hash version racket-launchers raco-commands #t)
|
||||||
|
|
||||||
(displayln "doing final module build")
|
(displayln "doing final module build")
|
||||||
(nix-eval ":r")
|
(nix-eval ":r")
|
||||||
(nix-eval
|
(define drv-def-out-final
|
||||||
(format ":b with legacyPackages.${builtins.currentSystem}; racketPackages.~a" pkg-name))))
|
(nix-eval
|
||||||
|
(format "drv = with legacyPackages.${builtins.currentSystem}; racketPackages.~a" pkg-name)))
|
||||||
|
(unless (equal? drv-def-out-final "Added drv.")
|
||||||
|
(error "failed to eval package def" drv-def-out-final))
|
||||||
|
(define out-path-final (nix-eval ":p drv.outPath"))
|
||||||
|
(define build-output-final
|
||||||
|
(nix-eval ":b drv"))
|
||||||
|
|
||||||
|
(unless (directory-exists? out-path-final)
|
||||||
|
(error "failed to do final build" out-path-final build-output-final))
|
||||||
|
|
||||||
|
(void)))
|
||||||
|
|
||||||
(hash-set! acc pkg-name 'installed)
|
(hash-set! acc pkg-name 'installed)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue