Re: [Nix-dev] Hydra to build RPMs

2014-12-04 Thread Luca Bruno
On 04/12/2014 04:58, stewart mackenzie wrote:
 What happens:
 Hydra's UI displays this error message:
 
 in job ‘fedora13_x86_64’:
 value is a function while a set was expected, at
 [1m/nix/store/hqkfnyz4h7lgsbp5vs7a33za2m27xaif-git-export/release.nix
 [0m:56:27
 

 Release.nix contents:

 let
   pkgs = import nixpkgs {}; #obtained from hydra's UI jobset

   makeRPM =
 diskImageFun:
 { c-ejabberd, nixpkgs }:

 with import nixpkgs.path {};

 releaseTools.rpmBuild rec {
   name = c-ejabberd-rpm-${diskImage.name};
   src = c-ejabberd;
   diskImage = diskImageFun vmTools.diskImages;
 #  meta.schedulingPriority = 4;  # low priority
 };

 [...]
  fedora13_x86_64 = makeRPM x86_64-linux (diskImages:
 diskImages.fedora13x86_64);
This call doesn't seem to match your makeRPM function definition. The
second argument of makeRPM wants a set, but you are passing a function.
Hence the error.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Hydra to build RPMs

2014-12-04 Thread stewart mackenzie
So you're absolutely correct. Here is my solution which correctly
downloads the image.

Though a new error has appeared:

 rsync
  needs libacl.so.1()(64bit)
satisfied by libacl
  needs libacl.so.1(ACL_1.0)(64bit)
satisfied by libacl
  needs libc.so.6(GLIBC_2.15)(64bit)
satisfied by glibc
  needs libpopt.so.0()(64bit)
satisfied by popt
  needs libpopt.so.0(LIBPOPT_0)(64bit)
satisfied by popt
  needs rtld(GNU_HASH)
satisfied by glibc
 libyaml
  needs /sbin/ldconfig
satisfied by glibc
  needs /sbin/ldconfig
satisfied by glibc
  needs libc.so.6(GLIBC_2.14)(64bit)
satisfied by glibc
  needs rtld(GNU_HASH)
satisfied by glibc
 libcouchbase2-libevent
package libcouchbase2-libevent doesn't exist at
/nix/store/y5k3njz42s6688bjz4qam0wg2j9vzy5k-rpm-closure.pl line 129.
builder for 
`/nix/store/r2d693k8jmzwa235zzc0fqw4vfhlcvji-fedora-17-x86_64.nix.drv'
failed with exit code 255
error: build of
`/nix/store/r2d693k8jmzwa235zzc0fqw4vfhlcvji-fedora-17-x86_64.nix.drv'
failed
(use ‘--show-trace’ to show detailed location information)

I have added a 'eval $preRPMInstall' to line 31 of this file
https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/release/rpm-build.nix#L31

I need to add a YUM repo to the image so that I can get the
libcouchbase packages.

let
  pkgs = import nixpkgs {};

  jobs = rec {

c-ejabberd = pkgs.stdenv.mkDerivation rec {
  name = c-ejabberd;
  src = c-ejabberd;
  dontPatchELF = true;
  dontPatchShebangs = true;
  buildInputs = ( with pkgs; [
  expat erlang zlib openssl pam automake
  autoconf git libyaml openssh libcouchbase
 ]);
  preConfigure = ./autogen.sh;
  };

makeRPM_x86_64 = makeRPM x86_64-linux;

rpm_fedora17x86_64 = makeRPM_x86_64 (diskImageFunsFun:
diskImageFunsFun.fedora17x86_64);

makeRPM =
  system: diskImageFun:
  with import nixpkgs { inherit system; };
  releaseTools.rpmBuild rec {
name = c-ejabberd-rpm-${diskImage.name};
src = jobs.c-ejabberd;
diskImage = (diskImageFun vmTools.diskImageFuns)
  { extraPackages = [ expat erlang zlib openssl pam
automake autoconf git libyaml openssh
libcouchbase2-libevent libcouchbase-devel ]; };
memSize = 1024;
meta.schedulingPriority = 50;
preRPMInstall = ''
echo [couchbase]
name = Couchbase package repository
baseurl = http://packages.couchbase.com/rpm/6.2/x86_64
gpgcheck = 1
gpgkey = http://packages.couchbase.com/rpm/couchbase-rpm.key; 
/etc/yum.repos.d/couchbase.repo 
rpm --import http://packages.couchbase.com/rpm/couchbase-rpm.key
'';
postRPMInstall = cd /tmp/rpmout/BUILD/nix-*  make installcheck;
  };
  };
in
  jobs

  fedora13_x86_64 = makeRPM x86_64-linux (diskImages:
 diskImages.fedora13x86_64);
 This call doesn't seem to match your makeRPM function definition. The
 second argument of makeRPM wants a set, but you are passing a function.
 Hence the error.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Hydra to build RPMs

2014-12-04 Thread Luca Bruno
On 04/12/2014 10:50, stewart mackenzie wrote:
 package libcouchbase2-libevent doesn't exist at
 /nix/store/y5k3njz42s6688bjz4qam0wg2j9vzy5k-rpm-closure.pl line 129.
 builder for 
 `/nix/store/r2d693k8jmzwa235zzc0fqw4vfhlcvji-fedora-17-x86_64.nix.drv'
 failed with exit code 255
 error: build of
 `/nix/store/r2d693k8jmzwa235zzc0fqw4vfhlcvji-fedora-17-x86_64.nix.drv'
 failed
 (use ‘--show-trace’ to show detailed location information)

 I have added a 'eval $preRPMInstall' to line 31 of this file
 https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/release/rpm-build.nix#L31

 I need to add a YUM repo to the image so that I can get the
 libcouchbase packages.
Sorry can't understand if you're still asking for help :)
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev