[Nix-dev] Hydra to build RPMs
stewart mackenzie
setori88 at gmail.com
Thu Dec 4 10:50:29 CET 2014
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.
More information about the nix-dev
mailing list