Re: [Nix-dev] Debugging Hydra failures without a log

2017-07-10 Thread Sergiu Ivanov via nix-dev
Thus quoth  Vladimír Čunát  at 21:00 on Mon, Jul 10 2017:
> On 07/10/2017 10:52 PM, Sergiu Ivanov wrote:
>>> It didn't?  I see an evaluation a few days after that did succeed:
>>> https://hydra.nixos.org/job/nixpkgs/release-17.03/bibtex2html.i686-linux
>>
>> Oh, cool, thanks a lot!
>>
>> Hydra didn't send me an "it works" notification this time and I didn't
>> manage to find the page you gave me a link to.  Now I've finally found
>> where to click, thanks a lot!  (Note to myself: it's in the Job menu at
>> the top of the page.)
>
> Sometimes I also see "holes" in the maintainer notifications, I don't
> know why.  I think it can even happen the other way for transient
> problems, getting only another "Success" notification without getting
> the "(Dependency) failed" one.

Getting "Success" without a preceding "Failure" has already happened a
couple times to me as well.

It's the ancient gods deciding based on my instantaneous merit level :D

--
Sergiu


signature.asc
Description: PGP signature
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Debugging Hydra failures without a log

2017-07-10 Thread Sergiu Ivanov via nix-dev
Thus quoth  Vladimír Čunát  at 19:16 on Mon, Jul 10 2017:
> On 07/10/2017 06:47 PM, Sergiu Ivanov via nix-dev wrote:
>> Hydra told me the package bibtex2html which I maintain got broken:
>>
>>   https://hydra.nixos.org/build/55099626
>>
>> I waited for a couple weeks hoping the issue will fix itself, but
>> apparently it didn't.  [...]
>
> It didn't?  I see an evaluation a few days after that did succeed:
> https://hydra.nixos.org/job/nixpkgs/release-17.03/bibtex2html.i686-linux

Oh, cool, thanks a lot!

Hydra didn't send me an "it works" notification this time and I didn't
manage to find the page you gave me a link to.  Now I've finally found
where to click, thanks a lot!  (Note to myself: it's in the Job menu at
the top of the page.)

--
Sergiu


signature.asc
Description: PGP signature
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] Debugging Hydra failures without a log

2017-07-10 Thread Sergiu Ivanov via nix-dev
Hello,

Hydra told me the package bibtex2html which I maintain got broken:

  https://hydra.nixos.org/build/55099626

I waited for a couple weeks hoping the issue will fix itself, but
apparently it didn't.  The cited page says "log file is not available".
I have no problems installing bibtex2html from a local checkout of
nixpkgs on my i686-linux box (because nix-env downloads the working
cached version, I suppose?).

How would one normally debug such failures?

--
Sergiu


signature.asc
Description: PGP signature
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] weird garbage output inside nix-shell

2017-06-14 Thread Sergiu Ivanov
Thus quoth  Roni Choudhury  at 21:13 on Wed, Jun 14 2017:
>
> I use the plain old terminal vim, but you inspired me to start probing
> whether one of those libraries was specifically causing the problem.
>
> It turns out to be `glibc` that was causing the trouble. I have no idea why
> I thought I needed glibc in my nix-shell environment but there you go. If I
> omit that one line from my `shell.nix` then everything seems to work ok.

Oh, all right, I shall accept that as magic :-)

> Sergiu, thanks again for engaging with me and diving into this issue, it's
> much appreciated!

No problem, glad it helped a bit :-)

-- 
Sergiu


signature.asc
Description: PGP signature
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] weird garbage output inside nix-shell

2017-06-14 Thread Sergiu Ivanov
Hey Roni,

Thus quoth  Roni Choudhury  at 20:55 on Tue, Jun 13 2017:
> On Sun, Jun 11, 2017 at 5:45 AM Sergiu Ivanov siva...@colimite.fr
> <http://mailto:siva...@colimite.fr> wrote:
> Thus quoth  Roni Choudhury  at 17:38 on Sat, Jun 10 2017:
>>
> Definitely weird then - is there some way to probe exactly what packages
> are in my nix-shell environment? Do I do that just by following symlinks
> eventually into the store?

There are probably some more intelligent ways of doing that, but I don't
know of them :-(

>> If I send my shell.nix, would someone else mind trying to use it to see if
>> > you can reproduce my strange results?
>>
>> Go ahead.  (Remember to scrub all sensitive information.)
>>
> Thank you. I’ve attached my shell.nix file to this message.

I have no trouble running vim inside the environment provided by your
shell.nix.  I get no extra messages.

However, when I try running termite, gedit, or gimp, I get error
messages similar to yours.  I suppose your vim command launches gvim,
which uses GTK, just like gedit and gimp.  Note that I don't have issues
with qutebrowser, which does not use GTK.

> I did discover that I can “fix” my shell problems by omitting this line
> from shell.nix:
>
> LD_LIBRARY_PATH = stdenv.lib.makeLibraryPath libs;
>
> Without that line, my LD_LIBRARY_PATH env var just has
> /run/opengl-driver/lib in it, and vim works as expected. I’m not sure why I
> did this, because my build seems to work without it.

Omitting this line fixes the issues on my machine as well.  Moreover, if
I take your original shell.nix (with redefined LD_LIBRARY_PATH), run
nix-shell and manually set LD_LIBRARY_PATH to /run/opengl-driver/lib, or
even to the _empty string_, things work as expected.

> This may explain why my ldd output differs inside and outside my
> nix-shell environment.

I didn't observe any differences for any of the applications I tried,
but I didn't look really hard.

> So I guess my next question is: if I did want to put those packages’
> libraries into my library loader path, how am I supposed to do it? I tried
> this:
>
> LD_LIBRARY_PATH = "$LD_LIBRARY_PATH:${stdenv.lib.makeLibraryPath libs}";
>
> but that doesn’t work for, perhaps, obvious reasons.

One way of doing this would be just moving that line into shellHook
(mind the spaces around the equals sign):

  shellHook = ''
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${stdenv.lib.makeLibraryPath libs}"
echo "Candela nix dev environment"
  '';

The way you tried it originally doesn't work because, apparently, Nix
does not apply shell variable expansion.

If you tried writing something like this, outside of shellHook,

  LD_LIBRARY_PATH = "${LD_LIBRARY_PATH}:${stdenv.lib.makeLibraryPath lib}";

you probably saw that LD_LIBRARY_PATH is undefined.  I think that's
because the environment variable LD_LIBRARY_PATH is not defined (or is
not accessible via a Nix variable) at this stage of evaluation of
shell.nix (that's a belief I inferred by observation; that is, I don't
know for sure).


Now, if I try launching GTK applications from within the shell.nix
modified in this way, I get the same error message.  That may probably
be due to the fact that my GTK applications were built against GTK 3,
while you shell.nix requests GTK 2 (that's a guess, again).

--
Sergiu


signature.asc
Description: PGP signature
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] weird garbage output inside nix-shell

2017-06-11 Thread Sergiu Ivanov
Hi Roni,

Thus quoth  Roni Choudhury  at 17:38 on Sat, Jun 10 2017:
>
> Linus, Sam, and Sergiu - thank you for the suggestions. I did poke
> around in the output from `env` and discovered IN_NIX_SHELL, and
> arranged my .zshrc to show `${name}` when `$IN_NIX_SHELL` is
> true. Fantastic!

Great job!  I didn't know about that environment variable.

> I'm not sure the other problem has to do with character encodings
> (though I don't know too much about how that works).

Ooh, sorry, I messed up in my previous E-mail by saying "ASCII terminal
codes" :-( What I really meant was this:

  https://en.wikipedia.org/wiki/ANSI_escape_code

> I did notice that `ldd $(which vim)` shows me different results when I
> am inside my nix-shell vs. when I'm not.

This is weird.  I get exactly the same results (modulo the differences
in the memory map addresses listed in parentheses at the end of each
line).  (I don't have vim mentioned in this particular shell.nix.)

> I kind of thought I shouldn't even be able to launch vim from inside
> my shell if it's not listed as a buildDep.

It looks to me that nix-shell _extends_ the environment it is run in.
So, if you run nix-shell in an environment which contains vim, you have
vim inside nix-shell.

> If I send my shell.nix, would someone else mind trying to use it to see if
> you can reproduce my strange results?

Go ahead.  (Remember to scrub all sensitive information.)

--
Sergiu


signature.asc
Description: PGP signature
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] weird garbage output inside nix-shell

2017-06-09 Thread Sergiu Ivanov
Hello Roni,

Thus quoth  Roni Choudhury  at 13:24 on Wed, Jun 07 2017:
> On Wed, Jun 7, 2017 at 12:14 AM Samuel Leathers  wrote:
>
>> I use nix-shell --run zsh. I alias that to nshell.
>>
> Thanks, Sam, this is a great idea! On this note, do you know of a good way
> to update the prompt to reflect the nix-shell environment I'm in? i.e., is
> there a way to *name* the nix-shell env, and get access to that name
> through an environment variable?

  nix-shell --run 'MY_SHELL_NAME=foo zsh'

will allow you to tag the shell with a custom environment variable.

If you want to update the prompt, you should probably play around with
shell prompt variables (like PS1 in bash):

  http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html#Prompt-Expansion


> I wanted to add that even if I don't drop into zsh as my first act in the
> nix-shell, I still get that weird output from executables not in the
> environment (such as `zsh` and `git`). If anyone has any insight or can
> answer my other question, that would be great.

My first reaction on seeing your very first mail was that you were
probably having issues with processing of ASCII terminal codes.
Unfortunately, I don't have any clear suggestions.

Have you tried running the commands in different terminal emulators?

--
Sergiu


signature.asc
Description: PGP signature
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] concatAttrs :: [attrSet] -> attrSet ?

2017-05-30 Thread Sergiu Ivanov
Hello Daniel,

Thus quoth  Daniel Peebles  at 13:58 on Tue, May 30 2017:
>
> My favorite interface for this type of operation is from Haskell's
> Data.Map, in pseudo-Haskell notation:
>
> unionWithKey : (String -> a -> a -> a) -> Attrs a -> Atrs a -> Attrs a

Right, that's exactly the kind of function I was looking for :-)

Now, I think that in Nix the main problem is that attribute sets are
very often nested and that generic functions should be capable of
handling this nesting.  On the other hand, you usually don't care about
nesting when using Data.Map.

--
Sergiu


signature.asc
Description: PGP signature
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] concatAttrs :: [attrSet] -> attrSet ?

2017-05-29 Thread Sergiu Ivanov
Hello Tomasz, Domen, and Volth,

Thus quoth  Tomasz Czyż  at 13:26 on Mon, May 29 2017:
>
> https://github.com/NixOS/nixpkgs/blob/master/lib/attrsets.nix#L413 is also
> handy
>
> 2017-05-29 13:36 GMT+01:00 Domen Kožar :
>
>> mkMerge can be used only with NixOS modules.
>>
>> I do remember some recursive merge function, but can't find it now.
>>
>> On Mon, May 29, 2017 at 2:29 PM, Volth  wrote:
>>
>>> there is also lib.mkMerge to handle nested attrs

My use case is waay simpler than modules (lucky me) :-)

recursiveUpdate and especially recursiveUpdateUntil are some interesting
beasts, thanks for the reference.

--
Sergiu


signature.asc
Description: PGP signature
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] concatAttrs :: [attrSet] -> attrSet ?

2017-05-29 Thread Sergiu Ivanov
Hello Domen,

Thus quoth  Domen Kožar  at 12:16 on Mon, May 29 2017:
>
> Note that this will fail if you'll nest the attributes, one will override
> the other.
>
> nix-repl> :p concatAttrs [ {x={a =3;};} {x={ b= 4;};} ]
> { x = { b = 4; }; }

Sure, that seems to follow naturally from the semantics of //.

Now, indeed, I didn't at all take into account the potential complexity
of the attribute sets and just focused on my simple use case.  Thanks
for pointing me to other situations.

--
Sergiu


signature.asc
Description: PGP signature
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] concatAttrs :: [attrSet] -> attrSet ?

2017-05-28 Thread Sergiu Ivanov
Hey Leo,

Thus quoth  Leo Gaspard  at 13:05 on Sun, May 28 2017:
> On 05/28/2017 02:58 PM, Sergiu Ivanov wrote:
>> My use case is quite specific. I do this, approximately:
>>
>>   let func name = { "${name}" = something name; };
>>   in concatAttrs (map func [ "name1" "name2" ])
>
> If this is your use case, you could also be interested in `genAttrs`
> defined in `lib/attrsets.nix` ;)

Excellent!  Worked like a charm, thanks a lot!  (After I realised I had
to use it like pkgs.lib.genAttrs in my context :-) )

--
Sergiu


signature.asc
Description: PGP signature
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] concatAttrs :: [attrSet] -> attrSet ?

2017-05-28 Thread Sergiu Ivanov
Hello Linus,

Thank you for you prompt reply!

Thus quoth  Linus Heckemann  at 12:24 on Sun, May 28 2017:
> On 28/05/17 13:18, Sergiu Ivanov wrote:
>>
>> concatAttrs = attrList: pkgs.lib.fold (x: y: x // y) {} attrList;
>>
>> Do you see any isssues with such an implementation?
>>
>
> Looks like a sensible way to do it to me, though I'd be surprised if it
> doesn't already exist in nixpkgs.

Yeah, that's what I thought as well.

> Do keep in mind that // is not commutative — the order matters when the
> two sets contain the same key — but other than that I don't see any
> issues.

Indeed, right, the function I wrote should probably be called iterUnion,
to avoid insinuating any special treatment of repeated keys.

My use case is quite specific. I do this, approximately:

  let func name = { "${name}" = something name; };
  in concatAttrs (map func [ "name1" "name2" ])

I don't expect to have repeated names, so key repetitions isn't
something likely to happen.

> You might also want to look at the merging logic used for nixos
> modules (lib/modules.nix), although that's significantly more complex.

Oh, thank you for the reference (I actually took a look!), but in my
case I only merge three-element attribute sets.  My concatAttrs is
essentially me playing around with Nix more than anything else :-)

--
Sergiu


signature.asc
Description: PGP signature
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] concatAttrs :: [attrSet] -> attrSet ?

2017-05-28 Thread Sergiu Ivanov
Hello,

I found myself in the need of a function which would take a list of Nix
attribute sets and concatenate them to produce one big attribute set:

  nix-repl> concatAttrs [ {x=1;} {y=2;} ]
  {x=1; y=2;}

I did quite some research online and in nixpkgs source tree and found a
lot of cool functions, but nothing resembling to concatAttrs.

Does such a function exist?


In the meantime, I ended up writing the following definition:

   concatAttrs = attrList: pkgs.lib.fold (x: y: x // y) {} attrList;

Do you see any isssues with such an implementation?

--
Sergiu


signature.asc
Description: PGP signature
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] PulseAudio

2017-05-09 Thread Sergiu Ivanov
Thus quoth  David Izquierdo  at 19:16 on Tue, May 09 2017:
>
> I don't know how to see that process' logs. Maybe some magic journalctl
> option. Is it possible that it's starting as a systemd user service?
> Then `journalctl --user -eu pulseaudio` would work... But starting pulse
> like that doesn't seem to work for me.

This

  https://wiki.ubuntu.com/PulseAudio/Log

may be a way to go to get PulseAudio discuss its issues with you. (I
didn't try it.)

--
Sergiu


signature.asc
Description: PGP signature
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] PulseAudio

2017-05-09 Thread Sergiu Ivanov
Thus quoth  Mark Gardner  at 18:05 on Tue, May 09 2017:
> On Tue, May 9, 2017 at 1:50 PM, Sergiu Ivanov <siva...@colimite.fr> wrote:
>
>> What happens if you install pavucontrol and pamixer in a user environment?
>
[...]
> $ pavucontrol
>
> ** (pavucontrol:8551): WARNING **: Error retrieving accessibility bus
> address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus
> was not provided by any .service files
>
> ​Within the pavucontrol window that pops up it says "Connection to
> PulseAudio failed".
[...]
> $ pamixer --list-sinks
> Connection error

I suppose you tried rebooting after installing the packages?

I'm afraid I'm running out of ideas, sorry :-( Off the top of my head, I
don't think the no-longer-available wiki page had many more details
relevant to your situation.

--
Sergiu


signature.asc
Description: PGP signature
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] PulseAudio

2017-05-09 Thread Sergiu Ivanov
Hello Mark,

Thus quoth  Mark Gardner  at 17:38 on Tue, May 09 2017:
>
> I am having trouble getting PulseAudio to work. I added the following to
> configuration.nix, executed nixos-rebuild switch, and rebooted:
>
>   hardware.pulseaudio = {
> enable = true;
> package = pkgs.pulseaudioFull;
>   };
>   environment.systemPackages = with pkgs; [
> pamixer
> paprefs
> pavucontrol
>   ];

Here's what I have in my /etc/nixos/configuration.nix:

  hardware = {
bluetooth.enable = true;
pulseaudio = {
  enable = true;
  package = pkgs.pulseaudioFull;
};
  };

I installed pavucontrol and pamixer using nix-env, both work
properly. Also, a bluetooth speaker worked out of the box with this
configuration.

I couldn't get paprefs working, however.  (I tried, but not quite really
hard.)


What happens if you install pavucontrol and pamixer in a user
environment?

--
Sergiu


signature.asc
Description: PGP signature
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Suggestion: programs are *always* in the path

2017-05-01 Thread Sergiu Ivanov

Hello,

Thus quoth  regiv...@gmail.com  at 09:55 on Mon, May 01 2017:
>
> If you enter a command, you want to run it.
>
> If the corresponding program is not installed, the command is a symbolic
> link to a script that says:
>
> _ download the program and its dependencies,
> _ install it,
> _ run it.
>
> The speed of installation and execution is optimal because the script
> already knows what to download and install.

What about executables provided by multiple packages?

What about typos?  I sometimes type dc (calculator) instead of cd, but I
don't have nor want to have dc on my machine.

What about a script myScript I wrote which happens to have the same name
as an executable provided by a package, and which I erroneously tried to
run using myScript directly, instead of typing ./myScript?

Note that typing commands in a local command line is a use case quite
different from typing URLs in a browser: the commands are way shorter
and the risk of confusion is much higher.

--
Sergiu


signature.asc
Description: PGP signature
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] [Help] Accidentally removed configuration.nix

2017-04-06 Thread Sergiu Ivanov

Thus quoth  ni...@vince.lol  at 15:46 on Thu, Apr 06 2017:
>
> Does anyone know why `system.copySystemConfiguration` is set to false
> by default? It seems like it would be better to default this to true,
> right?

I had the same question floating around my brain.

> Anyway, I'll be okay, thanks folks!!

Great news!

--
Sergiu


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] [Help] Accidentally removed configuration.nix

2017-04-06 Thread Sergiu Ivanov

Hi Vince,

Thus quoth  ni...@vince.lol  at 14:12 on Thu, Apr 06 2017:
>
> I acidentally removed my /etc/nixos/configuration.nix is there any way
> I can get it back?

Citing directly from:

  
http://stackoverflow.com/questions/28603773/recover-accidentally-deleted-configuration-nix-file

  '''
  system.copySystemConfiguration

  If enabled, copies the NixOS configuration file $NIXOS_CONFIG (usually
  /etc/nixos/configuration.nix) to the system store path.

  Type:"boolean"

  Default:false

  Declared by:  
  '''

Do you happen to have this option set to true?


/me goes and sets it to true on his system

--
Sergiu


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] Trouble building qtbase-5.8.0 from master (installing qutebrowser)

2017-03-19 Thread Sergiu Ivanov

Hi Vladimir,

Thus quoth  Vladimír Čunát  at 10:12 on dom, mar 19 2017:
> On 03/18/2017 09:44 PM, Sergiu Ivanov wrote:
>
>>   applying patch /nix/store/vzr5m4d4czacfr99bc5hmrjs3hs1xia6-qtbase
>>   patch:  Only garbage was found in the patch input.
>
> This was fixed by 36de745e1b.

Excellent! I confirm that patches are now properly applied.

Thanks a lot!

--
Sergiu


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] Trouble building qtbase-5.8.0 from master (installing qutebrowser)

2017-03-18 Thread Sergiu Ivanov

Hello,

I'm trying to install the latest qutebrowser form my local checkout of
nixpkgs using the following command:

  nix-env -f ~/nixpkgs -i qutebrowser

This pulls qtbase-5.8.0, which has trouble building:

  applying patch /nix/store/vzr5m4d4czacfr99bc5hmrjs3hs1xia6-qtbase
  patch:  Only garbage was found in the patch input.

I attach the full output of nix-env on the _second_ run (that is, it
only describes the attempt of building qtbase).

Could someone give me a hand in debugging/fixing the issue?  qtbase
packaging goes across many .nix files; I have trouble finding the origin
of the issue :-(

(I seem to have a pretty reliable Internet connection, the relevant
patch files in /nix/store seem fine.)

--
Sergiu


qutebrowser-build.log
Description: Binary data


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] Install texlive on 16.09

2016-11-06 Thread Sergiu Ivanov

Thus quoth  Ruben Astudillo  at 01:45 on Sun, Nov 06 2016:
>
> The other replies answered that, I want to address how to deal with
> "subhierarchies" in nixpkgs. You could clone the nixpkgs repo and search
> from there, but it is easy to get lost. The alternative I like is
> getting familiar with nix-repl, available with `nix-shell -p nix-repl`

Aaah, that seems very useful!

I will absolutely start using nix-repl :-) Thanks Ruben !

-- 
Sergiu


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] Install texlive on 16.09

2016-11-05 Thread Sergiu Ivanov

Thus quoth  laverne  at 16:20 on Sat, Nov 05 2016:
>
> On 16.03, one could do `nix-env -iA nixos.texLive` to get it, but that entry 
> is not in all-packages.nix anymore.

I believe that way of installing TeXLive is gone for good.

> I took a stab at installing it with `nix-env -iA nixos.texlive.combined`. 
> This churned for a long time and finally finished with this message

The following worked for me a couple months ago:

 nix-env -i -A 'nixos.pkgs.texlive.combined.scheme-full'


> I think that this is the wrong way to install what I want, but if it is, how 
> does one resolve this issue?

Do you want the full TeXLive distribution?

Apparently, there are a couple schemes available, and you can also build
yours relatively easily.  I haven't tried that yet though.

-- 
Sergiu


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-commits] [NixOS/nixpkgs] 45459c: bibtex2html: init at 1.98

2016-10-19 Thread Sergiu Ivanov
  Branch: refs/heads/master
  Home:   https://github.com/NixOS/nixpkgs
  Commit: 45459c1c278f0a88d1d2b34a821b8801d3240c40
  
https://github.com/NixOS/nixpkgs/commit/45459c1c278f0a88d1d2b34a821b8801d3240c40
  Author: Sergiu Ivanov <siva...@colimite.fr>
  Date:   2016-10-19 (Wed, 19 Oct 2016)

  Changed paths:
A pkgs/tools/misc/bibtex2html/default.nix
M pkgs/top-level/all-packages.nix

  Log Message:
  ---
  bibtex2html: init at 1.98


___
nix-commits mailing list
nix-comm...@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-commits


Re: [Nix-dev] [NixDev] buildFHSUserEnv, network problems

2016-09-22 Thread Sergiu Ivanov

Thus quoth  Nikolay Amiantov  at 12:25 on Do, Sep 22 2016:
>
> Good to hear you solved it! BTW, I don't get anything when trying to
> curl nix.org (seems like packets are dropped) -- interesting...

Not sure how relevant this is, but I get 302 Found when I curl nix.org:

$ curl nix.org



302 Found

Found
The document has moved http://nix.org/cgi-sys/suspendedpage.cgi;>here.


-- 
Sergiu


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] Override bash or submit alternative bash pkgs to nixpkgs?

2016-09-09 Thread Sergiu Ivanov

Hello Matthias,

Thus quoth  Matthias Beyer  at 12:51 on Fr, Sep 09 2016:
>
> I want to try out a patched bash:
>
> https://github.com/calid/bash
>
> because of the enhanced prompt indicators for vi-mode:
>
> https://github.com/calid/bash#bash-with-configurable-mode-strings
>
> The bash is not changed from the original bash, as far as I can see, 
> it just uses this modified readline:
>
> https://github.com/calid/readline/tree/modestrs-bash-embedded
>
> My question is: What would be my approach in trying this out?

I would suggest patching readline locally and rebuilding bash against
your patched version.  I would do it in the following way:

 1. Git clone the nixpkgs tree: https://github.com/NixOS/nixpkgs

 2. Modify readline to include the patch
 
https://github.com/NixOS/nixpkgs/tree/master/pkgs/development/libraries/readline

 3. Reinstall bash (and readline) from your local copy.

I like using [0] for quick reference.  [1] is more detailed but way
longer.

> Or would it be better so submit a modification to readline so one can 
> build bash with the modified readline right from the nixpkgs 
> repository?

I'm not really knowledgeable on that, but I believe that people around
here welcome contributions to nixpkgs, so, after making sure your
modified readline package works, you can submit the change to the
official source tree.

You can probably add an option to readline saying whether the patch
should be applied or not.

-- 
Sergiu

[0] https://nixos.org/wiki/Create_and_debug_nix_packages

[1] https://nixos.org/nixpkgs/manual/


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] Build a default.nix for a project with node.js and python dependencies

2016-09-07 Thread Sergiu Ivanov

Thus quoth  zimbatm  at 11:32 on Mi, Sep 07 2016:
>
> And I think there are some for Perl/CPAN, Ocaml/??? and .NET/Nuget too.

OCaml's package manager is OPAM [0].

> It would be nice if we could come up with a universal XXX2nix that has a
> unified interface, but then it's probably a lot of work to find the lowest
> common denominator. All of those tools also generate different nix outputs,
> some just generate the repository metadata, some also generate an
> accompanying default.nix.

Well I suppose having all these tools generate the same Nix output will
be good enough.

Universal solutions tend to be difficult to write and maintain.

-- 
Sergiu

[0] https://opam.ocaml.org/


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] Fwd: Failed: Hydra job nixpkgs:trunk:adb-sync.x86_64-darwin

2016-09-06 Thread Sergiu Ivanov

Thus quoth  Vladimír Čunát  at 08:58 on Di, Sep 06 2016:
> On 09/06/2016 12:42 AM, Sergiu Ivanov wrote:
>> Is there a way to debug such Hydra failures?
>
> Looking again, Hydra reports "output limit exceeded". I didn't know we
> had such explicit limits. Just the unpacked tarball *is* relatively
> large > 200 MB.

Indeed.

I tried checking how androidsdk, adb-sync's main dependency, was built
by Hydra, and it turns out it isn't (hydraPlatforms is set to [] in
androidsdk.nix).  So I copied that line from androidsdk.nix and also
narrowed down the supported platforms to those supported by
androidsdk.nix [0].

I also removed preferLocalBuild = true, thanks again for the
explanation.

-- 
Sergiu

[0] https://github.com/NixOS/nixpkgs/pull/18375


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] Fwd: Failed: Hydra job nixpkgs:trunk:adb-sync.x86_64-darwin

2016-09-05 Thread Sergiu Ivanov

Thus quoth  Vladimír Čunát  at 22:08 on Mo, Sep 05 2016:
> On 09/03/2016 10:47 PM, Sergiu Ivanov wrote:
>>
>>  - I set preferLocalBuild to true, which, in my understanding, should
>>have prevented Hydra from trying to build a binary version of my
>>package,
>
> That's a misunderstanding. `preferLocalBuild` is a hint to the
> nix-daemon that it shouldn't use remote build slaves for the derviation.
> To disable a build on Hydra specifically, you can use
> meta.hydraPlatforms (overriding meta.platforms).

Aah, okaay, I see!

Thanks a lot for the explanation!

>>  - when I look at the build log
>>https://hydra.nixos.org/build/39776835/nixlog/3 I only see a few
>>messages, which do not even seem related to my package.
>
> It really seems more like a dependency failed in an unusual way. (I
> assume the unusual kind of failure is why it wasn't marked as
> "dependency failed" but "failed".) It seems plausible that
> sysimg-armeabi-v7a-23 is a dependency of adb-sync.

Oh, I should congratulate myself on being particularly blind and not
noticing the package sysimg-armeabi-v7a-23 on the report page.  Indeed,
adb-sync depends on ADB (Android Debug Bridge) which indeed needs ARM
ABI.

My first instinct was to remove Darwin from the list of platforms
supported by adb-sync, but then I realised that androidsdk should
actually build fine on this platform.


Is there a way to debug such Hydra failures?

I don't have anything Darwin-like at hand, and I can't see which part of
my package (adb-sync) exactly may cause the issue.

-- 
Sergiu


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] No patchShebangs in lyx/default.nix

2016-09-03 Thread Sergiu Ivanov

Hello,

I have a couple rather simple questions about lyx/default.nix which are
certainly due to my ignorance.

The postFixup phase in this file is defined as follows:

  postFixup = ''
sed '1s:/usr/bin/python:${python}/bin/python:'

wrapProgram "$out/bin/lyx" \
  --prefix PATH : '${python}/bin'
  '';

The package installs just fine, lyx is wrapped all right.  However, when
I run the sed command from this script in my terminal (not in
nix-shell), it blocks waiting for input.

Is postFixup run with standard input set on one of the files in the
output directory?


Furthermore, this sed line seems to be patching the shebang of the
script.  Would it be maybe more appropriate to use patchShebangs
instead? (kudos to FRidh for telling me about this function)

I can do the change and file a pull request if that seems appropriate.

-- 
Sergiu


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] Fwd: Failed: Hydra job nixpkgs:trunk:adb-sync.x86_64-darwin

2016-09-03 Thread Sergiu Ivanov

Hello,

I have just received the following message from Hydra:

Thus quoth  Hydra Build Daemon  at 19:07 on Sa, Sep 03 2016:
>
> The status of Hydra job ‘nixpkgs:trunk:adb-sync.x86_64-darwin’ is "Failed".  
> For details, see
>
>   https://hydra.nixos.org/build/39776835
>
> Go forth and fix it.

I feel somewhat puzzled because:

 - I set preferLocalBuild to true, which, in my understanding, should
   have prevented Hydra from trying to build a binary version of my
   package,

 - when I look at the build log
   https://hydra.nixos.org/build/39776835/nixlog/3 I only see a few
   messages, which do not even seem related to my package.

Am I doing something wrong?

-- 
Sergiu


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] Package a Simple Python Script

2016-09-01 Thread Sergiu Ivanov

Hi Roland,

Thank you for your answer!

Sorry for the big delay: I didn't want to reply back before I had some
definite conclusion.

Thus quoth  Roland Koebler  at 02:39 on So, Aug 28 2016:
>
>> I am trying to package adb-sync [0], which is essentially a Python
>> script.  I can easily write a default.nix taking this script from the
>> source directory and putting it into $out/bin (cf. attached file).  I
>> have some trouble with this approach though: the _runtime_ dependencies
>> (Python and Android SDK) are not installed.
> Have you tried to use "propagatedBuildInputs" instead of "buildInputs"?
>
> See: https://nixos.org/nixpkgs/manual/#sec-python
>
> As in Perl, dependencies on other Python packages can be specified
> in the buildInputs and propagatedBuildInputs attributes. If
> something is exclusively a build-time dependency, use buildInputs;
> if it’s (also) a runtime dependency, use propagatedBuildInputs.

Oh, I see, I had only read the explanation of propagatedBuildInputs in
the description of mkDerivation, and I thought this attribute was only
relevant for building something else against my package.  Yet, just as
you point out, apparently it may be used to specify runtime dependencies
for Perl and Python packages.


I played around with propagatedBuildInputs until I realised that, even
though Nix would pull in Python for my package, Python would not appear
on my PATH because I don't install it explicitly.  Moreover, Nix would
also pull in Python if I specified it in buildInputs already.  Therefore
I managed to solve my problem essentially by patching the shebang line.

My current solution is this pull request [0].

-- 
Sergiu

[0] https://github.com/NixOS/nixpkgs/pull/18189/files


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] Unwanted, unannounced reboot

2016-08-30 Thread Sergiu Ivanov

Thus quoth  Matthias Beyer  at 16:40 on Di, Aug 30 2016:
>
> Also this happened only when plugged in by now.

One of my machines (a model different from yours) would turn off at
random times.  I "solved" the issue by pulling the battery out and
leaving the laptop on AC power all the time.  Apparently, I have a badly
built machine :-)

You could perhaps try a similar experiment and see what happens.

-- 
Sergiu


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] Unwanted, unannounced reboot

2016-08-30 Thread Sergiu Ivanov

Hello Matthias,

Thus quoth  Matthias Beyer  at 14:31 on Di, Aug 30 2016:
>
> this is the third time I got a unwanted, unannounced reboot of my 
> Thinkpad X220. The device just went off and rebooted.
[...]
> Aug 30 13:16:23 yuu kernel: audit: type=1326 audit(1472555783.141:55628): 
> auid=1000 uid=1000 gid=100 ses=1 pid=27538 comm="chromium" 
> exe="/nix/store/28b56yiqshs8kvnha23vvwp0m4rlyyis-chromium-52.0.2743.116/libexec/chromium/chro
> -- Reboot --
[...]

Just a wild guess: there's lots of chromium-related messages in your
logs.  Do you happen to know if the reboots happen when you are _not_
running chromimum?

-- 
Sergiu


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] 6 month C4 adoption period

2016-08-29 Thread Sergiu Ivanov

Hello,

Thus quoth  stewart mackenzie  at 01:28 on Di, Aug 30 2016:
>
> due to multiple causes, but the latest straw on the camel's back is
> this pull request: https://github.com/NixOS/nixpkgs/pull/18101

If you want any policy adopted, I suppose you should provide clear
argumentation, including listing the problems that this new policy
should solve.  You should also explain what this new policy is supposed
to change with respect to the way things work right now.

Unfortunately, your arguments now look a lot like messages of
frustration (which I can understand), but I hope you can also understand
that that does not look like enough justification for an adoption of a
policy by an entire community.

-- 
Sergiu


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] Package a Simple Python Script

2016-08-27 Thread Sergiu Ivanov

Hello,

I am trying to package adb-sync [0], which is essentially a Python
script.  I can easily write a default.nix taking this script from the
source directory and putting it into $out/bin (cf. attached file).  I
have some trouble with this approach though: the _runtime_ dependencies
(Python and Android SDK) are not installed.

What would be the Nix-ish way of handling such a situation?

I tried playing with buildInputs, but, of course, this doesn't really
help with runtime dependencies.

I would like to avoid creating a pip package if possible (to avoid extra
maintenance effort).

-- 
Sergiu

[0] https://github.com/google/adb-sync


default.nix
Description: Binary data


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] HP Network Printer (CUPS + HPLIP)

2016-03-14 Thread Sergiu Ivanov

Hello,

I'm trying to set up CUPS to use a HP LaserJet Enterprise 600 M602 [0]
on my NixOS system.  Here is the relevant snippet of my
configuration.nix (taken from the wiki [1]):

  services.printing = {
enable = true;
drivers = [ pkgs.hplip ];
  };

hp-setup does not detect the printer and says "No devices found on this
bus: net".

In Web administration interface for CUPS, I click "Add Printer" then I
select HP Printer (HPLIP) and I specify socket://192.168.0.11 as
connection string (I can ping this address). Then, when I get to the
screen giving the list of models, I *cannot* see the model of my
printer, even though the directory

  $(nix-build '' --no-out-link -A hplip)/share/ppd/HP/

contains a file hp-laserjet_600_m601_m602_m603-ps.ppd.gz .

I gunzip this file in a temporary folder and load it explicitly via the
CUPS Web interface.  Then, when I tell the Web interface to print a test
page, the job fails with the message 'stopped "Filter failed"'.

How would you normally set up HPLIP to work correctly with CUPS?

(I think I used to install foomatic on Arch Linux, but I'm not sure any
more.)

-- 
Sergiu

[0] 
http://hplipopensource.com/hplip-web/models/laserjet/hp_laserjet_600_m602.html

[1] https://nixos.org/wiki/Printers


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] New Tex Live Packaging: Installing Libertine Fonts

2016-03-12 Thread Sergiu Ivanov

Thus quoth  Vladimír Čunát  at 12:33 on сб, бер 12 2016:
> On 03/12/2016 12:09 PM, Sergiu Ivanov wrote:
>> If I add the lines
>> 
>>   texlive.combine {
>> inherit (texlive) scheme-full;
>>   };
>> 
>> to my configuration.nix, I am supposed to get a full TeX Live
>> distribution, right?
>
> Yes. We used to have a bug that wouldn't allow this due to it being too
> many thousands of packages, but that should be fixed for months IIRC.

Yeah, I had no problem installing everything.  It was even faster than
what I expected after your phrase about "many thousands of packages" ;-)

> This `combine` style with attr-maps is a rather non-standard approach
> that I just created somehow for texlive.

It looks pretty cool in that it allows you to define package schemes you
want to install, and it's probably not its only advantage.  Thanks for
the great work :-)

>> Is there a way to do that in my user profile using nix-env? Something
>> like nix-env -i "texlive.combine { ... }"?
>
> Typically we add `-A attr-name` (instead of common names); here one
> would have to use `-E expression`. More details are in docs, e.g. `man
> nix-env` or in html.

Thank you!  The command

  nix-env -i -A 'nixos.pkgs.texlive.combined.scheme-full'

has pulled the full distribution, including the version of Linux
Libertine which solves my issues with small caps.

However, in order to make fontconfig see the installed fonts, I had to
manually add the line

 ~/.nix-profile/share/texmf/fonts/  

to my ~/.config/fontconfig/fonts.conf.  I suppose, this directory would
have been registered in the global /etc/fonts/fonts.conf had I installed
texlive via my configuration.nix?

-- 
Sergiu


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] Linux Libertine: Source vs. OTF

2016-03-12 Thread Sergiu Ivanov

Hello Vladimír,

Thanks for your answer and sorry for taking so much time to respond.

Thus quoth  Vladimír Čunát  at 21:14 on Wed, Mar 09 2016:
> On 03/09/2016 10:04 AM, Sergiu Ivanov wrote:
>> I have installed linux-libertine-5.3.0 and am having quite a bit of
>> trouble with the fonts and XeLaTeX:
>
> Note that the new texlive packaging includes the `libertine` package
> which also contains latex class for it etc. It might solve the problems.
>
> (If you don't know this texlive packagin, basic user docs is at:
> https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/typesetting/tex/texlive-new/default.nix#L1
> )

I skimmed over the file a couple times, but I'm not yet fluent with Nix,
so I'm afraid I'll have some questions.

If I add the lines

  texlive.combine {
inherit (texlive) scheme-full;
  };

to my configuration.nix, I am supposed to get a full TeX Live
distribution, right?

Is there a way to do that in my user profile using nix-env? Something
like nix-env -i "texlive.combine { ... }"?

>> Is there a specific reason to install Linux Libertine from source,
>> instead of just downloading the pre-built OTF/TTF/whatever files?
>
> I don't know that.

OK, thanks for feedback.

> On desktop the fonts seemed to always work fine for
> me, including accented letters (CZ).

I suppose you're talking about the new packaging, and not the
stand-alone linux-libertine package?

-- 
Sergiu


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] Linux Libertine: Source vs. OTF

2016-03-09 Thread Sergiu Ivanov

Hello,

I have installed linux-libertine-5.3.0 and am having quite a bit of
trouble with the fonts and XeLaTeX:

 - small caps are not included into Linux Libertine O font face, by
   default, so I have to use something like
 \setmainfont[SmallCapsFont={Linux Libertine Initials O}]{Linux Libertine O}
   even though, normally, this is not required,

 - even if I set the small caps font explicitly, I get weird rendering
   effects: \textsc{H} will make the capital H quite blurry, with some
   weird contour around it,

 - non-Latin small caps are missing: I get a box with a cross when I do
   \textsc{ă}.

Looking at the definition of the package [0], I noticed that the fonts
are built from source _locally_.  On an impulse, I threw together a
package that downloads OTF files directly (thus, nothing is build
locally).  Weirdly enough, it solved all my problems: the fonts behaved
just as I expected.  I have texlive-full on my machine.

Has anyone else experienced anything like this?

Is there a specific reason to install Linux Libertine from source,
instead of just downloading the pre-built OTF/TTF/whatever files?

-- 
Sergiu

[0] 
https://github.com/NixOS/nixpkgs/blob/0b3becb2697a8d0a00344cc3370a7d7ad67290fc/pkgs/data/fonts/libertine/default.nix


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] Systemd User Timers: timerConfig section?

2016-02-19 Thread Sergiu Ivanov

Thus quoth  Guillaume Maudoux (Layus)  at 14:25 on Fr, Feb 19 2016:
>
> There is also systemd.services..startAt
> 
> that creates the timer for you :-).

Ah, that's cool, thank you!

I didn't know OnCalendar (which seems to get the value of startAt
eventually) could do _that_ as well :-)

Using startAt seems to be an even more compact solution of my problem.

-- 
Sergiu


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] Systemd User Timers: timerConfig section?

2016-02-19 Thread Sergiu Ivanov

Hello Cristoph, hello Kevin,

Thus quoth  Christoph Hrdinka  at 13:22 on Fr, Feb 19 2016:
>
> systemd timers are defined via systemd.timers. (systemwide) or
> systemd.user.timers. (per user) and not within *.services.*.

Ahhh, indeed!  Wrote my E-mail to fast, didn't notice that part in the
documentation/code :-( Thanks a lot for your quick responses and
detailed examples!

(I was considering contributing a patch, but that part will have to wait
for another occasion ;-) )

-- 
Sergiu


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] Systemd User Timers: timerConfig section?

2016-02-19 Thread Sergiu Ivanov

Hello,

I am trying to set up a (custom) systemd timer running a task every
5 minutes.  From what I can see, relying on system.user.services.myTimer
might be the way to go, but I can only see the option startAt available,
which starts my unit at a given date/time and therefore does not really
fit my needs.

Is there a way to define other timer attributes?

(I looked for timerConfig, which would be similar to serviceConfig or
unitConfig, but it doesn't seem to exist.)

What is the recommended way to go for such periodic tasks under NixOS?
Do you guys all prefer cron?

-- 
Sergiu


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] Correct XMonad Configuration

2016-01-12 Thread Sergiu Ivanov

Hello,

Thus quoth  Taeer Bar-Yam  at 17:39 on lun, ene 11 2016:
> Are you on the unstable channel? You might want to consider switching to it.
> Using:
> $ nix-channel --remove nixos
> $ nix-channel --add https://nixos.org/channels/nixos-unstable nixos
>
> I ran into the same exact issue, and I'm pretty sure there was a workaround 
> using the stable channel (which I don't remember, sorry), but that this 
> problem has been actually fixed in the unstable channel, and in fact, this is 
> my entire xmonad setup (in configuration.nix):
> windowManager.default = "xmonad";
> windowManager.xmonad = {
>   enable = true;
>   enableContribAndExtras = true;
> };
> I don't even need extraPackages.

Thanks a lot Taeer!  Switching to the unstable channel worked like a
charm!

> Correction: perhaps this will help: https://github.com/NixOS/nixos/issues/194
> That is, try adding pkgs.xlibs.xmessage to environment.systemPackages

Oh, I'd seen that page, but it didn't occur to me that adding xmessage
could solve the problem of unavailability of the XMonad module O_O

Anyway, living off nixos-unstable is perfectly fine.  I hesitated
initially, but now that I started asking questions and that I have two
very small packages I bundled on my own, I guess staying on the unstable
channel would be a good idea.

-- 
Sergiu


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] Correct XMonad Configuration

2016-01-11 Thread Sergiu Ivanov

Dear NixOS Community,

My name is Sergiu; I teach Computer Science and do research in
Theoretical Computer Science.  I have some experience with Haskell
development.  I came across NixOS quite some time ago and now I finally
have the opportunity to install it and maybe even try to contribute :-)

I attach my configuration.nix; here's the XMonad-related snippet:


  services.xserver.windowManager.xmonad = {
enable = true;
enableContribAndExtras = true;
extraPackages = self: [
  self.xmonad-contrib
  self.xmonad-extras
];
  };


When I try to xmonad --recompile the following xmonad.hs:


  import XMonad
  main = xmonad defaultConfig
 { terminal = "termite"
 , modMask = mod4Mask
 , focusedBorderColor = "blue"
 }


I get the error message that the module XMonad could not be found.

I would like to minimise the number of Haskell packages installed at the
system level, so I don't add any to environment.systemPackages.  Yet,
adding xmonad, xmonad-contrib, and xmonad-extras to
environment.systemPackages (and haskellPlatform, FWIW) doesn't change
anything for me (I still get the error).

I tried cabal installing xmonad, xmonad-contrib, and xmonad-extras in a
Cabal sandbox, but I got an error about missing X11 libraries.

I haven't tried ghcWithPackages yet, because I'm really not sure it's
going to help me: after all, I'm not compiling my xmonad.hs with GHC (at
least I don't seem to be).  And then people seem to have been able to
address the issue without ghcWithPackages [0].

Do you see anything flagrant with my setup?

-- 
Sergiu



configuration.nix
Description: Binary data

[0] https://github.com/NixOS/nixos/issues/194


signature.asc
Description: PGP signature
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev