git.iko.soy/typeable/nixpkgs
on master help sign in
diffoscope: 52 -> 63
commitece67bfa01053f9687f1491f1fcb5617c988900c authorEelco Dolstra <edolstra@gmail.com> dateThu 8 Dec 2016, 17:52 (10 years ago) parenta2210a9
3 files changed+32−18
pkgs/tools/misc/diffoscope/default.nix+9−3 pkgs/tools/misc/diffoscope/ignore_links.patch+9−15 pkgs/tools/misc/diffoscope/locale.patch+14
pkgs/tools/misc/diffoscope/default.nix+9−3
@@ -1,24 +1,30 @@
11{ lib, stdenv, fetchgit, fetchpatch, pythonPackages, docutils
22, acl, binutils, bzip2, cbfstool, cdrkit, colord, cpio, diffutils, e2fsprogs, file, fpc, gettext, ghc
33, gnupg1, gzip, jdk, libcaca, mono, pdftk, poppler_utils, sng, sqlite, squashfsTools, unzip, vim, xz
4+, colordiff
45, enableBloat ? false
56}:
67
78pythonPackages.buildPythonApplication rec {
89 name = "diffoscope-${version}";
9− version = "52";
10+ version = "63";
1011
1112 namePrefix = "";
1213
1314 src = fetchgit {
1415 url = "git://anonscm.debian.org/reproducible/diffoscope.git";
1516 rev = "refs/tags/${version}";
16− sha256 = "18nqsd51rc0rldyxnjmzn86154asianhv415llhbxpr1a6zwqis6";
17+ sha256 = "018c0xcgf6pgq493dib29pfyqpj7vb93a6qfmdh790fpxa2j1zyd";
1718 };
1819
1920 patches =
2021 [ # Ignore different link counts.
2122 ./ignore_links.patch
23+
24+ # Our Glibc doesn't have the C.UTF-8 locale yet
25+ # (https://sourceware.org/glibc/wiki/Proposals/C.UTF-8), so use
26+ # en_US.UTF-8 instead.
27+ ./locale.patch
2228 ];
2329
2430 postPatch = ''
@@ -31,7 +37,7 @@ pythonPackages.buildPythonApplication rec {
3137 # FIXME: move xxd into a separate package so we don't have to pull in all of vim.
3238 propagatedBuildInputs = (with pythonPackages; [ debian libarchive-c python_magic tlsh rpm ]) ++
3339 map lib.getBin ([ acl binutils bzip2 cbfstool cdrkit cpio diffutils e2fsprogs file gettext
34− gzip libcaca poppler_utils sng sqlite squashfsTools unzip vim xz
40+ gzip libcaca poppler_utils sng sqlite squashfsTools unzip vim xz colordiff
3541 ] ++ lib.optionals enableBloat [ colord fpc ghc gnupg1 jdk mono pdftk ]);
3642
3743 doCheck = false; # Calls 'mknod' in squashfs tests, which needs root
pkgs/tools/misc/diffoscope/ignore_links.patch+9−15
@@ -1,21 +1,15 @@
1−From: Eelco Dolstra <eelco.dolstra@logicblox.com>
2−
3−Nix deduplicates by hard-linking identical files, so it's normal for
4−the the number of links to a file to differ.
5−---
6−diff --git a/diffoscope/comparators/directory.py b/diffoscope/comparators/directory.py
7−index 7d1cd75..bd91eb0 100644
8−--- a/diffoscope/comparators/directory.py
9−+++ b/diffoscope/comparators/directory.py
10−@@ -47,6 +47,7 @@ class Stat(Command):
1+diff -ru -x '*~' diffoscope-orig/diffoscope/comparators/directory.py diffoscope/diffoscope/comparators/directory.py
2+--- diffoscope-orig/diffoscope/comparators/directory.py 1970-01-01 01:00:01.000000000 +0100
3++++ diffoscope/diffoscope/comparators/directory.py 2016-12-08 17:37:55.000315157 +0100
4+@@ -49,6 +49,7 @@
115 FILE_RE = re.compile(r'^\s*File:.*$')
12− DEVICE_RE = re.compile(r'Device: [0-9a-f]+h/[0-9]+d')
13− INODE_RE = re.compile(r'Inode: [0-9]+')
14−+ LINKS_RE = re.compile(r'Links: [0-9]+')
6+ DEVICE_RE = re.compile(r'Device: [0-9a-f]+h/[0-9]+d\s+')
7+ INODE_RE = re.compile(r'Inode: [0-9]+\s+')
8++ LINKS_RE = re.compile(r'Links: [0-9]+\s+')
159 ACCESS_TIME_RE = re.compile(r'^Access: [0-9]{4}-[0-9]{2}-[0-9]{2}.*$')
1610 CHANGE_TIME_RE = re.compile(r'^Change: [0-9]{4}-[0-9]{2}-[0-9]{2}.*$')
17−
18−@@ -55,6 +56,7 @@ class Stat(Command):
11+
12+@@ -57,6 +58,7 @@
1913 line = Stat.FILE_RE.sub('', line)
2014 line = Stat.DEVICE_RE.sub('', line)
2115 line = Stat.INODE_RE.sub('', line)
pkgs/tools/misc/diffoscope/locale.patchnew file+14
@@ -0,0 +1,14 @@
1+diff -ru -x '*~' diffoscope-orig/diffoscope/__init__.py diffoscope/diffoscope/__init__.py
2+--- diffoscope-orig/diffoscope/__init__.py 1970-01-01 01:00:01.000000000 +0100
3++++ diffoscope/diffoscope/__init__.py 2016-12-08 17:48:51.732122110 +0100
4+@@ -81,8 +81,8 @@
5+ for var in ['LANG', 'LC_NUMERIC', 'LC_TIME', 'LC_COLLATE', 'LC_MONETARY',
6+ 'LC_MESSAGES', 'LC_PAPER', 'LC_NAME', 'LC_ADDRESS',
7+ 'LC_TELEPHONE', 'LC_MEASUREMENT', 'LC_IDENTIFICATION']:
8+- os.environ[var] = 'C'
9+- os.environ['LC_CTYPE'] = 'C.UTF-8'
10++ os.environ[var] = 'en_US'
11++ os.environ['LC_CTYPE'] = 'en_US.UTF-8'
12+ os.environ['TZ'] = 'UTC'
13+
14+