| 16 Jan 2024 |
connor (he/him) (UTC-5) | buildPackages.stdenvAdapter.useLibsFrom works by the way -- any ideas if modelStdenv and targetStdenv should be retrieved from pkgs or buildPackages? | 19:40:03 |
SomeoneSerge (is taking time off and doesn't want to hear about it) | The latter depends strictly on the use-case. The former works by accident, i.e. only in this particular configuration | 19:41:05 |
SomeoneSerge (is taking time off and doesn't want to hear about it) | (I think) | 19:41:11 |
SomeoneSerge (is taking time off and doesn't want to hear about it) | In reply to @connorbaker:matrix.org
This one?
nix-repl> :t legacyPackages.x86_64-linux.pkgsCross.aarch64-multiplatform.stdenv.cc.coreutils_bin
a set
Maybe I got an old nixpkgs check-out, but I'm looking at a line starting with coreutils_bin = optionalString ... | 19:41:41 |
SomeoneSerge (is taking time off and doesn't want to hear about it) | * The latter depends strictly on the use-case. The former works by accident, i.e. only in this particular configuration (just as the original implementation did "work" for native builds) | 19:42:48 |
SomeoneSerge (is taking time off and doesn't want to hear about it) | * The latter depends strictly on the use-case. The former works (?) by accident, i.e. only in this particular offsets, just as the original implementation did "work" for native builds | 19:43:22 |
SomeoneSerge (is taking time off and doesn't want to hear about it) | * The latter depends strictly on the use-case. The former works (?) by accident, i.e. only for these articular offsets, just as the original implementation did "work" for native builds | 19:43:36 |
SomeoneSerge (is taking time off and doesn't want to hear about it) | (I suppose optionalString doesn't enforce types, does it) | 19:44:33 |
SomeoneSerge (is taking time off and doesn't want to hear about it) | * (I suppose optionalString doesn't enforce types, does it)
EDIT:
nix-repl> lib.optionalString true {}
{ }
| 19:45:15 |
SomeoneSerge (is taking time off and doesn't want to hear about it) | Legit | 19:45:36 |
connor (he/him) (UTC-5) | Ah yeah lol | 19:45:38 |
connor (he/him) (UTC-5) | The return type depends on the value of the first argument | 19:46:37 |
connor (he/him) (UTC-5) | love it when things are dependently typed without being able to express that in any way | 19:46:52 |
SomeoneSerge (is taking time off and doesn't want to hear about it) | Wdym dependently typed, it's just a sum | 19:47:13 |
connor (he/him) (UTC-5) | You can write it as optionalString : Bool -> a -> String | a, sure, but it's more precise to say that it is a string when the boolean argument is false (specifically the empty string), and the second argument when the boolean argument is true | 20:01:10 |
connor (he/him) (UTC-5) | Python lets us get a bit closer using overload:
from typing import Literal, overload
@overload
def optionalString[_](b: Literal[False], value: object) -> Literal[""]: ...
@overload
def optionalString[a](b: Literal[True], value: a) -> a: ...
def optionalString[a](b: bool, value: a) -> Literal[""] | a:
return value if b else ""
| 20:05:47 |
| 17 Jan 2024 |
| yannham joined the room. | 16:53:41 |
| 18 Jan 2024 |
SomeoneSerge (is taking time off and doesn't want to hear about it) | Note: https://github.com/NixOS/nixpkgs/pull/281371 and https://github.com/NixOS/nixpkgs/pull/281750 need answers from people familiar with the cc-wrapper | 14:35:49 |
SomeoneSerge (is taking time off and doesn't want to hear about it) | * Note: https://github.com/NixOS/nixpkgs/pull/281371 and https://github.com/NixOS/nixpkgs/pull/281750 need answers from people familiar with the cc-wrapper
EDIT: also please do redirect me if this isn't the righ room though I guess it is | 22:02:25 |
SomeoneSerge (is taking time off and doesn't want to hear about it) | * Note: https://github.com/NixOS/nixpkgs/pull/281371 and https://github.com/NixOS/nixpkgs/pull/281750 need answers from people familiar with the cc-wrapper
EDIT: also please do redirect me if this isn't the right room though I guess it is | 22:02:32 |
| 19 Jan 2024 |
| ris_ joined the room. | 22:03:18 |
ris_ | would be great to get some movement on https://github.com/NixOS/nixpkgs/pull/274089 - there are two more hardening flags after this i'd like to get into the next release | 22:04:16 |
raitobezarius | not a stdenv person per se but you have my approval | 22:04:54 |
| 20 Jan 2024 |
ris_ | i may have to just take the merge-and-apologize approach | 16:29:29 |
raitobezarius | I think so | 16:29:41 |
| 21 Jan 2024 |
ris_ | merging before i lose my nerve | 13:32:31 |
hexa | not much review happening among the code owners here 🫠| 14:06:19 |
hexa | so how can you "own" the code? | 14:06:42 |
hexa | * so how can you "own" the code then? | 14:06:45 |
ris_ | next one https://github.com/NixOS/nixpkgs/pull/282638 | 21:20:58 |