2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
bashInteractive,
|
|
|
|
buildPythonPackage,
|
|
|
|
cryptography,
|
|
|
|
diffstat,
|
|
|
|
fetchFromGitHub,
|
|
|
|
lib,
|
|
|
|
rpm,
|
|
|
|
urllib3,
|
|
|
|
keyring,
|
2020-08-20 17:08:02 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "osc";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "1.9.1";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "openSUSE";
|
|
|
|
repo = "osc";
|
|
|
|
rev = version;
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-03EDarU7rmsiE96IYHXFuPtD8nWur0qwj8NDzSj8OX0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ bashInteractive ]; # needed for bash-completion helper
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
rpm
|
|
|
|
diffstat
|
|
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
urllib3
|
|
|
|
cryptography
|
|
|
|
keyring
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
2023-10-09 19:29:22 +00:00
|
|
|
install -D -m444 contrib/osc.fish $out/etc/fish/completions/osc.fish
|
|
|
|
install -D -m555 contrib/osc.complete $out/share/bash-completion/helpers/osc-helper
|
2020-04-24 23:36:52 +00:00
|
|
|
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; {
|
2024-09-26 11:04:55 +00:00
|
|
|
broken = stdenv.hostPlatform.isDarwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/openSUSE/osc";
|
|
|
|
description = "opensuse-commander with svn like handling";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "osc";
|
2024-06-05 15:53:02 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
peti
|
|
|
|
saschagrunert
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
};
|
|
|
|
}
|