From a89244a391f69ebf3c31f7cffef4452c5c57c07d Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Tue, 3 Sep 2024 17:29:54 +0200 Subject: [PATCH] keyutils: backport .pc file for static builds --- pkgs/os-specific/linux/keyutils/default.nix | 2 ++ .../linux/keyutils/pkg-config-static.patch | 28 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 pkgs/os-specific/linux/keyutils/pkg-config-static.patch diff --git a/pkgs/os-specific/linux/keyutils/default.nix b/pkgs/os-specific/linux/keyutils/default.nix index 342626624c7e..42ae3f2c0382 100644 --- a/pkgs/os-specific/linux/keyutils/default.nix +++ b/pkgs/os-specific/linux/keyutils/default.nix @@ -21,6 +21,8 @@ stdenv.mkDerivation rec { # nix-build -E 'with import ./. {}; pkgs.keyutils.override { stdenv = pkgs.clangStdenv; }' ./0001-Remove-unused-function-after_eq.patch + ./pkg-config-static.patch + # Fix build for s390-linux, where size_t is different from ptrdiff_t. (fetchurl { url = "https://lore.kernel.org/keyrings/20230301134250.301819-1-hi@alyssa.is/raw"; diff --git a/pkgs/os-specific/linux/keyutils/pkg-config-static.patch b/pkgs/os-specific/linux/keyutils/pkg-config-static.patch new file mode 100644 index 000000000000..a4ba141fd2a8 --- /dev/null +++ b/pkgs/os-specific/linux/keyutils/pkg-config-static.patch @@ -0,0 +1,28 @@ +From 4e58e9a45b87f9409d80a559984a3405d8d5a975 Mon Sep 17 00:00:00 2001 +From: Daniel Hill +Date: Tue, 28 Feb 2023 16:57:52 +1300 +Subject: Provide a pkgconfig file with libkeyutils.a + +Signed-off-by: Daniel Hill +Signed-off-by: David Howells +Link: https://lore.kernel.org/r/CAMtG=2qKrGC-QzPENXsV8_7VBbi6sEnA6joV=SL8MQP1pfV8KA@mail.gmail.com/ +--- + Makefile | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/Makefile b/Makefile +index 599b145..d8d4ee3 100644 +--- a/Makefile ++++ b/Makefile +@@ -201,6 +201,8 @@ ifeq ($(NO_SOLIB),0) + $(LNS) $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SONAME) + mkdir -p $(DESTDIR)$(USRLIBDIR) + $(LNS) $(LIBDIR)/$(SONAME) $(DESTDIR)$(USRLIBDIR)/$(DEVELLIB) ++endif ++ifneq ($(filter 0, $(NO_ARLIB) $(NO_SOLIB)),) + sed \ + -e 's,@VERSION\@,$(VERSION),g' \ + -e 's,@prefix\@,$(PREFIX),g' \ +-- +cgit 1.2.3-korg +