[Nix-dev] Can't get powerline symbols working

2015-12-01 Thread Richard Wallace
I'm trying to get the powerline fonts working in vim the way it is
described for fontconfig <
https://powerline.readthedocs.org/en/latest/installation/linux.html#fontconfig>
and am having issues. I've put the PowerlineSymbols.otf file in my
~/.local/share/fonts directory and the 10-powerline-symbols.conf file in my
~/.config/fontconfig/conf.d directory. But when I start up vim the symbols
aren't found. From what I've read, these should be the correct directories.
Are they? What else might I be missing?

I also tried installing the powerline package from nixpkgs, which installs
the font and configuration <
https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/python-packages.nix#L13409>,
but that doesn't work either.

For now I've fallen back to installing the powerline-fonts package and
using the patched version of DejaVu Mono, but that's less than ideal.

Any ideas how to get just the powerline symbols working with the plain old
DejaVu Mono font?

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


[Nix-dev] npm instlall phantomjs not working correctly

2015-10-05 Thread Richard Wallace
Hey folks,

I'm having problems running phantomjs in a project that uses it for
testing. When running `npm install` it gets installed correctly, but when I
try and run it I'm told "No such file or directory".

People on this issue <
https://github.com/karma-runner/karma-phantomjs-launcher/issues/31>
reported similar, and suggested that installing libfontconfig fixed it for
them. I have installed fontconfig via nix-env but that doesn't seem to have
helped.

Any suggestions?

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


Re: [Nix-dev] npm instlall phantomjs not working correctly

2015-10-05 Thread Richard Wallace
Thanks Brian, that did the trick!

On Mon, Oct 5, 2015 at 4:24 PM, Brian McKenna <puffnfr...@gmail.com> wrote:

> I've had this problem before.
>
> PhantomJS downloads and runs a binary. The binary it downloads doesn't
> point to an actual linker on NixOS (hence the no such file error).
>
> You can see this:
>
> $ ls -l $(patchelf --print-interpreter
> node_modules/phantomjs/lib/phantom/bin/phantomjs)
> ls: cannot access /lib64/ld-linux-x86-64.so.2: No such file or
> directory
>
> I think the solution is to have the nixpkgs phantomjs in your shell.
> Then npm install will say something like this:
>
> PhantomJS is already installed at
> /nix/store/r7hmkiz9ypbrs8liy7g660qvzxhdx0l4-phantomjs-1.9.8/bin/phantomjs.
>
> On 6 Oct 2015 5:24 am, "Richard Wallace" <rwall...@thewallacepack.net>
> wrote:
> >
> > Hey folks,
> >
> > I'm having problems running phantomjs in a project that uses it for
> testing. When running `npm install` it gets installed correctly, but when I
> try and run it I'm told "No such file or directory".
> >
> > People on this issue <
> https://github.com/karma-runner/karma-phantomjs-launcher/issues/31>
> reported similar, and suggested that installing libfontconfig fixed it for
> them. I have installed fontconfig via nix-env but that doesn't seem to have
> helped.
> >
> > Any suggestions?
> >
> > Thanks,
> > Rich
> >
> > ___
> > 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] Using chromium from nixpkgs on non-NixOS

2015-09-28 Thread Richard Wallace
Hey all,

I'm running Arch Linux on my desktop because I haven't been able to get
NixOS installed. It's an older Mac tower and last time I tried I ran into
issues . This is something I
hope to revisit in the near future, probably once 15.09 is released.

For now, I'm using nixpkgs as much as possible. Recently, I moved all the
packages I had installed as systemPackages on my laptop, which is running
NixOS, into an environment in .nixpkgs/config.nix <
https://github.com/purefn/dot-files/blob/master/dot/nixpkgs/config.nix> and
am managing them that way.

Because I share my dot-files on my laptop and desktop, this means that
chromium is now installed on my desktop through nixpkgs. When trying to
start chromium on my desktop I get the error

[28104:28104:0928/085508:FATAL:setuid_sandbox_host.cc(158)] The SUID
sandbox helper binary was found, but is not configured correctly. Rather
than run without sandboxing I'm aborting now. You need to make sure that
/nix/store/9c8019j611087855flmq7ll5jrhjpv4g-chromium-45.0.2454.93/libexec/chromium/chrome-sandbox
is owned by root and has mode 4755.
Aborted (core dumped)

Is there a workaround for this?

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


Re: [Nix-dev] systemd stdout logging

2015-06-28 Thread Richard Wallace
No, I didn't disable anything. Originally I didn't have the standardoutput
lines either, expecting it to go to the journal.

This is especially frustrating because the way the app behaves when run
from systemd is different than when run from the command line on that same
instance and I can't figure out why. I was hoping the logs would provide
some idea of why.

I wonder if the two are related. Maybe I can send the logs to a file.
On Jun 28, 2015 3:08 AM, Luca Bruno lethalma...@gmail.com wrote:

 Well it's weird, since even without that StandardOutput = journal; my
 services log to journalctl. You didn't disable journal storage or something
 like that, right?

 On Sun, Jun 28, 2015 at 7:48 AM, Richard Wallace 
 rwall...@thewallacepack.net wrote:

 I've got a service that I'm deploying with nixops. I've got a systemd
 service configured

  systemd.services.hiplambda = {
 description = HipLambda;
 wantedBy = [ multi-user.target ];
 after = [ network.target ];
 requires = [ postgresql.service ];
 environment = {
   PORT = 8080;
   BASE_URI = baseurl;
   MUEVAL_TIMEOUT = 8;
   DATABASE_URL = postgresql://localhost/hiplambda;
   PATH = ${ghc}/bin;
 };
 serviceConfig = {
   ExecStart = ${ghc}/bin/hiplambda;
   # For security reasons we'll run this process as a special
 'hiplambda' user
   User = hiplambda;
   Restart = always;
   StandardOutput = journal;
   StandardError = journal;
 };
   };

 The binary does it's logging to standard out and standard error, but
 nothing is appearing in the journal. I haven't been able to find any other
 logs. What am I missing?

 Thanks,
 Rich

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




 --
 NixOS Linux http://nixos.org

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


[Nix-dev] nixops deploying to libvirtd

2015-06-18 Thread Richard Wallace
Hello all,

I'm trying to get a project setup to deploy to libvirtd locally instead of
VirtualBox because I've grown a bit tired of VirtualBox being so buggy.
But I'm having issues getting the libvirtd deployment going and I'm hoping
someone can help me along.

I'm running NixOS on the host, so in my configuration.nix I added
virtualisation.libvirtd.enabled = true; and added my user into the
libvirtd group.

When trying to deploy the first time, I received the error

error: [Errno 13] Permission denied: '/var/lib/libvirt/images'

So I went off and created it with 770 perms owned by root:libvirtd. After
trying to deploy again, I get

error: [Errno 2] No such file or directory:
'/var/lib/libvirt/dnsmasq/default.leases'

I'm not sure what I need to do now, so I'm a bit stuck. Any advice?

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


Re: [Nix-dev] nixops virtualbox disk size

2015-06-16 Thread Richard Wallace
Where should that be configured? In the examples in the manual 
https://nixos.org/nixops/manual/#idm140737319351408 I tried adding it in
trivial.nix as 'virtualbox.baseImageSize = 50G;' and tried adding it to
trivial-vbox.nix as 'deployment.virtualbox.baseImageSize = 50G;' and
neither seemed to have an affect.

On Tue, Jun 16, 2015 at 11:25 AM, Joel Moberg joel.mob...@gmail.com wrote:

 There is, config.virtualbox.baseImageSize, defined here:

 https://github.com/nixos/nixpkgs/blob/master/nixos/modules/virtualisation/vir
 tualbox-image.nix#L13

 ___
 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] nixops virtualbox disk size

2015-06-16 Thread Richard Wallace
Unfortunately, that just creates an additional disk and is not used as the
root partition or for the /nix/store. If I could figure out how to get it
used for either of those that option would work great, but I haven't been
able to do that yet.

On Tue, Jun 16, 2015 at 12:06 PM, Joel Moberg joel.mob...@gmail.com wrote:

 I don't use nixops but after looking in the repo i found this:
 https://github.com/NixOS/nixops/blob/master/nix/virtualbox.nix#L42

 So it should be: virtualbox.disks.mydisk = { port=1; size=123123123; };

 Hope this works.

 On Tue, Jun 16, 2015 at 8:56 PM, Richard Wallace 
 rwall...@thewallacepack.net wrote:

 Where should that be configured? In the examples in the manual 
 https://nixos.org/nixops/manual/#idm140737319351408 I tried adding it
 in trivial.nix as 'virtualbox.baseImageSize = 50G;' and tried adding it
 to trivial-vbox.nix as 'deployment.virtualbox.baseImageSize = 50G;' and
 neither seemed to have an affect.

 On Tue, Jun 16, 2015 at 11:25 AM, Joel Moberg joel.mob...@gmail.com
 wrote:

 There is, config.virtualbox.baseImageSize, defined here:

 https://github.com/nixos/nixpkgs/blob/master/nixos/modules/virtualisation/vir
 tualbox-image.nix#L13
 https://github.com/nixos/nixpkgs/blob/master/nixos/modules/virtualisation/virtualbox-image.nix#L13

 ___
 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] nixops virtualbox disk size

2015-06-16 Thread Richard Wallace
How would that be used here?

On Tue, Jun 16, 2015 at 1:09 PM, Tomas Hlavaty t...@logand.com wrote:

 There is also virtualization.diskSize.
 ___
 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] nixops virtualbox disk size

2015-06-15 Thread Richard Wallace
I'm trying to use nixops to deploy a service to VirtualBox (and eventually
ec2). This service requires a very large /nix/store - it depends on a very
large number of Haskell packages. During the deploy, I eventually see

hiplambda exporting path
‘/nix/store/5a1flswypn2dsgdb4kcjv5f64811yshz-gnutls-3.3.15’
hiplambda exporting path
‘/nix/store/qa0sig9jnf0hp3n79z0n41xq6jdliszy-haskell-wl-pprint-extras-3.5.0.5’
hiplambda exporting path
‘/nix/store/5gpy13mqaqwfm13fbrbp1g6i52hhwidv-haskell-HaTeX-3.16.1.1’
hiplambda exporting path
‘/nix/store/cl2hziivsfs4sikbgigi29wzf1b4ydjb-haskell-hmatrix-0.16.1.5’
hiplambda error: preallocating file of 143861 bytes: No space left on
device
hiplambda exporting path
‘/nix/store/68j53bfhqja7pbwmxwjrl85244i3lsn3-haskell-hmatrix-repa-0.1.2.1’
hiplambda copying 120 missing paths (756.15 MiB) to ‘root@192.168.56.102
’...
hiplambda writing to file: Broken pipe at
/nix/store/xf667rba4zrg3iwfl7hn8caf2kjjwn4a-nix-1.9pre4153_b64988b/lib/perl5/site_perl/5.20.2/x86_64-linux-thread-multi/Nix/CopyClosure.pm
line 44.
error: command ‘['nix-copy-closure', '--to', 'root@192.168.56.102',
u'/nix/store/l3khfds5fdmflfrxbk65np5qdy3q0xsd-nixos-15.06pre-git']’ failed
on machine ‘hiplambda’ (exit code 32)

Sure enough, the root partition is filled up

$ nixops ssh hiplambda -d hiplambda
connecting to 192.168.56.102...
Last login: Mon Jun 15 05:25:55 2015 from 192.168.56.1

[root@hiplambda:~]# df
Filesystem   1K-blocks Used Available Use% Mounted on
/dev/disk/by-label/nixos  10189112 10152408 0 100% /
devtmpfs2027120202712   0% /dev
tmpfs  1013544 3028   1010516   1% /run
tmpfs  20270880   2027088   0% /dev/shm
tmpfs  2027088  340   2026748   1%
/var/setuid-wrappers
tmpfs  20270880   2027088   0% /sys/fs/cgroup
tmpfs   4054200405420   0% /run/user/0

Is there a way I can have nixops use a larger sized disk for the root
partition? I'm assuming that the 10GB size is from the NixOS vdi. I can use
the deployment.virtualbox.disks to create another disk, but I don't see a
way to use that for /nix/store.  Am I going to have to resort to doing it
manually after the initial creation fails?

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


Re: [Nix-dev] nixops logical network values depend on physical network deployed to

2015-06-14 Thread Richard Wallace
Great, thanks!

On Sun, Jun 14, 2015 at 2:53 AM, Rob Vermaas rob.verm...@gmail.com wrote:

 Hi Richard,

 I have a case where a value in my logical network configuration will be
 different depending on what physical network is deployed to. It's the base
 URI of the web service, which will be http://localhost:8080/ when
 deploying to a local virtualbox instance and the public address otherwise.


 You can use config.networking.publicIPv4 [1] option to get the public IP
 address of the nixops machine. This is set by nixops.

 Cheers,
 Rob

 [1] http://nixos.org/nixops/manual/#opt-networking.publicIPv4


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


[Nix-dev] nixops logical network values depend on physical network deployed to

2015-06-13 Thread Richard Wallace
Hello all,

