Re: [Nix-dev] builder for ‘*.drv’ failed to produce output path ‘*’

2015-12-14 Thread Tinker
Thanks, that worked.

If I install it now and run `pgloader` I am getting (somewhere in sbcl):

Error opening shared object "libsqlite3.so.0":...

It works if I manually set the LD_LIBRARY_PATH

export LD_LIBRARY_PATH=
/nix/store/nn4srgg3f8hvb6x30df058kl67ar3wr9-lisp-cl+ssl-git-20141113/lib:/nix/store/w0ml3zjnqawcw2dlamn9q3pilplmgryi-openssl-1.0.1p/lib:/nix/store/z35b0yjmrhhl0cfxrkymf4387i3pjkjm-sqlite-3.8.11.1/lib:/nix/store/byk49dzimn7yxyjk16674yd54n6krwn3-freetds-0.91/lib

How do other utils typically deal with this?
Does the user need to do this himself after installing with nix-env?
And if so, how to find out the paths (I could find them out by opening
a nix-shell and inspecting the variable)?
Or is this something that should rather be done through a shell.nix or
an environment?

t

On Sun, Dec 13, 2015 at 11:46 PM, Tomasz Kontusz
 wrote:
> You need to create $out in your builder. Just "cp -r ./build $out" after
> the "make pgloader" will be a good start - at least you'll see if it's
> usable :-)
>
> On 13.12.2015 23:39, Tinker wrote:
>> Hi
>>
>> I'm trying to write a nix package for pgloader (a db migration tool
>> written by someone else and can be found at
>> https://github.com/dimitri/pgloader).
>>
>> When I run it as `nix-build -A pgloader` then I get:
>>
>> builder for ‘/nix/store/gz38vqm47i0vfyiqdz6qmqyx7ywprji5-pgloader-3.2.2.drv’
>> failed to produce output path
>> ‘/nix/store/v5ya763xia00lp40yx6z5c0h6l1cvla2-pgloader-3.2.2’
>> error: build of
>> ‘/nix/store/gz38vqm47i0vfyiqdz6qmqyx7ywprji5-pgloader-3.2.2.drv’
>> failed
>>
>> I'm trying to figure out what it means but maybe someone can already
>> shed a light?
>>
>> The package does not have a 'make install', is that why it's
>> complaining out the missing output path?
>> What would be the way forward given I don't own the source of the
>> utility itself?
>>
>> default.nix (other comments welcome as well):
>> ===
>> { stdenv, fetchurl, sbcl, unzip, curl, git, openssl, sqlite, freetds,
>> lispPackages, cacert }:
>>
>> stdenv.mkDerivation {
>>name = "pgloader-3.2.2";
>>buildInputs = [ sbcl unzip curl git openssl sqlite freetds
>> lispPackages.cl-ssl cacert ];
>>
>> LD_LIBRARY_PATH="${lispPackages.cl-ssl}/lib:${openssl}/lib:${sqlite}/lib:${freetds}/lib";
>>SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt;
>>CURL_CA_BUNDLE=/etc/ssl/certs/ca-bundle.crt;
>>
>>builder = builtins.toFile "builder.sh" "
>>  source $stdenv/setup
>>
>>  PATH=$sbcl/bin:$PATH
>>
>>  unzip $src
>>  cd pgloader-*
>>  sed -i 's/COMPRESS_CORE ?= yes/COMPRESS_CORE ?= no/' Makefile
>>  make COMPRESS_CORE=no pgloader
>>";
>>
>>src = fetchurl {
>>  url = https://github.com/dimitri/pgloader/archive/master.zip;
>>  md5 = "8b93075a1a5848a674101d90850dc90e";
>>  #url = https://github.com/dimitri/pgloader/archive/v3.2.2.zip;
>>  #md5 = "4d00eb55bf7dbea0a8e55248d2bbb96d";
>>};
>>inherit sbcl;
>> }
>> ===
>>
>> t
>> ___
>> 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 mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] builder for ‘*.drv’ failed to produce output path ‘*’

2015-12-13 Thread Tomasz Kontusz
You need to create $out in your builder. Just "cp -r ./build $out" after 
the "make pgloader" will be a good start - at least you'll see if it's 
usable :-)

On 13.12.2015 23:39, Tinker wrote:
> Hi
>
> I'm trying to write a nix package for pgloader (a db migration tool
> written by someone else and can be found at
> https://github.com/dimitri/pgloader).
>
> When I run it as `nix-build -A pgloader` then I get:
>
> builder for ‘/nix/store/gz38vqm47i0vfyiqdz6qmqyx7ywprji5-pgloader-3.2.2.drv’
> failed to produce output path
> ‘/nix/store/v5ya763xia00lp40yx6z5c0h6l1cvla2-pgloader-3.2.2’
> error: build of
> ‘/nix/store/gz38vqm47i0vfyiqdz6qmqyx7ywprji5-pgloader-3.2.2.drv’
> failed
>
> I'm trying to figure out what it means but maybe someone can already
> shed a light?
>
> The package does not have a 'make install', is that why it's
> complaining out the missing output path?
> What would be the way forward given I don't own the source of the
> utility itself?
>
> default.nix (other comments welcome as well):
> ===
> { stdenv, fetchurl, sbcl, unzip, curl, git, openssl, sqlite, freetds,
> lispPackages, cacert }:
>
> stdenv.mkDerivation {
>name = "pgloader-3.2.2";
>buildInputs = [ sbcl unzip curl git openssl sqlite freetds
> lispPackages.cl-ssl cacert ];
>
> LD_LIBRARY_PATH="${lispPackages.cl-ssl}/lib:${openssl}/lib:${sqlite}/lib:${freetds}/lib";
>SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt;
>CURL_CA_BUNDLE=/etc/ssl/certs/ca-bundle.crt;
>
>builder = builtins.toFile "builder.sh" "
>  source $stdenv/setup
>
>  PATH=$sbcl/bin:$PATH
>
>  unzip $src
>  cd pgloader-*
>  sed -i 's/COMPRESS_CORE ?= yes/COMPRESS_CORE ?= no/' Makefile
>  make COMPRESS_CORE=no pgloader
>";
>
>src = fetchurl {
>  url = https://github.com/dimitri/pgloader/archive/master.zip;
>  md5 = "8b93075a1a5848a674101d90850dc90e";
>  #url = https://github.com/dimitri/pgloader/archive/v3.2.2.zip;
>  #md5 = "4d00eb55bf7dbea0a8e55248d2bbb96d";
>};
>inherit sbcl;
> }
> ===
>
> t
> ___
> 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] builder for ‘*.drv’ failed to produce output path ‘*’

2015-12-13 Thread Tinker
Hi

I'm trying to write a nix package for pgloader (a db migration tool
written by someone else and can be found at
https://github.com/dimitri/pgloader).

When I run it as `nix-build -A pgloader` then I get:

builder for ‘/nix/store/gz38vqm47i0vfyiqdz6qmqyx7ywprji5-pgloader-3.2.2.drv’
failed to produce output path
‘/nix/store/v5ya763xia00lp40yx6z5c0h6l1cvla2-pgloader-3.2.2’
error: build of
‘/nix/store/gz38vqm47i0vfyiqdz6qmqyx7ywprji5-pgloader-3.2.2.drv’
failed

I'm trying to figure out what it means but maybe someone can already
shed a light?

The package does not have a 'make install', is that why it's
complaining out the missing output path?
What would be the way forward given I don't own the source of the
utility itself?

default.nix (other comments welcome as well):
===
{ stdenv, fetchurl, sbcl, unzip, curl, git, openssl, sqlite, freetds,
lispPackages, cacert }:

stdenv.mkDerivation {
  name = "pgloader-3.2.2";
  buildInputs = [ sbcl unzip curl git openssl sqlite freetds
lispPackages.cl-ssl cacert ];
  
LD_LIBRARY_PATH="${lispPackages.cl-ssl}/lib:${openssl}/lib:${sqlite}/lib:${freetds}/lib";
  SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt;
  CURL_CA_BUNDLE=/etc/ssl/certs/ca-bundle.crt;

  builder = builtins.toFile "builder.sh" "
source $stdenv/setup

PATH=$sbcl/bin:$PATH

unzip $src
cd pgloader-*
sed -i 's/COMPRESS_CORE ?= yes/COMPRESS_CORE ?= no/' Makefile
make COMPRESS_CORE=no pgloader
  ";

  src = fetchurl {
url = https://github.com/dimitri/pgloader/archive/master.zip;
md5 = "8b93075a1a5848a674101d90850dc90e";
#url = https://github.com/dimitri/pgloader/archive/v3.2.2.zip;
#md5 = "4d00eb55bf7dbea0a8e55248d2bbb96d";
  };
  inherit sbcl;
}
===

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