Comments (12)
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.
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.
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.
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.
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.
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.
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.
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.
@edolstra Do you have any opinion on the "one subdirectory per package" question?
from cabal2nix.
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.
@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.
Moved to NixOS/nixpkgs#3690, which seems like the right place for this issue.
from cabal2nix.
Related Issues (20)
- cabal2nix tries to fetch hackage revisions even if already present in the source HOT 2
- hackage2nix: Correctly flag broken Haskell packages HOT 12
- Regression tests for fetcher-based derivations
- docs: Sidebar on left doesn't scroll HOT 1
- Enable hlint on CI
- Map `extra-libraries: FLAC` to pkgs.flac HOT 4
- latest library doesn't pull in other latest library
- do not encourage use of `nix-env` HOT 1
- hackage-db: `signatures` field in `MetaData` has the wrong type
- hackage-db: .cabal file extraction HOT 1
- Confusing output when using --subpath in conjunction with a source that needs to be unpacked
- Improve tooling for making a new release
- Add --disable-library-profiling option HOT 2
- `posix_spawnp: illegal operation` HOT 1
- Support for GitHub/GitLab PR URLs HOT 1
- Add warning redirecting to nixpkgs manual at the top of every readthedocs page
- Get pkg-config dependencies from `pkg-configPackages` HOT 5
- Don't set mainProgram when it matches pname HOT 1
- Component-based build support for `cabal2nix` HOT 5
- Removing `configureCabalFlags` completely HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cabal2nix.