From ac33384e6ba5623f59c8ad509da604ca4a9e7def Mon Sep 17 00:00:00 2001 From: Albert Safin Date: Sun, 4 Aug 2024 13:06:22 +0000 Subject: [PATCH 1/4] libcutl: move to by-name --- .../libcutl/default.nix => by-name/li/libcutl/package.nix} | 0 pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 2 deletions(-) rename pkgs/{development/libraries/libcutl/default.nix => by-name/li/libcutl/package.nix} (100%) diff --git a/pkgs/development/libraries/libcutl/default.nix b/pkgs/by-name/li/libcutl/package.nix similarity index 100% rename from pkgs/development/libraries/libcutl/default.nix rename to pkgs/by-name/li/libcutl/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8c1fc93249ff..68e6765cf2c6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21520,8 +21520,6 @@ with pkgs; libcue = callPackage ../development/libraries/libcue { }; - libcutl = callPackage ../development/libraries/libcutl { }; - libcxxrt = callPackage ../development/libraries/libcxxrt { stdenv = if stdenv.hostPlatform.useLLVM or false then overrideCC stdenv buildPackages.llvmPackages.tools.clangNoLibcxx From e27beb11bb75d45689b449bf7bddc6b157a3f530 Mon Sep 17 00:00:00 2001 From: Albert Safin Date: Sun, 4 Aug 2024 13:19:55 +0000 Subject: [PATCH 2/4] libcutl: modernize --- pkgs/by-name/li/libcutl/package.nix | 48 +++++++++++++++-------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/pkgs/by-name/li/libcutl/package.nix b/pkgs/by-name/li/libcutl/package.nix index f514d3c00a68..9e3edb91e714 100644 --- a/pkgs/by-name/li/libcutl/package.nix +++ b/pkgs/by-name/li/libcutl/package.nix @@ -1,34 +1,36 @@ -{ lib, gccStdenv, fetchurl, xercesc }: +{ + fetchurl, + gccStdenv, + lib, + xercesc, +}: -let - stdenv = gccStdenv; -in -stdenv.mkDerivation rec { +gccStdenv.mkDerivation (finalAttrs: { pname = "libcutl"; version = "1.10.0"; - meta = with lib; { - description = "C++ utility library from Code Synthesis"; - longDescription = '' - libcutl is a C++ utility library. - It contains a collection of generic and independent components such as - meta-programming tests, smart pointers, containers, compiler building blocks, etc. - ''; - homepage = "https://codesynthesis.com/projects/libcutl/"; - changelog = "https://git.codesynthesis.com/cgit/libcutl/libcutl/plain/NEWS?h=${version}"; - platforms = platforms.all; - maintainers = [ ]; - license = licenses.mit; - }; - - majmin = builtins.head ( builtins.match "([[:digit:]]\\.[[:digit:]]+).*" "${version}" ); src = fetchurl { - url = "https://codesynthesis.com/download/${pname}/${majmin}/${pname}-${version}.tar.bz2"; - sha256 = "070j2x02m4gm1fn7gnymrkbdxflgzxwl7m96aryv8wp3f3366l8j"; + url = "https://codesynthesis.com/download/libcutl/${lib.versions.majorMinor finalAttrs.version}/libcutl-${finalAttrs.version}.tar.bz2"; + hash = "sha256-ElFjxnDjcrR9VibVQ3n/j7re1szV23esC/WRKkAXEhw="; }; buildInputs = [ xercesc ]; + enableParallelBuilding = true; env.NIX_CFLAGS_COMPILE = toString [ "-std=c++14" ]; -} + + meta = { + description = "C++ utility library from Code Synthesis"; + longDescription = '' + libcutl is a C++ utility library. + It contains a collection of generic and independent components such as + meta-programming tests, smart pointers, containers, compiler building blocks, etc. + ''; + homepage = "https://codesynthesis.com/projects/libcutl/"; + changelog = "https://git.codesynthesis.com/cgit/libcutl/libcutl/plain/NEWS?h=${finalAttrs.version}"; + platforms = lib.platforms.all; + maintainers = [ ]; + license = lib.licenses.mit; + }; +}) From 7021d076502c5dd4402e3343d6a05dea64873c4c Mon Sep 17 00:00:00 2001 From: Albert Safin Date: Sun, 4 Aug 2024 13:56:17 +0000 Subject: [PATCH 3/4] libcutl: 1.10.0 -> 1.11.0 --- pkgs/by-name/li/libcutl/package.nix | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/pkgs/by-name/li/libcutl/package.nix b/pkgs/by-name/li/libcutl/package.nix index 9e3edb91e714..9835b560eef2 100644 --- a/pkgs/by-name/li/libcutl/package.nix +++ b/pkgs/by-name/li/libcutl/package.nix @@ -1,5 +1,6 @@ { - fetchurl, + build2, + fetchgit, gccStdenv, lib, xercesc, @@ -7,18 +8,21 @@ gccStdenv.mkDerivation (finalAttrs: { pname = "libcutl"; - version = "1.10.0"; + version = "1.11.0"; - src = fetchurl { - url = "https://codesynthesis.com/download/libcutl/${lib.versions.majorMinor finalAttrs.version}/libcutl-${finalAttrs.version}.tar.bz2"; - hash = "sha256-ElFjxnDjcrR9VibVQ3n/j7re1szV23esC/WRKkAXEhw="; + src = fetchgit { + url = "https://git.codesynthesis.com/libcutl/libcutl.git"; + rev = "refs/tags/v${finalAttrs.version}"; + hash = "sha256-LY2ZyxduI6xftVjVqjNkhYPFTL5bvHC289Qcei1Kiw4="; }; + nativeBuildInputs = [ build2 ]; + buildInputs = [ xercesc ]; enableParallelBuilding = true; - env.NIX_CFLAGS_COMPILE = toString [ "-std=c++14" ]; + doCheck = true; meta = { description = "C++ utility library from Code Synthesis"; @@ -28,7 +32,7 @@ gccStdenv.mkDerivation (finalAttrs: { meta-programming tests, smart pointers, containers, compiler building blocks, etc. ''; homepage = "https://codesynthesis.com/projects/libcutl/"; - changelog = "https://git.codesynthesis.com/cgit/libcutl/libcutl/plain/NEWS?h=${finalAttrs.version}"; + changelog = "https://git.codesynthesis.com/cgit/libcutl/libcutl/log/"; platforms = lib.platforms.all; maintainers = [ ]; license = lib.licenses.mit; From e4bd479a7f167ecf90459e9d97c4cc11563cc61f Mon Sep 17 00:00:00 2001 From: Albert Safin Date: Sun, 4 Aug 2024 14:14:18 +0000 Subject: [PATCH 4/4] libcutl: adopt --- pkgs/by-name/li/libcutl/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/li/libcutl/package.nix b/pkgs/by-name/li/libcutl/package.nix index 9835b560eef2..b6620c955537 100644 --- a/pkgs/by-name/li/libcutl/package.nix +++ b/pkgs/by-name/li/libcutl/package.nix @@ -34,7 +34,7 @@ gccStdenv.mkDerivation (finalAttrs: { homepage = "https://codesynthesis.com/projects/libcutl/"; changelog = "https://git.codesynthesis.com/cgit/libcutl/libcutl/log/"; platforms = lib.platforms.all; - maintainers = [ ]; + maintainers = [ lib.maintainers.xzfc ]; license = lib.licenses.mit; }; })