I have a case where a value in my logical network configuration will be
different depending on what physical network is deployed to. It's the base
URI of the web service, which will be http://localhost:8080/ when deploying
to a local virtualbox instance and the public address otherwise. This value
is being set as part of the systemd environment

  systemd.services.myservice = {
snip/
environment = {
  PORT = 8080;
  BASE_URI = 
http://ec2-52-8-23-225.us-west-1.compute.amazonaws.com/;;
  DATABASE_URL = postgresql://localhost/hiplambda;
};

I'd also like to be able to vary the DATABASE_URL so I can use Amazon RDS
on EC2.  I tried a few variations of pkgs.lib.mkIf, but couldn't get it
working.

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


[Nix-dev] Use NixOps to deploy a Haskell app to Amazon EC2

2015-06-12 Thread Richard Wallace
Hello all,

I'm hoping someone can provide me with a bit of information on how I might
be able to deploy a custom Haskell application to Amazon EC2 with nixops.

The best how-to I've found 
http://zef.me/blog/5981/deploying-a-simple-node-js-application-with-nixops
revolves around a node.js app and is two years old.

Is there a more recent tutorial, possibly geared towards Haskell?

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


[Nix-dev] Getting mueval working again

2015-06-05 Thread Richard Wallace
mueval used to work via a wrapper, so that the GHC_PACKAGE_PATH would be
set correctly. This is no longer the case, and I'm having trouble figuring
out how to get it working again.

I've tried setting the GHC_PACKAGE_PATH to $NIX_GHC_LIBDIR/package.conf.d,
but I still get the same error:

$ mueval -E -T -e 'id'
mueval-core: GHC returned a result but said: [GhcError {errMsg = Top
level:\nModule \8216Control.Monad.Error\8217 is deprecated:\n  Use
Control.Monad.Except instead}]

Any ideas?

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


[Nix-dev] ghc-mod with ghc 7.10.1

2015-05-29 Thread Richard Wallace
Has anyone gotten this to work successfully on nix? I used cabal2nix to
create a package from ghc-mod master branch on github and did the same for
cabal-helper. I had to disable testing on both since they fail for
different reasons (cabal-helper tries to access something in $HOME and I'm
not sure what ghc-mods problem is).

When running `ghc-mod check Main.hs` on a simple file, it seems like
cabal-helper-wrapper complains about the cabal-helper executable not being
found under ~/.ghc/. I have no idea why it would be looking for it there or
how to fix it. Any had any luck with this?

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


[Nix-dev] Why is nodejs-7f considered an upgrade to nodejs?

2015-04-28 Thread Richard Wallace
I keep running into this issue whenever I run `nix-env --upgrade` that
nix-env thinks that nodePackages.7f is an upgrade to nodejs.  Consequently,
I have to force a downgrade to the nodejs package after every upgrade.
Is there a way to avoid this?

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


[Nix-dev] Heroku package

2015-04-23 Thread Richard Wallace
Hey all,

There used to be a package for heroku in nixpkgs. I recently found need of
it and it seems to be gone. What happened to it? How can it be installed on
NixOS these days? I tried downloading and installing, but it fails to find
ruby.

Thanks,
Rich
___
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?

2015-03-06 Thread Richard Wallace
Everyone seems to have their own way of doing it. Recently I've been using
a script to create the environment I like [1].  The only prereq is that a
default.nix exists. Then it checks for a shell.nix, and if present, uses
that. This gives me the ability to override existing packages.  Otherwise
it just uses the default.nix.

Most of those tools could probably be made part of my environment, as Peter
suggests. ghc-mod is the only one that I think requires this special setup.

HTH,
Rich

[1] https://gist.github.com/purefn/9926ded12254ca763693

On Fri, Mar 6, 2015 at 6:24 AM, Michael Alan Dorman mdor...@jaunder.io
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.

 http://www.cse.chalmers.se/~bernardy/nix.html describes more or less
 exactly what I would like in the Per-Project Configuration section (I
 believe it's actually pulled from
 https://gist.github.com/JLimperg/82019d5603df5021603a)...but predates
 the haskell-ng work, and does not seem entirely compatible with it.

 I wondered if anyone had any suggestions for how it could be made to
 work?  This is the only example I've found of what seems to me a fairly
 obvious development setup.

 Mike.
 ___
 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] Please test Nix store auto-optimise

2015-02-13 Thread Richard Wallace
Thank you for pointing this option out! I had no idea it existed before and
it should prove very useful!

$ du -hs /nix/store/
38G /nix/store/
$ sudo nix-store --optimise -v
snip
12456.46 MiB freed by hard-linking 881561 files
$ du -hs /nix/store/
23G /nix/store/

Does the auto linking also happen if you use nix-copy-closure?

Rich

On Thu, Feb 12, 2015 at 3:47 AM, Wout Mertens wout.mert...@gmail.com
wrote:

 Hi all,

 (TL;DR: regain disk space, see at the bottom for instructions)

 the Nix store can be optimised by hard-linking files with the same
 contents together, so they are only stored once. This is done by reading
 all the files in your store, calculating their checksums and linking them
 to /nix/store/.links/*[checksum]*. This is especially useful in Nix where
 differing build inputs for a package end up with many of the same files.

 Nix 1.8 has a few optimizations that make this operation very fast if you
 run it multiple times. Nix also has the auto-optimise-store setting, which
 will link new files added to the store. If your store was optimised, it
 stays optimised.

 I feel this optimisation should be turned on by default but there were
 some regressions in the past which is why it wasn't. Therefore I'd like to
 ask you to turn on auto-optimise and run optimisation once. Your disk space
 and memory footprint will thank you.

 Advantage:
 - Use less disk space and memory cache
 Disadvantages:
 - Need to checksum all files written to the store
   * this is fast while writing the files because they still are in cache
 - /nix/store/.links can get very large
   * a decent filesystem should handle it
   * E.g. ext3, ext4, btrfs, zfs etc should have no problems

 Hopefully this will prove that it's safe to use and Hydra will start using
 it, which should give it tons more headroom for builds.

 *How to enable*:
 - Run du -hs /nix/store to see how much you're using

 - If you use nixpkgs, put
 auto-optimise-store = true
 in /etc/nix/nix.conf and run nix-store --optimise -v.
 - If you use NixOS, put
 nix.extraOptions = auto-optimise-store = true;
 in your configuration.nix and, as root, run
 nixos-rebuild switch and nix-store --optimise -v.

 - Run du -hs /nix/store to see how much you regained

 It is safe to interrupt the optimisation. It is also safe to clear out
 /nix/store/.links but this will result in more work on the next
 optimisation run.

 Please report any issues you encounter, and it would be nice if you reply
 to this mail in a while to report that you have encountered no issues.

 Cheers,

 Wout.

 PS: Optimise is the British spelling, nix-store also has --optimize but
 not auto-optimize-store :)

 ___
 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] HaskellNG Binaries not linking correctly

2015-02-04 Thread Richard Wallace
After trying with haskellPackages I realized that the version in my cabal
file was different than the version in my nix file. After making them match
everything is happy.

On Wed, Feb 4, 2015 at 2:13 PM, Richard Wallace rwall...@thewallacepack.net
 wrote:

 Hey folks,

 I'm having an issue with HaskellNG. I have a project that provides a
 library and a binary.  My cabal and nix files are here 
 https://gist.github.com/purefn/21e392eb3bc2639db530.

 When I run `nix-build hiberico.nix`, everything completes.  But when I try
 and run it, I get

 /nix/store/p63s2fsksj710fgmzj9399nyn230cx3v-haskell-hiberico-1/bin/hiberico:
 error while loading shared libraries: libHShiberico-2-ghc7.8.4.so: cannot
 open shared object file: No such file or directory

 Running `ldd
 /nix/store/p63s2fsksj710fgmzj9399nyn230cx3v-haskell-hiberico-1/bin/hiberico`
 I see

 linux-vdso.so.1 (0x7fff64def000)
 libHShiberico-2-ghc7.8.4.so = not found
 libHSzip-archive-0.2.3.5-ghc7.8.4.so =
 /nix/store/y1arcbjbwdl8jzra1xj6al6ywimbkqfp-haskell-zip-archive-0.2.3.5/lib/ghc-7.8.4/zip-archive-0.2.3.5/
 libHSzip-archive-0.2.3.5-ghc7.8.4.so (0x7fbc7b3aa000)
 libHSdigest-0.0.1.2-ghc7.8.4.so =
 /nix/store/446nnyb3cc1bpfm84qgn40yy56m1fw02-haskell-digest-0.0.1.2/lib/ghc-7.8.4/digest-0.0.1.2/
 libHSdigest-0.0.1.2-ghc7.8.4.so (0x7fbc7b1a5000)
 libHSvalidation-0.4.2-ghc7.8.4.so =
 /nix/store/fn4mlags9g14br0vvjsp834ypaqzvkkb-haskell-validation-0.4.2/lib/ghc-7.8.4/validation-0.4.2/
 libHSvalidation-0.4.2-ghc7.8.4.so (0x7fbc7af6b000)
  snip

 This was working fine a week ago. I tried out other packages that have
 both libraries and binaries and they worked fine. Any idea why my binary
 isn't getting linked properly?

 Thanks,
 Rich

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


Re: [Nix-dev] Check the priority of package in the nix store

2015-02-01 Thread Richard Wallace
On Sun, Feb 1, 2015 at 1:07 AM, Vladimír Čunát vcu...@gmail.com wrote:

 On 01/31/2015 09:19 PM, Richard Wallace wrote:

 Is there a way to check the priority of something in the nix-store? Any
 ideas why the priority is being ignored and/or lost in this process? Am
 there something wrong in my process?


 The packages in nix store don't really have any priority themselves.
 nix-env evaluates priority for a package at the moment when it's
 (re-)installed into an environment, and records it in a manifest file of
 that particular environment. You can inspect that file, too, e.g.
 ~/.nix-profile/manifest.nix

 So, e.g. if you changed the priorities in the expressions but not
 re-installed from them since, the packages will keep the old priorities in
 those envs.


Ok, so in my case because I'm copying the closure with `nix-copy-closure`
and using `nix-env -i` on the nix store path directly, nix-env never sees
the package expression and hence never has a chance of seeing the priority.

I guess my best option - unless I'm missing something - is to run `nix-env
--set-flag priority 10 old-package-name` on each of my machines.  This is
a bit of a pain, but at least it's a one time thing.

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


[Nix-dev] Check the priority of package in the nix store

2015-01-31 Thread Richard Wallace
Hey folks,

I'm running into some issues with packages conflicting and the priority
seeming to be ignored. I reported it last night thinking it was a problem
with Haskell NG but now think it is something different.

I'm using nix-build to build it locally, copy-nix-closure to copy it to the
machine I want to run it on, and on that remote machine run `nix-env -i`.

In the derivation for the package I've used the `hiPrio` function to make
this new package a higher priority.  When I use the nix-repl and import and
check the value, I can see that the meta.priority is indeed set to -10 as
it should be.  But when `nix-env -i` is run it still complains about the
conflict.

Is there a way to check the priority of something in the nix-store? Any
ideas why the priority is being ignored and/or lost in this process? Am
there something wrong in my process?
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] HaskellNG and priority

2015-01-30 Thread Richard Wallace
So I'm having an issue with converting a package to the new
haskellngPackages.  When I try and install it, I get a collision error

Jan 31 04:08:27 mpac-9 service_mpac_hiberico.dev.internal.atlassian.com:
collision between
‘/nix/store/w0h5i10nvrydh6q91rnn7mj5bbnwg7p2-haskell-hiberico-1/bin/hiberico’
and
‘/nix/store/ddd3mcz71zchg7iyjg71dcsd1pbl00qv-haskell-hiberico-ghc7.8.3-1-shared/bin/hiberico’;
use ‘nix-env --set-flag priority NUMBER PKGNAME’ to change the priority of
one of the conflicting packages

I thought I could set the new package to a higher priority by adding
`hiPrio` to the nix expression I use with nix-build

with (import nixpkgs {}).pkgs;
with (import nixpkgs/pkgs/development/haskell-modules/lib.nix { inherit
pkgs; });

let modifiedHaskellPackages = haskellngPackages.override {
overrides = self: super: {
  AesonBson = self.callPackage nixpkgs/AesonBson {};
  hiberico-ui = self.callPackage ./ui {};

  hiberico = self.callPackage ./. {};
};
  };
in hiPrio (modifiedHaskellPackages.hiberico)

But when I use nix-copy-closure to copy the resulting nix store path and
install it with `nix-env -i`, I still get the above collision error.

Any ideas how I can fix this?

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


Re: [Nix-dev] [Haskell NG] Equivalent of the old eval $configurePhase eval $buildPhase eval $checkPhase ?

2015-01-22 Thread Richard Wallace
Hi Mateusz,

You don't have to use cabal2nix to generate the default.nix and shell.nix
files.  It would be enough to generate the default.nix file and then in
shell.nix you can have

with (import nixpkgs {}).pkgs;
(haskellngPackages.callPackage ./. {}).env

To add overrides, you would do something similar to

with (import nixpkgs {}).pkgs;
with (import nixpkgs/pkgs/development/haskell-modules/lib.nix {
inherit pkgs; });

let modifiedHaskellPackages = haskellngPackages.override {
overrides = self: super: {
  http-media = dontCheck super.http-media;
  Cabal = super.Cabal_1_20_0_3;
  webcrank = self.callPackage ./. {};
};
  };
in modifiedHaskellPackages.webcrank.env

For my own development I've gone a step further, I generate the default.nix
file with cabal2nix.  Then I create a project-name.nix (in this case
webcrank.nix) much like the above

with (import nixpkgs {}).pkgs;
with (import nixpkgs/pkgs/development/haskell-modules/lib.nix {
inherit pkgs; });

let modifiedHaskellPackages = haskellngPackages.override {
overrides = self: super: {
  http-media = dontCheck super.http-media;
  Cabal = super.Cabal_1_20_0_3;
  webcrank = self.callPackage ./. {};
};
  };
in modifiedHaskellPackages.webcrank

Notice that .env was removed from the end.  This file I use with
nix-build and then nix-copy-closure to do deployments.  In my shell.nix I
add some addition things, like dev tools

with (import nixpkgs {}).pkgs;
with (import nixpkgs/pkgs/development/haskell-modules/lib.nix {
inherit pkgs; });

(overrideCabal (import ./webcrank.nix) (drv: {
buildTools = [
  haskellngPackages.ghc-mod
];
})).env

This setup has been working well for me so far, hopefully it will help you
too.

Rich


On Thu, Jan 22, 2015 at 5:24 PM, Mateusz Kowalczyk fuuze...@fuuzetsu.co.uk
wrote:

 On 01/22/2015 09:54 PM, Peter Simons wrote:
  Hi Mateusz,
 
What's the new in-shell workflow?
 
  Does http://permalink.gmane.org/gmane.linux.distributions.nixos/15524
 help?
 
  Best regards,
  Peter
 
  ___
  nix-dev mailing list
  nix-dev@lists.science.uu.nl
  http://lists.science.uu.nl/mailman/listinfo/nix-dev
 

 Yes though it seems that we now need to update two files when making any
 changes: default.nix so that we can callPackage it in overrides and such
 (for example if it's a private package) and shell.nix so that we can
 enter sane environment.

 Previously we could simply cabal2nix into default.nix and from shell.nix
 callPackage ./. in simple case or add any extra shell-only settings in
 there. Now it seems that if I add a dependency I need to regenerate both
 files which is not fun if we have written any customisation. Am I wrong?

 Nevetheless, I got on fine once I figured out I need a fancier shell.nix
 such as one cabal2nix gave me. Another downside is that manual use of
 Setup won't inherit flags specified in the expression: we manually have
 to --enable-testsuite whereas eval $configurePhase would do that for
 use when doCheck = true;. So overall it seems to me that there is a bit
 more manual work involved though things seem nicer in general so far.

 --
 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


Re: [Nix-dev] A Journey into our brand-new Haskell infrastructure: Part II

2015-01-17 Thread Richard Wallace
Hi Peter,

I don't think I was very clear, sorry about that.  The thing that I'm
seeing is that when I run `nix-build default.nix -A AesonBson` with no
overrides, as in this `default.nix`

 | with (import nixpkgs {}).pkgs;
 | let
 |   modifiedHaskellPackages = haskellngPackages.override {
 | overrides = self: super: {
 | };
 |   };
 | in
 |   modifiedHaskellPackages


 everything gets built and installed.

 | $ nix-build default.nix -A AesonBson
 | these derivations will be built:
 |   /nix/store/y5di9g2vh8x29pqmml88x3bpx1rw1q81-hscolour-1.20.3.tar.gz.drv
 |   /nix/store/jxddl4xj26bzgp05vp71ifzz6gry7b79-hscolour-1.20.3.drv
 |   /nix/store/qqvhdndhxi63bsgvvcq2pshx0yvx1sh8-random-1.1.tar.gz.drv
 |   /nix/store/0d3x7pw7lq04xi2qvbvy3w4811dgqxcx-haskell-random-1.1.drv
 |   /nix/store/flkvyc5237pfiashxrscqybzgf1pv039-QuickCheck-2.7.6.tar.gz.drv
 |   /nix/store/c2zmcykwvw7bmajfjb4cxpxshyqa90xq-text-1.2.0.4.tar.gz.drv
 |   /nix/store/83q87v3baa1c7vcjwfpadr8qhighk1i5-haskell-text-1.2.0.4.drv
 |   /nix/store/9b6irma4l006vg1m303qc6fl0h1pkamz-xml-1.3.13.tar.gz.drv
 |   /nix/store/1ikx1hrndyz7ay2ss0b6252xk57qf8gi-haskell-xml-1.3.13.drv
 |   /nix/store/wqnrvx62dcy7ayd5nfd37pdzbcxywm5h-mtl-2.1.3.1.tar.gz.drv
 | snip

Then I change my default.nix to add the overridden AesonBsonm, as you have
above, and rerun `nix-build default.nix -A AesonBson`.  Now, AesonBson and
all of it's dependencies get rebuilt.  I had hoped/expected that only
 AesonBson would need to be rebuilt and not things like text and friends.

I'm not sure I understand nix well enough to say why this is, but I think
it's because we're using an entirely new derivation for haskellngPackages,
which means everything needs to be rebuilt and not just AesonBson.  This is
unfortunate because it makes nix worse for development than just using
cabal sandboxing. With the old wrapper behavior of haskellPackages, I only
needed to built a specific version of text and lens once.  Now I'll be
rebuilding them everytime I change any dependencies.  This is unfortunate
and I'd like to avoid it. Is that even possible?

Thanks,
Rich

On Sat, Jan 17, 2015 at 4:12 AM, Peter Simons sim...@cryp.to wrote:

 Hi Richard,

   Everytime I try and override a package with ghcWithPackages, it ends
   up rebuilding every Haskell library. For instance, I have this
   shell.nix https://gist.github.com/purefn/026625ad116b05ff9a8d.

 I cannot reproduce this phenomenon. I saved your configuration to
 default.nix

  | with (import nixpkgs {}).pkgs;
  | let
  |   modifiedHaskellPackages = haskellngPackages.override {
  | overrides = self: super: {
  |   AesonBson = self.callPackage
  | ({ mkDerivation, aeson, attoparsec, base, bson, hspec, HUnit,
 stdenv
  | , text, unordered-containers, vector
  | }:
  | mkDerivation {
  |   pname = AesonBson;
  |   version = 0.2.1;
  |   src = fetchgit {
  | url = https://github.com/fujimura/aesonbson.git;;
  | rev = 7ac58f74317fe0f61098654e231f03adc219989d;
  | sha256 =
 1miic2lq08ply6mjqdmamwsamxv2dnz5hj1yyjb74bgklh3mc36l;
  |   };
  |   buildDepends = [
  | aeson attoparsec base bson unordered-containers vector
  |   ];
  |   testDepends = [ aeson base bson hspec HUnit text ];
  |   homepage = https://github.com/nh2/AesonBson;;
  |   description = Mapping between Aeson's JSON and Bson objects;
  |   license = unknown;
  | }) {};
  | };
  |   };
  | in
  |   modifiedHaskellPackages

 and ran:

  | $ nix-build default.nix -A Agda --dry-run
  | these paths will be fetched (0.00 MiB download, 184.82 MiB unpacked):
  |   /nix/store/1h61xarq9xg07i1llir8614dpi2sj42z-haskell-geniplate-0.6.0.5
  |   /nix/store/2jys12fgb7mg76mp409mi4s00h0gxhsz-haskell-haskeline-0.7.1.3
  |   /nix/store/3nbq1p5pbi86qk3jh847a09jgnn5yd7y-haskell-equivalence-0.2.5
  |   /nix/store/g1z56xzv909x64hjjz69ic3jrx018axj-haskell-boxes-0.1.4
  |   /nix/store/kj13l38gqpy34v55z68rjzfpvy64ibv8-haskell-data-hash-0.2.0.0
  |   /nix/store/lw5bi37cm64l7rl5n43khigjl8j2pakn-haskell-STMonadTrans-0.3.2
  |   /nix/store/pr8mgqmswraryw8r719j7bpj9ci0xn06-haskell-strict-0.3.2
  |   /nix/store/svrr5kp8dk5dhg09q6spj82fq6h0g1rw-haskell-Agda-2.4.2.2
  |   /nix/store/xa8wgxcmwbgf32pva55gjwivj7ssjvxp-haskell-terminfo-0.4.0.0
  |
  | $ nix-build default.nix -A AesonBson --dry-run
  | these derivations will be built:
  |   /nix/store/5yqdwlpkp7axnmgpi1g8xdfj1pcrmir6-aesonbson-7ac58f7.drv
  |
  /nix/store/n3lgwsg30hzs9mvypkf6n3s8svbgd6kz-haskell-AesonBson-0.2.1.drv
  | these paths will be fetched (0.00 MiB download, 3.57 MiB unpacked):
  |
  /nix/store/sphsnkamvvc1jyirpnbjf2fcr5c70mkh-haskell-data-binary-ieee754-0.4.4
  |   /nix/store/z5s0srhcv6bi03bckin6dr8zb2zmmckd-haskell-bson-0.3.1

 As far as I can tell, no unnecessary re-building takes place.

 Best regards,
 Peter

 ___
 nix-dev mailing 

Re: [Nix-dev] A Journey into our brand-new Haskell infrastructure: Part II

2015-01-16 Thread Richard Wallace
I feel like I must be missing something, because everytime I try and
override a package with ghcWithPackages, it ends up rebuilding every
Haskell library.  For instance, I have this shell.nix 
https://gist.github.com/purefn/026625ad116b05ff9a8d.

In this case, I've overridden the AesonBson package with a specific
commit.  In other cases, I might want to add an additional package, such as
in this response on SO 
https://stackoverflow.com/questions/27968909/how-to-get-cabal-and-nix-work-together/27970684#27970684
.

In both scenarios, instead of just building the newly included or modified
libraries, every package gets rebuilt. Is there a way to accomplish the
same thing and avoid the long rebuild cycles?

Thanks,
Rich




On Tue, Jan 13, 2015 at 4:50 AM, Peter Simons sim...@cryp.to wrote:

 Hi Thomas,

   How can I override a package to enable profiling?

 commit [1] adds helper functions that allow referring to any package foo
 as enableLibraryProfiling foo to get a variant that supports profiling.

 If you want to enable profiling for *all* packages, then you can replace
 the 'mkDerivation' function with one that enables the feature by default,
 i.e. by adding the snippet

  | haskellPackageOverrides = self: super: {
  |   mkDerivation = expr: super.mkDerivation (expr // {
 enableLibraryProfiling = true; });
  | };

 to your ~/.nixpkgs/config.nix file.


   Is there an obvious way in general to apply the same override to a
   package and all its dependencies?

 No, we can't do that yet. But we can do something else, that's almost
 equally goos: we can modify the package set in which a package (and all
 its dependencies) are evaluated. Just add

  | {
  |   packageOverrides = super: let self = super.pkgs; in
  |   {
  | foo = self.haskellngPackages.foo.overrideScope (self: super: {
  |   mkDerivation = expr: super.mkDerivation (expr // {
 enableLibraryProfiling = true; });
  | });
  |   }
  | }

 to your ~/.nixpkgs/config.nix to get a variant of foo that has profiling
 enabled in all its dependencies as well. If you take that stuff to the
 extreme, then it looks like [2].

 I hope this helps,
 Peter

 [1]
 https://github.com/NixOS/nixpkgs/commit/e4a68f0b98c28319913a4f2104ddb0524262f390
 [2]
 https://github.com/NixOS/nixpkgs/blob/9e114ccd2693daab6bca3c05674c549884097925/pkgs/development/haskell-modules/configuration-ghc-7.8.x.nix#L43-87

 ___
 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] A Journey into the Haskell NG infrastructure: Part I

2015-01-10 Thread Richard Wallace
Hello,

This looks pretty good. I tried converting one of my projects today and ran
into an issue with cabal-test-quickcheck

building path(s)
‘/nix/store/zyxd5g7ppxqbp9dhlz41vdjaki351a8w-haskell-cabal-test-quickcheck-0.1.2’
building
/nix/store/zyxd5g7ppxqbp9dhlz41vdjaki351a8w-haskell-cabal-test-quickcheck-0.1.2
unpacking sources
unpacking source archive
/nix/store/9pjynpj0mvqlw84m8vs1lzvk2y8cymp3-cabal-test-quickcheck-0.1.2.tar.gz
source root is cabal-test-quickcheck-0.1.2
patching sources
configuring
Building with /nix/store/7nhcrjkv2sp3xxv09gl20gdm91ag2bmd-ghc-7.8.4.
[1 of 1] Compiling Main ( Setup.hs,
/tmp/nix-build-haskell-cabal-test-quickcheck-0.1.2.drv-0/Main.o )
Linking Setup ...
configureFlags: --verbose
--prefix=/nix/store/zyxd5g7ppxqbp9dhlz41vdjaki351a8w-haskell-cabal-test-quickcheck-0.1.2
--libdir=$prefix/lib/$compiler --libsubdir=$pkgid --enable-split-objs
--disable-library-profiling --enable-shared --enable-library-vanilla
--enable-executable-dynamic --enable-tests
--ghc-option=-optl=-Wl,-rpath=/nix/store/zyxd5g7ppxqbp9dhlz41vdjaki351a8w-haskell-cabal-test-quickcheck-0.1.2/lib/ghc-7.8.4/cabal-test-quickcheck-0.1.2
--package-db=/tmp/nix-build-haskell-cabal-test-quickcheck-0.1.2.drv-0/package.conf.d
Configuring cabal-test-quickcheck-0.1.2...
Setup: At least the following dependencies are missing:
Cabal ==1.20.*
builder for
‘/nix/store/j88cdlva98czlckb9ybbn16qvwv1yj5k-haskell-cabal-test-quickcheck-0.1.2.drv’
failed with exit code 1
cannot build derivation
‘/nix/store/7gd2zp5i25805wlag26sl6i8r3fks4zq-haskell-http-media-0.4.0.drv’:
1 dependencies couldn't be built
building path(s)
‘/nix/store/9n76sbp81vgap0qc1fg8g0plzpsfk7b4-haskell-quickcheck-instances-0.3.10’
cannot build derivation
‘/nix/store/skmviq7sfwm5zdz4dac39j3kvsmhrzip-ghc-7.8.4.drv’: 1 dependencies
couldn't be built
error: build of ‘/nix/store/skmviq7sfwm5zdz4dac39j3kvsmhrzip-ghc-7.8.4.drv’
failed
/run/current-system/sw/bin/nix-shell: failed to build all dependencies

Rich

On Sat, Jan 10, 2015 at 8:19 AM, Peter Simons sim...@cryp.to wrote:

 Hi,

   It would be nice to have an example of how to use shell.nix and
   default.nix together.

 starting with Nixpkgs version 11ac18a, you can do the following.

  1) To create an interactive build environment that can compile a local
 Haskell
 project, run:

   $ cabal2nix --shell . shell.nix  nix-shell

 The new shell will be set up with an appropriate ghcWithPackages
 wrapper
 that about knows all dependencies for this package, and required system
 libraries will also be configured to be found without extra parameters
 to
 cabal configure.

  2) For recent Hackage packages, you can do that without using cabal2nix,
 even,
 by running:

   $ nix-shell 'nixpkgs' -A haskellngPackages.hspec.env

 This will give you the same kind of environment as (1), but this time
 the
 environment is setup based on the information we have in Nixpkgs, so
 you
 don't have to generate a cabal file at all.

 To illustrate these points, here is an example session. Note that my user
 has
 no 'ghc':

  | $ ghc
  | The program ‘ghc’ is currently not installed. You can install it by
 typing:
  |   nix-env -i ghc

 Anyway, let's build 'hspec'. First, we get the source code:

  | $ curl
 http://hackage.haskell.org/package/hspec-2.1.2/hspec-2.1.2.tar.gz | tar xz
  |   % Total% Received % Xferd  Average Speed   TimeTime Time
 Current
  |  Dload  Upload   Total   SpentLeft
 Speed
  | 100  5200  100  52000 0  75337  0 --:--:-- --:--:--
 --:--:-- 76470
  |
  | $ cd hspec-2.1.2

 Now enter the build environment based on the package data from Nixpkgs:

  | $ nix-shell 'nixpkgs' -A haskellngPackages.hspec.env

 And compile:

  | [nix-shell:/tmp/hspec-2.1.2]$ ghc --make Setup
  | [1 of 1] Compiling Main ( Setup.lhs, Setup.o )
  | Linking Setup ...
  |
  | [nix-shell:/tmp/hspec-2.1.2]$ ./Setup configure
  | Configuring hspec-2.1.2...
  |
  | [nix-shell:/tmp/hspec-2.1.2]$ ./Setup build
  | Building hspec-2.1.2...
  | Preprocessing library hspec-2.1.2...
  | [1 of 7] Compiling Test.Hspec.HUnit ( src/Test/Hspec/HUnit.hs,
 dist/build/Test/Hspec/HUnit.o )
  | [2 of 7] Compiling Test.Hspec.Formatters (
 src/Test/Hspec/Formatters.hs, dist/build/Test/Hspec/Formatters.o )
  | [3 of 7] Compiling Test.Hspec.Discover ( src/Test/Hspec/Discover.hs,
 dist/build/Test/Hspec/Discover.o )
  | [4 of 7] Compiling Test.Hspec.Runner ( src/Test/Hspec/Runner.hs,
 dist/build/Test/Hspec/Runner.o )
  | [5 of 7] Compiling Test.Hspec.Core  ( src/Test/Hspec/Core.hs,
 dist/build/Test/Hspec/Core.o )
  | [6 of 7] Compiling Test.Hspec   ( src/Test/Hspec.hs,
 dist/build/Test/Hspec.o )
  | [7 of 7] Compiling Test.Hspec.QuickCheck (
 src/Test/Hspec/QuickCheck.hs, dist/build/Test/Hspec/QuickCheck.o )
  | In-place registering hspec-2.1.2...
  |
  | [nix-shell:/tmp/hspec-2.1.2]$ exit
  | exit

 Of course, you can use cabal-install if you 

[Nix-dev] libnotify notifications with icons not displaying

2014-12-12 Thread Richard Wallace
I'm attempting to get notifications setup for when I use the volume keys on
my keyboard, like in Ubuntu.  I've setup xbindkeys, but the when I run

notify-send -t 1000 -i multimedia-volume-control --hint=int:transient:1
--hint=int:value:$CURVOL --hint=string:synchronous:volume Volume up
$PERC% 

No notification is displayed and in the logs I see

Dec 12 20:19:35 tealc org.freedesktop.Notifications[1812]: **
(.notify-osd-wrapped:1922): WARNING **: WARNING: No layout defined!!!

I haven't been able to find any reference to this on the web and am unsure
what to do.  Any tips would be appreciated.

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


Re: [Nix-dev] New darwin binary cache from Zalora

2014-12-11 Thread Richard Wallace
Awesome! This is really good news for me.  I was getting ready to setup a
Hydra instance to create our own internal darwin cache.  Thanks!

On Thu, Dec 11, 2014 at 11:18 AM, Shea Levy s...@shealevy.com wrote:

 Hi all,

 My employer, Zalora, has made our darwin binary cache
 http://zalora-public-nix-cache.s3-website-ap-southeast-1.amazonaws.com
 publicly accessible. It is populated from our private hydra, and currently
 contains builds from git://github.com/joelteon/nixpkgs.git. Once darwin
 builds are fixed on 10.10 on master, we will also be building that branch.
 Please feel free to use this cache directly, or if desired to mirror it
 over to cache.nixos.org.

 Cheers,
 Shea
 ___
 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] cache.nixos.org retention

2014-12-10 Thread Richard Wallace
That's odd, because I built this project on an OS X machine a few weeks ago
and I definitely didn't have to built those packages.  They were pulled
from the nixos cache.

On Wed, Dec 10, 2014 at 12:28 AM, Eelco Dolstra eelco.dols...@logicblox.com
 wrote:

 Hi,

 On 09/12/14 23:47, Richard Wallace wrote:

  I'm just wondering what the retention policy is on cache.nixos.org
  http://cache.nixos.org.  I just went to build a project on a new OS X
 machine
  that is using a nixpkgs from a few weeks ago.  I was surprised to see
 that many
  basic packages like zlib, gnu tools, perl and a bevy of others weren't
 fetched
  from the cache but were built from scratch.
 
  My best guess as to why is that it's because maybe the retention policy
 on
  cache.nixos.org http://cache.nixos.org is less than I thought.  If
 there is
  another explanation I would love to hear it, otherwise I may be needing
 to set
  up a proxy for these situations.

 Actually, there is currently *no* garbage collection on cache.nixos.org
 at all,
 binaries are kept forever. The actual problem is that our Mac OS X build
 machine
 broke down so there are no up-to-date OS X binaries in the Nixpkgs channel.

 --
 Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/
 ___
 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] Hipchat not building

2014-12-05 Thread Richard Wallace
Hello,

It looks like Hipchat no longer installs properly.

building /nix/store/hcllz0m22j708qycn7fpbs0ixcpd8i8y-hipchat-2.2.1163
removed 'opt/HipChat/lib/libstdc++.so'
removed 'opt/HipChat/lib/libstdc++.so.6'
removed 'opt/HipChat/lib/libstdc++.so.6.0.18'
removed 'opt/HipChat/lib/libz.so'
removed 'opt/HipChat/lib/libz.so.1'
removed 'opt/HipChat/lib/libz.so.1.2.7'
removed 'opt/HipChat/lib/libuuid.so'
removed 'opt/HipChat/lib/libuuid.so.1'
removed 'opt/HipChat/lib/libuuid.so.1.3.0'
removed 'opt/HipChat/lib/libxml2.so'
removed 'opt/HipChat/lib/libxml2.so.2'
removed 'opt/HipChat/lib/libxml2.so.2.8.0'
removed 'opt/HipChat/lib/libxslt.so'
removed 'opt/HipChat/lib/libxslt.so.1'
removed 'opt/HipChat/lib/libxslt.so.1.1.26'
removed 'opt/HipChat/lib/libsqlite3.so'
removed 'opt/HipChat/lib/libsqlite3.so.0'
removed 'opt/HipChat/lib/libsqlite3.so.0.8.6'
removed 'opt/HipChat/lib/libogg.so'
removed 'opt/HipChat/lib/libogg.so.0'
removed 'opt/HipChat/lib/libogg.so.0.8.0'
removed 'opt/HipChat/lib/libvorbis.so'
removed 'opt/HipChat/lib/libvorbis.so.0'
removed 'opt/HipChat/lib/libvorbis.so.0.4.5'
removed 'opt/HipChat/lib/libvorbisfile.so'
removed 'opt/HipChat/lib/libvorbisfile.so.3'
removed 'opt/HipChat/lib/libvorbisfile.so.3.3.4'
removed 'opt/HipChat/lib/liblzma.so'
removed 'opt/HipChat/lib/liblzma.so.5'
removed 'opt/HipChat/lib/liblzma.so.5.0.0'
removed 'opt/HipChat/lib/libcanberra.so'
removed 'opt/HipChat/lib/libcanberra.so.0'
removed 'opt/HipChat/lib/libcanberra.so.0.2.5'
removed 'opt/HipChat/lib/libcanberra-0.30/libcanberra-null.so'
removed 'opt/HipChat/lib/libcanberra-0.30/libcanberra-alsa.so'
removed 'opt/HipChat/lib/libcanberra-0.30/libcanberra-oss.so'
removed 'opt/HipChat/lib/libcanberra-0.30/libcanberra-multi.so'
removed directory: 'opt/HipChat/lib/libcanberra-0.30'
patching script interpreter paths in
/nix/store/hcllz0m22j708qycn7fpbs0ixcpd8i8y-hipchat-2.2.1163/bin
find: `/nix/store/hcllz0m22j708qycn7fpbs0ixcpd8i8y-hipchat-2.2.1163/bin':
No such file or directory
builder for
`/nix/store/vw049gxihrizpzq5nhmndr6a6nz9l31a-hipchat-2.2.1163.drv' failed
with exit code 1
cannot build derivation
`/nix/store/73bxirxbps8hwac9a4wfpyrqa4h2rlj5-system-path.drv': 1
dependencies couldn't be built
cannot build derivation
`/nix/store/b3w3c49192kggqwxnawxmwlkbil62fg8-nixos-14.11pre54072.e5d92d4.drv':
1 dependencies couldn't be built
error: build of
`/nix/store/b3w3c49192kggqwxnawxmwlkbil62fg8-nixos-14.11pre54072.e5d92d4.drv'
failed

Anyone else run into this and have a solution? If not, I'll try and figure
out what is going on and how to fix it.

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


Re: [Nix-dev] bower

2014-11-14 Thread Richard Wallace
Count me as one of those running into this problem too.



On Fri, Nov 7, 2014 at 7:08 AM, Shell Turner cam.t...@gmail.com wrote:

 Hey,

 I'm trying to get Bower running under NixOS. After installing it with
 nix-env -iA nixos.pkgs.nodePackages.bower, running bower outputs:

 module.js:340
 throw err;
   ^
 Error: Cannot find module 'es5-ext/object/assign'
 at Function.Module._resolveFilename (module.js:338:15)
 at Function.Module._load (module.js:280:25)
 at Module.require (module.js:364:17)
 at require (module.js:380:17)
 at Object.anonymous

 (/nix/store/2pnixcmhgdmjpriprszjfsabva07j5bh-node-d-0.1.1/lib/node_modules/d/index.js:3:21)
 at Module._compile (module.js:456:26)
 at Object.Module._extensions..js (module.js:474:10)
 at Module.load (module.js:356:32)
 at Function.Module._load (module.js:312:12)
 at Module.require (module.js:364:17)

 Any ideas?
 Shell
 ___
 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] Vim conceal, cscope and other features

2014-11-12 Thread Richard Wallace
That's exactly what I was looking for, thanks!

On Wed, Nov 12, 2014 at 8:15 AM, kickmymotorcy...@gmail.com 
kickmymotorcy...@gmail.com wrote:

 Rich,

 If you install the package `vimHugeX` instead of `vim`, you get a
 bunch of other features, including cscope and conceal.

 Here's the output of `vim --version` for the vimHugeX package:

 $ vim --version
 VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Oct 21 2014 02:43:02)
 Included patches: 1-335
 Compiled by nixbld
 Huge version with GTK2 GUI.  Features included (+) or not (-):
 +acl +farsi   +mouse_netterm   +syntax
 +arabic  +file_in_path+mouse_sgr   +tag_binary
 +autocmd +find_in_path-mouse_sysmouse  +tag_old_static
 +balloon_eval+float   +mouse_urxvt -tag_any_white
 +browse  +folding +mouse_xterm -tcl
 ++builtin_terms  -footer  +multi_byte  +terminfo
 +byte_offset +fork()  +multi_lang  +termresponse
 +cindent -gettext -mzscheme+textobjects
 +clientserver-hangul_input+netbeans_intg   +title
 +clipboard   +iconv   +path_extra  +toolbar
 +cmdline_compl   +insert_expand   -perl+user_commands
 +cmdline_hist+jumplist+persistent_undo +vertsplit
 +cmdline_info+keymap  +postscript  +virtualedit
 +comments+langmap +printer +visual
 +conceal +libcall +profile +visualextra
 +cryptv  +linebreak   +python  +viminfo
 +cscope  +lispindent  -python3 +vreplace
 +cursorbind  +listcmds+quickfix+wildignore
 +cursorshape +localmap+reltime +wildmenu
 +dialog_con_gui  +lua +rightleft   +windows
 +diff+menu+ruby+writebackup
 +digraphs+mksession   +scrollbind  +X11
 +dnd +modify_fname+signs   -xfontset
 -ebcdic  +mouse   +smartindent -xim
 +emacs_tags  +mouseshape  -sniff   -xsmp
 +eval+mouse_dec   +startuptime +xterm_clipboard
 +ex_extra-mouse_gpm   +statusline  -xterm_save
 +extra_search-mouse_jsbterm   -sun_workshop+xpm
system vimrc file: $VIM/vimrc
  user vimrc file: $HOME/.vimrc
  2nd user vimrc file: ~/.vim/vimrc
   user exrc file: $HOME/.exrc
   system gvimrc file: $VIM/gvimrc
 user gvimrc file: $HOME/.gvimrc
 2nd user gvimrc file: ~/.vim/gvimrc
 system menu file: $VIMRUNTIME/menu.vim
   fall-back for $VIM: 

 /nix/store/n487qcmr3b2kvk1zis17s0d99z56pyfv-vim_configurable-7.4.335/share/vim
 
 Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK
 -I/nix/store/l03wlkdkn7hfyx1qgxm3q6h45q82and6-gtk+-2.24.24/include/gtk-2.0

 -I/nix/store/l03wlkdkn7hfyx1qgxm3q6h45q82and6-gtk+-2.24.24/lib/gtk-2.0/include
 -I/nix/store/5lg0s2rxgb5g2hhnld4aclhc2l7sx73y-glib-2.40.0/include/glib-2.0

 -I/nix/store/5lg0s2rxgb5g2hhnld4aclhc2l7sx73y-glib-2.40.0/lib/glib-2.0/include
 -I/nix/store/1a05vdqxkprlrmgyk0ny2h1p60afarkq-cairo-1.12.16/include/cairo

 -I/nix/store/s1n8g01x9slks39amxigr6l21gz2kp6n-freetype-2.5.3/include/freetype2
 -I/nix/store/s1n8g01x9slks39amxigr6l21gz2kp6n-freetype-2.5.3/include

 -I/nix/store/s1n8g01x9slks39amxigr6l21gz2kp6n-freetype-2.5.3/include/freetype2
 -I/nix/store/ir037n9vz50zinmwyx5531scmgi54mqs-fontconfig-2.10.2/include

 -I/nix/store/z9wmdhh6zaq0gd69ly4hrl0z245a4wpx-pango-1.32.5/include/pango-1.0

 -I/nix/store/s1iajj98g09lpnp1m2rdl3prss0hvyly-gdk-pixbuf-2.30.8/include/gdk-pixbuf-2.0
 -I/nix/store/w5lx36bqh4fk872mpy878sc2czab3h21-atk-2.12.0/include/atk-1.0
-g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
 Linking: gcc -L/nix/store/l03wlkdkn7hfyx1qgxm3q6h45q82and6-gtk+-2.24.24/lib
 -L/nix/store/5lg0s2rxgb5g2hhnld4aclhc2l7sx73y-glib-2.40.0/lib
 -L/nix/store/1a05vdqxkprlrmgyk0ny2h1p60afarkq-cairo-1.12.16/lib
 -L/nix/store/s1n8g01x9slks39amxigr6l21gz2kp6n-freetype-2.5.3/lib
 -L/nix/store/ir037n9vz50zinmwyx5531scmgi54mqs-fontconfig-2.10.2/lib
 -L/nix/store/z9wmdhh6zaq0gd69ly4hrl0z245a4wpx-pango-1.32.5/lib
 -L/nix/store/s1iajj98g09lpnp1m2rdl3prss0hvyly-gdk-pixbuf-2.30.8/lib
 -L/nix/store/w5lx36bqh4fk872mpy878sc2czab3h21-atk-2.12.0/lib   -L.
 -rdynamic -Wl,-export-dynamic  -Wl,--as-needed -o vim
 -L/nix/store/l03wlkdkn7hfyx1qgxm3q6h45q82and6-gtk+-2.24.24/lib
 -L/nix/store/5lg0s2rxgb5g2hhnld4aclhc2l7sx73y-glib-2.40.0/lib
 -L/nix/store/1a05vdqxkprlrmgyk0ny2h1p60afarkq-cairo-1.12.16/lib
 -L/nix/store/s1n8g01x9slks39amxigr6l21gz2kp6n-freetype-2.5.3/lib
 -L/nix/store/ir037n9vz50zinmwyx5531scmgi54mqs-fontconfig-2.10.2/lib
 -L/nix/store/z9wmdhh6zaq0gd69ly4hrl0z245a4wpx-pango-1.32.5/lib
 -L/nix/store/s1iajj98g09lpnp1m2rdl3prss0hvyly-gdk-pixbuf-2.30.8/lib
 -L/nix/store/w5lx36bqh4fk872mpy878sc2czab3h21-atk-2.12.0/lib
 -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo
 -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0
 -lglib-2.0 

[Nix-dev] Haskell doctest

2014-11-11 Thread Richard Wallace
Hello all,

We've got a Haskell project that we're using nix to ensure a consistent
build environment.  I'm working on adding tests with doctest, and am
running into trouble.  Here are the default.nix and shell.nix files we're
using (many dependencies elided for brevity)

# This file was auto-generated by cabal2nix. Please do NOT edit manually!

{ cabal, aeson, lens, doctest,
}:

cabal.mkDerivation (self: {
  pname = hiberico;
  version = 1;
  src = ./.;
  isLibrary = false;
  isExecutable = true;
  buildDepends = [
aeson lens
  ];
  testDepends = [
doctest aeson lens
  ];

  meta = {
description = Iberico in Haskell;
license = unknown;
platforms = self.ghc.meta.platforms;
  };
})

# shell.nix
let
   nixpkgs = (import nixpkgs {}).fetchgit {
url = git://github.com/NixOS/nixpkgs.git;
rev = c758ec756b60a2161a5d7369d07d3eb2fe04a5aa;
sha256 = 01x01gwj2pm165sdhb1fxfdzl638kksx79dyadji5f2wp4hssk8m;
  };
in
  { system ? builtins.currentSystem
  , pkgs ? import nixpkgs { inherit system; }
  , haskellPackages ? pkgs.haskellPackages.override {
  extension = self: super: {
hiberico = self.callPackage ./. {};
  };
}
  }:
  pkgs.lib.overrideDerivation haskellPackages.hiberico (attrs: {
buildInputs = [
  haskellPackages.cabalInstall
] ++ attrs.buildInputs;
  })


When I enter the nix-shell (`nix-shell --pure shell.nix`), the environment
seems setup correctly.  I can run `cabal configure --enable-tests  cabal
build  cabal test` and it gets to the point where doctest is parsing the
source files and I get

Building hiberico-1...
Preprocessing executable 'hiberico' for hiberico-1...
Preprocessing test suite 'doctests' for hiberico-1...
Running 1 test suites...
Test suite doctests: RUNNING...

src/Topology.hs:11:18:
Could not find module 'Data.Aeson'
Perhaps you meant Data.Version (from base)
Use -v to see a list of the files searched for.

I've added all the dependencies to the doctests suite in the cabal file. Is
there something else I'm missing?

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


[Nix-dev] Vim conceal, cscope and other features

2014-11-11 Thread Richard Wallace
Hey all,

I just realized that vim in nix isn't configured with the conceal and
cscope features enabled.   Any reason for that? Is there an easy way to
enable them (I know I can copy the nix file and edit it to my hearts
content, but I was hoping there is a better way)?

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


[Nix-dev] Trouble with pygobject

2014-10-31 Thread Richard Wallace
Hey all,

I'm trying to create some packages for applications that I use regularly
before switching over to NixOS full time.  So far things are going great.

Now I'm trying to get pithos (a Pandora GTK client) built [1].  Pithos
builds and everything looks ok, but when I try and run it I get
`ImportError: No module named gi`.  I'm not familiar with Python
development, but a bit of Googling indicates that python can't pygobject.

Looking at the wrapper created, I see the path to
`/nix/store/hlyp3a9cy5k7qhfc1chd1v3bm2jljazn-pygobject-2.28.6/lib/python2.7/site-packages`
included in the PYTHONPATH.

I've exhausted my knowledge of python at this point.  Can anyone point me
to what I may be missing?

Thanks,
Rich

[1] http://pastebin.com/AknCwdNa
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Trouble with pygobject

2014-10-31 Thread Richard Wallace
On Fri, Oct 31, 2014 at 12:05 PM, Bjørn Forsman bjorn.fors...@gmail.com
wrote:

 Hi Richard,

 On 31 October 2014 19:28, Richard Wallace rwall...@thewallacepack.net
 wrote:
  Hey all,
 [...]
  Now I'm trying to get pithos (a Pandora GTK client) built [1].  Pithos
  builds and everything looks ok, but when I try and run it I get
  `ImportError: No module named gi`.  I'm not familiar with Python
  development, but a bit of Googling indicates that python can't pygobject.
 
  Looking at the wrapper created, I see the path to
 
 `/nix/store/hlyp3a9cy5k7qhfc1chd1v3bm2jljazn-pygobject-2.28.6/lib/python2.7/site-packages`
  included in the PYTHONPATH.

 I think you need to add gobjectIntrospection to buildInputs, and then
 wrap the executable with GI_TYPELIB_PATH set to GI_TYPELIB_PATH from
 the build environment. See the virt-manager expression for example.


Thanks for the suggestion.  It seems to make sense, so I modified the
package as you suggested [1]. Unfortunately I'm still getting the same
error.

The `pithos` script includes the line

  export
GI_TYPELIB_PATH=/nix/store/9imvrzskcak2998zj1242jxgl4p9m5dp-gst-plugins-base-1.4.1/lib/girepository-1.0:/nix/store/byi4j636s13m8w28nvqiakn6nzakmadr-gstreamer-1.4.1/lib/girepository-1.0:/nix/store/y06kp3fxw3r5r3nfkqzc8l3y7r3kvns0-libnotify-0.7.6/lib/girepository-1.0:/nix/store/4z6rr314xg1iszkn2wjvvl16yfmwgwa7-gobject-introspection-1.40.0/lib/girepository-1.0${GI_TYPELIB_PATH:+:}$GI_TYPELIB_PATH

so it looks like it is doing what it is supposed to.

Rich

[1] http://pastebin.com/amAc8wpG
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Trouble with pygobject

2014-10-31 Thread Richard Wallace
The nix expression was linked.

I noticed that virt-manager is using pyobject3 so I tried changing to use
that too, and I got further.  Now I'm getting

ERROR:root:Could not find any typelib for Gtk
ERROR:root:Could not find any typelib for Gdk
ERROR:root:Could not find any typelib for Pango
ERROR:root:Could not find any typelib for GdkPixbuf
Traceback (most recent call last):
  File
/nix/store/wm1ybs2040xxw8r7d4448qifjb0ckazg-python3.4-pithos-1.0.1/bin/..pithos-wrapped-wrapped,
line 10, in module
load_entry_point('pithos==1.0.1', 'gui_scripts', 'pithos')()
  File
/nix/store/kpcbbc1104jqd39njz1c709jlrmbkzfj-python3.4m-setuptools-5.8/lib/python3.4/site-packages/setuptools-5.8-py3.4.egg/pkg_resources.py,
line 339, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
  File
/nix/store/kpcbbc1104jqd39njz1c709jlrmbkzfj-python3.4m-setuptools-5.8/lib/python3.4/site-packages/setuptools-5.8-py3.4.egg/pkg_resources.py,
line 2457, in load_entry_point
return ep.load()
  File
/nix/store/kpcbbc1104jqd39njz1c709jlrmbkzfj-python3.4m-setuptools-5.8/lib/python3.4/site-packages/setuptools-5.8-py3.4.egg/pkg_resources.py,
line 2171, in load
['__name__'])
  File
/nix/store/wm1ybs2040xxw8r7d4448qifjb0ckazg-python3.4-pithos-1.0.1/lib/python3.4/site-packages/pithos/pithos.py,
line 26, in module
from gi.repository import Gst, GstPbutils, GObject, Gtk, Gdk, Pango,
GdkPixbuf, Gio, GLib
ImportError: cannot import name 'Gtk'

so, progress, I guess?

Rich

On Fri, Oct 31, 2014 at 2:55 PM, Luca Bruno lethalma...@gmail.com wrote:

 What pygobject are using? Please write down the .nix expression.

 On Fri, Oct 31, 2014 at 10:45 PM, Richard Wallace 
 rwall...@thewallacepack.net wrote:

 On Fri, Oct 31, 2014 at 12:05 PM, Bjørn Forsman bjorn.fors...@gmail.com
 wrote:

 Hi Richard,

 On 31 October 2014 19:28, Richard Wallace rwall...@thewallacepack.net
 wrote:
  Hey all,
 [...]
  Now I'm trying to get pithos (a Pandora GTK client) built [1].  Pithos
  builds and everything looks ok, but when I try and run it I get
  `ImportError: No module named gi`.  I'm not familiar with Python
  development, but a bit of Googling indicates that python can't
 pygobject.
 
  Looking at the wrapper created, I see the path to
 
 `/nix/store/hlyp3a9cy5k7qhfc1chd1v3bm2jljazn-pygobject-2.28.6/lib/python2.7/site-packages`
  included in the PYTHONPATH.

 I think you need to add gobjectIntrospection to buildInputs, and then
 wrap the executable with GI_TYPELIB_PATH set to GI_TYPELIB_PATH from
 the build environment. See the virt-manager expression for example.


 Thanks for the suggestion.  It seems to make sense, so I modified the
 package as you suggested [1]. Unfortunately I'm still getting the same
 error.

 The `pithos` script includes the line

   export
 GI_TYPELIB_PATH=/nix/store/9imvrzskcak2998zj1242jxgl4p9m5dp-gst-plugins-base-1.4.1/lib/girepository-1.0:/nix/store/byi4j636s13m8w28nvqiakn6nzakmadr-gstreamer-1.4.1/lib/girepository-1.0:/nix/store/y06kp3fxw3r5r3nfkqzc8l3y7r3kvns0-libnotify-0.7.6/lib/girepository-1.0:/nix/store/4z6rr314xg1iszkn2wjvvl16yfmwgwa7-gobject-introspection-1.40.0/lib/girepository-1.0${GI_TYPELIB_PATH:+:}$GI_TYPELIB_PATH

 so it looks like it is doing what it is supposed to.

 Rich

 [1] http://pastebin.com/amAc8wpG

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




 --
 www.debian.org - The Universal Operating System

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


Re: [Nix-dev] Trouble with pygobject

2014-10-31 Thread Richard Wallace
D'oh! I must have dropped that somewhere along the lines. Thanks!

On Fri, Oct 31, 2014 at 3:01 PM, Luca Bruno lethalma...@gmail.com wrote:

 Put gtk, pango and gdk-pixbuf in the buildInputs.

 On Fri, Oct 31, 2014 at 10:59 PM, Richard Wallace 
 rwall...@thewallacepack.net wrote:

 The nix expression was linked.

 I noticed that virt-manager is using pyobject3 so I tried changing to use
 that too, and I got further.  Now I'm getting

 ERROR:root:Could not find any typelib for Gtk
 ERROR:root:Could not find any typelib for Gdk
 ERROR:root:Could not find any typelib for Pango
 ERROR:root:Could not find any typelib for GdkPixbuf
 Traceback (most recent call last):
   File
 /nix/store/wm1ybs2040xxw8r7d4448qifjb0ckazg-python3.4-pithos-1.0.1/bin/..pithos-wrapped-wrapped,
 line 10, in module
 load_entry_point('pithos==1.0.1', 'gui_scripts', 'pithos')()
   File
 /nix/store/kpcbbc1104jqd39njz1c709jlrmbkzfj-python3.4m-setuptools-5.8/lib/python3.4/site-packages/setuptools-5.8-py3.4.egg/pkg_resources.py,
 line 339, in load_entry_point
 return get_distribution(dist).load_entry_point(group, name)
   File
 /nix/store/kpcbbc1104jqd39njz1c709jlrmbkzfj-python3.4m-setuptools-5.8/lib/python3.4/site-packages/setuptools-5.8-py3.4.egg/pkg_resources.py,
 line 2457, in load_entry_point
 return ep.load()
   File
 /nix/store/kpcbbc1104jqd39njz1c709jlrmbkzfj-python3.4m-setuptools-5.8/lib/python3.4/site-packages/setuptools-5.8-py3.4.egg/pkg_resources.py,
 line 2171, in load
 ['__name__'])
   File
 /nix/store/wm1ybs2040xxw8r7d4448qifjb0ckazg-python3.4-pithos-1.0.1/lib/python3.4/site-packages/pithos/pithos.py,
 line 26, in module
 from gi.repository import Gst, GstPbutils, GObject, Gtk, Gdk, Pango,
 GdkPixbuf, Gio, GLib
 ImportError: cannot import name 'Gtk'

 so, progress, I guess?

 Rich

 On Fri, Oct 31, 2014 at 2:55 PM, Luca Bruno lethalma...@gmail.com
 wrote:

 What pygobject are using? Please write down the .nix expression.

 On Fri, Oct 31, 2014 at 10:45 PM, Richard Wallace 
 rwall...@thewallacepack.net wrote:

 On Fri, Oct 31, 2014 at 12:05 PM, Bjørn Forsman 
 bjorn.fors...@gmail.com wrote:

 Hi Richard,

 On 31 October 2014 19:28, Richard Wallace rwall...@thewallacepack.net
 wrote:
  Hey all,
 [...]
  Now I'm trying to get pithos (a Pandora GTK client) built [1].
 Pithos
  builds and everything looks ok, but when I try and run it I get
  `ImportError: No module named gi`.  I'm not familiar with Python
  development, but a bit of Googling indicates that python can't
 pygobject.
 
  Looking at the wrapper created, I see the path to
 
 `/nix/store/hlyp3a9cy5k7qhfc1chd1v3bm2jljazn-pygobject-2.28.6/lib/python2.7/site-packages`
  included in the PYTHONPATH.

 I think you need to add gobjectIntrospection to buildInputs, and then
 wrap the executable with GI_TYPELIB_PATH set to GI_TYPELIB_PATH from
 the build environment. See the virt-manager expression for example.


 Thanks for the suggestion.  It seems to make sense, so I modified the
 package as you suggested [1]. Unfortunately I'm still getting the same
 error.

 The `pithos` script includes the line

   export
 GI_TYPELIB_PATH=/nix/store/9imvrzskcak2998zj1242jxgl4p9m5dp-gst-plugins-base-1.4.1/lib/girepository-1.0:/nix/store/byi4j636s13m8w28nvqiakn6nzakmadr-gstreamer-1.4.1/lib/girepository-1.0:/nix/store/y06kp3fxw3r5r3nfkqzc8l3y7r3kvns0-libnotify-0.7.6/lib/girepository-1.0:/nix/store/4z6rr314xg1iszkn2wjvvl16yfmwgwa7-gobject-introspection-1.40.0/lib/girepository-1.0${GI_TYPELIB_PATH:+:}$GI_TYPELIB_PATH

 so it looks like it is doing what it is supposed to.

 Rich

 [1] http://pastebin.com/amAc8wpG

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




 --
 www.debian.org - The Universal Operating System





 --
 www.debian.org - The Universal Operating System

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


[Nix-dev] XMonad and Taffybar on nixos

2014-10-28 Thread Richard Wallace
Hello,

Is anyone using xmonad and taffybar on nixos?  I'm trying to, but I'm
running into an issue with xmonad not being able to find modules provided
by taffybar.

Trying compile xmonad results in Could not find module:
System.Taffybar.Hooks.PagerHints

I set up xmonad as described on the NixOS Xmonad wiki page.  I installed
taffybar using environment.systemPackages in my configuration.nix.  Any
idea what I am missing?

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


[Nix-dev] Broken ghc for OS X on cache.nixos.org

2014-10-16 Thread Richard Wallace
Hello all,

In an effort to get our team to start using nix, I've setup a project of
ours to be built with nix.  One obstacle I've run into is that most of the
team (pretty much everyone except me) is using OS X, so I've been trying to
overcome the OS X ghc being broken in the nix cache [1].

I've gone ahead and built a new ghc binary on OS X and created a cache
containing it and other Haskell packages.  I thought everything was going
great until I tried to actually use it by running

  $ nix-shell shell.nix --option binary-caches http://mycache --command
'cabal configure --enable-tests'

This still downloads the ghc package from http://cache.nixos.org, which is
what I'm trying to avoid.  I used wireshark to see what is going on, and it
appears that my cache is never checked, nix just goes and starts
downloading from cache.nixos.org.  My guess is that this is because of the
MANIFEST from the nixpkgs-unstable channel.  Is that correct?  If so, how
can I override that?

Thanks,
Rich

PS It would be great if this weren't a problem.  I was told this issue
should be getting resolved soon since there is a new OS X build box and
that I just needed to wait a few days.  Any idea when a fixed ghc for OS X
package will appear on cache.nixos.org?

[1] https://github.com/NixOS/nixpkgs/issues/2689
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Broken ghc for OS X on cache.nixos.org

2014-10-16 Thread Richard Wallace
On Thu, Oct 16, 2014 at 3:28 PM, Richard Wallace 
rwall...@thewallacepack.net wrote:

 On Thu, Oct 16, 2014 at 2:55 PM, Mateusz Kowalczyk 
 fuuze...@fuuzetsu.co.uk wrote:

 On 10/16/2014 09:53 PM, Richard Wallace wrote:
  Hello all,
 
  In an effort to get our team to start using nix, I've setup a project of
  ours to be built with nix.  One obstacle I've run into is that most of
 the
  team (pretty much everyone except me) is using OS X, so I've been
 trying to
  overcome the OS X ghc being broken in the nix cache [1].
 
  I've gone ahead and built a new ghc binary on OS X and created a cache
  containing it and other Haskell packages.  I thought everything was
 going
  great until I tried to actually use it by running
 
$ nix-shell shell.nix --option binary-caches http://mycache --command
  'cabal configure --enable-tests'

 I myself often wonder how to get nix to DWIM when it comes to binary
 caches. Does nix-build --option binary-caches … do what you want? Maybe
 nix-shell just ignores it…


 No, same thing happens with nix-build or nix-env.



  This still downloads the ghc package from http://cache.nixos.org,
 which is
  what I'm trying to avoid.  I used wireshark to see what is going on,
 and it
  appears that my cache is never checked, nix just goes and starts
  downloading from cache.nixos.org.  My guess is that this is because of
 the
  MANIFEST from the nixpkgs-unstable channel.  Is that correct?  If so,
 how
  can I override that?

 You could try doing a manual nix-pull of your manifest. I do it to a
 local machine like so:

 nix-pull http://yuuki:3000/jobset/nixpkgs/trunk/channel/latest/MANIFEST


 I will give that a try.  I'm not entirely sure it will work.  I guess the
 question is, when doing a nix-pull, will the entry for ghc be replaced or
 not?  It seems reasonable to me that it wouldn't be because the two caches
 have the same checksum and everything, so they appear to be the same.
 So, from the perspective of nix, which one it pulls from should be
 arbitrary.


That does seem to work.  Not ideal because I'll have to make sure it is run
consistently, but it should get me by for now.

Thanks again!




  Thanks,
  Rich
 
  PS It would be great if this weren't a problem.  I was told this issue
  should be getting resolved soon since there is a new OS X build box and
  that I just needed to wait a few days.  Any idea when a fixed ghc for
 OS X
  package will appear on cache.nixos.org?

 The update announcement was on the 9th and the unstable is currently on
 the commit from the 14th so I would have thought if it was fixed then it
 would be in the cache already. I think however than Haskell stuff on
 darwin was switched off so perhaps it just needs to be turned on again.
 You should ask around on #2689 about what's going on in that area.


 Done. Hopefully someone in the know will update that issue with the latest
 status soon.

 Thanks.



  [1] https://github.com/NixOS/nixpkgs/issues/2689
 
 
 
  ___
  nix-dev mailing list
  nix-dev@lists.science.uu.nl
  http://lists.science.uu.nl/mailman/listinfo/nix-dev
 


 --
 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


[Nix-dev] ghc not able to find libz.so

2014-10-14 Thread Richard Wallace
Hello all,

I put nix on a new machine today and tried to build a Haskell project that
successfully builds on other machines.  To my great surprise, I encountered
this error

[ 6 of 12] Compiling Rainicorn.Types  ( src/Rainicorn/Types.hs,
dist/build/hiberico/hiberico-tmp/Rainicorn/Types.o )

no location info:
ghc: panic! (the 'impossible' happened)
  (GHC version 7.8.3 for x86_64-unknown-linux):
Dynamic linker not initialised

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

Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package array-0.5.0.0 ... linking ... done.
Loading package deepseq-1.3.0.2 ... linking ... done.
Loading package bytestring-0.10.4.0 ... linking ... done.
Loading package containers-0.5.5.1 ... linking ... done.
Loading package binary-0.7.1.0 ... linking ... done.
Loading package digest-0.0.1.2 ... linking ... done.
Loading package filepath-1.3.0.2 ... linking ... done.
Loading package old-locale-1.0.0.6 ... linking ... done.
Loading package time-1.4.2 ... linking ... done.
Loading package unix-2.7.0.1 ... linking ... done.
Loading package directory-1.2.1.0 ... linking ... done.
Loading package transformers-0.3.0.0 ... linking ... done.
Loading package mtl-2.1.2 ... linking ... done.
Loading package old-time-1.1.0.2 ... linking ... done.
Loading package pretty-1.1.1.1 ... linking ... done.
Loading package text-1.1.1.3 ... linking ... done.
Loading package zlib-0.5.4.1 ...
no location info:
command line: can't load .so/.DLL for: libz.so (libz.so: cannot open
shared object file: No such file or directory)

This project is using ghc 7.8.3 and a pretty recent nixpkgs.  I'm not
seeing this error on other machines so have no idea what could be going
on.  Any ideas?

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


Re: [Nix-dev] ghc not able to find libz.so

2014-10-14 Thread Richard Wallace
I will give those workarounds a try. I'm just confused about why it is
necessary on one machine and not another. Part of the promise of nix is
reproducible builds, but this appears to throw a monkey wrench into that
notion.

I'm also a bit surprised this doesn't come up more often. The project being
built doesn't directly rely on zlib or any other C code, this problem
occurs when template Haskell is being used to generate lenses.
On Oct 14, 2014 7:53 PM, Raahul Kumar raahul.ku...@gmail.com wrote:

 This Haskell depending on C library problem has happened before

 http://comments.gmane.org/gmane.linux.distributions.nixos/13362

 This haskell program needs a zlib. My link above has Peter Simmon's hack.

 Aloha,
 RK.



 On Wed, Oct 15, 2014 at 12:33 PM, Richard Wallace 
 rwall...@thewallacepack.net wrote:

 Hello all,

 I put nix on a new machine today and tried to build a Haskell project
 that successfully builds on other machines.  To my great surprise, I
 encountered this error

 [ 6 of 12] Compiling Rainicorn.Types  ( src/Rainicorn/Types.hs,
 dist/build/hiberico/hiberico-tmp/Rainicorn/Types.o )

 no location info:
 ghc: panic! (the 'impossible' happened)
   (GHC version 7.8.3 for x86_64-unknown-linux):
 Dynamic linker not initialised

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

 Loading package ghc-prim ... linking ... done.
 Loading package integer-gmp ... linking ... done.
 Loading package base ... linking ... done.
 Loading package array-0.5.0.0 ... linking ... done.
 Loading package deepseq-1.3.0.2 ... linking ... done.
 Loading package bytestring-0.10.4.0 ... linking ... done.
 Loading package containers-0.5.5.1 ... linking ... done.
 Loading package binary-0.7.1.0 ... linking ... done.
 Loading package digest-0.0.1.2 ... linking ... done.
 Loading package filepath-1.3.0.2 ... linking ... done.
 Loading package old-locale-1.0.0.6 ... linking ... done.
 Loading package time-1.4.2 ... linking ... done.
 Loading package unix-2.7.0.1 ... linking ... done.
 Loading package directory-1.2.1.0 ... linking ... done.
 Loading package transformers-0.3.0.0 ... linking ... done.
 Loading package mtl-2.1.2 ... linking ... done.
 Loading package old-time-1.1.0.2 ... linking ... done.
 Loading package pretty-1.1.1.1 ... linking ... done.
 Loading package text-1.1.1.3 ... linking ... done.
 Loading package zlib-0.5.4.1 ...
 no location info:
 command line: can't load .so/.DLL for: libz.so (libz.so: cannot
 open shared object file: No such file or directory)

 This project is using ghc 7.8.3 and a pretty recent nixpkgs.  I'm not
 seeing this error on other machines so have no idea what could be going
 on.  Any ideas?

 Thanks,
 Rich

 ___
 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] Seg fault on Arch

2014-10-13 Thread Richard Wallace
Hey all,

All of a sudden I'm seeing seg faults with any nix-* commands.  Probably
due to some Arch package upgrade.  I tried reinstalling nix but that fails
with a seg fault too.  Anyone else seeing the same and figured out a fix?

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


[Nix-dev] Cabal in nix environment producing different binaries

2014-09-09 Thread Richard Wallace
Hello again,

I got my nix environment all setup for building our Haskell app and went to
deploy it to a development box this morning, only to find out that it
wouldn't run.  After doing some inspection, it seems that the binary
produced in the the nix environment is radically different than out of the
nix environment.

When building outside the nix environment with cabal sandboxes, the binary
is 40M. When building in the nix environment the binary is only 14M.  I
also see slightly different shared libraries linked to.  When building with
cabal I see

linux-vdso.so.1 (0x7fffc23f4000)
libz.so.1 = /usr/lib/libz.so.1 (0x7fccc0f4d000)
librt.so.1 = /usr/lib/librt.so.1 (0x7fccc0d45000)
libutil.so.1 = /usr/lib/libutil.so.1 (0x7fccc0b42000)
libdl.so.2 = /usr/lib/libdl.so.2 (0x7fccc093e000)
libpthread.so.0 = /usr/lib/libpthread.so.0 (0x7fccc072)
libgmp.so.10 = /usr/lib/libgmp.so.10 (0x7fccc04a9000)
libm.so.6 = /usr/lib/libm.so.6 (0x7fccc01a5000)
libffi.so.6 = /usr/lib/libffi.so.6 (0x7fccbff9d000)
libc.so.6 = /usr/lib/libc.so.6 (0x7fccbfbef000)
/lib64/ld-linux-x86-64.so.2 (0x7fccc1163000)

When building in the nix environment, the libffi link is missing.

My goal here is to be able to build a binary locally in nix and move it
over to a machine that doesn't have nix installed.  Is that going to be
possible?

Thanks for all the help,
Rich
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Cabal in nix environment producing different binaries

2014-09-09 Thread Richard Wallace
On Tue, Sep 9, 2014 at 10:53 AM, Mateusz Kowalczyk fuuze...@fuuzetsu.co.uk
wrote:

 On 09/09/2014 06:41 PM, Richard Wallace wrote:
  Hello again,
 
  I got my nix environment all setup for building our Haskell app and went
 to
  deploy it to a development box this morning, only to find out that it
  wouldn't run.  After doing some inspection, it seems that the binary
  produced in the the nix environment is radically different than out of
 the
  nix environment.
 
  When building outside the nix environment with cabal sandboxes, the
 binary
  is 40M. When building in the nix environment the binary is only 14M.  I
  also see slightly different shared libraries linked to.  When building
 with
  cabal I see
 
  linux-vdso.so.1 (0x7fffc23f4000)
  libz.so.1 = /usr/lib/libz.so.1 (0x7fccc0f4d000)
  librt.so.1 = /usr/lib/librt.so.1 (0x7fccc0d45000)
  libutil.so.1 = /usr/lib/libutil.so.1 (0x7fccc0b42000)
  libdl.so.2 = /usr/lib/libdl.so.2 (0x7fccc093e000)
  libpthread.so.0 = /usr/lib/libpthread.so.0 (0x7fccc072)
  libgmp.so.10 = /usr/lib/libgmp.so.10 (0x7fccc04a9000)
  libm.so.6 = /usr/lib/libm.so.6 (0x7fccc01a5000)
  libffi.so.6 = /usr/lib/libffi.so.6 (0x7fccbff9d000)
  libc.so.6 = /usr/lib/libc.so.6 (0x7fccbfbef000)
  /lib64/ld-linux-x86-64.so.2 (0x7fccc1163000)
 
  When building in the nix environment, the libffi link is missing.
 
  My goal here is to be able to build a binary locally in nix and move it
  over to a machine that doesn't have nix installed.  Is that going to be
  possible?
 
  Thanks for all the help,
  Rich
 
 
 
  ___
  nix-dev mailing list
  nix-dev@lists.science.uu.nl
  http://lists.science.uu.nl/mailman/listinfo/nix-dev
 

 Recent thread archived at [1] may be of interest to you.


Thanks, that is very helpful :)
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] Developing with older packages

2014-09-08 Thread Richard Wallace
Hello,

I'm using nix-shell to setup a Haskell environment for development.  On a
project I ran into a problem recently, and I'm curious if there is a
common/preferred way of solving it.

The problem I ran into is that the project depends on the mongoDB 1.5
package.  The API changed drastically in 2.0 and we're not ready to
undertake the upgrade yet.  I think I can handle this by creating a nixpkgs
directory in the project, putting a mongoDB/default.nix file in there that
is setup for the version we need, then override it in our shell.nix file
like this:

let

   pkgs = import nixpkgs {};

   haskellPackages = pkgs.haskellPackages.override {

 extension = self: super: {
   mongoDB = self.callPackage nixpkgs/mongoDB {};
   ourkidsclass = self.callPackage ./. {};

 };

   };

Is this a reasonable approach? Is there a better way?

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


Re: [Nix-dev] Developing with older packages

2014-09-08 Thread Richard Wallace
On Mon, Sep 8, 2014 at 9:03 AM, Mateusz Kowalczyk fuuze...@fuuzetsu.co.uk
wrote:

 On 09/08/2014 04:56 PM, Richard Wallace wrote:
  Hello,
 
  I'm using nix-shell to setup a Haskell environment for development.  On a
  project I ran into a problem recently, and I'm curious if there is a
  common/preferred way of solving it.
 
  The problem I ran into is that the project depends on the mongoDB 1.5
  package.  The API changed drastically in 2.0 and we're not ready to
  undertake the upgrade yet.  I think I can handle this by creating a
 nixpkgs
  directory in the project, putting a mongoDB/default.nix file in there
 that
  is setup for the version we need, then override it in our shell.nix file
  like this:
 
  let
 
 pkgs = import nixpkgs {};
 
 haskellPackages = pkgs.haskellPackages.override {
 
   extension = self: super: {
 mongoDB = self.callPackage nixpkgs/mongoDB {};
 ourkidsclass = self.callPackage ./. {};
 
   };
 
 };
 
  Is this a reasonable approach? Is there a better way?
 
  Thanks,
  Rich
 
 
 
  ___
  nix-dev mailing list
  nix-dev@lists.science.uu.nl
  http://lists.science.uu.nl/mailman/listinfo/nix-dev
 

 This looks as good of a solution as any other one could come up with. Is
 there something you're dissatisfied with that you would like to have in
 a ‘better’ solution?


Well, the mongoDB package isn't the only one that I want to get a specific
version of.  We originally built it with a sandbox and used `cabal freeze`
to make sure everyone is using the same versions.  So there are a number of
such packages and I was hoping for something a bit more automated.  Perhaps
I can script something to make it a bit easier to maintain.

Rich



 --
 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


Re: [Nix-dev] Developing with older packages

2014-09-08 Thread Richard Wallace
On Mon, Sep 8, 2014 at 9:04 AM, Vladimír Čunát vcu...@gmail.com wrote:

 Hi.

 On 09/08/2014 05:56 PM, Richard Wallace wrote:

 The API changed drastically in 2.0 and we're not ready to undertake the
 upgrade yet.


 That sounds like it makes sense to keep mongoDB_1_5 in nixpkgs, at least
 for some time. More people may experience the same issue. (It seems
 simplified by the fact that I see no package that depends on mongoDB.)


One thing that surprised me about nix when I started using it is that there
isn't a way to say, I need package X with version Y.  Instead, you have
to resort to having multiple definitions of the package with different
package names for different versions.  This seems a bit hacky to me.  As
mentioned in a separate reply, I expect to have several such packages and
being able to specify it that way would make things much easier.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] nixops waits forever for SSH

2014-08-22 Thread Richard Wallace
Ok, there is a vboxnet0 but it does not have the necessary IP address.  Did
I miss a step in the manual?


On Fri, Aug 22, 2014 at 2:49 AM, Eelco Dolstra eelco.dols...@logicblox.com
wrote:

 Hi,

 On 22/08/14 01:19, Luca Bruno wrote:

  Try disabling the firewall in the nixos configuration.

 Port 22 is open in the firewall by default, so that's not it.

 Make sure that interface vboxnet0 exists with IP address 192.168.56.1/24,
 and
 that there is a route for 192.168.56.0/24.

 --
 Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/
 ___
 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] nixops No such file or directory after creation

2014-08-21 Thread Richard Wallace
Wout,

That did the trick! Having some issues getting VBoxManage to work (either
inside the nix-shell or outside of it), but once that's fixed I'll be good
to go.

Thanks for all the help!

Rich


On Thu, Aug 21, 2014 at 3:13 AM, Wout Mertens wout.mert...@gmail.com
wrote:

 Hi Rich,

 you have to specify the attribute for virtualbox, not the package name. So
 linuxPackages.virtualbox in this case. You can find the attributes with
 nix-env -qaP

 Wout.



 On Thu, Aug 21, 2014 at 12:02 AM, Richard Wallace 
 rwall...@thewallacepack.net wrote:

 Ok, that will work if I can figure one last thing out.  My goal here is
 to use nixops to deploy an application into virtualbox for testing locally,
 and to EC2 for production.  I was hoping to use nixops without being in a
 nix-shell if I could so I could use my already installed virtualbox.

 I figured I could still do it, but I would just need to get virtualbox
 installed into the shell.  So I tried to start it with that package

 $ nix-shell --pure -p nix -p nixops -p virtualbox --show-trace
 error: while evaluating the attribute `nativeBuildInputs' of the
 derivation `shell' at
 /nix/store/pbndpjx0wddm96v9kpiv408ljywccnn8-nixpkgs-14.10pre47363.2e2d3f3/nixpkgs/pkgs/build-support/trivial-builders.nix:10:14:
 while evaluating `optionals' at
 /nix/store/pbndpjx0wddm96v9kpiv408ljywccnn8-nixpkgs-14.10pre47363.2e2d3f3/nixpkgs/lib/lists.nix:117:21,
 called from
 /nix/store/pbndpjx0wddm96v9kpiv408ljywccnn8-nixpkgs-14.10pre47363.2e2d3f3/nixpkgs/pkgs/stdenv/generic/default.nix:121:56:
 while evaluating the attribute `buildInputs' at (string):1:49:
 undefined variable `virtualbox' at (string):1:81

 I can install it to my environment just file, though.  So it seems
 something about the virtualbox config and nix-shell just aren't getting
 along.  If I could get that resolved, I think I'd be off to the races. :)

 Rich


 On Wed, Aug 20, 2014 at 11:38 AM, Wout Mertens wout.mert...@gmail.com
 wrote:

 Just create a wrapper for nixops that calls nix-shell --pure -p nix -p
 nixos --command nixops?

 Wout.
 On Aug 20, 2014 6:56 PM, Richard Wallace rwall...@thewallacepack.net
 wrote:

 Aha! Because I started with `nix-shell --pure -p nixops` none of the
 nix commands were in my $PATH and I didn't even realize it.  That fixed it.

 I'd like to avoid needing to use nix-shell to use nixops, but when I
 try to use nixops from my regular shell I get

 $ nixops list
 Traceback (most recent call last):
   File
 /nix/store/lx8n1wija7n0mijpq0p3g0sj0ymnvw2k-nixops-1.2/bin/..nixops-wrapped-wrapped,
 line 5, in module
 from nixops import deployment
   File
 /nix/store/lx8n1wija7n0mijpq0p3g0sj0ymnvw2k-nixops-1.2/lib/python2.7/site-packages/nixops/deployment.py,
 line 5, in module
 import subprocess
   File
 /nix/store/rr4vmi7zzbximnrfj7czya1wy4k0ii9d-python-2.7.8/lib/python2.7/subprocess.py,
 line 430, in module
 import pickle
   File
 /nix/store/rr4vmi7zzbximnrfj7czya1wy4k0ii9d-python-2.7.8/lib/python2.7/pickle.py,
 line 34, in module
 import struct
   File
 /nix/store/rr4vmi7zzbximnrfj7czya1wy4k0ii9d-python-2.7.8/lib/python2.7/struct.py,
 line 1, in module
 from _struct import *
 ImportError:
 /nix/store/rr4vmi7zzbximnrfj7czya1wy4k0ii9d-python-2.7.8/lib/python2.7/lib-dynload/_struct.so:
 undefined symbol: PyUnicodeUCS2_AsEncodedString

 If someone could tell me how to fix that I would be extremely happy. :)

 Thanks,
 Rich


 On Wed, Aug 20, 2014 at 9:46 AM, Domen Kožar do...@dev.si wrote:

 nix-instantiate is missing in your $PATH.


 On Wed, Aug 20, 2014 at 6:28 PM, Richard Wallace 
 rwall...@thewallacepack.net wrote:

 Yes, sorry, I meant to do that and then completely forgot.

 $ nixops info --debug -d d397269c-27fb-11e4-96b7-d1c68637124d
 Traceback (most recent call last):
   File
 /nix/store/lx8n1wija7n0mijpq0p3g0sj0ymnvw2k-nixops-1.2/bin/..nixops-wrapped-wrapped,
 line 855, in module
 args.op()
   File
 /nix/store/lx8n1wija7n0mijpq0p3g0sj0ymnvw2k-nixops-1.2/bin/..nixops-wrapped-wrapped,
 line 192, in op_info
 do_eval(depl)
   File
 /nix/store/lx8n1wija7n0mijpq0p3g0sj0ymnvw2k-nixops-1.2/bin/..nixops-wrapped-wrapped,
 line 139, in do_eval
 depl.evaluate()
   File
 /nix/store/lx8n1wija7n0mijpq0p3g0sj0ymnvw2k-nixops-1.2/lib/python2.7/site-packages/nixops/deployment.py,
 line 291, in evaluate
 -A, info], stderr=self.logger.log_file)
   File
 /nix/store/rr4vmi7zzbximnrfj7czya1wy4k0ii9d-python-2.7.8/lib/python2.7/subprocess.py,
 line 566, in check_output
 process = Popen(stdout=PIPE, *popenargs, **kwargs)
   File
 /nix/store/rr4vmi7zzbximnrfj7czya1wy4k0ii9d-python-2.7.8/lib/python2.7/subprocess.py,
 line 710, in __init__
 errread, errwrite)
   File
 /nix/store/rr4vmi7zzbximnrfj7czya1wy4k0ii9d-python-2.7.8/lib/python2.7/subprocess.py,
 line 1327, in _execute_child
 raise child_exception
 OSError: [Errno 2] No such file or directory



 On Wed, Aug 20, 2014 at 9:26 AM, Eelco Dolstra 
 eelco.dols...@logicblox.com wrote:

 Hi,

 On 20/08/14 18:21

Re: [Nix-dev] nixops No such file or directory after creation

2014-08-21 Thread Richard Wallace
Neither of those suggestions worked.  I'm not sure what is going on.  I've
searched google for the error

[nix-shell:~/Development/test/nix]$ VBoxManage startvm
nixops-d397269c-27fb-11e4-96b7-d1c68637124d-webserver --type headless
Waiting for VM nixops-d397269c-27fb-11e4-96b7-d1c68637124d-webserver to
power on...
VBoxManage: error: The virtual machine
'nixops-d397269c-27fb-11e4-96b7-d1c68637124d-webserver' has terminated
unexpectedly during startup with exit code 1
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component
Machine, interface IMachine

And that seems to indicate many different things.  I've tried all the
solutions I've found so far and none of them work for me so far.  I'll have
to keep poking at it.

Thanks,
Rich


On Thu, Aug 21, 2014 at 11:44 AM, Wout Mertens wout.mert...@gmail.com
wrote:

 Also note that the VirtualBox installed by nixpkgs doesn't get setuid root
 so either do that manually (breaking statelessness a little) or run as
 root.

 If the version is an issue, you can override the derivation or do a pull
 request :-)

 Wout.
 On Aug 21, 2014 8:29 PM, Richard Wallace rwall...@thewallacepack.net
 wrote:

 Grr. Seems I spoke too soon.  Looks like the problem is that the
 VirtualBox installed via the Arch package manager is version 4.3.14 and the
 one in the nix-shell is version 4.3.12.  At least I hope that is the
 problem because I should be able to fix that, I hope.


 On Thu, Aug 21, 2014 at 11:08 AM, Richard Wallace 
 rwall...@thewallacepack.net wrote:

 Wout,

 That did the trick! Having some issues getting VBoxManage to work
 (either inside the nix-shell or outside of it), but once that's fixed I'll
 be good to go.

 Thanks for all the help!

 Rich


 On Thu, Aug 21, 2014 at 3:13 AM, Wout Mertens wout.mert...@gmail.com
 wrote:

 Hi Rich,

 you have to specify the attribute for virtualbox, not the package name.
 So linuxPackages.virtualbox in this case. You can find the attributes with
 nix-env -qaP

 Wout.



 On Thu, Aug 21, 2014 at 12:02 AM, Richard Wallace 
 rwall...@thewallacepack.net wrote:

 Ok, that will work if I can figure one last thing out.  My goal here
 is to use nixops to deploy an application into virtualbox for testing
 locally, and to EC2 for production.  I was hoping to use nixops without
 being in a nix-shell if I could so I could use my already installed
 virtualbox.

 I figured I could still do it, but I would just need to get virtualbox
 installed into the shell.  So I tried to start it with that package

 $ nix-shell --pure -p nix -p nixops -p virtualbox --show-trace
 error: while evaluating the attribute `nativeBuildInputs' of the
 derivation `shell' at
 /nix/store/pbndpjx0wddm96v9kpiv408ljywccnn8-nixpkgs-14.10pre47363.2e2d3f3/nixpkgs/pkgs/build-support/trivial-builders.nix:10:14:
 while evaluating `optionals' at
 /nix/store/pbndpjx0wddm96v9kpiv408ljywccnn8-nixpkgs-14.10pre47363.2e2d3f3/nixpkgs/lib/lists.nix:117:21,
 called from
 /nix/store/pbndpjx0wddm96v9kpiv408ljywccnn8-nixpkgs-14.10pre47363.2e2d3f3/nixpkgs/pkgs/stdenv/generic/default.nix:121:56:
 while evaluating the attribute `buildInputs' at (string):1:49:
 undefined variable `virtualbox' at (string):1:81

 I can install it to my environment just file, though.  So it seems
 something about the virtualbox config and nix-shell just aren't getting
 along.  If I could get that resolved, I think I'd be off to the races. :)

 Rich


 On Wed, Aug 20, 2014 at 11:38 AM, Wout Mertens wout.mert...@gmail.com
  wrote:

 Just create a wrapper for nixops that calls nix-shell --pure -p nix
 -p nixos --command nixops?

 Wout.
 On Aug 20, 2014 6:56 PM, Richard Wallace 
 rwall...@thewallacepack.net wrote:

 Aha! Because I started with `nix-shell --pure -p nixops` none of the
 nix commands were in my $PATH and I didn't even realize it.  That fixed 
 it.

 I'd like to avoid needing to use nix-shell to use nixops, but when I
 try to use nixops from my regular shell I get

 $ nixops list
 Traceback (most recent call last):
   File
 /nix/store/lx8n1wija7n0mijpq0p3g0sj0ymnvw2k-nixops-1.2/bin/..nixops-wrapped-wrapped,
 line 5, in module
 from nixops import deployment
   File
 /nix/store/lx8n1wija7n0mijpq0p3g0sj0ymnvw2k-nixops-1.2/lib/python2.7/site-packages/nixops/deployment.py,
 line 5, in module
 import subprocess
   File
 /nix/store/rr4vmi7zzbximnrfj7czya1wy4k0ii9d-python-2.7.8/lib/python2.7/subprocess.py,
 line 430, in module
 import pickle
   File
 /nix/store/rr4vmi7zzbximnrfj7czya1wy4k0ii9d-python-2.7.8/lib/python2.7/pickle.py,
 line 34, in module
 import struct
   File
 /nix/store/rr4vmi7zzbximnrfj7czya1wy4k0ii9d-python-2.7.8/lib/python2.7/struct.py,
 line 1, in module
 from _struct import *
 ImportError:
 /nix/store/rr4vmi7zzbximnrfj7czya1wy4k0ii9d-python-2.7.8/lib/python2.7/lib-dynload/_struct.so:
 undefined symbol: PyUnicodeUCS2_AsEncodedString

 If someone could tell me how to fix that I would be extremely happy.
 :)

 Thanks,
 Rich


 On Wed, Aug 20, 2014 at 9:46 AM, Domen

[Nix-dev] nixops waits forever for SSH

2014-08-21 Thread Richard Wallace
Hello again,

I finally got `nixops deploy -d trivial` to create a virtualbox image and
start it - I had to abandon using virtualbox from nixpkgs and instead put
the VBoxManage installed by Arch on my PATH.

During startup, the IP address is determined correctly and then nixops
says, waiting for SSH... and then just waits forever.  I can see in the
virtualbox console that SSH started, but nixops is unable to see that.  Is
there a step I am missing?  vboxdrv, vboxnetadp and vboxnetflt are all
loaded correctly.

Thanks again,
Rich
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] nixops waits forever for SSH

2014-08-21 Thread Richard Wallace
On Thu, Aug 21, 2014 at 4:19 PM, Luca Bruno lethalma...@gmail.com wrote:

 Try disabling the firewall in the nixos configuration.


In trivial.nix, I replaced
  networking.firewall.allowedTCPPorts = [ 80 ];

with

  networking.firewall.enable = false;

nixops was still unable to determine when the ssh server came up in the
virtual machine.



 About the virtualbox issue, it's possible that the vbox kernel of your
 linux box is not compatible with the nixpkgs virtualbox.


That's about what I'd figured too.  It's not so bad, I'll just have a
~/nix/bin that I'll put in the PATH.  That way I can circumvent the purity
of nix-shell somewhat.



 On Fri, Aug 22, 2014 at 1:15 AM, Richard Wallace 
 rwall...@thewallacepack.net wrote:

 Hello again,

 I finally got `nixops deploy -d trivial` to create a virtualbox image and
 start it - I had to abandon using virtualbox from nixpkgs and instead put
 the VBoxManage installed by Arch on my PATH.

 During startup, the IP address is determined correctly and then nixops
 says, waiting for SSH... and then just waits forever.  I can see in the
 virtualbox console that SSH started, but nixops is unable to see that.  Is
 there a step I am missing?  vboxdrv, vboxnetadp and vboxnetflt are all
 loaded correctly.

 Thanks again,
 Rich

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




 --
 www.debian.org - The Universal Operating System

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


Re: [Nix-dev] ghc-mod + nix-shell?

2014-08-20 Thread Richard Wallace
I've been struggling to get this working.  I have ghc-mod installed, but it
fails to see the packages I have installed when I go into nix-shell.  If
you did get it working, could you post your .nix file somewhere so I (and
others) can take a look?

Thanks,
Rich


On Wed, Aug 20, 2014 at 4:15 AM, Mateusz Kowalczyk fuuze...@fuuzetsu.co.uk
wrote:

 On 08/20/2014 11:44 AM, Mateusz Kowalczyk wrote:
  Hi,
 
  ghc-mod-5.x just came out so I thought I'll give it a try again – I had
  bad experience with it when on Gentoo as it really hates mixing GHC
  versions.
 
  What I did was package 5.x and then add it to buildTools of my project
  through shell.nix
 
  After updating the cabal file and running cabal configure so it would
  stop complaining, ‘ghc-mod’ command itself works:
 
  [nix-shell:~/programming/tsuntsun]$ ghc-mod check src/Main.hs
  src/Main.hs:62:1:The type signature for ‘unlessM’ lacks an accompanying
  binding
 
 
  but ghc-modi which is what is actually used does not:
 
  [nix-shell:~/programming/tsuntsun]$ ghc-modi
  NG BUG: command line: cannot satisfy -package-id
  text-1.1.1.3-19b1d34e1f78946a216fb2a95da8973b\n(use -v for more
  information)
 
  If I run ghc-pkg check then it tells me the package is broken
 
  [nix-shell:~/programming/tsuntsun]$ TERM=xterm ghc-pkg check
  There are problems in package ghc-mod-5.0.1:
dependency djinn-ghc-0.0.2.2-c9b696804551566f24c6318e5fc83a11
  doesn't exist
dependency ghc-paths-0.1.0.9-7d0e6178c3518b928e3a89e76cbed29c
  doesn't exist
dependency ghc-syb-utils-0.2.1.2-981aa43f46526d20b8f2800284ea5c4a
  doesn't exist
dependency
  haskell-src-exts-1.15.0.1-2a731a74bc57b134a58a272454970c29 doesn't
 exist
dependency hlint-1.9.3-5855c5e6c81c6eee0e4e737b366a37d4 doesn't exist
dependency io-choice-0.0.5-77f5291ed82ac6c645917df71b2b8442 doesn't
  exist
dependency monad-control-0.3.3.0-77020b8cc5cc6089930c75c98b452cd1
  doesn't exist
dependency monad-journal-0.2.3.0-aaa5a7e6af8534c7d3dbc5368ac0884a
  doesn't exist
dependency split-0.2.2-7c6e2bd13c1e04b85cc7ee759efb1a08 doesn't exist
dependency syb-0.4.2-3b61f5272a0cd76f5fc4924f04a86453 doesn't exist
dependency transformers-base-0.4.2-6e58862b37a26c65c3a96fa2518f39c3
  doesn't exist
 
  The following packages are broken, either because they have a problem
  listed above, or because they depend on a broken package.
  ghc-mod-5.0.1
 
 
  Does someone know what the proper way to use ghc-mod + nix-shell is? The
  only thing I can find online is ghcWithPackages inside systemPackages
  but I don't like that ‘solution’ and I suspect it would not work anyway:
  it would not be able to see the packages inside my nix-shell.
 
 

 Seems I was too hasty and the error was coming from the fact that
 ghc-modi binary was unwrapped.

 --
 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


Re: [Nix-dev] nixops No such file or directory after creation

2014-08-20 Thread Richard Wallace
Aha! Because I started with `nix-shell --pure -p nixops` none of the nix
commands were in my $PATH and I didn't even realize it.  That fixed it.

I'd like to avoid needing to use nix-shell to use nixops, but when I try to
use nixops from my regular shell I get

$ nixops list
Traceback (most recent call last):
  File
/nix/store/lx8n1wija7n0mijpq0p3g0sj0ymnvw2k-nixops-1.2/bin/..nixops-wrapped-wrapped,
line 5, in module
from nixops import deployment
  File
/nix/store/lx8n1wija7n0mijpq0p3g0sj0ymnvw2k-nixops-1.2/lib/python2.7/site-packages/nixops/deployment.py,
line 5, in module
import subprocess
  File
/nix/store/rr4vmi7zzbximnrfj7czya1wy4k0ii9d-python-2.7.8/lib/python2.7/subprocess.py,
line 430, in module
import pickle
  File
/nix/store/rr4vmi7zzbximnrfj7czya1wy4k0ii9d-python-2.7.8/lib/python2.7/pickle.py,
line 34, in module
import struct
  File
/nix/store/rr4vmi7zzbximnrfj7czya1wy4k0ii9d-python-2.7.8/lib/python2.7/struct.py,
line 1, in module
from _struct import *
ImportError:
/nix/store/rr4vmi7zzbximnrfj7czya1wy4k0ii9d-python-2.7.8/lib/python2.7/lib-dynload/_struct.so:
undefined symbol: PyUnicodeUCS2_AsEncodedString

If someone could tell me how to fix that I would be extremely happy. :)

Thanks,
Rich


On Wed, Aug 20, 2014 at 9:46 AM, Domen Kožar do...@dev.si wrote:

 nix-instantiate is missing in your $PATH.


 On Wed, Aug 20, 2014 at 6:28 PM, Richard Wallace 
 rwall...@thewallacepack.net wrote:

 Yes, sorry, I meant to do that and then completely forgot.

 $ nixops info --debug -d d397269c-27fb-11e4-96b7-d1c68637124d
 Traceback (most recent call last):
   File
 /nix/store/lx8n1wija7n0mijpq0p3g0sj0ymnvw2k-nixops-1.2/bin/..nixops-wrapped-wrapped,
 line 855, in module
 args.op()
   File
 /nix/store/lx8n1wija7n0mijpq0p3g0sj0ymnvw2k-nixops-1.2/bin/..nixops-wrapped-wrapped,
 line 192, in op_info
 do_eval(depl)
   File
 /nix/store/lx8n1wija7n0mijpq0p3g0sj0ymnvw2k-nixops-1.2/bin/..nixops-wrapped-wrapped,
 line 139, in do_eval
 depl.evaluate()
   File
 /nix/store/lx8n1wija7n0mijpq0p3g0sj0ymnvw2k-nixops-1.2/lib/python2.7/site-packages/nixops/deployment.py,
 line 291, in evaluate
 -A, info], stderr=self.logger.log_file)
   File
 /nix/store/rr4vmi7zzbximnrfj7czya1wy4k0ii9d-python-2.7.8/lib/python2.7/subprocess.py,
 line 566, in check_output
 process = Popen(stdout=PIPE, *popenargs, **kwargs)
   File
 /nix/store/rr4vmi7zzbximnrfj7czya1wy4k0ii9d-python-2.7.8/lib/python2.7/subprocess.py,
 line 710, in __init__
 errread, errwrite)
   File
 /nix/store/rr4vmi7zzbximnrfj7czya1wy4k0ii9d-python-2.7.8/lib/python2.7/subprocess.py,
 line 1327, in _execute_child
 raise child_exception
 OSError: [Errno 2] No such file or directory



 On Wed, Aug 20, 2014 at 9:26 AM, Eelco Dolstra 
 eelco.dols...@logicblox.com wrote:

 Hi,

 On 20/08/14 18:21, Richard Wallace wrote:

  It looks like there is a python library that isn't being found.  Not
 sure why
  that would be though. Any ideas?

 Can you invoke nixops with --debug? That should print a stack trace
 showing the
 location of the exception.

 --
 Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/



 ___
 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] ghc-mod + nix-shell?

2014-08-20 Thread Richard Wallace
Ok, that works.  I think it always worked, but I didn't realize it because
I was only trying to use it from vim and was running into the problem of
the command being in the wrong place.  Works great now, thanks!


On Wed, Aug 20, 2014 at 10:24 AM, Mateusz Kowalczyk fuuze...@fuuzetsu.co.uk
 wrote:

 On 08/20/2014 05:10 PM, Richard Wallace wrote:
  I've been struggling to get this working.  I have ghc-mod installed, but
 it
  fails to see the packages I have installed when I go into nix-shell.  If
  you did get it working, could you post your .nix file somewhere so I (and
  others) can take a look?
 
  Thanks,
  Rich
 
 

 I did not get it to fully work as I would have liked but not due to
 ‘can't see packages’ issue. You'll of course need the changes from [1].

 Simply adding ghcMod to build inputs should work. Here is a shell.nix
 for a project:

 --
 let pkgs = import nixpkgs {};
 myHaskellPackages = pkgs.myHaskellPackages;
 haskellPackages = myHaskellPackages.override {
   extension = self: super: {
 tsuntsun = self.callPackage ./. myHaskellPackages;
   };
 };
 in pkgs.lib.overrideDerivation haskellPackages.tsuntsun (attrs: {
   buildInputs = [ pkgs.emacs haskellPackages.cabalInstall
 haskellPackages.ghcMod_5_0_1 ] ++ attrs.buildInputs;
 })
 --

 With this after you nix-shell --pure it should work. Seems ghc-mod does
 some meddling with cabal so you might have to run cabal configure first.
 Both ghc-mod and ghc-modi should work from the shell at this point.

 The next problem is that emacs currently hangs. I think it tries to use
 ghc-modi and waits for that process to exit but due to the nature of
 ghc-modi, it just waits forever. I don't know if it's a problem with the
 ELisp shipped with ghc-mod package or the way I wrapped ghc-modi. See my
 comment at bottom of [1]. If you can figure out how to proceed from here
 then I'd love to hear about it. For now I'm back to just GHCi where I
 can and cabal repl where I can't.

 [1]: https://github.com/NixOS/nixpkgs/pull/3689

 --
 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


Re: [Nix-dev] nixops No such file or directory after creation

2014-08-20 Thread Richard Wallace
Ok, that will work if I can figure one last thing out.  My goal here is to
use nixops to deploy an application into virtualbox for testing locally,
and to EC2 for production.  I was hoping to use nixops without being in a
nix-shell if I could so I could use my already installed virtualbox.

I figured I could still do it, but I would just need to get virtualbox
installed into the shell.  So I tried to start it with that package

$ nix-shell --pure -p nix -p nixops -p virtualbox --show-trace
error: while evaluating the attribute `nativeBuildInputs' of the derivation
`shell' at
/nix/store/pbndpjx0wddm96v9kpiv408ljywccnn8-nixpkgs-14.10pre47363.2e2d3f3/nixpkgs/pkgs/build-support/trivial-builders.nix:10:14:
while evaluating `optionals' at
/nix/store/pbndpjx0wddm96v9kpiv408ljywccnn8-nixpkgs-14.10pre47363.2e2d3f3/nixpkgs/lib/lists.nix:117:21,
called from
/nix/store/pbndpjx0wddm96v9kpiv408ljywccnn8-nixpkgs-14.10pre47363.2e2d3f3/nixpkgs/pkgs/stdenv/generic/default.nix:121:56:
while evaluating the attribute `buildInputs' at (string):1:49:
undefined variable `virtualbox' at (string):1:81

I can install it to my environment just file, though.  So it seems
something about the virtualbox config and nix-shell just aren't getting
along.  If I could get that resolved, I think I'd be off to the races. :)

Rich


On Wed, Aug 20, 2014 at 11:38 AM, Wout Mertens wout.mert...@gmail.com
wrote:

 Just create a wrapper for nixops that calls nix-shell --pure -p nix -p
 nixos --command nixops?

 Wout.
 On Aug 20, 2014 6:56 PM, Richard Wallace rwall...@thewallacepack.net
 wrote:

 Aha! Because I started with `nix-shell --pure -p nixops` none of the nix
 commands were in my $PATH and I didn't even realize it.  That fixed it.

 I'd like to avoid needing to use nix-shell to use nixops, but when I try
 to use nixops from my regular shell I get

 $ nixops list
 Traceback (most recent call last):
   File
 /nix/store/lx8n1wija7n0mijpq0p3g0sj0ymnvw2k-nixops-1.2/bin/..nixops-wrapped-wrapped,
 line 5, in module
 from nixops import deployment
   File
 /nix/store/lx8n1wija7n0mijpq0p3g0sj0ymnvw2k-nixops-1.2/lib/python2.7/site-packages/nixops/deployment.py,
 line 5, in module
 import subprocess
   File
 /nix/store/rr4vmi7zzbximnrfj7czya1wy4k0ii9d-python-2.7.8/lib/python2.7/subprocess.py,
 line 430, in module
 import pickle
   File
 /nix/store/rr4vmi7zzbximnrfj7czya1wy4k0ii9d-python-2.7.8/lib/python2.7/pickle.py,
 line 34, in module
 import struct
   File
 /nix/store/rr4vmi7zzbximnrfj7czya1wy4k0ii9d-python-2.7.8/lib/python2.7/struct.py,
 line 1, in module
 from _struct import *
 ImportError:
 /nix/store/rr4vmi7zzbximnrfj7czya1wy4k0ii9d-python-2.7.8/lib/python2.7/lib-dynload/_struct.so:
 undefined symbol: PyUnicodeUCS2_AsEncodedString

 If someone could tell me how to fix that I would be extremely happy. :)

 Thanks,
 Rich


 On Wed, Aug 20, 2014 at 9:46 AM, Domen Kožar do...@dev.si wrote:

 nix-instantiate is missing in your $PATH.


 On Wed, Aug 20, 2014 at 6:28 PM, Richard Wallace 
 rwall...@thewallacepack.net wrote:

 Yes, sorry, I meant to do that and then completely forgot.

 $ nixops info --debug -d d397269c-27fb-11e4-96b7-d1c68637124d
 Traceback (most recent call last):
   File
 /nix/store/lx8n1wija7n0mijpq0p3g0sj0ymnvw2k-nixops-1.2/bin/..nixops-wrapped-wrapped,
 line 855, in module
 args.op()
   File
 /nix/store/lx8n1wija7n0mijpq0p3g0sj0ymnvw2k-nixops-1.2/bin/..nixops-wrapped-wrapped,
 line 192, in op_info
 do_eval(depl)
   File
 /nix/store/lx8n1wija7n0mijpq0p3g0sj0ymnvw2k-nixops-1.2/bin/..nixops-wrapped-wrapped,
 line 139, in do_eval
 depl.evaluate()
   File
 /nix/store/lx8n1wija7n0mijpq0p3g0sj0ymnvw2k-nixops-1.2/lib/python2.7/site-packages/nixops/deployment.py,
 line 291, in evaluate
 -A, info], stderr=self.logger.log_file)
   File
 /nix/store/rr4vmi7zzbximnrfj7czya1wy4k0ii9d-python-2.7.8/lib/python2.7/subprocess.py,
 line 566, in check_output
 process = Popen(stdout=PIPE, *popenargs, **kwargs)
   File
 /nix/store/rr4vmi7zzbximnrfj7czya1wy4k0ii9d-python-2.7.8/lib/python2.7/subprocess.py,
 line 710, in __init__
 errread, errwrite)
   File
 /nix/store/rr4vmi7zzbximnrfj7czya1wy4k0ii9d-python-2.7.8/lib/python2.7/subprocess.py,
 line 1327, in _execute_child
 raise child_exception
 OSError: [Errno 2] No such file or directory



 On Wed, Aug 20, 2014 at 9:26 AM, Eelco Dolstra 
 eelco.dols...@logicblox.com wrote:

 Hi,

 On 20/08/14 18:21, Richard Wallace wrote:

  It looks like there is a python library that isn't being found.  Not
 sure why
  that would be though. Any ideas?

 Can you invoke nixops with --debug? That should print a stack trace
 showing the
 location of the exception.

 --
 Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/



 ___
 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

[Nix-dev] nixops No such file or directory after creation

2014-08-19 Thread Richard Wallace
Hello all,

I'm experimenting with nixops and so far am not having any luck.  I've got
nix installed on my Arch Linux machine and created trivial.nix and
trivial-vbox.nix.

$ nix-shell --pure -p nixops

[nix-shell:~/Development/test/nix]$ nixops create ./trivial.nix
./trivial-vbox.nix -d trivial
created deployment ‘d397269c-27fb-11e4-96b7-d1c68637124d’
d397269c-27fb-11e4-96b7-d1c68637124d

[nix-shell:~/Development/test/nix]$ nixops info -d
d397269c-27fb-11e4-96b7-d1c68637124d
error: [Errno 2] No such file or directory

Any idea what file or directory it is referring to?

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


Re: [Nix-dev] Checksum error then everything builds from source

2012-12-20 Thread Richard Wallace
Strange, today I retried from scratch and I no longer see any checksum
errors.  Instead, it just goes straight to building everything from source.

I'm completley stuck at this point, my poor little laptop hasn't got the
oomph to build GHC.  I'd really appreciate some help on this one.

Thanks,
Rich


On Wed, Dec 19, 2012 at 5:07 PM, Richard Wallace 
rwall...@thewallacepack.net wrote:

 Hey all,

 I'm installing the new 1.2 from the binary tarball on a Linux x86_64
 machine.  When I go to install the Haskell Platform, I get a checksum error:

 $ nix-env -iA nixpkgs.haskellPackages.haskellPlatform
 snip
 output path `/nix/store/pfha15rjn704miil98jgf61071lmkzvr-gzip-1.4.tar.gz'
 should have sha256 hash
 `1vhiyzls60fws48scw48wvwn8mpv1f4yhcsnafys239qvb9wyrni', instead has
 `0y0qs9m1846ksb7n160nna8zh7x4l1drixjlw8h618kq9pp15ygm'
 cannot build derivation
 `/nix/store/m4qmd4db1smlb055kc1210wp1c9zkcr6-gzip-1.4.drv': 1 dependencies
 couldn't be built
 building path(s)
 `/nix/store/5b910ka58b3h4x7n3vbdgndf6zfxnpwf-zlib-1.2.7.tar.gz'
 cannot build derivation
 `/nix/store/27irakzga2m3wiv7977hafjr8kaa3plb-stdenv.drv': 1 dependencies
 couldn't be built
 killing process 14257
 cannot build derivation
 `/nix/store/3kk7g2i79ljmd5sza6388bg244wvqmk1-haskell-haskell-platform-ghc7.4.2-2012.4.0.0.drv':
 1 dependencies couldn't be built
 error: build of
 `/nix/store/3kk7g2i79ljmd5sza6388bg244wvqmk1-haskell-haskell-platform-ghc7.4.2-2012.4.0.0.drv'
 failed

 If I retry, things seem to proceed better, but everything gets built from
 source instead of using the pre-built package cache.

 Any tips?

 Thanks,
 Rich

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


Re: [Nix-dev] Checksum error then everything builds from source

2012-12-20 Thread Richard Wallace
Cool.  Although I admit I'm still a bit lost on where the nix.conf file is
supposed to go.  I tried every location I could think of for the `prefix`
in `prefix/nix/nix.conf` and none of those worked.  I also had to use a
slightly different path than you suggested in the PR,
`/nix/var/nix/profiles/per-user/rwallace/channels/binary-caches/*`.  So for
now I'm passing the option manually. :(

Any suggestions?
Thanks again,
Rich


On Thu, Dec 20, 2012 at 3:30 PM, Shea Levy s...@shealevy.com wrote:

  On 12/20/2012 05:28 PM, Richard Wallace wrote:

 Aha.  That should probably be mentioned in the manual under the
 Single-user mode section[1] of the manual.


 Already a pull request: https://github.com/NixOS/nix/pull/72 :)


   It might also be nice if that could be autodetected by the
 'nix-finish-install' script and setup properly.  I was also thrown off the
 trail because this wasn't the case with nix 1.1.

  [1] http://hydra.nixos.org/build/3540507/download/1/manual/#idp15104


  On Thu, Dec 20, 2012 at 2:51 PM, Eelco Dolstra 
 eelco.dols...@logicblox.com wrote:

 Hi,

 On 20/12/12 22:46, Richard Wallace wrote:

  Oh, that was the problem.  I checked after doing `nix-channel --update`
 and the
  file `~/.nix-defexpr/channels/binary-caches/nixpkgs` contained
  `http://nixos.org/binary-cache/`. But it looks like it was being
 ignored, for
  whatever reason.

  This is because by default, Nix only looks in
 /nix/var/nix/profiles/per-user/root/channels/binary-caches/* for binary
 cache
 URLs.  So it only checks the channels added by root.  There is an option
 binary-caches-files to overide this.

 --
 Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/
 ___
 nix-dev mailing list
 nix-dev@lists.science.uu.nl
 http://lists.science.uu.nl/mailman/listinfo/nix-dev




 ___
 nix-dev mailing 
 listnix-...@lists.science.uu.nlhttp://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] Proper way of adding custom nix expressions

2012-11-05 Thread Richard Wallace
D'oh! Looks like I need to work on my copy-paste skills.  Thanks!

Rich


On Mon, Nov 5, 2012 at 9:52 AM, Andres Loeh ks...@andres-loeh.de wrote:

 Hi Richard.

  pkgs : {
   

 You refer to this argument ...

packageOverrides = self : rec {


 but you should refer to this one.

  myHaskellPackages =
let callPackage = pkgs.lib.callPackageWith myHaskellPackages; in
  pkgs.haskellPackages.override {
extraPrefs = self : {
  boomerang = callPackage ./haskell/boomerang.nix {};
};
  };
};
  }

 Cheers,
   Andres

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


Re: [Nix-dev] Proper way of adding custom nix expressions

2012-11-04 Thread Richard Wallace
On Thu, Nov 1, 2012 at 12:14 AM, Andres Loeh ks...@andres-loeh.de wrote:
 Hi Richard.

 What Peter says is true. And ultimately, you should be motivated to
 just submit your new packages as a pull request to nixpkgs.

 However, I'd like to point out that there's also a somewhat less
 invasive way to test your own Haskell packages.

 There's a nixpkgs configuration file at ~/.nixpkgs/config.nix (it
 might not exist yet). In this config file you can specify a
 configuration option called packageOverrides that modifies the package
 set from nixpkgs in any way you like. In particular, you can add
 packages. Now, adding something to the set of Haskell packages is a
 little bit tricky, because they're all defined in a sub-attribute
 depending on the compiler version, and you have to ensure that
 dependencies are picked up correctly from that set.

 So here's what you'd do to add the boomerang Haskell package.

 (1) Call cabal2nix to produce a Nix expression for boomerang and put
 it in a suitable location. I'm assuming
 ~/.nixpkgs/haskell/boomerang.nix.

 (2) Edit your ~/.nixpkgs/config.nix so that it has the following structure:

 pkgs : {
   packageOverrides = pkgs : rec {
 myHaskellPackages =
   let callPackage = pkgs.lib.callPackageWith myHaskellPackages; in
 pkgs.recurseIntoAttrs (pkgs.haskellPackages.override {
   extraPrefs = self : {
 boomerang = callPackage ./haskell/boomerang.nix {};
   };
 });
   };
 }

 Instead of pkgs.haskellPackages.override, you can select another set
 of haskellPackages from all-packages.nix, one that's specific to your
 compiler version, if you prefer. The pkgs.recurseIntoAttrs call is
 optional, but it ensures that you can view your own new Haskell
 packages in nix-env -q calls.


Using this I'm getting the error

error: attribute `recurseIntoAttrs' missing

Not sure what's up.  I tried taking out `recurseIntoAttrs` so I end up with

pkgs : {
  packageOverrides = self : rec {
myHaskellPackages =
  let callPackage = pkgs.lib.callPackageWith myHaskellPackages; in
pkgs.haskellPackages.override {
  extraPrefs = self : {
boomerang = callPackage ./haskell/boomerang.nix {};
  };
};
  };
}

Then I get

error: attribute `haskellPackages.override' missing

Any ideas what I'm missing?

Thanks,
Rich

 (3) You can now install boomerang via path
 (nixos.pkgs.myHaskellPackages.boomerang) or you can use
 myHaskellPackages.ghcWithPackages to build a set of specific packages
 for this version of GHC.

 Cheers,
   Andres
 ___
 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