Re: [Nix-dev] nix-daemon and private git repos

2017-07-04 Thread Tomas Hlavaty
On Tue 04 Jul 2017 at 13:49, "Alexander V. Nikolaev"  wrote:
> On Mon, Jul 03, 2017 at 03:19:31PM +0200, Harmen wrote:
>
> I have `fetchgitCustom` expression, which can use pre-seeded "deploy"
> keys (but with some security implications -- because key is
> world-readable). It works with sandbox builds, and should work with
> hydra as well.

And does it work if the package is build by remote build slaves?
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] nix-daemon and private git repos

2017-07-04 Thread Tomas Hlavaty
Hi Harmen,

On Mon 03 Jul 2017 at 15:19, Harmen  wrote:
> I can't be the first to want to use fetchgitPrivate with a sandboxed
> nix-daemon. Any experiences or tips?

I had it working but there are several cases which needs extra setup
that I recommend to avoid fetchgitPrivate and use source variables,
e.g. src = ; This works the same in any context, e.g. in
hydra, without hydra, etc.  You just need to set the proprietarySrc
accordingly.

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


Re: [Nix-dev] nix-daemon and private git repos

2017-07-04 Thread Tomas Hlavaty
On Mon 03 Jul 2017 at 15:38, Harmen <har...@lijzij.de> wrote:

> On Mon, Jul 03, 2017 at 03:27:34PM +0200, Tomas Hlavaty wrote:
>> Hi Harmen,
>> 
>> On Mon 03 Jul 2017 at 15:19, Harmen <har...@lijzij.de> wrote:
>> > I can't be the first to want to use fetchgitPrivate with a sandboxed
>> > nix-daemon. Any experiences or tips?
>> 
>> I had it working but there are several cases which needs extra setup
>> that I recommend to avoid fetchgitPrivate and use source variables,
>> e.g. src = ; This works the same in any context, e.g. in
>> hydra, without hydra, etc.  You just need to set the proprietarySrc
>> accordingly.
>
> could you be a bit more specific what you mean?

Have a look at NIX_PATH: https://nixos.org/nix/manual/#env-NIX_PATH

You can configure the NIX_PATH locally, e.g.

export NIX_PATH=proprietarySrc=$HOME/src/proprietary:$NIX_PATH

or explicitly via command-line arg to nix-build, nix-shell etc.

Then instead of writing your package as:

stdenv.mkDerivation rec {
  src = fetchgitPrivate ...;
  ...
}

write

stdenv.mkDerivation rec {
  src = ;
  ...
}

If used in the context of hydra, hydra configuration says, where and how
to obtain that software, then hydra downloads it and passes it further
for build.  E.g. in
<https://hydra.nixos.org/jobset/nix/master#tabs-configuration>, there
are paths nix and nixpkgs, which are then written in nix as  and
 respectively.  In this example, no fetchgitPrivate is used but
you can see those paths.  In your case of proprietary package, you don't
have to do anything special except allowing hydra to download those
proprietary repos.  We have a read-only access to our git repo with ssh
key for hydra.

If you go with the fetchgitPrivate option, you have to grant access in
too many places, i.e. in every context where your package can be
evaluated.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


[Nix-commits] [NixOS/nixpkgs] ccd6ec: ccl: create ccl symlink

2017-07-01 Thread Tomas Hlavaty
  Branch: refs/heads/release-17.03
  Home:   https://github.com/NixOS/nixpkgs
  Commit: ccd6ec20e10c8028782a5b9bd42d580afac74c67
  
https://github.com/NixOS/nixpkgs/commit/ccd6ec20e10c8028782a5b9bd42d580afac74c67
  Author: Tomas Hlavaty <t...@logand.com>
  Date:   2017-07-01 (Sat, 01 Jul 2017)

  Changed paths:
M pkgs/development/compilers/ccl/default.nix

  Log Message:
  ---
  ccl: create ccl symlink

Make it more intuitive for users to start ccl and avoid platform
dependent executable names.

https://github.com/NixOS/nixpkgs/issues/26934
(cherry picked from commit ad825384232d68998a1d9d7d0b135575485665de)
It seems a rather safe change.


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


Re: [Nix-dev] [PATCH] ccl: create ccl symlink

2017-06-29 Thread Tomas Hlavaty
Tomas Hlavaty <t...@logand.com> writes:
> I haven't found any way to create PRs without a web-browser.  I wonder,
> if it is possible?

Vladimír Čunát and Kirill Elagin suggested gitAndTools.hub and it looks
like what I am after.  Thanks!
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] [PATCH] ccl: create ccl symlink

2017-06-29 Thread Tomas Hlavaty
Hi Peter,

thank you for your email.

That awkward patch on the bug tracker was a try to see if that was
somehow possible and useful.  Now I see that it wasn't a good idea, so
sorry for the chaos I created.

The problem is on my side as I haven't found an optimal way to
contribute yet.

I use github pretty much only to contribute to nixpkgs and I am not good
at using it.

I used to contribute more and I'd like to contribute more again but with
less time available on my side I would also like to find a better way of
contributing, without having to go through web browser and clicking
around to submit PRs or create new issues.

I found a way to create issues with a simple script via github json API.

It is possible to reply to issues via email already so this is good.
(That's how I sent the patch to the bug tracker, for example.)

I haven't found any way to create PRs without a web-browser.  I wonder,
if it is possible?

Thanks again for your time and sorry for inconvenience.

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


[Nix-commits] [NixOS/nixpkgs] f57fad: sbcl: 1.3.18 -> 1.3.19

2017-06-28 Thread Tomas Hlavaty
  Branch: refs/heads/master
  Home:   https://github.com/NixOS/nixpkgs
  Commit: f57fadc5366e18289cdde3c69658bb89644feab8
  
https://github.com/NixOS/nixpkgs/commit/f57fadc5366e18289cdde3c69658bb89644feab8
  Author: Tomas Hlavaty <t...@logand.com>
  Date:   2017-06-28 (Wed, 28 Jun 2017)

  Changed paths:
M pkgs/development/compilers/sbcl/default.nix

  Log Message:
  ---
  sbcl: 1.3.18 -> 1.3.19

Updated sbcl with new version released today.  Tested on nixos 17.03
x86_64, sbcl executable runs.  Thanks.

>From 36da6ad6eac68fdf2c8876c0a35642aa3e5c9d96 Mon Sep 17 00:00:00 2001
From: Tomas Hlavaty <t...@logand.com>
Date: Wed, 28 Jun 2017 20:12:58 +0200
Subject: [PATCH] sbcl: 1.3.18 -> 1.3.19


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


[Nix-commits] [NixOS/nixpkgs] ad8253: ccl: create ccl symlink

2017-06-28 Thread Tomas Hlavaty
  Branch: refs/heads/master
  Home:   https://github.com/NixOS/nixpkgs
  Commit: ad825384232d68998a1d9d7d0b135575485665de
  
https://github.com/NixOS/nixpkgs/commit/ad825384232d68998a1d9d7d0b135575485665de
  Author: Tomas Hlavaty <t...@logand.com>
  Date:   2017-06-28 (Wed, 28 Jun 2017)

  Changed paths:
M pkgs/development/compilers/ccl/default.nix

  Log Message:
  ---
  ccl: create ccl symlink

Make it more intuitive for users to start ccl and avoid platform
dependent executable names.

https://github.com/NixOS/nixpkgs/issues/26934


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


[Nix-dev] [PATCH] ccl: create ccl symlink

2017-06-28 Thread Tomas Hlavaty
Make it more intuitive for users to start ccl and avoid platform
dependent executable names.

https://github.com/NixOS/nixpkgs/issues/26934

Tested on nixos x86_64.

Thanks.

>From 9d1ade6a72fd2b4c10946128d8296aa9f8d75cc5 Mon Sep 17 00:00:00 2001
From: Tomas Hlavaty <t...@logand.com>
Date: Wed, 28 Jun 2017 20:33:58 +0200
Subject: [PATCH] ccl: create ccl symlink

Make it more intuitive for users to start ccl and avoid platform
dependent executable names.

https://github.com/NixOS/nixpkgs/issues/26934
---
 pkgs/development/compilers/ccl/default.nix | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pkgs/development/compilers/ccl/default.nix b/pkgs/development/compilers/ccl/default.nix
index 3e1784424e..76caf12ffd 100644
--- a/pkgs/development/compilers/ccl/default.nix
+++ b/pkgs/development/compilers/ccl/default.nix
@@ -68,6 +68,7 @@ stdenv.mkDerivation rec {
 mkdir -p "$out/bin"
 echo -e '#!/bin/sh\n'"$out/share/ccl-installation/${CCL_RUNTIME}"' "$@"\n' > "$out"/bin/"${CCL_RUNTIME}"
 chmod a+x "$out"/bin/"${CCL_RUNTIME}"
+ln -s "$out"/bin/"${CCL_RUNTIME}" "$out"/bin/ccl
   '';
 
   meta = with stdenv.lib; {
-- 
2.12.2

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


[Nix-dev] [PATCH] sbcl: 1.3.18 -> 1.3.19

2017-06-28 Thread Tomas Hlavaty
Updated sbcl with new version released today.  Tested on nixos 17.03
x86_64, sbcl executable runs.  Thanks.

>From 36da6ad6eac68fdf2c8876c0a35642aa3e5c9d96 Mon Sep 17 00:00:00 2001
From: Tomas Hlavaty <t...@logand.com>
Date: Wed, 28 Jun 2017 20:12:58 +0200
Subject: [PATCH] sbcl: 1.3.18 -> 1.3.19

---
 pkgs/development/compilers/sbcl/default.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/development/compilers/sbcl/default.nix b/pkgs/development/compilers/sbcl/default.nix
index 036a3b9f3d..3bd1982baa 100644
--- a/pkgs/development/compilers/sbcl/default.nix
+++ b/pkgs/development/compilers/sbcl/default.nix
@@ -9,11 +9,11 @@
 
 stdenv.mkDerivation rec {
   name= "sbcl-${version}";
-  version = "1.3.18";
+  version = "1.3.19";
 
   src = fetchurl {
 url= "mirror://sourceforge/project/sbcl/sbcl/${version}/${name}-source.tar.bz2";
-sha256 = "13irc67v02xa861n9g4lq7q80pnd8drkrgmigqdl9b2mp8n64bgv";
+sha256 = "0660gw43myikpa6n2qjhjxz61ilqazva4v8shljgwymag99risxm";
   };
 
   patchPhase = ''
-- 
2.12.2

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


[Nix-commits] [NixOS/nixpkgs] 6739a1: sbcl: 1.3.17 -> 1.3.18

2017-06-27 Thread Tomas Hlavaty
  Branch: refs/heads/master
  Home:   https://github.com/NixOS/nixpkgs
  Commit: 6739a1773e68839dcc9f99331def17ce3931e410
  
https://github.com/NixOS/nixpkgs/commit/6739a1773e68839dcc9f99331def17ce3931e410
  Author: Tomas Hlavaty <t...@logand.com>
  Date:   2017-06-27 (Tue, 27 Jun 2017)

  Changed paths:
M pkgs/development/compilers/sbcl/default.nix

  Log Message:
  ---
  sbcl: 1.3.17 -> 1.3.18

The attached patch updates sbcl version.

>From efdeb164ab3ca748a960791b093638c982465e97 Mon Sep 17 00:00:00 2001
From: Tomas Hlavaty <t...@logand.com>
Date: Tue, 27 Jun 2017 22:15:17 +0200
Subject: [PATCH] sbcl: 1.3.17 -> 1.3.18


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


[Nix-dev] [nix-dev][patch] sbcl: 1.3.17 -> 1.3.18

2017-06-27 Thread Tomas Hlavaty
The attached patch updates sbcl version.

>From efdeb164ab3ca748a960791b093638c982465e97 Mon Sep 17 00:00:00 2001
From: Tomas Hlavaty <t...@logand.com>
Date: Tue, 27 Jun 2017 22:15:17 +0200
Subject: [PATCH] sbcl: 1.3.17 -> 1.3.18

---
 pkgs/development/compilers/sbcl/default.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/development/compilers/sbcl/default.nix b/pkgs/development/compilers/sbcl/default.nix
index dcd110954c..036a3b9f3d 100644
--- a/pkgs/development/compilers/sbcl/default.nix
+++ b/pkgs/development/compilers/sbcl/default.nix
@@ -9,11 +9,11 @@
 
 stdenv.mkDerivation rec {
   name= "sbcl-${version}";
-  version = "1.3.17";
+  version = "1.3.18";
 
   src = fetchurl {
 url= "mirror://sourceforge/project/sbcl/sbcl/${version}/${name}-source.tar.bz2";
-sha256 = "1bqd39cqcv129zxvp3w3z1x46m9g9nmgslnlrvcsbqwd69vgbfcl";
+sha256 = "13irc67v02xa861n9g4lq7q80pnd8drkrgmigqdl9b2mp8n64bgv";
   };
 
   patchPhase = ''
-- 
2.12.2

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


Re: [Nix-dev] Are mailing lists any good for managing patches? (was: okteta fix build)

2017-06-27 Thread Tomas Hlavaty
I find emails better than github too.

It's easy to get banned by github.

As for PR accumulation, here is an interesting take on bug trackers:
http://yarchive.net/comp/linux/bug_tracking.html
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] networking.wlanInterfaces issues

2017-05-28 Thread Tomas Hlavaty
Kirill Elagin  writes:
> This should help: https://github.com/NixOS/nixpkgs/pull/26170.

Thank you for the quick fix.  Would it be possible to have this also on
17.03?

> https://github.com/NixOS/nixpkgs/blob/953616907493c5b81ba3ec9dd86f1422f4d1fcd3/nixos/modules/tasks/network-interfaces.nix#L816
>
> Your wireless card is a “physical” device, on top of it you can create a
> number of “virtual” interfaces (e.g. `wlan0`). The `device` attribute
> inside `wlanInterfaces` refers to this physical device, not virtual
> interface (you need something along the lines of `iw phy`, I can’t remember
> exactly, I’m sorry).

I read the docstring but it didn't work as expected.  I also tried phy0
but it did not work either.  Maybe your fix will help.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] networking.wlanInterfaces issues

2017-05-27 Thread Tomas Hlavaty
Hi,

I have issues with wifi configuration on 17.03.1203.58e227052d
(Gorilla):

1) specifying mac address doesn't work:

   building the system configuration...
   error: undefined variable ‘device’ at 
/nix/store/nm3nvlszbsg7c574airhra5gj2xwc9s8-nixexprs.tar.xz/nixos/modules/tasks/network-interfaces.nix:1120:89
   (use ‘--show-trace’ to show detailed location information)

   with config like this:

   networking.wlanInterfaces = {
 wlan1 = {
   device = "wlan0";
   mac = "12:34:56:78:90:12";
 };
   }

   Commenting out the mac line avoids the error but doesn't set the mac
   address.

2) What is wlanInterfaces supposed to do?  It does nothing as far as I
   can see.  In the example above, I would expect that "ip a" doesn't
   show wlan0 anymore but shows wlan1 instead.  Is my expectation
   correct?

3) How can I set a wireless interface to ad-hoc mode?  The device
   supports it, but wlanInterfaces does nothing again:

   $ iw list | grep -i ibss\\.
   Device supports RSN-IBSS.
   Device supports HT-IBSS.

   networking.wlanInterfaces = {
 wlan1 = {
   type = "ibss";
   device = "wlan0";
   mac = "12:34:56:78:90:12";
 };
   }

Thanks for ideas.

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


Re: [Nix-dev] packaging windows applications through wine

2017-04-24 Thread Tomas Hlavaty
Hi Taeer,

Taeer Bar-Yam  writes:
> Not sure if you intentionally didn't reply to the group, so I'll send this 
> just to you.

ah, the message was meant for the list.  Thanks for telling me.

>> Hi Taeer,
>> 
>>> When one installs things through wine, one usually has to click
>>> through a bunch of agreements for things installed via winetricks. Can
>>> we bypass this so we can make nix packages for these things that
>>> installs nicely?
>> 
>> It depends.  Is it free software?  Then you can build it from source and
>> don't need any interactive installer.
>  
> LoL isn't free software. But regardless, the process of installing anything in
> wine (even free software) usually requires what I think is proprietary windows
> stuff which requires clicking through installation (like vcrun2005 or
> whatever)

If LoL requires users to click through a bunch of agreements, are you
allowed to bypass that?

>>> The other challenge I see is where do you put the wineprefix? Because
>>> on the one hand you want the installation to happen at system build
>>> time, so that would suggest the nix store. But you also want the
>>> application to be able to write files (like saves ) so that would
>>> have to be in your home folder.
>> 
>> wineprefix should not be in the nix store.
>> 
>> At build-time, wineprefix can be in a temporary directory which is
>> writeable.
>> 
>> At run-time, it is usually in ~/.wine unless you specify something
>> different.
>
> Right, but the problem is if you're installing something via 
> configuration.nix,
> all of the results have to go into the store, because you don't even know what
> users there are.

Yes, results go into the store.  It does not mean that wineprefix has to
point there, e.g.

$ WINEPREFIX=~/.wine64-test wine64 /nix/store/xx-myprog-1.0/bin/myprog.exe

can work.

