!SgYlXivkogarTVcnZO:nixos.org

Nix Flakes

610 Members
122 Servers

Load older messages


SenderMessageTime
8 Aug 2024
@dramforever:matrix.orgdramforeverand that caused the difference09:00:37
@quapka4:matrix.orgquapka4I see, thanks a lot, nonetheless.09:01:19
@dramforever:matrix.orgdramforeverthat's the only thing i can think of without like, your flake code, logs, stuff09:02:07
@quapka4:matrix.orgquapka4
In reply to @dramforever:matrix.org
like maybe the nix-user-chroot thing has sandbox off and nixos has sandbox on
This does not seem to be the problem. I have tried with/without sandbox on both machines and on each machine the with/without hashes were the same, but still different across the machines.
10:18:48
@quapka4:matrix.orgquapka4
In reply to @dramforever:matrix.org
that's the only thing i can think of without like, your flake code, logs, stuff
I can show you the code/logs if you're willing to look into it.
10:19:12
@quapka4:matrix.orgquapka4 What is maybe strange a bit is that nix eval --raw and nix eval --raw '.?submodules=1' gives the same output for the Nix only and a different one for the NixOS. 10:26:00
9 Aug 2024
@sh4p3:matrix.orgDavid Nies joined the room.20:28:47
10 Aug 2024
@khaneliman:matrix.orgAustin Horstman changed their display name from Khaneliman to Austin Horstman.03:50:12
11 Aug 2024
@qu4pk4:matrix.orgqu4pk4Hi, while on my journey to improving in Nix(OS) is there anyone interested in reviewing a Flake of mine? Spotting some anti-patterns and such.15:10:23
@qu4pk4:matrix.orgqu4pk4

For example, the flake contains lots of packages, because I use it to build conditionally different versions. I went with a modular approach:

# flake.nix
{
  ...
  packages = {
    pkg1 = {
      ver1 = { ... };
      ver2 = { ... };
      ...
      vern = { ... };
    };
  };
}
16:41:18
@qu4pk4:matrix.orgqu4pk4 *

For example, the flake contains lots of packages, because I use it to build conditionally different versions. I went with a modular approach:

# flake.nix
{
  ...
  packages = {
    pkg1 = {
      ver1 = { ... };
      ver2 = { ... };
      ...
      vern = { ... };
    };
    pkg1 = {
      ver1 = { ... };
      ver2 = { ... };
      ...
      vern = { ... };
    };
  };
}

Which allows to run the packages like nix run '#pkg1.ver1' or 'nix run #pkg1.ver2'. Unfortunately, nix flake checkdoes not enter the nested attributes and that results innix flake check` failing.

16:42:45
@qu4pk4:matrix.orgqu4pk4 Is this a bad approach or can I instruct nix flake {show,check} dive into the attributes? 16:43:42
@qu4pk4:matrix.orgqu4pk4 *

For example, the flake contains lots of packages, because I use it to build conditionally different versions. I went with a modular approach:

# flake.nix
{
  ...
  packages = {
    pkg1 = {
      ver1 = { ... };
      ver2 = { ... };
      ...
      vern = { ... };
    };
    pkg1 = {
      ver1 = { ... };
      ver2 = { ... };
      ...
      vern = { ... };
    };
  };
}

Which allows to run the packages like nix run '#pkg1.ver1' or 'nix run #pkg1.ver2'. Unfortunately, nix flake checkdoes not enter the nested attributes and that results innix flake check` failing.

16:43:52
@qu4pk4:matrix.orgqu4pk4 *

For example, the flake contains lots of packages, because I use it to build conditionally different versions. I went with a modular approach:

# flake.nix
{
  ...
  packages = {
    pkg1 = {
      ver1 = { ... };
      ver2 = { ... };
      ...
      vern = { ... };
    };
    pkg1 = {
      ver1 = { ... };
      ver2 = { ... };
      ...
      vern = { ... };
    };
  };
}

Which allows to run the packages like nix run '#pkg1.ver1' or 'nix run #pkg1.ver2'. Unfortunately, nix flake check does not enter the nested attributes and that results innix flake check` failing.

16:44:04
@qu4pk4:matrix.orgqu4pk4 *

For example, the flake contains lots of packages, because I use it to build conditionally different versions. I went with a modular approach:

# flake.nix
{
  ...
  packages = {
    pkg1 = {
      ver1 = { ... };
      ver2 = { ... };
      ...
      vern = { ... };
    };
    pkg1 = {
      ver1 = { ... };
      ver2 = { ... };
      ...
      vern = { ... };
    };
  };
}

Which allows to run the packages like nix run '#pkg1.ver1' or nix run '#pkg1.ver2'. Unfortunately, nix flake check does not enter the nested attributes and that results innix flake check\ failing.

16:44:28
@qu4pk4:matrix.orgqu4pk4 *

For example, the flake contains lots of packages, because I use it to build conditionally different versions. I went with a modular approach:

# flake.nix
{
  ...
  packages = {
    pkg1 = {
      ver1 = { ... };
      ver2 = { ... };
      ...
      vern = { ... };
    };
    pkg1 = {
      ver1 = { ... };
      ver2 = { ... };
      ...
      vern = { ... };
    };
  };
}

Which allows to run the packages like nix run '#pkg1.ver1' or nix run '#pkg1.ver2'. Unfortunately, nix flake check does not enter the nested attributes and that results innix flake check failing.

16:44:44
@emilazy:matrix.orgemilyyeah you're not allowed to do that sorry17:27:36
@emilazy:matrix.orgemilysadly17:27:45
@ronnypfannschmidt:matrix.orgRonnyim wondering - are there any experiments on how to have a library system for derivations, dependencies and so on - preferably without suckering into pkgs.lib im looking for stuff to make more easy autoupdaters, service specs, state management18:45:55
@qu4pk4:matrix.orgqu4pk4
In reply to @emilazy:matrix.org
yeah you're not allowed to do that sorry
I mean, it works enough for my use case. :D
20:00:59
@emilazy:matrix.orgemily well, it doesn't work for nix flake check :) 20:01:34
@qu4pk4:matrix.orgqu4pk4Is there a good reason, why it doesn't/cannot work?20:02:02
@qu4pk4:matrix.orgqu4pk4My Flake is part of a research into libs/pkgs, so I am ok with it not fitting 100% into the infra.20:02:50
@qu4pk4:matrix.orgqu4pk4 Nix doesn't seem to be used much for supporting any version of lib, but the strictness and constraints feel like a good match for that use case. 20:04:32
@qu4pk4:matrix.orgqu4pk4Especially, for research reproduceability.20:04:52
@qu4pk4:matrix.orgqu4pk4 Another thing: installCheck phase is ran when doInstallCheck is set to true according to https://nixos.org/manual/nixpkgs/stable/#var-stdenv-doInstallCheck, but not when cross-compiling. I can't get my installCheck phase to run in a flake that uses flake-utils. Is the cross-compiling kicking in? 20:13:20
@qu4pk4:matrix.orgqu4pk4 I am building with nix build '#pkg.ver' therefore I am not really thinking I am cross-compiling. 20:13:48
@emilazy:matrix.orgemily
In reply to @qu4pk4:matrix.org
Is there a good reason, why it doesn't/cannot work?
the schema forbids it. legacyPackages lets you put arbitrary data in, which is why Nixpkgs uses it
20:15:37
@tomberek:matrix.orgtomberek qu4pk4: Eelco is working on a flake-schemas effort to make supporting various schemas in the the top-level outputs. Regardless, you can place a "lib" wherever you wish. Nixpkgs itself places "lib" output into the top-level of the flake. 22:29:56
12 Aug 2024
@qu4pk4:matrix.orgqu4pk4Thanks07:44:21

Show newer messages


Back to Room ListRoom Version: 6