Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.03 38 lines 1.3 kB view raw
1{ stdenv, buildPythonPackage , fetchFromGitHub , bashInteractive , urlgrabber, m2crypto, rpm }: 2 3buildPythonPackage rec { 4 pname = "osc"; 5 version = "0.167.1"; 6 7 src = fetchFromGitHub { 8 owner = "openSUSE"; 9 repo = "osc"; 10 rev = version; 11 sha256 = "0f3c6mzvk9yjicwfdh47j4s2l1wrfgpa6lmqdchasdqfsacps4r6"; 12 }; 13 14 buildInputs = [ bashInteractive ]; # needed for bash-completion helper 15 checkInputs = [ rpm ]; 16 propagatedBuildInputs = [ urlgrabber m2crypto ]; 17 18 postInstall = '' 19 ln -s $out/bin/osc-wrapper.py $out/bin/osc 20 install -D -m444 osc.fish $out/etc/fish/completions/osc.fish 21 install -D -m555 dist/osc.complete $out/share/bash-completion/helpers/osc-helper 22 mkdir -p $out/share/bash-completion/completions 23 cat >>$out/share/bash-completion/completions/osc <<EOF 24 test -z "\$BASH_VERSION" && return 25 complete -o default _nullcommand >/dev/null 2>&1 || return 26 complete -r _nullcommand >/dev/null 2>&1 || return 27 complete -o default -C $out/share/bash-completion/helpers/osc-helper osc 28 EOF 29 ''; 30 31 meta = with stdenv.lib; { 32 homepage = "https://github.com/openSUSE/osc"; 33 description = "opensuse-commander with svn like handling"; 34 maintainers = [ maintainers.peti ]; 35 license = licenses.gpl2; 36 }; 37 38}