[Nix-dev] Question about organising dependencies not in core nixpkgs?

2015-03-18 Thread Thomas Hunger
Hi, I usually include a shell.nix file in my libraries for development. If I have a dependency not in core nixpkgs then I add a local mkDerivation using "let pkg = ... in {}" to shell.nix (e.g. [1]). If I now want to use my library in another context, say nixops, I have to duplicate the shell.nix

Re: [Nix-dev] Question about organising dependencies not in core nixpkgs?

2015-03-18 Thread Luca Bruno
On 18/03/2015 11:26, Thomas Hunger wrote: > Hi, > > I usually include a shell.nix file in my libraries for development. If > I have a dependency not in core nixpkgs then I add a local > mkDerivation using "let pkg = ... in {}" to shell.nix (e.g. [1]). > > If I now want to use my library in another

Re: [Nix-dev] Question about organising dependencies not in core nixpkgs?

2015-03-18 Thread Thomas Hunger
Thanks. That would require having the shell.nix library locally already AFAICT. To rephrase slightly. Ideally I'd like to be able to do: myLibrary = fetchurl { ... }; extraDepends = import "${myLibrary}/depends.nix"; buildDepends = [ ... ] ++ extraDepends; Does that make sense? ~ On 18 March 2

Re: [Nix-dev] Question about organising dependencies not in core nixpkgs?

2015-03-18 Thread Luca Bruno
On 18/03/2015 12:37, Thomas Hunger wrote: > Thanks. > > That would require having the shell.nix library locally already > AFAICT. To rephrase slightly. Ideally I'd like to be able to do: > > myLibrary = fetchurl { ... }; > extraDepends = import "${myLibrary}/depends.nix"; > buildDepends = [ ... ] +

Re: [Nix-dev] Question about organising dependencies not in core nixpkgs?

2015-03-18 Thread Kirill Elagin
I’d say there is a more general problem. Imagine, that one day [in a far far away future] people start shipping derivations in `default.nix` in their sources (I guess people who develop on NixOS/with nixpkgs already do this as they have the file for their build environment anyway, so why not commi

Re: [Nix-dev] Question about organising dependencies not in core nixpkgs?

2015-03-18 Thread Shea Levy
You can already do this. “import foo” will build any derivations that “foo” depends on at evaluation time. Note though that really “build at evaluation time” is for several reasons inferior to “evaluate at build time”, i.e. recursive nix. I have an implementation for that but it doesn’t look li

Re: [Nix-dev] Question about organising dependencies not in core nixpkgs?

2015-03-18 Thread Thomas Hunger
Apologies, here's the rest of my email: .. but I could not find anything that looks like "evaluate at build time" - is that code somewhere public? Thanks, Tom [1] https://github.com/shlevy/nix On 18 March 2015 at 16:01, Thomas Hunger wrote: > Hi Shea, > > I checked your github version of nix

Re: [Nix-dev] Question about organising dependencies not in core nixpkgs?

2015-03-18 Thread Thomas Hunger
Hi Shea, I checked your github version of nix [1] [1] On 18 March 2015 at 14:39, Shea Levy wrote: > You can already do this. “import foo” will build any derivations that > “foo” depends on at evaluation time. > > Note though that really “build at evaluation time” is for several reasons > inf

Re: [Nix-dev] Question about organising dependencies not in core nixpkgs?

2015-03-18 Thread Shea Levy
See https://github.com/NixOS/nix/pull/213 . The comment chain is long, but it’s important to read up to https://github.com/NixOS/nix/pull/213#issuecomment-43674771 . ~Shea > On Mar 18, 2015, at

[Nix-dev] Xlib.h not found on go get -v github.com/veandco/go-sdl2/sdl

2015-03-18 Thread Paul Dufresne
Well, I am mostly user-level in NixOS. I modify my /etc/nixos/configuration.nix then #nixos-rebuild -switch I am learning GO. I have been able to get ncurses to work in go. I was now trying with SDL: [guest@nixos:~]$ go get -v github.com/veandco/go-sdl2/sdl{,_mixer,_image,_ttf} github.com/veandco