@@ -21,14 +21,11 @@ stdenv.mkDerivation {
2121 pname = "komet-node" ;
2222 version = if ( rev != null ) then rev else "dirty" ;
2323
24- outputs = [
25- "bin"
26- # contains kdist artifacts (the compiled K semantics)
27- "out"
28- # this empty `dev` output is required as we otherwise get cyclic dependencies between `bin` and `out`
29- # this is due to a setup-hook creating references in a new directory `nix-support` in either `out` or `dev`
30- "dev"
31- ] ;
24+ # Single `out` output holding both the wrapper (`$out/bin/komet-node`) and the
25+ # compiled semantics (`$out/kdist`). `kup publish`/`kup install` operate on the
26+ # output literally named `out`, so the runnable artifact must live there. Keeping
27+ # everything in one output also sidesteps the cross-output reference cycle that
28+ # forces a separate `bin`/`dev` split (a wrapper in `$bin` referencing `$out`).
3229
3330 # The K sources for every kdist target (`soroban-semantics.*` from the `komet`
3431 # dependency and `komet-node.*` from this project) ship inside `komet-node-pyk`,
@@ -75,14 +72,14 @@ stdenv.mkDerivation {
7572
7673 installPhase = ''
7774 runHook preInstall
78- mkdir -p $bin /bin
75+ mkdir -p $out /bin
7976 mkdir -p $out/kdist
8077
8178 cp -r ./kdist-*/* $out/kdist/
8279
8380 # Wrap the `komet-node` entrypoint so that, at runtime, it finds the compiled
8481 # semantics via `KDIST_DIR` and the K tools (krun/kore) via `PATH`.
85- makeWrapper ${ komet-node-pyk } /bin/komet-node $bin /bin/komet-node \
82+ makeWrapper ${ komet-node-pyk } /bin/komet-node $out /bin/komet-node \
8683 --prefix PATH : ${ lib . makeBinPath [ which k ] } \
8784 --set KDIST_DIR $out/kdist
8885 runHook postInstall
0 commit comments