Giter Site home page Giter Site logo

Comments (12)

nh2 avatar nh2 commented on August 17, 2024

(I'm on commit 4ab9cb9cf274e88eababfaba85103e3890a96afc of tensorflow/haskell.)

from haskell.

fkm3 avatar fkm3 commented on August 17, 2024

@grwlf, do you know the answer?

from haskell.

nh2 avatar nh2 commented on August 17, 2024

It looks like you're using something somewhere on nixpkgs master; I recommend for reproducibility that you provide a git commit of nixpkgs master, then one can invoke nix-shell specifically with that commit for total reproducibility.

from haskell.

nh2 avatar nh2 commented on August 17, 2024

I managed to build it with

env NIX_PATH=nixpkgs=https://github.com/NixOS/nixpkgs/archive/7d36ae33df.tar.gz nix-shell tools/userchroot.nix --pure
stack --stack-root $PWD/stack-root build --system-ghc

3 changes here to what's in the README:

  • Gave explicit nixpkgs version (that one is one recent one from nixpkgs unstable, the 17.03 version didn't work)
  • --stack-root to have it not use my user's ~/.stack that may contain things I built before for other projects that don't work inside the nix environment, with errors like /host/raid/stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_1.24.2.0_ghc-8.0.2: error while loading shared libraries: libgmp.so.10: cannot open shared object file: No such file or directory
  • --pure so that external environment variables can't mess with it being reproducible

from haskell.

blackgnezdo avatar blackgnezdo commented on August 17, 2024

@nh2 please turn this into a PR?

from haskell.

nh2 avatar nh2 commented on August 17, 2024

@grwlf You added Nix support a short while ago, can you confirm if it builds fine with the nixpkgs commit that I use above?

from haskell.

grwlf avatar grwlf commented on August 17, 2024

Hi, Sorry for delay, I'll check the problem soon.

from haskell.

grwlf avatar grwlf commented on August 17, 2024

Yes, the problem was caused by incompatible nixpkgs tree. Thanks for the suggestions, they all make sense. I'll check nixpkgs version you have provided in a couple of days.

from haskell.

nmattia avatar nmattia commented on August 17, 2024

I think the --stack-root issue is better handled with an export STACK_ROOT=$PWD/stack-root shell hook in tools/userchroot. However I believe a simpler solution would be to use stack --nix instead, I've create #168 . stack --nix foo also makes sure that nix- and non-nix-built packages aren't mixed up.

from haskell.

jyp avatar jyp commented on August 17, 2024

Is there a guide to build with nix? (I could build but the test suite fails, see #169)

@nmattia I see that your PR is still not merged after all this time. Is it obsolete?

from haskell.

nmattia avatar nmattia commented on August 17, 2024

It shouldn't be obsolete. I think we're waiting for a review from @grwlf .

from haskell.

fkm3 avatar fkm3 commented on August 17, 2024

The nix code has been updated quiet a bit, hopefully this is fixed now. Re-open if not.

from haskell.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.