Skip to content
Permalink
Browse files

iniparser: 3.1 -> 4.0

  • Loading branch information
peterhoeg committed Jul 26, 2017
1 parent 1e1472e commit c05c2692b552f03d56428b2fb59ff548c30e2d1b
Showing with 27 additions and 34 deletions.
  1. +27 −20 pkgs/development/libraries/iniparser/default.nix
  2. +0 −14 pkgs/development/libraries/iniparser/no-usr.patch
@@ -1,44 +1,51 @@
{ stdenv, fetchurl }:
{ stdenv, fetchFromGitHub, doxygen }:

let
inherit (stdenv.lib) optional;
in
stdenv.mkDerivation rec{
name = "iniparser-3.1";

src = fetchurl {
url = "${meta.homepage}/iniparser-3.1.tar.gz";
sha256 = "1igmxzcy0s25zcy9vmcw0kd13lh60r0b4qg8lnp1jic33f427pxf";
name = "iniparser-${version}";
version = "4.0";

src = fetchFromGitHub {
owner = "ndevilla";
repo = "iniparser";
rev = "v${version}";
sha256 = "0339qa0qxa5z02xjcs5my8v91v0r9jm4piswrl1sa29kwyxgv5nb";
};

patches = ./no-usr.patch;
nativeBuildInputs = [ doxygen ];

prePatch = ''
substituteInPlace Makefile \
--replace 'LDFLAGS += -Wl,-rpath -Wl,/usr/lib -Wl,-rpath,/usr/lib' ""
patchShebangs test
'';

# TODO: Build dylib on Darwin
buildFlags = (if stdenv.isDarwin then [ "libiniparser.a" ] else [ "libiniparser.so" ]) ++ [ "CC=cc" ];
buildFlags = [ "docs" ] ++ (if stdenv.isDarwin then [ "libiniparser.a" ] else [ "libiniparser.so" ]);

doCheck = true;

# After v4.0, soname changes to .1
installPhase = ''
mkdir -p $out/lib
mkdir -p $out/{include,lib,share/doc/${name}}
mkdir -p $out/include
cp src/*.h $out/include
mkdir -p $out/share/doc/${name}
for i in AUTHORS INSTALL LICENSE README; do
for i in AUTHORS FAQ* INSTALL LICENSE README* ; do
bzip2 -c -9 $i > $out/share/doc/${name}/$i.bz2;
done;
cp -r html $out/share/doc/${name}
'' + (if stdenv.isDarwin then ''
cp libiniparser.a $out/lib
'' else ''
cp libiniparser.so.0 $out/lib
ln -s libiniparser.so.0 $out/lib/libiniparser.so
'');

meta = {
homepage = http://ndevilla.free.fr/iniparser;
meta = with stdenv.lib; {
description = "Free standalone ini file parsing library";
license = stdenv.lib.licenses.mit;
platforms = stdenv.lib.platforms.unix;
homepage = http://ndevilla.free.fr/iniparser;
license = licenses.mit;
platforms = platforms.unix;
};
}

This file was deleted.

0 comments on commit c05c269

Please sign in to comment.
You can’t perform that action at this time.