Repository navigation
Closed
Labels
6.topic: muslRunning or building packages with musl libc
Description
A follow-up for #43369.
I'm trying something like the following:
overlay.nix:
final:
previous:
with final.haskell.lib;
{
haskellPackages = previous.haskellPackages.override (old: {
overrides = final.lib.composeExtensions (old.overrides or (_: _: {})) (self: super: {
pretty-relative-time = self.callCabal2nix "pretty-relative-time" (final.fetchFromGitHub { ... }) {};
});
});
}
(see #26561 (comment) for the interaction of nixpkgs overlays and haskellPackages.override)
by changing the first line to have nixpkgs ? (import <nixpkgs> { overlays = [ (import ./overlay.nix) ]; }).pkgsMusl.
Then I get:
% NIX_PATH=nixpkgs=https://github.com/NixOS/nixpkgs/archive/2c07921cff84dfb0b9e0f6c2d10ee2bfee6a85ac.tar.gz nix-build --no-link survey/default.nix -A haskellPackages.pretty-relative-time
error: cannot coerce null to a string, at /nix/store/w1fndb8swaamrf7amgjjvxfp12nifl2d-2c07921cff84dfb0b9e0f6c2d10ee2bfee6a85ac.tar.gz/pkgs/development/haskell-modules/make-package-set.nix:131:71
That error is in
| LOCALE_ARCHIVE = pkgs.lib.optionalString buildPlatform.isLinux "${buildPackages.glibcLocales}/lib/locale/locale-archive"; |
Full trace:
% NIX_PATH=nixpkgs=https://github.com/NixOS/nixpkgs/archive/2c07921cff84dfb0b9e0f6c2d10ee2bfee6a85ac.tar.gz nix-build --no-link survey/default.nix -A haskellPackages.pretty-relative-time --show-trace
error: while evaluating 'callCabal2nix' at /nix/store/w1fndb8swaamrf7amgjjvxfp12nifl2d-2c07921cff84dfb0b9e0f6c2d10ee2bfee6a85ac.tar.gz/pkgs/development/haskell-modules/make-package-set.nix:173:32, called from /home/niklas/src/haskell/intray/overlay.nix:39:38:
while evaluating 'overrideCabal' at /nix/store/w1fndb8swaamrf7amgjjvxfp12nifl2d-2c07921cff84dfb0b9e0f6c2d10ee2bfee6a85ac.tar.gz/pkgs/development/haskell-modules/lib.nix:37:24, called from /nix/store/w1fndb8swaamrf7amgjjvxfp12nifl2d-2c07921cff84dfb0b9e0f6c2d10ee2bfee6a85ac.tar.gz/pkgs/development/haskell-modules/make-package-set.nix:183:8:
while evaluating 'callPackageKeepDeriver' at /nix/store/w1fndb8swaamrf7amgjjvxfp12nifl2d-2c07921cff84dfb0b9e0f6c2d10ee2bfee6a85ac.tar.gz/pkgs/development/haskell-modules/make-package-set.nix:156:33, called from /nix/store/w1fndb8swaamrf7amgjjvxfp12nifl2d-2c07921cff84dfb0b9e0f6c2d10ee2bfee6a85ac.tar.gz/pkgs/development/haskell-modules/make-package-set.nix:183:23:
while evaluating 'overrideCabal' at /nix/store/w1fndb8swaamrf7amgjjvxfp12nifl2d-2c07921cff84dfb0b9e0f6c2d10ee2bfee6a85ac.tar.gz/pkgs/development/haskell-modules/lib.nix:37:24, called from /nix/store/w1fndb8swaamrf7amgjjvxfp12nifl2d-2c07921cff84dfb0b9e0f6c2d10ee2bfee6a85ac.tar.gz/pkgs/development/haskell-modules/make-package-set.nix:157:5:
while evaluating 'callPackage' at /nix/store/w1fndb8swaamrf7amgjjvxfp12nifl2d-2c07921cff84dfb0b9e0f6c2d10ee2bfee6a85ac.tar.gz/pkgs/development/haskell-modules/make-package-set.nix:115:22, called from /nix/store/w1fndb8swaamrf7amgjjvxfp12nifl2d-2c07921cff84dfb0b9e0f6c2d10ee2bfee6a85ac.tar.gz/pkgs/development/haskell-modules/make-package-set.nix:157:20:
while evaluating 'callPackageWithScope' at /nix/store/w1fndb8swaamrf7amgjjvxfp12nifl2d-2c07921cff84dfb0b9e0f6c2d10ee2bfee6a85ac.tar.gz/pkgs/development/haskell-modules/make-package-set.nix:75:37, called from /nix/store/w1fndb8swaamrf7amgjjvxfp12nifl2d-2c07921cff84dfb0b9e0f6c2d10ee2bfee6a85ac.tar.gz/pkgs/development/haskell-modules/make-package-set.nix:115:28:
while evaluating 'makeOverridable' at /nix/store/w1fndb8swaamrf7amgjjvxfp12nifl2d-2c07921cff84dfb0b9e0f6c2d10ee2bfee6a85ac.tar.gz/lib/customisation.nix:72:24, called from /nix/store/w1fndb8swaamrf7amgjjvxfp12nifl2d-2c07921cff84dfb0b9e0f6c2d10ee2bfee6a85ac.tar.gz/pkgs/development/haskell-modules/make-package-set.nix:98:8:
while evaluating 'drvScope' at /nix/store/w1fndb8swaamrf7amgjjvxfp12nifl2d-2c07921cff84dfb0b9e0f6c2d10ee2bfee6a85ac.tar.gz/pkgs/development/haskell-modules/make-package-set.nix:88:18, called from /nix/store/w1fndb8swaamrf7amgjjvxfp12nifl2d-2c07921cff84dfb0b9e0f6c2d10ee2bfee6a85ac.tar.gz/lib/customisation.nix:74:12:
while evaluating the attribute 'LOCALE_ARCHIVE' of the derivation 'cabal2nix-pretty-relative-time' at /nix/store/w1fndb8swaamrf7amgjjvxfp12nifl2d-2c07921cff84dfb0b9e0f6c2d10ee2bfee6a85ac.tar.gz/pkgs/stdenv/generic/make-derivation.nix:175:11:
while evaluating 'optionalString' at /nix/store/w1fndb8swaamrf7amgjjvxfp12nifl2d-2c07921cff84dfb0b9e0f6c2d10ee2bfee6a85ac.tar.gz/lib/strings.nix:138:26, called from /nix/store/w1fndb8swaamrf7amgjjvxfp12nifl2d-2c07921cff84dfb0b9e0f6c2d10ee2bfee6a85ac.tar.gz/pkgs/development/haskell-modules/make-package-set.nix:131:24:
cannot coerce null to a string, at /nix/store/w1fndb8swaamrf7amgjjvxfp12nifl2d-2c07921cff84dfb0b9e0f6c2d10ee2bfee6a85ac.tar.gz/pkgs/development/haskell-modules/make-package-set.nix:131:71
From IRC:
elvishjerricco> nh2: Yea the problem is that callCabal2nix relies on the glibcLocales thing. Not sure if it should... But if the pkgsMusl stuff doesn't provide that derivation, that would break callCabal2nix
@dtzWill Do you know what we could do about this glibcLocales?
Metadata
Metadata
Assignees
Labels
6.topic: muslRunning or building packages with musl libc
Activity
haskell-modules: only include glibc locales when using glibc
nh2 commentedon Jul 17, 2018
From IRC:
So I suspect that this is very related to some other thing I'm working on in GHC & co: That many Haskell build tools break when you don't force the encoding: commercialhaskell/stack#3988
haskell-modules: only include glibc locales when using glibc