From caa9885f7c93ebc84fd67a82297fdc355a0804bc Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Tue, 26 Sep 2023 04:20:00 +0000 Subject: [PATCH 1/3] libfyaml: use finalAttrs pattern --- pkgs/development/libraries/libfyaml/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/libfyaml/default.nix b/pkgs/development/libraries/libfyaml/default.nix index 6fe2f398b25e..dd0926150aac 100644 --- a/pkgs/development/libraries/libfyaml/default.nix +++ b/pkgs/development/libraries/libfyaml/default.nix @@ -1,13 +1,13 @@ { lib, stdenv, fetchFromGitHub, pkg-config, autoreconfHook }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "libfyaml"; version = "0.8"; src = fetchFromGitHub { owner = "pantoniou"; - repo = pname; - rev = "v${version}"; + repo = "libfyaml"; + rev = "v${finalAttrs.version}"; hash = "sha256-b/jRKe23NIVSydoczI+Ax2VjBJLfAEwF8SW61vIDTwA="; }; @@ -28,4 +28,4 @@ stdenv.mkDerivation rec { maintainers = [ maintainers.marsam ]; platforms = platforms.all; }; -} +}) From d819d35ccdac50e38d77da4584535a20f182e95c Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Tue, 26 Sep 2023 04:20:00 +0000 Subject: [PATCH 2/3] libfyaml: add pkg-config tester --- pkgs/development/libraries/libfyaml/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libfyaml/default.nix b/pkgs/development/libraries/libfyaml/default.nix index dd0926150aac..e4d241415b22 100644 --- a/pkgs/development/libraries/libfyaml/default.nix +++ b/pkgs/development/libraries/libfyaml/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, pkg-config, autoreconfHook }: +{ lib, stdenv, fetchFromGitHub, pkg-config, autoreconfHook, testers }: stdenv.mkDerivation (finalAttrs: { pname = "libfyaml"; @@ -21,11 +21,16 @@ stdenv.mkDerivation (finalAttrs: { patchShebangs test ''; + passthru.tests.pkg-config = testers.hasPkgConfigModules { + package = finalAttrs.finalPackage; + }; + meta = with lib; { homepage = "https://github.com/pantoniou/libfyaml"; description = "Fully feature complete YAML parser and emitter, supporting the latest YAML spec and passing the full YAML testsuite"; license = licenses.mit; maintainers = [ maintainers.marsam ]; + pkgConfigModules = [ "libfyaml" ]; platforms = platforms.all; }; }) From a26464a00637757687c6844b2afe491839e8aeee Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Tue, 26 Sep 2023 04:20:00 +0000 Subject: [PATCH 3/3] libfyaml: 0.8 -> 0.9 Diff: https://github.com/pantoniou/libfyaml/compare/v0.8...v0.9 Changelog: https://github.com/pantoniou/libfyaml/releases/tag/v0.9 --- pkgs/development/libraries/libfyaml/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/libfyaml/default.nix b/pkgs/development/libraries/libfyaml/default.nix index e4d241415b22..f594d64095c4 100644 --- a/pkgs/development/libraries/libfyaml/default.nix +++ b/pkgs/development/libraries/libfyaml/default.nix @@ -2,19 +2,21 @@ stdenv.mkDerivation (finalAttrs: { pname = "libfyaml"; - version = "0.8"; + version = "0.9"; src = fetchFromGitHub { owner = "pantoniou"; repo = "libfyaml"; rev = "v${finalAttrs.version}"; - hash = "sha256-b/jRKe23NIVSydoczI+Ax2VjBJLfAEwF8SW61vIDTwA="; + hash = "sha256-Id5pdFzjA9q67okfESO3LZH8jIz93mVgIEEuBbPjuGI="; }; nativeBuildInputs = [ autoreconfHook pkg-config ]; outputs = [ "bin" "dev" "out" "man" ]; + configureFlags = [ "--disable-network" ]; + doCheck = true; preCheck = '' @@ -26,8 +28,9 @@ stdenv.mkDerivation (finalAttrs: { }; meta = with lib; { - homepage = "https://github.com/pantoniou/libfyaml"; description = "Fully feature complete YAML parser and emitter, supporting the latest YAML spec and passing the full YAML testsuite"; + homepage = "https://github.com/pantoniou/libfyaml"; + changelog = "https://github.com/pantoniou/libfyaml/releases/tag/v${finalAttrs.version}"; license = licenses.mit; maintainers = [ maintainers.marsam ]; pkgConfigModules = [ "libfyaml" ];