3
0
Fork 0
forked from mirrors/nixpkgs

pythonPackages.osc: refactor move to python-modules

This commit is contained in:
Chris Ostrouchov 2018-10-17 14:57:51 -04:00 committed by Frederik Rietdijk
parent 30296bc49e
commit 4156569b54
2 changed files with 47 additions and 29 deletions

View file

@ -0,0 +1,46 @@
{ stdenv
, buildPythonPackage
, fetchFromGitHub
, isPy3k
, pkgs
, urlgrabber
, m2crypto
, pyyaml
, lxml
}:
buildPythonPackage {
pname = "osc";
version = "0.162.0-55-gb730f88";
disabled = isPy3k;
src = fetchFromGitHub {
owner = "openSUSE";
repo = "osc";
rev = "b730f880cfe85a8547f569355a21706f27ebfa78";
sha256 = "0hh9j5zd2kc0804d2jmf1q3w5xm9l9s69hhgysbncrv5fw0414lh";
};
buildInputs = [ pkgs.bashInteractive ]; # needed for bash-completion helper
propagatedBuildInputs = [ urlgrabber m2crypto pyyaml lxml ];
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
'';
meta = with stdenv.lib; {
description = "opensuse-commander with svn like handling";
maintainers = [ maintainers.peti ];
license = licenses.gpl2;
};
}

View file

@ -3008,35 +3008,7 @@ in {
plyvel = callPackage ../development/python-modules/plyvel { }; plyvel = callPackage ../development/python-modules/plyvel { };
osc = buildPythonPackage { osc = callPackage ../development/python-modules/osc { };
name = "osc-0.162.0-55-gb730f88";
disabled = isPy3k;
src = pkgs.fetchFromGitHub {
owner = "openSUSE";
repo = "osc";
rev = "b730f880cfe85a8547f569355a21706f27ebfa78";
sha256 = "0hh9j5zd2kc0804d2jmf1q3w5xm9l9s69hhgysbncrv5fw0414lh";
};
buildInputs = with pkgs; [ bashInteractive ]; # needed for bash-completion helper
propagatedBuildInputs = with self; [ urlgrabber m2crypto pyyaml lxml ];
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
'';
meta = {
description = "opensuse-commander with svn like handling";
maintainers = [ maintainers.peti ];
license = licenses.gpl2;
};
};
rfc3986 = callPackage ../development/python-modules/rfc3986 { }; rfc3986 = callPackage ../development/python-modules/rfc3986 { };