summary refs log blame commit diff
path: root/pkgs/applications/version-management/tortoisehg/default.nix
blob: 437062f7f5e1f19f6dcb2416b9ca125b18ca5343 (plain) (tree)
1
2
3
4
5
6
7
8
9
                                            
 
                                            
                                   
                    
 
                    
                                                                              
                                                                      

      
                                                                               
 
                                                                          
 
                                                                        


                     
                                                                         

                                                             
                                                                  

       




                              




                                                                         
                                                     
      
 
{lib, fetchurl, mercurial, python2Packages}:

python2Packages.buildPythonApplication rec {
    name = "tortoisehg-${version}";
    version = "4.5";

    src = fetchurl {
      url = "https://bitbucket.org/tortoisehg/targz/downloads/${name}.tar.gz";
      sha256 = "11m2hir2y1hblg9sqmansv16rcp560j2d3nhqzfhkim46a59fxvk";
    };

    pythonPath = with python2Packages; [ pyqt4 mercurial qscintilla iniparse ];

    propagatedBuildInputs = with python2Packages; [ qscintilla iniparse ];

    doCheck = false; # tests fail with "thg: cannot connect to X server"
    dontStrip = true;
    buildPhase = "";
    installPhase = ''
      ${python2Packages.python.executable} setup.py install --prefix=$out
      mkdir -p $out/share/doc/tortoisehg
      cp COPYING.txt $out/share/doc/tortoisehg/Copying.txt.gz
      ln -s $out/bin/thg $out/bin/tortoisehg     #convenient alias
    '';

    checkPhase = ''
      echo "test: thg version"
      $out/bin/thg version
    '';

    meta = {
      description = "Qt based graphical tool for working with Mercurial";
      homepage = http://tortoisehg.bitbucket.org/;
      license = lib.licenses.gpl2;
      platforms = lib.platforms.linux;
      maintainers = with lib.maintainers; [ danbst ];
    };
}