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

Missing dependencies when run nix-shell with ghcjs compiler #23915

Closed
Rizary opened this issue Mar 15, 2017 · 0 comments
Closed

Missing dependencies when run nix-shell with ghcjs compiler #23915

Rizary opened this issue Mar 15, 2017 · 0 comments

Comments

@Rizary
Copy link
Contributor

Rizary commented Mar 15, 2017

Issue description

need some enlightenment here... I try to play around with ghcjs, so i create some file (following the gabriel's format here ), with release.nix:

Steps to reproduce

let
  config = rec {
    allowUnfree = true;
    allowBroken = true;
    packageOverrides = pkgs: with pkgs.haskell.lib; rec {
      haskell.packages.ghcjs = pkgs.haskell.packages.ghcjs.override {
        overrides = self: super: rec {
          frontend =
        buildStrictly (self.callPackage ./default.nix {});
      };

      };
    };

    permittedInsecurePackages = [ "webkitgtk-2.4.11" ];
  };
in
  let
    pkgs = import <nixpkgs> { inherit config; };
    frontend = pkgs.haskell.packages.ghcjs.frontend;
  in
    { inherit frontend; }

then i create the shell.nix and when I run nix-shell, i got the following error:

building path(s) ‘/nix/store/m17i0n6qxcqm9jklr23b6gxwpw409imh-tasty-ant-xml-1.0.4’
setupCompilerEnvironmentPhase
Build with /nix/store/ik664w3cxq2jzr5kby0gwmcm0k96xgmg-ghc-7.10.3.
unpacking sources
unpacking source archive /nix/store/4l15pwzcsnx110fsaiqgy720agcgcwbr-tasty-ant-xml-1.0.4.tar.gz
source root is tasty-ant-xml-1.0.4
setting SOURCE_DATE_EPOCH to timestamp 1482427106 of file tasty-ant-xml-1.0.4/tasty-ant-xml.cabal
patching sources
compileBuildDriverPhase
setupCompileFlags: -package-db=/private/var/folders/s_/95c8yrm94h1chy1jmg31y18w0000gn/T/nix-build-tasty-ant-xml-1.0.4.drv-0/package.conf.d -j8 -threaded
[1 of 1] Compiling Main             ( Setup.hs, /private/var/folders/s_/95c8yrm94h1chy1jmg31y18w0000gn/T/nix-build-tasty-ant-xml-1.0.4.drv-0/Main.o )
Linking Setup ...
configuring
configureFlags: --verbose --prefix=/nix/store/m17i0n6qxcqm9jklr23b6gxwpw409imh-tasty-ant-xml-1.0.4 --libdir=$prefix/lib/$compiler --libsubdir=$pkgid --with-gcc=clang --package-db=/private/var/folders/s_/95c8yrm94h1chy1jmg31y18w0000gn/T/nix-build-tasty-ant-xml-1.0.4.drv-0/package.conf.d --ghc-option=-optl=-Wl,-headerpad_max_install_names --disable-split-objs --disable-library-profiling --disable-executable-profiling --enable-shared --disable-coverage --enable-library-vanilla --enable-executable-dynamic --enable-tests
Configuring tasty-ant-xml-1.0.4...
Setup: At least the following dependencies are missing:
directory >=1.2.6.2, filepath >=1.4.1.0
builder for ‘/nix/store/wv8ynf0cpfn8b72y5lqa2bzyn50g9vgy-tasty-ant-xml-1.0.4.drv’ failed with exit code 1

So i add those on my frontend.cabal and add the dependencies, into this :

{ mkDerivation, base, dependent-sum, directory, filepath
, haskell-src-exts, haskell-src-meta, reflex, reflex-dom, stdenv
, template-haskell, these
}:
mkDerivation {
  pname = "frontend";
  version = "0.0.0.1";
  src = ./.;
  isLibrary = false;
  isExecutable = true;
  executableHaskellDepends = [
    base dependent-sum directory filepath haskell-src-exts
    haskell-src-meta reflex reflex-dom template-haskell these
  ];
  license = stdenv.lib.licenses.mpl20;
}

But when I do nix-shell again, it still won't build.

I try to use ghcjs with reflex and reflex-dom (by following their tutorial's code in their github). I know that reflex-platform is best way to go, but i just want to have better understanding on how nix operates.

So, how the best way to fix this??

  • System: (MacOS Sierra)
  • Nix version: (run nix-env --version) : nix-env (Nix) 1.11.6
  • Nixpkgs version: (run nix-instantiate --eval '<nixpkgs>' -A lib.nixpkgsVersion)
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

1 participant