Restructure packages into subdirectories

This commit is contained in:
Reinout Meliesie 2025-03-04 13:13:22 +01:00
parent 3961e33ca1
commit f91196c8a4
Signed by: zedfrigg
GPG key ID: 3AFCC06481308BC6
9 changed files with 45 additions and 20 deletions

View file

@ -0,0 +1,42 @@
{
fetchFromGitHub ,
pkgs ,
stdenv ,
} :
with pkgs . python311Packages ;
with stdenv ;
mkDerivation {
pname = "python-django-imagekit" ;
version = "2024-07-22-4cbbc52" ;
src = fetchFromGitHub {
owner = "matthewwithanm" ;
repo = "django-imagekit" ;
rev = "4cbbc52fabfd99a6306cdbb8ab2602bb0a0190a9" ;
hash = "sha256-QYWhXh404JNAZN7kXYhsPQpFpyBA/MehxJOxdDKX0Mc=" ;
} ;
dontPatch = true ;
dontConfigure = true ;
dontBuild = true ;
installPhase = ''
runHook preInstall
mkdir -p $out/lib/python3.11/site-packages
# Dependencies
ln -s ${django}/lib/python3.11/site-packages/* $out/lib/python3.11/site-packages/
ln -s ${django-appconf}/lib/python3.11/site-packages/* $out/lib/python3.11/site-packages/
ln -s ${pilkit}/lib/python3.11/site-packages/* $out/lib/python3.11/site-packages/
# The package itself
cp -r $src/imagekit $out/lib/python3.11/site-packages/
runHook postInstall
'' ;
}