forked from mirrors/nixpkgs
diffoscope: 52 -> 63
This commit is contained in:
parent
a2210a9efd
commit
ece67bfa01
|
@ -1,24 +1,30 @@
|
||||||
{ lib, stdenv, fetchgit, fetchpatch, pythonPackages, docutils
|
{ lib, stdenv, fetchgit, fetchpatch, pythonPackages, docutils
|
||||||
, acl, binutils, bzip2, cbfstool, cdrkit, colord, cpio, diffutils, e2fsprogs, file, fpc, gettext, ghc
|
, acl, binutils, bzip2, cbfstool, cdrkit, colord, cpio, diffutils, e2fsprogs, file, fpc, gettext, ghc
|
||||||
, gnupg1, gzip, jdk, libcaca, mono, pdftk, poppler_utils, sng, sqlite, squashfsTools, unzip, vim, xz
|
, gnupg1, gzip, jdk, libcaca, mono, pdftk, poppler_utils, sng, sqlite, squashfsTools, unzip, vim, xz
|
||||||
|
, colordiff
|
||||||
, enableBloat ? false
|
, enableBloat ? false
|
||||||
}:
|
}:
|
||||||
|
|
||||||
pythonPackages.buildPythonApplication rec {
|
pythonPackages.buildPythonApplication rec {
|
||||||
name = "diffoscope-${version}";
|
name = "diffoscope-${version}";
|
||||||
version = "52";
|
version = "63";
|
||||||
|
|
||||||
namePrefix = "";
|
namePrefix = "";
|
||||||
|
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "git://anonscm.debian.org/reproducible/diffoscope.git";
|
url = "git://anonscm.debian.org/reproducible/diffoscope.git";
|
||||||
rev = "refs/tags/${version}";
|
rev = "refs/tags/${version}";
|
||||||
sha256 = "18nqsd51rc0rldyxnjmzn86154asianhv415llhbxpr1a6zwqis6";
|
sha256 = "018c0xcgf6pgq493dib29pfyqpj7vb93a6qfmdh790fpxa2j1zyd";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches =
|
patches =
|
||||||
[ # Ignore different link counts.
|
[ # Ignore different link counts.
|
||||||
./ignore_links.patch
|
./ignore_links.patch
|
||||||
|
|
||||||
|
# Our Glibc doesn't have the C.UTF-8 locale yet
|
||||||
|
# (https://sourceware.org/glibc/wiki/Proposals/C.UTF-8), so use
|
||||||
|
# en_US.UTF-8 instead.
|
||||||
|
./locale.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
@ -31,7 +37,7 @@ pythonPackages.buildPythonApplication rec {
|
||||||
# FIXME: move xxd into a separate package so we don't have to pull in all of vim.
|
# FIXME: move xxd into a separate package so we don't have to pull in all of vim.
|
||||||
propagatedBuildInputs = (with pythonPackages; [ debian libarchive-c python_magic tlsh rpm ]) ++
|
propagatedBuildInputs = (with pythonPackages; [ debian libarchive-c python_magic tlsh rpm ]) ++
|
||||||
map lib.getBin ([ acl binutils bzip2 cbfstool cdrkit cpio diffutils e2fsprogs file gettext
|
map lib.getBin ([ acl binutils bzip2 cbfstool cdrkit cpio diffutils e2fsprogs file gettext
|
||||||
gzip libcaca poppler_utils sng sqlite squashfsTools unzip vim xz
|
gzip libcaca poppler_utils sng sqlite squashfsTools unzip vim xz colordiff
|
||||||
] ++ lib.optionals enableBloat [ colord fpc ghc gnupg1 jdk mono pdftk ]);
|
] ++ lib.optionals enableBloat [ colord fpc ghc gnupg1 jdk mono pdftk ]);
|
||||||
|
|
||||||
doCheck = false; # Calls 'mknod' in squashfs tests, which needs root
|
doCheck = false; # Calls 'mknod' in squashfs tests, which needs root
|
||||||
|
|
|
@ -1,21 +1,15 @@
|
||||||
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
|
diff -ru -x '*~' diffoscope-orig/diffoscope/comparators/directory.py diffoscope/diffoscope/comparators/directory.py
|
||||||
|
--- diffoscope-orig/diffoscope/comparators/directory.py 1970-01-01 01:00:01.000000000 +0100
|
||||||
Nix deduplicates by hard-linking identical files, so it's normal for
|
+++ diffoscope/diffoscope/comparators/directory.py 2016-12-08 17:37:55.000315157 +0100
|
||||||
the the number of links to a file to differ.
|
@@ -49,6 +49,7 @@
|
||||||
---
|
|
||||||
diff --git a/diffoscope/comparators/directory.py b/diffoscope/comparators/directory.py
|
|
||||||
index 7d1cd75..bd91eb0 100644
|
|
||||||
--- a/diffoscope/comparators/directory.py
|
|
||||||
+++ b/diffoscope/comparators/directory.py
|
|
||||||
@@ -47,6 +47,7 @@ class Stat(Command):
|
|
||||||
FILE_RE = re.compile(r'^\s*File:.*$')
|
FILE_RE = re.compile(r'^\s*File:.*$')
|
||||||
DEVICE_RE = re.compile(r'Device: [0-9a-f]+h/[0-9]+d')
|
DEVICE_RE = re.compile(r'Device: [0-9a-f]+h/[0-9]+d\s+')
|
||||||
INODE_RE = re.compile(r'Inode: [0-9]+')
|
INODE_RE = re.compile(r'Inode: [0-9]+\s+')
|
||||||
+ LINKS_RE = re.compile(r'Links: [0-9]+')
|
+ LINKS_RE = re.compile(r'Links: [0-9]+\s+')
|
||||||
ACCESS_TIME_RE = re.compile(r'^Access: [0-9]{4}-[0-9]{2}-[0-9]{2}.*$')
|
ACCESS_TIME_RE = re.compile(r'^Access: [0-9]{4}-[0-9]{2}-[0-9]{2}.*$')
|
||||||
CHANGE_TIME_RE = re.compile(r'^Change: [0-9]{4}-[0-9]{2}-[0-9]{2}.*$')
|
CHANGE_TIME_RE = re.compile(r'^Change: [0-9]{4}-[0-9]{2}-[0-9]{2}.*$')
|
||||||
|
|
||||||
@@ -55,6 +56,7 @@ class Stat(Command):
|
@@ -57,6 +58,7 @@
|
||||||
line = Stat.FILE_RE.sub('', line)
|
line = Stat.FILE_RE.sub('', line)
|
||||||
line = Stat.DEVICE_RE.sub('', line)
|
line = Stat.DEVICE_RE.sub('', line)
|
||||||
line = Stat.INODE_RE.sub('', line)
|
line = Stat.INODE_RE.sub('', line)
|
||||||
|
|
14
pkgs/tools/misc/diffoscope/locale.patch
Normal file
14
pkgs/tools/misc/diffoscope/locale.patch
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
diff -ru -x '*~' diffoscope-orig/diffoscope/__init__.py diffoscope/diffoscope/__init__.py
|
||||||
|
--- diffoscope-orig/diffoscope/__init__.py 1970-01-01 01:00:01.000000000 +0100
|
||||||
|
+++ diffoscope/diffoscope/__init__.py 2016-12-08 17:48:51.732122110 +0100
|
||||||
|
@@ -81,8 +81,8 @@
|
||||||
|
for var in ['LANG', 'LC_NUMERIC', 'LC_TIME', 'LC_COLLATE', 'LC_MONETARY',
|
||||||
|
'LC_MESSAGES', 'LC_PAPER', 'LC_NAME', 'LC_ADDRESS',
|
||||||
|
'LC_TELEPHONE', 'LC_MEASUREMENT', 'LC_IDENTIFICATION']:
|
||||||
|
- os.environ[var] = 'C'
|
||||||
|
- os.environ['LC_CTYPE'] = 'C.UTF-8'
|
||||||
|
+ os.environ[var] = 'en_US'
|
||||||
|
+ os.environ['LC_CTYPE'] = 'en_US.UTF-8'
|
||||||
|
os.environ['TZ'] = 'UTC'
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue