!kjdutkOsheZdjqYmqp:nixos.org

Nixpkgs / NixOS contributions

1861 Members
NixOS 24.05 Uakari | #review-requests:nixos.org | https://nixos.org/blog/announcements.html#nixos-23.11 | https://hydra.nixos.org/jobset/nixos/trunk-combined | https://reproducible.nixos.org/ | 24.05 RMs: wegank & Mic92409 Servers

Load older messages


SenderMessageTime
21 Oct 2024
@atemu12:matrix.orgAtemuRust people: Does cargoLock.lockFile do IFD when given a string with drvs in it?11:41:51
@emilazy:matrix.orgemilyI believe so.11:45:53
@luckytethys:matrix.orgTethys Svensson
In reply to @qyliss:fairydust.space

Architectures needed for pwntools makes sense. We can always add more later. I would call each of the packages -binutils, since that matches the convention usually followed by the binaries. Do you think it would be possible to use overrides with the existing binutils expression? Would be nice to avoid duplication.

No, at least I don't know how to do it with overrides. The existing one uses stdenv to figure out target, etc, while I need to specify it explicitly.
12:01:27
@luckytethys:matrix.orgTethys Svensson And do you mean to call the package aarch64-binutils, or what was your suggested naming? 12:01:53
@qyliss:fairydust.spaceAlyssa RossName it after the triple passed as --target to binutils12:06:09
@qyliss:fairydust.spaceAlyssa Ross
In reply to @luckytethys:matrix.org
No, at least I don't know how to do it with overrides. The existing one uses stdenv to figure out target, etc, while I need to specify it explicitly.
Add a parameter that defaults to the stdenv one?
12:06:19
@luckytethys:matrix.orgTethys Svensson
In reply to @qyliss:fairydust.space
Name it after the triple passed as --target to binutils
So e.g. aarch64-unknown-linux-gnu-binutils? And then place it in top-level/all-packages.nix?
12:07:28
@luckytethys:matrix.orgTethys Svensson
In reply to @qyliss:fairydust.space
Add a parameter that defaults to the stdenv one?
I'll try to see if I can make that work
12:07:36
@qyliss:fairydust.spaceAlyssa Ross
In reply to @luckytethys:matrix.org
So e.g. aarch64-unknown-linux-gnu-binutils? And then place it in top-level/all-packages.nix?
Yeah, I think so.
12:08:20
@qyliss:fairydust.spaceAlyssa RossMaaaybe we could get away with aarch64-linux-binutils, I'm not sure12:08:29
@qyliss:fairydust.spaceAlyssa Rossbut we can always rename later12:08:32
@luckytethys:matrix.orgTethys Svensson Actually, I don't know how to do that. The --target is set implicitly by the stdenv.mkDerivation, while my derivation passes --target explicitly. How do I unify those? 12:08:40
@qyliss:fairydust.spaceAlyssa Rossand I think it's probably better to just match what we asked binutils to build12:08:47
@qyliss:fairydust.spaceAlyssa RossRemove "target" from configurePlatforms and pass it explicitly.12:09:37
@luckytethys:matrix.orgTethys Svensson Hmm, the derivation also uses a lot of other information from targetPlatform, like isAvr and isWindows. Should I try to create an object that matches the targetPlatform format? Isn't that almost as bad as my original approach? 12:15:43
@qyliss:fairydust.spaceAlyssa RossHmm, looking12:18:01
@qyliss:fairydust.spaceAlyssa RossIt might be that some of this can be cleaned up12:18:24
@qyliss:fairydust.spaceAlyssa RossGenerally we don't like conditionally applied patches like this12:20:38
@qyliss:fairydust.spaceAlyssa RossThe iOS one looks like it just tells binutils to build for ios triples exactly the same as Darwin ones, so we could probably get rid of that by just passing a Darwin triple instead of an iOS one12:21:18
@qyliss:fairydust.spaceAlyssa RossThe Windows one could just be applied unconditionally I'm pretty sure12:21:51
@qyliss:fairydust.spaceAlyssa RossAs could the iOS one actually if we want to keep it12:22:02
@qyliss:fairydust.spaceAlyssa Ross(The reason conditionally applied patches are bad, aside from bringing up this sort of situation, is that nobody will check they still work when updating binutils)12:22:26
@qyliss:fairydust.spaceAlyssa RossThe Darwin one says "Remove the conditional with the next update"12:23:02
@luckytethys:matrix.orgTethys Svensson

As far as I can tell, these are the things targetPlatform is used in that derivation:

  • Comparing with hostPlatform to e.g. set a targetPrefix or set the stripDebugList
  • For an assertion regarding if enableGold is set for a targetPlatform where it doesn't make sense
  • For pulling the src from a different place for vc4-none
  • For a lot of conditional patches
  • To do some symlinks in postInstall
  • Implicitly used because of the configurePlatforms
12:24:42
@qyliss:fairydust.spaceAlyssa RossYeah12:25:01
@qyliss:fairydust.spaceAlyssa RossLots of those checks are actually just checking whether it's a cross compile12:25:19
@qyliss:fairydust.spaceAlyssa RossWhich will always be true for these new packages12:25:25
@qyliss:fairydust.spaceAlyssa RossAVR patch should also be unconditionally appliable12:27:03
@qyliss:fairydust.spaceAlyssa RossThe optional dependencies for specific platforms look highly sus12:27:36
@qyliss:fairydust.spaceAlyssa RossIt looks like autoreconfHook was added at the same time as the patch for iOS, but the patch doesn't look like it should need an autoreconf?12:29:16

Show newer messages


Back to Room ListRoom Version: 6