!OqhvaDMJdKYUicLDiE:nixos.org

Nixpkgs Stdenv

260 Members
80 Servers

Load older messages


SenderMessageTime
3 Sep 2023
@p14:matrix.orgp14Ahh, thanks16:59:19
@artturin:matrix.orgArtturinbut there are uses of it in packages and in the manual :?17:00:23
@p14:matrix.orgp14 I don't quite get it; I see (mkDerivationSuper args).overrideAttrs (finalAttrs: ..) suggesting that it is applying it to the derivation (the output of mkDerivationSuper). 17:00:38
@artturin:matrix.orgArtturinone argument to overrideAttrs is previousAttrs not finalAttrs17:04:56
@artturin:matrix.orgArtturinmight be the issue17:05:04
@p14:matrix.orgp14aha, nice and confusing :)17:05:11
@p14:matrix.orgp14simple bug to fix then?17:05:16
@p14:matrix.orgp14(introduce prevAttrs)17:05:19
@p14:matrix.orgp14[i'll see about testing shortly]17:05:47
@p14:matrix.orgp14

Ah, darn, that hits the infinite recursion with the comment (following); so I guess the 'bug' here is merely that I was mislead by it being called finalAttrs.

# An infinite recursion here can be caused by having the attribute names of expression ein.overrideAttrs(finalAttrs: previousAttrs: e)depend onfinalAttrs. Only the attribute values of ecan depend onfinalAttrs.

17:10:51
@p14:matrix.orgp14.. and it also looks impervious to being overridden via an overlay so I'll have to override configureFlags directly instead to filter out the unwanted args.17:12:51
@p14:matrix.orgp14
In reply to @artturin:matrix.org
ofborg will probably show <500 rebuilds but it'll rebuild everything pkgsStatic so do staging
Sent as https://github.com/NixOS/nixpkgs/pull/253160
17:32:16
@p14:matrix.orgp14

A question about static builds. How are the -l libraries meant to work in principle? By way of an example, git fails to build properly because when it links -lcurl, it has missing symbols for curl's transitive dependencies. I guess this is a case that would be solved by pkgconfig --static which would use the Private fields from a pkgconfig/*.pc file, but I observe that even those often fail to correctly list the libraries required for linking.

So, is this a solved problem somewhere? Do I just bodge NIX_LDFLAGS with extra -l libraries, or is there some other way that software being built is meant to discover what -l flags it should use?

20:00:59
@artturin:matrix.orgArtturin
In reply to @p14:matrix.org

A question about static builds. How are the -l libraries meant to work in principle? By way of an example, git fails to build properly because when it links -lcurl, it has missing symbols for curl's transitive dependencies. I guess this is a case that would be solved by pkgconfig --static which would use the Private fields from a pkgconfig/*.pc file, but I observe that even those often fail to correctly list the libraries required for linking.

So, is this a solved problem somewhere? Do I just bodge NIX_LDFLAGS with extra -l libraries, or is there some other way that software being built is meant to discover what -l flags it should use?

makeStatic should already be converting buildInputs to propagatedBuildInputs
https://github.com/NixOS/nixpkgs/blob/e89bfed9d701b753be10bbf2790cb8b3032fff04/pkgs/stdenv/adapters.nix#L119

but it probably wont help if the pc file is missing stuff

20:43:24
@p14:matrix.orgp14Yeah- I can see propagatedBuildInputs does arrange that the library paths are there, but I also don't see how it can specify what archives need to be included in the link.20:43:54
@artturin:matrix.orgArtturinpkg-config should be providing that info20:44:18
@artturin:matrix.orgArtturini think..20:44:24
@p14:matrix.orgp14For git and curl it's an odd one. It does a link check which fails because of the missing transistive dependencies. If you fix that, it subsequently runs curl-config which reports the correct set of things to link against :/20:44:36
@p14:matrix.orgp14i.e. it seems like git's config test is just broken. But it's not the only one, there are plenty of other packages broken in that they don't know what to link against.20:45:15
@kity:kity.wtfproblems joined the room.21:33:29
4 Sep 2023
@roberthensing:matrix.orgRobert Hensing (roberth) changed their display name from Robert Hensing (roberth) to roberth.15:27:30
@roberthensing:matrix.orgRobert Hensing (roberth) changed their display name from roberth to Robert Hensing (roberth).15:28:17
@kity:kity.wtfproblemsoh! this room exists!19:41:30
@kity:kity.wtfproblems i was talking in #exotic:nixos.org about wanting to explore "wasi-native" nixpkgs, where every build is cross compiled from wasm64-wasi to your native architecture. that way, it wouldn't matter what your host is or if you're compiling "natively" or "cross" and you would be able to use heterogenous architectures to do distributed builds 19:44:39
@kity:kity.wtfproblemsi think the first step of this is creating a stdenv for wasi, but i have no idea where to start with that19:44:58
@kity:kity.wtfproblems * i was talking in #exotic:nixos.org about wanting to explore "wasi-native" nixpkgs, where every build is cross compiled from wasm64-wasi to your native architecture (using boot.binfmt.emulatedSystems = [ "wasm64-wasi" ]). that way, it wouldn't matter what your host is or if you're compiling "natively" or "cross" and you would be able to use heterogenous architectures to do distributed builds 19:45:47
5 Sep 2023
@trofi:matrix.orgtrofi For linux there pkgs/stdenv/linux/ and make-bootstrap-tools.nix which builds a set of minimal binaries to start from. 02:40:49
@trofi:matrix.orgtrofi Alternatively you can coerce pkgs/stdenv/default.nix to boot from system's binaries (impure or native build): might want to float stagesNative above. 02:42:41
@andreas.schraegle:helsinki-systems.de@andreas.schraegle:helsinki-systems.de left the room.15:00:42
11 Sep 2023
@amigdal:matrix.mit.eduArthur joined the room.02:13:22

Show newer messages


Back to Room ListRoom Version: 9