mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 09:53:10 +00:00
diffoscope: wrap executable and include tools in PATH
diffoscope was looking for the tools it uses during runtime, but the tools there neither part of the closure nor were they in the PATH. This commit fixes this.
This commit is contained in:
parent
934c2b636c
commit
23ad77b998
@ -5,7 +5,13 @@
|
||||
, enableBloat ? false
|
||||
}:
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
# Still missing these tools: enjarify, otool & lipo (maybe OS X only), showttf
|
||||
# Also these libraries: python3-guestfs
|
||||
# FIXME: move xxd into a separate package so we don't have to pull in all of vim.
|
||||
let tools = [ acl binutils bzip2 cbfstool cdrkit cpio diffutils e2fsprogs file gettext
|
||||
gzip libcaca poppler_utils sng sqlite squashfsTools unzip vim xz colordiff
|
||||
] ++ lib.optionals enableBloat [ colord fpc ghc gnupg1 jdk mono pdftk ];
|
||||
in python3.pkgs.buildPythonApplication rec {
|
||||
pname = "diffoscope";
|
||||
name = "${pname}-${version}";
|
||||
version = "77";
|
||||
@ -26,14 +32,6 @@ python3.pkgs.buildPythonApplication rec {
|
||||
sed -i setup.py -e "/'rpm-python',/d"
|
||||
'';
|
||||
|
||||
# Still missing these tools: enjarify, otool & lipo (maybe OS X only), showttf
|
||||
# Also these libraries: python3-guestfs
|
||||
# FIXME: move xxd into a separate package so we don't have to pull in all of vim.
|
||||
buildInputs =
|
||||
map lib.getBin ([ acl binutils bzip2 cbfstool cdrkit cpio diffutils e2fsprogs file gettext
|
||||
gzip libcaca poppler_utils sng sqlite squashfsTools unzip vim xz colordiff
|
||||
] ++ lib.optionals enableBloat [ colord fpc ghc gnupg1 jdk mono pdftk ]);
|
||||
|
||||
pythonPath = with python3.pkgs; [ debian libarchive-c python_magic tlsh rpm ];
|
||||
|
||||
doCheck = false; # Calls 'mknod' in squashfs tests, which needs root
|
||||
@ -41,6 +39,7 @@ python3.pkgs.buildPythonApplication rec {
|
||||
postInstall = ''
|
||||
mkdir -p $out/share/man/man1
|
||||
${docutils}/bin/rst2man.py debian/diffoscope.1.rst $out/share/man/man1/diffoscope.1
|
||||
wrapProgram $out/bin/diffoscope --prefix PATH : ${lib.makeBinPath tools}
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
Loading…
Reference in New Issue
Block a user