-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
p11-kit: build with meson #244633
p11-kit: build with meson #244633
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,16 @@ | ||
{ lib | ||
, stdenv | ||
, fetchFromGitHub | ||
, autoreconfHook | ||
, docbook-xsl-nons | ||
, gtk-doc | ||
, installShellFiles | ||
, libxslt # for xsltproc | ||
, meson | ||
, ninja | ||
, pkg-config | ||
, which | ||
, libtasn1 | ||
, libxslt | ||
, docbook-xsl-nons | ||
, docbook_xml_dtd_43 | ||
, gettext | ||
, libffi | ||
, libiconv | ||
, libintl | ||
, libtasn1 | ||
}: | ||
|
||
stdenv.mkDerivation rec { | ||
|
@@ -25,65 +24,47 @@ stdenv.mkDerivation rec { | |
hash = "sha256-paLiRYgYshuedgDgW2nEsv4/Loq6qFyQMjfBJwqtHzw="; | ||
}; | ||
|
||
outputs = [ "out" "bin" "dev"]; | ||
outputs = [ "out" "bin" "dev" ]; | ||
|
||
strictDeps = true; | ||
|
||
# For cross platform builds of p11-kit, libtasn1 in nativeBuildInputs | ||
# provides the asn1Parser binary on the hostPlatform needed for building. | ||
# at the same time, libtasn1 in buildInputs provides the libasn1 library | ||
# to link against for the target platform. | ||
# Hence, libtasn1 is required in both native and build inputs. | ||
nativeBuildInputs = [ | ||
autoreconfHook | ||
docbook-xsl-nons | ||
gtk-doc | ||
installShellFiles | ||
libtasn1 | ||
libxslt.bin | ||
meson | ||
ninja | ||
pkg-config | ||
which | ||
libtasn1 # asn1Parser | ||
libxslt # xsltproc | ||
docbook-xsl-nons | ||
docbook_xml_dtd_43 | ||
gettext | ||
]; | ||
|
||
buildInputs = [ | ||
libffi | ||
libiconv | ||
libintl | ||
libtasn1 | ||
libintl | ||
]; | ||
|
||
autoreconfPhase = '' | ||
NOCONFIGURE=1 ./autogen.sh | ||
''; | ||
|
||
configureFlags = [ | ||
"--enable-doc" | ||
mesonFlags = [ | ||
"--sysconfdir=/etc" | ||
"--localstatedir=/var" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be passed the same way to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
"--with-trust-paths=${lib.concatStringsSep ":" [ | ||
"/etc/ssl/trust-source" # p11-kit trust source | ||
"/etc/ssl/certs/ca-certificates.crt" # NixOS + Debian/Ubuntu/Arch/Gentoo... | ||
"/etc/pki/tls/certs/ca-bundle.crt" # Fedora/CentOS | ||
(lib.mesonBool "man" true) | ||
(lib.mesonEnable "systemd" false) | ||
(lib.mesonOption "bashcompdir" "${placeholder "bin"}/share/bash-completion/completions") | ||
(lib.mesonOption "trust_paths" (lib.concatStringsSep ":" [ | ||
"/etc/ssl/trust-source" # p11-kit trust source | ||
"/etc/ssl/certs/ca-certificates.crt" # NixOS + Debian/Ubuntu/Arch/Gentoo... | ||
"/etc/pki/tls/certs/ca-bundle.crt" # Fedora/CentOS | ||
"/var/lib/ca-certificates/ca-bundle.pem" # openSUSE | ||
"/etc/ssl/cert.pem" # Darwin/macOS | ||
]}" | ||
"/etc/ssl/cert.pem" # Darwin/macOS | ||
])) | ||
]; | ||
|
||
enableParallelBuilding = true; | ||
|
||
# Tests run in fakeroot for non-root users | ||
preCheck = '' | ||
if [ "$(id -u)" != "0" ]; then | ||
export FAKED_MODE=1 | ||
fi | ||
''; | ||
|
||
doCheck = !stdenv.isDarwin; | ||
|
||
installFlags = [ | ||
"exampledir=${placeholder "out"}/etc/pkcs11" | ||
]; | ||
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; | ||
|
||
postInstall = '' | ||
installShellCompletion --bash bash-completion/{p11-kit,trust} | ||
postPatch = '' | ||
# Install sample config files to $out/etc even though they will be loaded from /etc. | ||
substituteInPlace p11-kit/meson.build \ | ||
--replace 'install_dir: prefix / p11_system_config' "install_dir: '$out/etc/pkcs11'" | ||
''; | ||
|
||
meta = with lib; { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
p11_system_config_modules
in pkg-config file changed$out/share/p11-kit/modules
/etc/pkcs11/modules
, not sure if it is an issue.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$out/share/p11-kit/modules
seems empty, I assume/etc/pkcs11/modules
might be the intended path?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable is reference in
meson.build
ofgcr
, but still not used else where https://github.com/GNOME/gcr/blob/c8d2e0f44bdb91b63ed04dedf7b272211dc46c6e/meson.build#L56There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See also: https://p11-glue.github.io/p11-glue/p11-kit/manual/pkcs11-conf.html#config-locations