!SgYlXivkogarTVcnZO:nixos.org

Nix Flakes

901 Members
184 Servers

Load older messages


SenderMessageTime
8 Dec 2021
@roberthensing:matrix.orgRobert Hensing (roberth) changed their profile picture.17:40:49
9 Dec 2021
@iggybibi:matrix.orgbmabsout joined the room.19:46:43
@iggybibi:matrix.orgbmabsout Hello! I'm trying to run a function from flake so that the output is in a nix shell, I ended up doing things manually like this nix shell --impure --expr "(builtins.getFlake \"nixpkgs/nixos-21.11\").legacyPackages.x86_64-linux.python39.withPackages (p: [p.numpy])" is there a better way to do this? 19:48:28
@iggybibi:matrix.orgbmabsout Is there a way to do something similar in meaning to nix shell nixpkgs/nixos-21.11#python39.withPackages --something "(p: [p.numpy])", I might be getting a few concepts wrong here 19:51:16
@iggybibi:matrix.orgbmabsout * Is there a way to do something similar in meaning to nix shell nixpkgs/nixos-21.11#python39.withPackages --something "(p: [p.numpy])"? I might be getting a few concepts wrong here 19:51:32
@iggybibi:matrix.orgbmabsout * Hello! I'm trying to run a function from a flake so that the output is in a nix shell, I ended up doing things manually like this nix shell --impure --expr "(builtins.getFlake \"nixpkgs/nixos-21.11\").legacyPackages.x86_64-linux.python39.withPackages (p: [p.numpy])" is there a better way to do this? 20:31:56
10 Dec 2021
@linj:matrix.orglinj joined the room.00:51:32
@jryans:matrix.orgJ. Ryan Stinnett joined the room.13:45:34
@iggybibi:matrix.orgbmabsoutJust found this! https://github.com/NixOS/nix/issues/556716:40:14
@flyx:flyx.orgflyx iggybibi: in your Flake output, you can provide devShell and devShells, which you can then invoke with nix develop. is that what you're searching? 16:42:56
@flyx:flyx.orgflyx or if it's from an external flake, write a shell.nix that basically does what you've put in your command 16:45:39
@iggybibi:matrix.orgbmabsout Not really, I wanted a one liner like nix-shell -p 'python3.withPackages (ps: with ps; [ numpy scipy ])' 16:46:08
@iggybibi:matrix.orgbmabsoutthat drops me into a shell with python and these packages (or any lang with this setup)16:46:36
@flyx:flyx.orgflyxI don't see where in the output schema a flake can provide functions in the first place16:51:15
@flyx:flyx.orgflyx ah, they would be part of the python39 derivation that is queried 16:53:16
@iggybibi:matrix.orgbmabsout changed their display name from iggybibi to bmabsout.17:05:23
11 Dec 2021
@cdepillabout:matrix.orgcdepillabout
In reply to @iggybibi:matrix.org
Not really, I wanted a one liner like nix-shell -p 'python3.withPackages (ps: with ps; [ numpy scipy ])'
I asked about this on Discourse, but I never got an answer: https://discourse.nixos.org/t/nix-shell-equivalent-of-nix-shell-p-arbitrary-expression/14832
00:50:18
@nbathum:matrix.orgnbathum (he or they) joined the room.19:22:08
12 Dec 2021
@linj:matrix.orglinj left the room.21:43:57
13 Dec 2021
@lourkeur:nixos.devlourkeur (nix btw) changed their display name from lourkeur (Nix OwO) to lourkeur (nix btw).17:12:50
15 Dec 2021
@jkxyz:matrix.orgjkxyz joined the room.15:34:55
17 Dec 2021
@montchr:matrix.orgmontchr joined the room.19:40:39
20 Dec 2021
@muhammadrahim:matrix.orgMuhammad Rahim joined the room.08:49:22
21 Dec 2021
@phirsch:matrix.orgPascal joined the room.06:41:37
22 Dec 2021
@kng:kng.reKng joined the room.02:29:24
23 Dec 2021
@tomberek:matrix.orgtomberek

anyone familiar with how a pure evaluation avoids "impure.nix" from nixpkgs? Context: i'm running nix inside of a container and getting:

error: access to absolute path '/.config/nixpkgs/overlays.nix' is forbidden in pure eval mode (use '--impure' to override)

it is a quite pure/minimal environment, but manually put together from a "scratch" starting point

01:51:51
@tomberek:matrix.orgtomberekhrm... it seems to stem from using the static nix02:21:36
@tomberek:matrix.orgtombereki'm using variants around (Nix) 2.6.0pre20211217_6e6e998 and nix (Nix) 2.6.0pre20211222_7feb741 with nix and nix-static to see why there is a difference. My thought was that "system" was not detected the same way with the static build... still investigating.02:44:29
@tomberek:matrix.orgtomberekokay, reproduced this on a normal NixOS machine using the same nix-static binary on an attribute that has not already been cached/built locally03:03:22
@tomberek:matrix.orgtomberek nix run github:nixos/nix#nix-static eval nixpkgs#coreutils.meta 03:52:34

There are no newer messages yet.


Back to Room ListRoom Version: 6