Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 16.09 41 lines 1.1 kB view raw
1{ stdenv, fetchurl, substituteAll, coreutils, python2, python2Packages }: 2 3assert stdenv.isLinux; 4 5python2Packages.buildPythonApplication rec { 6 name = "trash-cli-${version}"; 7 version = "0.12.9.14"; 8 namePrefix = ""; 9 10 src = fetchurl { 11 url = "https://github.com/andreafrancia/trash-cli/archive/${version}.tar.gz"; 12 sha256 = "10idvzrlppj632pw6mpk1zy9arn1x4lly4d8nfy9cz4zqv06lhvh"; 13 }; 14 15 16 patches = [ 17 # Fix paths. 18 (substituteAll { 19 src = ./nix-paths.patch; 20 df = "${coreutils}/bin/df"; 21 python = "${python2}/bin/${python2.executable}"; 22 libc = "${stdenv.cc.libc.out}/lib/libc.so.6"; 23 }) 24 25 # Apply https://github.com/JaviMerino/trash-cli/commit/4f45a37a3 26 # to fix failing test case. 27 ./fix_should_output_info_for_multiple_files.patch 28 ]; 29 30 buildInputs = with python2Packages; [ nose mock ]; 31 32 checkPhase = "nosetests"; 33 34 meta = with stdenv.lib; { 35 homepage = https://github.com/andreafrancia/trash-cli; 36 description = "Command line tool for the desktop trash can"; 37 maintainers = [ maintainers.rycee ]; 38 platforms = platforms.all; 39 license = licenses.gpl2; 40 }; 41}