3
0
Fork 0
forked from mirrors/nixpkgs

zotero: remove esr suffix from version string.

Also escaped the perl regexes since that will become an error in the future.
This commit is contained in:
Edward Tjörnhammar 2016-09-04 20:42:32 +02:00
parent 4dfafbc0c3
commit 9b31fcf8c0
No known key found for this signature in database
GPG key ID: 7B82CE4A866B6845

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, bash, firefox, perl, unzipNLS, xorg }:
{ stdenv, fetchurl, lib, bash, firefox, perl, unzipNLS, xorg }:
let
@ -30,7 +30,7 @@ stdenv.mkDerivation {
unzip "${xpi}" -d "$out/libexec/zotero"
BUILDID=`date +%Y%m%d`
GECKO_VERSION="${firefox.passthru.version}"
GECKO_VERSION="${lib.removeSuffix "esr" firefox.passthru.version}"
UPDATE_CHANNEL="default"
# Copy branding
@ -52,8 +52,8 @@ stdenv.mkDerivation {
# Copy application.ini and modify
cp assets/application.ini "$out/libexec/zotero/application.ini"
perl -pi -e "s/{{VERSION}}/$version/" "$out/libexec/zotero/application.ini"
perl -pi -e "s/{{BUILDID}}/$BUILDID/" "$out/libexec/zotero/application.ini"
perl -pi -e "s/\{\{VERSION}}/$version/" "$out/libexec/zotero/application.ini"
perl -pi -e "s/\{\{BUILDID}}/$BUILDID/" "$out/libexec/zotero/application.ini"
perl -pi -e "s/^MaxVersion.*\$/MaxVersion=$GECKO_VERSION/" "$out/libexec/zotero/application.ini"
# Copy prefs.js and modify