Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
iniparser: 3.1 -> 4.0
- Loading branch information
Showing
2 changed files
with
27 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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.
Oops, something went wrong.