jtojnar_ has quit [Remote host closed the connection]
sir_guy_carleton has quit [Quit: WeeChat 2.0]
jtojnar has joined #nixos-chat
__monty__ has joined #nixos-chat
__Sander__ has joined #nixos-chat
__Sander__ has quit [Ping timeout: 244 seconds]
__Sander__ has joined #nixos-chat
<ekleog>
hmm… how would you go to get a gdb with a custom targetPlatform? before there was a targetPlatform accepted by the gdb derivation, but with the recent changes to cross-building I'm a bit lost
__Sander__ has quit [Ping timeout: 252 seconds]
Guanin_ has joined #nixos-chat
__Sander__ has joined #nixos-chat
__Sander__ has quit [Ping timeout: 240 seconds]
__Sander__ has joined #nixos-chat
<ekleog>
so, noone knows how to override the targetPlatform for a single package? :/
<srhb>
ekleog: I would expect that you feed it a stdenv with an overridden targetPlatform, but isn't using targetPlatform almost always subtly wrong?
<ekleog>
srhb: well, I'm looking for a gdb that works for debugging a remote risc-v processor, so… :) (basically like gcc-arm-embedded, except gcc-arm-embedded is a separate codebase, and I'm currently hoping gdb master codebase actually has risc-v support)
<ekleog>
hmm, sounds like this fails too :'( but with a better error message than before :)
<ekleog>
… ok, it's just that the attribute set for risc-v doesn't have an option required for gdb
<ekleog>
srhb: oh with my brain actually turned on it looks like it's at least compiling gdb, thanks! for the record, using this: nix-build -I nixpkgs=channel:nixos-unstable -p 'gdb.override { stdenv = (import <nixpkgs> {}).stdenv.override { targetPlatform = (import <nixpkgs> {}).lib.systems.examples.riscv32; }; }'
<srhb>
ekleog: Great. :)
ekleog has quit [Quit: back soon]
<srhb>
That's a lot of nixpkgs... :D
<sphalerite>
hm I don't think any of the extra ones are necessary
<srhb>
Nope.
<sphalerite>
,tell ekleog you don't need to do all the reimporting: nix-shell -I nixpkgs=channel:nixos-unstable -p 'gdb.override {stdenv = stdenv.override { targetPlatform = lib.systems.examples.riscv32; };}'
<{^_^}>
sphalerite: I'll pass that on to ekleog
ekleog has joined #nixos-chat
<sphalerite>
oh back alraedy lol
<sphalerite>
ekleog: {^_^} has a message for you
__Sander__ has quit [Ping timeout: 272 seconds]
<ekleog>
yeah, just upgrading my bouncer :°
<{^_^}>
ekleog: 1 minute, 21 seconds ago <sphalerite> you don't need to do all the reimporting: nix-shell -I nixpkgs=channel:nixos-unstable -p 'gdb.override {stdenv = stdenv.override { targetPlatform = lib.systems.examples.riscv32; };}'
<ekleog>
oh, that's nice :) didn't notice that it actually took all of nixpkgs into scope, guess it's a with (import <nixpkgs> {})
<ekleog>
sphalerite: thanks!
<sphalerite>
ye[
<sphalerite>
yep*
<ekleog>
(well, I've got a bad news for riscv-gdb: it segfaults when being started -- and the build of it actually fails with `error: build of '/nix/store/4mdxg2fsvfl8qb2prcgy3zp9b112zpnm-shell.drv' failed`, although it did produce a `riscv32-unknown-linux-gnu-gdb` binary into another store output)