Skip to content

Conversation

@jonringer
Copy link
Contributor

Make development shells easier to create with all derivations by having mkDerivation provide a toDevShell function, which can be used to convert a derivation into a similar derivation with additional dependencies.

];
in originalArgs // {
inherit name;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To disable hardening flags, which cause issues with debug traces

Suggested change
inherit hardeningDisable;

and add a

, hardeningDisable ? [ "all" ]

as a default

@blaggacao
Copy link

blaggacao commented Nov 9, 2024

I believe, that this is a relevant "entry breadcrumb" into the nixpkgs' state of discussion: NixOS/nix#7501

This EEP seems to be more narrowly scoped for pragamtic reasons, but reference of the broader context may be of interest for a deep dive into the topic.

@jonringer
Copy link
Contributor Author

If we had stdenv retain a reference to callPackage at the current package scope, then we could feasibly do something like:

devShells.default = myPackage.toDevShell ({ linter, test-runner} : {
  nativeBuildInputs = [ linter test-runner ];
})


## Future work

N/A
Copy link
Contributor Author

Choose a reason for hiding this comment

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

we could also support targeting debug builds for things like cargo, cmake, meson, etc.

, buildInputs ? [ ]
, nativeBuildInputs ? [ ]
, propagatedBuildInputs ? [ ]
, propagatedNativeBuildInputs ? [ ]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

env should also be supported, to reflect upstream preferences

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants