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

Getting "anonymous function called without required argument 'CoreServices'" when following nix installation instructions. #162

Open
fghibellini opened this issue Mar 28, 2019 · 6 comments

Comments

@fghibellini
Copy link

when I run nix-build in the project root I get:

error: anonymous function at /Users/<user>/code/stack2nix/stack2nix.nix:15630:10 called without required argument 'CoreServices', at /nix/store/ydnxlkpdy47jffbb9sim11hb43xjrnhr-872502aa56bd4d574fcfe9cfef9066c9e8ee2894.tar.gz-unpacked/pkgs/development/haskell-modules/make-package-set.nix:87:27
(use '--show-trace' to show detailed location information)

System:

macOS High Sierra

> nix-build --version
nix-build (Nix) 2.1.3
@chrissound
Copy link

Seem to run into a similar issue:

1417:10 called without required argument 'Win32', at /nix/store/64ifnp2lmldnvc1wvxyav8r5lh55nzgk-nixos-18.09.2474.222950952f1/nixos/pkgs/development/haskell-modules/make-package-set.nix:87:27

Where the relevant line refers to:

"Win32-notify" = callPackage
  ({ mkDerivation, base, containers, directory, stdenv, Win32 }:
   mkDerivation {
     pname = "Win32-notify";
     version = "0.3.0.3";
     sha256 = "0c21dbe06cb1ce3b3e5f1aace0b7ee359b36e7cb057f8fe2c28c943150044116";
     isLibrary = true;
     isExecutable = true;
     libraryHaskellDepends = [ base containers directory Win32 ];
     doHaddock = false;
     doCheck = false;
     description = "A binding to part of the Win32 library for file notification";
     license = stdenv.lib.licenses.bsd3;
   }) {};

@domenkozar
Copy link
Contributor

These are all overrides that need to be specified manually. Should add a doc section how it's done.

@chrissound
Copy link

I think it is going to be similar to what is described here: https://nixos.org/nixpkgs/manual/#how-to-create-nix-builds-for-your-own-private-haskell-packages (which is how cabal2nix is used)?

@shmish111
Copy link

I've seen the following which looks like a stack2nix bug to me?

      "hfsevents" = callPackage
        ({ mkDerivation, base, bytestring, cereal, Cocoa, CoreServices, mtl
         , stdenv, text, unix
         }:
         mkDerivation {
           pname = "hfsevents";
           version = "0.1.6";
           sha256 = "74c3f3f3a5e55fff320c352a2d481069ff915860a0ab970864c6a0e6b65d3f05";
           libraryHaskellDepends = [ base bytestring cereal mtl text unix ];
           librarySystemDepends = [ Cocoa ];
           libraryToolDepends = [ CoreServices ];
           doHaddock = false;
           doCheck = false;
           homepage = "http://github.com/luite/hfsevents";
           description = "File/folder watching for OS X";
           license = stdenv.lib.licenses.bsd3;
           platforms = [ "x86_64-darwin" ];
         }) {inherit (pkgs.darwin.apple_sdk.frameworks) Cocoa;};

If I add CoreServices to the last line inherit (pkgs.darwin.apple_sdk.frameworks) Cocoa CoreServices; it builds correctly, it seems that stack2nix is ignoring the requirement of libraryToolDepends?

@mavenraven
Copy link

+1, doesn't build on OS X :/.

@nuttycom
Copy link

+1 @shmish111's fix works for me.

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

6 participants