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

fix accelerate, updating to git versions #27617

Closed
wants to merge 1 commit into from

Conversation

NickHu
Copy link
Contributor

@NickHu NickHu commented Jul 24, 2017

This pull request depends on #27615.

haskellPackages.accelerate and its related packages are broken - somehow we've
ended up with a split with accelerate (0.15.x) and accelerate_1_0_0_0. I don't really see
any reason to keep the old one around, but it's there at the moment.

These changes add functionality to pull the latest git versions of the
accelerate packages, which seems unfortunately necessary because the current
versions on hackage don't build against what we have packaged in NixOS.

Another change made is the addition of callCabal2nixWithOpts, which takes
a set of options --- currently, the only one is to pass the --subpath flag to
cabal2nix (the main accelerate repo contains multiple cabal packages each in
a different directory).

I also had to update cuda, and also reapply the same patches in
configuration-nix --- this is ugly, I'm sure there's a better way, but I don't
know it.

Open to suggestions, but this is what I concluded as the 'path of least effort'
to getting accelerate working again.

Packages that are broken without this pr are things like accelerate-examples, accelerate-io etc.

Please check what applies. Note that these are not hard requirements but mereley serve as information for reviewers.

  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@domenkozar
Copy link
Member

I'd suggest to upload new (renamed?) packages to hackage since we have this all automated. Pinning down versions in Nix itself is manual and requires too much work (that's what we want to avoid with automation).

Best to make a separate PR for cabal2nix changes, I think those can be merged.

@NickHu
Copy link
Contributor Author

NickHu commented Aug 7, 2017

I think the real solution is to get upstream to update the Hackage modules and see if that somehow manages to fix everything. But I think the llvm-hs fix should be applied.

@NickHu
Copy link
Contributor Author

NickHu commented Aug 7, 2017

cc @tmcdonell

@tmcdonell
Copy link
Contributor

I guess this is because the versions of accelerate-llvm* don't build against llvm-hs >= 4.0. I was planning to make a new release of accelerate and friends soon to address this (just a couple bugs remaining). Note that git HEAD currently constitutes a major version bump, so if this goes ahead I'd suggest versioning this as 1.1.0.0-rc1 or similar, if you can.

I expect you'll need to also update accelerate-examples if you are pulling the git versions, but accelerate-io-1.0.0.0 is probably okay.

What is the issue with the cuda package? Can this be fixed there, or is this just something specific to nix configuration?

@NickHu
Copy link
Contributor Author

NickHu commented Aug 8, 2017

There's a nix specific hack for cuda which is a duplicate of this which is already in master (#27615). I needed to update cuda here solely because these newer package versions also required newer cuda too - should be unnecessary after everything gets bumped.

The other issues should ameliorate after a Hackage release too, as Hackage packages are automatically packaged to nix.

@c0bw3b
Copy link
Contributor

c0bw3b commented Oct 21, 2018

@NickHu I'm closing this old PR since accelerate v1.2.0.0 is part of by now

@c0bw3b c0bw3b closed this Oct 21, 2018
@NickHu NickHu deleted the accelerate branch October 23, 2018 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants