EDIT: To frame my question differently, I would like to learn how to inherit a nix package that is not a top-level package, i. e. resides in haskellPackages
or pythonPackages
scope in the example listed in the OP.
Could this (answer to “Nix-shell build failure”) same (the part where it says inherit (arm) ...
) be done when cross-building a haskell package, say hledger ?
NIX_PATH=nixpkgs=http://nixos.org/channels/nixpkgs-unstable/nixexprs.tar.xz nix-build --no-out-link -E 'let pkgsArm = import <nixpkgs> { config = {}; overlays = []; system = "aarch64-linux"; }; pkgsCross = import <nixpkgs> { overlays = [(self: super: { inherit (pkgsArm) hledger; })]; crossSystem = { config = "aarch64-unknown-linux-gnu"; }; }; in pkgsCross.hledger' --argstr system aarch64-linux --option sandbox false --builders 'ssh://nixos-shell aarch64-linux' -j0
When I’m trying
NIX_PATH=nixpkgs=http://nixos.org/channels/nixpkgs-unstable/nixexprs.tar.xz nix-build --no-out-link -E 'let pkgsArm = import <nixpkgs> { config = {}; overlays = []; system = "aarch64-linux"; }; pkgsCross = import <nixpkgs> { overlays = [(self: super: { inherit (pkgsArm) neuron; })]; crossSystem = { config = "aarch64-unknown-linux-gnu"; }; }; in pkgsCross.neuron' --argstr system aarch64-linux --option sandbox false --builders 'ssh://nixos-shell aarch64-linux' -j0
it is not the neuron package from haskellPackages
but a different one.
How would I select from scope in the part where it says inherit (pkgsArm) neuron;
?
inherit (pkgsArm) haskellPackages.neuron;
doesn’t seem to be valid syntax.