15 stdenv.mkDerivation (finalAttrs: {
19 src = fetchFromGitLab {
22 rev = "v${finalAttrs.version}";
23 hash = "sha256-R069LuOmjCFj7dHXiMjuK7WUupk5+dVd8IDKY/wBn2o=";
26 patches = lib.optionals finalAttrs.finalPackage.doCheck [
28 # Do not let cmake's fetchContent download unity
29 src = ./remove-fetchcontent-usage.patch;
30 unitySrc = symlinkJoin {
31 name = "unity-with-iniparser-config";
34 owner = "throwtheswitch";
37 hash = "sha256-SCcUGNN/UJlu3ALJiZ9bQKxYRZey3cm9QG+NOehp6Ow=";
41 ln -s ${finalAttrs.src}/test/unity_config.h $out/src/unity_config.h
51 ] ++ lib.optionals finalAttrs.finalPackage.doCheck [ ruby ];
53 cmakeFlags = [ "-DBUILD_TESTING=${if finalAttrs.finalPackage.doCheck then "ON" else "OFF"}" ];
58 ln -sv $out/include/iniparser/*.h $out/include/
62 pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
63 iniparser-with-tests = finalAttrs.overrideAttrs (_: {
69 homepage = "https://gitlab.com/iniparser/iniparser";
70 description = "Free standalone ini file parsing library";
71 changelog = "https://gitlab.com/iniparser/iniparser/-/releases/v${finalAttrs.version}";
72 license = licenses.mit;
73 platforms = platforms.unix;
74 pkgConfigModules = [ "iniparser" ];
75 maintainers = [ maintainers.primeos ];