8000 feat(flake): add a new devshell that includes full dev tools by eveeifyeve · Pull Request #852 · nix-community/nix-init · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
use flake
use flake .#full
35 changes: 22 additions & 13 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,30 @@
...
}:
{
devShells.default = pkgs.mkShell {
packages = [
pkgs.nurl
];
devShells = {
default = pkgs.mkShell {
packages = [
pkgs.nurl
];

env = {
NIX_INIT_LOG = "nix_init=trace";
RUST_BACKTRACE = true;
};

env = {
NIX_INIT_LOG = "nix_init=trace";
RUST_BACKTRACE = true;
shellHook = ''
mkdir -p data
ln -sf ${config.packages.get-nix-license} data/get_nix_license.rs
ln -sf ${config.packages.license-store-cache} data/license-store-cache.zstd
'';
};
full = pkgs.mkShell {
imports = [ config.devShells.default ];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eveeifyeve, what does this imports = ...; do? AFAICT, it's totally useless: #877

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought mkshell supports this?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it can be fixed by a simple case of inputsFrom

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've read the code and the docs, I see nothing about this. I also tried it, and it doesn't do anything. Am I missing something?

@eveeifyeve eveeifyeve Sep 13, 2026 •
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually it is my mistake, huh. I think I meant inputsFrom and probably got confused. Sounds like my shells are broken in prod as well. 😆 Nope, I guess I got I confused this time, I blame flake-parts for that. 😆

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think inputsFrom would work here either. Maybe we'd get the packages, but there's also a shell hook we need.

@eveeifyeve eveeifyeve Sep 13, 2026 •
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think inputsFrom would work here either. Maybe we'd get the packages, but there's also a shell hook we need.

https://github.com/NixOS/nixpkgs/blob/df48ae66ead184b1ebd806bd730438fa5ac29070/pkgs/build-support/mkshell/default.nix#L45?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh nice! Updated #877 accordingly.

buildInputs = lib.optionals pkgs.stdenv.hostPlatform.isDarwin [ pkgs.curl ];
packages = [
inputs'.fenix.packages.stable.defaultToolchain
];
};

shellHook = ''
mkdir -p data
ln -sf ${config.packages.get-nix-license} data/get_nix_license.rs
ln -sf ${config.packages.license-store-cache} data/license-store-cache.zstd
'';
};

packages = {
Expand Down
0