!kjdutkOsheZdjqYmqp:nixos.org

Nixpkgs / NixOS contributions

1796 Members
NixOS 24.05 Uakari | #review-requests:nixos.org | https://nixos.org/blog/announcements.html#nixos-23.11 | https://hydra.nixos.org/jobset/nixos/trunk-combined | https://reproducible.nixos.org/ | 24.05 RMs: wegank & Mic92403 Servers

Load older messages


SenderMessageTime
25 May 2021
@claudi:grimm.fyiClaudi joined the room.17:25:29
@plabadens:matrix.orgplabadensbut you'd have to do that for separate components of the system17:25:46
@linus.heckemann:matrix.mayflower.deLinux Hackerman
In reply to @Ericson2314:matrix.org
Linux Hackerman: can you use self.callPackage?
yes
17:26:15
@linus.heckemann:matrix.mayflower.deLinux Hackermanthat seems to work17:26:25
@plabadens:matrix.orgplabadens @red: so for instance nix log /run/current-system/etc/udev/rules.d/ gives a build log for your udev rules 17:29:21
@plabadens:matrix.orgplabadens* red:: so for instance nix log /run/current-system/etc/udev/rules.d/ gives a build log for your udev rules17:30:50
@red:evil.redredthanks17:31:21
@red:evil.redred

hmm, this didn't work as expected:

17:34:10
@red:evil.redred
[red@apophenia:~]$ ls -la /run/current-system
lrwxrwxrwx 1 root root 93 May 25 13:15 /run/current-system -> /nix/store/zajrf997dd8l0fk50l1nixgpgm75a4xb-nixos-system-apophenia-21.05pre279012.ad47284f8b0

[red@apophenia:~]$ nix log /nix/store/zajrf997dd8l0fk50l1nixgpgm75a4xb-nixos-system-apophenia-21.05pre279012.ad47284f8b0
17:34:23
@Ericson2314:matrix.orgJohn Ericson Linux Hackerman: yeah that wasn't intentional 17:35:58
@Ericson2314:matrix.orgJohn Ericson but also i think one should always use self.callPackage anyways :) 17:36:19
@plabadens:matrix.orgplabadensred: yes it can only give you the logs for a given path or package17:37:47
@plabadens:matrix.orgplabadensso you'd need to be more specific beceause the logs don't propagate17:38:48
@linus.heckemann:matrix.mayflower.deLinux Hackerman
In reply to @Ericson2314:matrix.org
but also i think one should always use self.callPackage anyways :)
no, functions like callPackage are supposed to come from super
17:40:53
@Ericson2314:matrix.orgJohn Ericson Linux Hackerman: that's a mistake once said 17:53:41
@Ericson2314:matrix.orgJohn Ericsoneither that is no different, or it will get you old deps17:53:53
@toonn:matrix.orgtoonn Can't it cause infinite recursion? 17:56:24
@Ericson2314:matrix.orgJohn Ericson toonn: as long as the set of keys doesn't depend on self 17:57:53
@Ericson2314:matrix.orgJohn Ericsonit shouldn't17:57:55
@toonn:matrix.orgtoonn Keys? 17:59:19
@Ericson2314:matrix.orgJohn Ericson toonn: the attrset fields 18:00:15
@toonn:matrix.orgtoonn Yes, I'm talking about overlaying a package which has dependencies that are also overlayed. 18:00:58
@Ericson2314:matrix.orgJohn Ericson toonn: then self.callPackage is the safe option 18:12:41
@Ericson2314:matrix.orgJohn Ericson I only use super for the old versions of package, and stuff like self: super: { ... } // lib.optinonalAttrs (...super...) { ... } 18:13:22
@Ericson2314:matrix.orgJohn Ericson i.e. the optionalAttrs condition using self would mean the set of keys depends on self and that causes the problem 18:13:51
@linus.heckemann:matrix.mayflower.deLinux Hackerman
In reply to @Ericson2314:matrix.org
Linux Hackerman: that's a mistake once said
super.callPackage will give you packages from the final scope
18:22:08
@toonn:matrix.orgtoonn Yeah that was my understanding too. 18:24:51
@toonn:matrix.orgtoonn Any callPackage uses the fixpoint to provide deps. 18:25:12
@toonn:matrix.orgtoonn So unless you need to overlay callPackage itself, and you'd probably need a good reason to do so, no benefit can come from getting it from self. 18:25:46
@linus.heckemann:matrix.mayflower.deLinux Hackerman
(import ./. {
  overlays = [(self: super: {
    foo = "bar";
    baz = super.callPackage ({foo}: foo) {};
  })];
}).baz

⇒ "bar", not an eval error

18:26:01

There are no newer messages yet.


Back to Room ListRoom Version: 6