Git Product home page Git Product logo

Comments (12)

sternenseemann avatar sternenseemann commented on July 18, 2024 2

Dito.

What are you replying to, exactly?

As for this thread, the relevant detail from my infinitely long discourse post is that I still plan on fixing this problem in hackage2nix, hopefully soon even :)

from cabal2nix.

sternenseemann avatar sternenseemann commented on July 18, 2024 1

My current idea for a next step is to only mark packages in the default set as broken in the way we are doing currently. As a result no packages in the non-default sets would be marked as broken automatically which hopefully clarifies that they don't get the same level of service in that regard.

from cabal2nix.

cdepillabout avatar cdepillabout commented on July 18, 2024

@dschrempf We have a "main" Haskell package set with a single version of GHC.

This is what the top-level set haskellPackages corresponds to. This is currently 8.10.4. Here's a couple ways you could confirm this with the repl:

$ nix repl /some/path/to/nixpkgs
nix-repl> ghc
«derivation /nix/store/wmwqap28fh3imv8cqbfb9rzpr9203mir-ghc-8.10.4.drv»
nix-repl> haskellPackages.ghc
«derivation /nix/store/wmwqap28fh3imv8cqbfb9rzpr9203mir-ghc-8.10.4.drv»
nix-repl> haskellPackages.lens.passthru.compiler
«derivation /nix/store/wmwqap28fh3imv8cqbfb9rzpr9203mir-ghc-8.10.4.drv»

This compiler is available at a more specific attribute as well:

nix-repl> haskell.compiler.ghc8104
«derivation /nix/store/wmwqap28fh3imv8cqbfb9rzpr9203mir-ghc-8.10.4.drv»

The haskellPackages package set is available at a more specific attribute as well:

nix-repl> haskellPackages.lens    
«derivation /nix/store/379k1a1y7gx131mqf6dzbcd100hka6fj-lens-4.19.2.drv»
nix-repl> haskell.packages.ghc8104.lens
«derivation /nix/store/379k1a1y7gx131mqf6dzbcd100hka6fj-lens-4.19.2.drv»

We also have other compilers and corresponding package sets available (as you're well aware):

nix-repl> haskell.compiler.ghc901      
«derivation /nix/store/vpw154v4d72i3m1n9lkrvcncy3nv9wxh-ghc-9.0.1.drv»
nix-repl> haskell.packages.ghc901.lens
«derivation /nix/store/c4ghvmy03qs0s6xc4p0xiwszjnsly5xn-lens-5.0.1.drv»
nix-repl> haskell.packages.ghc901.lens.passthru.compiler
«derivation /nix/store/vpw154v4d72i3m1n9lkrvcncy3nv9wxh-ghc-9.0.1.drv»

The Haskell infrastructure in Nixpkgs is mostly concerned with the main package set and main compiler. In this package set, we generally track Stackage (sometimes the latest LTS, sometimes the latest Nightly). If you're interested, you can see some of the work we do in PRs like NixOS/nixpkgs#130424.

In Nixpkgs, we only have very little support for Haskell package sets other than the main one. Right now, the main package set is using ghc-8.10.4, so many packages just don't work on the other compilers. We also don't build packages for many other compilers on Hydra, so you often can't get Haskell packages from the cache with other compilers.

In theory, it would be possible for us to get many packages working on all (or at least multiple) packages sets. The main reason we are not doing this is that we just don't have enough man-power. There are four main members of the Haskell team, but mostly have our hands full keeping just the main package set working.

So that means any time you're taking things from the non-main Haskell package set, you're mostly on your own to get things working.

In the Haskell infrastructure in Nixpkgs, we only have a single definition for all the packages we provide:

https://github.com/NixOS/nixpkgs/blob/8a3580c2f60ab204ea35562eaae8313e0fe0ce12/pkgs/development/haskell-modules/hackage-packages.nix

We currently don't have any automatic/semi-automatic way of marking packages broken for different package sets.

We do have separate configuration files for different package sets (for instance, https://github.com/NixOS/nixpkgs/blob/8a3580c2f60ab204ea35562eaae8313e0fe0ce12/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix for ghc-9.0.1), so in theory we could manually mark things as broken. However, like I said above, we don't really have the bandwidth to do this for all packages for all compilers. We also get very few PRs for anything outside of the main package set.

from cabal2nix.

dschrempf avatar dschrempf commented on July 18, 2024

Thank you very much for your detailed explanation. I was not aware of the fact that other package sets than the main one are only minimally supported. Maybe we should add a paragraph about this to the Haskell section of the Nixpkgs manual, I guess this would be https://haskell4nix.readthedocs.io/?

from cabal2nix.

cdepillabout avatar cdepillabout commented on July 18, 2024

Maybe we should add a paragraph about this to the Haskell section of the Nixpkgs manual

Yes, this definitely should go in the manual!

Unfortunately, we're sort of in a weird state with the Haskell documentation for Nixpkgs. It is in the process of being moved from https://haskell4nix.readthedocs.io/ back into nixpkgs: NixOS/nixpkgs#121403

from cabal2nix.

teto avatar teto commented on July 18, 2024

also maybe broken could be self explanatory "broken for ghcXXX" with NixOS/nixpkgs#109407. As a matter of fact, that PR is very relevant for haskell as that's where you are more likely to hit a broken package in nixpkgs.

from cabal2nix.

stale avatar stale commented on July 18, 2024

I marked this as stale due to inactivity. → More info

from cabal2nix.

dschrempf avatar dschrempf commented on July 18, 2024

I think we are still waiting for the new section about Haskell in the NixOS manual.

from cabal2nix.

nixos-discourse avatar nixos-discourse commented on July 18, 2024

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/packages-marked-as-broken-should-come-with-an-explanation/19187/9

from cabal2nix.

dschrempf avatar dschrempf commented on July 18, 2024

Dito.

from cabal2nix.

dschrempf avatar dschrempf commented on July 18, 2024

Oh :-), I thought this was a stale bot message. Sorry!

from cabal2nix.

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.