!SgYlXivkogarTVcnZO:nixos.org

Nix Flakes

857 Members
176 Servers

Load older messages


SenderMessageTime
19 Jul 2021
@j-k:matrix.orgj-k joined the room.15:01:48
@matthewcroughan:defenestrate.itmatthewcroughan - nix.zone nix-build and nix build seem to produce different results. nix build vs nix-build with getFlake behave differently, the outPath for former doesn't contain .git, but the latter does. 22:32:11
@matthewcroughan:defenestrate.itmatthewcroughan - nix.zone * nix-build and nix build seem to produce different results. nix build vs nix-build with getFlake behave differently, the outPath for former doesn't contain .git, but the latter does. 22:56:25
20 Jul 2021
@polykernel:kde.orgpolykernelcan a flake have inputs of arbitrary types?01:27:51
@polykernel:kde.orgpolykernel * can a flake have inputs of an arbitrary type?01:28:03
@anodium:matrix.orgAndrea Pascal joined the room.03:37:43
@blaggacao:matrix.orgDavid Arnold
In reply to @vika:matrix.nice.sampler.fi
"follows" always uses the root flake for dependency resolution, not the parent flake
I guess this PR has all the relevant details / fixes https://github.com/NixOS/nix/pull/4641
12:46:35
@balsoft:balsoft.rubalsoft
In reply to @polykernel:kde.org
can a flake have inputs of an arbitrary type?
What do you mean by "type" of an input?
12:47:31
@blaggacao:matrix.orgDavid Arnold* I guess this PR has all the relevant details / fixes https://github.com/NixOS/nix/pull/4641 somteims one can work around that bug with something like https://www.github.com/divnix/devos/tree/develop/flake.nix#L4912:48:39
@blaggacao:matrix.orgDavid Arnold* I guess this PR has all the relevant details / fixes https://github.com/NixOS/nix/pull/4641 somteims one can work around that bug with something like https://www.github.com/divnix/devos/tree/develop/flake.nix#L49. But this work around stops working if things are too nested.12:50:13
@blaggacao:matrix.orgDavid Arnold* I guess this PR has all the relevant details / fixes https://github.com/NixOS/nix/pull/4641 somteims one can work around that bug with something like https://www.github.com/divnix/devos/tree/develop/flake.nix#L49. But this work around stops working if things are too nested. We usually use the patched nix version in a devshell to update the lock file. The correctly generated lockfile is then also compatible with a non-patched nix version.12:51:19
@blaggacao:matrix.orgDavid Arnold
In reply to @vika:matrix.nice.sampler.fi
This property of "follows" surely could be exploited in some way to do interesting things...
I regard it as a (better) substitute for overlays, as long as overlays is used to instantiate stuff on the same pkgs version.
12:53:25
@vika:matrix.nice.sampler.fivika (she/her) 🏳️‍⚧️
In reply to @blaggacao:matrix.org
I guess this PR has all the relevant details / fixes https://github.com/NixOS/nix/pull/4641 somteims one can work around that bug with something like https://www.github.com/divnix/devos/tree/develop/flake.nix#L49. But this work around stops working if things are too nested. We usually use the patched nix version in a devshell to update the lock file. The correctly generated lockfile is then also compatible with a non-patched nix version.
Maybe I should apply this patch to my Nix
12:54:36
@blaggacao:matrix.orgDavid Arnold You might use divnix/digga.overlays.patchedNix for convenience. 12:56:12
@blaggacao:matrix.orgDavid Arnoldhttps://www.github.com/divnix/digga/tree/develop/overlays%2Fnix-patched.nix12:56:33
@blaggacao:matrix.orgDavid Arnold* vika (she/her) 🏳️‍⚧️ might use `divnix/digga.overlays.patchedNix` for convenience.12:56:43
@blaggacao:matrix.orgDavid Arnold* vika (she/her) 🏳️‍⚧️ you might use `divnix/digga.overlays.patchedNix` for convenience.12:56:54
@vika:matrix.nice.sampler.fivika (she/her) 🏳️‍⚧️
In reply to @blaggacao:matrix.org
vika (she/her) 🏳️‍⚧️ you might use divnix/digga.overlays.patchedNix for convenience.

