summary refs log blame commit diff
path: root/pkgs/data/misc/shared-mime-info/default.nix
blob: a2e301f40ecb8f5dd387314ed11feca924f988db (plain) (tree)
1
2
3
4
5
6
7
8





                 
            
         



         
 
                         
                             
                  
 





                                                                    

    








                                                                                             
                       

         
              

           
    




                 
 



                          
                    
                                                    
                                                                       

                                
                                                                      

    
{ stdenv
, lib
, fetchFromGitLab
, fetchpatch
, meson
, ninja
, pkg-config
, gettext
, itstool
, libxml2
, glib
}:

stdenv.mkDerivation rec {
  pname = "shared-mime-info";
  version = "2.1";

  src = fetchFromGitLab {
    domain = "gitlab.freedesktop.org";
    owner = "xdg";
    repo = pname;
    rev = version;
    sha256 = "07bxv44p43pqq4ymfnyy50yli7lwdqymhvclna42rkn1cazq3vb5";
  };

  patches = [
    # xmlto is only used for building the docs, which are not installed anyways.
    (fetchpatch {
      name = "xmlto-optional.patch";
      url = "https://gitlab.freedesktop.org/xdg/shared-mime-info/-/merge_requests/110.patch";
      sha256 = "0p5gxlcmn8ji5bc7pd105s1halqwa1d28lfx9yj43rn6mav7allx";
    })
  ];

  nativeBuildInputs = [
    meson
    ninja
    pkg-config
    gettext
    itstool
  ];

  buildInputs = [
    libxml2
    glib
  ];

  mesonFlags = [
    "-Dupdate-mimedb=true"
  ];

  meta = with lib; {
    description = "A database of common MIME types";
    homepage = "http://freedesktop.org/wiki/Software/shared-mime-info";
    license = licenses.gpl2Plus;
    platforms = platforms.unix;
    maintainers = teams.freedesktop.members ++ [ maintainers.mimame ];
  };
}