6 Sep 2024 |
K900 | (we as in Qt maintainers) | 13:55:18 |
| vramp joined the room. | 17:50:17 |
vramp | I am struggling with using the cross compilation nixpkgs in a nix shell for development. When I use the package for my architecture (x86 64 linux), my build tool (zig) sees the system libraries and headers. When I switch my shell to use the cross compiliation packages (aarch64 multiplatform), I have to explicitly find the store paths in my NIX_LDFLAGS and NIX_CFLAGS_COMPILE and add them, but then I can cross compile fine. Is there maybe some Arch-dependent path/env var convention of GCC that zig lacks? Is there an example of how to get the lib and header store paths in my shell.nix (like, to set them to environment variables) so that I can pass them to my build tool? | 18:07:15 |
K900 | Our GCC is wrapped specifically to find things correctly | 18:07:41 |
K900 | Your presumably-external zig probably isn't | 18:07:53 |
vramp | ah, i am using an external zig binary at the moment, i can try with a zig from nixpkgs to see if there is some magic that someone has added to that recipe | 18:10:04 |
Curid | is there some ultra-pure option that masks system libs? | 18:41:16 |
K900 | What system libs? | 18:43:07 |
Curid | Everything in /usr/ that isn't provided by the shell | 18:59:23 |
Curid | * Everything in /usr/ that isn't provided by the nix-shell | 18:59:33 |
K900 | Oh, on non-NixOS? No, not really | 19:00:16 |
Curid | Maybe it'd enter a chroot and only symlink the nix-shell files | 19:00:26 |
K900 | But you could do --ignore-environment to at least remove things from PATH | 19:00:27 |
Artturin | nix in fakechroot maybe 🤔 | 19:41:47 |
Artturin | There's a way to enter the build sandbox but I can't remember what the program is | 19:45:52 |
Artturin | Oh and bubblewrap could work too | 19:51:29 |
Artturin | https://www.joachim-breitner.de/blog/812-Convenient_sandboxed_development_environment | 19:52:07 |
Artturin | Ah here | 20:04:53 |
Artturin | https://github.com/Mic92/cntr | 20:04:54 |
Artturin | https://github.com/NixOS/nixpkgs/blob/master/doc/hooks/breakpoint.section.md | 20:11:00 |
Artturin | diff --git a/pkgs/by-name/he/hello/package.nix b/pkgs/by-name/he/hello/package.nix
index 487bc033a23f..dc210011e62b 100644
--- a/pkgs/by-name/he/hello/package.nix
+++ b/pkgs/by-name/he/hello/package.nix
@@ -6,6 +6,7 @@
, testers
, versionCheckHook
, hello
+, breakpointHook
}:
stdenv.mkDerivation (finalAttrs: {
@@ -19,11 +20,17 @@ stdenv.mkDerivation (finalAttrs: {
doCheck = true;
+ nativeBuildInputs = [ breakpointHook ];
doInstallCheck = true;
nativeInstallCheckInputs = [
versionCheckHook
];
+ postFixup = ''
+ exit 1
+
+ '';
+
# Give hello some install checks for testing purpose.
postInstallCheck = ''
stat "''${!outputBin}/bin/${finalAttrs.meta.mainProgram}"
$ sudo cntr attach -t command cntr-/nix/store/h5x8skq6zgc3iibvkyaz8cq18p6n8hln-hello-2.12.1
[sudo] password for artturin:
artturinlinux% ls
bin build dev etc nix proc tmp var
| 20:13:28 |
Artturin | Meh ls / shows stuff outside the build so can't be used to mask system files, bwrap is probably the best way | 20:27:39 |
Artturin | Hmm well it does have cntr exec
artturinlinux% /nix/store/xfr7105hv2c15j3nbixjl96cp52174z0-cntr-1.5.3/bin/cntr exec ls /
bin build dev etc nix proc tmp var
| 20:33:18 |
Kamilla 'ova | Download image.png | 23:26:06 |
Kamilla 'ova | qtdeclarative> Qt6ShaderTools_DIR was computed by CMake or specified on the command line
qtdeclarative> by the user:
just... lol
| 23:26:18 |
Kamilla 'ova | qtdeclarative now started compiling correctly, 3000+ files vs 700 files
(Qt6ShaderToolsTools_DIR -> Qt6ShaderTools_DIR) | 23:30:07 |
Kamilla 'ova | * qtdeclarative now started compiling correctly, 3000+ files vs 700 files
(Qt6ShaderToolsTools_DIR -> Qt6ShaderTools_DIR)
UPD: nvm, this is a pkgsBuildBuild's one | 23:31:59 |
7 Sep 2024 |
Kamilla 'ova | Download image.png | 01:11:50 |
Kamilla 'ova | FINALLY | 01:11:51 |
Kamilla 'ova | how is this even possible?
"I know where Qt6Quick is, but I want to find it in qtbase" ???
https://yaso.su/0nVd8JoL | 02:01:27 |