mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 05:43:50 +03:00
svn path=/nixpkgs/trunk/; revision=11189
This commit is contained in:
parent
2514c86033
commit
3a05713cb7
@ -305,10 +305,8 @@ rec {
|
||||
buildCommand = ''
|
||||
${createRootFS}
|
||||
|
||||
echo "initialising RPM DB..."
|
||||
rpm="${rpm}/bin/rpm --root /mnt --dbpath /var/lib/rpm"
|
||||
$rpm --initdb
|
||||
|
||||
chroot=$(type -tP chroot)
|
||||
|
||||
echo "unpacking RPMs..."
|
||||
for i in $rpms; do
|
||||
echo "$i..."
|
||||
@ -317,12 +315,15 @@ rec {
|
||||
|
||||
eval "$preInstall"
|
||||
|
||||
echo "initialising RPM DB..."
|
||||
PATH=/usr/bin:/bin:/usr/sbin:/sbin $chroot /mnt \
|
||||
rpm --initdb
|
||||
|
||||
# Make the Nix store available in /mnt, because that's where the RPMs live.
|
||||
mkdir -p /mnt/nix/store
|
||||
${klibcShrunk}/bin/mount -o bind /nix/store /mnt/nix/store
|
||||
|
||||
echo "installing RPMs..."
|
||||
chroot=$(type -tP chroot)
|
||||
PATH=/usr/bin:/bin:/usr/sbin:/sbin $chroot /mnt \
|
||||
rpm -iv $rpms
|
||||
|
||||
@ -364,8 +365,10 @@ rec {
|
||||
distribution installed in the filesystem `diskImage'. The
|
||||
tarball must contain an RPM specfile. */
|
||||
|
||||
buildRPM = attrs: runInLinuxImage (stdenv.mkDerivation (attrs // {
|
||||
buildRPM = attrs: runInLinuxImage (stdenv.mkDerivation ({
|
||||
phases = "sysInfoPhase buildPhase installPhase";
|
||||
|
||||
outDir = "rpms/${attrs.diskImage.name}";
|
||||
|
||||
sysInfoPhase = ''
|
||||
header "base RPMs"
|
||||
@ -388,16 +391,16 @@ rec {
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
ensureDir $out/rpms
|
||||
find /usr/src -name "*.rpm" -exec cp {} $out/rpms \;
|
||||
ensureDir $out/$outDir
|
||||
find /usr/src -name "*.rpm" -exec cp {} $out/$outDir \;
|
||||
|
||||
for i in $out/rpms/*.rpm; do
|
||||
for i in $out/$outDir/*.rpm; do
|
||||
header "Generated RPM/SRPM: $i"
|
||||
rpm -qip $i
|
||||
stopNest
|
||||
done
|
||||
'';
|
||||
}));
|
||||
''; # */
|
||||
} // attrs));
|
||||
|
||||
|
||||
/* Create a filesystem image of the specified size and fill it with
|
||||
@ -483,14 +486,14 @@ rec {
|
||||
diskImages = {
|
||||
|
||||
redhat9i386 = fillDiskWithRPMs {
|
||||
name = "redhat-9-i386-image";
|
||||
name = "redhat-9-i386";
|
||||
fullName = "Red Hat Linux 9 (i386)";
|
||||
size = 768;
|
||||
rpms = import ./rpm/redhat-9-i386.nix {inherit fetchurl;};
|
||||
};
|
||||
|
||||
suse90i386 = fillDiskWithRPMs {
|
||||
name = "suse-9.0-i386-image";
|
||||
name = "suse-9.0-i386";
|
||||
fullName = "SUSE Linux 9.0 (i386)";
|
||||
size = 768;
|
||||
rpms = import ./rpm/suse-9-i386.nix {inherit fetchurl;};
|
||||
@ -510,35 +513,35 @@ rec {
|
||||
};
|
||||
|
||||
fedora2i386 = fillDiskWithRPMs {
|
||||
name = "fedora-core-2-i386-image";
|
||||
name = "fedora-core-2-i386";
|
||||
fullName = "Fedora Core 2 (i386)";
|
||||
size = 768;
|
||||
rpms = import ./rpm/fedora-2-i386.nix {inherit fetchurl;};
|
||||
};
|
||||
|
||||
fedora3i386 = fillDiskWithRPMs {
|
||||
name = "fedora-core-3-i386-image";
|
||||
name = "fedora-core-3-i386";
|
||||
fullName = "Fedora Core 3 (i386)";
|
||||
size = 768;
|
||||
rpms = import ./rpm/fedora-3-i386.nix {inherit fetchurl;};
|
||||
};
|
||||
|
||||
fedora5i386 = fillDiskWithRPMs {
|
||||
name = "fedora-core-5-i386-image";
|
||||
name = "fedora-core-5-i386";
|
||||
fullName = "Fedora Core 5 (i386)";
|
||||
size = 768;
|
||||
rpms = import ./rpm/fedora-5-i386.nix {inherit fetchurl;};
|
||||
};
|
||||
|
||||
ubuntu710i386 = fillDiskWithDebs {
|
||||
name = "ubuntu-7.10-gutsy-i386-image";
|
||||
name = "ubuntu-7.10-gutsy-i386";
|
||||
fullName = "Ubuntu 7.10 Gutsy (i386)";
|
||||
size = 512;
|
||||
debs = import ./deb/ubuntu-7.10-gutsy-i386.nix {inherit fetchurl;};
|
||||
};
|
||||
|
||||
debian40r3i386 = fillDiskWithDebs {
|
||||
name = "debian-4.0r3-etch-i386-image";
|
||||
name = "debian-4.0r3-etch-i386";
|
||||
fullName = "Debian 4.0r3 Etch (i386)";
|
||||
size = 512;
|
||||
debs = import ./deb/debian-4.0r3-etch-i386.nix {inherit fetchurl;};
|
||||
|
@ -41,7 +41,6 @@ gcc-4.1.0-3.i386.rpm 6eb6292cb655d5e5af5a6f4d5712dcb2
|
||||
gcc-c++-4.1.0-3.i386.rpm 982ec6e1c45d9540183bf19fd2070666
|
||||
gdbm-1.8.0-26.2.i386.rpm e4746da0a6faeb645feb800e05fea932
|
||||
glib-1.2.10-18.2.2.i386.rpm df4d5de569ea817e9397d3490c78cf42
|
||||
glib-1.2.10-18.2.2.i386.rpm df4d5de569ea817e9397d3490c78cf42
|
||||
glib2-2.10.1-1.i386.rpm 0bf35e951dc4499ecc20b64b7bc84dc7
|
||||
glibc-2.4-4.i686.rpm a4a9695595d2a6c79eda24aea045e1a6
|
||||
glibc-common-2.4-4.i386.rpm 0a252ee07fcd7051f1176ea886465666
|
||||
|
@ -41,7 +41,6 @@
|
||||
(fetchurl {url=ftp://ftp.tudelft.nl/pub/Linux/download.fedora.redhat.com/linux/core/5/i386/os/Fedora/RPMS/gcc-c++-4.1.0-3.i386.rpm; md5="982ec6e1c45d9540183bf19fd2070666";})
|
||||
(fetchurl {url=ftp://ftp.tudelft.nl/pub/Linux/download.fedora.redhat.com/linux/core/5/i386/os/Fedora/RPMS/gdbm-1.8.0-26.2.i386.rpm; md5="e4746da0a6faeb645feb800e05fea932";})
|
||||
(fetchurl {url=ftp://ftp.tudelft.nl/pub/Linux/download.fedora.redhat.com/linux/core/5/i386/os/Fedora/RPMS/glib-1.2.10-18.2.2.i386.rpm; md5="df4d5de569ea817e9397d3490c78cf42";})
|
||||
(fetchurl {url=ftp://ftp.tudelft.nl/pub/Linux/download.fedora.redhat.com/linux/core/5/i386/os/Fedora/RPMS/glib-1.2.10-18.2.2.i386.rpm; md5="df4d5de569ea817e9397d3490c78cf42";})
|
||||
(fetchurl {url=ftp://ftp.tudelft.nl/pub/Linux/download.fedora.redhat.com/linux/core/5/i386/os/Fedora/RPMS/glib2-2.10.1-1.i386.rpm; md5="0bf35e951dc4499ecc20b64b7bc84dc7";})
|
||||
(fetchurl {url=ftp://ftp.tudelft.nl/pub/Linux/download.fedora.redhat.com/linux/core/5/i386/os/Fedora/RPMS/glibc-2.4-4.i686.rpm; md5="a4a9695595d2a6c79eda24aea045e1a6";})
|
||||
(fetchurl {url=ftp://ftp.tudelft.nl/pub/Linux/download.fedora.redhat.com/linux/core/5/i386/os/Fedora/RPMS/glibc-common-2.4-4.i386.rpm; md5="0a252ee07fcd7051f1176ea886465666";})
|
||||
|
Loading…
Reference in New Issue
Block a user