2021-01-25 08:26:54 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, bashInteractive, urlgrabber
|
2020-08-19 17:12:11 +01:00
|
|
|
, m2crypto, rpm, chardet
|
|
|
|
}:
|
2018-10-17 19:57:51 +01:00
|
|
|
|
2019-08-16 18:29:10 +01:00
|
|
|
buildPythonPackage rec {
|
2018-10-17 19:57:51 +01:00
|
|
|
pname = "osc";
|
2020-08-19 17:12:11 +01:00
|
|
|
version = "0.170.0";
|
2018-10-17 19:57:51 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "openSUSE";
|
|
|
|
repo = "osc";
|
2019-08-16 18:29:10 +01:00
|
|
|
rev = version;
|
2020-08-19 17:12:11 +01:00
|
|
|
sha256 = "10dj9kscz59qm8rw5084gf0m8ail2rl7r8rg66ij92x88wvi9mbz";
|
2018-10-17 19:57:51 +01:00
|
|
|
};
|
|
|
|
|
2019-08-16 18:29:10 +01:00
|
|
|
buildInputs = [ bashInteractive ]; # needed for bash-completion helper
|
2019-12-21 09:35:50 +00:00
|
|
|
checkInputs = [ rpm ];
|
2020-08-19 17:12:11 +01:00
|
|
|
propagatedBuildInputs = [ urlgrabber m2crypto chardet ];
|
2019-08-16 18:29:10 +01:00
|
|
|
|
2018-10-17 19:57:51 +01:00
|
|
|
postInstall = ''
|
|
|
|
ln -s $out/bin/osc-wrapper.py $out/bin/osc
|
|
|
|
install -D -m444 osc.fish $out/etc/fish/completions/osc.fish
|
|
|
|
install -D -m555 dist/osc.complete $out/share/bash-completion/helpers/osc-helper
|
|
|
|
mkdir -p $out/share/bash-completion/completions
|
|
|
|
cat >>$out/share/bash-completion/completions/osc <<EOF
|
|
|
|
test -z "\$BASH_VERSION" && return
|
|
|
|
complete -o default _nullcommand >/dev/null 2>&1 || return
|
|
|
|
complete -r _nullcommand >/dev/null 2>&1 || return
|
|
|
|
complete -o default -C $out/share/bash-completion/helpers/osc-helper osc
|
|
|
|
EOF
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-12-21 09:35:50 +00:00
|
|
|
homepage = "https://github.com/openSUSE/osc";
|
2018-10-17 19:57:51 +01:00
|
|
|
description = "opensuse-commander with svn like handling";
|
|
|
|
maintainers = [ maintainers.peti ];
|
|
|
|
license = licenses.gpl2;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|