From c393361e831b85f6c625fa77690cf0ce278201ad Mon Sep 17 00:00:00 2001 From: catvayor Date: Fri, 25 Oct 2024 15:10:54 +0200 Subject: [PATCH] feat(init): init --- default.nix | 5 +++++ python-pkgs/django-impersonate.nix | 35 ++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 default.nix create mode 100644 python-pkgs/django-impersonate.nix diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..12bc932 --- /dev/null +++ b/default.nix @@ -0,0 +1,5 @@ +{ pkgs, lib ? pkgs.lib }: with lib; +mapAttrs' (name: _: { + value = pkgs.python3.pkgs.callPackage (./python-pkgs/${name}) { }; + name = removeSuffix ".nix" name; +}) (builtins.readDir ./python-pkgs) diff --git a/python-pkgs/django-impersonate.nix b/python-pkgs/django-impersonate.nix new file mode 100644 index 0000000..074a501 --- /dev/null +++ b/python-pkgs/django-impersonate.nix @@ -0,0 +1,35 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + wheel, +}: + +buildPythonPackage rec { + pname = "django-impersonate"; + version = "0.9.3"; + pyproject = true; + + src = fetchFromGitHub { + owner = "BetterWorks"; + repo = "django-impersonate"; + rev = version; + hash = "sha256-IELpNA5G67FepRKxNEOGRqzb1QwfrzAJzTCrYtQsM34="; + }; + + build-system = [ + setuptools + wheel + ]; + + pythonImportsCheck = [ "impersonate" ]; + + meta = { + description = "Fork of https://bitbucket.org/petersanchez/django-impersonate"; + homepage = "https://github.com/BetterWorks/django-impersonate.git"; + changelog = "https://github.com/BetterWorks/django-impersonate/blob/${src.rev}/CHANGELOG"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ ]; + }; +}