Revert "trash-cli: cleanup"

This reverts commit 3216cf6cdf.
This commit is contained in:
Matthew Bauer
2018-06-07 13:17:53 -04:00
parent de4cbd0488
commit c923e938a3
2 changed files with 37 additions and 12 deletions
+11 -12
View File
@@ -1,5 +1,7 @@
{ stdenv, fetchFromGitHub, fetchpatch, python3, python3Packages
, lib, makeWrapper, coreutils }:
{ stdenv, fetchFromGitHub, fetchpatch, coreutils
, python3, python3Packages, substituteAll }:
assert stdenv.isLinux;
python3Packages.buildPythonApplication rec {
name = "trash-cli-${version}";
@@ -14,6 +16,12 @@ python3Packages.buildPythonApplication rec {
};
patches = [
(substituteAll {
src = ./nix-paths.patch;
df = "${coreutils}/bin/df";
libc = "${stdenv.cc.libc.out}/lib/libc.so.6";
})
# Fix build on Python 3.6.
(fetchpatch {
url = "https://github.com/andreafrancia/trash-cli/commit/a21b80d1e69783bb09376c3f60dd2f2a10578805.patch";
@@ -22,19 +30,10 @@ python3Packages.buildPythonApplication rec {
];
buildInputs = with python3Packages; [ nose mock ];
nativeBuildInputs = [ makeWrapper ];
preFixup = ''
for bin in $out/bin/*; do
wrapProgram $bin \
--prefix PATH : ${lib.makeBinPath [ coreutils ]} \
--prefix DYLD_LIBRARY_PATH : ${lib.makeSearchPath "lib" (lib.optional (stdenv.hostPlatform.libc == "glibc") (lib.getDev stdenv.cc.libc))}
done
'';
checkPhase = "nosetests";
meta = with lib; {
meta = with stdenv.lib; {
homepage = https://github.com/andreafrancia/trash-cli;
description = "Command line tool for the desktop trash can";
maintainers = [ maintainers.rycee ];