Artturin (talk | contribs)
NS-3: Reply
Artturin (talk | contribs)
Tags: Reply Mobile edit Mobile web edit
 
(3 intermediate revisions by 2 users not shown)
Line 12: Line 12:
:Dunno about sqlite, maybe you need to include it in your own build, if you just have the package in your systemPackages it won't have the dev output and so no libraries
:Dunno about sqlite, maybe you need to include it in your own build, if you just have the package in your systemPackages it won't have the dev output and so no libraries
:the package itself finds sqlite https://hydra.nixos.org/build/279506411/nixlog/2 [[User:Artturin|Artturin]] ([[User talk:Artturin|talk]]) 17:42, 21 November 2024 (UTC)
:the package itself finds sqlite https://hydra.nixos.org/build/279506411/nixlog/2 [[User:Artturin|Artturin]] ([[User talk:Artturin|talk]]) 17:42, 21 November 2024 (UTC)
== Why is callPackage used? ==
https://wiki.nixos.org/w/index.php?title=Rust&diff=prev&oldid=18191 [[User:Axka|Axka]] ([[User talk:Axka|talk]]) 23:39, 2 April 2025 (UTC)
:Using packages directly from `pkgs` will not work properly with cross-compilation, instead the packages should be gotten from `pkgs.__splicedPackages` (packages will have `__spliced` attr) which allows stdenv to pick the correct offset dependency for the dependency attributes. `callPackage` gets packages from `__splicedPackages` [[User:Artturin|Artturin]] ([[User talk:Artturin|talk]]) 23:44, 2 April 2025 (UTC)
::I always thought it was weird that packages were supposed to have <code>__spliced</code> attrs, but I never found them. Could you add what you said on the wiki page? [[User:Axka|Axka]] ([[User talk:Axka|talk]]) 00:11, 3 April 2025 (UTC)
:::Cross internals don't need to be explained on the page, `callPackage` should always be used.
:::If you want to see `__spliced` then take a look at `pkgsCross.aarch64-multiplatform.__splicedPackages.bash.__spliced`. They're only added when cross-compiling. Also take a look at the `make-derivation.nix` file in nixpkgs to see how `__spliced` are used. `splice.nix` for how splicing works [[User:Artturin|Artturin]] ([[User talk:Artturin|talk]]) 00:24, 3 April 2025 (UTC)