Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Haskell.nix: error: The Nixpkgs package set does not contain the package: m (system dependency). #135

Closed
o1lo01ol1o opened this issue Apr 26, 2021 · 8 comments

Comments

@o1lo01ol1o
Copy link

Hi, started a project with this as a dependency using haskell.nix, but something in hgeometry is trying to pull in a dependency called "m" that my system is unable to find. Do you have any idea what this might be?

@lemmih
Copy link
Collaborator

lemmih commented Apr 27, 2021

libm, maybe? You might be better off asking in nix discord or nix IRC.

@o1lo01ol1o
Copy link
Author

@lemmih Do you know which hgeometry component depends on libm? Should the corrresponding cabal file not contain something like the following?

if os(windows)
      extra-libraries:
        libm
    else
      if os(darwin)
        extra-libraries:
          libm
      else
        pkgconfig-depends:
          libm

@lemmih
Copy link
Collaborator

lemmih commented Apr 27, 2021

All Haskell code compiled with GHC uses libm. This is not an hgeometry issue; It's a nix issue. I suggest you ask in the nix discord or IRC servers.

@lemmih lemmih closed this as completed Apr 27, 2021
@o1lo01ol1o
Copy link
Author

@lemmih I was directed to here by the haskell.nix IRC channel when I was trying to determine if the above referenced error was a referring to something in the haskell.nix infrastructure.

The error is an issue with hgeometry and haskell.nix; other dependencies compile.

@lemmih
Copy link
Collaborator

lemmih commented Apr 27, 2021

Well, I can promise you it's not an hgeometry issue. But feel free to post the solution here when you find it.

@ramirez7
Copy link

ramirez7 commented May 29, 2021

@o1lo01ol1o I ran into this issue too and fixed it.

I just added m to my package set with this overlay:

self: super:

{
  m = self.stdenv.mkDerivation {
    name = "m";
    unpackPhase = "true";
    installPhase = "mkdir -p $out";
  };
}

I made an issue with haskell.nix here.

@ramirez7
Copy link

ramirez7 commented Sep 28, 2021

@o1lo01ol1o When x-compiling to Windows (mingwW64), remote-iserv failed due to issues opening files/creating directories with libm. I was able to get hgeometry x-compiling by tweaking my overlay to create lib and bin dirs:

self: super:

{
  m = self.stdenv.mkDerivation {
    name = "m";
    unpackPhase = "true";
    # We have to create lib and bin to make it "look like"
    # a library
    installPhase = ''
    mkdir -p $out/lib
    mkdir -p $out/bin
    '';
  };
}

@ramirez7
Copy link

ramirez7 commented Jun 3, 2022

FYI @o1lo01ol1o @peterbecich input-output-hk/haskell.nix#1453 fixes this issue upstream. I confirmed on haskell.nix HEAD with ghc923 that hgeometry now works 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants