Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rust rewrite #1005

Merged
merged 152 commits into from
Mar 20, 2024
Merged

Rust rewrite #1005

merged 152 commits into from
Mar 20, 2024

Conversation

domenkozar
Copy link
Member

@domenkozar domenkozar commented Mar 11, 2024

Building upon #745, more on why another rewrite on the announcement post.

❯ ./result/bin/devenv
https://devenv.sh 1.0.0: Fast, Declarative, Reproducible, and Composable Developer Environments

Usage: devenv [OPTIONS] <COMMAND>

Commands:
  init       Scaffold devenv.yaml, devenv.nix, .gitignore and .envrc.
  shell      Activate the developer environment. https://devenv.sh/basics/
  update     Update devenv.lock from devenv.yaml inputs. http://devenv.sh/inputs/
  search     Search for packages and options in nixpkgs. https://devenv.sh/packages/#searching-for-a-file
  info       Print information about this developer environment.
  up         Start processes in the foreground. https://devenv.sh/processes/
  processes  Start or stop processes.
  test       Run tests. http://devenv.sh/tests/
  container  Build, copy, or run a container. https://devenv.sh/containers/
  inputs     Add an input to devenv.yaml. https://devenv.sh/inputs/
  gc         Deletes previous shell generations. See http://devenv.sh/garbage-collection
  build      Build any attribute in devenv.nix.
  version    Print the version of devenv.
  help       Print this message or the help of the given subcommand(s)

Options:
  -v, --verbose
          Enable debug log level.
  -j, --max-jobs <MAX_JOBS>
          Maximum number of Nix builds at any time. [default: 8]
  -j, --cores <CORES>
          Maximum number CPU cores being used by a single build.. [default: 2]
  -s, --system <SYSTEM>
          [default: x86_64-linux]
  -i, --impure
          Relax the hermeticity of the environment.
  -c, --clean [<CLEAN>...]
          Ignore existing environment variables when entering the shell. Pass a list of comma-separated environment variables to let through.
  -d, --nix-debugger
          Enter Nix debugger on failure.
  -n, --nix-option <NIX_OPTION> <NIX_OPTION>
          Pass additional options to nix commands, see `man nix.conf` for full list.
  -o, --override-input <OVERRIDE_INPUT> <OVERRIDE_INPUT>
          Override inputs in devenv.yaml.
  -h, --help
          Print help

Fixes #744
Fixes #693
Fixes #658
Fixes #244
Fixes #436
Fixes #629
Fixes #731
Fixes #83
Fixes #80
Fixes #749
Fixes #507
Fixes #258
Fixes #486
Fixes #745
Fixes #599
Fixes #607
Fixes #922
Fixes #792
Fixes #540
#555

  • test flake integration
  • fix all tests
    Please give it a try:
nix profile install --accept-flake-config tarball+https://install.devenv.sh/rust-rewrite

Add devenv.yaml:

inputs:
  devenv:
     url: github:cachix/devenv/rust-rewrite 

Copy link

cloudflare-workers-and-pages bot commented Mar 11, 2024

Deploying devenv with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2edb077
Status:⚡️  Build in progress...

View logs

@sneakyvv
Copy link

How would you switch from the old/current devenv to this rewrite?

I'm getting

$ nix profile install --accept-flake-config tarball+https://install.devenv.sh/rust-rewrite
[0/1 built] Segmentation fault

@tennox
Copy link
Contributor

tennox commented Mar 19, 2024

How would you switch from the old/current devenv to this rewrite?

@sneakyvv Works for me:

flake.nix

inputs = {
    devenv.url = "github:cachix/devenv/rust-rewrite"; # (i) https://github.com/cachix/devenv/pull/1005
};

@domenkozar
Copy link
Member Author

How would you switch from the old/current devenv to this rewrite?

I'm getting

$ nix profile install --accept-flake-config tarball+https://install.devenv.sh/rust-rewrite
[0/1 built] Segmentation fault

Could you give more information what system you're running this on?

@domenkozar domenkozar merged commit 39c4b52 into main Mar 20, 2024
1 of 12 checks passed
@sneakyvv
Copy link

How would you switch from the old/current devenv to this rewrite?
I'm getting

$ nix profile install --accept-flake-config tarball+https://install.devenv.sh/rust-rewrite
[0/1 built] Segmentation fault

Could you give more information what system you're running this on?

I'm running it on WSL2, and got it working by running nix profile install --accept-flake-config tarball+https://install.devenv.sh/rust-rewrite from a folder where I also added the needed devenv.yaml config (as stated in description of this ticket).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment