summary refs log blame commit diff
path: root/pkgs/development/libraries/libiberty/default.nix
blob: 08a88bfee459a8bbe10e7dbf92a7e7594c15ff5c (plain) (tree)
1
2
3
4
5
6
7
8
9
                                               

                                                 
 
                     
                                       
 
                       
 

                            

                                                     

                                                            
 
                                                           
                                            


                           
                                    

                                                                           
                                                             


                               
{ stdenv, buildPackages, staticBuild ? false }:

let inherit (buildPackages.buildPackages) gcc; in

stdenv.mkDerivation {
  name = "libiberty-${gcc.cc.version}";

  inherit (gcc.cc) src;

  outputs = [ "out" "dev" ];

  postUnpack = "sourceRoot=\${sourceRoot}/libiberty";

  configureFlags = [ "--enable-install-libiberty" ]
    ++ stdenv.lib.optional (!staticBuild) "--enable-shared";

  postInstall = stdenv.lib.optionalString (!staticBuild) ''
    cp pic/libiberty.a $out/lib*/libiberty.a
  '';

  meta = with stdenv.lib; {
    homepage = https://gcc.gnu.org/;
    license = licenses.lgpl2;
    description = "Collection of subroutines used by various GNU programs";
    maintainers = with maintainers; [ abbradar ericson2314 ];
    platforms = platforms.unix;
  };
}