nixpkgs/pkgs/development/python-modules/django_appconf/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

36 lines
1.1 KiB
Nix

{ lib, stdenv, buildPythonPackage, fetchFromGitHub, six, django, fetchpatch }:
buildPythonPackage rec {
pname = "django-appconf";
version = "1.0.3";
src = fetchFromGitHub {
owner = "django-compressor";
repo = "django-appconf";
rev = version;
sha256 = "06hwbz7362y0la9np3df25mms235fcqgpd2vn0mnf8dri9spzy1h";
};
propagatedBuildInputs = [ six django ];
patches = [
(fetchpatch {
name = "backport_django_2_2.patch";
url = "https://github.com/django-compressor/django-appconf/commit/1526a842ee084b791aa66c931b3822091a442853.patch";
sha256 = "1vl2s6vlf15089s8p4c3g4d5iqm8jva66bdw683r8440f80ixgmw";
})
];
checkPhase = ''
# prove we're running tests against installed package, not build dir
rm -r appconf
python -m django test --settings="tests.test_settings"
'';
meta = with lib; {
description = "A helper class for handling configuration defaults of packaged apps gracefully";
homepage = "https://django-appconf.readthedocs.org/";
license = licenses.bsd2;
maintainers = with maintainers; [ desiderius ];
};
}