>>> Is how to package wine applications a solved problem, or do I need to
>>> do some creative work?
>> 
>> It depends.  At work, we cross-compile some packages with mingw and test
>> them under wine.  This works quite well but is far from solved problem
>> as most packages don't work out of the box.  It's still better than
>> chasing prebuilt and up-to-date binaries or installers on the web.
>
> I'm talking specifically about making nix packages for applications run 
> through
> wine. So you can just add e.g. league_of_legends to your systemPackages, and 
> it
> will install it in a wine prefix and provides you an alias so you can just run
> it, and not even know it's running through wine.

There is not much special about nix packages for applications run
through wine.  Just write a package with a shell script which will do
everything necessary without users having to worry about anything.

I don't think "install it in a wine prefix" is correct way to describe
it.

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


Re: [Nix-dev] Nix for internal projects and monorepos

2017-03-24 Thread Tomas Hlavaty
Hi Daniel,

I have tried several things and settled for something like

src = ;

Then you can control it same way like you can do with .  It
also works well with hydra and avoid problems I had with
fetchgitPrivate.

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


[Nix-commits] [NixOS/nixpkgs] cc7c26: unittest-cpp: init at 1.6.1

2017-03-22 Thread Tomas Hlavaty
  Branch: refs/heads/release-15.09
  Home:   https://github.com/NixOS/nixpkgs
  Commit: cc7c26173149348ba43f0799fac3f3823a2d21fc
  
https://github.com/NixOS/nixpkgs/commit/cc7c26173149348ba43f0799fac3f3823a2d21fc
  Author: Tomas Hlavaty <t...@logand.com>
  Date:   2017-03-22 (Wed, 22 Mar 2017)

  Changed paths:
A pkgs/development/libraries/unittest-cpp/default.nix
M pkgs/top-level/all-packages.nix

  Log Message:
  ---
  unittest-cpp: init at 1.6.1

(cherry picked from commit 800a379cb317182722c8cbfe1a9716cd454c32cd)


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


[Nix-dev] [Tomas Hlavaty] Re: Remapping Console Key Bindings

2017-01-11 Thread Tomas Hlavaty
oops, this is meant for the list

--- Begin Message ---
I have an alias and run it manually, something like:

alias mykbd bash -c "sudo loadkeys fr; (echo keymaps 0-63; echo keycode 58 = 
Control) | sudo loadkeys -"

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


