Skip to content

rewrite devshell with flake #8

New issue

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

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

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

rewrite devshell with flake #8

wants to merge 1 commit into from

Conversation

kloenk
Copy link
Member

@kloenk kloenk commented Feb 24, 2025

Currently only the clang devshell works, did not look at gcc yet

@y86-dev
Copy link
Member

y86-dev commented Feb 28, 2025

I think it would be very useful for nix-newcomers to have some basic instructions in the readme. So for example:

Use nix develop to start the development shell with gcc.

(of course only if gcc actually works)

and

Use nix develop .#clang to start the development shell with clang.

inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
oxalica.url = "github:oxalica/rust-overlay";
Copy link

Choose a reason for hiding this comment

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

There are 2 (different) nixpkgs in flake.lock

Suggested change
oxalica.url = "github:oxalica/rust-overlay";
oxalica.url = "github:oxalica/rust-overlay";
oxalica.inputs.nixpkgs.follows = "nixpkgs";

{ name = "LD"; bin = "ld.lld"; hostPackage = "bintools"; }
{ name = "AR"; bin = "ar"; hostPackage = "bintools"; }
])))) else {
TODO = builtins.warn "TODO gcc build";
Copy link

Choose a reason for hiding this comment

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

error: attribute 'warn' missing

Suggested change
TODO = builtins.warn "TODO gcc build";
TODO = builtins.throw "TODO gcc build";

@@ -0,0 +1,22 @@
{
description = "A very basic flake";
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
description = "A very basic flake";
description = "Devshell for building the Linux kernel";

@y86-dev
Copy link
Member

y86-dev commented Mar 3, 2025

I tried to set an older version of stable rust by setting rustAttrs to pkgs.rust-bin.stable."1.78.0". But then I couldn't enable CONFIG_RUST, the option wasn't available in make menuconfig despite all depends_on cfgs being =y...

Any version before 1.81.0 doesn't work for me, can you reproduce?

@y86-dev
Copy link
Member

y86-dev commented Mar 4, 2025

I tried to set an older version of stable rust by setting rustAttrs to pkgs.rust-bin.stable."1.78.0". But then I couldn't enable CONFIG_RUST, the option wasn't available in make menuconfig despite all depends_on cfgs being =y...

I found out what the issue was, the depends on formula was too long and went over my laptop screen, CALL_THUNKS was set to the wrong value...

@y86-dev
Copy link
Member

y86-dev commented Mar 4, 2025

Can you also add these python3Packages to the shell: pyaml, ply, gitpython? They are needed for running checkpatch.pl. Thanks!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants