Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / karton-asciimagic / default.nix
blobf62e602896b3ca250345fd871d781595a4c100e1
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , karton-core
5 , python
6 }:
8 buildPythonPackage rec {
9   pname = "karton-asciimagic";
10   version = "1.0.0";
12   src = fetchFromGitHub {
13     owner = "CERT-Polska";
14     repo = pname;
15     rev = "v${version}";
16     sha256 = "0yvd0plpwy5qkd2jljpd6wm6dlj2g8csvj1q2md23vsgx7h7v2vm";
17   };
19   propagatedBuildInputs = [
20     karton-core
21   ];
23   postPatch = ''
24     substituteInPlace requirements.txt \
25       --replace "karton.core==4.0.5" "karton-core"
26   '';
28   checkPhase = ''
29     runHook preCheck
30     ${python.interpreter} -m unittest discover
31     runHook postCheck
32   '';
34   pythonImportsCheck = [ "karton.asciimagic" ];
36   meta = with lib; {
37     description = "Decoders for ascii-encoded executables for the Karton framework";
38     homepage = "https://github.com/CERT-Polska/karton-asciimagic";
39     license = with licenses; [ bsd3 ];
40     maintainers = with maintainers; [ fab ];
41   };