xz: Add meta.pkgConfigModules

This commit is contained in:
Rodney Lorrimar 2024-02-09 21:12:46 +08:00
parent 35a202a65e
commit a20c0d5675
No known key found for this signature in database
GPG Key ID: D8B75C95FB4D1143

View File

@ -1,6 +1,7 @@
{ lib, stdenv, fetchurl { lib, stdenv, fetchurl
, enableStatic ? stdenv.hostPlatform.isStatic , enableStatic ? stdenv.hostPlatform.isStatic
, writeScript , writeScript
, testers
}: }:
# Note: this package is used for bootstrapping fetchurl, and thus # Note: this package is used for bootstrapping fetchurl, and thus
@ -8,12 +9,12 @@
# cgit) that are needed here should be included directly in Nixpkgs as # cgit) that are needed here should be included directly in Nixpkgs as
# files. # files.
stdenv.mkDerivation rec { stdenv.mkDerivation (finalAttrs: {
pname = "xz"; pname = "xz";
version = "5.4.6"; version = "5.4.6";
src = fetchurl { src = fetchurl {
url = "https://github.com/tukaani-project/xz/releases/download/v${version}/xz-${version}.tar.bz2"; url = with finalAttrs; "https://github.com/tukaani-project/xz/releases/download/v${version}/xz-${version}.tar.bz2";
sha256 = "sha256-kThRsnTo4dMXgeyUnxwj6NvPDs9uc6JDbcIXad0+b0k="; sha256 = "sha256-kThRsnTo4dMXgeyUnxwj6NvPDs9uc6JDbcIXad0+b0k=";
}; };
@ -47,8 +48,11 @@ stdenv.mkDerivation rec {
new_version="$(curl -s https://tukaani.org/xz/ | new_version="$(curl -s https://tukaani.org/xz/ |
pcregrep -o1 '>xz-([0-9.]+)[.]tar[.]bz2</a>' | pcregrep -o1 '>xz-([0-9.]+)[.]tar[.]bz2</a>' |
head -n1)" head -n1)"
update-source-version ${pname} "$new_version" update-source-version ${finalAttrs.pname} "$new_version"
''; '';
tests.pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
};
}; };
meta = with lib; { meta = with lib; {
@ -72,5 +76,6 @@ stdenv.mkDerivation rec {
license = with licenses; [ gpl2Plus lgpl21Plus ]; license = with licenses; [ gpl2Plus lgpl21Plus ];
maintainers = with maintainers; [ sander ]; maintainers = with maintainers; [ sander ];
platforms = platforms.all; platforms = platforms.all;
pkgConfigModules = [ "liblzma" ];
}; };
} })