1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 03:30:45 +00:00

Merge pull request #324888 from trofi/diffoscope-update

diffoscope: 271 -> 273
This commit is contained in:
Arnout Engelen 2024-07-31 14:27:02 +02:00 committed by GitHub
commit 29d4566505
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 215 additions and 236 deletions

View file

@ -1,78 +1,79 @@
{ lib
, stdenv
, abootimg
, acl
, apksigcopier
, apksigner
, apktool
, binutils-unwrapped-all-targets
, bzip2
, cbfstool
, cdrkit
, colord
, colordiff
, coreutils
, cpio
, db
, diffutils
, docutils
, dtc
, e2fsprogs
, enableBloat ? true
, enjarify
, fetchurl
, file
, findutils
, fontforge-fonttools
, ffmpeg
, fpc
, gettext
, ghc
, ghostscriptX
, giflib
, gnumeric
, gnupg
, gnutar
, gzip
, hdf5
, help2man
, html2text
, imagemagick
, installShellFiles
, jdk
, libarchive
, libcaca
, libxmlb
, llvm
, lz4
, lzip
, mono
, ocaml
, odt2txt
, oggvideotools
, openssh
, openssl
, pdftk
, pgpdump
, poppler_utils
, procyon
, python3
, qemu
, R
, sng
, sqlite
, squashfsTools
, tcpdump
, ubootTools
, unzip
, wabt
, xmlbeans
, xxd
, xz
, zip
, zstd
{
lib,
stdenv,
abootimg,
acl,
apksigcopier,
apksigner,
apktool,
binutils-unwrapped-all-targets,
bzip2,
cbfstool,
cdrkit,
colord,
colordiff,
coreutils,
cpio,
db,
diffutils,
docutils,
dtc,
e2fsprogs,
enableBloat ? true,
enjarify,
fetchurl,
file,
findutils,
fontforge-fonttools,
ffmpeg,
fpc,
gettext,
ghc,
ghostscriptX,
giflib,
gnumeric,
gnupg,
gnutar,
gzip,
hdf5,
help2man,
html2text,
imagemagick,
installShellFiles,
jdk,
libarchive,
libcaca,
libxmlb,
llvm,
lz4,
lzip,
mono,
ocaml,
odt2txt,
oggvideotools,
openssh,
openssl,
pdftk,
pgpdump,
poppler_utils,
procyon,
python3,
qemu,
R,
sng,
sqlite,
squashfsTools,
tcpdump,
ubootTools,
unzip,
wabt,
xmlbeans,
xxd,
xz,
zip,
zstd,
# updater only
, writeScript
writeScript,
}:
let
@ -80,15 +81,19 @@ let
packageOverrides = final: prev: {
# version 4 or newer would log the followng error but tests currently don't fail because radare2 is disabled
# ValueError: argument TNULL is not a TLSH hex string
tlsh = prev.tlsh.overridePythonAttrs ({ src, ... }: let
tlsh = prev.tlsh.overridePythonAttrs (
{ src, ... }:
let
version = "3.19.1";
in {
in
{
inherit version;
src = src.override {
rev = version;
hash = "sha256-ZYEjT/yShfA4+zpbGOtaFOx1nSSOWPtMvskPhHv3c9U=";
};
});
}
);
};
};
in
@ -96,11 +101,11 @@ in
# Note: when upgrading this package, please run the list-missing-tools.sh script as described below!
python.pkgs.buildPythonApplication rec {
pname = "diffoscope";
version = "271";
version = "273";
src = fetchurl {
url = "https://diffoscope.org/archive/diffoscope-${version}.tar.bz2";
hash = "sha256-YwNaYj0daYbs3rN/EcPz5LihJjZ6JZb33FSS6u98Gss=";
hash = "sha256-TccR/Vxq6Zf9tEvknLWewPVvJqo8pVSIi1+KxKMASq4=";
};
outputs = [
@ -108,10 +113,7 @@ python.pkgs.buildPythonApplication rec {
"man"
];
patches = [
./ignore_links.patch
./openssh-no-dsa.patch # https://salsa.debian.org/reproducible-builds/diffoscope/-/merge_requests/139
];
patches = [ ./ignore_links.patch ];
postPatch = ''
# Upstream doesn't provide a PKG-INFO file
@ -149,7 +151,8 @@ python.pkgs.buildPythonApplication rec {
#
# We filter automatically all packages for the host platform (some dependencies are not supported on Darwin, aarch64, etc.).
# Packages which are marked broken for a platform are not automatically filtered to avoid accidentally removing them without noticing it.
pythonPath = lib.filter (lib.meta.availableOn stdenv.hostPlatform) ([
pythonPath = lib.filter (lib.meta.availableOn stdenv.hostPlatform) (
[
acl
binutils-unwrapped-all-targets
bzip2
@ -244,11 +247,10 @@ python.pkgs.buildPythonApplication rec {
++ lib.optionals stdenv.isLinux [ oggvideotools ]
# This doesn't work on aarch64-darwin
++ lib.optionals (stdenv.hostPlatform.system != "aarch64-darwin") [ gnumeric ]
));
)
);
nativeCheckInputs = with python.pkgs; [
pytestCheckHook
] ++ pythonPath;
nativeCheckInputs = with python.pkgs; [ pytestCheckHook ] ++ pythonPath;
pytestFlagsArray = [
# Always show more information when tests fail
@ -260,7 +262,8 @@ python.pkgs.buildPythonApplication rec {
installManPage doc/diffoscope.1
'';
disabledTests = [
disabledTests =
[
"test_sbin_added_to_path"
"test_diff_meta"
"test_diff_meta2"
@ -269,7 +272,8 @@ python.pkgs.buildPythonApplication rec {
"test_item3_deflate_llvm_bitcode"
# Fails ever since an update to imagemagick
"test_has_visuals"
] ++ lib.optionals stdenv.isDarwin [
]
++ lib.optionals stdenv.isDarwin [
# Disable flaky tests on Darwin
"test_non_unicode_filename"
"test_listing"
@ -321,7 +325,11 @@ python.pkgs.buildPythonApplication rec {
homepage = "https://diffoscope.org/";
changelog = "https://diffoscope.org/news/diffoscope-${version}-released/";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ dezgeg danielfullmer raitobezarius ];
maintainers = with maintainers; [
dezgeg
danielfullmer
raitobezarius
];
platforms = platforms.unix;
mainProgram = "diffoscope";
};

View file

@ -1,29 +0,0 @@
diff --git a/tests/comparators/test_openssh_pub_key.py b/tests/comparators/test_openssh_pub_key.py
index da143097..8d6f3efa 100644
--- a/tests/comparators/test_openssh_pub_key.py
+++ b/tests/comparators/test_openssh_pub_key.py
@@ -29,7 +29,7 @@
from ..utils.tools import skip_unless_tools_exist, skip_unless_tool_is_at_least
-# Generated by: ssh-keygen -t dsa -C "Test1"
+# Generated by: ssh-keygen -t ed25519 -C "Test1"
opensshpubkey1 = load_fixture("test_openssh_pub_key1.pub")
# Generated by: ssh-keygen -t rsa -b 4096 -C "Test2"
opensshpubkey2 = load_fixture("test_openssh_pub_key2.pub")
diff --git a/tests/data/openssh_pub_key_expected_diff b/tests/data/openssh_pub_key_expected_diff
index 0b6ec624..88d1eccf 100644
--- a/tests/data/openssh_pub_key_expected_diff
+++ b/tests/data/openssh_pub_key_expected_diff
@@ -1,3 +1,3 @@
@@ -1 +1 @@
--1024 SHA256:v/O+0ETvi2H5TGRXky1RhQ1/WFwLlPpxch5E2Mrj6FM Test1 (DSA)
+-256 SHA256:ix2OOXDuTWjxGTICJcP7fLWIcwOO+wr4FPJHz8fOhtQ Test1 (ED25519)
+4096 SHA256:9dH1CMkA6DSfPWU7vNwdPKS5/ppN4LMdvHTP60l7aSA Test2 (RSA)
diff --git a/tests/data/test_openssh_pub_key1.pub b/tests/data/test_openssh_pub_key1.pub
index a2674adc..d564f55c 100644
--- a/tests/data/test_openssh_pub_key1.pub
+++ b/tests/data/test_openssh_pub_key1.pub
@@ -1 +1 @@
-ssh-dss AAAAB3NzaC1kc3MAAACBAIa8YajID9g38jwQm8sNBGoGkkwIOv6sQ8k+Bcq8oPXPy1FRXWcra6Kd3iKqApIzLuZUvoYO/f3G2K4lue5yrv72rgwANWmyL4dHVXgcsjwvWwjOl6o4xWTPFspkdNcAAMcZfzG0+w1AOkQxhwMsnK380m3J9a3VOWugUiU4fV1jAAAAFQDzkrIZuJoxlxes564ltb2Vn3hnpQAAAIBHr6uzpiSeSkWLuItB00hHx1RHtBns0zaheNFTTUMGftxtfBU2eBLqObcTlqHJZ3UUY3/YAvD6Ux/uLSgUzEe7JaqvHcgML3K5V4HWIwE0ARRIwzrfU4cAErJObmZZ/OXbXNNRmW2IJgQJI52x4gVuSt0EEuctzASOOvyPA8IekAAAAIA7xe4o0o/ZwUqfWKR9K4QrbPPa6/D4ruFVhMcRJEE/A1LMY1Xo4nVSRU5bxzvMmJPBZvsbR5NEE3CgESqYxp5IPzK8LLyxcf8YxhdHFDYqFL1TbavwaDqtj6/9a/e7+bd8mMYe7zXJUdKWa/Uf+Xm6WRt3HgdLiCEsS2OlpvS2KA== Test1
+ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGo65kxbPUbb4fdujB2AX/XEZQ+23NDDxu3cJvw2E/DF Test1