Merge pull request #50484 from taku0/firefox-bin-63.0.3

firefox, firefox-bin: 63.0.1 -> 63.0.3
This commit is contained in:
Michael Raskin 2018-11-17 16:54:35 +00:00 committed by GitHub
commit 355aa4e9ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 412 additions and 411 deletions

View file

@ -14,22 +14,14 @@ rec {
firefox = common rec {
pname = "firefox";
ffversion = "63.0.1";
ffversion = "63.0.3";
src = fetchurl {
url = "mirror://mozilla/firefox/releases/${ffversion}/source/firefox-${ffversion}.source.tar.xz";
sha512 = "29acad70259d71a924cbaf4c2f01fb034cf8090759b3a2d74a5eabc2823f83b6508434e619d8501d3930702e2bbad373581a70e2ce57aead9af77fc42766fbe2";
sha512 = "319bdkvk1r53i8l9ilz9ffllp2yxn02glhjsf26bqchw0c4ym8y6d62j1g7s55lddzqka3kcsmzba0k8wna1aw3pydf7v84nyhaw1bc";
};
patches = nixpkgsPatches ++ [
./no-buildconfig.patch
# this is only required for version 63.0, version 63.0.3 onwards will
# carry the patch
# bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=1503401
(fetchpatch {
name = "fix-rust-cbindgen-breaking-change.patch";
url = "https://hg.mozilla.org/releases/mozilla-release/raw-rev/22273af49058";
sha256 = "1kvswbr1jxigli6s5jh3cr21153jx6mlyxf4a39510y3dg19ls0a";
})
];
extraNativeBuildInputs = [ python3 ];
@ -43,6 +35,7 @@ rec {
};
updateScript = callPackage ./update.nix {
attrPath = "firefox-unwrapped";
versionKey = "ffversion";
};
};
@ -67,6 +60,7 @@ rec {
updateScript = callPackage ./update.nix {
attrPath = "firefox-esr-52-unwrapped";
ffversionSuffix = "esr";
versionKey = "ffversion";
};
};
@ -92,6 +86,7 @@ rec {
updateScript = callPackage ./update.nix {
attrPath = "firefox-esr-60-unwrapped";
versionSuffix = "esr";
versionKey = "ffversion";
};
};

View file

@ -9,6 +9,7 @@
, attrPath
, baseUrl ? "http://archive.mozilla.org/pub/firefox/releases/"
, versionSuffix ? ""
, versionKey ? "version"
}:
writeScript "update-${attrPath}" ''
@ -28,5 +29,5 @@ writeScript "update-${attrPath}" ''
sort --version-sort | \
tail -n 1`
update-source-version ${attrPath} "$version"
update-source-version ${attrPath} "$version" "" "" ${versionKey}
''

View file

@ -6,11 +6,16 @@ die() {
exit 1
}
# Usage: update-source-hash <attr> <version> [<new-source-hash>] [<new-source-url>]
# Usage: update-source-hash <attr> <version> [<new-source-hash>] [<new-source-url>] [<version-key>]
attr=$1
newVersion=$2
newHash=$3
newUrl=$4
versionKey=$5
if [ -z "$versionKey" ]; then
versionKey=version
fi
nixFile=$(nix-instantiate --eval --strict -A "$attr.meta.position" | sed -re 's/^"(.*):[0-9]+"$/\1/')
if [ ! -f "$nixFile" ]; then
@ -50,8 +55,8 @@ fi
oldVersion=$(echo "$oldVersion" | sed -re 's|[.+]|\\&|g')
oldUrl=$(echo "$oldUrl" | sed -re 's|[${}.+]|\\&|g')
if [ $(grep -c -E "^\s*(let\b)?\s*version\s*=\s*\"$oldVersion\"" "$nixFile") = 1 ]; then
pattern="/\bversion\b\s*=/ s|\"$oldVersion\"|\"$newVersion\"|"
if [ $(grep -c -E "^\s*(let\b)?\s*$versionKey\s*=\s*\"$oldVersion\"" "$nixFile") = 1 ]; then
pattern="/\b$versionKey\b\s*=/ s|\"$oldVersion\"|\"$newVersion\"|"
elif [ $(grep -c -E "^\s*(let\b)?\s*name\s*=\s*\"[^\"]+-$oldVersion\"" "$nixFile") = 1 ]; then
pattern="/\bname\b\s*=/ s|-$oldVersion\"|-$newVersion\"|"
else