| 12 Feb 2024 |
| shift changed their display name from Vincent Palmer to shift. | 21:21:59 |
| 13 Feb 2024 |
| @cephoto:matrix.org changed their display name from PhantomProphet - NixOS makes simple things complicated.™ to PhantomProphet - NixOS makes simple things complicated.™ (and vice-versa). | 23:36:54 |
| 15 Feb 2024 |
| tengkuizdihar joined the room. | 11:48:20 |
| 16 Feb 2024 |
| @seb.sto:matrix.org joined the room. | 07:13:06 |
| @seb.sto:matrix.org left the room. | 07:13:27 |
| lord-valen joined the room. | 18:46:59 |
| 18 Feb 2024 |
| link2xt joined the room. | 02:42:49 |
mr-qubo | When I do e.g. nix shell 'nixpkgs#htop' only htop is added to path. But if I create flake with devShell and htop in buildInputs, and use nix develop dependencies are added into the PATH as well, like with nix-shell -p htop. Is it possible to have this work as nix shell? Also, as a second question, is it possible to group multiple packages and link all bins in one path, so only one entry in PATH is added instead of separate entry for each package? | 15:25:16 |
tomberek | The devShell: if you are using mkShell, then use the "packages" argument.
You can use buildEnv, then put that into mkShell. | 15:51:21 |
mr-qubo | Seems like using packages changed the order of things in PATH but I still have unwanted paths in PATH. | 16:50:26 |
mr-qubo | * Seems like using packages changed the order of things in PATH but I still have unwanted paths in PATH. | 16:50:33 |
mr-qubo | * Seems like using "packages" changed the order of things in PATH but I still have unwanted paths in PATH. | 16:50:44 |
mr-qubo | Thanks for "buildEnv", it does exactly what I wanted! | 16:51:20 |
mr-qubo | That's weird, I also get unwanted paths when using empty list of packages. | 16:54:13 |
netpleb | with a flakes enabled system does it still make sense to use system.autoUpgrade at all? or do you usually manage upgrading manually by updating your flake inputs? | 19:29:25 |
@loving-melody:matrix.org | I use it, autoUpgrade doesnt have to update the flake inputs | 20:52:00 |
mr-qubo | In reply to @loving-melody:matrix.org I use it, autoUpgrade doesnt have to update the flake inputs What's the purpose of autoUpgrade with flakes? | 21:07:42 |
@loving-melody:matrix.org | Mutli system flakes, can apply changes to other systems | 21:10:23 |
| 19 Feb 2024 |
samasaur | you could also update your flake in CI, and then use autoUpgrade to upgrade to that newer version | 00:27:50 |
| rhizomes joined the room. | 04:27:25 |
mr-qubo | I have a simple flake like this:
{
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in {
devShell = pkgs.mkShell {};
});
}
When I do nix develop I get things like gcc, patchelf, file, etc. in my PATH. I don't want that, anyone knows where does that come from and how can I get rid of that?
| 16:32:17 |
@philiptaron:matrix.org | mr-qubo: that is the nixpkgs stdenv. | 16:34:27 |
@philiptaron:matrix.org | https://nixos.org/manual/nixpkgs/stable/#part-stdenv | 16:35:06 |
@philiptaron:matrix.org | Are you looking for a shell with just... bash? | 16:35:20 |
mr-qubo | In reply to @philiptaron:matrix.org Are you looking for a shell with just... bash? That's just an example, I want some packages in this shell, but I don't want this stdenv. No idea why it's there in the first place. | 16:37:38 |
@philiptaron:matrix.org | It's coming from pkgs.mkShell.
To read how that happens, open up pkgs/top-level/all-packages.nix, find mkShell. That gets you to pkgs/build-support/mkshell/default.nix.
Inside pkgs/build-support/mkshell/default.nix, note how the return value is stdenv.mkDerivation. (that stdenv is the key).
Consider also mkShellNoCC for your use case. Note how that definition in pkgs/top-level/all-packages.nix does this:
mkShellNoCC = mkShell.override { stdenv = stdenvNoCC; };
You can do similarly to override the stdenv with whatever's appropriate for your usecase.
| 16:50:23 |
mr-qubo | Thanks, that's very helpful! | 16:54:12 |
| bitraten joined the room. | 19:27:19 |
mr-qubo | In reply to @mr-qubo:matrix.org When I do e.g. nix shell 'nixpkgs#htop' only htop is added to path. But if I create flake with devShell and htop in buildInputs, and use nix develop dependencies are added into the PATH as well, like with nix-shell -p htop. Is it possible to have this work as nix shell? Also, as a second question, is it possible to group multiple packages and link all bins in one path, so only one entry in PATH is added instead of separate entry for each package? I switched to https://devenv.sh/. It fixes my problem with unwanted packages in PATH and automatically uses buildEnv to create single PATH entry for all packages. | 20:05:55 |
| 20 Feb 2024 |
| @sofo:matrix.org changed their display name from Sofi to Sofie. | 07:39:15 |