diff --git a/README.md b/README.md index 635ab5a8..75b22b9d 100644 --- a/README.md +++ b/README.md @@ -75,12 +75,29 @@ To build only a few modules which you can control by editing the `dev-module-ids nix build .#custom-bundle ``` -To build a specific module, for example `python-3.10`, you can do: +To build a specific module's package (a directory with its setup hook and module JSON), for example `python-3.10`, you can do: ``` nix build .#'"python-3.10"' ``` +### Using modules in a devShell + +Repl flakes list module packages in `mkShell`. When the shell starts, each one +applies the module's environment and PATH (the same one a Repl gets, with +`REPL_HOME` defaulting to the working directory) and adds its metadata directory +to `REPLIT_MODULES`. If two modules set the same variable, the first one listed wins: + +```nix +devShells.x86_64-linux.default = pkgs.mkShell { + packages = [ + nixmodules.packages.x86_64-linux.nodejs-24 + nixmodules.packages.x86_64-linux."python-3.12" + pkgs.ffmpeg + ]; +}; +``` + To build a disk with only a few modules for development purposes: ``` diff --git a/flake.nix b/flake.nix index e025cdf7..76a24773 100644 --- a/flake.nix +++ b/flake.nix @@ -184,11 +184,8 @@ phony-oci-bundles = builtins.mapAttrs (id: _: self.packages.x86_64-linux."phony-oci-bundles.${id}") self.modules; - shellPackages.x86_64-linux = pkgs.lib.mapAttrs (_: module: module.shellPackage) self.modules; - deploymentShellPackages.x86_64-linux = pkgs.lib.mapAttrs (_: module: module.shellPackage) self.deploymentModules; lib.mkBundle = import ./pkgs/bundle/api.nix { inherit pkgs self; }; - lib.mkToolchain = import ./pkgs/toolchain { inherit pkgs self; }; - checks.x86_64-linux.flake-toolchain = import ./pkgs/toolchain/tests.nix { inherit pkgs; }; + checks.x86_64-linux.module-shell = import ./pkgs/moduleit/tests.nix { inherit pkgs; }; checks.x86_64-linux.module-registry = assert import ./scripts/module-registry-test.nix; assert builtins.attrNames self.modules == builtins.attrNames self.deploymentModules; diff --git a/pkgs/default.nix b/pkgs/default.nix index 9929a82a..1f3fdf48 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -68,8 +68,8 @@ rec { path = self.checks.x86_64-linux.module-registry; } { - name = "flake-toolchain"; - path = self.checks.x86_64-linux.flake-toolchain; + name = "module-shell"; + path = self.checks.x86_64-linux.module-shell; } { name = "pip-user-site"; @@ -123,8 +123,6 @@ rec { }; } -// modules -// mapAttrs' (id: module: nameValuePair "shell.${id}" module.shellPackage) self.modules -// mapAttrs' (id: module: nameValuePair "deployment-shell.${id}" module.shellPackage) self.deploymentModules +// mapAttrs (_: module: module.shellPackage) modules // prefixedPackages "deploymentModules" self.deploymentModules // prefixedPackages "phony-oci-bundles" phony-oci-bundles diff --git a/pkgs/moduleit/entrypoint.nix b/pkgs/moduleit/entrypoint.nix index 42469530..f93d11e0 100644 --- a/pkgs/moduleit/entrypoint.nix +++ b/pkgs/moduleit/entrypoint.nix @@ -19,20 +19,18 @@ let result = if deployment then module.config.replit.buildDeploymentModule else module.config.replit.buildModule; - packages = module.config.replit.packages - ++ pkgs.lib.optionals (!deployment) module.config.replit.dev.packages; in pkgs.lib.lazyDerivation { derivation = result; passthru = { moduleId = module.config.id; - moduleConfig = result.moduleConfig; - runtimePackages = packages; + } // pkgs.lib.optionalAttrs (!deployment) { shellPackage = pkgs.callPackage ./shell-package.nix { - name = "replit-${if deployment then "deployment-" else ""}shell-${module.config.id}"; - inherit packages; + name = "replit-shell-${module.config.id}"; + moduleId = module.config.id; + module = result; + packages = module.config.replit.packages ++ module.config.replit.dev.packages; env = result.moduleConfig.env; - passthru.module = result; }; }; } diff --git a/pkgs/moduleit/shell-package.nix b/pkgs/moduleit/shell-package.nix index 1f310777..bfa8f442 100644 --- a/pkgs/moduleit/shell-package.nix +++ b/pkgs/moduleit/shell-package.nix @@ -2,9 +2,10 @@ , runCommand , writeText , name +, moduleId +, module , packages , env -, passthru ? { } }: let variablePattern = "[a-zA-Z_][a-zA-Z0-9_]*"; @@ -33,14 +34,21 @@ let + lib.optionalString (key == "PATH") "\${PATH:+:}\"$PATH\"") ordered.result + "\n"; in -runCommand name -{ - inherit passthru; -} - '' - mkdir -p "$out/nix-support" - cp ${writeText "${name}-hook" hook} "$out/nix-support/setup-hook" - # Keep runtime references without running their compiler build hooks. - printf '%s\n' ${lib.escapeShellArg (lib.concatMapStringsSep "\n" toString packages)} \ - > "$out/nix-support/runtime-dependencies" - '' +runCommand name { } '' + mkdir -p "$out/nix-support" "$out/share/replit/modules" + # The IDE finds module metadata through REPLIT_MODULES; its store paths keep LSPs and runners alive. + cp ${module} "$out/share/replit/modules/${moduleId}.json" + { + cat ${writeText "${name}-env" hook} + echo "export REPLIT_MODULES=\"$out/share/replit/modules\''${REPLIT_MODULES:+:\$REPLIT_MODULES}\"" + } > "$out/nix-support/replit-env" + # Apply the env when the shell starts, not when nix captures it in the build sandbox. + # Prepending makes the first-listed module win, both for PATH and plain variables. + cat > "$out/nix-support/setup-hook" < "$out/nix-support/runtime-dependencies" +'' diff --git a/pkgs/moduleit/tests.nix b/pkgs/moduleit/tests.nix new file mode 100644 index 00000000..09b31918 --- /dev/null +++ b/pkgs/moduleit/tests.nix @@ -0,0 +1,152 @@ +{ pkgs }: +let + inherit (pkgs) lib; + runtime = pkgs.runCommand "module-shell-test-runtime" { } '' + mkdir -p "$out/bin" "$out/nix-support" + printf '#!/bin/sh\nexit 0\n' > "$out/bin/runtime" + chmod +x "$out/bin/runtime" + cat > "$out/nix-support/setup-hook" <<'HOOK' + : "$NIX_CC" + echo "A runtime-only build hook was sourced" >&2 + return 1 + HOOK + ''; + ide = pkgs.writeText "module-shell-test-ide" "IDE-only dependency"; + definition = { + id = "fixture"; + name = "Fixture"; + replit = { + packages = [ runtime ]; + env = { + A_DEPENDENT = "$Z_BASE/child"; + Z_BASE = "$REPL_HOME/base"; + BRACED = "\${Z_BASE}/braced"; + LITERAL = "$(touch /tmp/nixmodules-shell-injection) `false` \" ' \\"; + PYTHONPATH = "$PYTHONPATH/suffix"; + MISSING = "$NOT_PRESENT"; + EMPTY = ""; + MULTILINE = "first=line\nsecond=line"; + MODE = "deployment"; + PATH = "$Z_BASE/bin"; + }; + runners.fixture = { + name = "Fixture"; + language = "fixture"; + start = "${runtime}/bin/runtime $file"; + }; + dev = { + env.MODE = "development"; + languageServers.fixture = { + name = "Fixture server"; + language = "fixture"; + start = "${ide} $file"; + }; + }; + }; + }; + mkModule = deployment: configPath: pkgs.callPackage ./entrypoint.nix { + inherit deployment configPath; + pkgs-23_05 = pkgs; + pkgs-24_11 = pkgs; + }; + development = mkModule false definition; + deployment = mkModule true definition; + applyAliases = import ../upgrade-map/apply.nix { alias = "fixture"; }; + self = { + modules = applyAliases { + fixture = development; + override = mkModule false { + id = "override"; + name = "Override"; + replit.env.MODE = "last"; + }; + }; + deploymentModules = applyAliases { fixture = deployment; }; + }; + legacyBundle = pkgs.callPackage ../bundle { inherit self; }; + mkBundle = import ../bundle/api.nix { inherit pkgs self; }; + deploymentBundle = mkBundle { moduleIds = [ "alias" ]; deployment = true; }; + closure = pkgs.closureInfo { rootPaths = [ development.shellPackage ]; }; + fails = value: !(builtins.tryEval (builtins.deepSeq value true)).success; + lazyModule = mkModule false { + id = "lazy"; + name = "Lazy"; + replit.packages = throw "moduleId must not evaluate packages or output paths"; + }; + cycle = pkgs.callPackage ./shell-package.nix { + name = "cycle"; + moduleId = "cycle"; + module = pkgs.writeText "cycle" "{}"; + packages = [ ]; + env = { A = "$B"; B = "$A"; }; + }; + decoy = pkgs.writeShellApplication { name = "runtime"; text = "exit 1"; }; + # What nix develop does: capture the env in a build, then run shellHook in the user's shell. + shellSmoke = pkgs.runCommand "module-shell-smoke" + { + nativeBuildInputs = [ decoy self.modules.alias.shellPackage self.modules.override.shellPackage ]; + shellHook = "export USER_HOOK_MODE=$MODE"; + } '' + test -z "''${MODE-}" + export REPL_HOME="/tmp/project with spaces" + eval "$shellHook" + test "$MODE" = development + test "$USER_HOOK_MODE" = development + test "$A_DEPENDENT" = "$REPL_HOME/base/child" + test "$(command -v runtime)" = "${runtime}/bin/runtime" + test "$REPLIT_MODULES" = "${development.shellPackage}/share/replit/modules:${self.modules.override.shellPackage}/share/replit/modules" + touch "$out" + ''; +in +assert lazyModule.moduleId == "lazy"; +assert fails (mkBundle { moduleIds = [ "missing" ]; }).outPath; +assert fails (mkBundle { moduleIds = [ "fixture" "missing" ]; }).outPath; +assert fails (mkBundle { moduleIds = [ "missing" ]; deployment = true; }).outPath; +assert (legacyBundle { moduleIds = [ "fixture" "missing" ]; }).outPath + == (legacyBundle { moduleIds = [ "fixture" ]; }).outPath; +assert (legacyBundle { moduleIds = [ "missing" ]; }).outPath + == (legacyBundle { moduleIds = [ ]; }).outPath; +assert (legacyBundle { moduleIds = [ "alias" "missing" ]; deployment = true; }).outPath + == deploymentBundle.outPath; +assert fails cycle.outPath; +pkgs.runCommand "module-shell-check" +{ + nativeBuildInputs = [ pkgs.jq ]; +} '' + test -f ${shellSmoke} + test "$(readlink ${deploymentBundle}/alias)" = "${deployment}" + jq -e --arg path "${deployment}" '.alias.path == $path' ${deploymentBundle}/etc/nixmodules/modules.json + jq -e '.env.MODE == "development" and .languageServers != {}' ${development} + jq -e '.env.MODE == "deployment" and .languageServers == {}' ${deployment} + cmp ${development} ${development.shellPackage}/share/replit/modules/fixture.json + grep -Fx ${runtime} ${closure}/store-paths + grep -Fx ${ide} ${closure}/store-paths + if grep -Fx ${pkgs.jq} ${closure}/store-paths; then + echo "Module package includes a JSON encoder dependency" >&2 + exit 1 + fi + ( + export REPL_HOME="/tmp/project with spaces" + export PATH="/original/path" + export PYTHONPATH="/inherited" + unset REPLIT_MODULES + source ${development.shellPackage}/nix-support/replit-env + test "$A_DEPENDENT" = "$REPL_HOME/base/child" + test "$BRACED" = "$REPL_HOME/base/braced" + test "$LITERAL" = ${lib.escapeShellArg definition.replit.env.LITERAL} + test "$PYTHONPATH" = "/inherited/suffix" + test "$MISSING" = "" + test "$EMPTY" = "" + test "$MULTILINE" = ${lib.escapeShellArg definition.replit.env.MULTILINE} + test "$MODE" = development + test "$PATH" = "$REPL_HOME/base/bin:${runtime}/bin:/original/path" + test "$REPLIT_MODULES" = "${development.shellPackage}/share/replit/modules" + ) + ( + unset REPL_HOME PYTHONPATH + source ${development.shellPackage}/nix-support/replit-env + test "$REPL_HOME" = "$PWD" + test "$PYTHONPATH" = "/suffix" + ) + touch "$out" +'' diff --git a/pkgs/toolchain/default.nix b/pkgs/toolchain/default.nix deleted file mode 100644 index c44cfd9e..00000000 --- a/pkgs/toolchain/default.nix +++ /dev/null @@ -1,64 +0,0 @@ -{ pkgs, self }: -{ moduleIds -, deployment ? false -}: -let - inherit (pkgs) lib; - available = if deployment then self.deploymentModules else self.modules; - selected = map - (id: available.${id} or (throw "Unknown nixmodule: ${id}")) - moduleIds; - env = lib.foldl' - (acc: module: - let - next = module.moduleConfig.env; - paths = builtins.filter (path: path != "") [ (acc.PATH or "") (next.PATH or "") ]; - in - acc // next // { PATH = lib.concatStringsSep ":" paths; }) - { } - selected; - shellPackage = pkgs.callPackage ../moduleit/shell-package.nix { - name = "replit-toolchain-shell"; - inherit env; - packages = lib.concatMap (module: module.runtimePackages) selected; - }; - environmentProgram = pkgs.writeShellScript "replit-toolchain-env" '' - set -euo pipefail - source ${shellPackage}/nix-support/setup-hook - ${lib.concatMapStringsSep "\n" - (key: "printf '%s=%s\\0' ${lib.escapeShellArg key} \"\${${key}}\"") - (builtins.attrNames (env // { REPL_HOME = ""; }))} - ''; - moduleConfigs = builtins.listToAttrs (lib.zipListsWith - (id: module: { name = id; value = module.moduleConfig; }) - moduleIds - selected); - metadata = { - schemaVersion = 1; - system = pkgs.stdenv.hostPlatform.system; - inherit moduleIds deployment; - resolvedModules = lib.zipListsWith - (id: module: { - inherit id; - moduleId = module.moduleId; - modulePath = module.outPath; - shellPath = module.shellPackage.outPath; - }) - moduleIds - selected; - }; -in -assert lib.assertMsg - (builtins.isList moduleIds && builtins.all builtins.isString moduleIds) - "moduleIds must be a list of strings"; -assert lib.assertMsg - (builtins.length moduleIds == builtins.length (lib.unique moduleIds)) - "Duplicate nixmodule IDs"; -(pkgs.linkFarm "replit-toolchain" [ - { name = "modules.json"; path = pkgs.writeText "modules.json" (builtins.toJSON moduleConfigs); } - { name = "metadata.json"; path = pkgs.writeText "metadata.json" (builtins.toJSON metadata); } - { name = "shell"; path = shellPackage; } - { name = "bin/replit-toolchain-env"; path = environmentProgram; } -]) // { - inherit shellPackage moduleConfigs metadata; -} diff --git a/pkgs/toolchain/tests.nix b/pkgs/toolchain/tests.nix deleted file mode 100644 index 13a50cd0..00000000 --- a/pkgs/toolchain/tests.nix +++ /dev/null @@ -1,213 +0,0 @@ -{ pkgs }: -let - inherit (pkgs) lib; - runtime = pkgs.runCommand "toolchain-test-runtime" { } '' - mkdir -p "$out/bin" "$out/nix-support" - printf '#!/bin/sh\nexit 0\n' > "$out/bin/runtime" - chmod +x "$out/bin/runtime" - cat > "$out/nix-support/setup-hook" <<'HOOK' - : "$NIX_CC" - echo "A runtime-only build hook was sourced" >&2 - return 1 - HOOK - ''; - ide = pkgs.writeText "toolchain-test-ide" "IDE-only dependency"; - definition = { - id = "fixture"; - name = "Fixture"; - replit = { - packages = [ runtime ]; - env = { - A_DEPENDENT = "$Z_BASE/child"; - Z_BASE = "$REPL_HOME/base"; - BRACED = "\${Z_BASE}/braced"; - LITERAL = "$(touch /tmp/nixmodules-shell-injection) `false` \" ' \\"; - PYTHONPATH = "$PYTHONPATH/suffix"; - MISSING = "$NOT_PRESENT"; - EMPTY = ""; - MULTILINE = "first=line\nsecond=line"; - MODE = "deployment"; - PATH = "$Z_BASE/bin"; - }; - runners.fixture = { - name = "Fixture"; - language = "fixture"; - start = "${runtime}/bin/runtime $file"; - }; - dev = { - env.MODE = "development"; - languageServers.fixture = { - name = "Fixture server"; - language = "fixture"; - start = "${ide} $file"; - }; - }; - }; - }; - mkModule = deployment: configPath: pkgs.callPackage ../moduleit/entrypoint.nix { - inherit deployment configPath; - pkgs-23_05 = pkgs; - pkgs-24_11 = pkgs; - }; - development = mkModule false definition; - deployment = mkModule true definition; - applyAliases = import ../upgrade-map/apply.nix { alias = "fixture"; }; - self = { - modules = applyAliases { - fixture = development; - override = mkModule false { - id = "override"; - name = "Override"; - replit.env.MODE = "last"; - }; - }; - deploymentModules = applyAliases { fixture = deployment; }; - }; - mkToolchain = import ./default.nix { inherit pkgs self; }; - legacyBundle = pkgs.callPackage ../bundle { inherit self; }; - mkBundle = import ../bundle/api.nix { inherit pkgs self; }; - deploymentBundle = mkBundle { moduleIds = [ "alias" ]; deployment = true; }; - toolchain = mkToolchain { moduleIds = [ "fixture" "alias" ]; }; - overridden = mkToolchain { moduleIds = [ "alias" "override" ]; }; - deploymentToolchain = mkToolchain { moduleIds = [ "fixture" ]; deployment = true; }; - closure = pkgs.closureInfo { rootPaths = [ toolchain ]; }; - deploymentClosure = pkgs.closureInfo { rootPaths = [ deploymentToolchain ]; }; - fails = value: !(builtins.tryEval (builtins.deepSeq value true)).success; - lazyModule = mkModule false { - id = "lazy"; - name = "Lazy"; - replit.packages = throw "moduleId must not evaluate packages or output paths"; - }; - cycle = pkgs.callPackage ../moduleit/shell-package.nix { - name = "cycle"; - packages = [ ]; - env = { A = "$B"; B = "$A"; }; - }; - shellSmoke = pkgs.runCommand "toolchain-shell-check" - { - nativeBuildInputs = [ toolchain.shellPackage ]; - REPL_HOME = "/tmp/project with spaces"; - } '' - test "$MODE" = development - test "$A_DEPENDENT" = "$REPL_HOME/base/child" - test "$(command -v runtime)" = "${runtime}/bin/runtime" - touch "$out" - ''; - environmentInput = { - REPL_HOME = "/tmp/project with spaces"; - PATH = "/original/path"; - PYTHONPATH = "/inherited"; - }; - environmentArgs = lib.concatStringsSep " " - (lib.mapAttrsToList (key: value: lib.escapeShellArg "${key}=${value}") environmentInput); - decodeEnvironment = '' - split("\u0000") - | if last != "" then error("Missing trailing NUL") else .[:-1] end - | map(index("=") as $separator | {key: .[:$separator], value: .[$separator + 1:]}) - | from_entries - ''; - fixtures = { - development = toolchain; - deployment = deploymentToolchain; - override = overridden; - }; -in -assert lazyModule.moduleId == "lazy"; -assert toolchain.metadata.moduleIds == [ "fixture" "alias" ]; -assert map (entry: entry.id) toolchain.metadata.resolvedModules == [ "fixture" "alias" ]; -assert map (entry: entry.moduleId) toolchain.metadata.resolvedModules == [ "fixture" "fixture" ]; -assert toolchain.moduleConfigs.alias == development.moduleConfig; -assert deploymentToolchain.moduleConfigs.fixture == deployment.moduleConfig; -assert deployment.moduleConfig.languageServers == { }; -assert development.moduleConfig.env.MODE == "development"; -assert deployment.moduleConfig.env.MODE == "deployment"; -assert fails (mkToolchain { moduleIds = [ "missing" ]; }).outPath; -assert fails (mkToolchain { moduleIds = [ "fixture" "fixture" ]; }).outPath; -assert fails (mkBundle { moduleIds = [ "missing" ]; }).outPath; -assert fails (mkBundle { moduleIds = [ "fixture" "missing" ]; }).outPath; -assert fails (mkBundle { moduleIds = [ "missing" ]; deployment = true; }).outPath; -assert (legacyBundle { moduleIds = [ "fixture" "missing" ]; }).outPath - == (legacyBundle { moduleIds = [ "fixture" ]; }).outPath; -assert (legacyBundle { moduleIds = [ "missing" ]; }).outPath - == (legacyBundle { moduleIds = [ ]; }).outPath; -assert (legacyBundle { moduleIds = [ "alias" "missing" ]; deployment = true; }).outPath - == deploymentBundle.outPath; -assert fails cycle.outPath; -pkgs.runCommand "flake-toolchain-check" -{ - nativeBuildInputs = [ pkgs.jq ]; -} '' - test -f ${shellSmoke} - test "$(readlink ${deploymentBundle}/alias)" = "${deployment}" - jq -e --arg path "${deployment}" '.alias.path == $path' ${deploymentBundle}/etc/nixmodules/modules.json - test -d ${toolchain}/shell/nix-support - jq -e '.schemaVersion == 1 and .system == "x86_64-linux" - and .moduleIds == ["fixture", "alias"] and .deployment == false - and .resolvedModules[0].id == "fixture" - and .resolvedModules[0].moduleId == "fixture"' ${toolchain}/metadata.json - jq -e '.deployment == true and .moduleIds == ["fixture"]' ${deploymentToolchain}/metadata.json - jq -S . ${development} > expected.json - jq -S .alias ${toolchain}/modules.json > actual.json - cmp expected.json actual.json - jq -S . ${deployment} > expected.json - jq -S .fixture ${deploymentToolchain}/modules.json > actual.json - cmp expected.json actual.json - grep -Fx ${runtime} ${closure}/store-paths - grep -Fx ${ide} ${closure}/store-paths - if grep -Fx ${pkgs.jq} ${closure}/store-paths; then - echo "Toolchain includes a JSON encoder dependency" - exit 1 - fi - if grep -Fx ${ide} ${deploymentClosure}/store-paths; then - echo "Deployment includes a development-only IDE dependency" >&2 - exit 1 - fi - ( - export REPL_HOME="/tmp/project with spaces" - export PATH="/original/path" - source ${toolchain}/shell/nix-support/setup-hook - test "$A_DEPENDENT" = "$REPL_HOME/base/child" - test "$BRACED" = "$REPL_HOME/base/braced" - test "$LITERAL" = ${lib.escapeShellArg definition.replit.env.LITERAL} - test "$MODE" = development - test "$PATH" = "$REPL_HOME/base/bin:${runtime}/bin:$REPL_HOME/base/bin:${runtime}/bin:/original/path" - ) - ( - source ${deployment.shellPackage}/nix-support/setup-hook - test "$MODE" = deployment - ) - ( - source ${overridden}/shell/nix-support/setup-hook - test "$MODE" = last - ) - ${lib.concatStringsSep "\n" (lib.mapAttrsToList (name: fixture: '' - mkdir -p "$out/${name}" - cp ${fixture}/metadata.json "$out/${name}/metadata.json" - cp ${fixture}/modules.json "$out/${name}/modules.json" - cp ${pkgs.writeText "environment-input.json" (builtins.toJSON environmentInput)} "$out/${name}/environment-input.json" - env -i ${environmentArgs} UNRELATED=not-exported \ - ${fixture}/bin/replit-toolchain-env > "$out/${name}/environment.env0" - jq -RsS ${lib.escapeShellArg decodeEnvironment} "$out/${name}/environment.env0" \ - > "$out/${name}/environment.json" - jq -e --arg literal ${lib.escapeShellArg definition.replit.env.LITERAL} ' - .REPL_HOME == "/tmp/project with spaces" - and .A_DEPENDENT == "/tmp/project with spaces/base/child" - and .BRACED == "/tmp/project with spaces/base/braced" - and .PYTHONPATH == "/inherited/suffix" - and .MISSING == "" - and .EMPTY == "" - and .MULTILINE == "first=line\nsecond=line" - and .LITERAL == $literal - and (has("UNRELATED") | not) - and (has("HOME") | not) - ' "$out/${name}/environment.json" - '') fixtures)} - jq -e --arg path "/tmp/project with spaces/base/bin:${runtime}/bin:/tmp/project with spaces/base/bin:${runtime}/bin:/original/path" \ - '.MODE == "development" and .PATH == $path' "$out/development/environment.json" - jq -e --arg path "/tmp/project with spaces/base/bin:${runtime}/bin:/original/path" \ - '.MODE == "deployment" and .PATH == $path' "$out/deployment/environment.json" - jq -e '.MODE == "last"' "$out/override/environment.json" - env -i PATH="" ${toolchain}/bin/replit-toolchain-env \ - | jq -RsS ${lib.escapeShellArg decodeEnvironment} > fallback-environment.json - jq -e --arg home "$PWD" '.REPL_HOME == $home and .PYTHONPATH == "/suffix"' fallback-environment.json -'' diff --git a/scripts/ci_check.sh b/scripts/ci_check.sh index 36efe8d8..a5298edc 100755 --- a/scripts/ci_check.sh +++ b/scripts/ci_check.sh @@ -17,7 +17,7 @@ nix eval "${NIX_FLAGS[@]}" --file scripts/module-registry-test.nix nix eval "${NIX_FLAGS[@]}" .#modules --json nix eval "${NIX_FLAGS[@]}" .#deploymentModules --json nix build "${NIX_FLAGS[@]}" .#checks.x86_64-linux.module-registry --no-link -nix build "${NIX_FLAGS[@]}" .#checks.x86_64-linux.flake-toolchain --no-link +nix build "${NIX_FLAGS[@]}" .#checks.x86_64-linux.module-shell --no-link nix build "${NIX_FLAGS[@]}" .#checks.x86_64-linux.pip-user-site --no-link # The standalone lockfile OCI helper reconstructs old bundles, not current implementations.