nixpkgs-suyu/pkgs/development/libraries/iniparser/default.nix

49 lines
1.2 KiB
Nix
Raw Normal View History

2017-10-20 20:37:36 +02:00
{ stdenv, fetchFromGitHub }:
2017-11-07 08:47:48 +01:00
stdenv.mkDerivation rec {
pname = "iniparser";
2017-11-07 08:47:48 +01:00
version = "4.1";
2017-10-20 20:37:36 +02:00
src = fetchFromGitHub {
owner = "ndevilla";
repo = "iniparser";
rev = "v${version}";
2017-11-07 08:47:48 +01:00
sha256 = "0dhab6pad6wh816lr7r3jb6z273njlgw2vpw8kcfnmi7ijaqhnr5";
};
patches = ./no-usr.patch;
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace Makefile \
--replace -Wl,-soname= -Wl,-install_name,
'';
2017-10-20 20:37:36 +02:00
doCheck = true;
preCheck = "patchShebangs test/make-tests.sh";
installPhase = ''
mkdir -p $out/lib
mkdir -p $out/include
cp src/*.h $out/include
mkdir -p $out/share/doc/${pname}-${version}
2017-10-20 20:37:36 +02:00
for i in AUTHORS INSTALL LICENSE README.md; do
bzip2 -c -9 $i > $out/share/doc/${pname}-${version}/$i.bz2;
done;
cp -r html $out/share/doc/${pname}-${version}
cp libiniparser.a $out/lib
2017-11-07 08:47:48 +01:00
cp libiniparser.so.1 $out/lib
ln -s libiniparser.so.1 $out/lib/libiniparser.so
'';
2017-11-07 08:47:48 +01:00
meta = with stdenv.lib; {
2017-10-20 20:37:36 +02:00
inherit (src.meta) homepage;
description = "Free standalone ini file parsing library";
2017-11-07 08:47:48 +01:00
license = licenses.mit;
platforms = platforms.unix;
maintainers = [ maintainers.primeos ];
};
}