at 24.11-pre 1.5 kB view raw
1{ 2 stdenv, 3 bashInteractive, 4 buildPythonPackage, 5 cryptography, 6 diffstat, 7 fetchFromGitHub, 8 lib, 9 rpm, 10 urllib3, 11 keyring, 12}: 13 14buildPythonPackage rec { 15 pname = "osc"; 16 version = "1.6.1"; 17 format = "setuptools"; 18 19 src = fetchFromGitHub { 20 owner = "openSUSE"; 21 repo = "osc"; 22 rev = version; 23 hash = "sha256-U76nAE7NdLIdrKzRC0sP8hy6G6A8Tr4Qe2PGZI2xvyk="; 24 }; 25 26 buildInputs = [ bashInteractive ]; # needed for bash-completion helper 27 nativeCheckInputs = [ 28 rpm 29 diffstat 30 ]; 31 propagatedBuildInputs = [ 32 urllib3 33 cryptography 34 keyring 35 ]; 36 37 postInstall = '' 38 install -D -m444 contrib/osc.fish $out/etc/fish/completions/osc.fish 39 install -D -m555 contrib/osc.complete $out/share/bash-completion/helpers/osc-helper 40 mkdir -p $out/share/bash-completion/completions 41 cat >>$out/share/bash-completion/completions/osc <<EOF 42 test -z "\$BASH_VERSION" && return 43 complete -o default _nullcommand >/dev/null 2>&1 || return 44 complete -r _nullcommand >/dev/null 2>&1 || return 45 complete -o default -C $out/share/bash-completion/helpers/osc-helper osc 46 EOF 47 ''; 48 49 preCheck = "HOME=$TOP/tmp"; 50 51 meta = with lib; { 52 broken = stdenv.isDarwin; 53 homepage = "https://github.com/openSUSE/osc"; 54 description = "opensuse-commander with svn like handling"; 55 mainProgram = "osc"; 56 maintainers = with maintainers; [ 57 peti 58 saschagrunert 59 ]; 60 license = licenses.gpl2; 61 }; 62}