Comments (4)
I don't understand why you consider this an issue with cabal2nix? The utility offers a --no-haddock
command line switch you can use to generate a correct expression in such cases. Also, the transformers-compat
package we have in Nixpkgs has the noHaddock=true
bit set and installs just fine.
What exactly to you want us to do?
from cabal2nix.
For the vast majority of packages cabal2nix creates a nix expression and it installs perfectly. In this case it required a manual change inorder to install. I am not clear on why I needed to set the noHaddock flag in order for the installation to complete when no other package I have used cabal2nix on in the same system has needed it.
Ideally cabal2nix would be able to detect that noHaddock was needed in order install and add it appropriately. I can not tell weather this is possible or not because I not understand why transformers-compat needed and others did not, but from your response it sound like it is not possible. If it is not possible then the solution is additional documentation, which could be me adding a note to the haskell page on nixos.org/wiki or starting a page for cabal2nix and adding notes there. If it was important enough then it could going the README.md.
If I knew it was not possible to make the detection automatically then I would just add documentation to the wiki directly.
from cabal2nix.
transformers-compat
fails the Haddock stage because it doesn't expose any modules to the user, so when Haddock is run, there are no input files for it. I guess, it would be possible to recognize this particular case in cabal2nix. I never thought much about it, though, because cases like transformers-compat
(i.e. library package that don't expose any modules) are very rare. Auto-detecting this case simply didn't feel like a siginificant issue. The vast majority of packages that do require noHaddock=true
are packages that have syntax errors in their Haddock documentation, and those cases we cannot autodetect.
Anyway, you are right saying that the documentation for cabal2nix should be improved to mention that issue.
from cabal2nix.
It's becoming increasingly common for authors to deprecate their package by releasing an empty version of the library that contains no visible modules, but a comment saying "this package is obsolete, use such-and-such instead". Builds of such packages invariably fail at first because we try to run haddock on them. Cabal2nix could recognize that a package has no contents and set noHaddock = true
automatically.
from cabal2nix.
Related Issues (20)
- 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
- Invalid Nix is generated for a .cabal file that has the `if` package as a dependency HOT 1
- Generate `meta.longDescription` HOT 2
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.