| 11 Mar 2024 |
accelbread | * Added the change; should now only need to set inputs if using inputs.self or want to override | 02:49:30 |
| 13 Mar 2024 |
cmacrae | just wondering, regarding devShells in flakelight, is there a means to use something like devenv ? it has it's own devenv.lib.mkShell which I'd love to be able to use with flakelight | 13:49:14 |
accelbread | Yeah, you can just set any of the devshells to the output of that function | 14:58:08 |
accelbread | Something like:
{
inputs = {
flakelight.url = "github:nix-community/flakelight";
devenv.url = "github:cachix/devenv";
};
outputs = { flakelight, devenv, ... }:
flakelight ./. {
};
}
| 15:08:40 |
accelbread | * Something like:
{
inputs = {
flakelight.url = "github:nix-community/flakelight";
devenv.url = "github:cachix/devenv";
};
outputs = { flakelight, devenv, ... }:
flakelight ./. {
devShell = { pkgs, inputs, ... }: devenv.lib.mkShell {
inherit inputs pkgs;
...
};
};
}
| 15:10:18 |
accelbread | there we go, not used to enter in middle of message submitting ha | 15:10:43 |
accelbread | * Something like:
{
inputs = {
flakelight.url = "github:nix-community/flakelight";
devenv.url = "github:cachix/devenv";
};
outputs = { flakelight, devenv, ... }:
flakelight ./. {
devShell = { pkgs, inputs, ... }: devenv.lib.mkShell {
inherit inputs pkgs;
modules = [
];
};
};
}
| 15:16:35 |
accelbread | * Something like:
{
inputs = {
flakelight.url = "github:nix-community/flakelight";
devenv.url = "github:cachix/devenv";
};
outputs = { flakelight, devenv, ... }:
flakelight ./. {
devShell = { pkgs, inputs, ... }: devenv.lib.mkShell {
inherit inputs pkgs;
modules = [
# Your stuff here
];
};
};
}
| 15:17:10 |
accelbread | I think that should work? Though it seems devenv requires impure? | 15:17:32 |
cmacrae | awesome, how about if I wanted to use the autoload for devShells/ ? | 16:01:36 |
cmacrae | yeah, sadly devenv needs impurity because of some of the features around process management 😢 (I think it writes to files) | 16:02:11 |
accelbread | for autoloading could have:
{ pkgs, inputs, ... }:
inputs.devenv.lib.mkShell {
inherit inputs pkgs;
modules = [
# Your stuff here
];
};
and put that in nix/devShell.nix or nix/devShells/devenv.nix or such
| 16:17:03 |
cmacrae | oh great, okay that's perfect - thanks! | 16:17:34 |
cmacrae | any idea why a package definition in nix/packages/example/default.nix, looking like this would complain lib.customisation.callPackageWith: Function called without required argument "buildPythonPackage" at /nix/store/... ?
{ buildPythonPackage }:
buildPythonPackage rec {
pname = "example"....
haven't run into this with other packages I've defined wherein I use a bunch of build inputs from nixpkgs. sorry for all the questions 😅
| 16:48:29 |
accelbread | Huh it does not seem to exist in nixpkgs anymore. Maybe it was moved? | 16:58:42 |
accelbread |  Download image.png | 16:59:30 |
accelbread | no problem about questions, ask away | 16:59:56 |
cmacrae | that is very confusing 😅 I was using example = callPackage ./packages/example { inherit buildPythonPackage; }; in a previous iteration of this project and it worked | 17:01:24 |
accelbread | it seems packages in nixpkgs are also using it which is wierd | 17:01:47 |
accelbread | * it seems packages in nixpkgs are also using it which is weird | 17:01:51 |
accelbread | Ah | 17:02:05 |
cmacrae | its under pythonPackages, is that perhaps why? | 17:02:44 |
accelbread | the inherit buildPythonPackage; there adds/overrides stuff to the package set for that callPackage | 17:02:48 |
accelbread | if its pythonPackages.buildPythonPackage you'll want your to take { pythonPackages } and go from there | 17:03:51 |
cmacrae | oh good, I'm glad you suggested that, haha. I thought "maybe I just use that, but then I don't want it to all be in scope", but I guess it doesn't matter anyway because of lazy eval? | 17:04:46 |
accelbread | Yeah, lazy eval takes care of it | 17:05:02 |
accelbread | Though I think I usually pull in like python3 and do python3.buildPythonPackage? Don't remember at the moment and only have python stuff on work laptop ha | 17:05:54 |
accelbread | Though I usually end up needing specific python versions like python311 or python312 | 17:06:45 |
accelbread | Ah its python3.pkgs.buildPythonPackage | 17:08:43 |
cmacrae | ahhh, that's it | 17:08:52 |