Merge pull request #302070 from anthonyroussel/samba-add-pkg-config-testers

samba,ldb: add meta.pkgConfigModules, passthru.tests.{pkg-config,version}
This commit is contained in:
Mario Rodas 2024-04-19 19:48:14 -05:00 committed by GitHub
commit d1b9eb7e07
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 37 additions and 8 deletions

View file

@ -13,14 +13,15 @@
, cmocka
, wafHook
, libxcrypt
, testers
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "ldb";
version = "2.9.0";
src = fetchurl {
url = "mirror://samba/ldb/${pname}-${version}.tar.gz";
url = "mirror://samba/ldb/${finalAttrs.pname}-${finalAttrs.version}.tar.gz";
hash = "sha256-EFqv9xrYgaf661gv1BauKCIbb94zj/+CgoBlBiwlB6U=";
};
@ -70,11 +71,16 @@ stdenv.mkDerivation rec {
stripDebugList = [ "bin" "lib" "modules" ];
passthru.tests.pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
};
meta = with lib; {
broken = stdenv.isDarwin;
description = "A LDAP-like embedded database";
homepage = "https://ldb.samba.org/";
license = licenses.lgpl3Plus;
pkgConfigModules = [ "ldb" ];
platforms = platforms.all;
};
}
})

View file

@ -35,6 +35,7 @@
, python3Packages
, nixosTests
, libiconv
, testers
, enableLDAP ? false, openldap
, enablePrinting ? false, cups
@ -60,12 +61,12 @@ let
inherit python;
};
in
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "samba";
version = "4.20.0";
src = fetchurl {
url = "mirror://samba/pub/samba/stable/${pname}-${version}.tar.gz";
url = "mirror://samba/pub/samba/stable/${finalAttrs.pname}-${finalAttrs.version}.tar.gz";
hash = "sha256-AmclQlEKxuXQyRwMFNkKtObsOXxwnpUsbaOm4LTVpC8=";
};
@ -239,8 +240,15 @@ stdenv.mkDerivation rec {
lib.optionals (buildPackages.python3Packages.python != python3Packages.python)
[ buildPackages.python3Packages.python ];
passthru = {
tests.samba = nixosTests.samba;
passthru.tests = {
samba = nixosTests.samba;
pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
};
version = testers.testVersion {
command = "${finalAttrs.finalPackage}/bin/smbd -V";
package = finalAttrs.finalPackage;
};
};
meta = with lib; {
@ -250,5 +258,20 @@ stdenv.mkDerivation rec {
platforms = platforms.unix;
broken = enableGlusterFS;
maintainers = with maintainers; [ aneeshusa ];
pkgConfigModules = [
"dcerpc_samr"
"dcerpc"
"ndr_krb5pac"
"ndr_nbt"
"ndr_standard"
"ndr"
"netapi"
"samba-credentials"
"samba-hostconfig"
"samba-util"
"samdb"
"smbclient"
"wbclient"
];
};
}
})