From b982294b6f5a69d30180f498ffa561d568e0d1fb Mon Sep 17 00:00:00 2001
From: Henk Kalkwater <chris@netsoj.nl>
Date: Mon, 8 Nov 2021 22:50:05 +0100
Subject: [PATCH] python2.7-filelock: Init version 3.2.1 for Python 2

This adds filelock 3.2.1, the last version that still supports Python 2.

This fixes nixops, as it still was dependent on filelock for Python 2.
See #145109.
---
 maintainers/maintainer-list.nix                |  7 +++++++
 .../python-modules/filelock/3.2.nix            | 18 ++++++++++++++++++
 pkgs/top-level/python2-packages.nix            |  2 ++
 3 files changed, 27 insertions(+)
 create mode 100644 pkgs/development/python-modules/filelock/3.2.nix

diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix
index 26cd901552fb..44f322c32299 100644
--- a/maintainers/maintainer-list.nix
+++ b/maintainers/maintainer-list.nix
@@ -4550,6 +4550,13 @@
     githubId = 2405974;
     name = "Sébastian Méric de Bellefon";
   };
+  henkkalkwater = {
+    email = "chris+nixpkgs@netsoj.nl";
+    github = "HenkKalkwater";
+    githubId = 4262067;
+    matrix = "@chris:netsoj.nl";
+    name = "Chris Josten";
+  };
   henrikolsson = {
     email = "henrik@fixme.se";
     github = "henrikolsson";
diff --git a/pkgs/development/python-modules/filelock/3.2.nix b/pkgs/development/python-modules/filelock/3.2.nix
new file mode 100644
index 000000000000..3929361f7d8c
--- /dev/null
+++ b/pkgs/development/python-modules/filelock/3.2.nix
@@ -0,0 +1,18 @@
+{ lib, buildPythonPackage, fetchPypi }:
+
+buildPythonPackage rec {
+  pname = "filelock";
+  version = "3.2.1";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1qry67zv2pmz8px6wdfbjqv75nmryy2ac7asqgs6q6db2722kpcw";
+  };
+
+  meta = with lib; {
+    homepage = "https://github.com/benediktschmitt/py-filelock";
+    description = "A platform independent file lock for Python";
+    license = licenses.unlicense;
+    maintainers = with maintainers; [ henkkalkwater ];
+  };
+}
diff --git a/pkgs/top-level/python2-packages.nix b/pkgs/top-level/python2-packages.nix
index 927827b66e50..cce882a1c5b9 100644
--- a/pkgs/top-level/python2-packages.nix
+++ b/pkgs/top-level/python2-packages.nix
@@ -110,6 +110,8 @@ with self; with super; {
 
   feedparser = callPackage ../development/python-modules/feedparser/5.nix { };
 
+  filelock =  callPackage ../development/python-modules/filelock/3.2.nix { };
+
   flask = callPackage ../development/python-modules/flask/1.nix { };
 
   flask_ldap_login = callPackage ../development/python-modules/flask-ldap-login { };