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