Re: [Nix-dev] Overriding by removing a derivation attribute
I think I recall using this combination: revision = null; editedCabalFile = null; bergey On 2016-03-01 at 16:54, Kosyrev Serge <_deepf...@feelingofgreen.ru> wrote: > I want to override a Haskell derivation, but in the particular case > it is not enough to change the 'src' attribute -- I also need to stop the > derivation supplying an alternate .cabal file: > > aeson = haskell.lib.overrideCabal old.aeson (oldAttrs: { > editedCabalFile = null; # < > src = pkgs.fetchgit { > url= https://github.com/bos/aeson; > rev= "d9f1ad357e5dc28c381099814e7cce0e68cf2b6a"; > sha256 = > "0nzajw4ia2s7kjjygw9xddrfa1aq2kq960bm9wgj8b34manmyh0f"; > }; > }); > > Naturally, this doesn't work as desired (the file still gets supplied), > and so the question is -- how is one supposed to achieve that? > > -- > с уважениeм / respectfully, > Косырев Сергей > ___ > nix-dev mailing list > nix-dev@lists.science.uu.nl > http://lists.science.uu.nl/mailman/listinfo/nix-dev ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] How to add tools to a nix-shell environment for haskell development?
On 2015-03-06 at 13:24, Michael Alan Dorman wrote: > In developing a haskell library, I would like to be able to maintain > both a default.nix (that represents the library dependencies, etc.), and > then have a shell.nix that adds things to it in order to build a > development environment---specifically some build tools, hasktags, > hlint, etc. Fortunately, this is easy to do. Put the output of `cabal2nix .` in `default.nix`. `cabal2nix --shell .` inlines the output of the previous command. If you instead `callPackage` the `default.nix`, you're most of the way there. I have a slightly more elaborate example in [1]. It adds build tools, and provides convenient places to add version pins or pick a GHC version. I imagine others have their own variations. Daniel Footnotes: [1] https://github.com/bergey/nix-config/blob/master/bash_aliases#L49 ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Will Haskell-ng and hackage2nix allow building *any* versions of deps?
On 2015-02-24 at 23:24, Nikita Karetnikov wrote: >> A related question: is there a way to generate a package list containing >> exactly the versions of dependencies we require? > > I asked a similar question but about the cabal.config file some time > ago. Here's the response: > > http://article.gmane.org/gmane.linux.distributions.nixos/15885 You have now described the two halves of the problem as I understand it: - get cabal to list a suitable set of particular versions - get cabal2nix or hackage2nix to generate derivations for specified versions hackage2nix now has some very helpful logic to detect name overlap between haskell packages (usually C bindings) and other libraries.[1] I'd be very interested in a way to call hackage2nix on a particular package version, or set of versions, as we can with cabal2nix, so I can benefit from this feature. bergey Footnotes: [1] https://github.com/NixOS/cabal2nix/blob/master/src/hackage2nix.hs#L180 ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] [haskell NG] Override package
On 2015-02-16 at 08:42, YCH wrote: > I've read quite many document. Wiki, nix pills, ... . But I'm confused about > so many different ways doing similar things. And I'm worried about haskell-ng > specific things. There is already 'haskellngPackages.hdevtools'. So I should > override using ~/hdevtools. I'll attach my current setup information. Nix certainly has an overwhelming number of options for similar things. Here are two options for your situation: 1. Override hdevtools for all your builds, editing ~/.nixpkgs/config.nix, following the explanation in [1]. This is probably the right thing; I expect you always want the patched hdevtools. A complete config.nix: 2. Override hdevtools in your shell.nix, just for this build. This is useful when you need a patched version of some Haskell library, rather than a build tool. In this case, add to the let definitions (before pkg) hdevtools = haskellngPackages.callPackage ~/hdevtools {}; I think you'll need to replace the ~ with your homedir; ISTR Nix doesn't interpret ~. Then change your buildTools line to refer to hdevtools, not haskellngPackages.hdevtools. cheers, bergey Footnotes: [1] http://lists.science.uu.nl/pipermail/nix-dev/2015-January/015601.html ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] A Journey into the Haskell NG infrastructure: Part I
Looks like maybe you entered a shell with the dependencies for hspec, rather than for gitlib-libgit2? At any rate, this works for me: $ hub clone jwiegley/gitlib $ cd gitlib/gitlib-libgit2/ $ nix-shell '' -A haskellngPackages.gitlib-libgit2.env $ history $ ghc --make Setup.hs $ ./Setup configure $ ./Setup build On 2015-02-05 at 20:51, John Wiegley wrote: >> Peter Simons writes: > >> 2) For recent Hackage packages, you can do that without using cabal2nix, >> even, >> by running: > >> $ nix-shell '' -A haskellngPackages.hspec.env > > I think I'm missing some bit of special sauce, because when I run these > commands, `./Setup configure reports that several of the dependencies are > missing: > > --8<---cut here---start->8--- > ghc784:[johnw@Vulcan:~/src/gitlib/gitlib-libgit2]$ > nix-shell '' -A haskellngPackages.hspec.env > > \[\][nix-shell:~/src/gitlib/gitlib-libgit2]$\[\] ./Setup configure > Configuring gitlib-libgit2-3.1.0.2... > Setup: At least the following dependencies are missing: > gitlib >=3.0.0, > hlibgit2 >=0.18.0.11, > missing-foreign >=0.1.1, > monad-control <1.0, > monad-logger >=0.3.4.1, > stm-conduit >=2.3.0, > text-icu >=0.6.3 > --8<---cut here---end--->8--- > > Also, would it be much work to get the hoogleLocal expression working within > the NG framework? > > John > ___ > nix-dev mailing list > nix-dev@lists.science.uu.nl > http://lists.science.uu.nl/mailman/listinfo/nix-dev ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Haskell: Using Nix with cabal.config
I've been doing something similar, to build with specific versions that aren't in Nixpkgs. My current approach is a directory tree with a directory per package, and a .nix file per version, and a nix function that imports a particular package/version from that tree. For each package I maintain, I call cabal2nix to make the default.nix, and I put any local or pinned dependencies in shell.nix Here's a fairly typical example, with some versioned deps and some relative paths to git checkout directories. https://github.com/bergey/diagrams-stow/blob/c89d0d79d7a35373582e25efd2c0abde427d2829/nix/postscript/shell.nix I've started working on a tool to automate this sort of thing. ( https://github.com/bergey/hscache ) It's not usable yet, but I'd like to hear what your current workflow is, and ideal workflow would be. Daniel On 2015-02-01 at 03:41, Nikita Karetnikov wrote: > I’d like to build an application using the versions specified in a > cabal.config file (cabal-install is included in the shell.nix file). Is > there an easy way to do it? > > After talking to people on #nixos, I got the impression that having your > own Nixpkgs branch is the only way if you want to share your environment > with NixOS and plain Nix users. Parsing a cabal.config file and running > cabal2nix on every package is not difficult. But where do I need to put > the new recipes? > > For packages with the default.nix file, you just compare the versions > and replace the existing recipe if they don’t match. For packages > having multiple versions, you also need to change > pkgs/top-level/haskell-packages.nix. The latter makes me a bit > uncomfortable because it’s easy to make a mistake. I’d rather put all > the new recipes in a different place, say, in the directory of my > application, and somehow instruct Nix to use them first. Can it be > done? Or is there a better way? > ___ > nix-dev mailing list > nix-dev@lists.science.uu.nl > http://lists.science.uu.nl/mailman/listinfo/nix-dev ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Encrypted root: LUKS over LVM
I run LVM over LUKS, but I don't understand the problem Nikita is having. My config is at[1] if that's helpful. I created the LUKS partition & LVM groups a few years ago, before I was using Nix, and I don't have useful notes about how I did it. Daniel Footnotes: [1] https://github.com/bergey/nix-config/blob/master/laptop.nix On 2015-01-15 at 05:26, James Cook wrote: > Sorry, still no idea. I'm using LUKS but not with LVM, and I don't > have this problem. Is anyone else using LVM over LUKS? Is there > something strange about Nikit's configuration? ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] ‘CYCLE’ was not found in the Nix search path
On 2014-12-16 at 10:37, Eelco Dolstra wrote: > Hi, > > On 16/12/14 00:04, Daniel Bergey wrote: > >> For the last few days, any attempt to install with nix-env gives the >> message: >> >> error: file ‘CYCLE’ was not found in the Nix search path (add it using >> $NIX_PATH or -I) >> >> Can someone explain to me why this is and how to fix it? > > Did you use a Nix 1.8 prerelease at some point? You may have a corrupted > manifest.nix in your profile resulting from a bug fixed in > https://github.com/NixOS/nix/commit/a17c23426e7b2724639cd90c23759299cdaffbb7. > In > that case, you should roll back your profile to a generation before the > corruption. Thank you both. I believe I was using a 1.8 prerelease, and that commit explains my problem. James's hack also works. bergey signature.asc Description: PGP signature ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] ‘CYCLE’ was not found in the Nix search path
For the last few days, any attempt to install with nix-env gives the message: error: file ‘CYCLE’ was not found in the Nix search path (add it using $NIX_PATH or -I) Can someone explain to me why this is and how to fix it? Some more information: $ nix-env --version nix-env (Nix) 1.8 $ readlink $(which nix-env) /nix/store/2v5ck8fgz2m38l9fg6m9d4x0afsydfk6-nix-1.8/bin/nix-env $ echo $NIX_PATH /nix/var/nix/profiles/per-user/root/channels/nixos:nixpkgs=/etc/nixos/nixpkgs:nixos-config=/etc/nixos/configuration.nix $ uname -a Linux Chladni 3.14.26 #1-NixOS SMP Thu Jan 1 00:00:01 UTC 1970 x86_64 GNU/Linux I've tried rolling back my system and my user config.nix, but the error is the same. I've found one report of this problem, but no solution: https://github.com/NixOS/nixpkgs/issues/4515 Thanks, bergey signature.asc Description: PGP signature ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Haskell Platform, anyone?
On 2014-11-07 at 19:11, Peter Simons wrote: > How do others feel about that? Do you desperately want to be able to > install Haskell Platform 2010.2.0.0 any time soon? I have no objection to removing old HP. In an ideal world, I'd would like to use Nix for continuous integration, to answer questions like "will users with HP-2012 installed be able to install my library?" That's the only reason I can imagine caring about HP being in Nixpkgs. But there's a fair bit of other tooling missing to do that, and we can always add HP back if enough people want this sort of CI in the future. bergey signature.asc Description: PGP signature ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Keeping nixpkgs up to date
On 2014-08-29 at 09:59, Mateusz Kowalczyk wrote: > On 08/29/2014 10:04 AM, Vladimír Čunát wrote: >> Also, the commitment of being maintainer of a group of packages seems >> significantly larger than for a single package. The change may rather >> dissuade people from becoming a maintainer at all, as they may be only >> interested in a few particular packages and not e.g. in all games we have. > > Actually I think people are much more inclined to sit down and spend a > few minutes sometimes updating a package or two from their group rather > than putting their own name down specifically on a package and then > having the sole burden of updating it themselves. I also think it makes > people feel ‘I'm in a group of people doing similar so I can always seek > help from them’ as opposed to ‘I'm on my own to figure it out when this > breaks’. I like the idea of maintainer groups alongside individual maintainers. The familiar downside of group responsibility is that everyone may assume that someone else is handling a particular task. I expect listing an individual alongside the group helps in those cases. Eg, I would keep listing myself for packages I maintain upstream. Anything that groups packages so it's easier to distinguish "failures and PRs that I might be able to help with" from "I have no clue what that is or how to build it" is good by me. In that vein, I appreciate all the recent links to Hydra status pages for Haskell packages. bergey pgpAjXBQluM3X.pgp Description: PGP signature ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] Haskell build failures (was: Zero Hydra Failures (ZHF) project)
On 2014-08-08 at 15:41, Mateusz Kowalczyk wrote: > On 08/08/2014 02:35 PM, Eelco Dolstra wrote: >> Note the huge number of Haskell and Python packages. > > The problem with Haskell jobs as far as I can tell is that we often > remove old versions of packages when ‘updating’. Consider something like > QuickCheck 1.x: we update its dependencies in nixpkgs and the package > now becomes forever broken because we haven't kept the old version of > things and told QC to use that. QC 1.x is old so it's not reasonable to > go back and make it work with new dependencies: upstream won't do it and > everyone will probably use QC 2.x. If there are packages depending on > 1.x then they should be updated instead. From my random sample of broken Haskell packages this morning, I think there's another problem. Nix includes several versions of GHC, and one of the few cases where we include multiple versions of a Haskell library is when that library ships with GHC or Haskell Platform. Eg, 10 versions of HTTP, 9 versions of GLUT. We end up telling Hydra to build every version of the library against every version of GHC, when what we actually want is to pick a library version based on the GHC version. (With maybe some overlap.) I'd like to spend some time pinning down which versions work together. Can someone point me at an example that specifies these conditions? Thanks, Daniel pgp8l0nXgn_Bo.pgp Description: PGP signature ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] GPG on NixOS
I use the following two lines in nixos/configuration.nix services.xserver.startGnuPgAgent = true; programs.ssh.startAgent = false # gpg agent takes over this role This sets the path to pinentry automatically; the definition is in nixpkgs/nixos/modules/services/x11/display-managers/default.nix I don't know if there are reasons to prefer a per-profile config rather than system-wide. bergey On 2014-07-18 at 07:42, Lluís Batlle i Rossell wrote: > You have to set gpg config to find the pinentry program. It finds it by > absolute > path iirc, /usr/bin/pinentry. > > A gpg config line can set up its absolute path (~/.gnupg/gpg.conf or so). > > Bye, > Lluís. > > On Fri, Jul 18, 2014 at 02:36:19AM +0200, Mateusz Kowalczyk wrote: >> Hi, >> >> I've been tryin to sign a git tag with my private key but I am failing: >> >> [shana@lenalee:~/programming/haddock]$ git tag -a -s >> haddock-2.14.3-release -m "Haddock version 2.14.3 release" >> >> You need a passphrase to unlock the secret key for >> user: "Mateusz Kowalczyk (Main key) " >> 4096-bit RSA key, ID 2ADA9A97, created 2013-01-31 >> >> gpg-agent[15413]: can't connect to the PIN entry module: IPC connect >> call failed >> gpg-agent[15413]: command get_passphrase failed: No pinentry >> gpg: problem with the agent: No pinentry >> gpg: skipped "2ADA9A97": Operation cancelled >> gpg: signing failed: Operation cancelled >> error: gpg failed to sign the data >> error: unable to sign the tag >> >> I have used nix-env -i to install ‘pinentry’ but that changed nothing. >> Looking online, I see a person on IRC with the same problem but when >> trying to create a key which makes me think the whole thing is broken. >> >> Is anyone successfully using GPG on NixOS? >> >> A relevant question is why we have gnupg and gnupg1compat: how do they >> differ and why do we need both? I notice that only gnupg1compat provides >> a ‘gpg’ binary needed by git. >> >> -- >> Mateusz K. >> ___ >> nix-dev mailing list >> nix-dev@lists.science.uu.nl >> http://lists.science.uu.nl/mailman/listinfo/nix-dev > ___ > nix-dev mailing list > nix-dev@lists.science.uu.nl > http://lists.science.uu.nl/mailman/listinfo/nix-dev pgpUgYPLBD5s1.pgp Description: PGP signature ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Nix users going to Haskell Hackathon in Berlin?
On 2014-07-15 at 19:34, John Wiegley wrote: > How about the one in Boston in two weeks? I'm planning to be in Boston. Daniel pgpvjp2hAKTNe.pgp Description: PGP signature ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Fonts
On 2014-06-10 at 08:46, Wout Mertens wrote: > True... so https://nixos.org/wiki/Fonts is wrong :) Well, no surprise that after 2 months using NixOS I'm still confused. :) But it turns out the way to get more answers is to say something wrong in public. > On Tue, Jun 10, 2014 at 10:39 AM, Mathijs Kwik > wrote: > >> Kirill Elagin writes: >> >> > Why would anyone ever want to add a font to `sytemPackages`? >> >> I think this is a leftover from pre-nixos experiences :) >> I too, when coming from other distros, initially thought everything you >> use should go into systemPackages. It's the closest thing to "installing >> a package" in the traditional sense. That, and for a while I was manually putting "/nix/store/some-terrible-hash" into fonts.fonts, because I didn't know about the pkgs.foo variables. When someone explained the right way to set fonts.fonts, it didn't occur to me to try without the systemPackages line. Anyway, now I know, and I can remove a bunch of duplication from my config, which is great. ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Fonts
A few weeks back I struggled with fonts, asked some questions on IRC, and wrote up what I learned on the wiki: https://nixos.org/wiki/Fonts I should add some notes on packaging fonts there, too. I have no idea why Cantata and chromium aren't picking up fonts, though; I don't use either one. cheers, bergey On 2014-06-09 at 06:30, Mateusz Kowalczyk wrote: > Hi, > > In some applications (Cantata, chromium) I get squares instead of > Japanese characters. In others (emacs, urxvt, firefox, uzbl (ugly)) I > get actual characters. > > Does anyone know what I need to do to get Japanese to show up? In other > distros I would normally install every font available ever, run > fontconfig and hope for the best. > > Similarly, I was watching something with subtitles the other day and mpv > was struggling to find some fonts even though I seemed to have them in > ~/nix-profile/share/fonts/truetype . It might have needed some special > variety however so don't hold me on this one. > > What's the procedure of installing fonts? In my configuration.nix I have > > fonts.enableCoreFonts = true; > fonts.enableFontConfig = true; > fonts.enableFontDir = true; > fonts.enableGhostscriptFonts = true; > > I seem to get squares whether I have all of the above or none at all. > > I also was installing separate packages for fonts previously but it did > not seem to matter. > > I tried to find some info online on this but I was only ever able to > come across discussion whether unfree fonts should be included and > nothing else. ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev