Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 40d641486329
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 08b1bc9fcb72
Choose a head ref
  • 3 commits
  • 7 files changed
  • 1 contributor

Commits on Sep 17, 2017

  1. Copy the full SHA
    44db65d View commit details
  2. cppunit: 1.14.0

    7c6f434c committed Sep 17, 2017
    Copy the full SHA
    02f439d View commit details
  3. 1
    Copy the full SHA
    08b1bc9 View commit details
4 changes: 2 additions & 2 deletions pkgs/applications/office/libreoffice/default-primary-src.nix
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

rec {
major = "5";
minor = "3";
minor = "4";
patch = "1";
tweak = "2";

@@ -12,6 +12,6 @@ rec {

src = fetchurl {
url = "http://download.documentfoundation.org/libreoffice/src/${subdir}/libreoffice-${version}.tar.xz";
sha256 = "1zsl0z0i8pw532x2lmwd64ms6igibkkjhwf01zmm2kpnr9ycsijp";
sha256 = "0c17193vcf4nj8l5k9q87byv27px74kzp0hvgr1dfz5700cv086k";
};
}
24 changes: 15 additions & 9 deletions pkgs/applications/office/libreoffice/default.nix
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@
, libatomic_ops, graphite2, harfbuzz, libodfgen, libzmf
, librevenge, libe-book, libmwaw, glm, glew, gst_all_1
, gdb, commonsLogging, librdf_rasqal, makeWrapper, gsettings_desktop_schemas
, defaultIconTheme, glib, ncurses
, defaultIconTheme, glib, ncurses, xmlsec, epoxy, gpgme
, langs ? [ "en-US" "en-GB" "ca" "ru" "eo" "fr" "nl" "de" "sl" "pl" "hu" ]
, withHelp ? true
, kdeIntegration ? false
@@ -42,14 +42,14 @@ let

translations = fetchSrc {
name = "translations";
sha256 = "1r386qkfmlq7p1zly4xl0s0shp1d3rq9hwm1403ap22qpgrcgqyb";
sha256 = "1ir1f5jgjhpnxsw6izsryp4wg52ifzmcqyc0gdp9zh03rjf5i4cg";
};

# TODO: dictionaries

help = fetchSrc {
name = "help";
sha256 = "03n2lj6zhjg585zq9z458mj29dshni25p1v959a2z1xa3jzwfjfz";
sha256 = "1apgc57a8q6lsjfq2f7pzdn7wanqm8zkkrkbq2nd4hidp6avgm6f";
};

};
@@ -65,14 +65,15 @@ in stdenv.mkDerivation rec {

# For some reason librdf_redland sometimes refers to rasqal.h instead
# of rasqal/rasqal.h
NIX_CFLAGS_COMPILE="-I${librdf_rasqal}/include/rasqal";
# And LO refers to gpgme++ by no-path name
NIX_CFLAGS_COMPILE="-I${librdf_rasqal}/include/rasqal -I${gpgme.dev}/include/gpgme++";

# If we call 'configure', 'make' will then call configure again without parameters.
# It's their system.
configureScript = "./autogen.sh";
dontUseCmakeConfigure = true;

patches = [ ./xdg-open.patch ];
patches = [ ./xdg-open-brief.patch ];

postUnpack = ''
mkdir -v $sourceRoot/src
@@ -82,6 +83,10 @@ in stdenv.mkDerivation rec {
ln -svf ${srcs.translations} $sourceRoot/src/${srcs.translations.name}
'';

postPatch = ''
sed -e 's@/usr/bin/xdg-open@xdg-open@g' -i shell/source/unix/exec/shellexec.cxx
'';

QT4DIR = qt4;

# Fix boost 1.59 compat
@@ -118,7 +123,7 @@ in stdenv.mkDerivation rec {
# rendering-dependent test
sed -e '/CPPUNIT_ASSERT_EQUAL(11148L, pOleObj->GetLogicRect().getWidth());/d ' -i sc/qa/unit/subsequent_filters-test.cxx
# tilde expansion in path processing checks the existence of $HOME
sed -e 's@rtl::OString sSysPath("~/tmp");@& return ; @' -i sal/qa/osl/file/osl_File.cxx
sed -e 's@OString sSysPath("~/tmp");@& return ; @' -i sal/qa/osl/file/osl_File.cxx
# rendering-dependent: on my computer the test table actually doesn't fit…
# interesting fact: test disabled on macOS by upstream
sed -re '/DECLARE_WW8EXPORT_TEST[(]testTableKeep, "tdf91083.odt"[)]/,+5d' -i ./sw/qa/extras/ww8export/ww8export.cxx
@@ -132,6 +137,7 @@ in stdenv.mkDerivation rec {
sed -e '/CPPUNIT_TEST(testChartImportXLS)/d' -i sc/qa/unit/subsequent_filters-test.cxx
sed -zre 's/DesktopLOKTest::testGetFontSubset[^{]*[{]/& return; /' -i desktop/qa/desktop_lib/test_desktop_lib.cxx
sed -z -r -e 's/DECLARE_OOXMLEXPORT_TEST[(]testFlipAndRotateCustomShape,[^)]*[)].[{]/& return;/' -i sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
sed -z -r -e 's/DECLARE_OOXMLEXPORT_TEST[(]tdf105490_negativeMargins,[^)]*[)].[{]/& return;/' -i sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
# not sure about this fragile test
sed -z -r -e 's/DECLARE_OOXMLEXPORT_TEST[(]testTDF87348,[^)]*[)].[{]/& return;/' -i sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
'';
@@ -249,9 +255,9 @@ in stdenv.mkDerivation rec {
gst_all_1.gst-plugins-base gsettings_desktop_schemas glib
neon nspr nss openldap openssl ORBit2 pam perl pkgconfig poppler
python3 sablotron sane-backends unzip vigra which zip zlib
mdds bluez5 glibc libcmis libwps libabw libzmf
libxshmfence libatomic_ops graphite2 harfbuzz
librevenge libe-book libmwaw glm glew ncurses
mdds bluez5 glibc libcmis libwps libabw libzmf libtool
libxshmfence libatomic_ops graphite2 harfbuzz gpgme
librevenge libe-book libmwaw glm glew ncurses xmlsec epoxy
libodfgen CoinMP librdf_rasqal defaultIconTheme makeWrapper
gdb
]
32 changes: 23 additions & 9 deletions pkgs/applications/office/libreoffice/generate-libreoffice-srcs.py
Original file line number Diff line number Diff line change
@@ -22,12 +22,19 @@ def main():
for x in packages:

md5 = x['md5']
upstream_sha256 = x['sha256']
if upstream_sha256:
hash = upstream_sha256
hashtype = 'sha256'
else:
hash = md5
hashtype = 'md5'
tarball = x['tarball']

url = construct_url(x)
print('url: {}'.format(url), file=sys.stderr)

path = download(url, tarball, md5)
path = download(url, tarball, hash, hashtype)
print('path: {}'.format(path), file=sys.stderr)

sha256 = get_sha256(path)
@@ -38,7 +45,7 @@ def main():
print(' url = "{}";'.format(url))
print(' sha256 = "{}";'.format(sha256))
print(' md5 = "{}";'.format(md5))
print(' md5name = "{}-{}";'.format(md5,tarball))
print(' md5name = "{}-{}";'.format(md5 or upstream_sha256,tarball))
print(' }')

print(']')
@@ -53,9 +60,9 @@ def construct_url(x):
x.get('subdir', ''), x['md5'], x['tarball'])


def download(url, name, md5):
cmd = ['nix-prefetch-url', url, md5, '--print-path',
'--type', 'md5', '--name', name]
def download(url, name, hash, hashtype):
cmd = ['nix-prefetch-url', url, hash, '--print-path',
'--type', hashtype, '--name', name]
proc = subprocess.run(cmd, stdout=subprocess.PIPE, check=True,
universal_newlines=True)
return proc.stdout.split('\n')[1].strip()
@@ -114,7 +121,7 @@ def cluster(xs):
Groups lines according to their order within the file, to support
packages that are listed in `download.lst` more than once.
"""
keys = ['tarball', 'md5', 'brief']
keys = ['tarball', 'md5', 'sha256', 'brief']
a = {k: [x for x in xs if k in x['attrs']] for k in keys}
return zip(*[a[k] for k in keys])

@@ -220,7 +227,7 @@ def sub_symbols(xs):

def get_value(k):
x = symbols.get(k)
return x['value'] if x is not None else None
return x['value'] if x is not None else ''

for x in xs:
yield dict_merge([{'value': sub_str(x['value'], get_value)},
@@ -249,7 +256,7 @@ def interpret(x):
Output: One of 1. Dict with keys 'name' and 'attrs'
2. 'unrecognized' (if interpretation failed)
"""
for f in [interpret_md5, interpret_tarball_with_md5, interpret_tarball]:
for f in [interpret_md5, interpret_sha256, interpret_tarball_with_md5, interpret_tarball]:
result = f(x)
if result is not None:
return result
@@ -267,8 +274,14 @@ def interpret_md5(x):

if match:
return {'name': match.group(1),
'attrs': {'md5': x['value']}}
'attrs': {'md5': x['value'], 'sha256': ''}}

def interpret_sha256(x):
match = re.match('^(.*)_SHA256SUM$', x['key'])

if match:
return {'name': match.group(1),
'attrs': {'sha256': x['value'], 'md5': ''}}

def interpret_tarball(x):
"""
@@ -301,6 +314,7 @@ def interpret_tarball_with_md5(x):
return {'name': match['key'].group(1),
'attrs': {'tarball': match['value'].group('tarball'),
'md5': match['value'].group('md5'),
'sha256': '',
'brief': False}}


Loading