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: 2d63a8c10ffc
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 74e16e9404de
Choose a head ref
  • 5 commits
  • 5 files changed
  • 1 contributor

Commits on Nov 10, 2020

  1. Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    478ca41 View commit details
  2. fixup diffoscope

    FRidh committed Nov 10, 2020
    Copy the full SHA
    0502eae View commit details
  3. Copy the full SHA
    d6cf227 View commit details
  4. Copy the full SHA
    ca69df7 View commit details
  5. Copy the full SHA
    74e16e9 View commit details
Original file line number Diff line number Diff line change
@@ -144,7 +144,7 @@ let
list = ''[ ${lib.concatMapStringsSep " " drvName partitionedRequiredPythonModules.wrong} ]'';
in lib.warn ''
${name}: Non-Python packages are in `requiredPythonModules`: ${list}
These are likely meant to be in `buildInputs`. If their executables need to be included in wrappers, set `makeWrapperArgs=["--prefix PATH : ''${lib.makeBinPath ${list} }";`.
If these are libraries, then they should be in `buildInputs`. If their executables need to be included in wrappers, set `makeWrapperArgs=["--prefix PATH : ''${lib.makeBinPath ${list} }";`.
'' partitionedRequiredPythonModules.right
else
partitionedRequiredPythonModules.right;
11 changes: 9 additions & 2 deletions pkgs/development/python-modules/binwalk/default.nix
Original file line number Diff line number Diff line change
@@ -22,6 +22,10 @@
let
visualizationSupport = (pyqtgraph != null) && (matplotlib != null);
version = "2.2.0";

runtimeDeps = [
zlib xz ncompress gzip bzip2 gnutar p7zip cabextract cramfsswap cramfsprogs sasquatch squashfsTools lzma
];
in
buildPythonPackage {
pname = "binwalk";
@@ -34,8 +38,7 @@ buildPythonPackage {
sha256 = "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc";
};

requiredPythonModules = [ zlib xz ncompress gzip bzip2 gnutar p7zip cabextract cramfsswap cramfsprogs sasquatch squashfsTools lzma pycrypto ]
++ stdenv.lib.optionals visualizationSupport [ matplotlib pyqtgraph ];
requiredPythonModules = [ pycrypto ] ++ stdenv.lib.optionals visualizationSupport [ matplotlib pyqtgraph ];

# setup.py only installs version.py during install, not test
postPatch = ''
@@ -47,6 +50,10 @@ buildPythonPackage {
HOME=$(mktemp -d)
'';

makeWrapperArgs = [
"--prefix PATH : ${stdenv.lib.makeBinPath runtimeDeps}"
];

checkInputs = [ nose ];

meta = with stdenv.lib; {
17 changes: 13 additions & 4 deletions pkgs/development/python-modules/hidapi/default.nix
Original file line number Diff line number Diff line change
@@ -9,10 +9,19 @@ buildPythonPackage rec {
sha256 = "27c04d42a7187becf7a8309d4846aa4f235ac8b7dafd758335b109f5cbd3b962";
};

requiredPythonModules =
stdenv.lib.optionals stdenv.isLinux [ libusb1 udev ] ++
stdenv.lib.optionals stdenv.isDarwin [ darwin.IOKit darwin.apple_sdk.frameworks.CoreFoundation ] ++
[ cython ];
buildInputs = [
libusb1
udev
];

nativeBuildInputs = [
cython
];

requiredPythonModules = [
] ++ stdenv.lib.optionals stdenv.isDarwin [
darwin.IOKit darwin.apple_sdk.frameworks.CoreFoundation
];

# Fix the USB backend library lookup
postPatch = stdenv.lib.optionalString stdenv.isLinux ''
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/jsbeautifier/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ lib, fetchPypi, buildPythonApplication, editorconfig, pytest, six }:
{ lib, fetchPypi, buildPythonPackage, editorconfig, pytest, six }:

buildPythonApplication rec {
buildPythonPackage rec {
pname = "jsbeautifier";
version = "1.13.0";

85 changes: 67 additions & 18 deletions pkgs/tools/misc/diffoscope/default.nix
Original file line number Diff line number Diff line change
@@ -13,6 +13,46 @@ let
makeWrapper "${jdk}/bin/java" "$out/bin/apksigner" \
--add-flags "-jar ${builtins.head build-tools}/libexec/android-sdk/build-tools/28.0.3/lib/apksigner.jar"
'';

runtimeDeps = [
binutils-unwrapped
bzip2
colordiff
coreutils
cpio
db
diffutils
dtc
e2fsprogs
file
findutils
fontforge-fonttools
gettext
gnutar
gzip
libarchive
libcaca
lz4
openssl
pgpdump
sng
sqlite
squashfsTools
unzip
xxd
xz
zip
zstd
acl
cdrkit
] ++ lib.optionals stdenv.isLinux [
acl
cdrkit
] ++ lib.optionals enableBloat [
abootimg apksigner apktool cbfstool colord ffmpeg fpc ghc ghostscriptX giflib gnupg gnumeric
hdf5 imagemagick llvm jdk mono odt2txt openssh pdftk poppler_utils qemu R tcpdump wabt
];

in
python3Packages.buildPythonApplication rec {
pname = "diffoscope";
@@ -38,36 +78,45 @@ python3Packages.buildPythonApplication rec {
substituteInPlace doc/Makefile --replace "../bin" "$out/bin"
'';

nativeBuildInputs = [ docutils help2man ];
nativeBuildInputs = [
docutils
help2man
];

# Most of the non-Python dependencies here are optional command-line tools for various file-format parsers.
# To help figuring out what's missing from the list, run: ./pkgs/tools/misc/diffoscope/list-missing-tools.sh
#
# Still missing these tools: docx2txt dumppdf dumpxsb enjarify lipo ocamlobjinfo oggDump otool procyon
#
# TODO: remove non-Python run-time dependencies. Note having them here does not hurt.
requiredPythonModules = [
binutils-unwrapped bzip2 colordiff coreutils cpio db diffutils
dtc e2fsprogs file findutils fontforge-fonttools gettext gnutar gzip
libarchive libcaca lz4 openssl pgpdump sng sqlite squashfsTools unzip xxd
xz zip zstd
]
++ (with python3Packages; [
argcomplete debian defusedxml jsondiff jsbeautifier libarchive-c
python_magic progressbar33 pypdf2 rpm tlsh
])
++ lib.optionals stdenv.isLinux [ python3Packages.pyxattr acl cdrkit ]
++ lib.optionals enableBloat ([
abootimg apksigner apktool cbfstool colord ffmpeg fpc ghc ghostscriptX giflib gnupg gnumeric
hdf5 imagemagick llvm jdk mono odt2txt openssh pdftk poppler_utils qemu R tcpdump wabt
] ++ (with python3Packages; [ binwalk guestfs h5py ]));
requiredPythonModules = with python3Packages; [
argcomplete
debian
defusedxml
jsondiff
jsbeautifier
libarchive-c
python_magic
progressbar33
pypdf2
rpm
tlsh
] ++ lib.optionals stdenv.isLinux [
pyxattr
] ++ lib.optionals enableBloat [
binwalk
guestfs
h5py
];

checkInputs = with python3Packages; [ pytest ] ++ requiredPythonModules;
checkInputs = with python3Packages; [
pytest
];

makeWrapperArgs = [
# Extend PATH with non-Python run-time dependencies.
# TODO remove Python run-time dependencies.
"--prefix PATH : ${stdenv.lib.makeBinPath requiredPythonModules }"
"--prefix PATH : ${stdenv.lib.makeBinPath runtimeDeps }"
];

postInstall = ''