[Nix-commits] [NixOS/nixpkgs] 591345: fix win-dll-link.sh setup hook (#20925)

2016-12-07 Thread Tomas Hlavaty
  Branch: refs/heads/master
  Home:   https://github.com/NixOS/nixpkgs
  Commit: 59134519eefd1bc2b855b7e918e3f380e8c222dc
  
https://github.com/NixOS/nixpkgs/commit/59134519eefd1bc2b855b7e918e3f380e8c222dc
  Author: Tomas Hlavaty <t...@logand.com>
  Date:   2016-12-07 (Wed, 07 Dec 2016)

  Changed paths:
M pkgs/build-support/setup-hooks/win-dll-link.sh

  Log Message:
  ---
  fix win-dll-link.sh setup hook (#20925)

if a dll is symlink then dll files from the symlinked
directory need to be taken


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


Re: [Nix-dev] NixOps usage survey.

2016-09-05 Thread Tomas Hlavaty
Hi Aloïs,

if you don't need any of the backends nixops offers except maybe "none",
it might be better to avoid the stateful nature of nixops and go with a
simple script based on nixos-rebuild, something like:

deploy1.sh:

HOST=$1
NIXPKGS=$2
nixos-rebuild switch \
  -I nixos-config=./$HOST/configuration.nix \
  -I nixpkgs=$NIXPKGS \
  --build-host localhost \
  --target-host root@$HOST

deploy.sh:

NIXPKGS=https://nixos.org/channels/nixos-16.03/nixexprs.tar.xz
sh deploy1.sh host1 $NIXPKGS
sh deploy1.sh host2 $NIXPKGS

You could have a private hydra for your software and configure it as a
binary cache for the nixos-rebuild above.

It is very simple, roughly equivalent to the "none" backend in nixops
and you avoid drawbacks of nixops described in the other emails.

You just need to get an initial NixOS installed on a new machine
somehow, and after that the script above will do the magic.

nixops helps with the part "get an initial NixOS installed on a new
machine somehow", but if that is not your concern, this approach might
be better.

Cheers,

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


[Nix-commits] [NixOS/nixpkgs] e44453: mlt: 0.9.6 -> 6.2.0 (#17725)

2016-08-17 Thread Tomas Hlavaty
  Branch: refs/heads/master
  Home:   https://github.com/NixOS/nixpkgs
  Commit: e444532046be5180cd57e0b991921d8da17d9934
  
https://github.com/NixOS/nixpkgs/commit/e444532046be5180cd57e0b991921d8da17d9934
  Author: Tomas Hlavaty <t...@logand.com>
  Date:   2016-08-17 (Wed, 17 Aug 2016)

  Changed paths:
M pkgs/development/libraries/mlt/default.nix
A pkgs/development/libraries/mlt/qt-4.nix
M pkgs/top-level/all-packages.nix

  Log Message:
  ---
  mlt: 0.9.6 -> 6.2.0 (#17725)

The old version with qt4 is kept around for kdenlive dependency.


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


Re: [Nix-dev] using qemu virtual machine for testing software

2016-08-10 Thread Tomas Hlavaty
Hi Tomasz,

Tomasz Czyż  writes:
> I made this working/building the vm, but I still don't know how to
> connect to it. Any idea?

when you build the VM, it will create a symlink called something like
result.  Inside there is a program to launch the VM inside qemu.  You
can simply run that command and it will open a window with the qemu VM.

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


Re: [Nix-dev] using qemu virtual machine for testing software

2016-07-29 Thread Tomas Hlavaty
Hi Tomasz,

> I can't connect to forwarded port and I don't know how to connect/
> interact with the machine. Is there anyone who know how I could
> connect to this machine and would be willing to explain?

vm tests are not intended to be interactive, I think.

Instead, you can build the vm like:

NIXOS_CONFIG=vmconfig.nix nixos-rebuild build-vm

and then launch the qemu vm.

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


Re: [Nix-dev] Raspberry-Pi NixOS

2016-07-19 Thread Tomas Hlavaty
Lluís Batlle i Rossell  writes:
> The device tree blob should be built by the kernel, like with pi and pi2,
> isn't it?

This is the kernel which works for me and is taken from
raspberry-firmware/boot:

Linux version 4.4.13-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3
(crosstool-NG crosstool-ng-1.22.0-88-g8460611) ) #894 SMP Mon Jun 13
13:13:27 BST 2016

and the corresponding device tree is bcm2710-rpi-3-b.dtb.

This looks like the same kernel version in
pkgs/os-specific/linux/kernel/linux-rpi.nix (modDirVersion = "4.4.13";
tag = "1.20160620-1")

Are you saying that this is not good enough?

What works: If I copy files from raspberry-firmware/boot to /boot, rpi3
starts fine.  These are the files I have in /boot:

$ ls -al /boot
-rwxr-xr-x  1 root root   13221 Jun 18 22:31 bcm2708-rpi-b.dtb
-rwxr-xr-x  1 root root   13484 Jun 18 22:31 bcm2708-rpi-b-plus.dtb
-rwxr-xr-x  1 root root   13257 Jun 18 22:31 bcm2708-rpi-cm.dtb
-rwxr-xr-x  1 root root   14567 Jun 18 22:31 bcm2709-rpi-2-b.dtb
-rwxr-xr-x  1 root root   15237 Jun 18 22:31 bcm2710-rpi-3-b.dtb
-rwxr-xr-x  1 root root   17932 Jun 18 22:31 bootcode.bin
-rwxr-xr-x  1 root root 165 Jul 19 22:46 cmdline.txt
-rwxr-xr-x  1 root root1369 Jan 11  2016 config.txt
-rwxr-xr-x  1 root root2504 Jun 23 20:42 fixup_cd.dat
-rwxr-xr-x  1 root root6482 Jun 23 20:42 fixup.dat
-rwxr-xr-x  1 root root9717 Jun 23 20:42 fixup_db.dat
-rwxr-xr-x  1 root root9717 Jun 23 20:42 fixup_x.dat
-rwxr-xr-x  1 root root 4224232 Jun 18 22:31 kernel7.img
drwxr-xr-x  2 root root8192 Jun 18 22:31 overlays
-rwxr-xr-x  1 root root  617432 Jun 23 20:42 start_cd.elf
-rwxr-xr-x  1 root root 4926264 Jun 23 20:42 start_db.elf
-rwxr-xr-x  1 root root 2746552 Jun 23 20:42 start.elf
-rwxr-xr-x  1 root root 3877720 Jun 23 20:42 start_x.elf

I don't see, why raspberrypi/builder.sh creates defaultgeneration,
initrd and nixos-init files in /boot.  It actually seems to me, that
initrd should not be there at all for the boot to work.

raspberrypi/builder.sh doesn't create fixup_x.dat, which is in the list
above; but I haven't tried booting without it.

Although pkgs/os-specific/linux/kernel/linux-rpi.nix copies DTB files,
it renames them to something that looks wrong and also it does not copy
them to /boot at all:

# I am not sure if all of these are correct...
copyDTB bcm2708-rpi-b.dtb bcm2835-rpi-a.dtb
copyDTB bcm2708-rpi-b.dtb bcm2835-rpi-b.dtb
copyDTB bcm2708-rpi-b.dtb bcm2835-rpi-b-rev2.dtb
copyDTB bcm2708-rpi-b-plus.dtb bcm2835-rpi-a-plus.dtb
copyDTB bcm2708-rpi-b-plus.dtb bcm2835-rpi-b-plus.dtb
copyDTB bcm2708-rpi-b-plus.dtb bcm2835-rpi-zero.dtb
copyDTB bcm2708-rpi-cm.dtb bcm2835-rpi-cm.dtb
copyDTB bcm2709-rpi-2-b.dtb bcm2836-rpi-2-b.dtb
copyDTB bcm2710-rpi-3-b.dtb bcm2837-rpi-3-b.dtb

I looks like the files in raspberry-firmware/boot should work on any rpi
version so we should probably immitate that somehow in nixos and at
least get it to work out of the box even if we just take the precompiled
files from raspberrypi-firmware/boot and improve that later.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Raspberry-Pi NixOS

2016-07-18 Thread Tomas Hlavaty

Tomas Hlavaty <t...@logand.com> writes:
> - pkgs/os-specific/linux/firmware/raspberrypi/default.nix needs newer
>   rev as the current one is pre-rpi3.
>
> - pkgs/os-specific/linux/kernel/linux-rpi.nix needs newer kernel,
>   probably for the same reason as above.  I tried 4.4.13-v7.

Tuomas Tynkkynen has done that already and looking at the git log, he's
progressed quite far.

commit 36f4a8a485732da98e1fcf40945ecda305677579
Author: Tuomas Tynkkynen <tuo...@tuxera.com>
Date:   Sun Jun 19 22:49:36 2016 +0300

sd-image-armv7l-multiplatform.nix: Preliminary Raspberry Pi 2/3 support

- RPi3 successfully gets to U-Boot, but then fails to boot the kernel
  due to a missing device tree file. This should get added to the 4.8
  kernel release once this patch is merged: 
https://lkml.org/lkml/2016/6/1/841
- RPi2 is not tested, but it should successfully boot the NixOS image.

Could not the device tree be taken from
raspberrypifw/boot/bcm2710-rpi-3-b.dtb?

I will build nixpkgs HEAD, lets see.

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


Re: [Nix-dev] Hydra

2016-07-18 Thread Tomas Hlavaty
Hi Fare,

"Dev.Rideau.Fare"  writes:
> I'm trying to determine how feasible it would be (with how much work)
> to use Hydra for a CI environment at work (replacing buildbot).

we've been using hydra for about a year now.  Not sure how does it
compare to buildbot but we had no CI before, so it is a huge improvement
for us in any case.

The biggest effort was to write nix expressions for everything we wanted
to build, mainly because I was new to nixos.  Most expressions were
reasonably easy, but some, e.g. oracleXE was a challenge and still have
some issues.  It works for our need and we even got an experienced nixos
contributor to help us with plugging mingw based builds and tests into
hydra too.

There is no official hydra release, which can be rather frustrating.
This is hopefully going to change as there seem to be an effort to
change this.

> * I don't see much documentation. Many links are dead or redirect to
> the wrong thing: the old 2008 paper mentions nixos.org/hydra-scp but
> that doesn't exist. The "instructions available" link to a hydra job
> instead of an actual manual, and trying to manually link on "manual"
> goes to 404.
>

https://github.com/peti/hydra-tutorial should help you

> * How do you specify tests with hydra? When tests are stateful
> (especially integration tests), can it distinguish between tests that
> actually failed, and failure to test due to e.g. timeout trying to
> setup a test server? Can it handle retrying such tests?

Normally, software is split into packages, which are often implemented
as derivations in nix (kind of hash-consing).  These derivations depend
on each other, and when you let hydra test a package and some dependency
fails, it will tell you.  You can also restart failed builds.  You can
also write VM tests, where you write a nix expression, which when run,
creates a nixos VM with all your dependencies, runs your code and tells
you if it works or what fails.  You can also run the test locally in
qemu and poke around, quite easily.

> * Can Hydra drive Nix workers on Windows? on MacOS?

https://hydra.nixos.org/ has some OSX slaves.

Windows is a problem.  As I said above, we test our lisp app using mingw
and wine under nixos.  It is challenging but possible this way.

> * How much work would it be to make the above work, if it doesn't work
> yet?

Depends how much and how obscure software do you have.  You can checkout
, poke around and see some packages,
how they are implemented.  Obscure proprietary dependencies can be a
problem.

Good luck!

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


Re: [Nix-dev] Raspberry-Pi NixOS

2016-07-13 Thread Tomas Hlavaty
Hi Anders,

Anders Lundstedt  writes:
> Has anyone successfully installed NixOS on a Raspberry Pi 3?

I am running nixos-version 16.09.git.a5559f5 (Flounder).

I have rpi2 running nixos which I installed as described in the wiki and
then managed to upgrade in a few steps up to the nixos-version
16.09.git.8376694M (Emu).  It runs hydra 
which is kind of blocking me from upgrading further without spending too
much time on it.

Then I cloned this rpi2 sd card and copied into /boot files from the
boot directory in .  With the
new /boot and old / from rpi2, rpi3 boots and works fine.

So far I need to copy the /boot data manually after each nixos-rebuild
switch.

Now I'd like to port nixpkgs for rpi3 so that nixos-rebuild switch
generates correct /boot data.  Unfortunatelly, I don't know how to do it
(yet?) and nixos-rebuild build-vm has been running for a second day so
the progress is very slow.

> On Fri, Jun 17, 2016 at 9:35 AM, Tuomas Tynkkynen
>  wrote:
>> Though the ARMv7 image listed there doesn't have the necessary RPi bootloader
>> things added - that's not hard to add but I don't have a board to test with.
>
> How do I add the "bootloader things"? I do not know much about these
> things but I have a Raspberry Pi 3 and with some further instructions
> and/or pointers I think I could give it a try.

My guess:

- pkgs/os-specific/linux/firmware/raspberrypi/default.nix needs newer
  rev as the current one is pre-rpi3.

- pkgs/os-specific/linux/kernel/linux-rpi.nix needs newer kernel,
  probably for the same reason as above.  I tried 4.4.13-v7.

The above changes did compile but rpi3 did not boot.

I still need to change boot.* in /etc/nixos/configuration.nix but i have
no idea how.  We need something like rpi2.nix in
 but for rpi3.  I have no
idea how the guys came up with that stuff, e.g. boot.kernelParams or
what should happen with boot.loader.raspberryPi.version for example.

One more thing.  As I already have hydra on rpi2, I should add a job to
build armv7l image to make it easier for people to bootstrap the latest
nixos.  What nixpkgs attribute will do that?  Does somebody know?  At
least generating the rootfs would be a good start.

Hope it helps.  Please let us know if you move it forward.

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


Re: [Nix-dev] hydra and nixos versions/commits at hydra.nixos.org

2016-06-16 Thread Tomas Hlavaty
Hi Domen,

Domen Kožar <do...@dev.si> writes:
> Hydra NixOS module and package are now available on nixpkgs master.

thank you!

> There's one bug I need to fix, then I'll backport these changes to
> 16.03.

great!

> Meanwhile, I used following commit on 16.03 before I moved to the
> fork using some improvements: https://github.com/snabblab/
> snabblab-nixos/commit/20a3fe6e9cf9e0da2a855bd1df9ce7ebad434951

good, if I don't succeed with my upgrade, I'll try that.

> Official releases will for now be pinned git revisions on nixpkgs,
> hopefully that will suffice for most of us.

Will the official hydra be on 16.03 or unstable?

> On Tue, Jun 14, 2016 at 4:21 PM, Tomas Hlavaty <
>   1258008 2016-04-15 hydraSrc → 177bf25
>   at https://hydra.nixos.org/jobset/hydra/master/evals?page=2

I am upgrading to hydra 177bf25 on nixos 16.03 and it seems to work
except that hydra lost the ability to do distributed builds.  Has
something changed in this regard in hydra/nix/nixos?

In "journal -xe" log, I can see that hydra-queue-runner loads a build
into nix-daemon but then the build is stuck as queued forever.

I can't see any error messages from nix-daemon.  Is there a way to debug
nix-daemon in order to see, what is it doing?

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


[Nix-dev] hydra and nixos versions/commits at hydra.nixos.org

2016-06-14 Thread Tomas Hlavaty
Hi,

does somebody know, what hydra and nixos versions/commits are deployed
at hydra.nixos.org?

I am running hydra with nixos 15.09 and hydra
993647d1e3b43f1f9b7dc2ebce889b475d156bb9 but I would like to upgrade my
local hydra machine to nixos 16.03.

I can see that the last successful hydra build was

  1258008 2016-04-15 hydraSrc → 177bf25
  at https://hydra.nixos.org/jobset/hydra/master/evals?page=2

but it would be nice to know what is actually used.

Even better would be, if I could somehow find it out somewhere publicly
accessible without having to ask each time.

What is the status of the official hydra releases?

Thank you,

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


Re: [Nix-dev] fetchurl and unpacker produced multiple directories

2016-06-03 Thread Tomas Hlavaty
Rok Garbas  writes:
> sourceRoot = ".";
> and then you can mv/cp in postUnpack phase

ah, great, thank you!

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


Re: [Nix-dev] fetchurl and unpacker produced multiple directories

2016-06-03 Thread Tomas Hlavaty
Hi Domen,

> If your source is in `src` directory:
>
> sourceRoot = "src";

Yes, the source directory is in src but the top-level CMakeLists.txt is
directly in the root dir of the tarball.  I was looking for some kind of
way to tell fetchurl to unpack the tarball in a predefined subdirectory
or something, in order to prevent this error message and make fetchurl
happy.  Is there something I can do short of not using fetchurl?

Thank you for your help!

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


[Nix-dev] nix on powerpc-linux

2015-12-15 Thread Tomas Hlavaty
Hi,

I would like nix to work on powerpc-linux.  It seems that somebody
already did something in nixpkgs but it does not work.

I added powerpc-linux to linux in lib/platforms.nix.

Now I get the following error:

$ ~/nix/build/bin/nix-env -iA pkgs.hello -f ~/nixpkgs --show-trace
installing ‘hello-2.10’
error: while evaluating the attribute ‘stdenv’ of the derivation ‘hello-2.10’ 
at /home/hlavaty/nixpkgs/pkgs/applications/misc/hello/default.nix:4:3:
while evaluating the attribute ‘initialPath’ of the derivation ‘stdenv’ at 
/home/hlavaty/nixpkgs/pkgs/stdenv/generic/default.nix:239:14:
while evaluating the attribute ‘stdenv’ of the derivation ‘xz-5.2.2’ at 
/home/hlavaty/nixpkgs/pkgs/tools/compression/xz/default.nix:4:3:
while evaluating the attribute ‘defaultNativeBuildInputs’ of the derivation 
‘stdenv’ at /home/hlavaty/nixpkgs/pkgs/stdenv/generic/default.nix:239:14:
while evaluating the attribute ‘buildCommand’ of the derivation ‘cc-native’ at 
/home/hlavaty/nixpkgs/pkgs/build-support/cc-wrapper/default.nix:32:3:
value is null while a set was expected, at 
/home/hlavaty/nixpkgs/pkgs/build-support/cc-wrapper/default.nix:174:38

I think that cc is not defined.  It seens that it uses native stdenv
(not sure what that means).  Any ideas what should be the next step to
fix this?

Thank you!

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


[Nix-dev] canon mp280 printer/scanner drivers

2015-12-05 Thread Tomas Hlavaty
Hi,

I would like to get Canon Pixma mp280 to work with NixOS.  The printer
works but it doesn't recognise the scanner.  The only thing I found in
nixpkgs is pkgs/misc/cups/drivers/canon/default.nix but that seems to
install support for ghostscript and targets other device.  There are
Debian drivers at
http://support-nz.canon.co.nz/contents/NZ/EN/0100301402.html#content
(the real download is
).
Is there an example how to handle such situation, e.g. install kernel
drivers based on a debian package?

Thank you,

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


Re: [Nix-dev] nixos inside lxc container on non-NixOS host

2015-11-25 Thread Tomas Hlavaty
Hi René,

no success so far.  It seems rather complicated and fragile; e.g. Ubuntu
14.04 LTS can't run systemd in containers so I can't use NixOS modules.
Different systems have different drawbacks but I need something robust
which works regardless.  At NixOS conference, there was a discussion
about refactoring NixOS modules out of NixOS, which might be a way to
go.  The simplest thing at the moment might be just to create nix
packages (this was originally how it was done in NixOS before modules
were implemented) and somehow start them via host init system.

Cheers,

Tomas

"René Donner"  writes:

> Hi Tomas,
>
> any success so far? I am trying to achive a similar thing, running
> Nixos within LXC on Centos 6.5.
>
> Thanks,
>
> Rene
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] nixos inside lxc container on non-NixOS host

2015-10-28 Thread Tomas Hlavaty
Hi Thomas and Domen,

thanks for your replies.  I'll try to investigate those directions and
see if I can get NixOS running under Ubuntu.

Cheers,

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


[Nix-dev] nixos inside lxc container on non-NixOS host

2015-10-24 Thread Tomas Hlavaty
Hi,

I would like to run NixOS inside a lxc container on ubuntu.  There seems
to be support for this but it is not clear to me, how to use it.

I can build a container:

$ nix-build release.nix -A containerTarball.i686-linux

I tried lxc-create -t ubuntu and then swapping the rootfs.  This seems
to work, except the container is bare and I would like to customize it
with my configuration.  Also the trick with the ubuntu template is not
great.

I followed https://nixos.org/wiki/NixOS_and_libvirt#mw-content-text but
that doesn't work, probably obsolete.  I also found
https://github.com/NixOS/nixpkgs/issues/1088#issuecomment-44971585
http://lists.science.uu.nl/pipermail/nix-dev/2014-August/013914.html so
it should be possible somehow.

Have somebody managed to install NixOS inside lxc container on non-NixOS
host?  Is there some documentation or other reading for this?

Thank you,

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


Re: [Nix-dev] nixos inside lxc container on non-NixOS host

2015-10-24 Thread Tomas Hlavaty
Actually, description of any way to run NixOS inside a container on
non-NixOS host would be great, e.g. using systemd-nspawn instead of
lxc.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] [nix-dev] travis blocks pull request because log is too long

2015-09-30 Thread Tomas Hlavaty
Hi Luca,

thank you for your reply.  Good to know that travis is not a blocker.  I
have fixed the issues that @bjornfor and @vcunat raised.  I hope someone
will find time to merge it now.

Thanks a lot!

Tomas

Luca Bruno <lethalma...@gmail.com> writes:

> On 29/09/2015 10:34, Tomas Hlavaty wrote:
>
> Hi,
> 
> I have made a pull request, which is now blocked by travis because of
> too long log.
> 
> Could somebody please commit this?
> https://github.com/NixOS/nixpkgs/pull/10104
> 
> It seems that changes to that part of nixpkgs never go through pull
> requests and travis, because it is impossible for them to pass.
> 
> Thanks a lot!
> 
> You got a comment from @bjornfor which asked you to change
> format to the commit messages. The PR will hardly be considered
> until the commit format is fixed.
> Ignore travis for your PR.
>
> Best regards,
>
> ___
> 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] [nix-dev] travis blocks pull request because log is too long

2015-09-29 Thread Tomas Hlavaty
Hi,

I have made a pull request, which is now blocked by travis because of
too long log.

Could somebody please commit this?
https://github.com/NixOS/nixpkgs/pull/10104

It seems that changes to that part of nixpkgs never go through pull
requests and travis, because it is impossible for them to pass.

Thanks a lot!

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


Re: [Nix-dev] Prague this saturday

2015-08-26 Thread Tomas Hlavaty
Hi Vladimír,

thanks for your email.  Unfortunatelly, I won't be in Prague on
Saturday.  I'll let you know when I'm in Prague.  It would be great to
meet.

Tomas

Vladimír Čunát vcu...@gmail.com writes:

 Hi Nixers!
 In case someone else would like to meet in Prague this Saturday, let me
 know.

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


Re: [Nix-dev] Leksah

2015-08-07 Thread Tomas Hlavaty
Hi Hilco,

 Does the stable channel guarantee that everything builds? Or is it
 still luck-of-the-draw just like Cabal?

If it has been built by hydra, it should be in the cache and should
work.  Peter Simons runs hydra http://hydra.cryp.to for haskel packages
but I am not sure if it has been moved to the official hydra or not.

https://www.reddit.com/r/haskell/comments/36vwac/peter_simons_nix_loves_haskell_talk_from_nixos/

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


Re: [Nix-dev] Leksah

2015-08-06 Thread Tomas Hlavaty
Hi Hilco,

 If Hydra built unstable successfully (which, I believe, is a
 prerequisite for the channel to update) then how is it possible that
 Leksah does not build for me?

because hydra does not build Leksah?

Cheers,

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


Re: [Nix-dev] nixops - nix-channel per machine

2015-07-27 Thread Tomas Hlavaty
I got the _module.args.pkgs to (almost) work but I think it somehow
mixes up the two nixpkgs versions (running on unstable, overriding
_module.args.pkgs to stable):

   error: attribute ‘ipset’ missing, at
   
/nix/store/fdv2bhnjgdanr87wjqa7rbbm5gf6k4hr-nixos-15.06pre65267.6ad8fab/nixos/nixpkgs/nixos/modules/services/networking/firewall.nix:446:50

Tomas

Tomas Hlavaty tomas.hlav...@knowledgetools.de writes:

 Hi Rob  Nicolas,

 thank you for your suggestions.

 The option -I nixpkgs=/path/to/your/nixpkgs sets the nixpkgs globally
 for nixops.  That is not what I need.

 I have tried using nixops set-attrs, but that is also doesn't allow me
 to use stable for one machine and unstable for the other.

 Maybe this could work if I created two separate networks depending on
 nixpks.  But this is not a nice workaround.

 It looks like the module suggestion might be what I need but that gives
 me an error:

error: Module `foo/configuration.nix' has an unsupported attribute
`boot'. This is caused by assignments to the top-level attributes
`config' or `options'.  (use ‘--show-trace’ to show detailed location
information) error: evaluation of the deployment specification failed

 It seems that I am not allowed to change that.  Moreover, it doesn't
 seem to be the same as specifying a different nixos-channel.

 What I need is something like:

 test-logical.nix:

 {
   network.description = test network;
   foo = with-stable-channel ./foo/configuration.nix;
   bar = with-unstable-channel ./bar/configuration.nix;
 }

 Is there a way to achieve that?

 Thanks a lot!

 Tomas

 Nicolas Pierron nicolas.b.pier...@gmail.com writes:

 Otherwise, if you are using the latest master of NixOS, then you
 should be able to define which set of packages you are interested in
 within the module system, while using the modules from the latest
 NixOS.

 { config, lib, ... }:

 {
   config = {
 _module.args.pkgs = lib.mkForce (import my-nixpkgs {
   inherit (config.nixpkgs) system config;
 });
   };
 }


 On Fri, Jul 24, 2015 at 5:56 PM, Rob Vermaas rob.verm...@gmail.com wrote:
 Hi Tomas,

 you can use -I nixpkgs=/path/to/your/nixpkgs when using nixops. You
 can also make it persistent using 'nixops create/modify', the nix path
 will be stored in the nixops database, and you can inspect it with
 'nixops info'.

 Cheers,
 Rob

 On Fri, Jul 24, 2015 at 3:10 PM, Tomas Hlavaty
 tomas.hlav...@knowledgetools.de wrote:
 Hi,

 in nixops, how can i specify a nix-channel per machine?  Or any other
 way to have different machines running different versions of nixos?

 Thank you,

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



 --
 Rob Vermaas

 [email] rob.verm...@gmail.com
 ___
 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 - nix-channel per machine

2015-07-27 Thread Tomas Hlavaty
Hi Rob  Nicolas,

thank you for your suggestions.

The option -I nixpkgs=/path/to/your/nixpkgs sets the nixpkgs globally
for nixops.  That is not what I need.

I have tried using nixops set-attrs, but that is also doesn't allow me
to use stable for one machine and unstable for the other.

Maybe this could work if I created two separate networks depending on
nixpks.  But this is not a nice workaround.

It looks like the module suggestion might be what I need but that gives
me an error:

   error: Module `foo/configuration.nix' has an unsupported attribute
   `boot'. This is caused by assignments to the top-level attributes
   `config' or `options'.  (use ‘--show-trace’ to show detailed location
   information) error: evaluation of the deployment specification failed

It seems that I am not allowed to change that.  Moreover, it doesn't
seem to be the same as specifying a different nixos-channel.

What I need is something like:

test-logical.nix:

{
  network.description = test network;
  foo = with-stable-channel ./foo/configuration.nix;
  bar = with-unstable-channel ./bar/configuration.nix;
}

Is there a way to achieve that?

Thanks a lot!

Tomas

Nicolas Pierron nicolas.b.pier...@gmail.com writes:

 Otherwise, if you are using the latest master of NixOS, then you
 should be able to define which set of packages you are interested in
 within the module system, while using the modules from the latest
 NixOS.

 { config, lib, ... }:

 {
   config = {
 _module.args.pkgs = lib.mkForce (import my-nixpkgs {
   inherit (config.nixpkgs) system config;
 });
   };
 }


 On Fri, Jul 24, 2015 at 5:56 PM, Rob Vermaas rob.verm...@gmail.com wrote:
 Hi Tomas,

 you can use -I nixpkgs=/path/to/your/nixpkgs when using nixops. You
 can also make it persistent using 'nixops create/modify', the nix path
 will be stored in the nixops database, and you can inspect it with
 'nixops info'.

 Cheers,
 Rob

 On Fri, Jul 24, 2015 at 3:10 PM, Tomas Hlavaty
 tomas.hlav...@knowledgetools.de wrote:
 Hi,

 in nixops, how can i specify a nix-channel per machine?  Or any other
 way to have different machines running different versions of nixos?

 Thank you,

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



 --
 Rob Vermaas

 [email] rob.verm...@gmail.com
 ___
 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 - nix-channel per machine

2015-07-24 Thread Tomas Hlavaty
Hi,

in nixops, how can i specify a nix-channel per machine?  Or any other
way to have different machines running different versions of nixos?

Thank you,

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


Re: [Nix-dev] crosscompiling question

2015-07-15 Thread Tomas Hlavaty
Hi Lluís and Tomasz,

thank you for clarification.  I wonder what is the use-case for
crosscompiling then.  I'll try qemu as you suggest.

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


[Nix-dev] crosscompiling question

2015-07-14 Thread Tomas Hlavaty
Hi all,

I am trying to crosscompile nix packages for a bananapi ARM board
following https://nixos.org/wiki/CrossCompiling but I am missing the
last step: how do I actually use the crosscompiled packages?

A working example (bananapi is very similar to beaglebone):

--- /tmp/bananapi/default.nix:
let
  pkgs = import /tmp/nixpkgs/ {
crossSystem = {
  config = armv7l-unknown-linux-gnueabihf; # hf
  bigEndian = false;
  arch = arm;
  float = hard;
  fpu = vfp;
  withTLS = true;
  libc = glibc;
  platform = pkgs.platforms.beaglebone;
  openssl.system = linux-generic32;
  gcc = pkgs.platforms.beaglebone.gcc;
};
  };
in rec {
  hello = pkgs.hello;
  bpiEnv = with pkgs; buildEnv {
name = bpiEnv;
paths = [
  hello.crossDrv
];
  };
}
--- end

Running:

$ nix-build -A hello.crossDrv default.nix --option use-binary-caches false

produces
/nix/store/j3l7rg3x9lv167m4as4kfd1mrik9hg0a-hello-2.10-armv7l-unknown-linux-gnueabihf
which I can copy-closure to bananapi and if I call it with absolute path
to that nix-store, it works.

Similarly, I can crosscompile while environment:

$ nix-build -A bpiEnv default.nix --option use-binary-caches false

If I compile hello directly on the bananapi board, I get
/nix/store/rz4n57bas9h9ql5c9if7bpb1wbf1fl89-hello-2.10
which works too.

Like this, I would like to crosscompile packages on my desktop and then
copy-closure them to the board.  However, they are different paths in
the store.  How can I actually achive this?  Is there some trick I am
missing?

Thank you,

Tomas
___
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-17 Thread Tomas Hlavaty
 There is also virtualization.diskSize.

Hmm, sorry for misinformation.  Although the name sounds quite
universal, it is used only with qemu.  It certainly works when writing
tests that run in qemu VM.

virtualisation.memorySize is used even in virtualbox tests but no
diskSize.  Virtualbox seems to require virtualbox.baseImageSize so it is
a shame that it is not unified.

I would recommend to git clone nixpkgs repository and grep through and
read a bit of nix package files to get the idea, how things are
configured.
___
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 Tomas Hlavaty
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] oracle-xe

2015-05-13 Thread Tomas Hlavaty
Hi all,

there is a package oracle-xe which downloads and installs oracle-xe but
there is no module for it.  Have somebody managed to get it up and
running?  If yes, how?

Thank you,

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


Re: [Nix-dev] sbcl image executables and patch-elf

2015-05-12 Thread Tomas Hlavaty
Hi Eike,

 I just found out that this is the strip utility from binutils and I'm
 wondering how it can do such a harm…

