Merge staging into staging-next
This commit is contained in:
commit
9894a70299
@ -540,7 +540,8 @@ and the aliases
|
||||
#### `buildPythonPackage` function
|
||||
|
||||
The `buildPythonPackage` function is implemented in
|
||||
`pkgs/development/interpreters/python/build-python-package.nix`
|
||||
`pkgs/development/interpreters/python/mk-python-derivation`
|
||||
using setup hooks.
|
||||
|
||||
The following is an example:
|
||||
```nix
|
||||
@ -797,6 +798,22 @@ such as `ignoreCollisions = true` or `postBuild`. If you need them, you have to
|
||||
Python 2 namespace packages may provide `__init__.py` that collide. In that case `python.buildEnv`
|
||||
should be used with `ignoreCollisions = true`.
|
||||
|
||||
#### Setup hooks
|
||||
|
||||
The following are setup hooks specifically for Python packages. Most of these are
|
||||
used in `buildPythonPackage`.
|
||||
|
||||
- `flitBuildHook` to build a wheel using `flit`.
|
||||
- `pipBuildHook` to build a wheel using `pip` and PEP 517. Note a build system (e.g. `setuptools` or `flit`) should still be added as `nativeBuildInput`.
|
||||
- `pipInstallHook` to install wheels.
|
||||
- `pytestCheckHook` to run tests with `pytest`.
|
||||
- `pythonCatchConflictsHook` to check whether a Python package is not already existing.
|
||||
- `pythonImportsCheckHook` to check whether importing the listed modules works.
|
||||
- `pythonRemoveBinBytecode` to remove bytecode from the `/bin` folder.
|
||||
- `setuptoolsBuildHook` to build a wheel using `setuptools`.
|
||||
- `setuptoolsCheckHook` to run tests with `python setup.py test`.
|
||||
- `wheelUnpackHook` to move a wheel to the correct folder so it can be installed with the `pipInstallHook`.
|
||||
|
||||
### Development mode
|
||||
|
||||
Development or editable mode is supported. To develop Python packages
|
||||
|
@ -95,6 +95,7 @@ in
|
||||
gitlab = handleTest ./gitlab.nix {};
|
||||
gitolite = handleTest ./gitolite.nix {};
|
||||
gjs = handleTest ./gjs.nix {};
|
||||
glib-networking = handleTest ./glib-networking.nix {};
|
||||
glusterfs = handleTest ./glusterfs.nix {};
|
||||
gnome3-xorg = handleTest ./gnome3-xorg.nix {};
|
||||
gnome3 = handleTest ./gnome3.nix {};
|
||||
@ -144,6 +145,7 @@ in
|
||||
latestKernel.login = handleTest ./login.nix { latestKernel = true; };
|
||||
ldap = handleTest ./ldap.nix {};
|
||||
leaps = handleTest ./leaps.nix {};
|
||||
libgdata = handleTest ./libgdata.nix {};
|
||||
libxmlb = handleTest ./libxmlb.nix {};
|
||||
lidarr = handleTest ./lidarr.nix {};
|
||||
lightdm = handleTest ./lightdm.nix {};
|
||||
|
17
nixos/tests/glib-networking.nix
Normal file
17
nixos/tests/glib-networking.nix
Normal file
@ -0,0 +1,17 @@
|
||||
# run installed tests
|
||||
import ./make-test.nix ({ pkgs, ... }:
|
||||
|
||||
{
|
||||
name = "glib-networking";
|
||||
meta = {
|
||||
maintainers = pkgs.glib-networking.meta.maintainers;
|
||||
};
|
||||
|
||||
machine = { pkgs, ... }: {
|
||||
environment.systemPackages = with pkgs; [ gnome-desktop-testing ];
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
$machine->succeed("gnome-desktop-testing-runner -d '${pkgs.glib-networking.installedTests}/share'");
|
||||
'';
|
||||
})
|
21
nixos/tests/libgdata.nix
Normal file
21
nixos/tests/libgdata.nix
Normal file
@ -0,0 +1,21 @@
|
||||
# run installed tests
|
||||
import ./make-test.nix ({ pkgs, ... }:
|
||||
|
||||
{
|
||||
name = "libgdata";
|
||||
|
||||
meta = {
|
||||
maintainers = pkgs.libgdata.meta.maintainers;
|
||||
};
|
||||
|
||||
machine = { pkgs, ... }: {
|
||||
environment.systemPackages = with pkgs; [ gnome-desktop-testing ];
|
||||
# # GLib-GIO-DEBUG: _g_io_module_get_default: Found default implementation dummy (GDummyTlsBackend) for ‘gio-tls-backend’
|
||||
# Bail out! libgdata:ERROR:../gdata/tests/common.c:134:gdata_test_init: assertion failed (child_error == NULL): TLS support is not available (g-tls-error-quark, 0)
|
||||
services.gnome3.glib-networking.enable = true;
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
$machine->succeed("gnome-desktop-testing-runner -d '${pkgs.libgdata.installedTests}/share'");
|
||||
'';
|
||||
})
|
@ -1,31 +0,0 @@
|
||||
# This function provides generic bits to install a Python wheel.
|
||||
|
||||
{ python
|
||||
}:
|
||||
|
||||
{ buildInputs ? []
|
||||
# Additional flags to pass to "pip install".
|
||||
, installFlags ? []
|
||||
, ... } @ attrs:
|
||||
|
||||
attrs // {
|
||||
buildInputs = buildInputs ++ [ python.pythonForBuild.pkgs.bootstrapped-pip ];
|
||||
|
||||
configurePhase = attrs.configurePhase or ''
|
||||
runHook preConfigure
|
||||
runHook postConfigure
|
||||
'';
|
||||
|
||||
installPhase = attrs.installPhase or ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p "$out/${python.sitePackages}"
|
||||
export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH"
|
||||
|
||||
pushd dist
|
||||
${python.pythonForBuild.pkgs.bootstrapped-pip}/bin/pip install *.whl --no-index --prefix=$out --no-cache ${toString installFlags} --build tmpbuild
|
||||
popd
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
# This function provides specific bits for building a flit-based Python package.
|
||||
|
||||
{ python
|
||||
, flit
|
||||
}:
|
||||
|
||||
{ ... } @ attrs:
|
||||
|
||||
attrs // {
|
||||
nativeBuildInputs = [ flit ];
|
||||
buildPhase = attrs.buildPhase or ''
|
||||
runHook preBuild
|
||||
flit build --format wheel
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
# Flit packages, like setuptools packages, might have tests.
|
||||
installCheckPhase = attrs.checkPhase or ''
|
||||
${python.interpreter} -m unittest discover
|
||||
'';
|
||||
doCheck = attrs.doCheck or true;
|
||||
}
|
@ -1,56 +0,0 @@
|
||||
# This function provides specific bits for building a setuptools-based Python package.
|
||||
|
||||
{ lib
|
||||
, python
|
||||
}:
|
||||
|
||||
{
|
||||
# Global options passed to "python setup.py"
|
||||
setupPyGlobalFlags ? []
|
||||
# Build options passed to "build_ext"
|
||||
# https://github.com/pypa/pip/issues/881
|
||||
# Rename to `buildOptions` because it is not setuptools specific?
|
||||
, setupPyBuildFlags ? []
|
||||
# Execute before shell hook
|
||||
, preShellHook ? ""
|
||||
# Execute after shell hook
|
||||
, postShellHook ? ""
|
||||
, ... } @ attrs:
|
||||
|
||||
let
|
||||
pipGlobalFlagsString = lib.concatMapStringsSep " " (option: "--global-option ${option}") setupPyGlobalFlags;
|
||||
pipBuildFlagsString = lib.concatMapStringsSep " " (option: "--build-option ${option}") setupPyBuildFlags;
|
||||
in attrs // {
|
||||
buildPhase = attrs.buildPhase or ''
|
||||
runHook preBuild
|
||||
mkdir -p dist
|
||||
echo "Creating a wheel..."
|
||||
${python.pythonForBuild.interpreter} -m pip wheel --no-index --no-deps --no-clean --no-build-isolation --wheel-dir dist ${pipGlobalFlagsString} ${pipBuildFlagsString} .
|
||||
echo "Finished creating a wheel..."
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installCheckPhase = ''
|
||||
runHook preCheck
|
||||
echo "No checkPhase defined. Either provide a checkPhase or disable tests in case tests are not available."; exit 1
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
# With Python it's a common idiom to run the tests
|
||||
# after the software has been installed.
|
||||
doCheck = attrs.doCheck or true;
|
||||
|
||||
shellHook = attrs.shellHook or ''
|
||||
${preShellHook}
|
||||
# Long-term setup.py should be dropped.
|
||||
if [ -e pyproject.toml ]; then
|
||||
tmp_path=$(mktemp -d)
|
||||
export PATH="$tmp_path/bin:$PATH"
|
||||
export PYTHONPATH="$tmp_path/${python.pythonForBuild.sitePackages}:$PYTHONPATH"
|
||||
mkdir -p $tmp_path/${python.pythonForBuild.sitePackages}
|
||||
${python.pythonForBuild.pkgs.bootstrapped-pip}/bin/pip install -e . --prefix $tmp_path >&2
|
||||
fi
|
||||
${postShellHook}
|
||||
'';
|
||||
|
||||
}
|
@ -1,60 +0,0 @@
|
||||
# This function provides specific bits for building a setuptools-based Python package.
|
||||
|
||||
{ lib
|
||||
, python
|
||||
}:
|
||||
|
||||
{
|
||||
# Global options passed to "python setup.py"
|
||||
setupPyGlobalFlags ? []
|
||||
# Build options passed to "python setup.py build_ext"
|
||||
# https://github.com/pypa/pip/issues/881
|
||||
, setupPyBuildFlags ? []
|
||||
# Execute before shell hook
|
||||
, preShellHook ? ""
|
||||
# Execute after shell hook
|
||||
, postShellHook ? ""
|
||||
, ... } @ attrs:
|
||||
|
||||
let
|
||||
# use setuptools shim (so that setuptools is imported before distutils)
|
||||
# pip does the same thing: https://github.com/pypa/pip/pull/3265
|
||||
setuppy = ./run_setup.py;
|
||||
|
||||
setupPyGlobalFlagsString = lib.concatStringsSep " " setupPyGlobalFlags;
|
||||
setupPyBuildExtString = lib.optionalString (setupPyBuildFlags != []) ("build_ext " + (lib.concatStringsSep " " setupPyBuildFlags));
|
||||
|
||||
in attrs // {
|
||||
# we copy nix_run_setup over so it's executed relative to the root of the source
|
||||
# many project make that assumption
|
||||
buildPhase = attrs.buildPhase or ''
|
||||
runHook preBuild
|
||||
cp ${setuppy} nix_run_setup
|
||||
${python.pythonForBuild.interpreter} nix_run_setup ${setupPyGlobalFlagsString} ${setupPyBuildExtString} bdist_wheel
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installCheckPhase = attrs.checkPhase or ''
|
||||
runHook preCheck
|
||||
${python.pythonForBuild.interpreter} nix_run_setup test
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
# Python packages that are installed with setuptools
|
||||
# are typically distributed with tests.
|
||||
# With Python it's a common idiom to run the tests
|
||||
# after the software has been installed.
|
||||
doCheck = attrs.doCheck or true;
|
||||
|
||||
shellHook = attrs.shellHook or ''
|
||||
${preShellHook}
|
||||
if test -e setup.py; then
|
||||
tmp_path=$(mktemp -d)
|
||||
export PATH="$tmp_path/bin:$PATH"
|
||||
export PYTHONPATH="$tmp_path/${python.pythonForBuild.sitePackages}:$PYTHONPATH"
|
||||
mkdir -p $tmp_path/${python.pythonForBuild.sitePackages}
|
||||
${python.pythonForBuild.pkgs.bootstrapped-pip}/bin/pip install -e . --prefix $tmp_path >&2
|
||||
fi
|
||||
${postShellHook}
|
||||
'';
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
# This function provides specific bits for building a wheel-based Python package.
|
||||
|
||||
{
|
||||
}:
|
||||
|
||||
{ ... } @ attrs:
|
||||
|
||||
attrs // {
|
||||
unpackPhase = ''
|
||||
mkdir dist
|
||||
cp "$src" "dist/$(stripHash "$src")"
|
||||
'';
|
||||
|
||||
# Wheels are pre-compiled
|
||||
buildPhase = attrs.buildPhase or ":";
|
||||
installCheckPhase = attrs.checkPhase or ":";
|
||||
|
||||
# Wheels don't have any checks to run
|
||||
doCheck = attrs.doCheck or false;
|
||||
}
|
@ -1,48 +0,0 @@
|
||||
# This function provides a generic Python package builder,
|
||||
# and can build packages that use distutils, setuptools or flit.
|
||||
|
||||
{ lib
|
||||
, config
|
||||
, python
|
||||
, wrapPython
|
||||
, setuptools
|
||||
, unzip
|
||||
, ensureNewerSourcesForZipFilesHook
|
||||
, toPythonModule
|
||||
, namePrefix
|
||||
, flit
|
||||
, writeScript
|
||||
, update-python-libraries
|
||||
}:
|
||||
|
||||
let
|
||||
setuptools-specific = import ./build-python-package-setuptools.nix { inherit lib python; };
|
||||
pyproject-specific = import ./build-python-package-pyproject.nix { inherit lib python; };
|
||||
flit-specific = import ./build-python-package-flit.nix { inherit python flit; };
|
||||
wheel-specific = import ./build-python-package-wheel.nix { };
|
||||
common = import ./build-python-package-common.nix { inherit python; };
|
||||
mkPythonDerivation = import ./mk-python-derivation.nix {
|
||||
inherit lib config python wrapPython setuptools unzip ensureNewerSourcesForZipFilesHook;
|
||||
inherit toPythonModule namePrefix update-python-libraries;
|
||||
};
|
||||
in
|
||||
|
||||
{
|
||||
# Several package formats are supported.
|
||||
# "setuptools" : Install a common setuptools/distutils based package. This builds a wheel.
|
||||
# "wheel" : Install from a pre-compiled wheel.
|
||||
# "flit" : Install a flit package. This builds a wheel.
|
||||
# "other" : Provide your own buildPhase and installPhase.
|
||||
format ? "setuptools"
|
||||
, ... } @ attrs:
|
||||
|
||||
let
|
||||
formatspecific =
|
||||
if format == "pyproject" then common (pyproject-specific attrs)
|
||||
else if format == "setuptools" then common (setuptools-specific attrs)
|
||||
else if format == "flit" then common (flit-specific attrs)
|
||||
else if format == "wheel" then common (wheel-specific attrs)
|
||||
else if format == "other" then {}
|
||||
else throw "Unsupported format ${format}";
|
||||
|
||||
in mkPythonDerivation ( attrs // formatspecific )
|
95
pkgs/development/interpreters/python/hooks/default.nix
Normal file
95
pkgs/development/interpreters/python/hooks/default.nix
Normal file
@ -0,0 +1,95 @@
|
||||
# Hooks for building Python packages.
|
||||
{ python
|
||||
, callPackage
|
||||
, makeSetupHook
|
||||
}:
|
||||
|
||||
let
|
||||
pythonInterpreter = python.pythonForBuild.interpreter;
|
||||
pythonSitePackages = python.sitePackages;
|
||||
pythonCheckInterpreter = python.interpreter;
|
||||
setuppy = ../run_setup.py;
|
||||
in rec {
|
||||
|
||||
flitBuildHook = callPackage ({ flit }:
|
||||
makeSetupHook {
|
||||
name = "flit-build-hook";
|
||||
deps = [ flit ];
|
||||
substitutions = {
|
||||
inherit pythonInterpreter;
|
||||
};
|
||||
} ./flit-build-hook.sh) {};
|
||||
|
||||
pipBuildHook = callPackage ({ pip }:
|
||||
makeSetupHook {
|
||||
name = "pip-build-hook.sh";
|
||||
deps = [ pip ];
|
||||
substitutions = {
|
||||
inherit pythonInterpreter pythonSitePackages;
|
||||
};
|
||||
} ./pip-build-hook.sh) {};
|
||||
|
||||
pipInstallHook = callPackage ({ pip }:
|
||||
makeSetupHook {
|
||||
name = "pip-install-hook";
|
||||
deps = [ pip ];
|
||||
substitutions = {
|
||||
inherit pythonInterpreter pythonSitePackages;
|
||||
};
|
||||
} ./pip-install-hook.sh) {};
|
||||
|
||||
pytestCheckHook = callPackage ({ pytest }:
|
||||
makeSetupHook {
|
||||
name = "pytest-check-hook";
|
||||
deps = [ pytest ];
|
||||
substitutions = {
|
||||
inherit pythonCheckInterpreter;
|
||||
};
|
||||
} ./pytest-check-hook.sh) {};
|
||||
|
||||
pythonCatchConflictsHook = callPackage ({ setuptools }:
|
||||
makeSetupHook {
|
||||
name = "python-catch-conflicts-hook";
|
||||
deps = [ setuptools ];
|
||||
substitutions = {
|
||||
inherit pythonInterpreter;
|
||||
catchConflicts=../catch_conflicts/catch_conflicts.py;
|
||||
};
|
||||
} ./python-catch-conflicts-hook.sh) {};
|
||||
|
||||
pythonImportsCheckHook = callPackage ({}:
|
||||
makeSetupHook {
|
||||
name = "python-imports-check-hook.sh";
|
||||
substitutions = {
|
||||
inherit pythonCheckInterpreter;
|
||||
};
|
||||
} ./python-imports-check-hook.sh) {};
|
||||
|
||||
pythonRemoveBinBytecodeHook = callPackage ({ }:
|
||||
makeSetupHook {
|
||||
name = "python-remove-bin-bytecode-hook";
|
||||
} ./python-remove-bin-bytecode-hook.sh) {};
|
||||
|
||||
setuptoolsBuildHook = callPackage ({ setuptools, wheel }:
|
||||
makeSetupHook {
|
||||
name = "setuptools-setup-hook";
|
||||
deps = [ setuptools wheel ];
|
||||
substitutions = {
|
||||
inherit pythonInterpreter pythonSitePackages setuppy;
|
||||
};
|
||||
} ./setuptools-build-hook.sh) {};
|
||||
|
||||
setuptoolsCheckHook = callPackage ({ setuptools }:
|
||||
makeSetupHook {
|
||||
name = "setuptools-check-hook";
|
||||
deps = [ setuptools ];
|
||||
substitutions = {
|
||||
inherit pythonCheckInterpreter setuppy;
|
||||
};
|
||||
} ./setuptools-check-hook.sh) {};
|
||||
|
||||
wheelUnpackHook = callPackage ({ }:
|
||||
makeSetupHook {
|
||||
name = "wheel-unpack-hook.sh";
|
||||
} ./wheel-unpack-hook.sh) {};
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
# Setup hook for flit
|
||||
echo "Sourcing flit-build-hook"
|
||||
|
||||
flitBuildPhase () {
|
||||
echo "Executing flitBuildPhase"
|
||||
preBuild
|
||||
@pythonInterpreter@ -m flit build --format wheel
|
||||
postBuild
|
||||
echo "Finished executing flitBuildPhase"
|
||||
}
|
||||
|
||||
if [ -z "$dontUseFlitBuild" ] && [ -z "$buildPhase" ]; then
|
||||
echo "Using flitBuildPhase"
|
||||
buildPhase=flitBuildPhase
|
||||
fi
|
42
pkgs/development/interpreters/python/hooks/pip-build-hook.sh
Normal file
42
pkgs/development/interpreters/python/hooks/pip-build-hook.sh
Normal file
@ -0,0 +1,42 @@
|
||||
# Setup hook to use for pip projects
|
||||
echo "Sourcing pip-build-hook"
|
||||
|
||||
pipBuildPhase() {
|
||||
echo "Executing pipBuildPhase"
|
||||
runHook preBuild
|
||||
|
||||
mkdir -p dist
|
||||
echo "Creating a wheel..."
|
||||
@pythonInterpreter@ -m pip wheel --no-index --no-deps --no-clean --no-build-isolation --wheel-dir dist "$options" .
|
||||
echo "Finished creating a wheel..."
|
||||
|
||||
runHook postBuild
|
||||
echo "Finished executing pipBuildPhase"
|
||||
}
|
||||
|
||||
pipShellHook() {
|
||||
echo "Executing pipShellHook"
|
||||
runHook preShellHook
|
||||
|
||||
# Long-term setup.py should be dropped.
|
||||
if [ -e pyproject.toml ]; then
|
||||
tmp_path=$(mktemp -d)
|
||||
export PATH="$tmp_path/bin:$PATH"
|
||||
export PYTHONPATH="$tmp_path/@pythonSitePackages@:$PYTHONPATH"
|
||||
mkdir -p "$tmp_path/@pythonSitePackages@"
|
||||
@pythonInterpreter@ -m pip install -e . --prefix "$tmp_path" >&2
|
||||
fi
|
||||
|
||||
runHook postShellHook
|
||||
echo "Finished executing pipShellHook"
|
||||
}
|
||||
|
||||
if [ -z "$dontUsePipBuild" ] && [ -z "$buildPhase" ]; then
|
||||
echo "Using pipBuildPhase"
|
||||
buildPhase=pipBuildPhase
|
||||
fi
|
||||
|
||||
if [ -z "$shellHook" ]; then
|
||||
echo "Using pipShellHook"
|
||||
shellHook=pipShellHook
|
||||
fi
|
@ -0,0 +1,24 @@
|
||||
# Setup hook for pip.
|
||||
echo "Sourcing pip-install-hook"
|
||||
|
||||
declare -a pipInstallFlags
|
||||
|
||||
pipInstallPhase() {
|
||||
echo "Executing pipInstallPhase"
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p "$out/@pythonSitePackages@"
|
||||
export PYTHONPATH="$out/@pythonSitePackages@:$PYTHONPATH"
|
||||
|
||||
pushd dist || return 1
|
||||
@pythonInterpreter@ -m pip install ./*.whl --no-index --prefix="$out" --no-cache $pipInstallFlags --build tmpbuild
|
||||
popd || return 1
|
||||
|
||||
runHook postInstall
|
||||
echo "Finished executing pipInstallPhase"
|
||||
}
|
||||
|
||||
if [ -z "$dontUsePipInstall" ] && [ -z "$installPhase" ]; then
|
||||
echo "Using pipInstallPhase"
|
||||
installPhase=pipInstallPhase
|
||||
fi
|
@ -0,0 +1,49 @@
|
||||
# Setup hook for pytest
|
||||
echo "Sourcing pytest-check-hook"
|
||||
|
||||
declare -ar disabledTests
|
||||
|
||||
function _concatSep {
|
||||
local result
|
||||
local sep="$1"
|
||||
local -n arr=$2
|
||||
for index in ${!arr[*]}; do
|
||||
if [ $index -eq 0 ]; then
|
||||
result="${arr[index]}"
|
||||
else
|
||||
result+=" $sep ${arr[index]}"
|
||||
fi
|
||||
done
|
||||
echo "$result"
|
||||
}
|
||||
|
||||
function _pytestComputeDisabledTestsString () {
|
||||
declare -a tests
|
||||
local tests=($1)
|
||||
local prefix="not "
|
||||
prefixed=( "${tests[@]/#/$prefix}" )
|
||||
result=$(_concatSep "and" prefixed)
|
||||
echo "$result"
|
||||
}
|
||||
|
||||
function pytestCheckPhase() {
|
||||
echo "Executing pytestCheckPhase"
|
||||
runHook preCheck
|
||||
|
||||
# Compose arguments
|
||||
args=" -m pytest"
|
||||
if [ -n "$disabledTests" ]; then
|
||||
disabledTestsString=$(_pytestComputeDisabledTestsString "${disabledTests[@]}")
|
||||
args+=" -k \""$disabledTestsString"\""
|
||||
fi
|
||||
args+=" ${pytestFlagsArray[@]}"
|
||||
eval "@pythonCheckInterpreter@ $args"
|
||||
|
||||
runHook postCheck
|
||||
echo "Finished executing pytestCheckPhase"
|
||||
}
|
||||
|
||||
if [ -z "$dontUsePytestCheck" ] && [ -z "$installCheckPhase" ]; then
|
||||
echo "Using pytestCheckPhase"
|
||||
preDistPhases+=" pytestCheckPhase"
|
||||
fi
|
@ -0,0 +1,10 @@
|
||||
# Setup hook for detecting conflicts in Python packages
|
||||
echo "Sourcing python-catch-conflicts-hook.sh"
|
||||
|
||||
pythonCatchConflictsPhase() {
|
||||
@pythonInterpreter@ @catchConflicts@
|
||||
}
|
||||
|
||||
if [ -z "$dontUsePythonCatchConflicts" ]; then
|
||||
preDistPhases+=" pythonCatchConflictsPhase"
|
||||
fi
|
@ -0,0 +1,16 @@
|
||||
# Setup hook for checking whether Python imports succeed
|
||||
echo "Sourcing python-imports-check-hook.sh"
|
||||
|
||||
pythonImportsCheckPhase () {
|
||||
echo "Executing pythonImportsCheckPhase"
|
||||
|
||||
if [ -n "$pythonImportsCheck" ]; then
|
||||
echo "Check whether the following modules can be imported: $pythonImportsCheck"
|
||||
cd $out && eval "@pythonCheckInterpreter@ -c 'import os; import importlib; list(map(lambda mod: importlib.import_module(mod), os.environ[\"pythonImportsCheck\"].split()))'"
|
||||
fi
|
||||
}
|
||||
|
||||
if [ -z "$dontUsePythonImportsCheck" ]; then
|
||||
echo "Using pythonImportsCheckPhase"
|
||||
preDistPhases+=" pythonImportsCheckPhase"
|
||||
fi
|
@ -0,0 +1,17 @@
|
||||
# Setup hook for detecting conflicts in Python packages
|
||||
echo "Sourcing python-remove-bin-bytecode-hook.sh"
|
||||
|
||||
# Check if we have two packages with the same name in the closure and fail.
|
||||
# If this happens, something went wrong with the dependencies specs.
|
||||
# Intentionally kept in a subdirectory, see catch_conflicts/README.md.
|
||||
|
||||
pythonRemoveBinBytecodePhase () {
|
||||
if [ -d "$out/bin" ]; then
|
||||
rm -rf "$out/bin/__pycache__" # Python 3
|
||||
find "$out/bin" -type f -name "*.pyc" -delete # Python 2
|
||||
fi
|
||||
}
|
||||
|
||||
if [ -z "$dontUsePythonRemoveBinBytecode" ]; then
|
||||
preDistPhases+=" pythonRemoveBinBytecodePhase"
|
||||
fi
|
@ -0,0 +1,47 @@
|
||||
# Setup hook for setuptools.
|
||||
echo "Sourcing setuptools-build-hook"
|
||||
|
||||
setuptoolsBuildPhase() {
|
||||
echo "Executing setuptoolsBuildPhase"
|
||||
local args
|
||||
runHook preBuild
|
||||
|
||||
cp -f @setuppy@ nix_run_setup
|
||||
args=""
|
||||
if [ -n "$setupPyGlobalFlags" ]; then
|
||||
args+="$setupPyGlobalFlags"
|
||||
fi
|
||||
if [ -n "$setupPyBuildFlags" ]; then
|
||||
args+="build_ext $setupPyBuildFlags"
|
||||
fi
|
||||
eval "@pythonInterpreter@ nix_run_setup $args bdist_wheel"
|
||||
|
||||
runHook postBuild
|
||||
echo "Finished executing setuptoolsInstallPhase"
|
||||
}
|
||||
|
||||
setuptoolsShellHook() {
|
||||
echo "Executing setuptoolsShellHook"
|
||||
runHook preShellHook
|
||||
|
||||
if test -e setup.py; then
|
||||
tmp_path=$(mktemp -d)
|
||||
export PATH="$tmp_path/bin:$PATH"
|
||||
export PYTHONPATH="@pythonSitePackages@:$PYTHONPATH"
|
||||
mkdir -p "$tmp_path/@pythonSitePackages@"
|
||||
eval "@pythonInterpreter@ -m pip -e . --prefix $tmp_path >&2"
|
||||
fi
|
||||
|
||||
runHook postShellHook
|
||||
echo "Finished executing setuptoolsShellHook"
|
||||
}
|
||||
|
||||
if [ -z "$dontUseSetuptoolsBuild" ] && [ -z "$buildPhase" ]; then
|
||||
echo "Using setuptoolsBuildPhase"
|
||||
buildPhase=setuptoolsBuildPhase
|
||||
fi
|
||||
|
||||
if [ -z "$dontUseSetuptoolsShellHook" ] && [ -z "$shellHook" ]; then
|
||||
echo "Using setuptoolsShellHook"
|
||||
shellHook=setuptoolsShellHook
|
||||
fi
|
@ -0,0 +1,18 @@
|
||||
# Setup hook for setuptools.
|
||||
echo "Sourcing setuptools-check-hook"
|
||||
|
||||
setuptoolsCheckPhase() {
|
||||
echo "Executing setuptoolsCheckPhase"
|
||||
runHook preCheck
|
||||
|
||||
cp -f @setuppy@ nix_run_setup
|
||||
@pythonCheckInterpreter@ nix_run_setup test
|
||||
|
||||
runHook postCheck
|
||||
echo "Finished executing setuptoolsCheckPhase"
|
||||
}
|
||||
|
||||
if [ -z "$dontUseSetuptoolsCheck" ] && [ -z "$installCheckPhase" ]; then
|
||||
echo "Using setuptoolsCheckPhase"
|
||||
preDistPhases+=" setuptoolsCheckPhase"
|
||||
fi
|
@ -0,0 +1,18 @@
|
||||
# Setup hook to use in case a wheel is fetched
|
||||
echo "Sourcing wheel setup hook"
|
||||
|
||||
wheelUnpackPhase(){
|
||||
echo "Executing wheelUnpackPhase"
|
||||
runHook preUnpack
|
||||
|
||||
mkdir -p dist
|
||||
cp "$src" "dist/$(stripHash "$src")"
|
||||
|
||||
# runHook postUnpack # Calls find...?
|
||||
echo "Finished executing wheelUnpackPhase"
|
||||
}
|
||||
|
||||
if [ -z "$dontUseWheelUnpack" ] && [ -z "$unpackPhase" ]; then
|
||||
echo "Using wheelUnpackPhase"
|
||||
unpackPhase=wheelUnpackPhase
|
||||
fi
|
@ -4,13 +4,22 @@
|
||||
, config
|
||||
, python
|
||||
, wrapPython
|
||||
, setuptools
|
||||
, unzip
|
||||
, ensureNewerSourcesForZipFilesHook
|
||||
# Whether the derivation provides a Python module or not.
|
||||
, toPythonModule
|
||||
, namePrefix
|
||||
, update-python-libraries
|
||||
, setuptools
|
||||
, flitBuildHook
|
||||
, pipBuildHook
|
||||
, pipInstallHook
|
||||
, pythonCatchConflictsHook
|
||||
, pythonImportsCheckHook
|
||||
, pythonRemoveBinBytecodeHook
|
||||
, setuptoolsBuildHook
|
||||
, setuptoolsCheckHook
|
||||
, wheelUnpackHook
|
||||
}:
|
||||
|
||||
{ name ? "${attrs.pname}-${attrs.version}"
|
||||
@ -48,6 +57,11 @@
|
||||
# Skip wrapping of python programs altogether
|
||||
, dontWrapPythonPrograms ? false
|
||||
|
||||
# Don't use Pip to install a wheel
|
||||
# Note this is actually a variable for the pipInstallPhase in pip's setupHook.
|
||||
# It's included here to prevent an infinite recursion.
|
||||
, dontUsePipInstall ? false
|
||||
|
||||
# Skip setting the PYTHONNOUSERSITE environment variable in wrapped programs
|
||||
, permitUserSite ? false
|
||||
|
||||
@ -57,6 +71,13 @@
|
||||
# However, some packages do provide executables with extensions, and thus bytecode is generated.
|
||||
, removeBinBytecode ? true
|
||||
|
||||
# Several package formats are supported.
|
||||
# "setuptools" : Install a common setuptools/distutils based package. This builds a wheel.
|
||||
# "wheel" : Install from a pre-compiled wheel.
|
||||
# "flit" : Install a flit package. This builds a wheel.
|
||||
# "other" : Provide your own buildPhase and installPhase.
|
||||
, format ? "setuptools"
|
||||
|
||||
, meta ? {}
|
||||
|
||||
, passthru ? {}
|
||||
@ -71,26 +92,43 @@ if disabled
|
||||
then throw "${name} not supported for interpreter ${python.executable}"
|
||||
else
|
||||
|
||||
let self = toPythonModule (python.stdenv.mkDerivation (builtins.removeAttrs attrs [
|
||||
"disabled" "checkInputs" "doCheck" "doInstallCheck" "dontWrapPythonPrograms" "catchConflicts"
|
||||
] // {
|
||||
let
|
||||
inherit (python) stdenv;
|
||||
|
||||
self = toPythonModule (stdenv.mkDerivation ((builtins.removeAttrs attrs [
|
||||
"disabled" "checkPhase" "checkInputs" "doCheck" "doInstallCheck" "dontWrapPythonPrograms" "catchConflicts" "format"
|
||||
]) // {
|
||||
|
||||
name = namePrefix + name;
|
||||
|
||||
nativeBuildInputs = [
|
||||
python
|
||||
wrapPython
|
||||
ensureNewerSourcesForZipFilesHook
|
||||
setuptools
|
||||
# ++ lib.optional catchConflicts setuptools # If we no longer propagate setuptools
|
||||
ensureNewerSourcesForZipFilesHook # move to wheel installer (pip) or builder (setuptools, flit, ...)?
|
||||
] ++ lib.optionals catchConflicts [
|
||||
setuptools pythonCatchConflictsHook
|
||||
] ++ lib.optionals removeBinBytecode [
|
||||
pythonRemoveBinBytecodeHook
|
||||
] ++ lib.optionals (lib.hasSuffix "zip" (attrs.src.name or "")) [
|
||||
unzip
|
||||
] ++ lib.optionals (format == "setuptools") [
|
||||
setuptoolsBuildHook
|
||||
] ++ lib.optionals (format == "flit") [
|
||||
flitBuildHook
|
||||
] ++ lib.optionals (format == "pyproject") [
|
||||
pipBuildHook
|
||||
] ++ lib.optionals (format == "wheel") [
|
||||
wheelUnpackHook
|
||||
] ++ lib.optionals (!(format == "other") || dontUsePipInstall) [
|
||||
pipInstallHook
|
||||
] ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [
|
||||
# This is a test, however, it should be ran independent of the checkPhase and checkInputs
|
||||
pythonImportsCheckHook
|
||||
] ++ nativeBuildInputs;
|
||||
|
||||
buildInputs = buildInputs ++ pythonPath;
|
||||
|
||||
# Propagate python and setuptools. We should stop propagating setuptools.
|
||||
propagatedBuildInputs = propagatedBuildInputs ++ [ python setuptools ];
|
||||
propagatedBuildInputs = propagatedBuildInputs ++ [ python ];
|
||||
|
||||
inherit strictDeps;
|
||||
|
||||
@ -98,21 +136,17 @@ let self = toPythonModule (python.stdenv.mkDerivation (builtins.removeAttrs attr
|
||||
|
||||
# Python packages don't have a checkPhase, only an installCheckPhase
|
||||
doCheck = false;
|
||||
doInstallCheck = doCheck;
|
||||
installCheckInputs = checkInputs;
|
||||
doInstallCheck = attrs.doCheck or true;
|
||||
installCheckInputs = [
|
||||
] ++ lib.optionals (format == "setuptools") [
|
||||
# Longer-term we should get rid of this and require
|
||||
# users of this function to set the `installCheckPhase` or
|
||||
# pass in a hook that sets it.
|
||||
setuptoolsCheckHook
|
||||
] ++ checkInputs;
|
||||
|
||||
postFixup = lib.optionalString (!dontWrapPythonPrograms) ''
|
||||
wrapPythonPrograms
|
||||
'' + lib.optionalString removeBinBytecode ''
|
||||
if [ -d "$out/bin" ]; then
|
||||
rm -rf "$out/bin/__pycache__" # Python 3
|
||||
find "$out/bin" -type f -name "*.pyc" -delete # Python 2
|
||||
fi
|
||||
'' + lib.optionalString catchConflicts ''
|
||||
# Check if we have two packages with the same name in the closure and fail.
|
||||
# If this happens, something went wrong with the dependencies specs.
|
||||
# Intentionally kept in a subdirectory, see catch_conflicts/README.md.
|
||||
${python.pythonForBuild.interpreter} ${./catch_conflicts}/catch_conflicts.py
|
||||
'' + attrs.postFixup or '''';
|
||||
|
||||
# Python packages built through cross-compilation are always for the host platform.
|
||||
@ -123,6 +157,10 @@ let self = toPythonModule (python.stdenv.mkDerivation (builtins.removeAttrs attr
|
||||
platforms = python.meta.platforms;
|
||||
isBuildPythonPackage = python.meta.platforms;
|
||||
} // meta;
|
||||
} // lib.optionalAttrs (attrs?checkPhase) {
|
||||
# If given use the specified checkPhase, otherwise use the setup hook.
|
||||
# Longer-term we should get rid of `checkPhase` and use `installCheckPhase`.
|
||||
installCheckPhase = attrs.checkPhase;
|
||||
}));
|
||||
|
||||
passthru.updateScript = let
|
||||
|
@ -1,21 +1,40 @@
|
||||
{ stdenv, fetchurl, meson, ninja, pkgconfig, glib, gettext, python3, gnutls, p11-kit, libproxy, gnome3
|
||||
, gsettings-desktop-schemas }:
|
||||
{ stdenv
|
||||
, fetchurl
|
||||
, substituteAll
|
||||
, meson
|
||||
, ninja
|
||||
, nixosTests
|
||||
, pkgconfig
|
||||
, glib
|
||||
, gettext
|
||||
, makeWrapper
|
||||
, python3
|
||||
, gnutls
|
||||
, p11-kit
|
||||
, libproxy
|
||||
, gnome3
|
||||
, gsettings-desktop-schemas
|
||||
}:
|
||||
|
||||
let
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "glib-networking";
|
||||
version = "2.60.3";
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "${pname}-${version}";
|
||||
|
||||
outputs = [ "out" "installedTests" ];
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
|
||||
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
||||
sha256 = "1mfw44qpmwvz6yzj8c6spx6z357wrmkk15byrkc5byagd82860fm";
|
||||
};
|
||||
|
||||
outputs = [ "out" "dev" ]; # to deal with propagatedBuildInputs
|
||||
patches = [
|
||||
(substituteAll {
|
||||
src = ./hardcode-gsettings.patch;
|
||||
gds_gsettings_path = glib.getSchemaPath gsettings-desktop-schemas;
|
||||
})
|
||||
|
||||
PKG_CONFIG_GIO_2_0_GIOMODULEDIR = "${placeholder "out"}/lib/gio/modules";
|
||||
./installed-tests-path.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
chmod +x meson_post_install.py # patchShebangs requires executable file
|
||||
@ -23,27 +42,52 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson ninja pkgconfig gettext
|
||||
python3 # install_script
|
||||
meson
|
||||
ninja
|
||||
pkgconfig
|
||||
gettext
|
||||
makeWrapper
|
||||
python3 # for install_script
|
||||
];
|
||||
propagatedBuildInputs = [ glib gnutls p11-kit libproxy gsettings-desktop-schemas ];
|
||||
|
||||
mesonFlags = [
|
||||
# Default auto detection doesn't work
|
||||
"-Dgnutls=enabled"
|
||||
buildInputs = [
|
||||
glib
|
||||
gnutls
|
||||
p11-kit
|
||||
libproxy
|
||||
gsettings-desktop-schemas
|
||||
];
|
||||
|
||||
doCheck = false; # tests need to access the certificates (among other things)
|
||||
|
||||
mesonFlags = [
|
||||
"-Dinstalled_tests=true"
|
||||
"-Dinstalled_test_prefix=${placeholder "installedTests"}"
|
||||
];
|
||||
|
||||
postFixup = ''
|
||||
find "$installedTests/libexec" "$out/libexec" -type f -executable -print0 \
|
||||
| while IFS= read -r -d "" file; do
|
||||
echo "Wrapping program '$file'"
|
||||
wrapProgram "$file" --prefix GIO_EXTRA_MODULES : "$out/lib/gio/modules"
|
||||
done
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
updateScript = gnome3.updateScript {
|
||||
packageName = pname;
|
||||
};
|
||||
|
||||
tests = {
|
||||
installedTests = nixosTests.glib-networking;
|
||||
};
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Network-related giomodules for glib";
|
||||
license = licenses.lgpl2Plus;
|
||||
homepage = https://gitlab.gnome.org/GNOME/glib-networking;
|
||||
license = licenses.lgpl21Plus;
|
||||
maintainers = gnome3.maintainers;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
@ -0,0 +1,341 @@
|
||||
diff --git a/proxy/gnome/gproxyresolvergnome.c b/proxy/gnome/gproxyresolvergnome.c
|
||||
index 50b63cd..4364116 100644
|
||||
--- a/proxy/gnome/gproxyresolvergnome.c
|
||||
+++ b/proxy/gnome/gproxyresolvergnome.c
|
||||
@@ -156,23 +156,79 @@
|
||||
|
||||
resolver->base_resolver = g_simple_proxy_resolver_new (NULL, NULL);
|
||||
|
||||
- resolver->proxy_settings = g_settings_new (GNOME_PROXY_SETTINGS_SCHEMA);
|
||||
+ {
|
||||
+ GSettingsSchemaSource *schema_source;
|
||||
+ GSettingsSchema *schema;
|
||||
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
|
||||
+ g_settings_schema_source_get_default(),
|
||||
+ TRUE, NULL);
|
||||
+ schema = g_settings_schema_source_lookup(schema_source,
|
||||
+ GNOME_PROXY_SETTINGS_SCHEMA,
|
||||
+ FALSE);
|
||||
+ resolver->proxy_settings = g_settings_new_full(schema, NULL, NULL);
|
||||
+ g_settings_schema_source_unref(schema_source);
|
||||
+ g_settings_schema_unref(schema);
|
||||
+ }
|
||||
g_signal_connect (resolver->proxy_settings, "changed",
|
||||
G_CALLBACK (gsettings_changed), resolver);
|
||||
- resolver->http_settings = g_settings_get_child (resolver->proxy_settings,
|
||||
- GNOME_PROXY_HTTP_CHILD_SCHEMA);
|
||||
+ {
|
||||
+ GSettingsSchemaSource *schema_source;
|
||||
+ GSettingsSchema *schema;
|
||||
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
|
||||
+ g_settings_schema_source_get_default(),
|
||||
+ TRUE, NULL);
|
||||
+ schema = g_settings_schema_source_lookup(schema_source,
|
||||
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_HTTP_CHILD_SCHEMA,
|
||||
+ FALSE);
|
||||
+ resolver->http_settings = g_settings_new_full(schema, NULL, NULL);
|
||||
+ g_settings_schema_source_unref(schema_source);
|
||||
+ g_settings_schema_unref(schema);
|
||||
+ }
|
||||
g_signal_connect (resolver->http_settings, "changed",
|
||||
G_CALLBACK (gsettings_changed), resolver);
|
||||
- resolver->https_settings = g_settings_get_child (resolver->proxy_settings,
|
||||
- GNOME_PROXY_HTTPS_CHILD_SCHEMA);
|
||||
+ {
|
||||
+ GSettingsSchemaSource *schema_source;
|
||||
+ GSettingsSchema *schema;
|
||||
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
|
||||
+ g_settings_schema_source_get_default(),
|
||||
+ TRUE, NULL);
|
||||
+ schema = g_settings_schema_source_lookup(schema_source,
|
||||
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_HTTPS_CHILD_SCHEMA,
|
||||
+ FALSE);
|
||||
+ resolver->https_settings = g_settings_new_full(schema, NULL, NULL);
|
||||
+ g_settings_schema_source_unref(schema_source);
|
||||
+ g_settings_schema_unref(schema);
|
||||
+ }
|
||||
g_signal_connect (resolver->https_settings, "changed",
|
||||
G_CALLBACK (gsettings_changed), resolver);
|
||||
- resolver->ftp_settings = g_settings_get_child (resolver->proxy_settings,
|
||||
- GNOME_PROXY_FTP_CHILD_SCHEMA);
|
||||
+ {
|
||||
+ GSettingsSchemaSource *schema_source;
|
||||
+ GSettingsSchema *schema;
|
||||
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
|
||||
+ g_settings_schema_source_get_default(),
|
||||
+ TRUE, NULL);
|
||||
+ schema = g_settings_schema_source_lookup(schema_source,
|
||||
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_FTP_CHILD_SCHEMA,
|
||||
+ FALSE);
|
||||
+ resolver->ftp_settings = g_settings_new_full(schema, NULL, NULL);
|
||||
+ g_settings_schema_source_unref(schema_source);
|
||||
+ g_settings_schema_unref(schema);
|
||||
+ }
|
||||
g_signal_connect (resolver->ftp_settings, "changed",
|
||||
G_CALLBACK (gsettings_changed), resolver);
|
||||
- resolver->socks_settings = g_settings_get_child (resolver->proxy_settings,
|
||||
- GNOME_PROXY_SOCKS_CHILD_SCHEMA);
|
||||
+ {
|
||||
+ GSettingsSchemaSource *schema_source;
|
||||
+ GSettingsSchema *schema;
|
||||
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
|
||||
+ g_settings_schema_source_get_default(),
|
||||
+ TRUE, NULL);
|
||||
+ schema = g_settings_schema_source_lookup(schema_source,
|
||||
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_SOCKS_CHILD_SCHEMA,
|
||||
+ FALSE);
|
||||
+ resolver->socks_settings = g_settings_new_full(schema, NULL, NULL);
|
||||
+ g_settings_schema_source_unref(schema_source);
|
||||
+ g_settings_schema_unref(schema);
|
||||
+ }
|
||||
g_signal_connect (resolver->socks_settings, "changed",
|
||||
G_CALLBACK (gsettings_changed), resolver);
|
||||
|
||||
diff --git a/proxy/tests/gnome.c b/proxy/tests/gnome.c
|
||||
index f76b094..54751e3 100644
|
||||
--- a/proxy/tests/gnome.c
|
||||
+++ b/proxy/tests/gnome.c
|
||||
@@ -55,26 +55,86 @@
|
||||
{
|
||||
GSettings *settings, *child;
|
||||
|
||||
- settings = g_settings_new (GNOME_PROXY_SETTINGS_SCHEMA);
|
||||
+ {
|
||||
+ GSettingsSchemaSource *schema_source;
|
||||
+ GSettingsSchema *schema;
|
||||
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
|
||||
+ g_settings_schema_source_get_default(),
|
||||
+ TRUE, NULL);
|
||||
+ schema = g_settings_schema_source_lookup(schema_source,
|
||||
+ GNOME_PROXY_SETTINGS_SCHEMA,
|
||||
+ FALSE);
|
||||
+ settings = g_settings_new_full(schema, NULL, NULL);
|
||||
+ g_settings_schema_source_unref(schema_source);
|
||||
+ g_settings_schema_unref(schema);
|
||||
+ }
|
||||
g_settings_reset (settings, GNOME_PROXY_MODE_KEY);
|
||||
g_settings_reset (settings, GNOME_PROXY_USE_SAME_PROXY_KEY);
|
||||
|
||||
- child = g_settings_get_child (settings, GNOME_PROXY_HTTP_CHILD_SCHEMA);
|
||||
+ {
|
||||
+ GSettingsSchemaSource *schema_source;
|
||||
+ GSettingsSchema *schema;
|
||||
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
|
||||
+ g_settings_schema_source_get_default(),
|
||||
+ TRUE, NULL);
|
||||
+ schema = g_settings_schema_source_lookup(schema_source,
|
||||
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_HTTP_CHILD_SCHEMA,
|
||||
+ FALSE);
|
||||
+ child = g_settings_new_full(schema, NULL, NULL);
|
||||
+ g_settings_schema_source_unref(schema_source);
|
||||
+ g_settings_schema_unref(schema);
|
||||
+ }
|
||||
g_settings_reset (child, GNOME_PROXY_HTTP_HOST_KEY);
|
||||
g_settings_reset (child, GNOME_PROXY_HTTP_PORT_KEY);
|
||||
g_object_unref (child);
|
||||
|
||||
- child = g_settings_get_child (settings, GNOME_PROXY_HTTPS_CHILD_SCHEMA);
|
||||
+ {
|
||||
+ GSettingsSchemaSource *schema_source;
|
||||
+ GSettingsSchema *schema;
|
||||
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
|
||||
+ g_settings_schema_source_get_default(),
|
||||
+ TRUE, NULL);
|
||||
+ schema = g_settings_schema_source_lookup(schema_source,
|
||||
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_HTTPS_CHILD_SCHEMA,
|
||||
+ FALSE);
|
||||
+ child = g_settings_new_full(schema, NULL, NULL);
|
||||
+ g_settings_schema_source_unref(schema_source);
|
||||
+ g_settings_schema_unref(schema);
|
||||
+ }
|
||||
g_settings_reset (child, GNOME_PROXY_HTTPS_HOST_KEY);
|
||||
g_settings_reset (child, GNOME_PROXY_HTTPS_PORT_KEY);
|
||||
g_object_unref (child);
|
||||
|
||||
- child = g_settings_get_child (settings, GNOME_PROXY_FTP_CHILD_SCHEMA);
|
||||
+ {
|
||||
+ GSettingsSchemaSource *schema_source;
|
||||
+ GSettingsSchema *schema;
|
||||
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
|
||||
+ g_settings_schema_source_get_default(),
|
||||
+ TRUE, NULL);
|
||||
+ schema = g_settings_schema_source_lookup(schema_source,
|
||||
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_FTP_CHILD_SCHEMA,
|
||||
+ FALSE);
|
||||
+ child = g_settings_new_full(schema, NULL, NULL);
|
||||
+ g_settings_schema_source_unref(schema_source);
|
||||
+ g_settings_schema_unref(schema);
|
||||
+ }
|
||||
g_settings_reset (child, GNOME_PROXY_FTP_HOST_KEY);
|
||||
g_settings_reset (child, GNOME_PROXY_FTP_PORT_KEY);
|
||||
g_object_unref (child);
|
||||
|
||||
- child = g_settings_get_child (settings, GNOME_PROXY_SOCKS_CHILD_SCHEMA);
|
||||
+ {
|
||||
+ GSettingsSchemaSource *schema_source;
|
||||
+ GSettingsSchema *schema;
|
||||
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
|
||||
+ g_settings_schema_source_get_default(),
|
||||
+ TRUE, NULL);
|
||||
+ schema = g_settings_schema_source_lookup(schema_source,
|
||||
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_SOCKS_CHILD_SCHEMA,
|
||||
+ FALSE);
|
||||
+ child = g_settings_new_full(schema, NULL, NULL);
|
||||
+ g_settings_schema_source_unref(schema_source);
|
||||
+ g_settings_schema_unref(schema);
|
||||
+ }
|
||||
g_settings_reset (child, GNOME_PROXY_SOCKS_HOST_KEY);
|
||||
g_settings_reset (child, GNOME_PROXY_SOCKS_PORT_KEY);
|
||||
g_object_unref (child);
|
||||
@@ -88,21 +148,69 @@
|
||||
{
|
||||
GSettings *settings, *child;
|
||||
|
||||
- settings = g_settings_new (GNOME_PROXY_SETTINGS_SCHEMA);
|
||||
+ {
|
||||
+ GSettingsSchemaSource *schema_source;
|
||||
+ GSettingsSchema *schema;
|
||||
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
|
||||
+ g_settings_schema_source_get_default(),
|
||||
+ TRUE, NULL);
|
||||
+ schema = g_settings_schema_source_lookup(schema_source,
|
||||
+ GNOME_PROXY_SETTINGS_SCHEMA,
|
||||
+ FALSE);
|
||||
+ settings = g_settings_new_full(schema, NULL, NULL);
|
||||
+ g_settings_schema_source_unref(schema_source);
|
||||
+ g_settings_schema_unref(schema);
|
||||
+ }
|
||||
g_settings_set_enum (settings, GNOME_PROXY_MODE_KEY, G_DESKTOP_PROXY_MODE_MANUAL);
|
||||
g_settings_set_boolean (settings, GNOME_PROXY_USE_SAME_PROXY_KEY, TRUE);
|
||||
|
||||
- child = g_settings_get_child (settings, GNOME_PROXY_HTTP_CHILD_SCHEMA);
|
||||
+ {
|
||||
+ GSettingsSchemaSource *schema_source;
|
||||
+ GSettingsSchema *schema;
|
||||
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
|
||||
+ g_settings_schema_source_get_default(),
|
||||
+ TRUE, NULL);
|
||||
+ schema = g_settings_schema_source_lookup(schema_source,
|
||||
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_HTTP_CHILD_SCHEMA,
|
||||
+ FALSE);
|
||||
+ child = g_settings_new_full(schema, NULL, NULL);
|
||||
+ g_settings_schema_source_unref(schema_source);
|
||||
+ g_settings_schema_unref(schema);
|
||||
+ }
|
||||
g_settings_set_string (child, GNOME_PROXY_HTTP_HOST_KEY, "proxy.example.com");
|
||||
g_settings_set_int (child, GNOME_PROXY_HTTP_PORT_KEY, 8080);
|
||||
g_object_unref (child);
|
||||
|
||||
- child = g_settings_get_child (settings, GNOME_PROXY_HTTPS_CHILD_SCHEMA);
|
||||
+ {
|
||||
+ GSettingsSchemaSource *schema_source;
|
||||
+ GSettingsSchema *schema;
|
||||
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
|
||||
+ g_settings_schema_source_get_default(),
|
||||
+ TRUE, NULL);
|
||||
+ schema = g_settings_schema_source_lookup(schema_source,
|
||||
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_HTTPS_CHILD_SCHEMA,
|
||||
+ FALSE);
|
||||
+ child = g_settings_new_full(schema, NULL, NULL);
|
||||
+ g_settings_schema_source_unref(schema_source);
|
||||
+ g_settings_schema_unref(schema);
|
||||
+ }
|
||||
g_settings_set_string (child, GNOME_PROXY_HTTPS_HOST_KEY, "proxy-s.example.com");
|
||||
g_settings_set_int (child, GNOME_PROXY_HTTPS_PORT_KEY, 7070);
|
||||
g_object_unref (child);
|
||||
|
||||
- child = g_settings_get_child (settings, GNOME_PROXY_FTP_CHILD_SCHEMA);
|
||||
+ {
|
||||
+ GSettingsSchemaSource *schema_source;
|
||||
+ GSettingsSchema *schema;
|
||||
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
|
||||
+ g_settings_schema_source_get_default(),
|
||||
+ TRUE, NULL);
|
||||
+ schema = g_settings_schema_source_lookup(schema_source,
|
||||
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_FTP_CHILD_SCHEMA,
|
||||
+ FALSE);
|
||||
+ child = g_settings_new_full(schema, NULL, NULL);
|
||||
+ g_settings_schema_source_unref(schema_source);
|
||||
+ g_settings_schema_unref(schema);
|
||||
+ }
|
||||
g_settings_set_string (child, GNOME_PROXY_FTP_HOST_KEY, "proxy-f.example.com");
|
||||
g_settings_set_int (child, GNOME_PROXY_FTP_PORT_KEY, 6060);
|
||||
g_object_unref (child);
|
||||
@@ -119,12 +227,36 @@
|
||||
GSettings *settings, *child;
|
||||
const gchar *ignore_hosts[2] = { "127.0.0.1", NULL };
|
||||
|
||||
- settings = g_settings_new (GNOME_PROXY_SETTINGS_SCHEMA);
|
||||
+ {
|
||||
+ GSettingsSchemaSource *schema_source;
|
||||
+ GSettingsSchema *schema;
|
||||
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
|
||||
+ g_settings_schema_source_get_default(),
|
||||
+ TRUE, NULL);
|
||||
+ schema = g_settings_schema_source_lookup(schema_source,
|
||||
+ GNOME_PROXY_SETTINGS_SCHEMA,
|
||||
+ FALSE);
|
||||
+ settings = g_settings_new_full(schema, NULL, NULL);
|
||||
+ g_settings_schema_source_unref(schema_source);
|
||||
+ g_settings_schema_unref(schema);
|
||||
+ }
|
||||
g_settings_set_enum (settings, GNOME_PROXY_MODE_KEY, G_DESKTOP_PROXY_MODE_MANUAL);
|
||||
g_settings_set (settings, GNOME_PROXY_IGNORE_HOSTS_KEY,
|
||||
"@as", g_variant_new_strv (ignore_hosts, -1));
|
||||
|
||||
- child = g_settings_get_child (settings, GNOME_PROXY_SOCKS_CHILD_SCHEMA);
|
||||
+ {
|
||||
+ GSettingsSchemaSource *schema_source;
|
||||
+ GSettingsSchema *schema;
|
||||
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
|
||||
+ g_settings_schema_source_get_default(),
|
||||
+ TRUE, NULL);
|
||||
+ schema = g_settings_schema_source_lookup(schema_source,
|
||||
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_SOCKS_CHILD_SCHEMA,
|
||||
+ FALSE);
|
||||
+ child = g_settings_new_full(schema, NULL, NULL);
|
||||
+ g_settings_schema_source_unref(schema_source);
|
||||
+ g_settings_schema_unref(schema);
|
||||
+ }
|
||||
g_settings_set_string (child, GNOME_PROXY_SOCKS_HOST_KEY, "proxy.example.com");
|
||||
g_settings_set_int (child, GNOME_PROXY_SOCKS_PORT_KEY, 1234);
|
||||
g_object_unref (child);
|
||||
@@ -139,12 +271,36 @@
|
||||
{
|
||||
GSettings *settings, *http;
|
||||
|
||||
- settings = g_settings_new (GNOME_PROXY_SETTINGS_SCHEMA);
|
||||
+ {
|
||||
+ GSettingsSchemaSource *schema_source;
|
||||
+ GSettingsSchema *schema;
|
||||
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
|
||||
+ g_settings_schema_source_get_default(),
|
||||
+ TRUE, NULL);
|
||||
+ schema = g_settings_schema_source_lookup(schema_source,
|
||||
+ GNOME_PROXY_SETTINGS_SCHEMA,
|
||||
+ FALSE);
|
||||
+ settings = g_settings_new_full(schema, NULL, NULL);
|
||||
+ g_settings_schema_source_unref(schema_source);
|
||||
+ g_settings_schema_unref(schema);
|
||||
+ }
|
||||
g_settings_set_enum (settings, GNOME_PROXY_MODE_KEY, G_DESKTOP_PROXY_MODE_MANUAL);
|
||||
g_settings_set (settings, GNOME_PROXY_IGNORE_HOSTS_KEY,
|
||||
"@as", g_variant_new_strv (ignore_hosts, n_ignore_hosts));
|
||||
|
||||
- http = g_settings_get_child (settings, GNOME_PROXY_HTTP_CHILD_SCHEMA);
|
||||
+ {
|
||||
+ GSettingsSchemaSource *schema_source;
|
||||
+ GSettingsSchema *schema;
|
||||
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
|
||||
+ g_settings_schema_source_get_default(),
|
||||
+ TRUE, NULL);
|
||||
+ schema = g_settings_schema_source_lookup(schema_source,
|
||||
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_HTTP_CHILD_SCHEMA,
|
||||
+ FALSE);
|
||||
+ http = g_settings_new_full(schema, NULL, NULL);
|
||||
+ g_settings_schema_source_unref(schema_source);
|
||||
+ g_settings_schema_unref(schema);
|
||||
+ }
|
||||
g_settings_set_string (http, GNOME_PROXY_HTTP_HOST_KEY, "localhost");
|
||||
g_settings_set_int (http, GNOME_PROXY_HTTP_PORT_KEY, 8080);
|
||||
|
@ -0,0 +1,25 @@
|
||||
diff --git a/meson.build b/meson.build
|
||||
index 4d91677..aaaeb2b 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -12,8 +12,8 @@
|
||||
libexecdir = join_paths(prefix, get_option('libexecdir'))
|
||||
localedir = join_paths(prefix, get_option('localedir'))
|
||||
|
||||
-installed_tests_metadir = join_paths(datadir, 'installed-tests', meson.project_name())
|
||||
-installed_tests_execdir = join_paths(libexecdir, 'installed-tests', meson.project_name())
|
||||
+installed_tests_metadir = join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests', meson.project_name())
|
||||
+installed_tests_execdir = join_paths(get_option('installed_test_prefix'), 'libexec', 'installed-tests', meson.project_name())
|
||||
|
||||
cc = meson.get_compiler('c')
|
||||
host_system = host_machine.system()
|
||||
diff --git a/meson_options.txt b/meson_options.txt
|
||||
index 3a525dd..fc86302 100644
|
||||
--- a/meson_options.txt
|
||||
+++ b/meson_options.txt
|
||||
@@ -3,4 +3,5 @@
|
||||
option('libproxy', type: 'feature', value: 'auto', description: 'support for libproxy proxy configration')
|
||||
option('gnome_proxy', type: 'feature', value: 'auto', description: 'support for GNOME desktop proxy configuration')
|
||||
option('installed_tests', type: 'boolean', value: false, description: 'enable installed tests')
|
||||
+option('installed_test_prefix', type: 'string', value: '', description: 'Prefix for installed tests')
|
||||
option('static_modules', type: 'boolean', value: false, description: 'build static modules')
|
@ -46,16 +46,15 @@ let
|
||||
'';
|
||||
|
||||
binPrograms = optional (!stdenv.isDarwin) "gapplication" ++ [ "gdbus" "gio" "gsettings" ];
|
||||
version = "2.60.6";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "glib";
|
||||
inherit version;
|
||||
version = "2.60.7";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/glib/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
||||
sha256 = "0v7vpx2md1gn0wwiirn7g4bhf2csfvcr03y96q2zv97ain6sp3zz";
|
||||
sha256 = "0433m0na8nc4cf0gidf4gfzz8k5d3dsssmh541qkpzcsaspw04lb";
|
||||
};
|
||||
|
||||
patches = optional stdenv.isDarwin ./darwin-compilation.patch
|
||||
|
@ -8,7 +8,7 @@
|
||||
}:
|
||||
|
||||
let
|
||||
version = "2.6.0";
|
||||
version = "2.6.1";
|
||||
inherit (stdenv.lib) optional optionals optionalString;
|
||||
in
|
||||
|
||||
@ -17,7 +17,7 @@ stdenv.mkDerivation {
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.freedesktop.org/software/harfbuzz/release/harfbuzz-${version}.tar.xz";
|
||||
sha256 = "0rn9fvnrxds7f4812yx68myy3x7szb4z9ql4m1fgjrc2ahbx3xww";
|
||||
sha256 = "0kw4c04jd8c8ili3j1glgv0wsr207313fs3jh2rawf53m8zznlf6";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
@ -1,9 +1,9 @@
|
||||
{ stdenv
|
||||
, fetchurl
|
||||
, fetchpatch
|
||||
, pkgconfig
|
||||
, meson
|
||||
, ninja
|
||||
, nixosTests
|
||||
, vala
|
||||
, gettext
|
||||
, libxml2
|
||||
@ -22,32 +22,17 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libgdata";
|
||||
version = "0.17.10";
|
||||
version = "0.17.11";
|
||||
|
||||
outputs = [ "out" "dev" "installedTests" ];
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
||||
sha256 = "04mh2p5x2iidfx0d1cablxbi3hvna8cmlddc1mm4387n0grx3ly1";
|
||||
sha256 = "11m99sh2k679rnsvqsi95s1l0r8lkvj61dmwg1pnxvsd5q91g6bb";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./installed-tests-path.patch
|
||||
(fetchpatch {
|
||||
# Meson fixes
|
||||
url = "https://gitlab.gnome.org/GNOME/libgdata/commit/f6d0e3f3b6fa8e8ee9569372c5709c1fb84af2c1.diff";
|
||||
sha256 = "00yrppn0s21i41r9mwzvrrv7j5dida09kh7i44kv8hrbrlfag7bm";
|
||||
})
|
||||
(fetchpatch {
|
||||
# Meson minor fixes
|
||||
url = "https://gitlab.gnome.org/GNOME/libgdata/commit/b653f602b3c2b518101c5d909e1651534c22757a.diff";
|
||||
sha256 = "1bn0rffsvkzjl59aw8dmq1wil58x1fshz0m6xabpn79ffvbjld8j";
|
||||
})
|
||||
(fetchpatch {
|
||||
# Meson: Fix G_LOG_DOMAIN
|
||||
url = "https://gitlab.gnome.org/GNOME/libgdata/commit/5d318e0bf905d0f1a8b3fe1e47ee7847739082e3.diff";
|
||||
sha256 = "11i2blq811d53433kdq4hhsscgkrq5f50d9ih4ixgs3j47hg7b1w";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
@ -87,6 +72,10 @@ stdenv.mkDerivation rec {
|
||||
packageName = pname;
|
||||
versionPolicy = "none"; # Stable version has not been updated for a long time.
|
||||
};
|
||||
|
||||
tests = {
|
||||
installedTests = nixosTests.libgdata;
|
||||
};
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git a/gdata/tests/meson.build b/gdata/tests/meson.build
|
||||
index 52154e7a..1a44d1d8 100644
|
||||
index 05184deb..3a9392d4 100644
|
||||
--- a/gdata/tests/meson.build
|
||||
+++ b/gdata/tests/meson.build
|
||||
@@ -1,5 +1,12 @@
|
||||
@ -17,17 +17,17 @@ index 52154e7a..1a44d1d8 100644
|
||||
|
||||
tests_sources = files(
|
||||
'common.c',
|
||||
@@ -48,7 +55,7 @@ foreach test_name, extra_args: tests
|
||||
@@ -49,7 +56,7 @@ foreach test_name, extra_args: tests
|
||||
dependencies: common_deps + extra_args.get('dependencies', []),
|
||||
sources: tests_sources,
|
||||
install: install_tests,
|
||||
install: install_tests and not should_fail,
|
||||
- install_dir: tests_execdir,
|
||||
+ install_dir: tests_bindir,
|
||||
)
|
||||
|
||||
test(
|
||||
@@ -63,7 +70,7 @@ if install_tests
|
||||
foreach test_name, extra_args: tests
|
||||
@@ -65,7 +72,7 @@ if install_tests
|
||||
should_fail = extra_args.get('should_fail', false)
|
||||
tests_conf = {
|
||||
'TEST_TYPE': 'session',
|
||||
- 'TEST_ABS_PATH': gdata_prefix / tests_execdir / test_name,
|
||||
@ -35,10 +35,10 @@ index 52154e7a..1a44d1d8 100644
|
||||
}
|
||||
|
||||
configure_file (
|
||||
@@ -71,13 +78,13 @@ if install_tests
|
||||
@@ -73,13 +80,13 @@ if install_tests
|
||||
output: test_name + '.test',
|
||||
configuration: tests_conf,
|
||||
install: true,
|
||||
install: not should_fail,
|
||||
- install_dir: tests_metadir,
|
||||
+ install_dir: tests_datadir,
|
||||
)
|
||||
@ -51,7 +51,7 @@ index 52154e7a..1a44d1d8 100644
|
||||
)
|
||||
|
||||
test_data = [
|
||||
@@ -96,6 +103,6 @@ if install_tests
|
||||
@@ -98,6 +105,6 @@ if install_tests
|
||||
|
||||
install_data(
|
||||
test_data,
|
||||
@ -60,7 +60,7 @@ index 52154e7a..1a44d1d8 100644
|
||||
)
|
||||
endif
|
||||
diff --git a/meson.build b/meson.build
|
||||
index 7d2f5254..bed3e189 100644
|
||||
index 50441abb..5fc773b1 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -20,9 +20,9 @@ gdata_api_version_minor = 0
|
||||
|
@ -3,11 +3,11 @@
|
||||
stdenv.mkDerivation rec {
|
||||
|
||||
pname = "libjpeg-turbo";
|
||||
version = "2.0.2";
|
||||
version = "2.0.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
|
||||
sha256 = "1v9gx1gdzgxf51nd55ncq7rghmj4x9x91rby50ag36irwngmkf5c";
|
||||
sha256 = "1ds16bnj17v6hzd43w8pzijz3imd9am4hw75ir0fxm240m8dwij2";
|
||||
};
|
||||
|
||||
patches =
|
||||
|
@ -1,6 +1,22 @@
|
||||
{ stdenv, fetchFromGitHub, pkgconfig, cmake, zlib, fetchpatch
|
||||
, dbus, networkmanager, spidermonkey_38, pcre, python2, python3
|
||||
, SystemConfiguration, CoreFoundation, JavaScriptCore }:
|
||||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, pkgconfig
|
||||
, cmake
|
||||
, zlib
|
||||
, fetchpatch
|
||||
, dbus
|
||||
, networkmanager
|
||||
, spidermonkey_38
|
||||
, pcre
|
||||
, gsettings-desktop-schemas
|
||||
, glib
|
||||
, makeWrapper
|
||||
, python2
|
||||
, python3
|
||||
, SystemConfiguration
|
||||
, CoreFoundation
|
||||
, JavaScriptCore
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libproxy";
|
||||
@ -13,28 +29,47 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "10swd3x576pinx33iwsbd4h15fbh2snmfxzcmab4c56nb08qlbrs";
|
||||
};
|
||||
|
||||
outputs = [ "out" "dev" ]; # to deal with propagatedBuildInputs
|
||||
outputs = [ "out" "dev" "py2" "py3" ];
|
||||
|
||||
nativeBuildInputs = [ pkgconfig cmake ];
|
||||
nativeBuildInputs = [
|
||||
pkgconfig
|
||||
cmake
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
buildInputs = [ pcre python2 python3 zlib ]
|
||||
++ (if stdenv.hostPlatform.isDarwin
|
||||
then [ SystemConfiguration CoreFoundation JavaScriptCore ]
|
||||
else [ spidermonkey_38 dbus networkmanager ]);
|
||||
buildInputs = [
|
||||
pcre
|
||||
python2
|
||||
python3
|
||||
zlib
|
||||
] ++ (if stdenv.hostPlatform.isDarwin then [
|
||||
SystemConfiguration
|
||||
CoreFoundation
|
||||
JavaScriptCore
|
||||
] else [
|
||||
glib
|
||||
spidermonkey_38
|
||||
dbus
|
||||
networkmanager
|
||||
]);
|
||||
|
||||
preConfigure = ''
|
||||
cmakeFlagsArray+=(
|
||||
"-DWITH_MOZJS=ON"
|
||||
"-DPYTHON2_SITEPKG_DIR=$out/${python2.sitePackages}"
|
||||
"-DPYTHON3_SITEPKG_DIR=$out/${python3.sitePackages}"
|
||||
)
|
||||
'';
|
||||
cmakeFlags = [
|
||||
"-DWITH_MOZJS=ON"
|
||||
"-DPYTHON2_SITEPKG_DIR=${placeholder "py2"}/${python2.sitePackages}"
|
||||
"-DPYTHON3_SITEPKG_DIR=${placeholder "py3"}/${python3.sitePackages}"
|
||||
];
|
||||
|
||||
patches = stdenv.lib.optional stdenv.isDarwin
|
||||
patches = stdenv.lib.optionals stdenv.isDarwin [
|
||||
(fetchpatch {
|
||||
url = "https://github.com/libproxy/libproxy/commit/44158f03f8522116758d335688ed840dfcb50ac8.patch";
|
||||
sha256 = "0axfvb6j7gcys6fkwi9dkn006imhvm3kqr83gpwban8419n0q5v1";
|
||||
});
|
||||
})
|
||||
];
|
||||
|
||||
postFixup = ''
|
||||
# config_gnome3 uses the helper to find GNOME proxy settings
|
||||
wrapProgram $out/libexec/pxgsettings --prefix XDG_DATA_DIRS : "${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}"
|
||||
'';
|
||||
|
||||
doCheck = false; # fails 1 out of 10 tests
|
||||
|
||||
|
@ -5,14 +5,14 @@
|
||||
|
||||
let
|
||||
pname = "librsvg";
|
||||
version = "2.44.14";
|
||||
version = "2.44.15";
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "${pname}-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
|
||||
sha256 = "00z3qimpk909pcqq0jlsis5sskc6kn7cqia20smd9k9rhs3ag1ba";
|
||||
sha256 = "1p4cifnxppz2qwsk2wvn2a6c7dpvgfrsf5vlhdkmsd373czm9396";
|
||||
};
|
||||
|
||||
outputs = [ "out" "dev" "installedTests" ];
|
||||
|
@ -1,11 +1,12 @@
|
||||
{ stdenv, fetchurl, pkgconfig, systemd ? null, libobjc, IOKit, withStatic ? false }:
|
||||
|
||||
stdenv.mkDerivation (rec {
|
||||
name = "libusb-1.0.22";
|
||||
pname = "libusb";
|
||||
version = "1.0.23";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/libusb/${name}.tar.bz2";
|
||||
sha256 = "0mw1a5ss4alg37m6bd4k44v35xwrcwp5qm4s686q1nsgkbavkbkm";
|
||||
url = "https://github.com/${pname}/${pname}/releases/download/v${version}/${pname}-${version}.tar.bz2";
|
||||
sha256 = "13dd2a9x290d1q8nb1lqiaf36grcvns5ripk5k2xm0lajmpc04fv";
|
||||
};
|
||||
|
||||
outputs = [ "out" "dev" ]; # get rid of propagating systemd closure
|
||||
|
@ -2,15 +2,12 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "glu";
|
||||
version = "9.0.0";
|
||||
version = "9.0.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "ftp://ftp.freedesktop.org/pub/mesa/glu/${pname}-${version}.tar.bz2";
|
||||
sha256 = "04nzlil3a6fifcmb95iix3yl8mbxdl66b99s62yzq8m7g79x0yhz";
|
||||
url = "ftp://ftp.freedesktop.org/pub/mesa/${pname}/${pname}-${version}.tar.xz";
|
||||
sha256 = "1g2m634p73mixkzv1qz1d0flwm390ydi41bwmchiqvdssqnlqnpv";
|
||||
};
|
||||
postPatch = ''
|
||||
echo 'Cflags: -I''${includedir}' >> glu.pc.in
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
propagatedBuildInputs = [ libGL ]
|
||||
|
@ -15,7 +15,7 @@ assert stdenv.isDarwin -> !enableGtk2Plugins;
|
||||
with stdenv.lib;
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "webkitgtk";
|
||||
version = "2.24.3";
|
||||
version = "2.24.4";
|
||||
|
||||
meta = {
|
||||
description = "Web content rendering engine, GTK port";
|
||||
@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://webkitgtk.org/releases/${pname}-${version}.tar.xz";
|
||||
sha256 = "0lbcrw5axwrbrajxq7fqywfyh0djqi23ynzb5wi5ghw2grnp83cl";
|
||||
sha256 = "1n3x5g1z6rg9n1ssna7wi0z6zlprjm4wzk544v14wqi6q0lv2s46";
|
||||
};
|
||||
|
||||
patches = optionals stdenv.isDarwin [
|
||||
|
@ -1,23 +0,0 @@
|
||||
{ lib, buildPythonPackage, fetchPypi
|
||||
, boto }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "Area53";
|
||||
version = "0.94";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "0v9b7f8b6v21y410anx5sr52k2ac8jrzdf19q6m6p0zsdsf9vr42";
|
||||
};
|
||||
|
||||
# error: invalid command 'test'
|
||||
doCheck = false;
|
||||
|
||||
propagatedBuildInputs = [ boto ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python Interface to Route53";
|
||||
homepage = https://github.com/mariusv/Area53;
|
||||
license = licenses.unfree; # unspecified
|
||||
};
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, buildPythonPackage, fetchPypi }:
|
||||
{ stdenv, buildPythonPackage, fetchPypi, pytest }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "atomicwrites";
|
||||
@ -9,6 +9,10 @@ buildPythonPackage rec {
|
||||
sha256 = "75a9445bac02d8d058d5e1fe689654ba5a6556a1dfd8ce6ec55a0ed79866cfa6";
|
||||
};
|
||||
|
||||
# Tests depend on pytest but atomicwrites is a dependency of pytest
|
||||
doCheck = false;
|
||||
checkInputs = [ pytest ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Atomic file writes on POSIX";
|
||||
homepage = https://pypi.python.org/pypi/atomicwrites;
|
||||
|
@ -1,30 +1,43 @@
|
||||
{ stdenv, python, fetchPypi, makeWrapper, unzip }:
|
||||
{ stdenv, python, fetchPypi, makeWrapper, unzip, makeSetupHook
|
||||
, pipInstallHook
|
||||
, setuptoolsBuildHook
|
||||
|
||||
}:
|
||||
|
||||
let
|
||||
wheel_source = fetchPypi {
|
||||
pname = "wheel";
|
||||
version = "0.33.4";
|
||||
version = "0.33.6";
|
||||
format = "wheel";
|
||||
sha256 = "5e79117472686ac0c4aef5bad5172ea73a1c2d1646b808c35926bd26bdfb0c08";
|
||||
sha256 = "f4da1763d3becf2e2cd92a14a7c920f0f00eca30fdde9ea992c836685b9faf28";
|
||||
};
|
||||
setuptools_source = fetchPypi {
|
||||
pname = "setuptools";
|
||||
version = "41.0.1";
|
||||
version = "41.2.0";
|
||||
format = "wheel";
|
||||
sha256 = "c7769ce668c7a333d84e17fe8b524b1c45e7ee9f7908ad0a73e1eda7e6a5aebf";
|
||||
sha256 = "4380abcf2a4ffd1a5ba22d687c6d690dce83b2b51c70e9c6d09f7e8c7e8040dc";
|
||||
};
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "pip";
|
||||
version = "19.1.1";
|
||||
version = "19.2.3";
|
||||
name = "${python.libPrefix}-bootstrapped-${pname}-${version}";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
format = "wheel";
|
||||
sha256 = "993134f0475471b91452ca029d4390dc8f298ac63a712814f101cd1b6db46676";
|
||||
sha256 = "340a0ba40fdeb16413914c0fcd8e0b4ebb0bf39a900ec80e11c05d836c05103f";
|
||||
};
|
||||
|
||||
dontUseSetuptoolsBuild = true;
|
||||
|
||||
# Should be propagatedNativeBuildInputs
|
||||
propagatedBuildInputs = [
|
||||
# Override to remove dependencies to prevent infinite recursion.
|
||||
(pipInstallHook.override{pip=null;})
|
||||
(setuptoolsBuildHook.override{setuptools=null; wheel=null;})
|
||||
];
|
||||
|
||||
unpackPhase = ''
|
||||
mkdir -p $out/${python.sitePackages}
|
||||
unzip -d $out/${python.sitePackages} $src
|
||||
@ -32,7 +45,7 @@ in stdenv.mkDerivation rec {
|
||||
unzip -d $out/${python.sitePackages} ${wheel_source}
|
||||
'';
|
||||
|
||||
patchPhase = ''
|
||||
postPatch = ''
|
||||
mkdir -p $out/bin
|
||||
'';
|
||||
|
||||
@ -52,4 +65,5 @@ in stdenv.mkDerivation rec {
|
||||
wrapProgram $f --prefix PYTHONPATH ":" $out/${python.sitePackages}/
|
||||
done
|
||||
'';
|
||||
|
||||
}
|
||||
|
@ -5,17 +5,20 @@
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "EditorConfig";
|
||||
version = "0.12.1";
|
||||
pname = "editorconfig";
|
||||
version = "0.12.2";
|
||||
|
||||
# fetchgit used to ensure test submodule is available
|
||||
src = fetchgit {
|
||||
url = "https://github.com/editorconfig/editorconfig-core-py";
|
||||
rev = "refs/tags/v${version}";
|
||||
sha256 = "0svk7id7ncygj2rnxhm7602xizljyidk4xgrl6i0xgq3829cz4bl";
|
||||
rev = "596da5e06ebee05bdbdc6224203c79c4d3c6486a"; # Not tagged
|
||||
sha256 = "05cbp971b0zix7kfxkk7ndxb4ax1l21frwc00d4g78mk4sdz6dig";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
dontUseCmakeConfigure = true;
|
||||
|
||||
checkPhase = ''
|
||||
cmake .
|
||||
# utf_8_char fails with python3
|
||||
|
@ -6,11 +6,12 @@
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "eggdeps";
|
||||
pname = "tl-eggdeps";
|
||||
version = "0.4";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
inherit version;
|
||||
pname = "tl.eggdeps";
|
||||
sha256 = "a99de5e4652865224daab09b2e2574a4f7c1d0d9a267048f9836aa914a2caf3a";
|
||||
};
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
{ lib, fetchPypi, buildPythonApplication, EditorConfig, pytest, six }:
|
||||
{ lib, fetchPypi, buildPythonApplication, editorconfig, pytest, six }:
|
||||
|
||||
buildPythonApplication rec {
|
||||
pname = "jsbeautifier";
|
||||
version = "1.10.0";
|
||||
|
||||
propagatedBuildInputs = [ six EditorConfig ];
|
||||
propagatedBuildInputs = [ six editorconfig ];
|
||||
checkInputs = [ pytest ];
|
||||
|
||||
src = fetchPypi {
|
||||
|
@ -1,22 +1,24 @@
|
||||
{ stdenv
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, python
|
||||
, mock
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "mpd2";
|
||||
version = "0.5.5";
|
||||
pname = "python-mpd2";
|
||||
version = "1.0.0";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1gfrxf71xll1w6zb69znqg5c9j0g7036fsalkvqprh2id640cl3a";
|
||||
extension = "tar.bz2";
|
||||
sha256 = "772fa6861273bb9f363a97987c2c45ca3965eb770570f1f02566efec9c89fc5f";
|
||||
};
|
||||
|
||||
buildInputs = [ mock ];
|
||||
patchPhase = ''
|
||||
sed -i -e '/tests_require/d' \
|
||||
-e 's/cmdclass.*/test_suite="mpd_test",/' setup.py
|
||||
|
||||
checkPhase = ''
|
||||
${python.interpreter} -m unittest mpd.tests
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
@ -3,11 +3,12 @@
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "mrbob";
|
||||
pname = "mr-bob";
|
||||
version = "0.1.2";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
inherit version;
|
||||
pname = "mr.bob";
|
||||
sha256 = "6737eaf98aaeae85e07ebef844ee5156df2f06a8b28d7c3dcb056f811c588121";
|
||||
};
|
||||
|
||||
|
@ -1,25 +1,32 @@
|
||||
{ lib
|
||||
, python
|
||||
, buildPythonPackage
|
||||
, bootstrapped-pip
|
||||
, fetchPypi
|
||||
, mock
|
||||
, scripttest
|
||||
, virtualenv
|
||||
, pretend
|
||||
, pytest
|
||||
, setuptools
|
||||
, wheel
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pip";
|
||||
version = "19.1.1";
|
||||
version = "19.2.3";
|
||||
format = "other";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "44d3d7d3d30a1eb65c7e5ff1173cdf8f7467850605ac7cc3707b6064bddd0958";
|
||||
sha256 = "e7a31f147974362e6c82d84b91c7f2bdf57e4d3163d3d454e6c3e71944d67135";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ bootstrapped-pip ];
|
||||
|
||||
# pip detects that we already have bootstrapped_pip "installed", so we need
|
||||
# to force it a little.
|
||||
installFlags = [ "--ignore-installed" ];
|
||||
pipInstallFlags = [ "--ignore-installed" ];
|
||||
|
||||
checkInputs = [ mock scripttest virtualenv pretend pytest ];
|
||||
# Pip wants pytest, but tests are not distributed
|
||||
|
@ -12,7 +12,11 @@ buildPythonPackage rec {
|
||||
# Circular dependency on pytest
|
||||
doCheck = false;
|
||||
|
||||
buildInputs = [ setuptools_scm ];
|
||||
nativeBuildInputs = [ setuptools_scm ];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"py"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Library with cross-python path, ini-parsing, io, code, log facilities";
|
||||
|
@ -6,20 +6,20 @@
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "python-pyaudio";
|
||||
version = "0.2.9";
|
||||
pname = "PyAudio";
|
||||
version = "0.2.11";
|
||||
disabled = isPyPy;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "bfd694272b3d1efc51726d0c27650b3c3ba1345f7f8fdada7e86c9751ce0f2a1";
|
||||
sha256 = "93bfde30e0b64e63a46f2fd77e85c41fd51182a4a3413d9edfaf9ffaa26efb74";
|
||||
};
|
||||
|
||||
buildInputs = [ pkgs.portaudio ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Python bindings for PortAudio";
|
||||
homepage = "http://people.csail.mit.edu/hubert/pyaudio/";
|
||||
homepage = https://people.csail.mit.edu/hubert/pyaudio/;
|
||||
license = licenses.mit;
|
||||
};
|
||||
|
||||
|
@ -1,30 +0,0 @@
|
||||
{ stdenv, fetchurl, buildPythonPackage, libev }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyev";
|
||||
version = "0.9.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://pypi/p/pyev/${pname}-${version}.tar.gz";
|
||||
sha256 = "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx";
|
||||
};
|
||||
|
||||
buildInputs = [ libev ];
|
||||
|
||||
libEvSharedLibrary =
|
||||
if !stdenv.isDarwin
|
||||
then "${libev}/lib/libev.so.4"
|
||||
else "${libev}/lib/libev.4.dylib";
|
||||
|
||||
postPatch = ''
|
||||
test -f "${libEvSharedLibrary}" || { echo "ERROR: File ${libEvSharedLibrary} does not exist, please fix nix expression for pyev"; exit 1; }
|
||||
sed -i -e "s|libev_dll_name = find_library(\"ev\")|libev_dll_name = \"${libEvSharedLibrary}\"|" setup.py
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Python bindings for libev";
|
||||
homepage = https://code.google.com/p/pyev/;
|
||||
license = licenses.gpl3;
|
||||
maintainers = [ maintainers.bjornfor ];
|
||||
};
|
||||
}
|
@ -6,11 +6,12 @@
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pymysqlsa";
|
||||
pname = "pymysql-sa";
|
||||
version = "1.0";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
inherit version;
|
||||
pname = "pymysql_sa";
|
||||
sha256 = "a2676bce514a29b2d6ab418812259b0c2f7564150ac53455420a20bd7935314a";
|
||||
};
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
{ stdenv, buildPythonPackage, python, fetchPypi, isPy3k, glibcLocales }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pystache-${version}";
|
||||
pname = "pystache";
|
||||
version = "0.5.4";
|
||||
|
||||
src = fetchPypi {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ stdenv, buildPythonPackage, pythonOlder, fetchPypi, attrs, hypothesis, py
|
||||
, setuptools_scm, setuptools, six, pluggy, funcsigs, isPy3k, more-itertools
|
||||
, atomicwrites, mock, writeText, pathlib2, wcwidth, packaging, isPyPy
|
||||
, atomicwrites, mock, writeText, pathlib2, wcwidth, packaging, isPyPy, python
|
||||
}:
|
||||
buildPythonPackage rec {
|
||||
version = "5.1.0";
|
||||
@ -17,12 +17,13 @@ buildPythonPackage rec {
|
||||
};
|
||||
|
||||
checkInputs = [ hypothesis mock ];
|
||||
buildInputs = [ setuptools_scm ];
|
||||
nativeBuildInputs = [ setuptools_scm ];
|
||||
propagatedBuildInputs = [ attrs py setuptools six pluggy more-itertools atomicwrites wcwidth packaging ]
|
||||
++ stdenv.lib.optionals (!isPy3k) [ funcsigs ]
|
||||
++ stdenv.lib.optionals (pythonOlder "3.6") [ pathlib2 ];
|
||||
|
||||
doCheck = !isPyPy; # https://github.com/pytest-dev/pytest/issues/3460
|
||||
|
||||
# Ignored file https://github.com/pytest-dev/pytest/pull/5605#issuecomment-522243929
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
@ -35,15 +36,17 @@ buildPythonPackage rec {
|
||||
pytestcachePhase() {
|
||||
find $out -name .pytest_cache -type d -exec rm -rf {} +
|
||||
}
|
||||
|
||||
preDistPhases+=" pytestcachePhase"
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [
|
||||
"pytest"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://docs.pytest.org;
|
||||
description = "Framework for writing tests";
|
||||
maintainers = with maintainers; [ domenkozar lovek323 madjar lsix ];
|
||||
license = licenses.mit;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
@ -1,33 +0,0 @@
|
||||
{ stdenv
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, isPy3k
|
||||
, nose
|
||||
, mock
|
||||
, pyyaml
|
||||
, unittest2
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "python3-pika";
|
||||
version = "0.9.14";
|
||||
disabled = !isPy3k;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1c3hifwvn04kvlja88iawf0awyz726jynwnpcb6gn7376b4nfch7";
|
||||
};
|
||||
|
||||
# Unit tests adds dependencies on pyev, tornado and twisted (and twisted is disabled for Python 3)
|
||||
doCheck = false;
|
||||
|
||||
buildInputs = [ nose mock pyyaml ];
|
||||
propagatedBuildInputs = [ unittest2 ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://pika.readthedocs.org/;
|
||||
description = "Pika Python AMQP Client Library";
|
||||
license = licenses.gpl2;
|
||||
};
|
||||
|
||||
}
|
@ -1,24 +1,29 @@
|
||||
{ stdenv
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, python
|
||||
, wrapPython
|
||||
, unzip
|
||||
, callPackage
|
||||
, bootstrapped-pip
|
||||
}:
|
||||
|
||||
# Should use buildPythonPackage here somehow
|
||||
stdenv.mkDerivation rec {
|
||||
buildPythonPackage rec {
|
||||
pname = "setuptools";
|
||||
version = "41.0.1";
|
||||
name = "${python.libPrefix}-${pname}-${version}";
|
||||
version = "41.2.0";
|
||||
format = "other";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
extension = "zip";
|
||||
sha256 = "a222d126f5471598053c9a77f4b5d4f26eaa1f150ad6e01dcf1a42e185d05613";
|
||||
sha256 = "66b86bbae7cc7ac2e867f52dc08a6bd064d938bac59dfec71b9b565dd36d6012";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ unzip wrapPython python.pythonForBuild ];
|
||||
doCheck = false; # requires pytest
|
||||
# There is nothing to build
|
||||
dontBuild = true;
|
||||
|
||||
nativeBuildInputs = [ bootstrapped-pip ];
|
||||
|
||||
installPhase = ''
|
||||
dst=$out/${python.sitePackages}
|
||||
mkdir -p $dst
|
||||
@ -27,13 +32,11 @@ stdenv.mkDerivation rec {
|
||||
wrapPythonPrograms
|
||||
'';
|
||||
|
||||
pythonPath = [];
|
||||
|
||||
dontPatchShebangs = true;
|
||||
|
||||
# Python packages built through cross-compilation are always for the host platform.
|
||||
disallowedReferences = stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ python.pythonForBuild ];
|
||||
# Adds setuptools to nativeBuildInputs causing infinite recursion.
|
||||
catchConflicts = false;
|
||||
|
||||
# Requires pytest, causing infinite recursion.
|
||||
doCheck = false;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Utilities to facilitate the installation of Python packages";
|
||||
|
@ -1,15 +1,14 @@
|
||||
{ stdenv, buildPythonPackage, fetchPypi, pip }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "setuptools_scm";
|
||||
version = "3.2.0";
|
||||
version = "3.3.3";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "52ab47715fa0fc7d8e6cd15168d1a69ba995feb1505131c3e814eb7087b57358";
|
||||
sha256 = "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx";
|
||||
};
|
||||
|
||||
buildInputs = [ pip ];
|
||||
|
||||
# Seems to fail due to chroot and would cause circular dependency
|
||||
# with pytest
|
||||
doCheck = false;
|
||||
|
@ -16,6 +16,9 @@ buildPythonPackage rec {
|
||||
|
||||
propagatedBuildInputs = [ ptyprocess tornado ];
|
||||
|
||||
# test_max_terminals fails
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Terminals served by Tornado websockets";
|
||||
homepage = https://github.com/jupyter/terminado;
|
||||
|
@ -10,20 +10,25 @@ python.pkgs.buildPythonPackage rec {
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with python.pkgs; [ six ];
|
||||
checkInputs = with python.pkgs; [ factory_boy faker pytest pytestcov tox ];
|
||||
checkInputs = with python.pkgs; [ factory_boy faker pytestcov tox pytestCheckHook];
|
||||
|
||||
# https://github.com/barseghyanartur/tld/issues/54
|
||||
disabledTests = stdenv.lib.concatMapStringsSep " and " (s: "not " + s) ([
|
||||
disabledTests = [
|
||||
"test_1_update_tld_names"
|
||||
"test_1_update_tld_names_command"
|
||||
"test_2_update_tld_names_module"
|
||||
]);
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
export PATH="$PATH:$out/bin"
|
||||
py.test -k '${disabledTests}'
|
||||
preCheck = ''
|
||||
export PATH="$PATH:$out/bin"
|
||||
'';
|
||||
|
||||
dontUseSetuptoolsCheck = true;
|
||||
|
||||
pythonImportsCheck = [
|
||||
"tld"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://github.com/barseghyanartur/tld;
|
||||
description = "Extracts the top level domain (TLD) from the URL given";
|
||||
|
@ -1,30 +1,34 @@
|
||||
{ lib
|
||||
, setuptools
|
||||
, pip
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, pytest
|
||||
, pytestcov
|
||||
, coverage
|
||||
, jsonschema
|
||||
, bootstrapped-pip
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "wheel";
|
||||
version = "0.33.4";
|
||||
version = "0.33.6";
|
||||
format = "other";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "62fcfa03d45b5b722539ccbc07b190e4bfff4bb9e3a4d470dd9f6a0981002565";
|
||||
sha256 = "10c9da68765315ed98850f8e048347c3eb06dd81822dc2ab1d4fde9dc9702646";
|
||||
};
|
||||
|
||||
checkInputs = [ pytest pytestcov coverage ];
|
||||
nativeBuildInputs = [ bootstrapped-pip setuptools ];
|
||||
|
||||
propagatedBuildInputs = [ jsonschema ];
|
||||
|
||||
catchConflicts = false;
|
||||
# No tests in archive
|
||||
doCheck = false;
|
||||
|
||||
# We add this flag to ignore the copy installed by bootstrapped-pip
|
||||
installFlags = [ "--ignore-installed" ];
|
||||
pipInstallFlags = [ "--ignore-installed" ];
|
||||
|
||||
meta = {
|
||||
description = "A built-package format for Python";
|
||||
|
@ -8,13 +8,13 @@ let
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "waf";
|
||||
version = "2.0.15";
|
||||
version = "2.0.18";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "ita1024";
|
||||
repo = "waf";
|
||||
rev = "${pname}-${version}";
|
||||
sha256 = "0i86dbn6l01n4h4rzyl4mvizqabbqn5w7fywh83z7fxpha13c3bz";
|
||||
sha256 = "1ifcanm2x2i8qwgfkwgdxwaqcdwsx5jg8bd1d6sqjps3pz7s5qxx";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
|
||||
pname = "cups";
|
||||
|
||||
# After 2.2.6, CUPS requires headers only available in macOS 10.12+
|
||||
version = if stdenv.isDarwin then "2.2.6" else "2.2.11";
|
||||
version = if stdenv.isDarwin then "2.2.6" else "2.2.12";
|
||||
|
||||
passthru = { inherit version; };
|
||||
|
||||
@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
|
||||
url = "https://github.com/apple/cups/releases/download/v${version}/cups-${version}-source.tar.gz";
|
||||
sha256 = if version == "2.2.6"
|
||||
then "16qn41b84xz6khrr2pa2wdwlqxr29rrrkjfi618gbgdkq9w5ff20"
|
||||
else "0v5p10lyv8wv48s8ghkhjmdrxg6iwj8hn36v1ilkz46n7y0i107m";
|
||||
else "1a4sgx5y7z16flmpnchd2ix294bnzy0v8mdkd96a4j27kr2anq8g";
|
||||
};
|
||||
|
||||
outputs = [ "out" "lib" "dev" "man" ];
|
||||
|
@ -151,8 +151,8 @@ let
|
||||
moduleStructuredConfig = (lib.evalModules {
|
||||
modules = [
|
||||
module
|
||||
{ settings = commonStructuredConfig; }
|
||||
{ settings = structuredExtraConfig; }
|
||||
{ settings = commonStructuredConfig; _file = "pkgs/os-specific/linux/kernel/common-config.nix"; }
|
||||
{ settings = structuredExtraConfig; _file = "structuredExtraConfig"; }
|
||||
]
|
||||
++ structuredConfigFromPatches
|
||||
;
|
||||
|
@ -278,7 +278,8 @@ in
|
||||
assert stdenv.lib.versionAtLeast version "4.14" -> libelf != null;
|
||||
assert stdenv.lib.versionAtLeast version "4.15" -> utillinux != null;
|
||||
stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.platform kernelPatches configfile) // {
|
||||
name = "linux-${version}";
|
||||
pname = "linux";
|
||||
inherit version;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
|
@ -2,14 +2,14 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "kexec-tools";
|
||||
version = "2.0.19";
|
||||
version = "2.0.20";
|
||||
|
||||
src = fetchurl {
|
||||
urls = [
|
||||
"mirror://kernel/linux/utils/kernel/kexec/${pname}-${version}.tar.xz"
|
||||
"http://horms.net/projects/kexec/kexec-tools/${pname}-${version}.tar.xz"
|
||||
];
|
||||
sha256 = "03jyi4c47ywclycf3a253xpqs7p6ys8inz9q66b8m3xc6nrh307d";
|
||||
sha256 = "1j7qlhxk1rbv9jbj8wd6hb7zl8p2mp29ymrmccgmsi0m0dzhgn6s";
|
||||
};
|
||||
|
||||
hardeningDisable = [ "format" "pic" "relro" "pie" ];
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "numactl";
|
||||
version = "2.0.12";
|
||||
version = "2.0.13";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "numactl";
|
||||
repo = "numactl";
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "0crhpxwakp0gvd7wwpbkfd3brnrdf89lkbf03axnbrs0b6kaygg2";
|
||||
sha256 = "08xj0n27qh0ly8hjallnx774gicz15nfq0yyxz8zhgy6pq8l33vv";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook ];
|
||||
|
@ -15,11 +15,12 @@
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "nsd-4.2.1";
|
||||
pname = "nsd";
|
||||
version = "4.2.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.nlnetlabs.nl/downloads/nsd/${name}.tar.gz";
|
||||
sha256 = "07w753lfrmpf2rv0115pak2zqywv57mq6bwzwwmypc4cjsihwz6i";
|
||||
url = "https://www.nlnetlabs.nl/downloads/${pname}/${pname}-${version}.tar.gz";
|
||||
sha256 = "1ys608jyp5scc957q4brm094c97sxlwymina7d2nvzi51aa37cw3";
|
||||
};
|
||||
|
||||
prePatch = ''
|
||||
|
@ -58,11 +58,11 @@ lib.makeScope newScope (self: with self; {
|
||||
}) {};
|
||||
|
||||
encodings = callPackage ({ stdenv, pkgconfig, fetchurl }: stdenv.mkDerivation {
|
||||
name = "encodings-1.0.4";
|
||||
name = "encodings-1.0.5";
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = mirror://xorg/individual/font/encodings-1.0.4.tar.bz2;
|
||||
sha256 = "0ffmaw80vmfwdgvdkp6495xgsqszb6s0iira5j0j6pd4i0lk3mnf";
|
||||
url = mirror://xorg/individual/font/encodings-1.0.5.tar.bz2;
|
||||
sha256 = "0caafx0yqqnqyvbalxhh3mb0r9v36xmcy5zjhygb2i508dhy35mx";
|
||||
};
|
||||
hardeningDisable = [ "bindnow" "relro" ];
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
@ -703,11 +703,11 @@ lib.makeScope newScope (self: with self; {
|
||||
}) {};
|
||||
|
||||
libX11 = callPackage ({ stdenv, pkgconfig, fetchurl, xorgproto, libxcb, xtrans }: stdenv.mkDerivation {
|
||||
name = "libX11-1.6.7";
|
||||
name = "libX11-1.6.8";
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = mirror://xorg/individual/lib/libX11-1.6.7.tar.bz2;
|
||||
sha256 = "0j0k5bjz4kd7rx6z09n5ggxbzbi84wf78xx25ikx6jmsxwq9w3li";
|
||||
url = mirror://xorg/individual/lib/libX11-1.6.8.tar.bz2;
|
||||
sha256 = "1mbkwhhprhf49s2iwx7kiliprsdvd690zk44x3h53ql9q52si2dj";
|
||||
};
|
||||
hardeningDisable = [ "bindnow" "relro" ];
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
@ -898,11 +898,11 @@ lib.makeScope newScope (self: with self; {
|
||||
}) {};
|
||||
|
||||
libXi = callPackage ({ stdenv, pkgconfig, fetchurl, xorgproto, libX11, libXext, libXfixes }: stdenv.mkDerivation {
|
||||
name = "libXi-1.7.9";
|
||||
name = "libXi-1.7.10";
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = mirror://xorg/individual/lib/libXi-1.7.9.tar.bz2;
|
||||
sha256 = "0idg1wc01hndvaa820fvfs7phvd1ymf0lldmq6386i7rhkzvirn2";
|
||||
url = mirror://xorg/individual/lib/libXi-1.7.10.tar.bz2;
|
||||
sha256 = "0q8hz3slga3w3ch8wp0k7ay9ilhz315qnab0w1y2x9w3cf7hv8rn";
|
||||
};
|
||||
hardeningDisable = [ "bindnow" "relro" ];
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
@ -1275,11 +1275,11 @@ lib.makeScope newScope (self: with self; {
|
||||
}) {};
|
||||
|
||||
sessreg = callPackage ({ stdenv, pkgconfig, fetchurl, xorgproto }: stdenv.mkDerivation {
|
||||
name = "sessreg-1.1.1";
|
||||
name = "sessreg-1.1.2";
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = mirror://xorg/individual/app/sessreg-1.1.1.tar.bz2;
|
||||
sha256 = "1qd66mg2bnppqz4xgdjzif2488zl82vx2c26ld3nb8pnyginm9vq";
|
||||
url = mirror://xorg/individual/app/sessreg-1.1.2.tar.bz2;
|
||||
sha256 = "0crczl25zynkrslmm8sjaxszhrh4i33m7h5fg4wfdb3k8aarxjyz";
|
||||
};
|
||||
hardeningDisable = [ "bindnow" "relro" ];
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
@ -1379,11 +1379,11 @@ lib.makeScope newScope (self: with self; {
|
||||
}) {};
|
||||
|
||||
xauth = callPackage ({ stdenv, pkgconfig, fetchurl, libX11, libXau, libXext, libXmu, xorgproto }: stdenv.mkDerivation {
|
||||
name = "xauth-1.0.10";
|
||||
name = "xauth-1.1";
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = mirror://xorg/individual/app/xauth-1.0.10.tar.bz2;
|
||||
sha256 = "0kgwz9rmxjfdvi2syf8g0ms5rr5cgyqx4n0n1m960kyz7k745zjs";
|
||||
url = mirror://xorg/individual/app/xauth-1.1.tar.bz2;
|
||||
sha256 = "032klzzw8r09z36x1272ssd79bcisz8j5p8gbdy111fiknvx27bd";
|
||||
};
|
||||
hardeningDisable = [ "bindnow" "relro" ];
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
@ -2458,11 +2458,11 @@ lib.makeScope newScope (self: with self; {
|
||||
}) {};
|
||||
|
||||
xinput = callPackage ({ stdenv, pkgconfig, fetchurl, xorgproto, libX11, libXext, libXi, libXinerama, libXrandr }: stdenv.mkDerivation {
|
||||
name = "xinput-1.6.2";
|
||||
name = "xinput-1.6.3";
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = mirror://xorg/individual/app/xinput-1.6.2.tar.bz2;
|
||||
sha256 = "1i75mviz9dyqyf7qigzmxq8vn31i86aybm662fzjz5c086dx551n";
|
||||
url = mirror://xorg/individual/app/xinput-1.6.3.tar.bz2;
|
||||
sha256 = "1vb6xdd1xmk5f7pwc5zcbxfray5sf1vbnscqwf2yl8lv7gfq38im";
|
||||
};
|
||||
hardeningDisable = [ "bindnow" "relro" ];
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
|
@ -19,14 +19,14 @@ mirror://xorg/individual/app/ico-1.0.5.tar.bz2
|
||||
mirror://xorg/individual/app/listres-1.0.4.tar.bz2
|
||||
mirror://xorg/individual/app/mkfontscale-1.2.1.tar.bz2
|
||||
mirror://xorg/individual/app/oclock-1.0.4.tar.bz2
|
||||
mirror://xorg/individual/app/sessreg-1.1.1.tar.bz2
|
||||
mirror://xorg/individual/app/sessreg-1.1.2.tar.bz2
|
||||
mirror://xorg/individual/app/setxkbmap-1.3.1.tar.bz2
|
||||
mirror://xorg/individual/app/smproxy-1.0.6.tar.bz2
|
||||
mirror://xorg/individual/app/transset-1.0.2.tar.bz2
|
||||
mirror://xorg/individual/app/twm-1.0.10.tar.bz2
|
||||
mirror://xorg/individual/app/viewres-1.0.5.tar.bz2
|
||||
mirror://xorg/individual/app/x11perf-1.6.1.tar.bz2
|
||||
mirror://xorg/individual/app/xauth-1.0.10.tar.bz2
|
||||
mirror://xorg/individual/app/xauth-1.1.tar.bz2
|
||||
mirror://xorg/individual/app/xbacklight-1.2.2.tar.bz2
|
||||
mirror://xorg/individual/app/xcalc-1.1.0.tar.bz2
|
||||
mirror://xorg/individual/app/xclock-1.0.8.tar.bz2
|
||||
@ -47,7 +47,7 @@ mirror://xorg/individual/app/xgamma-1.0.6.tar.bz2
|
||||
mirror://xorg/individual/app/xgc-1.0.5.tar.bz2
|
||||
mirror://xorg/individual/app/xhost-1.0.8.tar.bz2
|
||||
mirror://xorg/individual/app/xinit-1.4.1.tar.bz2
|
||||
mirror://xorg/individual/app/xinput-1.6.2.tar.bz2
|
||||
mirror://xorg/individual/app/xinput-1.6.3.tar.bz2
|
||||
mirror://xorg/individual/app/xkbcomp-1.4.2.tar.bz2
|
||||
mirror://xorg/individual/app/xkbevd-1.1.4.tar.bz2
|
||||
mirror://xorg/individual/app/xkbprint-1.0.4.tar.bz2
|
||||
@ -132,7 +132,7 @@ mirror://xorg/individual/driver/xf86-video-vmware-13.3.0.tar.bz2
|
||||
mirror://xorg/individual/driver/xf86-video-voodoo-1.2.5.tar.bz2
|
||||
mirror://xorg/individual/driver/xf86-video-wsfb-0.4.0.tar.bz2
|
||||
mirror://xorg/individual/driver/xf86-video-xgi-1.6.1.tar.bz2
|
||||
mirror://xorg/individual/font/encodings-1.0.4.tar.bz2
|
||||
mirror://xorg/individual/font/encodings-1.0.5.tar.bz2
|
||||
mirror://xorg/individual/font/font-adobe-100dpi-1.0.3.tar.bz2
|
||||
mirror://xorg/individual/font/font-adobe-75dpi-1.0.3.tar.bz2
|
||||
mirror://xorg/individual/font/font-adobe-utopia-100dpi-1.0.4.tar.bz2
|
||||
@ -177,7 +177,7 @@ mirror://xorg/individual/lib/libICE-1.0.9.tar.bz2
|
||||
mirror://xorg/individual/lib/libpciaccess-0.16.tar.bz2
|
||||
mirror://xorg/individual/lib/libSM-1.2.3.tar.bz2
|
||||
mirror://xorg/individual/lib/libWindowsWM-1.0.1.tar.bz2
|
||||
mirror://xorg/individual/lib/libX11-1.6.7.tar.bz2
|
||||
mirror://xorg/individual/lib/libX11-1.6.8.tar.bz2
|
||||
mirror://xorg/individual/lib/libXau-1.0.9.tar.bz2
|
||||
mirror://xorg/individual/lib/libXaw-1.0.13.tar.bz2
|
||||
mirror://xorg/individual/lib/libXaw3d-1.6.3.tar.bz2
|
||||
@ -190,7 +190,7 @@ mirror://xorg/individual/lib/libXfixes-5.0.3.tar.bz2
|
||||
mirror://xorg/individual/lib/libXfont-1.5.4.tar.bz2
|
||||
mirror://xorg/individual/lib/libXfont2-2.0.3.tar.bz2
|
||||
mirror://xorg/individual/lib/libXft-2.3.3.tar.bz2
|
||||
mirror://xorg/individual/lib/libXi-1.7.9.tar.bz2
|
||||
mirror://xorg/individual/lib/libXi-1.7.10.tar.bz2
|
||||
mirror://xorg/individual/lib/libXinerama-1.1.4.tar.bz2
|
||||
mirror://xorg/individual/lib/libxkbfile-1.1.0.tar.bz2
|
||||
mirror://xorg/individual/lib/libXmu-1.1.3.tar.bz2
|
||||
|
@ -42,17 +42,14 @@ let
|
||||
}
|
||||
else ff;
|
||||
|
||||
buildPythonPackage = makeOverridablePythonPackage ( makeOverridable (callPackage ../development/interpreters/python/build-python-package.nix {
|
||||
flit = self.flit;
|
||||
# We want Python libraries to be named like e.g. "python3.6-${name}"
|
||||
inherit namePrefix;
|
||||
inherit toPythonModule;
|
||||
buildPythonPackage = makeOverridablePythonPackage ( makeOverridable (callPackage ../development/interpreters/python/mk-python-derivation.nix {
|
||||
inherit namePrefix; # We want Python libraries to be named like e.g. "python3.6-${name}"
|
||||
inherit toPythonModule; # Libraries provide modules
|
||||
}));
|
||||
|
||||
buildPythonApplication = makeOverridablePythonPackage ( makeOverridable (callPackage ../development/interpreters/python/build-python-package.nix {
|
||||
flit = self.flit;
|
||||
namePrefix = "";
|
||||
toPythonModule = x: x; # Application does not provide modules.
|
||||
buildPythonApplication = makeOverridablePythonPackage ( makeOverridable (callPackage ../development/interpreters/python/mk-python-derivation.nix {
|
||||
namePrefix = ""; # Python applications should not have any prefix
|
||||
toPythonModule = x: x; # Application does not provide modules.
|
||||
}));
|
||||
|
||||
# See build-setupcfg/default.nix for documentation.
|
||||
@ -110,6 +107,9 @@ in {
|
||||
inherit toPythonModule toPythonApplication;
|
||||
inherit buildSetupcfg;
|
||||
|
||||
inherit (callPackage ../development/interpreters/python/hooks { })
|
||||
flitBuildHook pipBuildHook pipInstallHook pytestCheckHook pythonCatchConflictsHook pythonImportsCheckHook pythonRemoveBinBytecodeHook setuptoolsBuildHook setuptoolsCheckHook wheelUnpackHook;
|
||||
|
||||
# helpers
|
||||
|
||||
wrapPython = callPackage ../development/interpreters/python/wrap-python.nix {inherit python; inherit (pkgs) makeSetupHook makeWrapper; };
|
||||
@ -121,7 +121,7 @@ in {
|
||||
|
||||
recursivePthLoader = callPackage ../development/python-modules/recursive-pth-loader { };
|
||||
|
||||
setuptools = toPythonModule (callPackage ../development/python-modules/setuptools { });
|
||||
setuptools = callPackage ../development/python-modules/setuptools { };
|
||||
|
||||
vowpalwabbit = callPackage ../development/python-modules/vowpalwabbit { };
|
||||
|
||||
@ -1400,8 +1400,6 @@ in {
|
||||
|
||||
argcomplete = callPackage ../development/python-modules/argcomplete { };
|
||||
|
||||
area53 = callPackage ../development/python-modules/area53 { };
|
||||
|
||||
arxiv2bib = callPackage ../development/python-modules/arxiv2bib { };
|
||||
|
||||
chai = callPackage ../development/python-modules/chai { };
|
||||
@ -2252,8 +2250,6 @@ in {
|
||||
pythonPackages = self;
|
||||
});
|
||||
|
||||
EditorConfig = callPackage ../development/python-modules/editorconfig { };
|
||||
|
||||
edward = callPackage ../development/python-modules/edward { };
|
||||
|
||||
elasticsearch = callPackage ../development/python-modules/elasticsearch { };
|
||||
@ -4239,8 +4235,6 @@ in {
|
||||
|
||||
pysoundfile = self.soundfile; # Alias added 23-06-2019
|
||||
|
||||
python3pika = callPackage ../development/python-modules/python3pika { };
|
||||
|
||||
python-jenkins = callPackage ../development/python-modules/python-jenkins { };
|
||||
|
||||
pystringtemplate = callPackage ../development/python-modules/stringtemplate { };
|
||||
@ -4376,8 +4370,6 @@ in {
|
||||
|
||||
pyenchant = callPackage ../development/python-modules/pyenchant { };
|
||||
|
||||
pyev = callPackage ../development/python-modules/pyev { };
|
||||
|
||||
pyexcelerator = callPackage ../development/python-modules/pyexcelerator { };
|
||||
|
||||
pyext = callPackage ../development/python-modules/pyext { };
|
||||
|
Loading…
Reference in New Issue
Block a user