Git Product home page Git Product logo

Comments (12)

peti avatar peti commented on July 19, 2024

Yes, I completely agree. I would be quite happy to have all Haskell-related packages underneath pkgs/development/haskell-modules (or some other suitably named directory).

I agree that the "-modules" bit feels inappropriate in the context of Haskell, because the term "module" has a very specific meaning in Haskell that doesn't fit in this context. Anyway, it would be okay for me to use the name "haskell-modules" anyway, because that choice is consistent within tthe nixpkgs database, which uses "X-modules" to contain Nix expressions related to language X.

One issues that bothers me a little is the question of how to deal with tools like darcs or hledger, that are written in Haskell but don't necessarily relate to the language itself. I guess, it makes sense to have them underneath pkgs/development/haskell-modules, too, right? At the same time, it also makes sense to have them in pkgs/applications/version-management/darcs and pkgs/applications/office/hledger. How do you feel about that? Can we come up with some kind of guideline for these kind of choices that we can document and communicate to others?

from cabal2nix.

kosmikus avatar kosmikus commented on July 19, 2024

I would also be fine with "haskell-modules" for the sake of nixpkgs
consistency. Perhaps we should ask on the list or on #nixos for
opinions.

Regarding placement of packages, I'd follow a simple rule: if it's
defined in haskell-packages.nix, then it should also be in
haskell-modules. I see the nixpkgs directory hierarchy exclusively as
a hierarchy for developers, to manage and organize all the packages.
For lookup by users, the hierarchy is entirely unsuitable, and indeed
a tag-based system would work much better.

from cabal2nix.

peti avatar peti commented on July 19, 2024

If it's defined in haskell-packages.nix, then it should also be in haskell-modules.

Yes, that is a sensible rule.

As far as I'm concerned, we can go ahead and re-organize the directory structure. The location 'pkgs/development/haskell-modules' is good enough, IMHO.

from cabal2nix.

peti avatar peti commented on July 19, 2024

I guess, I have time to do the re-organization of the tree. I would like to see all Haskell-related Nix expressions in a single flat directory, like this:

pkgs/development/haskell-modules/<pkgname>-<pkgversion>.nix

I don't think we should have a sub-directory per package anymore. Those directories contain just a single file; so I don't see why having them would be an advantage.

The haskell-packages.nix file should remain in pkgs/top-level, though, I wouldn't want to move that.

Do you have any other ideas or suggestions?

from cabal2nix.

kosmikus avatar kosmikus commented on July 19, 2024

Now that we've moved to git, I'm less reluctant to actually do this. So if you still think this is a good idea, I might try to get this sorted out soon.

from cabal2nix.

peti avatar peti commented on July 19, 2024

Yes, I still think this is a good idea. If you have the chance to make that change, then I'll be all for it.

from cabal2nix.

kosmikus avatar kosmikus commented on July 19, 2024

Ok, I've been looking into it. If we're going to make things similar to other languages, then we should indeed go for haskell-modules. However, it looks like all other languages have individual subdirectories per package, so do we really want to deviate from it and give this up?

from cabal2nix.

peti avatar peti commented on July 19, 2024

Having a sub-directory per package makes sense if builds are likely to come with additional files such as build scripts, patches, etc., but that seems to be extremely rare in the Haskell world. So I don't see much benefit in having all those sub-directories, and I'd prefer not to have them.

I don't feel strongly about this issue, though.

from cabal2nix.

kosmikus avatar kosmikus commented on July 19, 2024

@edolstra Do you have any opinion on the "one subdirectory per package" question?

from cabal2nix.

edolstra avatar edolstra commented on July 19, 2024

Having all Haskell packages in one directory seems fine to me. If a package needs additional files, it could be moved to a subdirectory.

from cabal2nix.

peti avatar peti commented on July 19, 2024

@kosmikus, is the repository in which you've made those changes available somewhere? I looked at https://github.com/kosmikus/nixpkgs, but that doesn't seem to have them.

from cabal2nix.

peti avatar peti commented on July 19, 2024

Moved to NixOS/nixpkgs#3690, which seems like the right place for this issue.

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.