Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / sev-snp-measure / default.nix
blob5293bc1179c0c12f4e0217fdf3c825df7d131aa1
1 { buildPythonPackage
2 , cryptography
3 , fetchFromGitHub
4 , lib
5 , pythonRelaxDepsHook
6 , setuptools
7 }:
9 buildPythonPackage rec {
10   pname = "sev-snp-measure";
11   version = "0.0.9";
13   pyproject = true;
15   src = fetchFromGitHub {
16     owner = "virtee";
17     repo = "sev-snp-measure";
18     rev = "v${version}";
19     hash = "sha256-efW4DMple26S3Jizc7yAvdPjVivyMJq4fEdkuToamGc=";
20   };
22   nativeBuildInputs = [
23     setuptools
24     pythonRelaxDepsHook
25   ];
27   pythonRelaxDeps = [ "cryptography" ];
29   propagatedBuildInputs = [ cryptography ];
31   postPatch = ''
32     # See https://github.com/virtee/sev-snp-measure/pull/46
33     sed -i '/types-cryptography/d' setup.cfg requirements.txt
34   '';
36   pythonImportsCheck = [ "sevsnpmeasure" ];
38   meta = {
39     description = "Calculate AMD SEV/SEV-ES/SEV-SNP measurement for confidential computing";
40     homepage = "https://github.com/virtee/sev-snp-measure";
41     changelog = "https://github.com/virtee/sev-snp-measure/releases/tag/v${version}";
42     license = lib.licenses.asl20;
43     maintainers = with lib.maintainers; [ msanft ];
44     mainProgram = "sev-snp-measure";
45   };