p11-kit: 0.24.0 -> 0.24.1

* move binaries into bin output
* install Bash shell completions
* provides man pages
This commit is contained in:
c0bw3b 2022-01-18 22:02:24 +01:00
parent 1359b15b13
commit 7f881b8c63
2 changed files with 46 additions and 11 deletions

View file

@ -78,7 +78,7 @@ stdenv.mkDerivation rec {
# Hardcode paths used by Flatpak itself. # Hardcode paths used by Flatpak itself.
(substituteAll { (substituteAll {
src = ./fix-paths.patch; src = ./fix-paths.patch;
p11kit = "${p11-kit.dev}/bin/p11-kit"; p11kit = "${p11-kit.bin}/bin/p11-kit";
}) })
# Adapt paths exposed to sandbox for NixOS. # Adapt paths exposed to sandbox for NixOS.

View file

@ -1,34 +1,61 @@
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, which { lib
, gettext, libffi, libiconv, libtasn1 , stdenv
, fetchFromGitHub
, autoreconfHook
, docbook-xsl-nons
, gtk-doc
, installShellFiles
, libxslt # for xsltproc
, pkg-config
, which
, libffi
, libiconv
, libintl
, libtasn1
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "p11-kit"; pname = "p11-kit";
version = "0.24.0"; version = "0.24.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "p11-glue"; owner = "p11-glue";
repo = pname; repo = pname;
rev = version; rev = version;
sha256 = "sha256-jvUzOhMvbq05SxQ+kjKQHDDMzNwo4U6nFHu3JjygJHw="; hash = "sha256-1QIMEGBZsqLYU3v5ZswD5K9VcIGLBovJlC10lBHhH7c=";
}; };
outputs = [ "out" "dev"]; outputs = [ "out" "bin" "dev"];
outputBin = "dev";
# for cross platform builds of p11-kit, libtasn1 in nativeBuildInputs # For cross platform builds of p11-kit, libtasn1 in nativeBuildInputs
# provides the asn1Parser binary on the hostPlatform needed for building. # provides the asn1Parser binary on the hostPlatform needed for building.
# at the same time, libtasn1 in buildInputs provides the libasn1 library # at the same time, libtasn1 in buildInputs provides the libasn1 library
# to link against for the target platform. # to link against for the target platform.
# hence, libtasn1 is required in both native and build inputs. # Hence, libtasn1 is required in both native and build inputs.
nativeBuildInputs = [ autoreconfHook pkg-config which libtasn1 ]; nativeBuildInputs = [
buildInputs = [ gettext libffi libiconv libtasn1 ]; autoreconfHook
docbook-xsl-nons
gtk-doc
installShellFiles
libtasn1
libxslt.bin
pkg-config
which
];
buildInputs = [
libffi
libiconv
libintl
libtasn1
];
autoreconfPhase = '' autoreconfPhase = ''
NOCONFIGURE=1 ./autogen.sh NOCONFIGURE=1 ./autogen.sh
''; '';
configureFlags = [ configureFlags = [
"--enable-doc"
"--sysconfdir=/etc" "--sysconfdir=/etc"
"--localstatedir=/var" "--localstatedir=/var"
"--with-trust-paths=${lib.concatStringsSep ":" [ "--with-trust-paths=${lib.concatStringsSep ":" [
@ -53,6 +80,10 @@ stdenv.mkDerivation rec {
"exampledir=${placeholder "out"}/etc/pkcs11" "exampledir=${placeholder "out"}/etc/pkcs11"
]; ];
postInstall = ''
installShellCompletion --bash bash-completion/{p11-kit,trust}
'';
meta = with lib; { meta = with lib; {
description = "Library for loading and sharing PKCS#11 modules"; description = "Library for loading and sharing PKCS#11 modules";
longDescription = '' longDescription = ''
@ -61,6 +92,10 @@ stdenv.mkDerivation rec {
PKCS#11 modules in such a way that they're discoverable. PKCS#11 modules in such a way that they're discoverable.
''; '';
homepage = "https://p11-glue.github.io/p11-glue/p11-kit.html"; homepage = "https://p11-glue.github.io/p11-glue/p11-kit.html";
changelog = [
"https://github.com/p11-glue/p11-kit/raw/${version}/NEWS"
"https://github.com/p11-glue/p11-kit/releases/tag/${version}"
];
platforms = platforms.all; platforms = platforms.all;
license = licenses.bsd3; license = licenses.bsd3;
}; };