Restructure Bookwyrm package expression
This commit is contained in:
parent
e5fffb39a5
commit
d7bb7e08bc
1 changed files with 22 additions and 13 deletions
|
@ -11,7 +11,7 @@ with pkgs . python311Packages ;
|
|||
with stdenv ;
|
||||
|
||||
let
|
||||
simplePythonDependencies = [
|
||||
pythonDependencies = [
|
||||
aiohappyeyeballs
|
||||
aiohttp
|
||||
aiosignal
|
||||
|
@ -105,7 +105,7 @@ mkDerivation {
|
|||
|
||||
# Python dependencies
|
||||
|
||||
for dependency in ${ concatStringsSep " " simplePythonDependencies } ; do
|
||||
for dependency in ${ concatStringsSep " " pythonDependencies } ; do
|
||||
ln -sf $dependency/lib/python3.11/site-packages/* /build/lib/python3.11/site-packages/
|
||||
done
|
||||
|
||||
|
@ -127,34 +127,39 @@ mkDerivation {
|
|||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
mkdir -p $out/lib/python3.11/site-packages
|
||||
mkdir -p $out/srv/http
|
||||
mkdir -p $out/var/lib/bookwyrm
|
||||
|
||||
# Python dependencies
|
||||
|
||||
for dependency in ${ concatStringsSep " " simplePythonDependencies } ; do
|
||||
ln -sf $dependency/lib/python3.11/site-packages/* $out/lib/python3.11/site-packages/
|
||||
done
|
||||
|
||||
# Python packages
|
||||
|
||||
mkdir -p $out/lib/python3.11/site-packages
|
||||
|
||||
for dependency in ${ concatStringsSep " " pythonDependencies } ; do
|
||||
ln -sf $dependency/lib/python3.11/site-packages/* $out/lib/python3.11/site-packages/
|
||||
done
|
||||
|
||||
cp -r /build/source/bookwyrm $out/lib/python3.11/site-packages/
|
||||
cp -r /build/source/celerywyrm $out/lib/python3.11/site-packages/
|
||||
|
||||
|
||||
# Python scripts
|
||||
|
||||
cp /build/source/manage.py $out/lib/python3.11/
|
||||
|
||||
|
||||
# Static web files
|
||||
|
||||
mkdir -p $out/srv/http
|
||||
|
||||
cp -r /build/source/static/* $out/srv/http/
|
||||
|
||||
ln -s ${source-han-sans}/share/fonts/opentype/source-han-sans/SourceHanSans.ttc $out/srv/http/fonts/source_han_sans/SourceHanSans-VF.ttf.ttc
|
||||
ln -s \
|
||||
${source-han-sans}/share/fonts/opentype/source-han-sans/SourceHanSans.ttc \
|
||||
$out/srv/http/fonts/source_han_sans/SourceHanSans-VF.ttf.ttc
|
||||
|
||||
|
||||
# Executables
|
||||
|
||||
mkdir -p $out/bin
|
||||
|
||||
cat <<- EOF > $out/bin/bookwyrm
|
||||
#!${bash}/bin/sh
|
||||
|
||||
|
@ -180,10 +185,14 @@ mkDerivation {
|
|||
|
||||
chmod +x $out/bin/*
|
||||
|
||||
|
||||
# Working directory contents
|
||||
|
||||
mkdir -p $out/var/lib/bookwyrm
|
||||
|
||||
cp $src/VERSION $out/var/lib/bookwyrm/
|
||||
|
||||
|
||||
runHook postInstall
|
||||
'' ;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue