sol / tinc

A dependency manager for Haskell
MIT License
97 stars 15 forks source link

Current nixpkg version does not build #67

Closed robinvd closed 6 years ago

robinvd commented 7 years ago

nix-shell -p haskellPackages.tinc errors with

Failures:

  test/Tinc/InstallSpec.hs:143:
  1) Tinc.Install.generateCabalFile, when there are both a package.yaml and additional dependencies, combines them
       expected: ("tinc-generated.cabal","name: tinc-generated\nversion: 0.0.0\nbuild-type: Simple\ncabal-version: >= 1.10\n\nlibrary\n  build-depends:\n      foo\n  default-language: Haskell2010\n\nexecutable tinc-generated\n  main-is: Generated.hs\n  build-depends:\n      bar\n  default-language: Haskell2010\n")
        but got: ("tinc-generated.cabal","name: tinc-generated\nversion: 0.0.0\nbuild-type: Simple\ncabal-version: >= 1.10\n\nlibrary\n  build-depends:\n      foo\n  other-modules:\n      Paths_foo\n  default-language: Haskell2010\n\nexecutable tinc-generated\n  main-is: Generated.hs\n  build-depends:\n      bar\n  default-language: Haskell2010\n")

Randomized with seed 789456246

Finished in 0.2666 seconds
156 examples, 1 failure
Test suite spec: FAIL
Test suite logged to: dist/test/tinc-0.1.0-spec.log
0 of 1 test suites (0 of 1 test cases) passed.
builder for ‘/nix/store/4qp7la7w5bah5yfbsz0fw7s2b5xdw197-tinc-20170228.drv’ failed with exit code 1
error: build of ‘/nix/store/4qp7la7w5bah5yfbsz0fw7s2b5xdw197-tinc-20170228.drv’ failed
/run/current-system/sw/bin/nix-shell: failed to build all dependencies
sol commented 6 years ago

The nix port was used by @robbinch, but he is caught up in work lately.

I guess we need to regenerate tinc.nix. Which I assume was generated with tinc itself. @robbinch how did we do the bootstraping? Can you provide guidance?

sol commented 6 years ago

For the record, bootstrapping works like this:

  1. Get a tinc executable somehow (e.g. build with it cabal or the standard nix way, or download a binary with curl -sSL https://github.com/sol/tinc/raw/master/get-tinc.sh | bash)
  2. Then run TINC_USE_NIX=yes tinc inside this repository, which will regenerate the nix expressions
  3. Use this nix expressions to install tinc the nix way

I'm currently doing this and will push the updated expressions if everything works fine.

sol commented 6 years ago

@seanparsons FYI.

sol commented 6 years ago

@robinvd I think tinc is not in nixpkg anymore, which I think is the right thing for the time being.

If you want to install tinc with nix-env then run the following from within this git repository:

nix-env -i -f default.nix