| 16 May 2024 |
vringar | * Yes, because packages.default works (has the modified launch.properties) but the devShell (which links in the extensions) references the unmodified package (through the binary wrapper) | 19:48:10 |
vringar | This is the definition of withExtensions and it gets added to the ghidra package here. However, the dependency injected via callPackage refers to the original ghidra instead of my ghidraWithName and I'm trying to figure out how to change that | 19:50:29 |
vringar | * This is the definition of withExtensions and it gets added to the ghidra package here. However, the dependency injected via callPackage refers to the original ghidra instead of my ghidraWithName even when invoked as ghidhraWithName and I'm trying to figure out how to change that | 19:51:06 |
@jade_:matrix.org | omg that's goofy | 19:51:29 |
vringar | * This is the definition of withExtensions and it gets added to the ghidra package here. However, the dependency injected via callPackage refers to the original ghidra instead of my ghidraWithName even when invoked as ghidhraWithName.withExtensions and I'm trying to figure out how to change that | 19:51:36 |
vringar | 😁 | 19:51:46 |
@jade_:matrix.org | yes ok so this is a nixpkgs bug lol | 19:54:32 |
@jade_:matrix.org | https://github.com/NixOS/nixpkgs/blob/9fd6c7926231cc633a87a50e75f9e235a5ed3f92/pkgs/tools/security/ghidra/build.nix#L203 yeah ok so the problem you're observing here is that callPackage is seeing the things from pkgs. you could .override it to get around the nixpkgs bug, but we should actually fix nixpkgs. | 19:56:01 |
@jade_:matrix.org | the recursion structure is broken | 19:57:08 |
vringar | In reply to @jade_:matrix.org yes ok so this is a nixpkgs bug lol Lol, achievement unlocked I guess :D | 19:57:46 |
@jade_:matrix.org | what you need to have is that the passthru.whatever refers to the mkDerivation surrounding it. i am forgetting how to do this exactly. | 19:57:47 |
@jade_:matrix.org | (because you need to get the right one when you override it, and hmmm) | 19:58:11 |
Qyriad | foo.overrideAttrs (prev: { passthru.attrs = prev; })? | 19:58:52 |
Qyriad | Or is that not what you mean | 19:59:00 |
@jade_:matrix.org | i want it to give you the right thing when you overrideAttrs the parent | 20:00:36 |
Qyriad | ahh hm | 20:00:48 |
@jade_:matrix.org | https://github.com/nixos/nixpkgs/blob/3dfd61965e2905859e2a28f65fc257633e10f029/lib/customisation.nix#L346-L361 | 20:01:30 |
@jade_:matrix.org | hm | 20:01:38 |
@jade_:matrix.org | https://github.com/nixos/nixpkgs/blob/c642665a0473fd44360fd603f067e94931affa2e/pkgs/stdenv/generic/make-derivation.nix#L69-L89 | 20:02:09 |
@jade_:matrix.org | oh there | 20:02:17 |
@jade_:matrix.org | finalAttrs pattern, maybe, but we need to get the final instantiated derivation and that's not obvious | 20:04:13 |
@jade_:matrix.org | HOLD ON | 20:05:04 |
Qyriad | that's finalAttrs.finalPackage isn't it? | 20:05:03 |
@jade_:matrix.org | WHAT | 20:05:06 |
@jade_:matrix.org | finalPackage??? | 20:05:08 |
Qyriad | yep | 20:05:14 |
@jade_:matrix.org | did anyone document this?! | 20:05:14 |
@jade_:matrix.org | (jade has never seen this before) | 20:05:23 |
Qyriad | jade has (understandable) forgotten, because this came up with the doCheck bullshit: https://github.com/NixOS/nixpkgs/issues/294890 | 20:05:50 |
@jade_:matrix.org | https://nixos.org/manual/nixpkgs/stable/#mkderivation-recursive-attributes stunningly, yes | 20:05:58 |