[Nix-dev] Announcing cabal2nix version 20150807
Fellow Nix ∩ Haskell hackers, I'd like to draw your attention to the newly available version 20150807 [1] of cabal2nix, which changes the format of the generated expressions. tl;dr: You *should* re-generate your Nix expressions with the new version, but you don't have to. This update greatly enhances the accuracy with which dependencies are expressed in the generated Nix files. Previous versions distinguished dependencies for building ("buildDepends") and testing ("testDepends"). This distinction didn't apply to system packages or build tools, however: the fields "extraLibs" and "buildTools" applied to the entire build. This meant that dependencies required only for testing would be pulled in regardless of whether the test were actually run or not. These days, we distinguish dependencies for libraries, executables, and tests, and for each of those types we distinguish dependencies on Haskell libraries, system libraries, pkgconfig libraries, and build tools. This gives us a whopping 12 new attributes xxxHaskellDepends xxxSystemDepends xxxPkgconfigDepends xxxToolDepends where "xxx" is any of "library", "executable", or "test". The old dependency attributes are no longer generated by cabal2nix. The generic builder in Nixpkgs still accepts them, though, for the sake of backwards compatibility. This means that you don't have to re-generate all your build expressions with the new version, but you *should*. I've re-generated the "haskell-packages.nix" file with the new version, and we can now compile well over 5,000 Haskell packages successfully with GHC 7.10.2 on Linux/x86_64 -- that's approximately 60% of Hackage: http://hydra.cryp.to/jobset/nixpkgs/haskell-updates Users of the unstable channel will see those updates soon, everyone who's following the 'master' branch already has them. Best regards, Peter [1] https://github.com/NixOS/nixpkgs/commit/29fed6f834c1f8be1252d273b51b111589ad8ff8 ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] How to set a specific GHC version?
On 08/07/2015 06:30 AM, Hilco Wijbenga wrote: > On 6 August 2015 at 01:30, Eric Sagnes wrote: >> Have you tried the example from the manual [1]? >> You can set GHC version by changing the "ghc7101" of the >> first line to the version name you want. > > I tried similar things but with haskellngPackages but I could not get > that to work. > > If I change my default.nix to > > { stdenv, haskellngPackages, pkgs }: > > let > env = pkgs.haskell.packages.ghc763.ghcWithPackages (p: with p; [ > cabal-install > cabal2nix > classy-prelude > ]); > in > stdenv.mkDerivation { > name= "project-name"; > buildInputs = [env]; > shellHook = '' > export NIX_GHC="${env}/bin/ghc" > export NIX_GHCPKG="${env}/bin/ghc-pkg" > export NIX_GHC_DOCDIR="${env}/share/doc/ghc/html" > export NIX_GHC_LIBDIR=$( $NIX_GHC --print-libdir ) > ''; > } > > then Nix is happy but > > 1) GHC 7.6.3 fails to compile; Why do you specify ‘pkgs.haskell.packages.ghc763’? The official support is for whatever ‘haskellPackages’ points at which I believe currently is ‘haskell.packages.ghc7101’. > 2) Now I'm not using haskellngPackages. And we're supposed to migrate > to that, right? haskellngPackages right now is just haskellPackages; we are months past haskellngPackages being made the default so assuming your channel or whatever is not that old, you're on haskell-ng already. In fact it's easy to see that you are because you're able to say ‘cabal-install’ and ‘classy-prelude’ which before ng were ‘cabalInstall’ and ‘classyPrelude’. > ___ > nix-dev mailing list > nix-dev@lists.science.uu.nl > http://lists.science.uu.nl/mailman/listinfo/nix-dev > -- Mateusz K. ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Leksah
On 08/06/2015 08:20 AM, Hilco Wijbenga wrote: > If Hydra built unstable successfully (which, I believe, is a > prerequisite for the channel to update) then how is it possible that > Leksah does not build for me? Leksah is no longer built on Hydra.nixos.org. http://hydra.nixos.org/search?query=leksah Moreover, the channel is only blocked by some critical jobs. We have tens of thousands of jobs on Hydra these days, so hundreds or even thousands of them break regularly. You can try looking at other hydra instances, e.g. http://hydra.cryp.to/search?query=leksah In case of leksah, I'd guess it's also better to use an older GHC version, as it always seemed not-too-actively maintained. Vladimir smime.p7s Description: S/MIME Cryptographic Signature ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Leksah
Hi Hilco, > Does the stable channel guarantee that everything builds? Or is it > still luck-of-the-draw just like Cabal? If it has been built by hydra, it should be in the cache and should work. Peter Simons runs hydra http://hydra.cryp.to for haskel packages but I am not sure if it has been moved to the official hydra or not. https://www.reddit.com/r/haskell/comments/36vwac/peter_simons_nix_loves_haskell_talk_from_nixos/ Tomas ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev