Re: [Nix-dev] [Hackage] How to install Hackage package, not presented in nixpkgs, locally?
Those hashes have been introduced somewhen after ghc 6.12 to make the dependency hell easier which existed with cabal. Eg if you have A B C D and you cabal had to recompile A and B because you tried installing yet another package C and D are stale because A,B it depends on are gone. To detect this case hashes were introduced. Usually chances were high that things just worked. But don't forget that it could have been also you reinstalling the dev version of B not changing version number. That could lead to bugs which are hard to find if you don't recompile C and D. Now what does it mean in your case? Try installing everything without hydra and retry - it may be the case that A,B were built by hydra, but C is what you're trying to build locally. I don't know exactly how ghc/cabal calculates those hashes, so I may be wrong. But it very much looks like such a problem. How to rebuild everything from source? Got to the definition of that ghc version, then add a dummy env var such as FORCE_REBUILD=1; and retry. That FORCE_REBUILD should cause nix rebuilding everything from source. Report if this solved the issue. If it does we should document it on the wiki till somebody has time to find a real fix for it. Of course you can try waiting for additional replies, too. Marc Weber ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] [Hackage] How to install Hackage package, not presented in nixpkgs, locally?
But dependency hell was not gone. pipes-core-0.1.0: dependency base-4.5.0.0-f76ceb9607ba9bd4fcfb9c7b92d8cfe1 doesn't exist (ignoring) pipes-core-0.1.0: dependency categories-1.0.3-e9ab00168a7d0fdacafd64b31a5e1100 doesn't exist (ignoring) pipes-core-0.1.0: dependency lifted-base-0.1.1-51e1520336adbfccd889e58e684c89a1 doesn't exist (ignoring) pipes-core-0.1.0: dependency monad-control-0.3.1.3-a94da65cc1c2dcd38097f790cd885593 doesn't exist (ignoring) pipes-core-0.1.0: dependency transformers-0.3.0.0-f2303dfef836518cc2f6901210442e10 doesn't exist (ignoring) pipes-core-0.1.0: dependency void-0.5.6-2a27beac32f0c526d6cb6dc79bccfbd9 doesn't exist (ignoring) What I don't understand, are the hashes. Where are they from and how to solve theese dependency problems? All these are just warnings hence the (ignoring) and completely normal and harmless. You'll notice you get similar messages for other Haskell packages as well. Cheers, Andres ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] [Hackage] How to install Hackage package, not presented in nixpkgs, locally?
After rechecking found, that installing `pipes-core` package didn't install `categories` package, .nix file for which I added also. When I installed `categories`, it worked. Is it a bug? `Categories` package is mentioned in dependencies in pipes-core/default.nix From your description, I don't fully understand what went wrong, but it sounds like something that shouldn't happen. Usually, if you install a Haskell package via nix-env, all its Haskell dependencies end up in the user environment, too. Do you have a sequence of commands that demonstrates the problem, so that I can try to reproduce it? Cheers, Andres ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] [Hackage] How to install Hackage package, not presented in nixpkgs, locally?
There were theese lines in the end of ghc-pkg output log: The following packages are broken, either because they have a problem listed above, or because they depend on a broken package. pipes-core-0.1.0 pipes-core-0.1.0 And yes, I tried to load Control.Pipes in ghci. It worked not. Now I solved this problem with manual `categories` install. I suppose, you haven't noticed any problems, so the question is partly closed (I have to do pull request to nixpkgs with appropriate patch) 2012/8/15 Andres Loeh ks...@andres-loeh.de Thanks, haven't tried it yet, but ... 7. nixpkgs$ ghc-pkg check ... the output of ghc-pkg check for the wrapped GHC is possibly a bit suspicious. Have you tried $ ghci -package pipes-core $ ghci -package categories Do these work or not? Cheers, Andres ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] [Hackage] How to install Hackage package, not presented in nixpkgs, locally?
I do not know if this is canonical method, but I clone the git repo https://github.com/NixOS/nixpkgs cabal2nix cabal://package-version .../nixpkgs/pkg/development/libraries/haskell/pakcage/(default | version).nix default.nix if you do not need multiple versions. Add the following to nixpkgs/top-level/haskell-packages.nix package = callPackage ../development/libraries/haskell/package { }; You may need to override some packages in { }, an attribute set, at the end of the line. An example case when this is needed is if the package depends on the zlib compression library in the pkgs attribute set. The local Haskell zlib attribute(used to install Haskell bindings fro the zlib compression library) shadows the pkgs zlib(compression library) so you need to tell the package to use the zlib from pkgs not the zlib from the current attribute set. example: package = callPackage ../development/libraries/haskell/package { zlib = pkgs.zlib; }; Haskell packages with dashes in the name usually should be transformed to camel case so: parsing-combinators - parsingCombinators Otherwise the nix file will fail to parse. Then I do a test install nix-env -iA nixpkgs.haskellPackages.package. Run tests and enjoy, or commit code and preform a pull request. Hopefully someone who has more experience fills in an holes and corrects my mistakes. Patrick On Tue, Aug 14, 2012 at 1:12 PM, Daniel Hlynskyi abcz2.upr...@gmail.com wrote: Hello. I'm trying to create an installable package for `pipes-core` Hackage package. But got in troubles. 1. I used cabal2nix, but failed on installing the .nix file. After googling some time, I've done `nix-env -f all-packages.nix -iA haskellPackages.pipesCore`, so I've got package locally. But it had not registered the package, log with reasons http://pastebin.com/jp350qvX Manual registration with `ghc-pkg register` helped not. I don't know what to do now. 2. How can I contribute to nixpkgs with this package? The main question is - how can I TEST my contribution, when I get it? ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev -- Patrick Wheeler patrick.john.whee...@gmail.com patrick.j.whee...@rice.edu patrick.whee...@colorado.edu ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] [Hackage] How to install Hackage package, not presented in nixpkgs, locally?
This is the most recent howto Haskell page: https://nixos.org/wiki/Haskell talking about how to use the Haskell packages which are packaged by official nixpkgs. My personal solution which is an alternative called hack-nix allows you to install the package by adding a single line: pipesCore = exeByName { name = pipes-core; }; See latest commit: https://github.com/MarcWeber/nixpkgs-haskell-overlay/commit/1fde32dc7a6615a00335f33419dbc88ef84b95eb For that repository to work you also have to use the experimental/hack-nix branch found at github.com/MarcWeber/nixpkgs which adds some additional knowledge about core packages of each ghc version required by the brute force hack-nix solver. However if you use it as dependency for a different target executable its likely that running hack-nix --build-env will just succeed. If it does not just ping me on irc or by mail I'll write a nice wiki article now. Marc Weber ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] [Hackage] How to install Hackage package, not presented in nixpkgs, locally?
2012/8/14 Daniel Hlynskyi abcz2.upr...@gmail.com 2012/8/14 Patrick Wheeler patrick.john.whee...@gmail.com Then I do a test install nix-env -iA nixpkgs.haskellPackages.package. Run tests and enjoy, or commit code and preform a pull request. I have problem with this part. How to test packages if my nix-env doesn't know anything about git cloned repo? It says error: attribute `nixpkgs' in selection path `nixpkgs' not found Reposting to all ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev