Re: [Nix-dev] less: When assumptions ruin the world

2015-01-02 Thread Michael Jones
If it helps at all, git seems to use GIT_PAGER first and then falls back to
PAGER and then to `less` for the commands that use it. Perhaps nix could
respect a NIX_PAGER env var?

To me it depends on the output of the command. I love that git pages the
output of `git log` automatically but that is because I generally want to
see the most recent commits first. I don't mind that `apt-cache search
` isn't paged as the top of the list is no more specifically relevant
than the bottom and I can scroll up in the terminal.

Michael

On Fri, Jan 2, 2015 at 11:46 AM, Paul Colomiets  wrote:

> Hi,
>
> On Fri, Jan 2, 2015 at 1:37 PM, Ertugrul Söylemez  wrote:
> > No, they can't choose.  I would choose to use `less` as a pager when I
> > need it, and otherwise I would use my terminal.  I can't make that
> > choice without corrupting the PAGER variable (which I use for other
> > things!).
> >
>
> I'm not a fan of using less for nix tools. But it seems you're
> inconsistent here. Which other programs use $PAGER for legitimate
> reasons? And what reasons are good for that? I'm asking not to insult
> you, but rather to make my own future decisions better.
>
>
>
> --
> Paul
> ___
> 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


[Nix-dev] GHC Panic with basic Yesod project under Nix

2014-11-14 Thread Michael Jones
Hi,

Not sure where to send this so thought I'd try here to see if anyone has
the same trouble. I'm new to nix and new to Yesod and trying to build the
default Yesod project with 'yesod devel' in a new shell.

My steps are:

1. Create a new directory with default.nix:

{ haskellPackages ? (import  {}).haskellPackages }:

let inherit (haskellPackages);

in with haskellPackages; cabal.mkDerivation (self: {
  pname = "cal";
  version = "0.0.1";
  src = ./.;
  buildDepends = with haskellPackages; [
yesod yesodStatic yesodTest
yesodBin
hjsmin persistentSqlite hspec
];
  buildTools = with haskellPackages; [ cabalInstall ];
})

2. Run 'nix-shell'
3. Run 'yesod init' & fill in 
4. 'cd '
5. 'yesod devel'

Fails with:

Yesod devel server. Press ENTER to quit
Resolving dependencies...
Configuring tmp-0.0.0...
Forcing recompile for ./Foundation.hs because of config/routes
Forcing recompile for ./Foundation.hs because of messages/en.msg
Forcing recompile for ./Foundation.hs because of
templates/default-layout-wrapper.hamlet
Forcing recompile for ./Foundation.hs because of
templates/default-layout.hamlet
Forcing recompile for ./Handler/Home.hs because of templates/homepage.hamlet
Forcing recompile for ./Handler/Home.hs because of templates/homepage.julius
Forcing recompile for ./Handler/Home.hs because of templates/homepage.lucius
Rebuilding application... (using cabal)
ghc: panic! (the 'impossible' happened)
  (GHC version 7.8.3 for x86_64-unknown-linux):
Loading temp shared object failed:
/run/user/1000/ghc11470_0/ghc11470_25.so: failed to map segment from shared
object: Operation not permitted

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

Is anyone in a position to offer advice? I've run:

nix-channel --update

as well to hopefully get the latest?

Any help would be much appreciated,
Michael
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Terminfo issues with haskell 'vty' package & nix-shell

2014-11-14 Thread Michael Jones
Hi,

Thanks for the additional info. If I correctly set TERMINFO to my ubuntu
terminfo folder (/lib/terminfo) or if I install rxvt-unicode via nix and
use that as it properly references it's own terminfo information. Though if
I try to use the nix rxvt-unicode I get the following fontconfig errors:

Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70:
non-double matrix element
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70:
non-double matrix element
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line
78: saw unknown, expected number

Which from some googling suggests that the fontconfig library being used by
nix my be a little old. The nix file for it does reference 2.10.2:


https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/fontconfig/default.nix#L4

Which is 2 years old at this point:

http://cgit.freedesktop.org/fontconfig/

I don't know what the results of updating it might be or how to go about
testing it locally. If anyone can point me at an effective guide for that
I'd be happy to try.

Thanks again for all the help,
Michael

On Fri, Nov 14, 2014 at 10:02 AM, Kirill Elagin  wrote:

> Hm, by the way `TERMINFO` gets set by urxvt itself, so that’s probably not
> what causes the problem.
>
>
> On Fri Nov 14 2014 at 13:59:05 Kirill Elagin  wrote:
>
>> On Thu Nov 13 2014 at 20:20:53 Michael Jones 
>> wrote:
>>
>>> Hi,
>>>
>>> I hope this is the right list. I'm very new to nix and trying to get a
>>> set up working on Ubuntu 14.04 for a small haskell project I have. I use
>>> rxvt-unicode as a shell which generally seems to work fine but when I run
>>> `nix-shell` in a directly with the following `default.nix` file:
>>>
>>> { haskellPackages ? (import  {}).haskellPackages }:
>>>
>>> let
>>>   inherit (haskellPackages);
>>>
>>> in
>>>   with haskellPackages; cabal.mkDerivation (self: {
>>> pname = "jump";
>>> version = "0.0.0";
>>> src = ./.;
>>> buildDepends = with haskellPackages; [ vty ];
>>> buildTools = with haskellPackages; [ cabalInstall ];
>>>   })
>>>
>>> I get the following error when running `tput`:
>>>
>>> [nix-shell:~/root/projects/jump]$ tput setaf 7
>>> tput: unknown terminal "rxvt-unicode"
>>>
>>
>> That’s strange, could you check what does `env` in the nix-shell look
>> like?
>> The variable of interset is `TERMINFO_DIRS`.
>>
>> (And for some reason `TERMINFO` also gets set which looks wrong to me.
>> This might or might not be a bug…)
>>
>>
>>> I'm afraid I'm sufficiently clueless that I don't know how to deal with
>>> this. I'm guessing that the terminfo information for nix's bash needs to be
>>> in another folder and that the haskell 'vty' package's dependency on
>>> ncurses might be confusing things. Does anyone have any recommendations on
>>> how to investigate this further? I love the idea of nix and I'd like to get
>>> past this.
>>>
>>> My rxvt-unicode is from Ubuntu rather than a nix install. I did try to
>>> install it from nix using the recommendation from
>>> http://nixos.org/nixos/packages.html but I get:
>>>
>>> $ nix-env -iA nixos.pkgs.rxvt_unicode
>>> error: attribute ‘nixos’ in selection path ‘nixos.pkgs.rxvt_unicode’ not
>>> found
>>>
>>> Any further help would also be appreciated :)
>>>
>>> Cheers,
>>> Michael
>>> ___
>>> 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] Terminfo issues with haskell 'vty' package & nix-shell

2014-11-13 Thread Michael Jones
Much appreciated, I can now see why there is a '(NixOS Channel)' annotation
by the entry on the packages page. Still I find that far from obvious, it
might be best if there was a link with an explanation for the confused :)
Kind of you to help though, thank you!

I do indeed have a channel named nixpkgs instead.

Michael

On Thu, Nov 13, 2014 at 7:01 PM, Vladimír Čunát  wrote:

> Hi,
> I don't know where terminfo is searched.
>
> On 11/13/2014 05:20 PM, Michael Jones wrote:
>
>> $ nix-env -iA nixos.pkgs.rxvt_unicode
>> error: attribute ‘nixos’ in selection path ‘nixos.pkgs.rxvt_unicode’ not
>> found
>>
>
> The 'nixos' in the example is the channel name. You would probably name
> your channel nixpkgs (depends on you); you can check by nix-channel --list.
> My example:
> $ nix-channel --list
> nixos https://nixos.org/channels/nixos-unstable
>
> Vladimir
>
>
>
> ___
> 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


[Nix-dev] Terminfo issues with haskell 'vty' package & nix-shell

2014-11-13 Thread Michael Jones
Hi,

I hope this is the right list. I'm very new to nix and trying to get a set
up working on Ubuntu 14.04 for a small haskell project I have. I use
rxvt-unicode as a shell which generally seems to work fine but when I run
`nix-shell` in a directly with the following `default.nix` file:

{ haskellPackages ? (import  {}).haskellPackages }:

let
  inherit (haskellPackages);

in
  with haskellPackages; cabal.mkDerivation (self: {
pname = "jump";
version = "0.0.0";
src = ./.;
buildDepends = with haskellPackages; [ vty ];
buildTools = with haskellPackages; [ cabalInstall ];
  })

I get the following error when running `tput`:

[nix-shell:~/root/projects/jump]$ tput setaf 7
tput: unknown terminal "rxvt-unicode"

I'm afraid I'm sufficiently clueless that I don't know how to deal with
this. I'm guessing that the terminfo information for nix's bash needs to be
in another folder and that the haskell 'vty' package's dependency on
ncurses might be confusing things. Does anyone have any recommendations on
how to investigate this further? I love the idea of nix and I'd like to get
past this.

My rxvt-unicode is from Ubuntu rather than a nix install. I did try to
install it from nix using the recommendation from
http://nixos.org/nixos/packages.html but I get:

$ nix-env -iA nixos.pkgs.rxvt_unicode
error: attribute ‘nixos’ in selection path ‘nixos.pkgs.rxvt_unicode’ not
found

Any further help would also be appreciated :)

Cheers,
Michael
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev