treewide: replace lib/${python.libPrefix}/site-packages with its shorthand ${python.sitePackages}

which should be always preferred
This commit is contained in:
Sandro Jäckel 2023-03-24 01:30:46 +01:00
parent 30b34ac007
commit 653837881e
No known key found for this signature in database
GPG key ID: 3AF5A43A3EECC2E5
41 changed files with 62 additions and 62 deletions

View file

@ -1,3 +1,3 @@
# Python {#setup-hook-python} # Python {#setup-hook-python}
Adds the `lib/${python.libPrefix}/site-packages` subdirectory of each build input to the `PYTHONPATH` environment variable. Adds the `${python.sitePackages}` subdirectory of each build input to the `PYTHONPATH` environment variable.

View file

@ -36,21 +36,21 @@ in buildPythonApplication rec {
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall
mkdir -p "$out/lib/${python.libPrefix}/site-packages" mkdir -p "$out/${python.sitePackages}"
export PYTHONPATH="$out/lib/${python.libPrefix}/site-packages:$PYTHONPATH" export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH"
${python}/bin/${python.executable} setup.py install \ ${python}/bin/${python.executable} setup.py install \
--install-lib=$out/lib/${python.libPrefix}/site-packages \ --install-lib=$out/${python.sitePackages} \
--prefix="$out" --prefix="$out"
eapth="$out/lib/${python.libPrefix}"/site-packages/easy-install.pth eapth="$out/${python.sitePackages}/easy-install.pth"
if [ -e "$eapth" ]; then if [ -e "$eapth" ]; then
# move colliding easy_install.pth to specifically named one # move colliding easy_install.pth to specifically named one
mv "$eapth" $(dirname "$eapth")/${pname}-${version}.pth mv "$eapth" $(dirname "$eapth")/${pname}-${version}.pth
fi fi
rm -f "$out/lib/${python.libPrefix}"/site-packages/site.py* rm -f "$out/${python.sitePackages}"/site.py*
runHook postInstall runHook postInstall
''; '';

View file

@ -22,7 +22,7 @@ python3.pkgs.buildPythonApplication {
[Desktop Entry] [Desktop Entry]
Type=Application Type=Application
Exec=$out/bin/loxodo Exec=$out/bin/loxodo
Icon=$out/lib/${python3.libPrefix}/site-packages/resources/loxodo-icon.png Icon=$out/${python3.sitePackages}/resources/loxodo-icon.png
Name=Loxodo Name=Loxodo
GenericName=Password Vault GenericName=Password Vault
Categories=Application;Other; Categories=Application;Other;

View file

@ -70,11 +70,11 @@ python3Packages.buildPythonApplication {
]; ];
postInstall = '' postInstall = ''
substituteInPlace $out/lib/${python3Packages.python.libPrefix}/site-packages/mkchromecast/video.py \ substituteInPlace $out/${python3Packages.python.sitePackages}/mkchromecast/video.py \
--replace '/usr/share/mkchromecast/nodejs/' '${placeholder "out"}/share/mkchromecast/nodejs/' --replace '/usr/share/mkchromecast/nodejs/' '${placeholder "out"}/share/mkchromecast/nodejs/'
'' + lib.optionalString stdenv.isDarwin '' '' + lib.optionalString stdenv.isDarwin ''
install -Dm 755 -t $out/bin bin/audiodevice install -Dm 755 -t $out/bin bin/audiodevice
substituteInPlace $out/lib/${python3Packages.python.libPrefix}/site-packages/mkchromecast/audio_devices.py \ substituteInPlace $out/${python3Packages.python.sitePackages}/mkchromecast/audio_devices.py \
--replace './bin/audiodevice' '${placeholder "out"}/bin/audiodevice' --replace './bin/audiodevice' '${placeholder "out"}/bin/audiodevice'
''; '';

View file

@ -77,7 +77,7 @@ let
install -Dm444 -t $out/share/applications deluge/ui/data/share/applications/deluge.desktop install -Dm444 -t $out/share/applications deluge/ui/data/share/applications/deluge.desktop
'' else '' '' else ''
rm -r $out/bin/deluge-gtk rm -r $out/bin/deluge-gtk
rm -r $out/lib/${python3Packages.python.libPrefix}/site-packages/deluge/ui/gtk3 rm -r $out/${python3Packages.python.sitePackages}/deluge/ui/gtk3
rm -r $out/share/{icons,man/man1/deluge-gtk*,pixmaps} rm -r $out/share/{icons,man/man1/deluge-gtk*,pixmaps}
''); '');

View file

@ -64,7 +64,7 @@ python3Packages.buildPythonApplication rec {
# fixes [WARNING] [openpaperwork_core.resources.setuptools] Failed to find # fixes [WARNING] [openpaperwork_core.resources.setuptools] Failed to find
# resource file paperwork_gtk.icon.out/paperwork_128.png, tried at path # resource file paperwork_gtk.icon.out/paperwork_128.png, tried at path
# /nix/store/3n5lz6y8k9yks76f0nar3smc8djan3xr-paperwork-2.0.2/lib/python3.8/site-packages/paperwork_gtk/icon/out/paperwork_128.png. # /nix/store/3n5lz6y8k9yks76f0nar3smc8djan3xr-paperwork-2.0.2/lib/python3.8/site-packages/paperwork_gtk/icon/out/paperwork_128.png.
site=$out/lib/${python3Packages.python.libPrefix}/site-packages/paperwork_gtk site=$out/${python3Packages.python.sitePackages}/paperwork_gtk
for i in $site/data/paperwork_*.png; do for i in $site/data/paperwork_*.png; do
ln -s $i $site/icon/out; ln -s $i $site/icon/out;
done done

View file

@ -17,8 +17,8 @@ python3Packages.buildPythonApplication rec {
''; '';
preBuild = '' preBuild = ''
substituteInPlace src/CMakeLists.txt --replace \$'{PYTHONLIB}' "$out/lib/${python3.libPrefix}/site-packages"; substituteInPlace src/CMakeLists.txt --replace \$'{PYTHONLIB}' "$out/${python3.sitePackages}";
export NIX_CFLAGS_COMPILE="-L $out/lib/${python3.libPrefix}/site-packages $NIX_CFLAGS_COMPILE" export NIX_CFLAGS_COMPILE="-L $out/${python3.sitePackages} $NIX_CFLAGS_COMPILE"
''; '';
dontConfigure = true; dontConfigure = true;

View file

@ -62,7 +62,7 @@ let
cp contrib/hgk $out/bin cp contrib/hgk $out/bin
cat >> $out/etc/mercurial/hgrc << EOF cat >> $out/etc/mercurial/hgrc << EOF
[extensions] [extensions]
hgk=$out/lib/${python.libPrefix}/site-packages/hgext/hgk.py hgk=$out/${python.sitePackages}/hgext/hgk.py
EOF EOF
# setting HG so that hgk can be run itself as well (not only hg view) # setting HG so that hgk can be run itself as well (not only hg view)
WRAP_TK=" --set TK_LIBRARY ${tk}/lib/${tk.libPrefix} WRAP_TK=" --set TK_LIBRARY ${tk}/lib/${tk.libPrefix}

View file

@ -74,7 +74,7 @@ python3Packages.buildPythonApplication rec {
makeWrapper ${python3Packages.python.interpreter} $out/bin/onedrivegui \ makeWrapper ${python3Packages.python.interpreter} $out/bin/onedrivegui \
--prefix PATH : ${lib.makeBinPath [ onedrive ]} \ --prefix PATH : ${lib.makeBinPath [ onedrive ]} \
--prefix PYTHONPATH : ${python3Packages.makePythonPath (propagatedBuildInputs ++ [(placeholder "out")])} \ --prefix PYTHONPATH : ${python3Packages.makePythonPath (propagatedBuildInputs ++ [(placeholder "out")])} \
--add-flags $out/lib/${python3Packages.python.libPrefix}/site-packages/OneDriveGUI.py --add-flags $out/${python3Packages.python.sitePackages}/OneDriveGUI.py
''; '';
meta = with lib; { meta = with lib; {

View file

@ -120,7 +120,7 @@ stdenv.mkDerivation rec {
"-DPython3_EXECUTABLE=${pythonEnv}/bin/python" "-DPython3_EXECUTABLE=${pythonEnv}/bin/python"
"-DNS3_PYTHON_BINDINGS=ON" "-DNS3_PYTHON_BINDINGS=ON"
"-DNS3_DES_METRICS=ON" "-DNS3_DES_METRICS=ON"
"-DNS3_BINDINGS_INSTALL_DIR=lib/${pythonEnv.libPrefix}/site-packages" "-DNS3_BINDINGS_INSTALL_DIR=${pythonEnv.sitePackages}"
"-DNS3_LOG=ON" "-DNS3_LOG=ON"
"-DNS3_ASSERT=ON" "-DNS3_ASSERT=ON"
"-DNS3_GTK3=ON" "-DNS3_GTK3=ON"

View file

@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
python python
]; ];
preConfigure = "cmakeFlags+=\" -DVIGRANUMPY_INSTALL_DIR=$out/lib/${python.libPrefix}/site-packages\""; preConfigure = "cmakeFlags+=\" -DVIGRANUMPY_INSTALL_DIR=$out/${python.sitePackages}\"";
cmakeFlags = [ "-DWITH_OPENEXR=1" ] cmakeFlags = [ "-DWITH_OPENEXR=1" ]
++ lib.optionals (stdenv.hostPlatform.system == "x86_64-linux") ++ lib.optionals (stdenv.hostPlatform.system == "x86_64-linux")

View file

@ -150,7 +150,7 @@ buildPythonPackage rec {
# Make sure we're running the tests for the actually installed # Make sure we're running the tests for the actually installed
# package, so that cython's .so files are available. # package, so that cython's .so files are available.
preCheck = "cd $out/lib/${python.libPrefix}/site-packages"; preCheck = "cd $out/${python.sitePackages}";
disabledTestPaths = [ disabledTestPaths = [
# Fails with # Fails with

View file

@ -25,7 +25,7 @@ buildPythonPackage rec {
] ++ lib.optionals (!isPy3k) [ setuptools ]; # need for namespace lookup ] ++ lib.optionals (!isPy3k) [ setuptools ]; # need for namespace lookup
postInstall = lib.optionalString (!isPy3k) '' postInstall = lib.optionalString (!isPy3k) ''
echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/lib/${python.libPrefix}"/site-packages/azure/__init__.py echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/${python.sitePackages}"/azure/__init__.py
''; '';
doCheck = false; doCheck = false;

View file

@ -28,8 +28,8 @@ buildPythonPackage rec {
]; ];
postInstall = pkgs.lib.optionalString (!isPy3k) '' postInstall = pkgs.lib.optionalString (!isPy3k) ''
echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/lib/${python.libPrefix}"/site-packages/azure/mgmt/__init__.py echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/${python.sitePackages}"/azure/mgmt/__init__.py
echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/lib/${python.libPrefix}"/site-packages/azure/__init__.py echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/${python.sitePackages}"/azure/__init__.py
''; '';
doCheck = false; doCheck = false;

View file

@ -46,7 +46,7 @@ buildPythonPackage rec {
(substituteAll { (substituteAll {
name = "zoneinfo-path"; name = "zoneinfo-path";
src = ./zoneinfo.patch; src = ./zoneinfo.patch;
zoneinfo = "${tzdata}/lib/${python.libPrefix}/site-packages/tzdata/zoneinfo"; zoneinfo = "${tzdata}/${python.sitePackages}/tzdata/zoneinfo";
}) })
]; ];

View file

@ -24,7 +24,7 @@ in stdenv.mkDerivation {
dontUnpack = true; dontUnpack = true;
installPhase = '' installPhase = ''
dest="$out/lib/${python.libPrefix}/site-packages/distutils" dest="$out/${python.sitePackages}/distutils"
mkdir -p $dest mkdir -p $dest
ln -s ${python}/lib/${python.libPrefix}/distutils/* $dest ln -s ${python}/lib/${python.libPrefix}/distutils/* $dest
ln -s ${distutilsCfg} $dest/distutils.cfg ln -s ${distutilsCfg} $dest/distutils.cfg

View file

@ -22,7 +22,7 @@ buildPythonPackage rec {
postPatch = '' postPatch = ''
patchShebangs bin/* patchShebangs bin/*
substituteInPlace bin/speak-ipa \ substituteInPlace bin/speak-ipa \
--replace '${"\${src_dir}:"}' "$out/lib/${python.libPrefix}/site-packages:" \ --replace '${"\${src_dir}:"}' "$out/${python.sitePackages}:" \
--replace "do espeak" "do ${espeak}/bin/espeak" --replace "do espeak" "do ${espeak}/bin/espeak"
''; '';

View file

@ -16,7 +16,7 @@ buildPythonPackage {
postFixup = '' postFixup = ''
patchelf --set-rpath $out/lib \ patchelf --set-rpath $out/lib \
$out/lib/${python.libPrefix}/site-packages/gurobipy/gurobipy.so $out/${python.sitePackages}/gurobipy/gurobipy.so
''; '';
meta = with lib; { meta = with lib; {

View file

@ -20,9 +20,9 @@ stdenv.mkDerivation rec {
dontBuild = true; dontBuild = true;
installPhase = '' installPhase = ''
mkdir -p $out/lib/${python.libPrefix}/site-packages/hgext3rd/ mkdir -p $out/${python.sitePackages}/hgext3rd/
install -D $src/commitsigs.py \ install -D $src/commitsigs.py \
$out/lib/${python.libPrefix}/site-packages/hgext3rd/ $out/${python.sitePackages}/hgext3rd/
''; '';
meta = with lib; { meta = with lib; {

View file

@ -24,20 +24,20 @@ buildPythonPackage rec {
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall
mkdir -p "$out/lib/${python.libPrefix}/site-packages" mkdir -p "$out/${python.sitePackages}"
export PYTHONPATH="$out/lib/${python.libPrefix}/site-packages:$PYTHONPATH" export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH"
${python}/bin/${python.executable} setup.py install \ ${python}/bin/${python.executable} setup.py install \
--install-lib=$out/lib/${python.libPrefix}/site-packages \ --install-lib=$out/${python.sitePackages} \
--prefix="$out" --prefix="$out"
eapth="$out/lib/${python.libPrefix}"/site-packages/easy-install.pth eapth="$out/${python.sitePackages}/easy-install.pth"
if [ -e "$eapth" ]; then if [ -e "$eapth" ]; then
mv "$eapth" $(dirname "$eapth")/${pname}-${version}.pth mv "$eapth" $(dirname "$eapth")/${pname}-${version}.pth
fi fi
rm -f "$out/lib/${python.libPrefix}"/site-packages/site.py* rm -f "$out/${python.sitePackages}"/site.py*
runHook postInstall runHook postInstall
''; '';

View file

@ -29,20 +29,20 @@ buildPythonPackage rec {
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall
mkdir -p "$out/lib/${python.libPrefix}/site-packages" mkdir -p "$out/${python.sitePackages}"
export PYTHONPATH="$out/lib/${python.libPrefix}/site-packages:$PYTHONPATH" export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH"
${python}/bin/${python.executable} setup.py install \ ${python}/bin/${python.executable} setup.py install \
--install-lib=$out/lib/${python.libPrefix}/site-packages \ --install-lib=$out/${python.sitePackages} \
--prefix="$out" --prefix="$out"
eapth="$out/lib/${python.libPrefix}"/site-packages/easy-install.pth eapth="$out/${python.sitePackages}/easy-install.pth"
if [ -e "$eapth" ]; then if [ -e "$eapth" ]; then
mv "$eapth" $(dirname "$eapth")/${pname}-${version}.pth mv "$eapth" $(dirname "$eapth")/${pname}-${version}.pth
fi fi
rm -f "$out/lib/${python.libPrefix}"/site-packages/site.py* rm -f "$out/${python.sitePackages}"/site.py*
runHook postInstall runHook postInstall
''; '';

View file

@ -62,7 +62,7 @@ buildPythonPackage rec {
makeWrapperArgs = [ makeWrapperArgs = [
# Add the installed directories to the python path so the daemon can find them # Add the installed directories to the python path so the daemon can find them
"--prefix PYTHONPATH : ${makePythonPath propagatedBuildInputs}" "--prefix PYTHONPATH : ${makePythonPath propagatedBuildInputs}"
"--prefix PYTHONPATH : $out/lib/${python.libPrefix}/site-packages" "--prefix PYTHONPATH : $out/${python.sitePackages}"
]; ];
nativeCheckInputs = [ nativeCheckInputs = [

View file

@ -113,7 +113,7 @@ buildPythonPackage rec {
checkPhase = '' checkPhase = ''
runHook preCheck runHook preCheck
export PYTHONPATH="$out/lib/${python.libPrefix}/site-packages:$PYTHONPATH" export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH"
# Generate a python test script # Generate a python test script
cat > test.py << EOF cat > test.py << EOF

View file

@ -25,11 +25,11 @@ buildPythonPackage rec {
configurePhase = ""; configurePhase = "";
installPhase = '' installPhase = ''
mkdir -p "$out/lib/${python.libPrefix}/site-packages" mkdir -p "$out/${python.sitePackages}"
export PYTHONPATH="$out/lib/${python.libPrefix}/site-packages:$PYTHONPATH" export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH"
${python}/bin/${python.executable} setup.py install \ ${python}/bin/${python.executable} setup.py install \
--install-lib=$out/lib/${python.libPrefix}/site-packages \ --install-lib=$out/${python.sitePackages} \
--prefix="$out" --prefix="$out"
# --install-lib: # --install-lib:

View file

@ -43,7 +43,7 @@ buildPythonPackage rec {
# Make sure we're running the tests for the actually installed # Make sure we're running the tests for the actually installed
# package, so that cython's compiled files are available. # package, so that cython's compiled files are available.
preCheck = '' preCheck = ''
cd $out/lib/${python.libPrefix}/site-packages cd $out/${python.sitePackages}
''; '';
nativeCheckInputs = [ pytestCheckHook ]; nativeCheckInputs = [ pytestCheckHook ];

View file

@ -28,7 +28,7 @@ toPythonModule (stdenv.mkDerivation rec {
}; };
cmakeFlags = [ cmakeFlags = [
"-DPYGMO_INSTALL_PATH=${placeholder "out"}/lib/${python.libPrefix}/site-packages" "-DPYGMO_INSTALL_PATH=${placeholder "out"}/${python.sitePackages}"
]; ];
nativeBuildInputs = [ nativeBuildInputs = [

View file

@ -141,7 +141,7 @@ buildPythonPackage rec {
checkPhase = '' checkPhase = ''
export QT_QPA_PLATFORM='offscreen' export QT_QPA_PLATFORM='offscreen'
export RDBASE=$(realpath ..) export RDBASE=$(realpath ..)
export PYTHONPATH="$out/lib/${python.libPrefix}/site-packages:$PYTHONPATH" export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH"
(cd $RDBASE/rdkit/Chem && python $RDBASE/rdkit/TestRunner.py test_list.py) (cd $RDBASE/rdkit/Chem && python $RDBASE/rdkit/TestRunner.py test_list.py)
''; '';

View file

@ -14,7 +14,7 @@ stdenv.mkDerivation {
installPhase = installPhase =
'' ''
dst=$out/lib/${python.libPrefix}/site-packages dst=$out/${python.sitePackages}
mkdir -p $dst mkdir -p $dst
cp sitecustomize.* $dst/ cp sitecustomize.* $dst/
''; '';

View file

@ -34,7 +34,7 @@ buildPythonPackage rec {
''; '';
postInstall = '' postInstall = ''
DST_PREFIX=$out/lib/${python.libPrefix}/site-packages/selenium/webdriver/ DST_PREFIX=$out/${python.sitePackages}/selenium/webdriver/
DST_REMOTE=$DST_PREFIX/remote/ DST_REMOTE=$DST_PREFIX/remote/
DST_FF=$DST_PREFIX/firefox DST_FF=$DST_PREFIX/firefox
cp ../rb/lib/selenium/webdriver/atoms/getAttribute.js $DST_REMOTE cp ../rb/lib/selenium/webdriver/atoms/getAttribute.js $DST_REMOTE

View file

@ -64,8 +64,8 @@ buildPythonPackage rec {
postInstall = '' postInstall = ''
rm $out/bin/pygtk-codegen-2.0 rm $out/bin/pygtk-codegen-2.0
ln -s ${pygobject2}/bin/pygobject-codegen-2.0 $out/bin/pygtk-codegen-2.0 ln -s ${pygobject2}/bin/pygobject-codegen-2.0 $out/bin/pygtk-codegen-2.0
ln -s ${pygobject2}/lib/${python.libPrefix}/site-packages/pygobject-${pygobject2.version}.pth \ ln -s ${pygobject2}/${python.sitePackages}/pygobject-${pygobject2.version}.pth \
$out/lib/${python.libPrefix}/site-packages/${pname}-${version}.pth $out/${python.sitePackages}/${pname}-${version}.pth
''; '';
meta = with lib; { meta = with lib; {

View file

@ -1304,7 +1304,7 @@ let
substituteInPlace R/zzz.R \ substituteInPlace R/zzz.R \
--replace ".onLoad <- function(...) {" \ --replace ".onLoad <- function(...) {" \
".onLoad <- function(...) { ".onLoad <- function(...) {
Sys.setenv(\"SPARK_HOME\" = Sys.getenv(\"SPARK_HOME\", unset = \"${pkgs.python3Packages.pyspark}/lib/${pkgs.python3Packages.python.libPrefix}/site-packages/pyspark\")) Sys.setenv(\"SPARK_HOME\" = Sys.getenv(\"SPARK_HOME\", unset = \"${pkgs.python3Packages.pyspark}/${pkgs.python3Packages.python.sitePackages}/pyspark\"))
Sys.setenv(\"JAVA_HOME\" = Sys.getenv(\"JAVA_HOME\", unset = \"${pkgs.jdk}\"))" Sys.setenv(\"JAVA_HOME\" = Sys.getenv(\"JAVA_HOME\", unset = \"${pkgs.jdk}\"))"
''; '';
}); });

View file

@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
''; '';
installPhase = '' installPhase = ''
libdir="$out/lib/${python3.libPrefix}/site-packages" libdir="$out/${python3.sitePackages}"
mkdir -p "$libdir" mkdir -p "$libdir"
cp -r postiats "$libdir" cp -r postiats "$libdir"

View file

@ -265,7 +265,7 @@ buildPythonPackage rec {
]; ];
postInstall = '' postInstall = ''
cp -rv ${airflow-frontend}/static/dist $out/lib/${python.libPrefix}/site-packages/airflow/www/static cp -rv ${airflow-frontend}/static/dist $out/${python.sitePackages}/airflow/www/static
# Needed for pythonImportsCheck below # Needed for pythonImportsCheck below
export HOME=$(mktemp -d) export HOME=$(mktemp -d)
''; '';

View file

@ -127,8 +127,8 @@ with python.pkgs; buildPythonApplication rec {
fixupPhase = '' fixupPhase = ''
cp -r src/baserow/contrib/database/{api,action,trash,formula,file_import} \ cp -r src/baserow/contrib/database/{api,action,trash,formula,file_import} \
$out/lib/${python.libPrefix}/site-packages/baserow/contrib/database/ $out/${python.sitePackages}/baserow/contrib/database/
cp -r src/baserow/core/management/backup $out/lib/${python.libPrefix}/site-packages/baserow/core/management/ cp -r src/baserow/core/management/backup $out/${python.sitePackages}/baserow/core/management/
''; '';
disabledTests = [ disabledTests = [

View file

@ -84,7 +84,7 @@ stdenv.mkDerivation rec {
substituteInPlace SConscript --replace "env['CCVERSION']" "env['CC']" substituteInPlace SConscript --replace "env['CCVERSION']" "env['CC']"
sconsFlags+=" udevdir=$out/lib/udev" sconsFlags+=" udevdir=$out/lib/udev"
sconsFlags+=" python_libdir=$out/lib/${python3Packages.python.libPrefix}/site-packages" sconsFlags+=" python_libdir=$out/${python3Packages.python.sitePackages}"
''; '';
# - leapfetch=no disables going online at build time to fetch leap-seconds # - leapfetch=no disables going online at build time to fetch leap-seconds

View file

@ -52,8 +52,8 @@ python3.pkgs.buildPythonApplication rec {
runHook preInstall runHook preInstall
mkdir -p $out/bin mkdir -p $out/bin
cp gam.py $out/bin/gam cp gam.py $out/bin/gam
mkdir -p $out/lib/${python3.libPrefix}/site-packages mkdir -p $out/${python3.sitePackages}
cp -r gam $out/lib/${python3.libPrefix}/site-packages cp -r gam $out/${python3.sitePackages}
runHook postInstall runHook postInstall
''; '';

View file

@ -128,7 +128,7 @@ python.pkgs.buildPythonApplication rec {
for file in $(grep -rl 'python TTS/bin' tests); do for file in $(grep -rl 'python TTS/bin' tests); do
substituteInPlace "$file" \ substituteInPlace "$file" \
--replace "python TTS/bin" "${python.interpreter} $out/lib/${python.libPrefix}/site-packages/TTS/bin" --replace "python TTS/bin" "${python.interpreter} $out/${python.sitePackages}/TTS/bin"
done done
''; '';

View file

@ -39,7 +39,7 @@ in stdenv.mkDerivation rec {
preConfigure = '' preConfigure = ''
export PERL5LIB="$PERL5LIB''${PERL5LIB:+:}${dpkg}"; export PERL5LIB="$PERL5LIB''${PERL5LIB:+:}${dpkg}";
tgtpy="$out/lib/${python.libPrefix}/site-packages" tgtpy="$out/${python.sitePackages}"
mkdir -p "$tgtpy" mkdir -p "$tgtpy"
export PYTHONPATH="$PYTHONPATH''${PYTHONPATH:+:}$tgtpy" export PYTHONPATH="$PYTHONPATH''${PYTHONPATH:+:}$tgtpy"
find lib po4a scripts -type f -exec sed -r \ find lib po4a scripts -type f -exec sed -r \

View file

@ -28,7 +28,7 @@ python3Packages.buildPythonApplication {
]; ];
installPhase = '' installPhase = ''
libdir="$out/lib/${python3Packages.python.libPrefix}/site-packages/arubaotp-seed-extractor" libdir="$out/${python3Packages.python.sitePackages}/arubaotp-seed-extractor"
mkdir -p "$libdir" mkdir -p "$libdir"
cp scripts/* "$libdir" cp scripts/* "$libdir"
chmod +x "$libdir/main.py" chmod +x "$libdir/main.py"

View file

@ -49,7 +49,7 @@ stdenv.mkDerivation rec {
''; '';
installPhase = '' installPhase = ''
mkdir -p $out/bin $out/man $out/lib/${python3.libPrefix}/site-packages mkdir -p $out/bin $out/man $out/${python3.sitePackages}
make install make install
wrapPythonPrograms wrapPythonPrograms
''; '';

View file

@ -41,7 +41,7 @@ in stdenv.mkDerivation rec {
installFlags = [ "DESTDIR=${placeholder "out"}" "PREFIX=" ]; installFlags = [ "DESTDIR=${placeholder "out"}" "PREFIX=" ];
postInstall = '' postInstall = ''
wrapProgram $out/lib/password-store/extensions/audit.bash \ wrapProgram $out/lib/password-store/extensions/audit.bash \
--prefix PYTHONPATH : "$out/lib/${pythonEnv.libPrefix}/site-packages" \ --prefix PYTHONPATH : "$out/${pythonEnv.sitePackages}" \
--run "export COMMAND" --run "export COMMAND"
''; '';