nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 47 lines 1.1 kB view raw
1{ 2 lib, 3 rel, 4 buildKodiAddon, 5 fetchzip, 6 addonUpdateScript, 7 cacert, 8}: 9buildKodiAddon rec { 10 pname = "certifi"; 11 namespace = "script.module.certifi"; 12 version = "2023.5.7"; 13 14 src = fetchzip { 15 url = "https://mirrors.kodi.tv/addons/${lib.toLower rel}/${namespace}/${namespace}-${version}.zip"; 16 sha256 = "sha256-NQbjx+k9fnQMYLLMR5+N5NSuDcXEzZjlhGPA3qSmjfI="; 17 }; 18 19 patches = [ 20 # Add support for NIX_SSL_CERT_FILE 21 ./env.patch 22 ]; 23 24 postPatch = '' 25 # Use our system-wide ca-bundle instead of the bundled one 26 ln -snvf "${cacert}/etc/ssl/certs/ca-bundle.crt" "lib/certifi/cacert.pem" 27 ''; 28 29 propagatedNativeBuildInputs = [ 30 # propagate cacerts setup-hook to set up `NIX_SSL_CERT_FILE` 31 cacert 32 ]; 33 34 passthru = { 35 pythonPath = "lib"; 36 updateScript = addonUpdateScript { 37 attrPath = "kodi.packages.certifi"; 38 }; 39 }; 40 41 meta = with lib; { 42 homepage = "https://certifi.io"; 43 description = "Python package for providing Mozilla's CA Bundle"; 44 license = licenses.mpl20; 45 teams = [ teams.kodi ]; 46 }; 47}