From e14a736b2ba3353f8a1b966e4ad65c8a82a0c62a Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Mon, 28 Oct 2024 10:09:01 -0400 Subject: [PATCH 1/2] tomlcpp: fix cross compilation --- pkgs/by-name/to/tomlcpp/package.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/to/tomlcpp/package.nix b/pkgs/by-name/to/tomlcpp/package.nix index f782719f2b63..244b389a2a81 100644 --- a/pkgs/by-name/to/tomlcpp/package.nix +++ b/pkgs/by-name/to/tomlcpp/package.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub }: +{ lib, stdenv, fetchFromGitHub, fetchpatch }: stdenv.mkDerivation rec { pname = "tomlcpp"; @@ -11,6 +11,15 @@ stdenv.mkDerivation rec { hash = "sha256-PM3gURXhyTZr59BWuLHvltjKOlKUSBT9/rqTeX5V//k="; }; + patches = [ + (fetchpatch { + # Use implicit $AR variable in Makefile + # https://github.com/cktan/tomlcpp/pull/6 + url = "https://github.com/cktan/tomlcpp/commit/abdb4e0db8b27f719434f5a0d6ec0b1a6b086ded.patch"; + hash = "sha256-SurUKdAZNWqBC7ss5nv5mDnJyC3DqxG/Q/FweTrkLnk="; + }) + ]; + dontConfigure = true; installFlags = [ From 0972b99f5ad98377f32dcf8f12dd2b68aa2e0528 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Mon, 28 Oct 2024 10:09:44 -0400 Subject: [PATCH 2/2] tomlcpp: drop use of with lib --- pkgs/by-name/to/tomlcpp/package.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/to/tomlcpp/package.nix b/pkgs/by-name/to/tomlcpp/package.nix index 244b389a2a81..6f77fe1cc763 100644 --- a/pkgs/by-name/to/tomlcpp/package.nix +++ b/pkgs/by-name/to/tomlcpp/package.nix @@ -26,11 +26,11 @@ stdenv.mkDerivation rec { "prefix=${placeholder "out"}" ]; - meta = with lib;{ + meta = { homepage = "https://github.com/cktan/tomlcpp"; description = "No fanfare TOML C++ Library"; - license = licenses.mit; - maintainers = with maintainers; [ AndersonTorres ]; - platforms = with platforms; unix; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ AndersonTorres ]; + platforms = with lib.platforms; unix; }; }