From 1eaa723200b97fe2738336c939c911ef924dd482 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sun, 27 Oct 2024 11:12:01 +0100 Subject: [PATCH 1/3] libconfig: adopt package by stv0g --- pkgs/development/libraries/libconfig/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libconfig/default.nix b/pkgs/development/libraries/libconfig/default.nix index 049b0c8f4fb8..0c828a38a694 100644 --- a/pkgs/development/libraries/libconfig/default.nix +++ b/pkgs/development/libraries/libconfig/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { homepage = "http://www.hyperrealm.com/libconfig"; description = "Simple library for processing structured configuration files"; license = licenses.lgpl3; - maintainers = [ ]; + maintainers = with maintainers; [ stv0g ]; platforms = platforms.all; }; } From 3d8be32059054d0763d32efdd5e0a58b25922f60 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sun, 27 Oct 2024 11:12:17 +0100 Subject: [PATCH 2/3] libconfig: refactor derivation --- .../libraries/libconfig/default.nix | 38 ++++++++++--------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/pkgs/development/libraries/libconfig/default.nix b/pkgs/development/libraries/libconfig/default.nix index 0c828a38a694..f0cc94171531 100644 --- a/pkgs/development/libraries/libconfig/default.nix +++ b/pkgs/development/libraries/libconfig/default.nix @@ -1,32 +1,34 @@ -{ lib -, stdenv -, fetchurl -, # this also disables building tests. +{ + lib, + stdenv, + fetchurl, + # This also disables building tests. # on static windows cross-compile they fail to build - doCheck ? with stdenv.hostPlatform; !(isWindows && isStatic) + doCheck ? with stdenv.hostPlatform; !(isWindows && isStatic), }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "libconfig"; version = "1.7.3"; src = fetchurl { - url = "https://hyperrealm.github.io/${pname}/dist/${pname}-${version}.tar.gz"; - sha256 = "sha256-VFFm1srAN3RDgdHpzFpUBQlOe/rRakEWmbz/QLuzHuc="; + url = "https://hyperrealm.github.io/${finalAttrs.pname}/dist/${finalAttrs.pname}-${finalAttrs.version}.tar.gz"; + hash = "sha256-VFFm1srAN3RDgdHpzFpUBQlOe/rRakEWmbz/QLuzHuc="; }; inherit doCheck; - configureFlags = lib.optional (stdenv.hostPlatform.isWindows || stdenv.hostPlatform.isStatic) "--disable-examples" - ++ lib.optional (!doCheck) "--disable-tests"; + configureFlags = + lib.optional (stdenv.hostPlatform.isWindows || stdenv.hostPlatform.isStatic) "--disable-examples" + ++ lib.optional (!finalAttrs.doCheck) "--disable-tests"; - cmakeFlags = lib.optionals (!doCheck) [ "-DBUILD_TESTS:BOOL=OFF" ]; + cmakeFlags = lib.optionals (!finalAttrs.doCheck) [ "-DBUILD_TESTS:BOOL=OFF" ]; - meta = with lib; { - homepage = "http://www.hyperrealm.com/libconfig"; - description = "Simple library for processing structured configuration files"; - license = licenses.lgpl3; - maintainers = with maintainers; [ stv0g ]; - platforms = platforms.all; + meta = { + homepage = "https://hyperrealm.github.io/libconfig/"; + description = "C/C++ library for processing configuration files"; + license = lib.licenses.lgpl3; + maintainers = with lib.maintainers; [ stv0g ]; + platforms = lib.platforms.all; }; -} +}) From 05749c700270e1c3c6b31a764e7b463218382891 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sun, 27 Oct 2024 11:21:37 +0100 Subject: [PATCH 3/3] libconfig: migrate to by-name --- .../libconfig/default.nix => by-name/li/libconfig/package.nix} | 0 pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 2 deletions(-) rename pkgs/{development/libraries/libconfig/default.nix => by-name/li/libconfig/package.nix} (100%) diff --git a/pkgs/development/libraries/libconfig/default.nix b/pkgs/by-name/li/libconfig/package.nix similarity index 100% rename from pkgs/development/libraries/libconfig/default.nix rename to pkgs/by-name/li/libconfig/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 46bc00824633..4c6a293bb64b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9587,8 +9587,6 @@ with pkgs; libcork = callPackage ../development/libraries/libcork { }; - libconfig = callPackage ../development/libraries/libconfig { }; - libcmis = callPackage ../development/libraries/libcmis { }; libee = callPackage ../development/libraries/libee { };