Merge pull request #4829 from taku0/thunderbird-bin-31.2.0

thunderbird-bin: update script to uses sha1 from mozilla
This commit is contained in:
Arseniy Seroka 2014-11-04 16:52:08 +03:00
commit e6d8a87466
4 changed files with 170 additions and 333 deletions

View File

@ -1,8 +1,3 @@
# This file is generated from generate_nix.rb. DO NOT EDIT.
# Execute the following command in a temporary directory to update the file.
#
# ruby generate_nix.rb > default.nix
{ stdenv, fetchurl, config
, gconf
, alsaLib
@ -39,121 +34,10 @@
assert stdenv.isLinux;
let
version = "31.2.0";
sources = [
{ locale = "tr"; arch = "linux-i686"; sha256 = "02dc838606507040c73ddff4a1b60fec7d6e613aa08da2ce1c76e9c367bc29e5"; }
{ locale = "tr"; arch = "linux-x86_64"; sha256 = "a93243ab5b1d64a94bf10833d6b8985a65906d0be24bdcdd7b5babfb1d466bcd"; }
{ locale = "nl"; arch = "linux-i686"; sha256 = "d675da8358bf4ed519ee49dcc2c2162075b5e9e0fca244b474322a7614f535da"; }
{ locale = "nl"; arch = "linux-x86_64"; sha256 = "4e8f9e3f9fe851dc38deae42443cf884776e1d93abf34ce6963651a85afdc4a9"; }
{ locale = "he"; arch = "linux-i686"; sha256 = "8a769559e73abfdb610891a23538ef38df3852ffb39d02cba96e6a8ec914f94a"; }
{ locale = "he"; arch = "linux-x86_64"; sha256 = "e53b95914753b8640b69e104fbf5efb2fddcecc17eded23974c08274378105c2"; }
{ locale = "bg"; arch = "linux-i686"; sha256 = "60deb9deb678c9e5233d9c0146aa4fc8a74b9ba9b5be43ed8c5a452039b8307d"; }
{ locale = "bg"; arch = "linux-x86_64"; sha256 = "73e5c984d5d3fa17f93cb947fd63671fba66bab94117db84e187cb9260500101"; }
{ locale = "si"; arch = "linux-i686"; sha256 = "669d825940712d7f10c7303e3e0a0ed9c48e9e5c26b0c035ed58bf8694d5ddc3"; }
{ locale = "si"; arch = "linux-x86_64"; sha256 = "e60e048af0c965ac6f2adedb58e192d6d4208bf7f57dcef13b899da04ca14420"; }
{ locale = "zh-CN"; arch = "linux-i686"; sha256 = "f5f5b653e17b495c3cb4b1a26b39d3fdbeedb22c8d733cb2f3b6e57d46269949"; }
{ locale = "zh-CN"; arch = "linux-x86_64"; sha256 = "653cc18216f5fc156feef73170f903471480612a4de6df4efa3cce79b58fee28"; }
{ locale = "ro"; arch = "linux-i686"; sha256 = "5cc87c9c84c205f99dc3fa58be8fedd72b9afccb69c91616f11929e2a7e075fd"; }
{ locale = "ro"; arch = "linux-x86_64"; sha256 = "dc6e8f5dd30a7e2dcfebabfcc508de89cde3754c036811df7168f4f1e53c1477"; }
{ locale = "ast"; arch = "linux-i686"; sha256 = "653025d1260db10310f8d689cb4554acf7a6388a99bac977b6f59b683d7e5983"; }
{ locale = "ast"; arch = "linux-x86_64"; sha256 = "1a4623f94b4c68b6b89ec53c512f860388965dc36f2d06272341a194dc85eef6"; }
{ locale = "pl"; arch = "linux-i686"; sha256 = "0e0ae13028d5f65a54398c634ed5b4a6685e2dc84b05121e71a0c0ca7a04053e"; }
{ locale = "pl"; arch = "linux-x86_64"; sha256 = "2589909994cfa059d55a75b7d8f756c09f67994034f7f45c7b5b8805302645bf"; }
{ locale = "gl"; arch = "linux-i686"; sha256 = "155e79bad6226eb2231a08856415b5e4a15cb02235b0b17ff7c0378c38d2dc93"; }
{ locale = "gl"; arch = "linux-x86_64"; sha256 = "688d3c51645061fda283e2d486de1306f0b457149c82cbd20c7c019e76ed98b2"; }
{ locale = "ja"; arch = "linux-i686"; sha256 = "90b3bbc31046daada0ce995108fb9542aeb878220579836ed0e5b14088199795"; }
{ locale = "ja"; arch = "linux-x86_64"; sha256 = "ebd172d4a74ef757ceace8799c752e34fa0fb41dd5f4083d2aad2df4efd0329b"; }
{ locale = "ca"; arch = "linux-i686"; sha256 = "c1502e310fd4b0a682fef147b4f5a97db972ed49916012a145ce6d5c4afd6452"; }
{ locale = "ca"; arch = "linux-x86_64"; sha256 = "bac8bfe883d35f3624bae8cd4d831694a8e3f2b319a912ad5007e39483a22e70"; }
{ locale = "fr"; arch = "linux-i686"; sha256 = "d0315db23af439e736e02d93d2467c86fe2a186c849aef32e928adb5059fa7fd"; }
{ locale = "fr"; arch = "linux-x86_64"; sha256 = "8d5c5c4ac8865ee233ea10d2c4b153bb47cf4df4047dfae9aa7b5722c293e5cc"; }
{ locale = "fy-NL"; arch = "linux-i686"; sha256 = "9bbac5b2d4ada74e6cdc8730997d47043d319a79a61636322038584265001fed"; }
{ locale = "fy-NL"; arch = "linux-x86_64"; sha256 = "ac828318d8ce07332af73b3146f77825e51e8df8e858c0596589dbdfb2c8718f"; }
{ locale = "sl"; arch = "linux-i686"; sha256 = "16276607ffd4fa9fac4077cfc6da91ced5d5a4b08d804726d9d4b7e870cc25f2"; }
{ locale = "sl"; arch = "linux-x86_64"; sha256 = "7e1c2f2aaa973b7a19518c62beb43130d7fb95d4c5aecd3370d7ab2fb59f37c5"; }
{ locale = "be"; arch = "linux-i686"; sha256 = "48b27779e6ee95971d72a6be14e69ac1e724f5450126ad2627a9b2f0511b663c"; }
{ locale = "be"; arch = "linux-x86_64"; sha256 = "ebd551829f7a66b47a82cad5db79a27126719af71ada250dbaedf292077e9c8e"; }
{ locale = "ko"; arch = "linux-i686"; sha256 = "8f92e772ce7c54d6210c83fee257c9cc0b2a3542f41ac2059ea377c64d4f59ed"; }
{ locale = "ko"; arch = "linux-x86_64"; sha256 = "b2cec9901318ec0754e8caca2d56e6e4d08deb4aa21db7fb04c555062b84b9be"; }
{ locale = "hr"; arch = "linux-i686"; sha256 = "c5a1da56142398fc79b6d356d600f8228b0a4f1ac40d04df4ff5c25564b77a6f"; }
{ locale = "hr"; arch = "linux-x86_64"; sha256 = "5d0308e1c08960a26ac3328eb5be4c237e2320a38a6db077186f1d1a278feb8d"; }
{ locale = "nn-NO"; arch = "linux-i686"; sha256 = "d0abb5c4657a4a04999a44f96d00271e8dc3ad79ae0e78cf4b820fc2fd29b266"; }
{ locale = "nn-NO"; arch = "linux-x86_64"; sha256 = "fdde99be62fe6a911711e1ba69a2babcdba53216a5942494ab7e52cada8bf893"; }
{ locale = "vi"; arch = "linux-i686"; sha256 = "d0420a7ccd8f4fcd7f56497636baa701c71576d3b88440b609cbb3ebf245d4e4"; }
{ locale = "vi"; arch = "linux-x86_64"; sha256 = "5657eb2a99f7c2cf32297bbb45fab4c0eb2dd48ba4ba98487beed18aa5e85ada"; }
{ locale = "es-AR"; arch = "linux-i686"; sha256 = "fe60d3b13e964bd99730e8082b742729084e87f6a285deb8cd2383dccf881f1c"; }
{ locale = "es-AR"; arch = "linux-x86_64"; sha256 = "76faee1fd8da11731ece128832997de0f10501040921e6abb46fc0ae4922d568"; }
{ locale = "el"; arch = "linux-i686"; sha256 = "c1ad068c565abb7b3f16c843f6974fcec6f46714c3f9afb193d10ffa3773cbff"; }
{ locale = "el"; arch = "linux-x86_64"; sha256 = "b5cd4fb82525b67ef199b9eadaebe25f70a29e1dc43b2ad0f0074bf7d01a05f0"; }
{ locale = "is"; arch = "linux-i686"; sha256 = "195cb61263c4c01c345a5effcb5f4f6741a1ee10f716006a614d55721b013e48"; }
{ locale = "is"; arch = "linux-x86_64"; sha256 = "42447cb7c7689623a34607a0aa1a9866552756576932d45a4721c5fe8541070f"; }
{ locale = "ru"; arch = "linux-i686"; sha256 = "6c0f45046e4d1910a20e245f0b69af5b4fb2a9507abd99217bffe68bf213061e"; }
{ locale = "ru"; arch = "linux-x86_64"; sha256 = "408f3b38fc416cc12640af0928fbea1506eae3f4a65b6b3b889bca54bb0a1521"; }
{ locale = "pt-BR"; arch = "linux-i686"; sha256 = "330f4546fe50d717fc66b8417405d3c1eef8ca4f312b21563c426739eee4724a"; }
{ locale = "pt-BR"; arch = "linux-x86_64"; sha256 = "283d3e581ebb84059985aad40f72338a77b068e27b8247e0ac16b915ed16f797"; }
{ locale = "hy-AM"; arch = "linux-i686"; sha256 = "8068738dbfc0ed5f5a08b1b4a65a5e9e1ac780de43fc5f27c269dcd5e9998f97"; }
{ locale = "hy-AM"; arch = "linux-x86_64"; sha256 = "a101856b6151cae9d33a909d1a0fc11eb26439ca161db55dc262bf86bb457c29"; }
{ locale = "sk"; arch = "linux-i686"; sha256 = "5a790cc811d8e392daa83b11feb232092ab97dc8c9fc0bb47b4013751a30f76e"; }
{ locale = "sk"; arch = "linux-x86_64"; sha256 = "7842ceeab524c98387ca6319735bf7c331d34bcfde395078cc32c443e69962ef"; }
{ locale = "sr"; arch = "linux-i686"; sha256 = "06ded63a3d09af09ac68b318f79f07e924addb30d4c11903b6a86ba3ef476761"; }
{ locale = "sr"; arch = "linux-x86_64"; sha256 = "53a99f98398b2044866422ca44b496d489c0b78724f28afb4f919eca656d528a"; }
{ locale = "en-US"; arch = "linux-i686"; sha256 = "4c4da90f383d7b43e97e471656a6cfbbd44d1b80d57b8b2405497678aced46b5"; }
{ locale = "en-US"; arch = "linux-x86_64"; sha256 = "41ff22bc9a41aa0e71deebce4894e99f3e3737a57279a1488bf9d2f869cd56ad"; }
{ locale = "es-ES"; arch = "linux-i686"; sha256 = "e11451297f17febcf0057ae02dc15a298aacc865146e1aac363300dac6de57c5"; }
{ locale = "es-ES"; arch = "linux-x86_64"; sha256 = "0e5d389a2c5b673b423dd2afad375eb6a7e05c8eb0b07ceb4975d658827d6cf5"; }
{ locale = "gd"; arch = "linux-i686"; sha256 = "5fc40508e7a6228065084fc91431af3b9231c6ce46ae3e88ef249ad67bf1b545"; }
{ locale = "gd"; arch = "linux-x86_64"; sha256 = "ef365e27b05f4bd0c8211ed9e54ecfa4983111be74261303870a8d22e6093c08"; }
{ locale = "fi"; arch = "linux-i686"; sha256 = "9461f7d3953dc6aa5c9d2406331138a5e34d114eb5b48b09b562dade25a38ab7"; }
{ locale = "fi"; arch = "linux-x86_64"; sha256 = "6a0310cc0e0a5d9e1590c735e91e8c1bb85358687f4a6a59219de05bb0cf9d1d"; }
{ locale = "de"; arch = "linux-i686"; sha256 = "b4fd29c1bd06c5d6b85aeb6434746f1fa0af627c5795ce2ebc7d3dddcf78e9e6"; }
{ locale = "de"; arch = "linux-x86_64"; sha256 = "b24afec0b5de5e872848dfcd609f1cf81fe2eed96cc9ee1a5f17fd1b68750d34"; }
{ locale = "sq"; arch = "linux-i686"; sha256 = "a78274174c8c26426d9f7e85589f6143f47fab9ce8eb9bbb91fc6c9444c1470d"; }
{ locale = "sq"; arch = "linux-x86_64"; sha256 = "18c6ee5a732d777d9326593a4edfc30f11acdfef2397aa55c436d54a99de9c3a"; }
{ locale = "sv-SE"; arch = "linux-i686"; sha256 = "3e12328500db45ecfb4572c3cad8b75a46d930ec57a426c8fbe6dd8e033f3cfc"; }
{ locale = "sv-SE"; arch = "linux-x86_64"; sha256 = "a76f785c8c0b17f3962a94d4cee5bce9be7b91fd2805133f490ad516ba2d5ad8"; }
{ locale = "hu"; arch = "linux-i686"; sha256 = "72e1d888516119a6aa21d077fbe8faefc5cf13e8e422ae26aeed4416700f16af"; }
{ locale = "hu"; arch = "linux-x86_64"; sha256 = "962f0b046ab3f385348022d78ffffdae6137b351c5031453f62b5fa1dd44a9b3"; }
{ locale = "nb-NO"; arch = "linux-i686"; sha256 = "b5b11886e19a03e219bb803c7853bded9c5e4a2cde0a33abba4c0665a44ec8f4"; }
{ locale = "nb-NO"; arch = "linux-x86_64"; sha256 = "faa18298e02ecd0eca77f4e68e88ebb91ca8ea3abb6241f53d82e1db7db95076"; }
{ locale = "cs"; arch = "linux-i686"; sha256 = "03b23597d55f1db442f8147bcff7108e3b520e0b5d05d819df07915ba6baa35f"; }
{ locale = "cs"; arch = "linux-x86_64"; sha256 = "3dea9adb367958babb54dce3102d43d316088aa6140101d18a59cda20522d78f"; }
{ locale = "br"; arch = "linux-i686"; sha256 = "7b1814286847188ca68b3f24457b3a6ee5cd967833bf789104db0fedd2993941"; }
{ locale = "br"; arch = "linux-x86_64"; sha256 = "7605776d4a72d82fc65280df0cf9812f134a1dc790e0f60f089f287f38ed5db0"; }
{ locale = "pt-PT"; arch = "linux-i686"; sha256 = "da8177ab1912d5a0047dd2f6848a421c8fe32d39bacb64e76e0633ddaca5f4de"; }
{ locale = "pt-PT"; arch = "linux-x86_64"; sha256 = "60b1c2f1f209c5e16c6f29c0a5bcaf46c04bb2ae289925761193387ae65fe18d"; }
{ locale = "rm"; arch = "linux-i686"; sha256 = "29e073a8068f7d060cf2818d85d465df3f606aba95e867dc9aa67533d09e4b55"; }
{ locale = "rm"; arch = "linux-x86_64"; sha256 = "8d8ac419650a9cd0b138aa823dcfb67e47f8522a5d51625090c26c45a5c577a7"; }
{ locale = "lt"; arch = "linux-i686"; sha256 = "9d537ff70f06a5189296a99126a57ab8664266ec2da673671e60e97678d3ed9d"; }
{ locale = "lt"; arch = "linux-x86_64"; sha256 = "77f30fb2b94fa7cb690c5c0f2fff0ec89c1aa8f8915891d17a66357ddd10d462"; }
{ locale = "eu"; arch = "linux-i686"; sha256 = "1b613c1cf303a65c3065fc3edf15c6a051c1a7e347512e39cce425ef02828c3c"; }
{ locale = "eu"; arch = "linux-x86_64"; sha256 = "a02a04bc88efca8523b4af8e4962b205ad13d9eb9879405db57356966b12202b"; }
{ locale = "it"; arch = "linux-i686"; sha256 = "baede1707cca4ff149956884f855fa0077c372275f6be6f59d32e47cc6509b5b"; }
{ locale = "it"; arch = "linux-x86_64"; sha256 = "e49f0b02d323e2f83d0da2a5ec2e4585693362545e50bfba51e273d0edf52813"; }
{ locale = "id"; arch = "linux-i686"; sha256 = "31691ec0b51d19bdab2efe2ab1813bd3363e71ad62bc4f5a860e017516509ad5"; }
{ locale = "id"; arch = "linux-x86_64"; sha256 = "c6241fb8cd1d83ac5753518c2cc215ee831fa24b816a5a522029d14cea24b15b"; }
{ locale = "da"; arch = "linux-i686"; sha256 = "aa6c91c15ff9f1769d727883c17720a2732ede4b786c4bff7d42fe25c129246b"; }
{ locale = "da"; arch = "linux-x86_64"; sha256 = "b940f8ab5b2ad50faedc4520f4a7bd5936debfd70b2fa86b2abf955a22557b20"; }
{ locale = "ta-LK"; arch = "linux-i686"; sha256 = "cc70eb04cbab5bcd674e40c4d58760c07353726c968f766fc749fcd7154fddd9"; }
{ locale = "ta-LK"; arch = "linux-x86_64"; sha256 = "948172b68287b1cd8a1d7a32b3e7fd5494390aefea1683cbad34f12ba5d241a7"; }
{ locale = "uk"; arch = "linux-i686"; sha256 = "6b45d36abc8fe1c731baf855866000ffa08671d025ab97b5301b22079765d70c"; }
{ locale = "uk"; arch = "linux-x86_64"; sha256 = "9d619639157c645bc34628b7c31ccfb4e8223b891cf8e99118e7b767f7f5e24b"; }
{ locale = "zh-TW"; arch = "linux-i686"; sha256 = "a9176628228c3f3e07d2929caa872b4a24d9f620de79a148c01f0716c9dd058f"; }
{ locale = "zh-TW"; arch = "linux-x86_64"; sha256 = "f067e1f516d639b2cc997019a39b568d6377437d2d6810fb87d23a64e72995a0"; }
{ locale = "ar"; arch = "linux-i686"; sha256 = "7b016747c9e9066a8e4383303ee22e600d3b00716c53755c95067dc8b6267046"; }
{ locale = "ar"; arch = "linux-x86_64"; sha256 = "f798804c9aa0eb8fd9cde80acf8a2ebc3b4855588ff14092da935cd77bbc660a"; }
{ locale = "en-GB"; arch = "linux-i686"; sha256 = "7a19e07c52de321f8f182bd14fdaf137b120167d9d2ab4929476f7cf9a94a744"; }
{ locale = "en-GB"; arch = "linux-x86_64"; sha256 = "b66b2ff31cc778f52ce9e987f38a93f973c04dacbf04559b1872537a083cb98e"; }
{ locale = "ga-IE"; arch = "linux-i686"; sha256 = "7599ba2b65fcac92464c2ee480c4c823cd0f35661fa30982575e6f87069d3e58"; }
{ locale = "ga-IE"; arch = "linux-x86_64"; sha256 = "e81f157f75f2eb94f28dc7f2da5c1d0fbb8f8077c28c3afdb2144dd906ce773f"; }
{ locale = "bn-BD"; arch = "linux-i686"; sha256 = "bdcafd77469b70a8e02cacab63503e4ba085e3b4230e012313f743a130448cb1"; }
{ locale = "bn-BD"; arch = "linux-x86_64"; sha256 = "2f57c5353e75ec9dd56abf4c4f197af64648e3e2e927b7c868db6f664abb2e14"; }
{ locale = "pa-IN"; arch = "linux-i686"; sha256 = "f9d8a77df3e4718260e9235ce09008a224e02bde12efe5a88c9341432637f0c4"; }
{ locale = "pa-IN"; arch = "linux-x86_64"; sha256 = "46a4ae81ecd6fb22aed54a0ca40ddf292adc94b37b38a57e9ab64f5bed8b0a39"; }
{ locale = "et"; arch = "linux-i686"; sha256 = "f03136ad26eb1d5ead82e26e8620e3cd1b7f30ceb552329d008a33bcb2e930c4"; }
{ locale = "et"; arch = "linux-x86_64"; sha256 = "d2e446dea1db14210da9e1556614a92954c61ce00b24958ea4c2a61b597c0b13"; }
];
# imports `version` and `sources`
with (import ./sources.nix);
let
arch = if stdenv.system == "i686-linux"
then "linux-i686"
else "linux-x86_64";
@ -177,7 +61,7 @@ stdenv.mkDerivation {
src = fetchurl {
url = "http://download-installer.cdn.mozilla.net/pub/thunderbird/releases/${version}/${source.arch}/${source.locale}/thunderbird-${version}.tar.bz2";
inherit (source) sha256;
inherit (source) sha1;
};
phases = "unpackPhase installPhase";

View File

@ -1,213 +0,0 @@
version = if ARGV.empty?
"latest"
else
ARGV[0]
end
base_path = "download-installer.cdn.mozilla.net/pub/thunderbird/releases"
arches = ["linux-i686", "linux-x86_64"]
arches.each do |arch|
system("wget", "--recursive", "--continue", "--no-parent", "--reject-regex", ".*\\?.*", "--reject", "xpi", "http://#{base_path}/#{version}/#{arch}/")
end
locales = Dir.glob("#{base_path}/#{version}/#{arches[0]}/*").map do |path|
File.basename(path)
end
locales.delete("index.html")
locales.delete("xpi")
real_version = Dir.glob("#{base_path}/#{version}/#{arches[0]}/#{locales[0]}/thunderbird-*")[0].match(/thunderbird-([0-9.]*)/)[1][0..-2]
locale_arch_path_tuples = locales.flat_map do |locale|
arches.map do |arch|
path = Dir.glob("#{base_path}/#{version}/#{arch}/#{locale}/thunderbird-*")[0]
[locale, arch, path]
end
end
paths = locale_arch_path_tuples.map do |tuple| tuple[2] end
hashes = IO.popen(["sha256sum", "--binary", *paths]) do |input|
input.each_line.map do |line|
$stderr.puts(line)
line.match(/^[0-9a-f]*/)[0]
end
end
puts(<<"EOH")
# This file is generated from generate_nix.rb. DO NOT EDIT.
# Execute the following command in a temporary directory to update the file.
#
# ruby generate_nix.rb > default.nix
{ stdenv, fetchurl, config
, gconf
, alsaLib
, at_spi2_atk
, atk
, cairo
, cups
, curl
, dbus_glib
, dbus_libs
, fontconfig
, freetype
, gdk_pixbuf
, glib
, glibc
, gst_plugins_base
, gstreamer
, gtk
, kerberos
, libX11
, libXScrnSaver
, libXext
, libXinerama
, libXrender
, libXt
, libcanberra
, libgnome
, libgnomeui
, mesa
, nspr
, nss
, pango
}:
assert stdenv.isLinux;
let
version = "#{real_version}";
sources = [
EOH
locale_arch_path_tuples.zip(hashes) do |tuple, hash|
locale, arch, path = tuple
puts(%Q| { locale = "#{locale}"; arch = "#{arch}"; sha256 = "#{hash}"; }|)
end
puts(<<'EOF')
];
arch = if stdenv.system == "i686-linux"
then "linux-i686"
else "linux-x86_64";
isPrefixOf = prefix: string:
builtins.substring 0 (builtins.stringLength prefix) string == prefix;
sourceMatches = locale: source:
(isPrefixOf source.locale locale) && source.arch == arch;
systemLocale = config.i18n.defaultLocale or "en-US";
defaultSource = stdenv.lib.findFirst (sourceMatches "en-US") {} sources;
source = stdenv.lib.findFirst (sourceMatches systemLocale) defaultSource sources;
in
stdenv.mkDerivation {
name = "thunderbird-bin-${version}";
src = fetchurl {
url = "http://download-installer.cdn.mozilla.net/pub/thunderbird/releases/${version}/${source.arch}/${source.locale}/thunderbird-${version}.tar.bz2";
inherit (source) sha256;
};
phases = "unpackPhase installPhase";
libPath = stdenv.lib.makeLibraryPath
[ stdenv.gcc.gcc
gconf
alsaLib
at_spi2_atk
atk
cairo
cups
curl
dbus_glib
dbus_libs
fontconfig
freetype
gdk_pixbuf
glib
glibc
gst_plugins_base
gstreamer
gtk
kerberos
libX11
libXScrnSaver
libXext
libXinerama
libXrender
libXt
libcanberra
libgnome
libgnomeui
mesa
nspr
nss
pango
] + ":" + stdenv.lib.makeSearchPath "lib64" [
stdenv.gcc.gcc
];
installPhase =
''
mkdir -p "$prefix/usr/lib/thunderbird-bin-${version}"
cp -r * "$prefix/usr/lib/thunderbird-bin-${version}"
mkdir -p "$out/bin"
ln -s "$prefix/usr/lib/thunderbird-bin-${version}/thunderbird" "$out/bin/"
for executable in \
thunderbird mozilla-xremote-client thunderbird-bin plugin-container \
updater
do
patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
"$out/usr/lib/thunderbird-bin-${version}/$executable"
done
for executable in \
thunderbird mozilla-xremote-client thunderbird-bin plugin-container \
updater libxul.so
do
patchelf --set-rpath "$libPath" \
"$out/usr/lib/thunderbird-bin-${version}/$executable"
done
# Create a desktop item.
mkdir -p $out/share/applications
cat > $out/share/applications/thunderbird.desktop <<EOF
[Desktop Entry]
Type=Application
Exec=$out/bin/thunderbird
Icon=$out/lib/thunderbird-bin-${version}/chrome/icons/default/default256.png
Name=Thunderbird
GenericName=Mail Reader
Categories=Application;Network;
EOF
'';
meta = with stdenv.lib; {
description = "Mozilla Thunderbird, a full-featured email client";
homepage = http://www.mozilla.org/thunderbird/;
license = {
shortName = "unfree"; # not sure
fullName = "unfree";
url = http://www.mozilla.org/en-US/foundation/trademarks/policy/;
};
maintainers = with stdenv.lib.maintainers; [ fuuzetsu ];
platforms = platforms.linux;
};
}
EOF

View File

@ -0,0 +1,46 @@
require "open-uri"
version = if ARGV.empty?
"latest"
else
ARGV[0]
end
base_path = "http://download-installer.cdn.mozilla.net/pub/thunderbird/releases"
Source = Struct.new(:hash, :arch, :locale, :filename)
sources = open("#{base_path}/#{version}/SHA1SUMS") do |input|
input.readlines
end.select do |line|
/\/thunderbird-.*\.tar\.bz2$/ === line && !(/source/ === line)
end.map do |line|
hash, name = line.chomp.split(/ +/)
Source.new(hash, *(name.split("/")))
end.sort_by do |source|
[source.locale, source.arch]
end
real_version = sources[0].filename.match(/thunderbird-([0-9.]*)\.tar\.bz2/)[1]
arches = ["linux-i686", "linux-x86_64"]
puts(<<"EOH")
# This file is generated from generate_nix.rb. DO NOT EDIT.
# Execute the following command in a temporary directory to update the file.
#
# ruby generate_source.rb > source.nix
{
version = "#{real_version}";
sources = [
EOH
sources.each do |source|
puts(%Q| { locale = "#{source.locale}"; arch = "#{source.arch}"; sha1 = "#{source.hash}"; }|)
end
puts(<<'EOF')
];
}
EOF

View File

@ -0,0 +1,120 @@
# This file is generated from generate_nix.rb. DO NOT EDIT.
# Execute the following command in a temporary directory to update the file.
#
# ruby generate_source.rb > source.nix
{
version = "31.2.0";
sources = [
{ locale = "ar"; arch = "linux-i686"; sha1 = "d56d0a2590e04fca857f5083be846b8de73a138c"; }
{ locale = "ar"; arch = "linux-x86_64"; sha1 = "8e6f0280225e71859cedf72307e12179e71b2bca"; }
{ locale = "ast"; arch = "linux-i686"; sha1 = "ca2544e5b09b065df8763e8c803856a3313c12b7"; }
{ locale = "ast"; arch = "linux-x86_64"; sha1 = "71487e868e4a2a87fc2f1550c3c6959016cf4de4"; }
{ locale = "be"; arch = "linux-i686"; sha1 = "1620d97545765499b37eb05d04bf6d9ee1470544"; }
{ locale = "be"; arch = "linux-x86_64"; sha1 = "1aebaef6d0e05c6e8ca0d7673b5ab7d9123305ed"; }
{ locale = "bg"; arch = "linux-i686"; sha1 = "af62f41d3abb604ea4c9bd7ef297eaa28f65e00c"; }
{ locale = "bg"; arch = "linux-x86_64"; sha1 = "d67bba94639d967e65328fb989696e4e461a0bd3"; }
{ locale = "bn-BD"; arch = "linux-i686"; sha1 = "7d7180ab9fdb0694ea93842f79411038f576c3a9"; }
{ locale = "bn-BD"; arch = "linux-x86_64"; sha1 = "4794ee971d932272ac809e2cdf432de5f38e0073"; }
{ locale = "br"; arch = "linux-i686"; sha1 = "533b40426ca2ad796ffe8ce45051701c27c179be"; }
{ locale = "br"; arch = "linux-x86_64"; sha1 = "921b1d5a09a3ee282dead4762176eade35a18270"; }
{ locale = "ca"; arch = "linux-i686"; sha1 = "01858a6bd869dd5060899af428924c3e5d700ee6"; }
{ locale = "ca"; arch = "linux-x86_64"; sha1 = "1d64573818675c956b4b61b5501b1c2420dfd894"; }
{ locale = "cs"; arch = "linux-i686"; sha1 = "582dacac45ba886232cc0e9b2757996af1c61fd6"; }
{ locale = "cs"; arch = "linux-x86_64"; sha1 = "6dc0aa493e90c1c24b2cb3c323a4778413371486"; }
{ locale = "da"; arch = "linux-i686"; sha1 = "c64e7c50015d4cd633695f98715b6082f23bfb5f"; }
{ locale = "da"; arch = "linux-x86_64"; sha1 = "10bc1b1758a1cc53fb9503d8ae02c92e640bfb13"; }
{ locale = "de"; arch = "linux-i686"; sha1 = "69be28626ef89fba20b568cc026786c82a6a3dd6"; }
{ locale = "de"; arch = "linux-x86_64"; sha1 = "4d43592b2b28241c3e95c089f52b5adfb6c60d80"; }
{ locale = "el"; arch = "linux-i686"; sha1 = "881a8a8021ee63ed0d62c594bee464532b2d63f9"; }
{ locale = "el"; arch = "linux-x86_64"; sha1 = "53a30b91a9391e673537ba23ab194573bb40535f"; }
{ locale = "en-GB"; arch = "linux-i686"; sha1 = "acc98d20faccfcbaaff944957b334598faf73351"; }
{ locale = "en-GB"; arch = "linux-x86_64"; sha1 = "01ba64dc0228f17c3afc86559a541bc1fd71646a"; }
{ locale = "en-US"; arch = "linux-i686"; sha1 = "fb035b98358fd697e31162f639a5f01d1f43490b"; }
{ locale = "en-US"; arch = "linux-x86_64"; sha1 = "26be2c2f908054dc3c8b3d53bfe3a840aae56428"; }
{ locale = "es-AR"; arch = "linux-i686"; sha1 = "10049cd0188485a6ab61519402fa74d62e9cab2b"; }
{ locale = "es-AR"; arch = "linux-x86_64"; sha1 = "f579cd0579ff249dc100658cc0e7e6677a28976d"; }
{ locale = "es-ES"; arch = "linux-i686"; sha1 = "fb9174c60d66141fdf568c92259b02579e70e9fe"; }
{ locale = "es-ES"; arch = "linux-x86_64"; sha1 = "8f0f216d81badf5bffd976c0472d9f1318672e48"; }
{ locale = "et"; arch = "linux-i686"; sha1 = "052477b4febfb97d446976d81453289850a61aa3"; }
{ locale = "et"; arch = "linux-x86_64"; sha1 = "6a6341649624e9932714d32d750501e71dbb3106"; }
{ locale = "eu"; arch = "linux-i686"; sha1 = "effe11b4ab62a11c110e0edfd9b46c5c8f259133"; }
{ locale = "eu"; arch = "linux-x86_64"; sha1 = "5152d64bf47f7b92a1e33b42ba1b48596f7069d8"; }
{ locale = "fi"; arch = "linux-i686"; sha1 = "6b3019504e9a97db8eae5a35c2b963ebdca144ed"; }
{ locale = "fi"; arch = "linux-x86_64"; sha1 = "a44a93c9c727ecb64f6f83a3fa6c66fc0f1a1153"; }
{ locale = "fr"; arch = "linux-i686"; sha1 = "31c96279136afe886465eae51b6f32d3f13e53bb"; }
{ locale = "fr"; arch = "linux-x86_64"; sha1 = "c2923291007f5480d2913d6093b38233939f089a"; }
{ locale = "fy-NL"; arch = "linux-i686"; sha1 = "00425ba7a789dca73ad5cb3a65bc08040f1a8d2f"; }
{ locale = "fy-NL"; arch = "linux-x86_64"; sha1 = "a462db5d04e8ad7c3840912b8445041391d01973"; }
{ locale = "ga-IE"; arch = "linux-i686"; sha1 = "2158427e0f838e958d40a1d3b6a4e50127ac00ea"; }
{ locale = "ga-IE"; arch = "linux-x86_64"; sha1 = "2390c016ee8b52cf927e4f9cb74b20d65fe06de3"; }
{ locale = "gd"; arch = "linux-i686"; sha1 = "d7e2675b58ff68bff21fb9d0ce0643073df4e491"; }
{ locale = "gd"; arch = "linux-x86_64"; sha1 = "ba01c8483e05a4b612443c8172737d901f665666"; }
{ locale = "gl"; arch = "linux-i686"; sha1 = "9e2895f43b978304e42ec714b01857f494cea265"; }
{ locale = "gl"; arch = "linux-x86_64"; sha1 = "c1cf1ee118b1133f8df6314a2aa8e83be14b4d5b"; }
{ locale = "he"; arch = "linux-i686"; sha1 = "a0a872333657bccb342a086a576f273fd34a2d21"; }
{ locale = "he"; arch = "linux-x86_64"; sha1 = "6ceb775435b2ed0a14f11c096b595361baf6282d"; }
{ locale = "hr"; arch = "linux-i686"; sha1 = "8975da24b95de228584cd5c8ab8c6d174f0fcd60"; }
{ locale = "hr"; arch = "linux-x86_64"; sha1 = "23467c23408408c878afe00244bf4779b1eead03"; }
{ locale = "hu"; arch = "linux-i686"; sha1 = "690b220b01a1bcd683409fca76d50a507e09241e"; }
{ locale = "hu"; arch = "linux-x86_64"; sha1 = "99ff74aab54f05295199edcb0e06b0fc68bff234"; }
{ locale = "hy-AM"; arch = "linux-i686"; sha1 = "ed490aa96fce3e61c61ea60f7353edc06fffb5ce"; }
{ locale = "hy-AM"; arch = "linux-x86_64"; sha1 = "f907190eedbcca43e830f632416a0cfd4df9c77e"; }
{ locale = "id"; arch = "linux-i686"; sha1 = "3e328a1dd6c29f38913171aae8939f636eb9c845"; }
{ locale = "id"; arch = "linux-x86_64"; sha1 = "ed074968abf7fb207c747c88a21d1f5834228445"; }
{ locale = "is"; arch = "linux-i686"; sha1 = "2da9b0ade06b20c19a90eb192c85e17ed96487b1"; }
{ locale = "is"; arch = "linux-x86_64"; sha1 = "7eefd8c52f95ed4c011ec1b95b4b7b1237801cdd"; }
{ locale = "it"; arch = "linux-i686"; sha1 = "c46a316fe393dd2353802e488a31b55699ee8d62"; }
{ locale = "it"; arch = "linux-x86_64"; sha1 = "3e13de5f40f71455a1bf2e562c0ea07833ed28a6"; }
{ locale = "ja"; arch = "linux-i686"; sha1 = "1a3e904090d6786f23b88cd91afa2f34fc732c70"; }
{ locale = "ja"; arch = "linux-x86_64"; sha1 = "8b8259bb4cbd30bc0e7aff95585d3f29e9bdd566"; }
{ locale = "ko"; arch = "linux-i686"; sha1 = "af8db8f0a4329babec9ede706ce36e0f5dcc714e"; }
{ locale = "ko"; arch = "linux-x86_64"; sha1 = "0397e824b2f2158b0862fe2ac7d192bc8c2c0a8b"; }
{ locale = "lt"; arch = "linux-i686"; sha1 = "b53dae618889ef676053154517b69c05f0051ffe"; }
{ locale = "lt"; arch = "linux-x86_64"; sha1 = "cb82a5027aecb830197b764c86452a008da5f55f"; }
{ locale = "nb-NO"; arch = "linux-i686"; sha1 = "7cca3934255d4f73f35fff9ef90e0c2ea48e856b"; }
{ locale = "nb-NO"; arch = "linux-x86_64"; sha1 = "4b86d7723efd32be9722012e17ca0d49560fe22a"; }
{ locale = "nl"; arch = "linux-i686"; sha1 = "dc7430d675f88aa0f7e4b78fa93572305ed97222"; }
{ locale = "nl"; arch = "linux-x86_64"; sha1 = "e9e9f7ed4308d496bb6490ac252f236bcd659bda"; }
{ locale = "nn-NO"; arch = "linux-i686"; sha1 = "5a5f40de1986de090a59205446ce5918910c2ae1"; }
{ locale = "nn-NO"; arch = "linux-x86_64"; sha1 = "649eea7ff3be8b2d8cb0fa9df623e8f38117132d"; }
{ locale = "pa-IN"; arch = "linux-i686"; sha1 = "5255472c604dd97b44433ab76c34d4e6c1e44d17"; }
{ locale = "pa-IN"; arch = "linux-x86_64"; sha1 = "8a1e3a0ec2400a43b41856fb111e86392d29a1fe"; }
{ locale = "pl"; arch = "linux-i686"; sha1 = "b279dbd5bfe1e45ac65891b6632461c8f76ac9b0"; }
{ locale = "pl"; arch = "linux-x86_64"; sha1 = "46b827110e9bb188075fa58088b2bec1a2762609"; }
{ locale = "pt-BR"; arch = "linux-i686"; sha1 = "f2bcec6668773a907368d9d04cc3fb018992637c"; }
{ locale = "pt-BR"; arch = "linux-x86_64"; sha1 = "f91868c8678862da540e7e7ba9fc1ae1756de0db"; }
{ locale = "pt-PT"; arch = "linux-i686"; sha1 = "4f62468a76e73b98f85bc13c48ad0e9c62cded36"; }
{ locale = "pt-PT"; arch = "linux-x86_64"; sha1 = "a3647ab9b35f22e6ca6b0f943321f40c4376659f"; }
{ locale = "rm"; arch = "linux-i686"; sha1 = "fb0af4d895b50cbb20fa049c83c0f47f8cf494d4"; }
{ locale = "rm"; arch = "linux-x86_64"; sha1 = "49501a9a00349a2db0be269831b76021f5a4d116"; }
{ locale = "ro"; arch = "linux-i686"; sha1 = "4b03ae9f43f6b1c473fe170fae4141a1aa2898d5"; }
{ locale = "ro"; arch = "linux-x86_64"; sha1 = "0e0dc3b8836696b5453cef65c343b77c42df0e7a"; }
{ locale = "ru"; arch = "linux-i686"; sha1 = "35c31b019b2c97f534f8ca33dcfb00503c712704"; }
{ locale = "ru"; arch = "linux-x86_64"; sha1 = "814eb4985e17a88af793e1e9dd657fd9b9a32822"; }
{ locale = "si"; arch = "linux-i686"; sha1 = "f700ffb1ce581fc19f4abbaa9139d4be904bace4"; }
{ locale = "si"; arch = "linux-x86_64"; sha1 = "bd772880dac1bee8208dbf6a3e1a244af2d884aa"; }
{ locale = "sk"; arch = "linux-i686"; sha1 = "6ff95241e3feab5c003a0dc9020ab089d0286f0e"; }
{ locale = "sk"; arch = "linux-x86_64"; sha1 = "7dfb864346fd853d83d910d98e1e530f049372d6"; }
{ locale = "sl"; arch = "linux-i686"; sha1 = "f9f824a578f77c13a8e39c9c5e756de8e05255cb"; }
{ locale = "sl"; arch = "linux-x86_64"; sha1 = "32e1e3983f0ea5e972f82d3c0f4663386f8da991"; }
{ locale = "sq"; arch = "linux-i686"; sha1 = "5b04196a291058c7c68485a245d73d01a2adfc27"; }
{ locale = "sq"; arch = "linux-x86_64"; sha1 = "1860030149e4568e8b24922dbed0673bc72aa7a2"; }
{ locale = "sr"; arch = "linux-i686"; sha1 = "c88e8d47f4078cb06600c4b6128b3d7a62239608"; }
{ locale = "sr"; arch = "linux-x86_64"; sha1 = "195c76ce3b8cbc4d8a6cfb015116bbf57ffbed7e"; }
{ locale = "sv-SE"; arch = "linux-i686"; sha1 = "d19cfcfce1118693c0dee00dc8dbdc657932e817"; }
{ locale = "sv-SE"; arch = "linux-x86_64"; sha1 = "92a1bd6764eef68e537c45c77b893da55ba910bc"; }
{ locale = "ta-LK"; arch = "linux-i686"; sha1 = "4bf45f785006cf30305d11aedf00d0038995e7e2"; }
{ locale = "ta-LK"; arch = "linux-x86_64"; sha1 = "30be2773e6922e6abc4af33cca35964425059fca"; }
{ locale = "tr"; arch = "linux-i686"; sha1 = "3a7de4dbed32a7d7b0faa20246f2ffc07ab31b44"; }
{ locale = "tr"; arch = "linux-x86_64"; sha1 = "d64aea1cdf318d08321681f70ff22d7f80ae9e4e"; }
{ locale = "uk"; arch = "linux-i686"; sha1 = "48d3a17e0b24c55e1fe3b73b019365e38653b187"; }
{ locale = "uk"; arch = "linux-x86_64"; sha1 = "ba89e2038eac2e8ad34ac4296feda8c62f170143"; }
{ locale = "vi"; arch = "linux-i686"; sha1 = "06ebf22992bc3890df6fae5955bb9791b9bb1339"; }
{ locale = "vi"; arch = "linux-x86_64"; sha1 = "3e5d8b660e799eeeb37bb5b0fbf86d4d44fa31ba"; }
{ locale = "zh-CN"; arch = "linux-i686"; sha1 = "5a697d19c7890f600697dea64aa5ecff8ef0e5a1"; }
{ locale = "zh-CN"; arch = "linux-x86_64"; sha1 = "3226435da70e0aae98eaee1fb1c9a87af7167403"; }
{ locale = "zh-TW"; arch = "linux-i686"; sha1 = "53a2c162f9186dca91cc35f5298285f4f9da7a55"; }
{ locale = "zh-TW"; arch = "linux-x86_64"; sha1 = "12cdf96a7cc3ea40cd9542d8a7d16827116e65d7"; }
];
}