Files
nixpkgs/pkgs/development/python-modules/osc/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

63 lines
1.4 KiB
Nix

{
bashInteractive,
buildPythonPackage,
cryptography,
diffstat,
fetchFromGitHub,
lib,
rpm,
urllib3,
keyring,
ruamel-yaml,
}:
buildPythonPackage rec {
pname = "osc";
version = "1.22.0";
format = "setuptools";
src = fetchFromGitHub {
owner = "openSUSE";
repo = "osc";
rev = version;
hash = "sha256-sohuRbWoLZ6/tBMRIKlvhmsDOgHaB8oGF58veVQBWpk=";
};
buildInputs = [ bashInteractive ]; # needed for bash-completion helper
nativeCheckInputs = [
rpm
diffstat
];
propagatedBuildInputs = [
urllib3
cryptography
keyring
ruamel-yaml
];
postInstall = ''
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
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
'';
preCheck = "HOME=$TOP/tmp";
meta = {
homepage = "https://github.com/openSUSE/osc";
description = "Opensuse-commander with svn like handling";
mainProgram = "osc";
maintainers = with lib.maintainers; [
peti
saschagrunert
];
license = lib.licenses.gpl2;
};
}