Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions pkgs/development/python-modules/asn1/2.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
pytestCheckHook,
setuptools,
}:

buildPythonPackage rec {
pname = "asn1";
version = "2.8.0";
pyproject = true;

src = fetchFromGitHub {
owner = "andrivet";
repo = "python-asn1";
tag = "v${version}";
hash = "sha256-DLKfdQzYLhfaIEPPymTzRqj3+L/fsm5Jh8kqud/ezfw=";
};

build-system = [ setuptools ];

pythonRemoveDeps = [ "enum-compat" ];

nativeCheckInputs = [ pytestCheckHook ];

enabledTestPaths = [ "tests/test_asn1.py" ];

pythonImportsCheck = [ "asn1" ];

meta = {
description = "Python ASN.1 encoder and decoder";
longDescription = ''
Kept for consumers that cannot use asn1 3.x, where Decoder.read() returns
recursively decoded values for constructed tags instead of the raw contents.
'';
homepage = "https://github.com/andrivet/python-asn1";
changelog = "https://github.com/andrivet/python-asn1/blob/${src.tag}/CHANGELOG.rst";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
}
7 changes: 3 additions & 4 deletions pkgs/development/python-modules/pyimg4/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
apple-compress,
asn1,
asn1_2,
buildPythonPackage,
click,
fetchFromGitHub,
Expand Down Expand Up @@ -37,7 +37,8 @@ buildPythonPackage rec {
];

dependencies = [
asn1
# upstream pins asn1<3.0.0: https://github.com/m1stadev/PyIMG4/pull/59
asn1_2
click
pycryptodome
pylzss
Expand Down Expand Up @@ -66,8 +67,6 @@ buildPythonPackage rec {
];

meta = {
# https://github.com/m1stadev/PyIMG4/pull/59
broken = lib.versionAtLeast asn1.version "3";
changelog = "https://github.com/m1stadev/PyIMG4/releases/tag/${src.tag}";
description = "Python library/CLI tool for parsing Apple's Image4 format";
homepage = "https://github.com/m1stadev/PyIMG4";
Expand Down
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1393,6 +1393,8 @@ self: super: with self; {

asn1 = callPackage ../development/python-modules/asn1 { };

asn1_2 = callPackage ../development/python-modules/asn1/2.nix { };

asn1ate = callPackage ../development/python-modules/asn1ate { };

asn1crypto = callPackage ../development/python-modules/asn1crypto { };
Expand Down