strip does what it is supposed to do.  In the usual C world, executables
can contain lots of other information, e.g. debugging symbols etc.
strip removes this additional information while it is not usually needed
on production systems and take significant amount of space.

However, you tried to create a self-contained sbcl executable
application in one executable file.  This means that the lisp image
(usually a separate file) is concatenated to the executable file.  If
you run strip on this executable, it will remove the lisp image,
breaking the application.

Cheers,

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


Re: [Nix-dev] sbcl image executables and patch-elf

2015-05-11 Thread Tomas Hlavaty
Hi Eike,

 I'm making a program in common lisp using sbcl. I then create a
 executable image which results in quite a big file since the whole
 lisp is packaged up. When I use nix to build this app, the file that
 ends up in nix-store is tiny and not working. It seems to me that the
 patch-elf process is stripping things off, but that's just a guess.

try:

   dontStrip = true;

in your build expression.

Cheers,

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


Re: [Nix-dev] Staging merge will soon happen

2015-05-03 Thread Tomas Hlavaty
Hi all,

Domen Kožar do...@dev.si writes:
 Staging and master are not building because of eval error:

 error: access to path ‘/nix/store/
 x15ndrygbhxl7vaaxxq4b6f5wjmh4j96-nix-1.9pre4087_afa433e’ is
 forbidden in restricted mode

hydra was changed to use the restricted mode in:

   commit 5a61aefe4f61bf54926557b05be386ba23b7aa43
   Author: Eelco Dolstra eelco.dols...@logicblox.com
   Date:   Tue Apr 14 15:16:00 2015 +0200

  Use Nix's restricted evaluation mode

I had to keep my local hydra at the previous commit

   5d8a563 *   Merge pull request #204 from aszlig/tail-improvements

due to this problem.

What does restricted mode mean?  What do I have to do to be able to use
newer hydra?

Thank you,

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


Re: [Nix-dev] pybitmessage python help

2015-05-02 Thread Tomas Hlavaty
Hi Tomasz and Rok,

thank you for pointers.

  postFixup = wrapPythonPrograms;

and propagatedBuildInputs did make it work.

Cheers,

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


Re: [Nix-dev] Depending on a service from inside an expression?

2015-04-28 Thread Tomas Hlavaty
Hi Mateusz,

Mateusz Kowalczyk fuuze...@fuuzetsu.co.uk writes:
 There is a project that as part of its tests has to create a postgresql
 database which means that the postgres server needs to be running.

 Is there an easy way to achieve this? How does one go about testing such
 packages to begin with?

I am currently setting something like that (hydra tests) for a nix
module (a systemd service) which requires postgresql.  What works for
me:

1) a nix package file for your program (say foo) so that your program
   compiles and installs

2) a nix env file (say fooEnv) for runtime-only dependencies (not
   detected by nix) which will be deployed as part of the service
   (because there is a limit on the PATH variable length)

3) a nix module file which defines the systemd service.  I have two
   modules:

   - foo-init which takes a long time to set up the database and other
 things

   - foo-service which is the actual service running the foo program

4) a nix vm file which defines a VM with that module plus postgresql
   module.  This is also useful for manually testing the VM.

5) a nix vmtest file which imports nixpkgs/nixos/tests/make-test.nix,
   creates the VM and runs the testScript

If your program doesn't run as a service, you would not need 3) I guess.

nixpkgs/nixos/tests/make-test.nix runs the tests in a fresh qemu machine
which is then discarded.

Cheers,

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


[Nix-dev] pybitmessage python help

2015-04-28 Thread Tomas Hlavaty
Hi,

I'm writing a nix expression for PyBitMessage:

{stdenv, fetchgit, python27, qt4, pyqt4, sqlite, openssl, mpg123}:

