at 18.03-beta 43 lines 1.2 kB view raw
1{ stdenv, fetchFromGitHub, fetchpatch, coreutils 2, python3, python3Packages, substituteAll }: 3 4assert stdenv.isLinux; 5 6python3Packages.buildPythonApplication rec { 7 name = "trash-cli-${version}"; 8 version = "0.17.1.14"; 9 namePrefix = ""; 10 11 src = fetchFromGitHub { 12 owner = "andreafrancia"; 13 repo = "trash-cli"; 14 rev = "${version}"; 15 sha256 = "1bqazna223ibqjwbc1wfvfnspfyrvjy8347qlrgv4cpng72n7gfi"; 16 }; 17 18 patches = [ 19 (substituteAll { 20 src = ./nix-paths.patch; 21 df = "${coreutils}/bin/df"; 22 libc = "${stdenv.cc.libc.out}/lib/libc.so.6"; 23 }) 24 25 # Fix build on Python 3.6. 26 (fetchpatch { 27 url = "https://github.com/andreafrancia/trash-cli/commit/a21b80d1e69783bb09376c3f60dd2f2a10578805.patch"; 28 sha256 = "0w49rjh433sjfc2cl5a9wlbr6kcn9f1qg905qsyv7ay3ar75wvyp"; 29 }) 30 ]; 31 32 buildInputs = with python3Packages; [ nose mock ]; 33 34 checkPhase = "nosetests"; 35 36 meta = with stdenv.lib; { 37 homepage = https://github.com/andreafrancia/trash-cli; 38 description = "Command line tool for the desktop trash can"; 39 maintainers = [ maintainers.rycee ]; 40 platforms = platforms.all; 41 license = licenses.gpl2; 42 }; 43}