Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09 1.3 kB view raw
1{ stdenv, buildPythonPackage, fetchFromGitHub, bashInteractive, urlgrabber 2, m2crypto, rpm, chardet 3}: 4 5buildPythonPackage rec { 6 pname = "osc"; 7 version = "0.170.0"; 8 9 src = fetchFromGitHub { 10 owner = "openSUSE"; 11 repo = "osc"; 12 rev = version; 13 sha256 = "10dj9kscz59qm8rw5084gf0m8ail2rl7r8rg66ij92x88wvi9mbz"; 14 }; 15 16 buildInputs = [ bashInteractive ]; # needed for bash-completion helper 17 checkInputs = [ rpm ]; 18 propagatedBuildInputs = [ urlgrabber m2crypto chardet ]; 19 20 postInstall = '' 21 ln -s $out/bin/osc-wrapper.py $out/bin/osc 22 install -D -m444 osc.fish $out/etc/fish/completions/osc.fish 23 install -D -m555 dist/osc.complete $out/share/bash-completion/helpers/osc-helper 24 mkdir -p $out/share/bash-completion/completions 25 cat >>$out/share/bash-completion/completions/osc <<EOF 26 test -z "\$BASH_VERSION" && return 27 complete -o default _nullcommand >/dev/null 2>&1 || return 28 complete -r _nullcommand >/dev/null 2>&1 || return 29 complete -o default -C $out/share/bash-completion/helpers/osc-helper osc 30 EOF 31 ''; 32 33 meta = with stdenv.lib; { 34 homepage = "https://github.com/openSUSE/osc"; 35 description = "opensuse-commander with svn like handling"; 36 maintainers = [ maintainers.peti ]; 37 license = licenses.gpl2; 38 }; 39 40}