2023-02-27 23:13:16 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "fortify-headers";
|
2023-08-27 12:06:11 +00:00
|
|
|
version = "1.1alpine3";
|
2023-02-27 23:13:16 +00:00
|
|
|
|
|
|
|
# upstream only accessible via git - unusable during bootstrap, hence
|
|
|
|
# extract from the alpine package
|
|
|
|
src = fetchurl {
|
2023-08-27 12:06:11 +00:00
|
|
|
url = "https://dl-cdn.alpinelinux.org/alpine/v3.18/main/x86_64/fortify-headers-1.1-r3.apk";
|
2023-02-27 23:13:16 +00:00
|
|
|
name = "fortify-headers.tar.gz"; # ensure it's extracted as a .tar.gz
|
2023-08-27 12:06:11 +00:00
|
|
|
hash = "sha256-8A8JcKHIBgXpUuIP4zs3Q1yBs5jCGd5F3H2E8UN/S2g=";
|
2023-02-27 23:13:16 +00:00
|
|
|
};
|
|
|
|
|
2023-08-29 20:50:40 +00:00
|
|
|
patches = [
|
|
|
|
./wchar-imports-skip.patch
|
2023-08-31 19:56:51 +00:00
|
|
|
./restore-macros.patch
|
2023-08-29 20:50:40 +00:00
|
|
|
];
|
|
|
|
|
2023-02-27 23:13:16 +00:00
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out
|
|
|
|
cp -r include/fortify $out/include
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Standalone header-based fortify-source implementation";
|
|
|
|
homepage = "https://git.2f30.org/fortify-headers";
|
|
|
|
license = lib.licenses.bsd0;
|
|
|
|
platforms = lib.platforms.all;
|
|
|
|
maintainers = with lib.maintainers; [ ris ];
|
|
|
|
};
|
|
|
|
}
|