lol

libhsts: ini at 0.1.0

+55
+40
pkgs/development/libraries/libhsts/default.nix
··· 1 + { lib, stdenv, fetchFromGitLab, fetchurl, autoconf-archive, autoreconfHook, pkg-config, python3 }: 2 + let 3 + chromium_version = "90.0.4417.1"; 4 + 5 + hsts_list = fetchurl { 6 + url = "https://raw.github.com/chromium/chromium/${chromium_version}/net/http/transport_security_state_static.json"; 7 + sha256 = "09f24n30x5dmqk8zk7k2glcilgr27832a3304wj1yp97158sqsfx"; 8 + }; 9 + 10 + in 11 + stdenv.mkDerivation rec { 12 + pname = "libhsts"; 13 + version = "0.1.0"; 14 + 15 + src = fetchFromGitLab { 16 + owner = "rockdaboot"; 17 + repo = pname; 18 + rev = "libhsts-${version}"; 19 + sha256 = "0gbchzf0f4xzb6zjc56dk74hqrmdgyirmgxvvsqp9vqn9wb5kkx4"; 20 + }; 21 + 22 + postPatch = '' 23 + pushd tests 24 + cp ${hsts_list} transport_security_state_static.json 25 + sed 's/^ *\/\/.*$//g' transport_security_state_static.json >hsts.json 26 + popd 27 + patchShebangs src/hsts-make-dafsa 28 + ''; 29 + 30 + nativeBuildInputs = [ autoconf-archive autoreconfHook pkg-config python3 ]; 31 + 32 + outputs = [ "out" "dev" ]; 33 + 34 + meta = with lib; { 35 + description = "Library to easily check a domain against the Chromium HSTS Preload list"; 36 + homepage = "https://gitlab.com/rockdaboot/libhsts"; 37 + license = with licenses; [ mit bsd3 ]; 38 + maintainers = with maintainers; [ SuperSandro2000 ]; 39 + }; 40 + }
+13
pkgs/development/libraries/libhsts/update.sh
··· 1 + #!/usr/bin/env nix-shell 2 + #!nix-shell -i bash -p curl jq 3 + 4 + set -euo pipefail -x 5 + 6 + cd "$(dirname "$0")" 7 + 8 + chromium_version=$(curl -s "https://api.github.com/repos/chromium/chromium/tags" | jq -r 'map(select(.prerelease | not)) | .[1].name') 9 + sha256=$(nix-prefetch-url "https://raw.github.com/chromium/chromium/$chromium_version/net/http/transport_security_state_static.json") 10 + 11 + sed -e "0,/chromium_version/s/chromium_version = \".*\"/chromium_version = \"$chromium_version\"/" \ 12 + -e "0,/sha256/s/sha256 = \".*\"/sha256 = \"$sha256\"/" \ 13 + --in-place ./default.nix
+2
pkgs/top-level/all-packages.nix
··· 13841 13841 13842 13842 libgit2-glib = callPackage ../development/libraries/libgit2-glib { }; 13843 13843 13844 + libhsts = callPackage ../development/libraries/libhsts { }; 13845 + 13844 13846 glbinding = callPackage ../development/libraries/glbinding { }; 13845 13847 13846 13848 gle = callPackage ../development/libraries/gle { };