How to disable dependency checking using local installation for bondage?

So, I'm trying to install a package with a large messy set of dependencies (gitit, in this case). The direct cabal install from hackage forces me to redo many libraries that I donโ€™t want to rebuild (related to text restrictions, network restrictions, parsec , etc.). I did the right thing, cabal unpack gitit , manually edited the .cabal file, and successfully completed the cabal configure , cabal build . So far so good.

Now I want to run cabal install . In the good old days (last year), it simply installed the already created binaries and the files in which they belong. However, now running cabal install launches the dependency checker, which decides that all the packages I create do not use the same parsec , etc., and still try to reinstall them! Despite the fact that I just had a great cabal build . What magic flag to turn off and get old, not smart and completely acceptable behavior?

+6
source share
2 answers

When looking at the flags, there seems to be no indication of cabal install . In the periods before cabal install and when you had to manually create your own packages, the spell during the installation phase was runghc Setup install --user after running runghc Setup configure --prefix=$FOO --user - maybe this will work? Setup.hs will not automatically call โ€œbuildโ€ when you tell โ€œinstallโ€ if my memory is working correctly.

Now, for the future, if you want to avoid all this annoying dependent hell, I highly recommend that you use cabal-dev , which will isolate your package installations and never touch your actual user / global package database, in which case you're just run:

 $ cabal unpack gitit $ cd gitit-0.8.0.1 # latest hackage version $ cabal-dev install 

It will correctly download and install all the necessary dependencies, such as installing cabal, but it will isolate them by creating the ./cabal-dev directory containing the stand-alone package database. It never touches your global or custom db package in ~/.ghc/ . cabal-dev efficiently edits cabal files and copes with diamond dependency problems. Kabbal is confronted with the past, the cabal-install manually download packages to the past.

+4
source

It also turns out that the --only flag --only , which allows you to build and install only this package, as the ./Setup route ./Setup .

+2
source

Source: https://habr.com/ru/post/891728/


All Articles