Files
nixpkgs/pkgs/by-name/in/iniparser/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

79 lines
1.7 KiB
Nix

{
lib,
stdenv,
fetchFromGitLab,
fetchFromGitHub,
replaceVars,
symlinkJoin,
cmake,
doxygen,
ruby,
validatePkgConfig,
testers,
unity-test,
ctestCheckHook,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "iniparser";
version = "4.2.6";
src = fetchFromGitLab {
owner = "iniparser";
repo = "iniparser";
tag = "v${finalAttrs.version}";
hash = "sha256-z10S9ODLprd7CbL5Ecgh7H4eOwTetYwFXiWBUm6fIr4=";
};
patches = lib.optional finalAttrs.doCheck (
# 1. Do not fetch the Unity GitHub repository
# 2. Lookup the Unity pkgconfig file
# 3. Get the generate_test_runner.rb file from the Unity share directory
replaceVars ./remove-fetchcontent-usage.patch {
# Get the test generator
UNITY-GENERATE-TEST-RUNNER = "${unity-test}/share/generate_test_runner.rb";
}
);
nativeBuildInputs = [
cmake
doxygen
validatePkgConfig
];
cmakeFlags = [
(lib.cmakeBool "BUILD_TESTING" finalAttrs.doCheck)
];
doCheck = true;
nativeCheckInputs = [
ruby
ctestCheckHook
];
checkInputs = [
(
(unity-test.override {
supportDouble = true;
}).overrideAttrs
{
doCheck = false;
}
)
];
postFixup = ''
ln -sv $out/include/iniparser/*.h $out/include/
'';
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = {
homepage = "https://gitlab.com/iniparser/iniparser";
description = "Free standalone ini file parsing library";
changelog = "https://gitlab.com/iniparser/iniparser/-/releases/v${finalAttrs.version}";
license = lib.licenses.mit;
platforms = lib.platforms.unix;
pkgConfigModules = [ "iniparser" ];
maintainers = [ ];
};
})