stdenv.mkDerivation rec {
  name = pybitmessage-v0.4.4;

  src = fetchgit {
url = https://github.com/Bitmessage/PyBitmessage.git;;
rev = 713ed89467b9c766cb22df0cc51415a93fd1801d;
sha256 = 0d70xj0bap7dwh1lj8fj0k0hwhfnzgz2g5jlh2sgqpaqpd74q1dq;
  };

  #pythonPath = [pyqt4];

  #buildInputs = [python27 pythonPackages.wrapPython];

  propagatedBuildInputs = [qt4 pyqt4 sqlite openssl mpg123];

  installPhase = ''
mkdir -p $out/share/pybitmessage
cp -r src/* $out/share/pybitmessage/
mkdir -p $out/bin
ln -s $out/share/pybitmessage/bitmessagemain.py $out/bin/pybitmessage
  '';

  meta = with stdenv.lib; { 
homepage = https://bitmessage.org;
description = Bitmessage is a P2P communications protocol;
license = licenses.mit;
  };
}

However, python cannot find pyqt4:

% pybitmessage 
pybitmessage 
Loading existing config files from /home/tomas/.config/PyBitmessage/
2015-04-28 23:23:44,401 - DEBUG - Database file already exists.
2015-04-28 23:23:44,656 - DEBUG - Loaded 0 objects from disk into the 
objectProcessorQueue.
2015-04-28 23:23:44,657 - DEBUG - reloading keys from keys.dat file
2015-04-28 23:23:44,766 - DEBUG - reloading subscriptions...
An Exception occurred within 
isOurOperatingSystemLimitedToHavingVeryFewHalfOpenConnections: invalid version 
number '#1 SMP PREEMPT Wed Apr 8 14:10:00 CEST 2015'
PyBitmessage requires PyQt unless you want to run it as a daemon and interact 
with it using the API. You can download PyQt from 
http://www.riverbankcomputing.com/software/pyqt/download   or by searching 
Google for 'PyQt Download'. If you want to run in daemon mode, see 
https://bitmessage.org/wiki/Daemon
('Error message:', ImportError('No module named PyQt4',))
You can also run PyBitmessage with the new curses interface by providing
'-c' as a commandline argument.


I tried searching nixpkgs and trying things but have not managed to
figure it out.  Does somebody have an idea, how to get it to work?

Thanks a lot,

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


[Nix-dev] package test set up and tear down

2015-04-14 Thread Tomas Hlavaty
Hi all,

I have a nix package expression with doCheck = true;.  The tests
require a RDBMS (postgresql for now).  preCheck creates postgresql roles
and database and postCheck drops the roles and database.  However, if
make check fails, postCheck is not executed and the database remains
polluted (and needs manual intervention).  Is there a way to revert the
changes made by preCheck reliably even if make check fails?  Something
like postCheckFinally, maybe?

What is the recommended way of testing such packages?  The only one I
found was nixos/tests/trac.nix which somehow runs nixos specific tests
and creates a VM for the database, which is then discarded somehow.  If
this is the way to go, do you have some pointers or examples I could
follow about how to create and run these tests?

I also found
https://nixos.org/wiki/Kiberpipa_sprint_2014_topics_wiki_backup#Nixtest_-_testing_for_nixpkgs
so it seems that there is a demand better package testing.  Have there
been any progress on this front?

Thank you,

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


Re: [Nix-dev] Nix expressions and latest packages CA+cPLChywLnpF=+fqvnv+p+kymqgmnos2v3zupsr+erxus7...@mail.gmail.com ( 胡 雨軒's message of Mon, 30 Mar 2015 01:06:04 +0200)

2015-03-30 Thread Tomas Hlavaty
Hi 胡雨軒

胡雨軒 pde-b...@isep.fr writes:
 The documentation says Nix conceptually builds package from
 source but relies on stores (some package caches) to download
 already built packages. So there is some set of fixed package
 versions and system update depends on the store update pace,
 doesn't it?

yes.  But if you desire, you can have more control over that, for
example, if you check out nixpkgs repository and install from there.
You can choose a commiy, branch or tag or create your own modifications.
Or you can customize your packages via ~/.nixpkgs/config.nix for
example.  If there is an already compiled version in the cache, it will
be downloaded.  If not, the package will be compiled on your system.

 Is it possible to set nix to always download latest versions of
 installed packages, built it aside the old version and upgrade
 the system automatically?

This is what nix does.

 I know one could think some latest package may be not compatible
 with each other, but this leads me to the next question. I'm
 planning to use nix package manager within Arch Linux distro, so
 the distro team would do what's necessary to avoid
 incompatibilities.

I am using nix on ArchLinux atm.  There are no incompatibilities because
of the way nix works.

 Then, is it possible to configure nix to retrieve data both from Arch
 repositories and from the AUR?

No, nix has its own package language and does not understand ArchLinux
packaging format.

Cheers,

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


Re: [Nix-dev] patches to add mkcl and fix ecl

2015-03-28 Thread Tomas Hlavaty
Hi Michael,

Michael Raskin 7c6f4...@mail.ru writes:
attached is a patch which fixes ecl, using the gmp and libffi supplied
by nix, preserving the dffi ecl feature.

 Thanks, applied

thanks a lot!

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


Re: [Nix-dev] patches to add mkcl and fix ecl

2015-03-27 Thread Tomas Hlavaty
Hi Michael,

attached is a patch which fixes ecl, using the gmp and libffi supplied
by nix, preserving the dffi ecl feature.

Michael Raskin 7c6f4...@mail.ru writes:
2) to fix ecl, another common lisp implementation

 I think adding a wrapper that sets NIX_CFLAGS_COMPILE and 
 NIX_CFLAGS_LINK is a better last-ditch solution than just forbidding
 libffi (I don't remember if ECL has an option to just add generic 
 cflags).

Could you please give me more clue, or better point me at an example,
how to write this?  My nix skills are not up for that just yet.

 Look at bittornado expression, for example, it sets PYTHONPATH for use
 at runtime.

 For ECL we need to set NIX_CFLAGS_COMPILE, I guess. Any flags in 
 NIX_CFLAGS_COMPILE are treated by NixPkgs gcc as if passed to gcc 
 directly. There are also NIX_LDFLAGS.

If we want to use libffi, then it needs to be in propagateBuildInputs.

 Good catch.

Ecl invokes gcc at runtime, to compile lisp files.  At this point,
libffi needs to be passed as gcc arg -I${libffi}/lib, which is not
happening at the moment, and I haven't found a way how to do this.

So unless this runtime gcc invocation works (with or without) libffi,
ecl is not usable.

I tried a few things as you suggested but without success.  E.g.

   NIX_CFLAGS_COMPILE = [ -I${libffi}/include ];
   NIX_LDFLAGS = [ -L${libffi}/lib ];

   or

   wrapProgram $out/bin/ecl \
 --prefix NIX_CFLAGS_COMPILE ' ' -I${libffi}/include \
 --prefix NIX_LDFLAGS ' ' -L${libffi}/lib

but that did not work.  I think it makes sense, because it is ecl which
creates the gcc arguments, not nix.

The attached patch adds with-libffi-prefix to configure.ac (similar to
the existing with-gmp-prefix) and re-runs autoconf.

Thank you for your help!

Tomas

From 042f6cd5d6ef80bb875676fb6728fb34049e61e0 Mon Sep 17 00:00:00 2001
From: Tomas Hlavaty t...@logand.com
Date: Sat, 28 Mar 2015 01:57:00 +0100
Subject: [PATCH] ensure that gmp and libffi are found when compiling with gcc
 dynamically

---
 pkgs/development/compilers/ecl/default.nix | 15 +++--
 pkgs/development/compilers/ecl/libffi-prefix.patch | 39 ++
 2 files changed, 52 insertions(+), 2 deletions(-)
 create mode 100644 pkgs/development/compilers/ecl/libffi-prefix.patch

diff --git a/pkgs/development/compilers/ecl/default.nix b/pkgs/development/compilers/ecl/default.nix
index be65061..bb57ebb 100644
--- a/pkgs/development/compilers/ecl/default.nix
+++ b/pkgs/development/compilers/ecl/default.nix
@@ -1,4 +1,5 @@
 {stdenv, fetchurl
+, libtool, autoconf, automake
 , gmp, mpfr, libffi
 , noUnicode ? false, 
 }:
@@ -13,10 +14,10 @@ let
 sha256=13wlxkd5prm93gcm2dhm7v52fl803yx93aa97lrb39z0y6xzziid;
   };
   buildInputs = [
-libffi
+libtool autoconf automake
   ];
   propagatedBuildInputs = [
-gmp mpfr
+libffi gmp mpfr
   ];
 in
 stdenv.mkDerivation {
@@ -25,8 +26,18 @@ stdenv.mkDerivation {
   src = fetchurl {
 inherit (s) url sha256;
   };
+  patches = [ ./libffi-prefix.patch ];
+  preConfigure = ''
+(cd src ; libtoolize -f)
+(cd src ; autoheader -f)
+(cd src ; aclocal)
+(cd src ; automake --add-missing -c)
+(cd src ; autoconf -f)
+  '';
   configureFlags = [
 --enable-threads
+--with-gmp-prefix=${gmp}
+--with-libffi-prefix=${libffi}
 ]
 ++
 (stdenv.lib.optional (! noUnicode)
diff --git a/pkgs/development/compilers/ecl/libffi-prefix.patch b/pkgs/development/compilers/ecl/libffi-prefix.patch
new file mode 100644
index 000..d02cc21
--- /dev/null
+++ b/pkgs/development/compilers/ecl/libffi-prefix.patch
@@ -0,0 +1,39 @@
+diff --git a/src/configure.in b/src/configure.in
+index 434da49..642c66c 100644
+--- ecl-15.3.7.orig/src/configure.ac
 ecl-15.3.7/src/configure.ac
+@@ -191,6 +191,11 @@ AC_ARG_WITH(dffi,
+   [(system|included|auto|no, default=AUTO if libffi available)]),
+   [enable_libffi=${withval}], [enable_libffi=auto])
+ 
++AC_ARG_WITH(libffi-prefix,
++  AS_HELP_STRING( [--with-libffi-prefix=path],
++  [prefix for system LIBFFI includes and libraries] ),
++  [LIBFFI_INCDIR=$withval/include; LIBFFI_LIBDIR=$withval/lib], [])
++
+ AC_ARG_WITH(fpe,
+   AS_HELP_STRING( [--with-fpe],
+   [detect floating point exceptions]
+@@ -368,6 +373,22 @@ else
+   INFOEXT=info
+ fi
+ 
++dnl libffi
++
++if test x$LIBFFI_INCDIR != x; then
++  LIBFFI_CPPFLAGS=-I$LIBFFI_INCDIR
++fi
++if test x$LIBFFI_LIBDIR != x; then
++  LIBFFI_LDFLAGS=-L$LIBFFI_LIBDIR
++  if test $enable_rpath = yes; then
++if (echo $ECL_LDRPATH | grep '~A')  /dev/null; then
++  LIBFFI_LDFLAGS=`echo $ECL_LDRPATH | sed s,~A,$LIBFFI_LIBDIR,` $LIBFFI_LDFLAGS
++fi
++  fi
++fi
++CPPFLAGS=$CPPFLAGS $LIBFFI_CPPFLAGS
++LDFLAGS=$LDFLAGS $LIBFFI_LDFLAGS
++
+ dnl ==
+ dnl GNU multiprecision library
+ dnl
-- 
2.1.4

___
nix-dev mailing list
nix-dev@lists.science.uu.nl

[Nix-dev] added libpst

2015-01-30 Thread Tomas Hlavaty
Hi all,

would it be possible to add new nixpkg?  Patch attached.

Thank you,

Tomas

From 081469bf75e69ff5ab1836e2de70b02c2924a10f Mon Sep 17 00:00:00 2001
From: Tomas Hlavaty tomas.hlav...@knowledgetools.de
Date: Fri, 30 Jan 2015 18:59:22 +0100
Subject: [PATCH] added libpst

---
 pkgs/development/libraries/libpst/default.nix | 26 ++
 pkgs/top-level/all-packages.nix   |  2 ++
 2 files changed, 28 insertions(+)
 create mode 100644 pkgs/development/libraries/libpst/default.nix

diff --git a/pkgs/development/libraries/libpst/default.nix b/pkgs/development/libraries/libpst/default.nix
new file mode 100644
index 000..d4b602c
--- /dev/null
+++ b/pkgs/development/libraries/libpst/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchurl, autoconf, automake, libtool, boost, python, libgsf,
+  pkgconfig, bzip2, xmlto, gettext, imagemagick, doxygen }:
+
+stdenv.mkDerivation rec {
+  name = libpst-0-6-63;
+
+  src = fetchurl {
+  url = http://www.five-ten-sg.com/libpst/packages/libpst-0.6.63.tar.gz;
+  sha256 = 0qih919zk40japs4mpiaw5vyr2bvwz60sjf23gixd5vvzc32cljz;
+};
+
+  buildInputs = [ autoconf automake libtool boost python libgsf pkgconfig bzip2
+		  xmlto gettext imagemagick doxygen ];
+
+  preConfigure = ''
+autoreconf -v -f -i
+  '';
+
+  doCheck = true;
+
+  meta = {
+homepage = http://www.five-ten-sg.com/libpst/;
+description = A library to read PST (MS Outlook Personal Folders) files;
+license = stdenv.lib.licenses.gpl2;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 4f4914d..d42b5be 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -6379,6 +6379,8 @@ let
 
   libpseudo = callPackage ../development/libraries/libpseudo { };
 
+  libpst = callPackage ../development/libraries/libpst { };
+
   libpwquality = callPackage ../development/libraries/libpwquality { };
 
   libqalculate = callPackage ../development/libraries/libqalculate { };
-- 
2.1.3

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