Creating a channel - Nix

Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.

Magnus Therning

Is it possible to create a channel that complements the nixpkgs channel?

I'd like to publish some tools at work in a way that's easy to consume for my co-workers. Maybe this doesn't even make sense, I mean I'm basing this on my experience with other distros where it's easy to put packages in a repo (I've done that for Debian, ArchLinux and others).

Asad Saeeduddin

Yes, you can do this, although I don't remember exactly what the mechanism was. You can also just clone a repository of Nix expressions and install derivations from it directly though

Magnus Therning

Yes, but for sharing with co-workers I think it'd be nicer to tell them to

  1. add a channel
  2. use something like nix-env -i work-tool

and then to keep updated just use the standard

  1. nix-channel --update
  2. nix-env --upgrade
Magnus Therning

No, they don't (and neither do I).

Torsten Schmits

did you go through with this? I use channels to install from repos, works with any nix expression.
Simply run nix-channel --add ghcide and you can install with nix-env -f '<ghcide>' ghcide-ghc865

Magnus Therning

Yes, @Torsten Schmits I did get it working exactly the way I mentioned above.