25 Sep 2024 |
Artturin | And in nixpkgs | 21:13:35 |
Artturin | Download image.png | 21:13:37 |
Artturin | NIX_SHOW_STATS=1 NIX_SHOW_STATS_PATH=stats-interpolation.json nix eval --impure ".#cups-idprt-barcode" | 21:14:36 |
Artturin | Can't do or (throw "cups-idprt-barcode: No prebuilt filters for system: ${stdenvNoCC.hostPlatform.system}") with getAttr so will have to use the interpolation | 21:30:58 |
Artturin | Or
arches = {
x86_64-linux = "x64";
x86-linux = "x86";
};
arch =
if (builtins.hasAttr stdenvNoCC.hostPlatform.system arches) then
builtins.getAttr (stdenvNoCC.hostPlatform.system) arches
else
throw "Not supported on ${stdenvNoCC.hostPlatform.system}";
but this is ugly and also has worse stats
| 21:36:34 |
Artturin | Download image.png | 21:36:37 |
emily | would be nice if you could say foo.(stdenvNoCC.…) | 22:07:21 |
| Buckley joined the room. | 23:11:54 |
26 Sep 2024 |
| Fabián Heredia set a profile picture. | 01:15:50 |
| Emmanuel Genga joined the room. | 11:44:21 |
| vendion joined the room. | 14:21:54 |
| @simonyde:matrix.org left the room. | 19:30:41 |
27 Sep 2024 |
| Pol joined the room. | 12:09:09 |
Pol | Heya! I'm working on this PR https://github.com/hercules-ci/flake.parts-website/pull/1096 and I'm trying to address the first point noted by Robert Hensing (roberth) https://github.com/hercules-ci/flake.parts-website/pull/1096#issuecomment-2378900576 I would like to have some directions on how to do such a function. I saw that efforts were made in https://github.com/NixOS/nixpkgs/issues/237776, figsoda proposed a function concatMapAttrsWith but I don't know how it could help me for the issue I have. | 12:11:15 |
Pol | I'm basically looking for transforming such an attribute:
{
a = {
b = {
c = <derivation hello-2.12.1>;
};
into:
"a/b/c" = <derivation ...>;`
| 12:13:46 |
Pol | * I'm basically looking for transforming such an attribute:
{
a = {
b = {
c = <derivation hello-2.12.1>;
};
};
};
into:
"a/b/c" = <derivation ...>;`
| 12:14:15 |
Pol | * I'm basically looking for transforming such an attribute:
{
a = {
b = {
c = <derivation hello-2.12.1>;
};
};
};
into:
"a/b/c" = <derivation ...>;`
Knowing that the tree structure can be totally varying.
| 12:14:51 |
Pol | I pushed this thing: https://github.com/drupol/pkgs-by-name-for-flake-parts/commit/baf7212a27ec1cb1a1139f8bbc78a184581a4bcd but I have the feeling that it could be simplified/improved using concatMapAttrWith . WDYT? | 12:29:08 |
figsoda | In reply to @drupol:matrix.org
I'm basically looking for transforming such an attribute:
{
a = {
b = {
c = <derivation hello-2.12.1>;
};
};
};
into:
"a/b/c" = <derivation ...>;`
Knowing that the tree structure can be totally varying.
I'm not sure if concatMapAttrsWith would be helpful in this particular case. I did the same thing in fenix to make nested package sets show up in flakes: code, but I just used concatMapAttrs directly | 15:45:18 |
Pol | Going to check! | 15:45:36 |
figsoda | In reply to @drupol:matrix.org
I'm basically looking for transforming such an attribute:
{
a = {
b = {
c = <derivation hello-2.12.1>;
};
};
};
into:
"a/b/c" = <derivation ...>;`
Knowing that the tree structure can be totally varying.
* I'm not sure if concatMapAttrsWith would be helpful in this particular case. I did the same thing in fenix to make nested package sets show up in flakes: code, but I just used concatMapAttrs directly | 15:45:52 |
Pol | Thank you! | 15:46:13 |
| elikoga set a profile picture. | 16:27:25 |
| cafkafk 🏳️⚧️ joined the room. | 19:11:48 |
28 Sep 2024 |
aleksana (force me to bed after 18:00 UTC) | Why is repl allowing if = 1 (can autocomplete if but can't get the value) but not a = { if = 1; } ? | 02:49:18 |
aleksana (force me to bed after 18:00 UTC) | I'm reading the lexer and parser but still can't understand why | 02:49:37 |
cafkafk 🏳️⚧️ | seems like a repl'ism? | 02:50:40 |
aleksana (force me to bed after 18:00 UTC) | The lexer.l just shows keywords take a higher precedence than identifiers | 02:50:56 |
cafkafk 🏳️⚧️ | * seems like a repl'ism? (specially because nix-instantiate --parse --expr 'if = 1' also fails) | 02:51:37 |
cafkafk 🏳️⚧️ | Do you know what part of the code let's you do assignment without let bindings in the repl, I feel like that's a good place to look for this | 02:54:29 |