summaryrefslogtreecommitdiffstats
path: root/pkgs/development/python-modules/python-apt/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/python-apt/default.nix')
-rw-r--r--pkgs/development/python-modules/python-apt/default.nix38
1 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/python-apt/default.nix b/pkgs/development/python-modules/python-apt/default.nix
new file mode 100644
index 000000000000..5d5a703a1afc
--- /dev/null
+++ b/pkgs/development/python-modules/python-apt/default.nix
@@ -0,0 +1,38 @@
+{
+ lib,
+ apt,
+ buildPythonPackage,
+ fetchgit,
+ setuptools,
+}:
+
+buildPythonPackage rec {
+ pname = "apt";
+ version = "2.7.6";
+
+ pyproject = true;
+
+ src = fetchgit {
+ url = "https://git.launchpad.net/python-apt";
+ rev = "refs/tags/${version}";
+ hash = "sha256-1jTe8ncMKV78+cfSZ6p6qdjxs0plZLB4VwVtPLtDlAc=";
+ };
+
+ buildInputs = [ apt.dev ];
+
+ nativeBuildInputs = [ setuptools ];
+
+ # Ensure the version is set properly without trying to invoke
+ # dpkg-parsechangelog
+ env.DEBVER = "${version}";
+
+ pythonImportsCheck = [ "apt_pkg" ];
+
+ meta = {
+ description = "Python bindings for APT";
+ homepage = "https://launchpad.net/python-apt";
+ license = lib.licenses.gpl2;
+ maintainers = with lib.maintainers; [ jnsgruk ];
+ platforms = lib.platforms.linux;
+ };
+}