3
0
Fork 0
forked from mirrors/nixpkgs

Updating the go-oo srcs to a much more stable ones: those upstream, instead of gitweb generated tarballs.

And adding a nix derivation that will help preparing the go-srcs.nix when updating go-oo.

svn path=/nixpkgs/trunk/; revision=22070
This commit is contained in:
Lluís Batlle i Rossell 2010-06-01 09:17:37 +00:00
parent d0b4c2e0c2
commit a073f876ae
4 changed files with 128 additions and 144 deletions

View file

@ -0,0 +1,51 @@
# nix derivation that will create a bash script that will create the go-srcs.nix file.
#
# it can be slightly improved so it downloads properly also the OpenOffice.org upstream package,
# instead of only those 'additional' to the upstream code. By now the upstream oo.org code I wrote
# manually in the go-oo.nix.
#
# I think this looks quite ugly, but the only way I've found to know what files the program will need,
# and from what URLs, is running their './configure' with proper parameters and executing their
# './download' script.
let
pkgsFun = import /etc/nixos/nixpkgs;
pkgs = pkgsFun {};
in
with pkgs;
lib.overrideDerivation go_oo (attrs: {
name = attrs.name + "-make-src";
src = attrs.src;
buildInputs = attrs.buildInputs ++ [ gawk ];
# Avoid downloading what is defined in go_oo
srcs_download = null;
phases = [ "unpackPhase" "configurePhase" "makesh" ];
makesh = ''
sed -i -e '/-x $WG/d' -e "s/WGET='''/WGET='echo XXX'/" download
ensureDir $out
set +e
./download --all | grep XXX | grep -v openoffice.bouncer | awk '
BEGIN {
print "#!/bin/sh"
print "echo \"{fetchurl} : [\" > go-srcs.nix"
}
{
print "echo \"(fetchurl {\" >> go-srcs.nix"
print "echo \" url = \\\"" $2 "\\\";\" >> go-srcs.nix"
print "echo \" sha256 = \\\"`nix-prefetch-url " $2 "`\\\";\" >> go-srcs.nix"
if (NF > 3)
print "echo \" name = \\\"" $4 "\\\";\" >> go-srcs.nix"
print "echo \"})\" >> go-srcs.nix"
}
END {
print "echo ] >> go-srcs.nix"
}' > $out/make-go-srcs-nix.sh
exit 0
'';
})

View file

@ -10,6 +10,9 @@
let
langsSpaces = stdenv.lib.concatStringsSep " " langs;
downloadRoot = "http://download.services.openoffice.org/files/stable/";
fileUrl = part: "${downloadRoot}3.2.0/OOo_3.2.0_src_${part}.tar.bz2";
tag = "OOO320_m12";
in
stdenv.mkDerivation rec {
name = "go-oo-3.2.0.10";
@ -22,16 +25,41 @@ stdenv.mkDerivation rec {
sha256 = "0g6n0m9pibn6cx12zslmknzy1p764nqj8vdf45l5flyls9aj3x21";
};
srcs_download = (import ./src.nix) fetchurl;
srcs_download = [
(fetchurl {
url = fileUrl "binfilter";
sha256 = "1jl3a3zyb03wzi297llr69qpnimdc99iv82yvgxy145hz21xbjra";
})
(fetchurl {
url = fileUrl "core";
sha256 = "0jl14rxmvhz86jlhhwqlbr9nfi9p271aknqxada9775qfm6bjjml";
})
(fetchurl {
url = fileUrl "extensions";
sha256 = "1l2xby47pflcqbv3m6ihjsv89ax96lvpl76wklwlcn8vzclbfqk8";
})
(fetchurl {
url = fileUrl "system";
sha256 = "0nihw4iyh9qc188dkyfjr3zvp6ym6i1spm16j0cyh5rgxcrn6ycp";
})
(fetchurl {
url = fileUrl "l10n_rev2";
sha256 = "1sp4b9r6qiczw875swk7p8r8bdxdyrwr841xn53xxxfglc4njba9";
name = "OOo_3.2.0_src_l10n.tar.bz2";
})
] ++ (import ./go-srcs.nix { inherit fetchurl; });
# Multi-CPU: --with-num-cpus=4
# The '--with-tag=XXXX' string I took from their 'configure' script. I write it so it matches the
# logic in the script for "upstream version for X.X.X". Look for that string in the script.
# We need '--without-split' when downloading directly usptream openoffice src tarballs.
configurePhase = ''
sed -i -e '1s,/bin/bash,${bash}/bin/bash,' $(find bin -type f)
sed -i -e '1s,/usr/bin/perl,${perl}/bin/perl,' download.in bin/ooinstall bin/generate-bash-completion
echo "$distroFlags" > distro-configs/SUSE-11.1.conf.in
./configure --with-distro=SUSE-11.1 --with-system-libwpd --without-git --with-system-cairo \
--with-lang="${langsSpaces}"
--with-lang="${langsSpaces}" --with-tag=${tag} --without-split
'';
buildPhase = ''
@ -45,10 +73,13 @@ stdenv.mkDerivation rec {
# Needed to find genccode
PATH=$PATH:${icu}/sbin
# Take away a patch, that upstream already applied (3.2.0 specific)
sed -i -e 's,^connectivity-build-fix-mac.diff,#,' patches/dev300/apply
make build.prepare
set -x
pushd build/ooo3*-*/
pushd build/${tag}
# Fix svtools: hardcoded jpeg path
sed -i -e 's,^JPEG3RDLIB=.*,JPEG3RDLIB=${libjpeg}/lib/libjpeg.so,' solenv/inc/libs.mk
# Fix sysui: wants to create a tar for root
@ -61,6 +92,7 @@ stdenv.mkDerivation rec {
sed -i -e 's,^CONFIGURE_FLAGS.*,& --prefix='$TMPDIR, redland/redland/makefile.mk \
redland/raptor/makefile.mk redland/rasqal/makefile.mk
popd
set +x
make
'';

View file

@ -0,0 +1,42 @@
{fetchurl} : [
(fetchurl {
url = "http://download.go-oo.org/src//seamonkey-1.1.14.source.tar.gz";
sha256 = "0fb0pv2w8583q65ja5x8wh6ah6i3kwwq99s4v8cn99g91v8xn9hr";
})
(fetchurl {
url = "http://download.go-oo.org//DEV300/ooo-cli-prebuilt-3.2.tar.bz2";
sha256 = "1v55fl0n8zisn6gih99fn1c5vp6wl6cf0qh1nwlcx9ia76jnjj9k";
})
(fetchurl {
url = "http://archive.apache.org/dist/ant/binaries/apache-ant-1.7.0-bin.tar.gz";
sha256 = "1dnwzk1k8d5iinxsal3qskjagljx5ywwmwb4i6bymfmyr64qppn1";
})
(fetchurl {
url = "http://download.go-oo.org//SRC680/mdbtools-0.6pre1.tar.gz";
sha256 = "1lz33lmqifjszad7rl1r7rpxbziprrm5rkb27wmswyl5v98dqsbi";
})
(fetchurl {
url = "http://download.go-oo.org//SRC680/extras-3.tar.bz2";
sha256 = "1s6cz92b2amfn135l6a2hras4qrd04kw5yyqli7xmb8xqa0m3y3c";
})
(fetchurl {
url = "http://download.go-oo.org//SRC680/biblio.tar.bz2";
sha256 = "02v2xbq771zi09qw3k4zih95m1rjns4pwwpl51n0m34c0a00lhf0";
})
(fetchurl {
url = "http://tools.openoffice.org/unowinreg_prebuild/680//unowinreg.dll";
sha256 = "0g3529nr0nfhn3cygn8x931pqxnqq88nfc5h829xncr1j8ifaqzm";
})
(fetchurl {
url = "http://download.go-oo.org//SRC680/libwps-0.1.2.tar.gz";
sha256 = "1cdjmgpy0igrwlb5i1sm4s2yxvzbmqz6j7xnmmv3kpbx7z43zw78";
})
(fetchurl {
url = "http://download.go-oo.org//SRC680/libwpg-0.1.3.tar.gz";
sha256 = "1qv5qqycaqrm8arprwf3vyk76fm6v7qabpx5qq58knp1xm72z98r";
})
(fetchurl {
url = "http://download.go-oo.org//DEV300/ooo_oxygen_images-2009-06-17.tar.gz";
sha256 = "0jhgjhm63cmjr59nhvdln1szgm36v6kkazy2388l7z6xjjrhxk1z";
})
]

View file

@ -1,141 +0,0 @@
fetchurl:
[
(fetchurl {
url = "http://download.go-oo.org//DEV300/ooo-cli-prebuilt-3.2.tar.bz2";
sha256 = "1v55fl0n8zisn6gih99fn1c5vp6wl6cf0qh1nwlcx9ia76jnjj9k";
})
/*
(fetchurl {
url = "http://cairographics.org/releases//cairo-1.4.10.tar.gz";
sha256 = "0cji7shlnd3yg3939233p8imnrivykx4g39p3qr8r2a4c2k7hkjr";
})
*/
(fetchurl {
url = "http://download.go-oo.org//SRC680/mdbtools-0.6pre1.tar.gz";
sha256 = "1lz33lmqifjszad7rl1r7rpxbziprrm5rkb27wmswyl5v98dqsbi";
})
(fetchurl {
url = "http://cgit.freedesktop.org/ooo-build/artwork/snapshot/ooo/OOO320_m12.tar.bz2";
name = "ooo320-m12-artwork.tar.bz2";
sha256 = "1zfn1gjdbxychxb9xvfi9hchzqbp20f15nf06badgga5klllir8b";
})
(fetchurl {
url = "http://cgit.freedesktop.org/ooo-build/base/snapshot/ooo/OOO320_m12.tar.bz2";
name = "ooo320-m12-base.tar.bz2";
sha256 = "07gmicn9c2x16qzcfi0jh2z8mx0iz76vhskml7xkwv99vryy48im";
})
(fetchurl {
url = "http://cgit.freedesktop.org/ooo-build/bootstrap/snapshot/ooo/OOO320_m12.tar.bz2";
name = "ooo320-m12-bootstrap.tar.bz2";
sha256 = "070zmd25wysmf2rka07b8w02wkyxz7qa30kscd9b3pc8m0cgq0fl";
})
(fetchurl {
url = "http://cgit.freedesktop.org/ooo-build/calc/snapshot/ooo/OOO320_m12.tar.bz2";
name = "ooo320-m12-calc.tar.bz2";
sha256 = "0iwgmvffljmm1vbkjv36fq0riy7alk7r4gnfl5x9nrw7zic0xh29";
})
(fetchurl {
url = "http://cgit.freedesktop.org/ooo-build/components/snapshot/ooo/OOO320_m12.tar.bz2";
name = "ooo320-m12-components.tar.bz2";
sha256 = "19x6lhdbcazkicp4h3zs8sq7n9gc7z9c3xkx6266m15n2k4c8ms9";
})
(fetchurl {
url = "http://cgit.freedesktop.org/ooo-build/extras/snapshot/ooo/OOO320_m12.tar.bz2";
name = "ooo320-m12-extras.tar.bz2";
sha256 = "1lr8l0nxaqrhgcbb1vn08a8d4wzq032q2zl9a12dgjrnmgcx76s7";
})
(fetchurl {
url = "http://cgit.freedesktop.org/ooo-build/filters/snapshot/ooo/OOO320_m12.tar.bz2";
name = "ooo320-m12-filters.tar.bz2";
sha256 = "1p13w9gngc5wz40nhsx8igk8zygnwcacd3bgas3m2jv9ifazk9v3";
})
(fetchurl {
url = "http://cgit.freedesktop.org/ooo-build/help/snapshot/ooo/OOO320_m12.tar.bz2";
name = "ooo320-m12-help.tar.bz2";
sha256 = "0fqg8fpivgpyfqf0s085mjm09cmfzy684q1b58y62hg0f01wwr0k";
})
(fetchurl {
url = "http://cgit.freedesktop.org/ooo-build/impress/snapshot/ooo/OOO320_m12.tar.bz2";
name = "ooo320-m12-impress.tar.bz2";
sha256 = "1dhrdsak1jqydjfkylj6r7w1h886gbcn1g4wjh1kgkwk50bdamh5";
})
(fetchurl {
url = "http://cgit.freedesktop.org/ooo-build/libs-gui/snapshot/ooo/OOO320_m12.tar.bz2";
name = "ooo320-m12-libs-gui.tar.bz2";
sha256 = "0x5jf8bwzqkd76dpd7rh0fj1p4hmh8h9yshn8rfq6ss26bgwnmwr";
})
(fetchurl {
url = "http://cgit.freedesktop.org/ooo-build/libs-core/snapshot/ooo/OOO320_m12.tar.bz2";
name = "ooo320-m12-libs-core.tar.bz2";
sha256 = "1qaa1g9mrlpjv7fkv0c8qarbl162l99w0a92ydsj1lv86jg01xvx";
})
(fetchurl {
url = "http://cgit.freedesktop.org/ooo-build/libs-extern/snapshot/ooo/OOO320_m12.tar.bz2";
name = "ooo320-m12-libs-extern.tar.bz2";
sha256 = "0hxkba5yb1c09yyrqpw4llrr7xhpf5x08mnwgfdcfks690p1rzc9";
})
(fetchurl {
url = "http://cgit.freedesktop.org/ooo-build/postprocess/snapshot/ooo/OOO320_m12.tar.bz2";
name = "ooo320-m12-postprocess.tar.bz2";
sha256 = "1jkkxpc199y64a41y13s6ib6gyp6gas8gl4w95sx506xvj90qxi3";
})
(fetchurl {
url = "http://cgit.freedesktop.org/ooo-build/sdk/snapshot/ooo/OOO320_m12.tar.bz2";
name = "ooo320-m12-sdk.tar.bz2";
sha256 = "0211ak14sblmzswwa605q430gxxdjrqa5a2924r4lb1knrc9vlns";
})
(fetchurl {
url = "http://cgit.freedesktop.org/ooo-build/testing/snapshot/ooo/OOO320_m12.tar.bz2";
name = "ooo320-m12-testing.tar.bz2";
sha256 = "0i7bcxd791id2bbgnsakwnmr4xnzd5hdcydlnqx50mni5mcd13v1";
})
(fetchurl {
url = "http://cgit.freedesktop.org/ooo-build/ure/snapshot/ooo/OOO320_m12.tar.bz2";
name = "ooo320-m12-ure.tar.bz2";
sha256 = "16957l2npcbaizs29ly0xxfqaxinchnrvi720gggwhfp2mbl05ql";
})
(fetchurl {
url = "http://cgit.freedesktop.org/ooo-build/writer/snapshot/ooo/OOO320_m12.tar.bz2";
name = "ooo320-m12-writer.tar.bz2";
sha256 = "0lcdlwy2scs01glj8fi1q1ysmyvn7j70b91ciad3m32lrxmr8s67";
})
(fetchurl {
url = "http://cgit.freedesktop.org/ooo-build/libs-extern-sys/snapshot/ooo/OOO320_m12.tar.bz2";
name = "ooo320-m12-libs-extern-sys.tar.bz2";
sha256 = "0my3wh90xil3xpcjxi1q76v1bwi0rf62pzrf3pi3angd5y3hmysd";
})
(fetchurl {
url = "http://cgit.freedesktop.org/ooo-build/extensions/snapshot/ooo/OOO320_m12.tar.bz2";
name = "ooo320-m12-extensions.tar.bz2";
sha256 = "1qmyc2vb0n6fdl7p92cpvp972zm6ilafq5s5m21wgicqwfr34chv";
})
(fetchurl {
url = "http://download.go-oo.org//SRC680/extras-3.tar.bz2";
sha256 = "1s6cz92b2amfn135l6a2hras4qrd04kw5yyqli7xmb8xqa0m3y3c";
})
(fetchurl {
url = "http://download.go-oo.org//SRC680/biblio.tar.bz2";
sha256 = "02v2xbq771zi09qw3k4zih95m1rjns4pwwpl51n0m34c0a00lhf0";
})
(fetchurl {
url = "http://tools.openoffice.org/unowinreg_prebuild/680//unowinreg.dll";
sha256 = "0g3529nr0nfhn3cygn8x931pqxnqq88nfc5h829xncr1j8ifaqzm";
})
(fetchurl {
url = "http://cgit.freedesktop.org/ooo-build/l10n/snapshot/ooo/OOO320_m12.tar.bz2";
name = "ooo320-m12-l10n.tar.bz2";
sha256 = "0lknxxl0n4f383gxkljl1294zggfgaf2hbg3f6p4q6vr1byf3lww";
})
(fetchurl {
url = "http://download.go-oo.org//SRC680/libwps-0.1.2.tar.gz";
sha256 = "1cdjmgpy0igrwlb5i1sm4s2yxvzbmqz6j7xnmmv3kpbx7z43zw78";
})
(fetchurl {
url = "http://download.go-oo.org//SRC680/libwpg-0.1.3.tar.gz";
sha256 = "1qv5qqycaqrm8arprwf3vyk76fm6v7qabpx5qq58knp1xm72z98r";
})
(fetchurl {
url = "http://download.go-oo.org//DEV300/ooo_oxygen_images-2009-06-17.tar.gz";
sha256 = "0jhgjhm63cmjr59nhvdln1szgm36v6kkazy2388l7z6xjjrhxk1z";
})
]