mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 03:43:06 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
42 lines
1.2 KiB
Nix
42 lines
1.2 KiB
Nix
{ lib, stdenv, fetchFromGitLab, fetchurl, autoconf-archive, autoreconfHook, pkg-config, python3 }:
|
|
let
|
|
chromium_version = "90.0.4417.1";
|
|
|
|
hsts_list = fetchurl {
|
|
url = "https://raw.github.com/chromium/chromium/${chromium_version}/net/http/transport_security_state_static.json";
|
|
sha256 = "09f24n30x5dmqk8zk7k2glcilgr27832a3304wj1yp97158sqsfx";
|
|
};
|
|
|
|
in
|
|
stdenv.mkDerivation rec {
|
|
pname = "libhsts";
|
|
version = "0.1.0";
|
|
|
|
src = fetchFromGitLab {
|
|
owner = "rockdaboot";
|
|
repo = pname;
|
|
rev = "libhsts-${version}";
|
|
sha256 = "0gbchzf0f4xzb6zjc56dk74hqrmdgyirmgxvvsqp9vqn9wb5kkx4";
|
|
};
|
|
|
|
postPatch = ''
|
|
pushd tests
|
|
cp ${hsts_list} transport_security_state_static.json
|
|
sed 's/^ *\/\/.*$//g' transport_security_state_static.json >hsts.json
|
|
popd
|
|
patchShebangs src/hsts-make-dafsa
|
|
'';
|
|
|
|
nativeBuildInputs = [ autoconf-archive autoreconfHook pkg-config python3 ];
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
meta = with lib; {
|
|
description = "Library to easily check a domain against the Chromium HSTS Preload list";
|
|
mainProgram = "hsts";
|
|
homepage = "https://gitlab.com/rockdaboot/libhsts";
|
|
license = with licenses; [ mit bsd3 ];
|
|
maintainers = [ ];
|
|
};
|
|
}
|