2022-09-09 14:08:57 +00:00
|
|
|
{ stdenv, lib, buildPythonPackage, fetchFromGitHub, bashInteractive
|
|
|
|
, rpm, urllib3, cryptography, diffstat
|
2020-08-20 17:08:02 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "osc";
|
2022-09-09 14:08:57 +00:00
|
|
|
version = "1.0.0b1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "openSUSE";
|
|
|
|
repo = "osc";
|
|
|
|
rev = version;
|
2022-09-09 14:08:57 +00:00
|
|
|
sha256 = "cMltsR4Nxe0plHU5cP2Lj/qqlIqRbCXi6FXP8qx7908=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ bashInteractive ]; # needed for bash-completion helper
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ rpm diffstat ];
|
2022-09-09 14:08:57 +00:00
|
|
|
propagatedBuildInputs = [ urllib3 cryptography ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
preCheck = "HOME=$TOP/tmp";
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/openSUSE/osc";
|
|
|
|
description = "opensuse-commander with svn like handling";
|
|
|
|
maintainers = [ maintainers.peti ];
|
|
|
|
license = licenses.gpl2;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|