biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / osc / default.nix
blobbb16aa7d40e08aa648c4932b3a19799c49f0dc3c
2   stdenv,
3   bashInteractive,
4   buildPythonPackage,
5   cryptography,
6   diffstat,
7   fetchFromGitHub,
8   lib,
9   rpm,
10   urllib3,
11   keyring,
14 buildPythonPackage rec {
15   pname = "osc";
16   version = "1.9.1";
17   format = "setuptools";
19   src = fetchFromGitHub {
20     owner = "openSUSE";
21     repo = "osc";
22     rev = version;
23     hash = "sha256-03EDarU7rmsiE96IYHXFuPtD8nWur0qwj8NDzSj8OX0=";
24   };
26   buildInputs = [ bashInteractive ]; # needed for bash-completion helper
27   nativeCheckInputs = [
28     rpm
29     diffstat
30   ];
31   propagatedBuildInputs = [
32     urllib3
33     cryptography
34     keyring
35   ];
37   postInstall = ''
38     install -D -m444 contrib/osc.fish $out/etc/fish/completions/osc.fish
39     install -D -m555 contrib/osc.complete $out/share/bash-completion/helpers/osc-helper
40     mkdir -p $out/share/bash-completion/completions
41     cat >>$out/share/bash-completion/completions/osc <<EOF
42     test -z "\$BASH_VERSION" && return
43     complete -o default _nullcommand >/dev/null 2>&1 || return
44     complete -r _nullcommand >/dev/null 2>&1         || return
45     complete -o default -C $out/share/bash-completion/helpers/osc-helper osc
46     EOF
47   '';
49   preCheck = "HOME=$TOP/tmp";
51   meta = with lib; {
52     broken = stdenv.hostPlatform.isDarwin;
53     homepage = "https://github.com/openSUSE/osc";
54     description = "opensuse-commander with svn like handling";
55     mainProgram = "osc";
56     maintainers = with maintainers; [
57       peti
58       saschagrunert
59     ];
60     license = licenses.gpl2;
61   };