!OqhvaDMJdKYUicLDiE:nixos.org

Nixpkgs Stdenv

257 Members
80 Servers

Load older messages


SenderMessageTime
16 Jan 2024
@connorbaker:matrix.orgconnor (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
@ss:someonex.netSomeoneSerge (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 configuration19:41:05
@ss:someonex.netSomeoneSerge (is taking time off and doesn't want to hear about it)(I think)19:41:11
@ss:someonex.netSomeoneSerge (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
@ss:someonex.netSomeoneSerge (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
@ss:someonex.netSomeoneSerge (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 builds19:43:22
@ss:someonex.netSomeoneSerge (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 builds19:43:36
@ss:someonex.netSomeoneSerge (is taking time off and doesn't want to hear about it) (I suppose optionalString doesn't enforce types, does it) 19:44:33
@ss:someonex.netSomeoneSerge (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
@ss:someonex.netSomeoneSerge (is taking time off and doesn't want to hear about it)Legit19:45:36
@connorbaker:matrix.orgconnor (he/him) (UTC-5)Ah yeah lol19:45:38
@connorbaker:matrix.orgconnor (he/him) (UTC-5)The return type depends on the value of the first argument19:46:37
@connorbaker:matrix.orgconnor (he/him) (UTC-5)love it when things are dependently typed without being able to express that in any way19:46:52
@ss:someonex.netSomeoneSerge (is taking time off and doesn't want to hear about it)Wdym dependently typed, it's just a sum19:47:13
@connorbaker:matrix.orgconnor (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
@connorbaker:matrix.orgconnor (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:matrix.orgyannham joined the room.16:53:41
18 Jan 2024
@ss:someonex.netSomeoneSerge (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
@ss:someonex.netSomeoneSerge (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
@ss:someonex.netSomeoneSerge (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
@r_i_s:matrix.orgris_ joined the room.22:03:18
@r_i_s:matrix.orgris_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 release22:04:16
@raitobezarius:matrix.orgraitobezariusnot a stdenv person per se but you have my approval22:04:54
20 Jan 2024
@r_i_s:matrix.orgris_i may have to just take the merge-and-apologize approach16:29:29
@raitobezarius:matrix.orgraitobezariusI think so16:29:41
21 Jan 2024
@r_i_s:matrix.orgris_merging before i lose my nerve13:32:31
@hexa:lossy.networkhexanot much review happening among the code owners here 🫠14:06:19
@hexa:lossy.networkhexaso how can you "own" the code?14:06:42
@hexa:lossy.networkhexa * so how can you "own" the code then?14:06:45
@r_i_s:matrix.orgris_next one https://github.com/NixOS/nixpkgs/pull/28263821:20:58

Show newer messages


Back to Room ListRoom Version: 9