Files
nixpkgs/pkgs/by-name/li/libhsts/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

69 lines
1.4 KiB
Nix

{
lib,
stdenv,
fetchFromGitLab,
fetchurl,
autoconf-archive,
autoreconfHook,
pkg-config,
python3,
}:
let
chromium_version = "140.0.7324.1";
hsts_list = fetchurl {
url = "https://raw.github.com/chromium/chromium/${chromium_version}/net/http/transport_security_state_static.json";
hash = "sha256-XV3yZA3Ai4It7S/y4V0h+UtKm8SXm6x1hlITD7jGY9I=";
};
in
stdenv.mkDerivation rec {
pname = "libhsts";
version = "0.1.0";
outputs = [
"out"
"dev"
];
src = fetchFromGitLab {
owner = "rockdaboot";
repo = "libhsts";
tag = "libhsts-${version}";
hash = "sha256-pM9ZFk8W73Sx3ru/mqN/rWYMyZnNFCa/Wb8TB9yHbD0=";
};
patches = [
./gettext-0.25.patch
];
postPatch = ''
pushd tests
cp ${hsts_list} transport_security_state_static.json
# strip comments from json
sed 's/^ *\/\/.*$//g' transport_security_state_static.json >hsts.json
popd
patchShebangs src/hsts-make-dafsa
'';
nativeBuildInputs = [
autoconf-archive
autoreconfHook
pkg-config
python3
];
passthru.updateScript = ./update.sh;
meta = {
description = "Library to easily check a domain against the Chromium HSTS Preload list";
mainProgram = "hsts";
homepage = "https://gitlab.com/rockdaboot/libhsts";
license = with lib.licenses; [
mit
bsd3
];
maintainers = with lib.maintainers; [ SuperSandro2000 ];
};
}