Cool! Thank you.

I wonder what this __dontExport thing does...

12:58:17
@blaggacao:matrix.orgDavid Arnold That's just an neglegtable (private) signal to another function of the flake-utils-plus library. 12:59:04
@blaggacao:matrix.orgDavid Arnold This other function automatically exporta overlays as packages, unless they are "upstream art" or have that flag set. 12:59:39
@blaggacao:matrix.orgDavid Arnold* This other function automatically exports overlays as packages, unless they are "upstream art" or have that flag set.12:59:57
@blaggacao:matrix.orgDavid Arnoldhttps://www.github.com/gytis-ivaskevicius/flake-utils-plus/tree/staging/lib%2FfromOverlays.nix#L7013:00:56
@ldesgoui:matrix.orgldesgoui joined the room.14:36:21
21 Jul 2021
@polykernel:kde.orgpolykernel
In reply to @balsoft:balsoft.ru
What do you mean by "type" of an input?
Sorry for the late reply, I meant other data types such as string, int just as flakes can have arbitrary outputs. However I realized this isn't in the scope of flakes and probably shouldn't be needed in the first place.
02:35:34
@polykernel:kde.orgpolykernel

If my understanding is correct, upon evaluating a flake, the directory where the flake resides is copied into the nix store. However when I attempt to reference a subdirectory of the flake directory within flake.nix itself, I can an error that the file does not exist even though it does.

<...>
users.users =
              builtins.listToAttrs (map
                (user: {
                  name = user;
                  value = {               
                    passwordFile = builtins.toString (./. + "/users/${user}/secrets/passwd");
                  };
                }) attr.users);
<...>

results in something like warning: password file ‘/nix/store/g76a07317yanvwp8lrib7zpji6flxpn1-source/users/user/secrets/passwd’ does not exist

02:46:26
@polykernel:kde.orgpolykernel *

If my understanding is correct, upon evaluating a flake, the directory where the flake resides is copied into the nix store. However when I attempt to reference a subdirectory of the flake directory within flake.nix itself, I get an error that the file does not exist even though it does.

<...>
users.users =
              builtins.listToAttrs (map
                (user: {
                  name = user;
                  value = {               
                    passwordFile = builtins.toString (./. + "/users/${user}/secrets/passwd");
                  };
                }) attr.users);
<...>

results in something like warning: password file ‘/nix/store/g76a07317yanvwp8lrib7zpji6flxpn1-source/users/user/secrets/passwd’ does not exist

02:46:43
@polykernel:kde.orgpolykernel *

If my understanding is correct, upon evaluating a flake, the directory where the flake resides is copied into the nix store. However when I attempt to reference a subdirectory of the flake directory within flake.nix itself, I get an error that the file does not exist even though it does.

<...>
users.users =
  builtins.listToAttrs (map
    (user: {
      name = user;
      value = {               
        passwordFile = builtins.toString (./. + "/users/${user}/secrets/passwd");
      };
    }) attr.users);
<...>

results in something like warning: password file ‘/nix/store/g76a07317yanvwp8lrib7zpji6flxpn1-source/users/user/secrets/passwd’ does not exist

02:47:40
@blaggacao:matrix.orgDavid Arnoldhttps://digga.divnix.com &mdash; I'd be very happy for any feedback on the freshly baked docs.05:01:37
@blaggacao:matrix.orgDavid Arnold * https://digga.divnix.com -- I'd be very happy for any feedback you could afford on the freshly baked docs.05:02:01
@blaggacao:matrix.orgDavid Arnold * https://digga.divnix.com -- I'd be very happy for any feedback you could afford on the freshly baked docs. (including proof reading)05:04:01

Show newer messages


Back to Room ListRoom Version: 6