Nixpkgs Stdenv | 226 Members | |
| 74 Servers |
| Sender | Message | Time |
|---|---|---|
| 3 Sep 2023 | ||
| * Im running `nix build -f tests.cc-wrapper` | 13:07:59 | |
| it built | 14:28:22 | |
| Artturin: What next? Any opinion as to whether it may go into staging? | 14:31:08 | |
In reply to @p14:matrix.orgFor this it seems I want to set -DCMAKE_SKIP_INSTALL_RPATH=On to avoid the cmake error. Would it make sense to inhibit this in general with the static build stdenv adaptor? | 15:29:31 | |
Hmm, it's not clear where to put such logic. Essentially "if we're building static binaries, we don't have an rpath and we don't want cmake to do rpath manipulation". Feels like it could go into makeStaticBinaries. | 15:37:36 | |
| Success, I was able to build pkgsStatic.pkgsLLVM.clang.cc, and it also appears to work. | 15:58:26 | |
| Needed this to fix cmake builds though, does it seem reasonable?
| 15:59:30 | |
In reply to @p14:matrix.orgsuperficially ok but put it in a separate PR | 16:11:25 | |
In reply to @p14:matrix.orgwait a few days for comments | 16:11:44 | |
In reply to @p14:matrix.org* wait a few days for reviews | 16:11:47 | |
In reply to @artturin:matrix.orgIs that one (the makeStaticBinaries change) for staging or master do you think? | 16:19:01 | |
In reply to @p14:matrix.orgofborg will probably show <500 rebuilds but it'll rebuild everything pkgsStatic so do staging | 16:56:58 | |
I'm a little confused. I'm looking at makeStaticBinaries, and I see you can turn off via finalAttrs.dontAddStaticConfigureFlags. However, when I do thePackage.overrideAttrs (final: prev: { dontAddStaticConfigureFlags = true; } it doesn't appear to have the desired effect of disabling the --disable-shared configure flag. | 16:58:10 | |
A cursory test by eval'ing foo.thing in foo = ((self.stdenv.mkDerivation { name = "foo"; src = ""; val = "a"; }).overrideAttrs (final: prev: { thing = final.val; })).overrideAttrs (final: prev: { val = "b"; }); seems to suggest that I should be able to add an overrideAttrs to influence this | 16:59:08 | |
| dontAddStaticConfigureFlags is to stdenv instead of the derivatin | 16:59:12 | |
| * dontAddStaticConfigureFlags is to stdenv instead of the derivation | 16:59:16 | |
| Ahh, thanks | 16:59:19 | |
| but there are uses of it in packages and in the manual :? | 17:00:23 | |
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 | |
| one argument to overrideAttrs is previousAttrs not finalAttrs | 17:04:56 | |
| might be the issue | 17:05:04 | |
| aha, nice and confusing :) | 17:05:11 | |
| simple bug to fix then? | 17:05:16 | |
| (introduce prevAttrs) | 17:05:19 | |
| [i'll see about testing shortly] | 17:05:47 | |
| 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.
| 17:10:51 | |
| .. 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 | |
In reply to @artturin:matrix.orgSent as https://github.com/NixOS/nixpkgs/pull/253160 | 17:32:16 | |
| A question about static builds. How are the So, is this a solved problem somewhere? Do I just bodge NIX_LDFLAGS with extra | 20:00:59 | |
In reply to @p14:matrix.org makeStatic should already be converting buildInputs to propagatedBuildInputs but it probably wont help if the pc file is missing stuff | 20:43:24 | |