mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 14:41:17 +00:00
Merge master into staging
This commit is contained in:
commit
0c7143462b
|
@ -24,6 +24,7 @@
|
|||
* [IRC - #nixos on freenode.net](irc://irc.freenode.net/#nixos)
|
||||
* [NixOS Weekly](https://weekly.nixos.org/)
|
||||
* [Community-maintained wiki](https://nixos.wiki/)
|
||||
* [Community-maintained list of ways to get in touch](https://nixos.wiki/wiki/Get_In_Touch#Chat) (Discord, Matrix, Telegram, other IRC channels, etc.)
|
||||
|
||||
# Other Project Repositories
|
||||
|
||||
|
|
|
@ -72,8 +72,9 @@ Now you can use the Python interpreter, as well as the extra packages (`numpy`,
|
|||
|
||||
##### Environment defined in `~/.config/nixpkgs/config.nix`
|
||||
|
||||
If you prefer to, you could also add the environment as a package override to the Nixpkgs set, e.g.
|
||||
using `config.nix`,
|
||||
If you prefer you could also add the environment as a package override to the
|
||||
Nixpkgs set, e.g. using `config.nix`,
|
||||
|
||||
```nix
|
||||
{ # ...
|
||||
|
||||
|
@ -83,15 +84,18 @@ using `config.nix`,
|
|||
}
|
||||
```
|
||||
and install it in your profile with
|
||||
|
||||
```shell
|
||||
nix-env -iA nixpkgs.myEnv
|
||||
```
|
||||
|
||||
The environment is is installed by referring to the attribute, and considering
|
||||
the `nixpkgs` channel was used.
|
||||
|
||||
##### Environment defined in `/etc/nixos/configuration.nix`
|
||||
|
||||
For the sake of completeness, here's another example how to install the environment system-wide.
|
||||
For the sake of completeness, here's another example how to install the
|
||||
environment system-wide.
|
||||
|
||||
```nix
|
||||
{ # ...
|
||||
|
@ -109,40 +113,56 @@ into a profile. For development you may need to use multiple environments.
|
|||
`nix-shell` gives the possibility to temporarily load another environment, akin
|
||||
to `virtualenv`.
|
||||
|
||||
There are two methods for loading a shell with Python packages. The first and recommended method
|
||||
is to create an environment with `python.buildEnv` or `python.withPackages` and load that. E.g.
|
||||
There are two methods for loading a shell with Python packages. The first and
|
||||
recommended method is to create an environment with `python.buildEnv` or
|
||||
`python.withPackages` and load that. E.g.
|
||||
|
||||
```sh
|
||||
$ nix-shell -p 'python35.withPackages(ps: with ps; [ numpy toolz ])'
|
||||
```
|
||||
|
||||
opens a shell from which you can launch the interpreter
|
||||
|
||||
```sh
|
||||
[nix-shell:~] python3
|
||||
```
|
||||
The other method, which is not recommended, does not create an environment and requires you to list the packages directly,
|
||||
|
||||
The other method, which is not recommended, does not create an environment and
|
||||
requires you to list the packages directly,
|
||||
|
||||
```sh
|
||||
$ nix-shell -p python35.pkgs.numpy python35.pkgs.toolz
|
||||
```
|
||||
Again, it is possible to launch the interpreter from the shell.
|
||||
The Python interpreter has the attribute `pkgs` which contains all Python libraries for that specific interpreter.
|
||||
|
||||
Again, it is possible to launch the interpreter from the shell. The Python
|
||||
interpreter has the attribute `pkgs` which contains all Python libraries for
|
||||
that specific interpreter.
|
||||
|
||||
##### Load environment from `.nix` expression
|
||||
As explained in the Nix manual, `nix-shell` can also load an
|
||||
expression from a `.nix` file. Say we want to have Python 3.5, `numpy`
|
||||
and `toolz`, like before, in an environment. Consider a `shell.nix` file
|
||||
with
|
||||
|
||||
```nix
|
||||
with import <nixpkgs> {};
|
||||
|
||||
(python35.withPackages (ps: [ps.numpy ps.toolz])).env
|
||||
```
|
||||
|
||||
Executing `nix-shell` gives you again a Nix shell from which you can run Python.
|
||||
|
||||
What's happening here?
|
||||
|
||||
1. We begin with importing the Nix Packages collections. `import <nixpkgs>` imports the `<nixpkgs>` function, `{}` calls it and the `with` statement brings all attributes of `nixpkgs` in the local scope. These attributes form the main package set.
|
||||
1. We begin with importing the Nix Packages collections. `import <nixpkgs>`
|
||||
imports the `<nixpkgs>` function, `{}` calls it and the `with` statement
|
||||
brings all attributes of `nixpkgs` in the local scope. These attributes form
|
||||
the main package set.
|
||||
2. Then we create a Python 3.5 environment with the `withPackages` function.
|
||||
3. The `withPackages` function expects us to provide a function as an argument that takes the set of all python packages and returns a list of packages to include in the environment. Here, we select the packages `numpy` and `toolz` from the package set.
|
||||
3. The `withPackages` function expects us to provide a function as an argument
|
||||
that takes the set of all python packages and returns a list of packages to
|
||||
include in the environment. Here, we select the packages `numpy` and `toolz`
|
||||
from the package set.
|
||||
|
||||
To combine this with `mkShell` you can:
|
||||
|
||||
|
@ -166,20 +186,23 @@ in mkShell {
|
|||
A convenient option with `nix-shell` is the `--run`
|
||||
option, with which you can execute a command in the `nix-shell`. We can
|
||||
e.g. directly open a Python shell
|
||||
|
||||
```sh
|
||||
$ nix-shell -p python35Packages.numpy python35Packages.toolz --run "python3"
|
||||
```
|
||||
|
||||
or run a script
|
||||
|
||||
```sh
|
||||
$ nix-shell -p python35Packages.numpy python35Packages.toolz --run "python3 myscript.py"
|
||||
```
|
||||
|
||||
##### `nix-shell` as shebang
|
||||
In fact, for the second use case, there is a more convenient method. You can
|
||||
add a [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) to your script
|
||||
In fact, for the second use case, there is a more convenient method. You can add
|
||||
a [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) to your script
|
||||
specifying which dependencies `nix-shell` needs. With the following shebang, you
|
||||
can just execute `./myscript.py`, and it will make available all dependencies and
|
||||
run the script in the `python3` shell.
|
||||
can just execute `./myscript.py`, and it will make available all dependencies
|
||||
and run the script in the `python3` shell.
|
||||
|
||||
```py
|
||||
#! /usr/bin/env nix-shell
|
||||
|
@ -270,6 +293,7 @@ with import <nixpkgs> {};
|
|||
in python35.withPackages (ps: [ps.numpy my_toolz])
|
||||
).env
|
||||
```
|
||||
|
||||
Executing `nix-shell` will result in an environment in which you can use
|
||||
Python 3.5 and the `toolz` package. As you can see we had to explicitly mention
|
||||
for which Python version we want to build a package.
|
||||
|
@ -355,12 +379,12 @@ buildPythonPackage rec {
|
|||
In this example `lxml` and Nix are able to work out exactly where the relevant
|
||||
files of the dependencies are. This is not always the case.
|
||||
|
||||
The example below shows bindings to The Fastest Fourier Transform in the West, commonly known as
|
||||
FFTW. On Nix we have separate packages of FFTW for the different types of floats
|
||||
(`"single"`, `"double"`, `"long-double"`). The bindings need all three types,
|
||||
and therefore we add all three as `buildInputs`. The bindings don't expect to
|
||||
find each of them in a different folder, and therefore we have to set `LDFLAGS`
|
||||
and `CFLAGS`.
|
||||
The example below shows bindings to The Fastest Fourier Transform in the West,
|
||||
commonly known as FFTW. On Nix we have separate packages of FFTW for the
|
||||
different types of floats (`"single"`, `"double"`, `"long-double"`). The
|
||||
bindings need all three types, and therefore we add all three as `buildInputs`.
|
||||
The bindings don't expect to find each of them in a different folder, and
|
||||
therefore we have to set `LDFLAGS` and `CFLAGS`.
|
||||
|
||||
```nix
|
||||
{ lib, pkgs, buildPythonPackage, fetchPypi, numpy, scipy }:
|
||||
|
@ -404,17 +428,18 @@ instead of installing the package this command creates a special link to the pro
|
|||
That way, you can run updated code without having to reinstall after each and every change you make.
|
||||
Development mode is also available. Let's see how you can use it.
|
||||
|
||||
In the previous Nix expression the source was fetched from an url. We can also refer to a local source instead using
|
||||
`src = ./path/to/source/tree;`
|
||||
In the previous Nix expression the source was fetched from an url. We can also
|
||||
refer to a local source instead using `src = ./path/to/source/tree;`
|
||||
|
||||
If we create a `shell.nix` file which calls `buildPythonPackage`, and if `src`
|
||||
is a local source, and if the local source has a `setup.py`, then development
|
||||
mode is activated.
|
||||
|
||||
In the following example we create a simple environment that
|
||||
has a Python 3.5 version of our package in it, as well as its dependencies and
|
||||
other packages we like to have in the environment, all specified with `propagatedBuildInputs`.
|
||||
Indeed, we can just add any package we like to have in our environment to `propagatedBuildInputs`.
|
||||
In the following example we create a simple environment that has a Python 3.5
|
||||
version of our package in it, as well as its dependencies and other packages we
|
||||
like to have in the environment, all specified with `propagatedBuildInputs`.
|
||||
Indeed, we can just add any package we like to have in our environment to
|
||||
`propagatedBuildInputs`.
|
||||
|
||||
```nix
|
||||
with import <nixpkgs> {};
|
||||
|
@ -427,7 +452,8 @@ buildPythonPackage rec {
|
|||
}
|
||||
```
|
||||
|
||||
It is important to note that due to how development mode is implemented on Nix it is not possible to have multiple packages simultaneously in development mode.
|
||||
It is important to note that due to how development mode is implemented on Nix
|
||||
it is not possible to have multiple packages simultaneously in development mode.
|
||||
|
||||
|
||||
### Organising your packages
|
||||
|
@ -497,13 +523,13 @@ and in this case the `python35` interpreter is automatically used.
|
|||
### Interpreters
|
||||
|
||||
Versions 2.7, 3.5, 3.6, 3.7 and 3.8 of the CPython interpreter are available as
|
||||
respectively `python27`, `python35`, `python36`, `python37` and `python38`. The aliases
|
||||
`python2` and `python3` correspond to respectively `python27` and
|
||||
respectively `python27`, `python35`, `python36`, `python37` and `python38`. The
|
||||
aliases `python2` and `python3` correspond to respectively `python27` and
|
||||
`python37`. The default interpreter, `python`, maps to `python2`. The PyPy
|
||||
interpreters compatible with Python 2.7 and 3 are available as `pypy27` and
|
||||
`pypy3`, with aliases `pypy2` mapping to `pypy27` and `pypy` mapping to
|
||||
`pypy2`. The Nix expressions for the interpreters can be
|
||||
found in `pkgs/development/interpreters/python`.
|
||||
`pypy3`, with aliases `pypy2` mapping to `pypy27` and `pypy` mapping to `pypy2`.
|
||||
The Nix expressions for the interpreters can be found in
|
||||
`pkgs/development/interpreters/python`.
|
||||
|
||||
All packages depending on any Python interpreter get appended
|
||||
`out/{python.sitePackages}` to `$PYTHONPATH` if such directory
|
||||
|
@ -532,9 +558,10 @@ Python libraries and applications that use `setuptools` or
|
|||
`buildPythonApplication` functions. These two functions also support installing a `wheel`.
|
||||
|
||||
All Python packages reside in `pkgs/top-level/python-packages.nix` and all
|
||||
applications elsewhere. In case a package is used as both a library and an application,
|
||||
then the package should be in `pkgs/top-level/python-packages.nix` since only those packages are made
|
||||
available for all interpreter versions. The preferred location for library expressions is in
|
||||
applications elsewhere. In case a package is used as both a library and an
|
||||
application, then the package should be in `pkgs/top-level/python-packages.nix`
|
||||
since only those packages are made available for all interpreter versions. The
|
||||
preferred location for library expressions is in
|
||||
`pkgs/development/python-modules`. It is important that these packages are
|
||||
called from `pkgs/top-level/python-packages.nix` and not elsewhere, to guarantee
|
||||
the right version of the package is built.
|
||||
|
@ -562,6 +589,7 @@ The `buildPythonPackage` function is implemented in
|
|||
using setup hooks.
|
||||
|
||||
The following is an example:
|
||||
|
||||
```nix
|
||||
{ lib, buildPythonPackage, fetchPypi, hypothesis, setuptools_scm, attrs, py, setuptools, six, pluggy }:
|
||||
|
||||
|
@ -608,38 +636,67 @@ as the interpreter unless overridden otherwise.
|
|||
|
||||
##### `buildPythonPackage` parameters
|
||||
|
||||
All parameters from `stdenv.mkDerivation` function are still supported. The following are specific to `buildPythonPackage`:
|
||||
All parameters from `stdenv.mkDerivation` function are still supported. The
|
||||
following are specific to `buildPythonPackage`:
|
||||
|
||||
* `catchConflicts ? true`: If `true`, abort package build if a package name appears more than once in dependency tree. Default is `true`.
|
||||
* `disabled` ? false: If `true`, package is not built for the particular Python interpreter version.
|
||||
* `catchConflicts ? true`: If `true`, abort package build if a package name
|
||||
appears more than once in dependency tree. Default is `true`.
|
||||
* `disabled` ? false: If `true`, package is not built for the particular Python
|
||||
interpreter version.
|
||||
* `dontWrapPythonPrograms ? false`: Skip wrapping of python programs.
|
||||
* `permitUserSite ? false`: Skip setting the `PYTHONNOUSERSITE` environment variable in wrapped programs.
|
||||
* `installFlags ? []`: A list of strings. Arguments to be passed to `pip install`. To pass options to `python setup.py install`, use `--install-option`. E.g., `installFlags=["--install-option='--cpp_implementation'"]`.
|
||||
* `format ? "setuptools"`: Format of the source. Valid options are `"setuptools"`, `"pyproject"`, `"flit"`, `"wheel"`, and `"other"`. `"setuptools"` is for when the source has a `setup.py` and `setuptools` is used to build a wheel, `flit`, in case `flit` should be used to build a wheel, and `wheel` in case a wheel is provided. Use `other` when a custom `buildPhase` and/or `installPhase` is needed.
|
||||
* `makeWrapperArgs ? []`: A list of strings. Arguments to be passed to `makeWrapper`, which wraps generated binaries. By default, the arguments to `makeWrapper` set `PATH` and `PYTHONPATH` environment variables before calling the binary. Additional arguments here can allow a developer to set environment variables which will be available when the binary is run. For example, `makeWrapperArgs = ["--set FOO BAR" "--set BAZ QUX"]`.
|
||||
* `namePrefix`: Prepends text to `${name}` parameter. In case of libraries, this defaults to `"python3.5-"` for Python 3.5, etc., and in case of applications to `""`.
|
||||
* `pythonPath ? []`: List of packages to be added into `$PYTHONPATH`. Packages in `pythonPath` are not propagated (contrary to `propagatedBuildInputs`).
|
||||
* `permitUserSite ? false`: Skip setting the `PYTHONNOUSERSITE` environment
|
||||
variable in wrapped programs.
|
||||
* `installFlags ? []`: A list of strings. Arguments to be passed to `pip
|
||||
install`. To pass options to `python setup.py install`, use
|
||||
`--install-option`. E.g., `installFlags=["--install-option='--cpp_implementation'"]`.
|
||||
* `format ? "setuptools"`: Format of the source. Valid options are
|
||||
`"setuptools"`, `"pyproject"`, `"flit"`, `"wheel"`, and `"other"`.
|
||||
`"setuptools"` is for when the source has a `setup.py` and `setuptools` is
|
||||
used to build a wheel, `flit`, in case `flit` should be used to build a wheel,
|
||||
and `wheel` in case a wheel is provided. Use `other` when a custom
|
||||
`buildPhase` and/or `installPhase` is needed.
|
||||
* `makeWrapperArgs ? []`: A list of strings. Arguments to be passed to
|
||||
`makeWrapper`, which wraps generated binaries. By default, the arguments to
|
||||
`makeWrapper` set `PATH` and `PYTHONPATH` environment variables before calling
|
||||
the binary. Additional arguments here can allow a developer to set environment
|
||||
variables which will be available when the binary is run. For example,
|
||||
`makeWrapperArgs = ["--set FOO BAR" "--set BAZ QUX"]`.
|
||||
* `namePrefix`: Prepends text to `${name}` parameter. In case of libraries, this
|
||||
defaults to `"python3.5-"` for Python 3.5, etc., and in case of applications
|
||||
to `""`.
|
||||
* `pythonPath ? []`: List of packages to be added into `$PYTHONPATH`. Packages
|
||||
in `pythonPath` are not propagated (contrary to `propagatedBuildInputs`).
|
||||
* `preShellHook`: Hook to execute commands before `shellHook`.
|
||||
* `postShellHook`: Hook to execute commands after `shellHook`.
|
||||
* `removeBinByteCode ? true`: Remove bytecode from `/bin`. Bytecode is only created when the filenames end with `.py`.
|
||||
* `removeBinByteCode ? true`: Remove bytecode from `/bin`. Bytecode is only
|
||||
created when the filenames end with `.py`.
|
||||
* `setupPyGlobalFlags ? []`: List of flags passed to `setup.py` command.
|
||||
* `setupPyBuildFlags ? []`: List of flags passed to `setup.py build_ext` command.
|
||||
|
||||
The `stdenv.mkDerivation` function accepts various parameters for describing build inputs (see "Specifying dependencies"). The following are of special
|
||||
interest for Python packages, either because these are primarily used, or because their behaviour is different:
|
||||
The `stdenv.mkDerivation` function accepts various parameters for describing
|
||||
build inputs (see "Specifying dependencies"). The following are of special
|
||||
interest for Python packages, either because these are primarily used, or
|
||||
because their behaviour is different:
|
||||
|
||||
* `nativeBuildInputs ? []`: Build-time only dependencies. Typically executables as well as the items listed in `setup_requires`.
|
||||
* `buildInputs ? []`: Build and/or run-time dependencies that need to be be compiled for the host machine. Typically non-Python libraries which are being linked.
|
||||
* `checkInputs ? []`: Dependencies needed for running the `checkPhase`. These are added to `nativeBuildInputs` when `doCheck = true`. Items listed in `tests_require` go here.
|
||||
* `propagatedBuildInputs ? []`: Aside from propagating dependencies, `buildPythonPackage` also injects code into and wraps executables with the paths included in this list. Items listed in `install_requires` go here.
|
||||
* `nativeBuildInputs ? []`: Build-time only dependencies. Typically executables
|
||||
as well as the items listed in `setup_requires`.
|
||||
* `buildInputs ? []`: Build and/or run-time dependencies that need to be be
|
||||
compiled for the host machine. Typically non-Python libraries which are being
|
||||
linked.
|
||||
* `checkInputs ? []`: Dependencies needed for running the `checkPhase`. These
|
||||
are added to `nativeBuildInputs` when `doCheck = true`. Items listed in
|
||||
`tests_require` go here.
|
||||
* `propagatedBuildInputs ? []`: Aside from propagating dependencies,
|
||||
`buildPythonPackage` also injects code into and wraps executables with the
|
||||
paths included in this list. Items listed in `install_requires` go here.
|
||||
|
||||
##### Overriding Python packages
|
||||
|
||||
The `buildPythonPackage` function has a `overridePythonAttrs` method that
|
||||
can be used to override the package. In the following example we create an
|
||||
environment where we have the `blaze` package using an older version of `pandas`.
|
||||
We override first the Python interpreter and pass
|
||||
`packageOverrides` which contains the overrides for packages in the package set.
|
||||
The `buildPythonPackage` function has a `overridePythonAttrs` method that can be
|
||||
used to override the package. In the following example we create an environment
|
||||
where we have the `blaze` package using an older version of `pandas`. We
|
||||
override first the Python interpreter and pass `packageOverrides` which contains
|
||||
the overrides for packages in the package set.
|
||||
|
||||
```nix
|
||||
with import <nixpkgs> {};
|
||||
|
@ -725,15 +782,18 @@ youtube-dl = with pythonPackages; toPythonApplication youtube-dl;
|
|||
#### `toPythonModule` function
|
||||
|
||||
In some cases, such as bindings, a package is created using
|
||||
`stdenv.mkDerivation` and added as attribute in `all-packages.nix`.
|
||||
The Python bindings should be made available from `python-packages.nix`.
|
||||
The `toPythonModule` function takes a derivation and makes certain Python-specific modifications.
|
||||
`stdenv.mkDerivation` and added as attribute in `all-packages.nix`. The Python
|
||||
bindings should be made available from `python-packages.nix`. The
|
||||
`toPythonModule` function takes a derivation and makes certain Python-specific
|
||||
modifications.
|
||||
|
||||
```nix
|
||||
opencv = toPythonModule (pkgs.opencv.override {
|
||||
enablePython = true;
|
||||
pythonPackages = self;
|
||||
});
|
||||
```
|
||||
|
||||
Do pay attention to passing in the right Python version!
|
||||
|
||||
#### `python.buildEnv` function
|
||||
|
@ -741,6 +801,7 @@ Do pay attention to passing in the right Python version!
|
|||
Python environments can be created using the low-level `pkgs.buildEnv` function.
|
||||
This example shows how to create an environment that has the Pyramid Web Framework.
|
||||
Saving the following as `default.nix`
|
||||
|
||||
```nix
|
||||
with import <nixpkgs> {};
|
||||
|
||||
|
@ -751,6 +812,7 @@ python.buildEnv.override {
|
|||
```
|
||||
|
||||
and running `nix-build` will create
|
||||
|
||||
```
|
||||
/nix/store/cf1xhjwzmdki7fasgr4kz6di72ykicl5-python-2.7.8-env
|
||||
```
|
||||
|
@ -760,6 +822,7 @@ with wrapped binaries in `bin/`.
|
|||
You can also use the `env` attribute to create local environments with needed
|
||||
packages installed. This is somewhat comparable to `virtualenv`. For example,
|
||||
running `nix-shell` with the following `shell.nix`
|
||||
|
||||
```nix
|
||||
with import <nixpkgs> {};
|
||||
|
||||
|
@ -777,7 +840,8 @@ specified packages in its path.
|
|||
* `extraLibs`: List of packages installed inside the environment.
|
||||
* `postBuild`: Shell command executed after the build of environment.
|
||||
* `ignoreCollisions`: Ignore file collisions inside the environment (default is `false`).
|
||||
* `permitUserSite`: Skip setting the `PYTHONNOUSERSITE` environment variable in wrapped binaries in the environment.
|
||||
* `permitUserSite`: Skip setting the `PYTHONNOUSERSITE` environment variable in
|
||||
wrapped binaries in the environment.
|
||||
|
||||
#### `python.withPackages` function
|
||||
|
||||
|
@ -785,15 +849,17 @@ The `python.withPackages` function provides a simpler interface to the `python.b
|
|||
It takes a function as an argument that is passed the set of python packages and returns the list
|
||||
of the packages to be included in the environment. Using the `withPackages` function, the previous
|
||||
example for the Pyramid Web Framework environment can be written like this:
|
||||
|
||||
```nix
|
||||
with import <nixpkgs> {};
|
||||
|
||||
python.withPackages (ps: [ps.pyramid])
|
||||
```
|
||||
|
||||
`withPackages` passes the correct package set for the specific interpreter version as an
|
||||
argument to the function. In the above example, `ps` equals `pythonPackages`.
|
||||
But you can also easily switch to using python3:
|
||||
`withPackages` passes the correct package set for the specific interpreter
|
||||
version as an argument to the function. In the above example, `ps` equals
|
||||
`pythonPackages`. But you can also easily switch to using python3:
|
||||
|
||||
```nix
|
||||
with import <nixpkgs> {};
|
||||
|
||||
|
@ -802,30 +868,35 @@ python3.withPackages (ps: [ps.pyramid])
|
|||
|
||||
Now, `ps` is set to `python3Packages`, matching the version of the interpreter.
|
||||
|
||||
As `python.withPackages` simply uses `python.buildEnv` under the hood, it also supports the `env`
|
||||
attribute. The `shell.nix` file from the previous section can thus be also written like this:
|
||||
As `python.withPackages` simply uses `python.buildEnv` under the hood, it also
|
||||
supports the `env` attribute. The `shell.nix` file from the previous section can
|
||||
thus be also written like this:
|
||||
|
||||
```nix
|
||||
with import <nixpkgs> {};
|
||||
|
||||
(python36.withPackages (ps: [ps.numpy ps.requests])).env
|
||||
```
|
||||
|
||||
In contrast to `python.buildEnv`, `python.withPackages` does not support the more advanced options
|
||||
such as `ignoreCollisions = true` or `postBuild`. If you need them, you have to use `python.buildEnv`.
|
||||
In contrast to `python.buildEnv`, `python.withPackages` does not support the
|
||||
more advanced options such as `ignoreCollisions = true` or `postBuild`. If you
|
||||
need them, you have to use `python.buildEnv`.
|
||||
|
||||
Python 2 namespace packages may provide `__init__.py` that collide. In that case `python.buildEnv`
|
||||
should be used with `ignoreCollisions = true`.
|
||||
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`.
|
||||
The following are setup hooks specifically for Python packages. Most of these
|
||||
are used in `buildPythonPackage`.
|
||||
|
||||
- `eggUnpackhook` to move an egg to the correct folder so it can be installed with the `eggInstallHook`
|
||||
- `eggUnpackhook` to move an egg to the correct folder so it can be installed
|
||||
with the `eggInstallHook`
|
||||
- `eggBuildHook` to skip building for eggs.
|
||||
- `eggInstallHook` to install eggs.
|
||||
- `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`.
|
||||
- `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.
|
||||
|
@ -833,8 +904,10 @@ used in `buildPythonPackage`.
|
|||
- `pythonRemoveBinBytecode` to remove bytecode from the `/bin` folder.
|
||||
- `setuptoolsBuildHook` to build a wheel using `setuptools`.
|
||||
- `setuptoolsCheckHook` to run tests with `python setup.py test`.
|
||||
- `venvShellHook` to source a Python 3 `venv` at the `venvDir` location. A `venv` is created if it does not yet exist.
|
||||
- `wheelUnpackHook` to move a wheel to the correct folder so it can be installed with the `pipInstallHook`.
|
||||
- `venvShellHook` to source a Python 3 `venv` at the `venvDir` location. A
|
||||
`venv` is created if it does not yet exist.
|
||||
- `wheelUnpackHook` to move a wheel to the correct folder so it can be installed
|
||||
with the `pipInstallHook`.
|
||||
|
||||
### Development mode
|
||||
|
||||
|
@ -856,11 +929,11 @@ pythonPackages.buildPythonPackage {
|
|||
}
|
||||
```
|
||||
|
||||
Running `nix-shell` with no arguments should give you
|
||||
the environment in which the package would be built with
|
||||
`nix-build`.
|
||||
Running `nix-shell` with no arguments should give you the environment in which
|
||||
the package would be built with `nix-build`.
|
||||
|
||||
Shortcut to setup environments with C headers/libraries and python packages:
|
||||
|
||||
```shell
|
||||
nix-shell -p pythonPackages.pyramid zlib libjpeg git
|
||||
```
|
||||
|
@ -872,19 +945,22 @@ Note: There is a boolean value `lib.inNixShell` set to `true` if nix-shell is in
|
|||
Packages inside nixpkgs are written by hand. However many tools exist in
|
||||
community to help save time. No tool is preferred at the moment.
|
||||
|
||||
- [pypi2nix](https://github.com/nix-community/pypi2nix): Generate Nix expressions for your Python project. Note that [sharing derivations from pypi2nix with nixpkgs is possible but not encouraged](https://github.com/nix-community/pypi2nix/issues/222#issuecomment-443497376).
|
||||
- [pypi2nix](https://github.com/nix-community/pypi2nix): Generate Nix
|
||||
expressions for your Python project. Note that [sharing derivations from
|
||||
pypi2nix with nixpkgs is possible but not
|
||||
encouraged](https://github.com/nix-community/pypi2nix/issues/222#issuecomment-443497376).
|
||||
- [python2nix](https://github.com/proger/python2nix) by Vladimir Kirillov.
|
||||
|
||||
### Deterministic builds
|
||||
|
||||
The Python interpreters are now built deterministically.
|
||||
Minor modifications had to be made to the interpreters in order to generate
|
||||
deterministic bytecode. This has security implications and is relevant for
|
||||
those using Python in a `nix-shell`.
|
||||
The Python interpreters are now built deterministically. Minor modifications had
|
||||
to be made to the interpreters in order to generate deterministic bytecode. This
|
||||
has security implications and is relevant for those using Python in a
|
||||
`nix-shell`.
|
||||
|
||||
When the environment variable `DETERMINISTIC_BUILD` is set, all bytecode will have timestamp 1.
|
||||
The `buildPythonPackage` function sets `DETERMINISTIC_BUILD=1` and
|
||||
[PYTHONHASHSEED=0](https://docs.python.org/3.5/using/cmdline.html#envvar-PYTHONHASHSEED).
|
||||
When the environment variable `DETERMINISTIC_BUILD` is set, all bytecode will
|
||||
have timestamp 1. The `buildPythonPackage` function sets `DETERMINISTIC_BUILD=1`
|
||||
and [PYTHONHASHSEED=0](https://docs.python.org/3.5/using/cmdline.html#envvar-PYTHONHASHSEED).
|
||||
Both are also exported in `nix-shell`.
|
||||
|
||||
|
||||
|
@ -899,9 +975,10 @@ example of such a situation is when `py.test` is used.
|
|||
|
||||
#### Common issues
|
||||
|
||||
- Non-working tests can often be deselected. By default `buildPythonPackage` runs `python setup.py test`.
|
||||
Most python modules follows the standard test protocol where the pytest runner can be used instead.
|
||||
`py.test` supports a `-k` parameter to ignore test methods or classes:
|
||||
* Non-working tests can often be deselected. By default `buildPythonPackage`
|
||||
runs `python setup.py test`. Most python modules follows the standard test
|
||||
protocol where the pytest runner can be used instead. `py.test` supports a
|
||||
`-k` parameter to ignore test methods or classes:
|
||||
|
||||
```nix
|
||||
buildPythonPackage {
|
||||
|
@ -913,7 +990,8 @@ example of such a situation is when `py.test` is used.
|
|||
'';
|
||||
}
|
||||
```
|
||||
- Tests that attempt to access `$HOME` can be fixed by using the following work-around before running tests (e.g. `preCheck`): `export HOME=$(mktemp -d)`
|
||||
* Tests that attempt to access `$HOME` can be fixed by using the following
|
||||
work-around before running tests (e.g. `preCheck`): `export HOME=$(mktemp -d)`
|
||||
|
||||
## FAQ
|
||||
|
||||
|
@ -925,8 +1003,9 @@ should also be done when packaging `A`.
|
|||
|
||||
### How to override a Python package?
|
||||
|
||||
We can override the interpreter and pass `packageOverrides`.
|
||||
In the following example we rename the `pandas` package and build it.
|
||||
We can override the interpreter and pass `packageOverrides`. In the following
|
||||
example we rename the `pandas` package and build it.
|
||||
|
||||
```nix
|
||||
with import <nixpkgs> {};
|
||||
|
||||
|
@ -939,14 +1018,16 @@ with import <nixpkgs> {};
|
|||
|
||||
in python.withPackages(ps: [ps.pandas])).env
|
||||
```
|
||||
|
||||
Using `nix-build` on this expression will build an environment that contains the
|
||||
package `pandas` but with the new name `foo`.
|
||||
|
||||
All packages in the package set will use the renamed package.
|
||||
A typical use case is to switch to another version of a certain package.
|
||||
For example, in the Nixpkgs repository we have multiple versions of `django` and `scipy`.
|
||||
In the following example we use a different version of `scipy` and create an environment that uses it.
|
||||
All packages in the Python package set will now use the updated `scipy` version.
|
||||
All packages in the package set will use the renamed package. A typical use case
|
||||
is to switch to another version of a certain package. For example, in the
|
||||
Nixpkgs repository we have multiple versions of `django` and `scipy`. In the
|
||||
following example we use a different version of `scipy` and create an
|
||||
environment that uses it. All packages in the Python package set will now use
|
||||
the updated `scipy` version.
|
||||
|
||||
```nix
|
||||
with import <nixpkgs> {};
|
||||
|
@ -958,10 +1039,13 @@ with import <nixpkgs> {};
|
|||
in (pkgs.python35.override {inherit packageOverrides;}).withPackages (ps: [ps.blaze])
|
||||
).env
|
||||
```
|
||||
|
||||
The requested package `blaze` depends on `pandas` which itself depends on `scipy`.
|
||||
|
||||
If you want the whole of Nixpkgs to use your modifications, then you can use `overlays`
|
||||
as explained in this manual. In the following example we build a `inkscape` using a different version of `numpy`.
|
||||
If you want the whole of Nixpkgs to use your modifications, then you can use
|
||||
`overlays` as explained in this manual. In the following example we build a
|
||||
`inkscape` using a different version of `numpy`.
|
||||
|
||||
```nix
|
||||
let
|
||||
pkgs = import <nixpkgs> {};
|
||||
|
@ -982,19 +1066,28 @@ Executing `python setup.py bdist_wheel` in a `nix-shell `fails with
|
|||
ValueError: ZIP does not support timestamps before 1980
|
||||
```
|
||||
|
||||
This is because files from the Nix store (which have a timestamp of the UNIX epoch of January 1, 1970) are included in the .ZIP, but .ZIP archives follow the DOS convention of counting timestamps from 1980.
|
||||
This is because files from the Nix store (which have a timestamp of the UNIX
|
||||
epoch of January 1, 1970) are included in the .ZIP, but .ZIP archives follow the
|
||||
DOS convention of counting timestamps from 1980.
|
||||
|
||||
The command `bdist_wheel` reads the `SOURCE_DATE_EPOCH` environment variable, which `nix-shell` sets to 1. Unsetting this variable or giving it a value corresponding to 1980 or later enables building wheels.
|
||||
The command `bdist_wheel` reads the `SOURCE_DATE_EPOCH` environment variable,
|
||||
which `nix-shell` sets to 1. Unsetting this variable or giving it a value
|
||||
corresponding to 1980 or later enables building wheels.
|
||||
|
||||
Use 1980 as timestamp:
|
||||
|
||||
```shell
|
||||
nix-shell --run "SOURCE_DATE_EPOCH=315532800 python3 setup.py bdist_wheel"
|
||||
```
|
||||
|
||||
or the current time:
|
||||
|
||||
```shell
|
||||
nix-shell --run "SOURCE_DATE_EPOCH=$(date +%s) python3 setup.py bdist_wheel"
|
||||
```
|
||||
|
||||
or unset `SOURCE_DATE_EPOCH`:
|
||||
|
||||
```shell
|
||||
nix-shell --run "unset SOURCE_DATE_EPOCH; python3 setup.py bdist_wheel"
|
||||
```
|
||||
|
@ -1002,13 +1095,18 @@ nix-shell --run "unset SOURCE_DATE_EPOCH; python3 setup.py bdist_wheel"
|
|||
### `install_data` / `data_files` problems
|
||||
|
||||
If you get the following error:
|
||||
|
||||
```
|
||||
could not create '/nix/store/6l1bvljpy8gazlsw2aw9skwwp4pmvyxw-python-2.7.8/etc':
|
||||
Permission denied
|
||||
```
|
||||
This is a [known bug](https://github.com/pypa/setuptools/issues/130) in `setuptools`.
|
||||
Setuptools `install_data` does not respect `--prefix`. An example of such package using the feature is `pkgs/tools/X11/xpra/default.nix`.
|
||||
|
||||
This is a [known bug](https://github.com/pypa/setuptools/issues/130) in
|
||||
`setuptools`. Setuptools `install_data` does not respect `--prefix`. An example
|
||||
of such package using the feature is `pkgs/tools/X11/xpra/default.nix`.
|
||||
|
||||
As workaround install it as an extra `preInstall` step:
|
||||
|
||||
```shell
|
||||
${python.interpreter} setup.py install_data --install-dir=$out --root=$out
|
||||
sed -i '/ = data\_files/d' setup.py
|
||||
|
@ -1031,13 +1129,16 @@ function.
|
|||
|
||||
### How to consume python modules using pip in a virtual environment like I am used to on other Operating Systems?
|
||||
|
||||
While this approach is not very idiomatic from Nix perspective, it can still be useful when dealing with pre-existing
|
||||
projects or in situations where it's not feasible or desired to write derivations for all required dependencies.
|
||||
While this approach is not very idiomatic from Nix perspective, it can still be
|
||||
useful when dealing with pre-existing projects or in situations where it's not
|
||||
feasible or desired to write derivations for all required dependencies.
|
||||
|
||||
This is an example of a `default.nix` for a `nix-shell`, which allows to consume a virtual environment created by `venv`,
|
||||
and install python modules through `pip` the traditional way.
|
||||
This is an example of a `default.nix` for a `nix-shell`, which allows to consume
|
||||
a virtual environment created by `venv`, and install python modules through
|
||||
`pip` the traditional way.
|
||||
|
||||
Create this `default.nix` file, together with a `requirements.txt` and simply execute `nix-shell`.
|
||||
Create this `default.nix` file, together with a `requirements.txt` and simply
|
||||
execute `nix-shell`.
|
||||
|
||||
```nix
|
||||
with import <nixpkgs> { };
|
||||
|
@ -1082,8 +1183,9 @@ in pkgs.mkShell rec {
|
|||
}
|
||||
```
|
||||
|
||||
In case the supplied venvShellHook is insufficient, or when python 2 support is needed,
|
||||
you can define your own shell hook and adapt to your needs like in the following example:
|
||||
In case the supplied venvShellHook is insufficient, or when python 2 support is
|
||||
needed, you can define your own shell hook and adapt to your needs like in the
|
||||
following example:
|
||||
|
||||
```nix
|
||||
with import <nixpkgs> { };
|
||||
|
@ -1152,11 +1254,11 @@ If you need to change a package's attribute(s) from `configuration.nix` you coul
|
|||
```
|
||||
|
||||
`pythonPackages.zerobin` is now globally overridden. All packages and also the
|
||||
`zerobin` NixOS service use the new definition.
|
||||
Note that `python-super` refers to the old package set and `python-self`
|
||||
to the new, overridden version.
|
||||
`zerobin` NixOS service use the new definition. Note that `python-super` refers
|
||||
to the old package set and `python-self` to the new, overridden version.
|
||||
|
||||
To modify only a Python package set instead of a whole Python derivation, use this snippet:
|
||||
To modify only a Python package set instead of a whole Python derivation, use
|
||||
this snippet:
|
||||
|
||||
```nix
|
||||
myPythonPackages = pythonPackages.override {
|
||||
|
@ -1188,11 +1290,12 @@ self: super: {
|
|||
|
||||
### How to use Intel's MKL with numpy and scipy?
|
||||
|
||||
A `site.cfg` is created that configures BLAS based on the `blas` parameter
|
||||
of the `numpy` derivation. By passing in `mkl`, `numpy` and packages depending
|
||||
on `numpy` will be built with `mkl`.
|
||||
A `site.cfg` is created that configures BLAS based on the `blas` parameter of
|
||||
the `numpy` derivation. By passing in `mkl`, `numpy` and packages depending on
|
||||
`numpy` will be built with `mkl`.
|
||||
|
||||
The following is an overlay that configures `numpy` to use `mkl`:
|
||||
|
||||
```nix
|
||||
self: super: {
|
||||
python37 = super.python37.override {
|
||||
|
@ -1228,10 +1331,21 @@ In a `setup.py` or `setup.cfg` it is common to declare dependencies:
|
|||
|
||||
Following rules are desired to be respected:
|
||||
|
||||
* Python libraries are called from `python-packages.nix` and packaged with `buildPythonPackage`. The expression of a library should be in `pkgs/development/python-modules/<name>/default.nix`. Libraries in `pkgs/top-level/python-packages.nix` are sorted quasi-alphabetically to avoid merge conflicts.
|
||||
* Python applications live outside of `python-packages.nix` and are packaged with `buildPythonApplication`.
|
||||
* Python libraries are called from `python-packages.nix` and packaged with
|
||||
`buildPythonPackage`. The expression of a library should be in
|
||||
`pkgs/development/python-modules/<name>/default.nix`. Libraries in
|
||||
`pkgs/top-level/python-packages.nix` are sorted quasi-alphabetically to avoid
|
||||
merge conflicts.
|
||||
* Python applications live outside of `python-packages.nix` and are packaged
|
||||
with `buildPythonApplication`.
|
||||
* Make sure libraries build for all Python interpreters.
|
||||
* By default we enable tests. Make sure the tests are found and, in the case of libraries, are passing for all interpreters. If certain tests fail they can be disabled individually. Try to avoid disabling the tests altogether. In any case, when you disable tests, leave a comment explaining why.
|
||||
* Commit names of Python libraries should reflect that they are Python libraries, so write for example `pythonPackages.numpy: 1.11 -> 1.12`.
|
||||
* Attribute names in `python-packages.nix` should be normalized according to [PEP 0503](https://www.python.org/dev/peps/pep-0503/#normalized-names).
|
||||
This means that characters should be converted to lowercase and `.` and `_` should be replaced by a single `-` (foo-bar-baz instead of Foo__Bar.baz )
|
||||
* By default we enable tests. Make sure the tests are found and, in the case of
|
||||
libraries, are passing for all interpreters. If certain tests fail they can be
|
||||
disabled individually. Try to avoid disabling the tests altogether. In any
|
||||
case, when you disable tests, leave a comment explaining why.
|
||||
* Commit names of Python libraries should reflect that they are Python
|
||||
libraries, so write for example `pythonPackages.numpy: 1.11 -> 1.12`.
|
||||
* Attribute names in `python-packages.nix` should be normalized according to
|
||||
[PEP 0503](https://www.python.org/dev/peps/pep-0503/#normalized-names). This
|
||||
means that characters should be converted to lowercase and `.` and `_` should
|
||||
be replaced by a single `-` (foo-bar-baz instead of Foo__Bar.baz )
|
||||
|
|
|
@ -37,7 +37,6 @@ rustPlatform.buildRustPackage rec {
|
|||
};
|
||||
|
||||
cargoSha256 = "17ldqr3asrdcsh4l29m3b5r37r5d0b3npq1lrgjmxb6vlx6a36qh";
|
||||
legacyCargoFetcher = false;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A fast line-oriented regex search tool, similar to ag and ack";
|
||||
|
@ -59,19 +58,9 @@ When the `Cargo.lock`, provided by upstream, is not in sync with the
|
|||
added in `cargoPatches` will also be prepended to the patches in `patches` at
|
||||
build-time.
|
||||
|
||||
Setting `legacyCargoFetcher` to `false` enables the following behavior:
|
||||
|
||||
1. The `Cargo.lock` file is copied into the cargo vendor directory.
|
||||
2. At buildtime, `buildRustPackage` will ensure that the `src` and `cargoSha256`
|
||||
are consistent. This avoids errors where one but not the other is updated.
|
||||
3. The builder will compress the vendored cargo src directory into a tar.gz file
|
||||
for storage after vendoring, and decompress it before the build. This saves
|
||||
disk space and enables hashed mirrors for Rust dependencies.
|
||||
|
||||
Note that this option changes the value of `cargoSha256`, so it is currently
|
||||
defaulted to `false`. When updating a Rust package, please set it to `true`;
|
||||
eventually we will default this to true and update the remaining Rust packages,
|
||||
then delete the option from all individual Rust package expressions.
|
||||
Unless `legacyCargoFetcher` is set to `true`, the fetcher will also verify that
|
||||
the `Cargo.lock` file is in sync with the `src` attribute, and will compress the
|
||||
vendor directory into a tar.gz archive.
|
||||
|
||||
### Building a crate for a different target
|
||||
|
||||
|
|
|
@ -367,6 +367,12 @@
|
|||
fingerprint = "7FDB 17B3 C29B 5BA6 E5A9 8BB2 9FAA 63E0 9750 6D9D";
|
||||
}];
|
||||
};
|
||||
almac = {
|
||||
email = "alma.cemerlic@gmail.com";
|
||||
github = "a1mac";
|
||||
githubId = 60479013;
|
||||
name = "Alma Cemerlic";
|
||||
};
|
||||
alunduil = {
|
||||
email = "alunduil@gmail.com";
|
||||
github = "alunduil";
|
||||
|
@ -1079,6 +1085,12 @@
|
|||
githubId = 7716744;
|
||||
name = "Berno Strik";
|
||||
};
|
||||
btlvr = {
|
||||
email = "btlvr@protonmail.com";
|
||||
github = "btlvr";
|
||||
githubId = 32319131;
|
||||
name = "Brett L";
|
||||
};
|
||||
buffet = {
|
||||
email = "niclas@countingsort.com";
|
||||
github = "buffet";
|
||||
|
@ -3285,6 +3297,12 @@
|
|||
githubId = 1198065;
|
||||
name = "Jeffrey David Johnson";
|
||||
};
|
||||
jefflabonte = {
|
||||
email = "grimsleepless@protonmail.com";
|
||||
github = "jefflabonte";
|
||||
githubId = 9425955;
|
||||
name = "Jean-François Labonté";
|
||||
};
|
||||
jensbin = {
|
||||
email = "jensbin+git@pm.me";
|
||||
github = "jensbin";
|
||||
|
@ -6251,6 +6269,12 @@
|
|||
githubId = 766350;
|
||||
name = "Richard Zetterberg";
|
||||
};
|
||||
samdoshi = {
|
||||
email = "sam@metal-fish.co.uk";
|
||||
github = "samdoshi";
|
||||
githubId = 112490;
|
||||
name = "Sam Doshi";
|
||||
};
|
||||
samdroid-apps = {
|
||||
email = "sam@sam.today";
|
||||
github = "samdroid-apps";
|
||||
|
@ -7438,6 +7462,12 @@
|
|||
github = "valeriangalliat";
|
||||
name = "Valérian Galliat";
|
||||
};
|
||||
valodim = {
|
||||
email = "look@my.amazin.horse";
|
||||
github = "valodim";
|
||||
githubId = 27813;
|
||||
name = "Vincent Breitmoser";
|
||||
};
|
||||
vandenoever = {
|
||||
email = "jos@vandenoever.info";
|
||||
github = "vandenoever";
|
||||
|
|
|
@ -6,8 +6,10 @@ basexx,,,,,
|
|||
binaryheap,,,,,vcunat
|
||||
bit32,,,,lua5_1,lblasc
|
||||
busted,,,,,
|
||||
cassowary,,,,,marsam
|
||||
cjson,lua-cjson,,,,
|
||||
compat53,,,,,vcunat
|
||||
cosmo,,,,,marsam
|
||||
coxpcall,,,1.17.0-1,,
|
||||
cqueues,,,,,vcunat
|
||||
cyrussasl,,,,,vcunat
|
||||
|
|
|
|
@ -625,6 +625,12 @@ auth required pam_succeed_if.so uid >= 1000 quiet
|
|||
to a fairly old snapshot from the <package>gcc7</package>-branch.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The <citerefentry><refentrytitle>nixos-build-vms</refentrytitle><manvolnum>8</manvolnum>
|
||||
</citerefentry>-script now uses the python test-driver.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
|
||||
|
|
|
@ -218,12 +218,12 @@ in rec {
|
|||
'';
|
||||
|
||||
testScript = ''
|
||||
startAll;
|
||||
$client->waitForUnit("multi-user.target");
|
||||
start_all()
|
||||
client.wait_for_unit("multi-user.target")
|
||||
${preBuild}
|
||||
$client->succeed("env -i ${bash}/bin/bash ${buildrunner} /tmp/xchg/saved-env >&2");
|
||||
client.succeed("env -i ${bash}/bin/bash ${buildrunner} /tmp/xchg/saved-env >&2")
|
||||
${postBuild}
|
||||
$client->succeed("sync"); # flush all data before pulling the plug
|
||||
client.succeed("sync") # flush all data before pulling the plug
|
||||
'';
|
||||
|
||||
vmRunCommand = writeText "vm-run" ''
|
||||
|
@ -263,9 +263,12 @@ in rec {
|
|||
{ ... }:
|
||||
{
|
||||
inherit require;
|
||||
imports = [
|
||||
../tests/common/auto.nix
|
||||
];
|
||||
virtualisation.memorySize = 1024;
|
||||
services.xserver.enable = true;
|
||||
services.xserver.displayManager.auto.enable = true;
|
||||
test-support.displayManager.auto.enable = true;
|
||||
services.xserver.displayManager.defaultSession = "none+icewm";
|
||||
services.xserver.windowManager.icewm.enable = true;
|
||||
};
|
||||
|
@ -274,7 +277,7 @@ in rec {
|
|||
machine = client;
|
||||
preBuild =
|
||||
''
|
||||
$client->waitForX;
|
||||
client.wait_for_x()
|
||||
'';
|
||||
} // args);
|
||||
|
||||
|
|
|
@ -250,9 +250,12 @@ in rec {
|
|||
{ ... }:
|
||||
{
|
||||
inherit require;
|
||||
imports = [
|
||||
../tests/common/auto.nix
|
||||
];
|
||||
virtualisation.memorySize = 1024;
|
||||
services.xserver.enable = true;
|
||||
services.xserver.displayManager.auto.enable = true;
|
||||
test-support.displayManager.auto.enable = true;
|
||||
services.xserver.displayManager.defaultSession = "none+icewm";
|
||||
services.xserver.windowManager.icewm.enable = true;
|
||||
};
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.hardware.brightnessctl;
|
||||
in
|
||||
{
|
||||
|
||||
options = {
|
||||
|
||||
hardware.brightnessctl = {
|
||||
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Enable brightnessctl in userspace.
|
||||
This will allow brightness control from users in the video group.
|
||||
'';
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.udev.packages = with pkgs; [ brightnessctl ];
|
||||
environment.systemPackages = with pkgs; [ brightnessctl ];
|
||||
};
|
||||
|
||||
}
|
|
@ -21,7 +21,9 @@ let
|
|||
if [ ! -e $out/nixos/nixpkgs ]; then
|
||||
ln -s . $out/nixos/nixpkgs
|
||||
fi
|
||||
echo -n ${config.system.nixos.revision} > $out/nixos/.git-revision
|
||||
${optionalString (config.system.nixos.revision != null) ''
|
||||
echo -n ${config.system.nixos.revision} > $out/nixos/.git-revision
|
||||
''}
|
||||
echo -n ${config.system.nixos.versionSuffix} > $out/nixos/.version-suffix
|
||||
echo ${config.system.nixos.versionSuffix} | sed -e s/pre// > $out/nixos/svn-revision
|
||||
'';
|
||||
|
|
|
@ -44,6 +44,9 @@ with lib;
|
|||
pkgs.bvi # binary editor
|
||||
pkgs.joe
|
||||
|
||||
# Include some version control tools.
|
||||
pkgs.git
|
||||
|
||||
# Firefox for reading the manual.
|
||||
pkgs.firefox
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
let nodes = import networkExpr; in
|
||||
|
||||
with import ../../../../lib/testing.nix {
|
||||
with import ../../../../lib/testing-python.nix {
|
||||
inherit system;
|
||||
pkgs = import ../../../../.. { inherit system config; };
|
||||
};
|
||||
|
|
|
@ -60,15 +60,15 @@ chmod 0755 "$mountPoint/dev" "$mountPoint/sys"
|
|||
mount --rbind /dev "$mountPoint/dev"
|
||||
mount --rbind /sys "$mountPoint/sys"
|
||||
|
||||
# If silent, write both stdout and stderr of activation script to /dev/null
|
||||
# otherwise, write both streams to stderr of this process
|
||||
if [ "$silent" -eq 0 ]; then
|
||||
PIPE_TARGET="/dev/stderr"
|
||||
else
|
||||
PIPE_TARGET="/dev/null"
|
||||
fi
|
||||
(
|
||||
# If silent, write both stdout and stderr of activation script to /dev/null
|
||||
# otherwise, write both streams to stderr of this process
|
||||
if [ "$silent" -eq 1 ]; then
|
||||
exec 2>/dev/null
|
||||
fi
|
||||
|
||||
# Run the activation script. Set $LOCALE_ARCHIVE to supress some Perl locale warnings.
|
||||
LOCALE_ARCHIVE="$system/sw/lib/locale/locale-archive" chroot "$mountPoint" "$system/activate" >>$PIPE_TARGET 2>&1 || true
|
||||
# Run the activation script. Set $LOCALE_ARCHIVE to supress some Perl locale warnings.
|
||||
LOCALE_ARCHIVE="$system/sw/lib/locale/locale-archive" chroot "$mountPoint" "$system/activate" 1>&2 || true
|
||||
)
|
||||
|
||||
exec chroot "$mountPoint" "${command[@]}"
|
||||
|
|
|
@ -4,10 +4,6 @@ with lib;
|
|||
|
||||
let
|
||||
cfg = config.system.nixos;
|
||||
|
||||
gitRepo = "${toString pkgs.path}/.git";
|
||||
gitRepoValid = lib.pathIsGitRepo gitRepo;
|
||||
gitCommitId = lib.substring 0 7 (commitIdFromGitRepo gitRepo);
|
||||
in
|
||||
|
||||
{
|
||||
|
@ -98,8 +94,6 @@ in
|
|||
# These defaults are set here rather than up there so that
|
||||
# changing them would not rebuild the manual
|
||||
version = mkDefault (cfg.release + cfg.versionSuffix);
|
||||
revision = mkIf gitRepoValid (mkDefault gitCommitId);
|
||||
versionSuffix = mkIf gitRepoValid (mkDefault (".git." + gitCommitId));
|
||||
};
|
||||
|
||||
# Generate /etc/os-release. See
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
./hardware/acpilight.nix
|
||||
./hardware/all-firmware.nix
|
||||
./hardware/bladeRF.nix
|
||||
./hardware/brightnessctl.nix
|
||||
./hardware/brillo.nix
|
||||
./hardware/ckb-next.nix
|
||||
./hardware/cpu/amd-microcode.nix
|
||||
|
|
|
@ -88,10 +88,10 @@ in {
|
|||
default = with pkgs; [
|
||||
swaylock swayidle
|
||||
xwayland alacritty dmenu
|
||||
rxvt_unicode # For backward compatibility (old default terminal)
|
||||
rxvt-unicode # For backward compatibility (old default terminal)
|
||||
];
|
||||
defaultText = literalExample ''
|
||||
with pkgs; [ swaylock swayidle xwayland rxvt_unicode dmenu ];
|
||||
with pkgs; [ swaylock swayidle xwayland rxvt-unicode dmenu ];
|
||||
'';
|
||||
example = literalExample ''
|
||||
with pkgs; [
|
||||
|
|
|
@ -42,6 +42,12 @@ with lib;
|
|||
instead, or any other display manager in NixOS as they all support auto-login.
|
||||
'')
|
||||
(mkRemovedOptionModule [ "services" "dnscrypt-proxy" ] "Use services.dnscrypt-proxy2 instead")
|
||||
(mkRemovedOptionModule ["hardware" "brightnessctl" ] ''
|
||||
The brightnessctl module was removed because newer versions of
|
||||
brightnessctl don't require the udev rules anymore (they can use the
|
||||
systemd-logind API). Instead of using the module you can now
|
||||
simply add the brightnessctl package to environment.systemPackages.
|
||||
'')
|
||||
|
||||
# Do NOT add any option renames here, see top of the file
|
||||
];
|
||||
|
|
|
@ -91,11 +91,7 @@ in
|
|||
environment.systemPackages = [ alsaUtils ];
|
||||
|
||||
environment.etc = mkIf (!pulseaudioEnabled && config.sound.extraConfig != "")
|
||||
[
|
||||
{ source = pkgs.writeText "asound.conf" config.sound.extraConfig;
|
||||
target = "asound.conf";
|
||||
}
|
||||
];
|
||||
{ "asound.conf".text = config.sound.extraConfig; };
|
||||
|
||||
# ALSA provides a udev rule for restoring volume settings.
|
||||
services.udev.packages = [ alsaUtils ];
|
||||
|
|
|
@ -20,7 +20,9 @@ let
|
|||
listen_addresses = '${if cfg.enableTCPIP then "*" else "localhost"}'
|
||||
port = ${toString cfg.port}
|
||||
${cfg.extraConfig}
|
||||
'';
|
||||
'';
|
||||
|
||||
groupAccessAvailable = versionAtLeast postgresql.version "11.0";
|
||||
|
||||
in
|
||||
|
||||
|
@ -88,6 +90,16 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
initdbArgs = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [];
|
||||
example = [ "--data-checksums" "--allow-group-access" ];
|
||||
description = ''
|
||||
Additional arguments passed to <literal>initdb</literal> during data dir
|
||||
initialisation.
|
||||
'';
|
||||
};
|
||||
|
||||
initialScript = mkOption {
|
||||
type = types.nullOr types.path;
|
||||
default = null;
|
||||
|
@ -220,7 +232,7 @@ in
|
|||
|
||||
###### implementation
|
||||
|
||||
config = mkIf config.services.postgresql.enable {
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
services.postgresql.package =
|
||||
# Note: when changing the default, make it conditional on
|
||||
|
@ -232,13 +244,14 @@ in
|
|||
else throw "postgresql_9_4 was removed, please upgrade your postgresql version.");
|
||||
|
||||
services.postgresql.dataDir =
|
||||
mkDefault (if versionAtLeast config.system.stateVersion "17.09" then "/var/lib/postgresql/${config.services.postgresql.package.psqlSchema}"
|
||||
else "/var/db/postgresql");
|
||||
mkDefault (if versionAtLeast config.system.stateVersion "17.09"
|
||||
then "/var/lib/postgresql/${cfg.package.psqlSchema}"
|
||||
else "/var/db/postgresql");
|
||||
|
||||
services.postgresql.authentication = mkAfter
|
||||
''
|
||||
# Generated file; do not edit!
|
||||
local all all ident
|
||||
local all all peer
|
||||
host all all 127.0.0.1/32 md5
|
||||
host all all ::1/128 md5
|
||||
'';
|
||||
|
@ -284,7 +297,7 @@ in
|
|||
''
|
||||
# Initialise the database.
|
||||
if ! test -e ${cfg.dataDir}/PG_VERSION; then
|
||||
initdb -U ${cfg.superUser}
|
||||
initdb -U ${cfg.superUser} ${concatStringsSep " " cfg.initdbArgs}
|
||||
# See postStart!
|
||||
touch "${cfg.dataDir}/.first_startup"
|
||||
fi
|
||||
|
@ -293,8 +306,12 @@ in
|
|||
ln -sfn "${pkgs.writeText "recovery.conf" cfg.recoveryConfig}" \
|
||||
"${cfg.dataDir}/recovery.conf"
|
||||
''}
|
||||
${optionalString (!groupAccessAvailable) ''
|
||||
# postgresql pre 11.0 doesn't start if state directory mode is group accessible
|
||||
chmod 0700 "${cfg.dataDir}"
|
||||
''}
|
||||
|
||||
exec postgres
|
||||
exec postgres
|
||||
'';
|
||||
|
||||
serviceConfig =
|
||||
|
@ -303,7 +320,7 @@ in
|
|||
Group = "postgres";
|
||||
PermissionsStartOnly = true;
|
||||
RuntimeDirectory = "postgresql";
|
||||
Type = if lib.versionAtLeast cfg.package.version "9.6"
|
||||
Type = if versionAtLeast cfg.package.version "9.6"
|
||||
then "notify"
|
||||
else "simple";
|
||||
|
||||
|
@ -352,5 +369,5 @@ in
|
|||
};
|
||||
|
||||
meta.doc = ./postgresql.xml;
|
||||
meta.maintainers = with lib.maintainers; [ thoughtpolice ];
|
||||
meta.maintainers = with lib.maintainers; [ thoughtpolice danbst ];
|
||||
}
|
||||
|
|
|
@ -23,12 +23,7 @@ in {
|
|||
systemd.packages = [ pkgs.iwd ];
|
||||
|
||||
systemd.services.iwd.wantedBy = [ "multi-user.target" ];
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /var/lib/iwd 0700 root root -"
|
||||
"d /var/lib/ead 0700 root root -"
|
||||
];
|
||||
};
|
||||
|
||||
meta.maintainers = with lib.maintainers; [ mic92 ];
|
||||
meta.maintainers = with lib.maintainers; [ mic92 dtzWill ];
|
||||
}
|
||||
|
|
|
@ -5,14 +5,16 @@ with lib;
|
|||
let
|
||||
cfg = config.services.knot;
|
||||
|
||||
configFile = pkgs.writeText "knot.conf" cfg.extraConfig;
|
||||
socketFile = "/run/knot/knot.sock";
|
||||
configFile = pkgs.writeTextFile {
|
||||
name = "knot.conf";
|
||||
text = (concatMapStringsSep "\n" (file: "include: ${file}") cfg.keyFiles) + "\n" +
|
||||
cfg.extraConfig;
|
||||
checkPhase = lib.optionalString (cfg.keyFiles == []) ''
|
||||
${cfg.package}/bin/knotc --config=$out conf-check
|
||||
'';
|
||||
};
|
||||
|
||||
knotConfCheck = file: pkgs.runCommand "knot-config-checked"
|
||||
{ buildInputs = [ cfg.package ]; } ''
|
||||
ln -s ${configFile} $out
|
||||
knotc --config=${configFile} conf-check
|
||||
'';
|
||||
socketFile = "/run/knot/knot.sock";
|
||||
|
||||
knot-cli-wrappers = pkgs.stdenv.mkDerivation {
|
||||
name = "knot-cli-wrappers";
|
||||
|
@ -45,6 +47,19 @@ in {
|
|||
'';
|
||||
};
|
||||
|
||||
keyFiles = mkOption {
|
||||
type = types.listOf types.path;
|
||||
default = [];
|
||||
description = ''
|
||||
A list of files containing additional configuration
|
||||
to be included using the include directive. This option
|
||||
allows to include configuration like TSIG keys without
|
||||
exposing them to the nix store readable to any process.
|
||||
Note that using this option will also disable configuration
|
||||
checks at build time.
|
||||
'';
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
|
@ -65,6 +80,13 @@ in {
|
|||
};
|
||||
|
||||
config = mkIf config.services.knot.enable {
|
||||
users.users.knot = {
|
||||
isSystemUser = true;
|
||||
group = "knot";
|
||||
description = "Knot daemon user";
|
||||
};
|
||||
|
||||
users.groups.knot.gid = null;
|
||||
systemd.services.knot = {
|
||||
unitConfig.Documentation = "man:knotd(8) man:knot.conf(5) man:knotc(8) https://www.knot-dns.cz/docs/${cfg.package.version}/html/";
|
||||
description = cfg.package.meta.description;
|
||||
|
@ -74,12 +96,12 @@ in {
|
|||
|
||||
serviceConfig = {
|
||||
Type = "notify";
|
||||
ExecStart = "${cfg.package}/bin/knotd --config=${knotConfCheck configFile} --socket=${socketFile} ${concatStringsSep " " cfg.extraArgs}";
|
||||
ExecStart = "${cfg.package}/bin/knotd --config=${configFile} --socket=${socketFile} ${concatStringsSep " " cfg.extraArgs}";
|
||||
ExecReload = "${knot-cli-wrappers}/bin/knotc reload";
|
||||
CapabilityBoundingSet = "CAP_NET_BIND_SERVICE CAP_SETPCAP";
|
||||
AmbientCapabilities = "CAP_NET_BIND_SERVICE CAP_SETPCAP";
|
||||
NoNewPrivileges = true;
|
||||
DynamicUser = "yes";
|
||||
User = "knot";
|
||||
RuntimeDirectory = "knot";
|
||||
StateDirectory = "knot";
|
||||
StateDirectoryMode = "0700";
|
||||
|
|
|
@ -130,7 +130,7 @@ in
|
|||
systemdConfigs = listToAttrs (map mkSystemd enabledConfigs);
|
||||
|
||||
in mkIf cfg.enable {
|
||||
environment.etc = mkMerge etcFiles;
|
||||
systemd.services = mkMerge systemdConfigs;
|
||||
environment.etc = etcFiles;
|
||||
systemd.services = systemdConfigs;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -6,14 +6,18 @@ let
|
|||
|
||||
cfg = config.services.mattermost;
|
||||
|
||||
defaultConfig = builtins.fromJSON (readFile "${pkgs.mattermost}/config/config.json");
|
||||
defaultConfig = builtins.fromJSON (builtins.replaceStrings [ "\\u0026" ] [ "&" ]
|
||||
(readFile "${pkgs.mattermost}/config/config.json")
|
||||
);
|
||||
|
||||
database = "postgres://${cfg.localDatabaseUser}:${cfg.localDatabasePassword}@localhost:5432/${cfg.localDatabaseName}?sslmode=disable&connect_timeout=10";
|
||||
|
||||
mattermostConf = foldl recursiveUpdate defaultConfig
|
||||
[ { ServiceSettings.SiteURL = cfg.siteUrl;
|
||||
ServiceSettings.ListenAddress = cfg.listenAddress;
|
||||
TeamSettings.SiteName = cfg.siteName;
|
||||
SqlSettings.DriverName = "postgres";
|
||||
SqlSettings.DataSource = "postgres://${cfg.localDatabaseUser}:${cfg.localDatabasePassword}@localhost:5432/${cfg.localDatabaseName}?sslmode=disable&connect_timeout=10";
|
||||
SqlSettings.DataSource = database;
|
||||
}
|
||||
cfg.extraConfig
|
||||
];
|
||||
|
@ -175,7 +179,9 @@ in
|
|||
mkdir -p ${cfg.statePath}/{data,config,logs}
|
||||
ln -sf ${pkgs.mattermost}/{bin,fonts,i18n,templates,client} ${cfg.statePath}
|
||||
'' + lib.optionalString (!cfg.mutableConfig) ''
|
||||
ln -sf ${mattermostConfJSON} ${cfg.statePath}/config/config.json
|
||||
rm -f ${cfg.statePath}/config/config.json
|
||||
cp ${mattermostConfJSON} ${cfg.statePath}/config/config.json
|
||||
${pkgs.mattermost}/bin/mattermost config migrate ${cfg.statePath}/config/config.json ${database}
|
||||
'' + lib.optionalString cfg.mutableConfig ''
|
||||
if ! test -e "${cfg.statePath}/config/.initial-created"; then
|
||||
rm -f ${cfg.statePath}/config/config.json
|
||||
|
@ -201,7 +207,8 @@ in
|
|||
PermissionsStartOnly = true;
|
||||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
ExecStart = "${pkgs.mattermost}/bin/mattermost";
|
||||
ExecStart = "${pkgs.mattermost}/bin/mattermost" +
|
||||
(lib.optionalString (!cfg.mutableConfig) " -c ${database}");
|
||||
WorkingDirectory = "${cfg.statePath}";
|
||||
Restart = "always";
|
||||
RestartSec = "10";
|
||||
|
@ -227,4 +234,3 @@ in
|
|||
})
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -64,32 +64,38 @@ in {
|
|||
config = mkIf cfg.enable {
|
||||
systemd.services.caddy = {
|
||||
description = "Caddy web server";
|
||||
# upstream unit: https://github.com/caddyserver/caddy/blob/master/dist/init/linux-systemd/caddy.service
|
||||
after = [ "network-online.target" ];
|
||||
wants = [ "network-online.target" ]; # systemd-networkd-wait-online.service
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
environment = mkIf (versionAtLeast config.system.stateVersion "17.09")
|
||||
{ CADDYPATH = cfg.dataDir; };
|
||||
serviceConfig = {
|
||||
ExecStart = ''
|
||||
${cfg.package}/bin/caddy -root=/var/tmp -conf=${configFile} \
|
||||
${cfg.package}/bin/caddy -log stdout -log-timestamps=false \
|
||||
-root=/var/tmp -conf=${configFile} \
|
||||
-ca=${cfg.ca} -email=${cfg.email} ${optionalString cfg.agree "-agree"}
|
||||
'';
|
||||
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
||||
ExecReload = "${pkgs.coreutils}/bin/kill -USR1 $MAINPID";
|
||||
Type = "simple";
|
||||
User = "caddy";
|
||||
Group = "caddy";
|
||||
Restart = "on-failure";
|
||||
StartLimitInterval = 86400;
|
||||
StartLimitBurst = 5;
|
||||
Restart = "on-abnormal";
|
||||
StartLimitIntervalSec = 14400;
|
||||
StartLimitBurst = 10;
|
||||
AmbientCapabilities = "cap_net_bind_service";
|
||||
CapabilityBoundingSet = "cap_net_bind_service";
|
||||
NoNewPrivileges = true;
|
||||
LimitNPROC = 64;
|
||||
LimitNPROC = 512;
|
||||
LimitNOFILE = 1048576;
|
||||
PrivateTmp = true;
|
||||
PrivateDevices = true;
|
||||
ProtectHome = true;
|
||||
ProtectSystem = "full";
|
||||
ReadWriteDirectories = cfg.dataDir;
|
||||
KillMode = "mixed";
|
||||
KillSignal = "SIGQUIT";
|
||||
TimeoutStopSec = "5s";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -427,6 +427,7 @@ in
|
|||
TryExec=${script}
|
||||
Exec=${script}
|
||||
Name=${sessionName}
|
||||
DesktopNames=${sessionName}
|
||||
'';
|
||||
} // {
|
||||
providedSessions = [ sessionName ];
|
||||
|
|
|
@ -61,7 +61,7 @@ in {
|
|||
serviceConfig.ExecStart = ''
|
||||
${cfg.package}/bin/unclutter \
|
||||
-idle ${toString cfg.timeout} \
|
||||
-jitter ${toString (cfg.threeshold - 1)} \
|
||||
-jitter ${toString (cfg.threshold - 1)} \
|
||||
${optionalString cfg.keystroke "-keystroke"} \
|
||||
${concatMapStrings (x: " -"+x) cfg.extraOptions} \
|
||||
-not ${concatStringsSep " " cfg.excluded} \
|
||||
|
|
|
@ -18,10 +18,10 @@ in {
|
|||
};
|
||||
|
||||
package = mkOption {
|
||||
default = pkgs.rxvt_unicode-with-plugins;
|
||||
defaultText = "pkgs.rxvt_unicode-with-plugins";
|
||||
default = pkgs.rxvt-unicode;
|
||||
defaultText = "pkgs.rxvt-unicode";
|
||||
description = ''
|
||||
Package to install. Usually pkgs.rxvt_unicode-with-plugins or pkgs.rxvt_unicode
|
||||
Package to install. Usually pkgs.rxvt-unicode.
|
||||
'';
|
||||
type = types.package;
|
||||
};
|
||||
|
|
|
@ -101,7 +101,12 @@ in
|
|||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to activate VESA video mode on boot.
|
||||
(Deprecated) This option, if set, activates the VESA 800x600 video
|
||||
mode on boot and disables kernel modesetting. It is equivalent to
|
||||
specifying <literal>[ "vga=0x317" "nomodeset" ]</literal> in the
|
||||
<option>boot.kernelParams</option> option. This option is
|
||||
deprecated as of 2020: Xorg now works better with modesetting, and
|
||||
you might want a different VESA vga setting, anyway.
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
|
@ -224,7 +224,11 @@ in
|
|||
|
||||
extraConfig = mkOption {
|
||||
default = "";
|
||||
example = "serial; terminal_output.serial";
|
||||
example = ''
|
||||
serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1
|
||||
terminal_input --append serial
|
||||
terminal_output --append serial
|
||||
'';
|
||||
type = types.lines;
|
||||
description = ''
|
||||
Additional GRUB commands inserted in the configuration file
|
||||
|
|
|
@ -305,7 +305,8 @@ in
|
|||
in listToAttrs (map formatDevice (filter (fs: fs.autoFormat) fileSystems));
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"Z /run/keys 0750 root ${toString config.ids.gids.keys}"
|
||||
"d /run/keys 0750 root ${toString config.ids.gids.keys}"
|
||||
"z /run/keys 0750 root ${toString config.ids.gids.keys}"
|
||||
];
|
||||
|
||||
# Sync mount options with systemd's src/core/mount-setup.c: mount_table.
|
||||
|
|
|
@ -192,13 +192,22 @@ let
|
|||
["--network=host"]
|
||||
'';
|
||||
};
|
||||
|
||||
autoStart = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
When enabled, the container is automatically started on boot.
|
||||
If this option is set to false, the container has to be started on-demand via its service.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
mkService = name: container: let
|
||||
mkAfter = map (x: "docker-${x}.service") container.dependsOn;
|
||||
in rec {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
wantedBy = [] ++ optional (container.autoStart) "multi-user.target";
|
||||
after = [ "docker.service" "docker.socket" ] ++ mkAfter;
|
||||
requires = after;
|
||||
|
||||
|
|
|
@ -66,6 +66,7 @@ in rec {
|
|||
(all nixos.tests.containers-ip)
|
||||
nixos.tests.chromium.x86_64-linux or []
|
||||
(all nixos.tests.firefox)
|
||||
(all nixos.tests.firefox-esr)
|
||||
(all nixos.tests.firewall)
|
||||
(all nixos.tests.fontconfig-default-fonts)
|
||||
(all nixos.tests.gnome3-xorg)
|
||||
|
|
|
@ -20,7 +20,7 @@ let
|
|||
allTestsForSystem = system:
|
||||
import ./tests/all-tests.nix {
|
||||
inherit system;
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
pkgs = import ./.. { inherit system; };
|
||||
callTest = t: {
|
||||
${system} = hydraJob t.test;
|
||||
};
|
||||
|
@ -28,7 +28,7 @@ let
|
|||
allTests =
|
||||
foldAttrs recursiveUpdate {} (map allTestsForSystem supportedSystems);
|
||||
|
||||
pkgs = import nixpkgs { system = "x86_64-linux"; };
|
||||
pkgs = import ./.. { system = "x86_64-linux"; };
|
||||
|
||||
|
||||
versionModule =
|
||||
|
@ -41,7 +41,7 @@ let
|
|||
makeIso =
|
||||
{ module, type, system, ... }:
|
||||
|
||||
with import nixpkgs { inherit system; };
|
||||
with import ./.. { inherit system; };
|
||||
|
||||
hydraJob ((import lib/eval-config.nix {
|
||||
inherit system;
|
||||
|
@ -54,7 +54,7 @@ let
|
|||
makeSdImage =
|
||||
{ module, system, ... }:
|
||||
|
||||
with import nixpkgs { inherit system; };
|
||||
with import ./.. { inherit system; };
|
||||
|
||||
hydraJob ((import lib/eval-config.nix {
|
||||
inherit system;
|
||||
|
@ -65,7 +65,7 @@ let
|
|||
makeSystemTarball =
|
||||
{ module, maintainers ? ["viric"], system }:
|
||||
|
||||
with import nixpkgs { inherit system; };
|
||||
with import ./.. { inherit system; };
|
||||
|
||||
let
|
||||
|
||||
|
@ -188,7 +188,7 @@ in rec {
|
|||
# A bootable VirtualBox virtual appliance as an OVA file (i.e. packaged OVF).
|
||||
ova = forMatchingSystems [ "x86_64-linux" ] (system:
|
||||
|
||||
with import nixpkgs { inherit system; };
|
||||
with import ./.. { inherit system; };
|
||||
|
||||
hydraJob ((import lib/eval-config.nix {
|
||||
inherit system;
|
||||
|
@ -204,7 +204,7 @@ in rec {
|
|||
# A disk image that can be imported to Amazon EC2 and registered as an AMI
|
||||
amazonImage = forMatchingSystems [ "x86_64-linux" "aarch64-linux" ] (system:
|
||||
|
||||
with import nixpkgs { inherit system; };
|
||||
with import ./.. { inherit system; };
|
||||
|
||||
hydraJob ((import lib/eval-config.nix {
|
||||
inherit system;
|
||||
|
|
|
@ -88,6 +88,7 @@ in
|
|||
fancontrol = handleTest ./fancontrol.nix {};
|
||||
ferm = handleTest ./ferm.nix {};
|
||||
firefox = handleTest ./firefox.nix {};
|
||||
firefox-esr = handleTest ./firefox.nix { esr = true; };
|
||||
firewall = handleTest ./firewall.nix {};
|
||||
fish = handleTest ./fish.nix {};
|
||||
flannel = handleTestOn ["x86_64-linux"] ./flannel.nix {};
|
||||
|
@ -144,6 +145,7 @@ in
|
|||
kernel-testing = handleTest ./kernel-testing.nix {};
|
||||
keymap = handleTest ./keymap.nix {};
|
||||
knot = handleTest ./knot.nix {};
|
||||
krb5 = discoverTests (import ./krb5 {});
|
||||
kubernetes.dns = handleTestOn ["x86_64-linux"] ./kubernetes/dns.nix {};
|
||||
# kubernetes.e2e should eventually replace kubernetes.rbac when it works
|
||||
#kubernetes.e2e = handleTestOn ["x86_64-linux"] ./kubernetes/e2e.nix {};
|
||||
|
|
|
@ -1,30 +1,27 @@
|
|||
# Test Docker containers as systemd units
|
||||
|
||||
import ./make-test.nix ({ pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
import ./make-test-python.nix ({ pkgs, lib, ... }: {
|
||||
name = "docker-containers";
|
||||
meta = {
|
||||
maintainers = with lib.maintainers; [ benley mkaito ];
|
||||
};
|
||||
|
||||
nodes = {
|
||||
docker = { pkgs, ... }:
|
||||
{
|
||||
virtualisation.docker.enable = true;
|
||||
docker = { pkgs, ... }: {
|
||||
virtualisation.docker.enable = true;
|
||||
|
||||
docker-containers.nginx = {
|
||||
image = "nginx-container";
|
||||
imageFile = pkgs.dockerTools.examples.nginx;
|
||||
ports = ["8181:80"];
|
||||
};
|
||||
docker-containers.nginx = {
|
||||
image = "nginx-container";
|
||||
imageFile = pkgs.dockerTools.examples.nginx;
|
||||
ports = ["8181:80"];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
startAll;
|
||||
$docker->waitForUnit("docker-nginx.service");
|
||||
$docker->waitForOpenPort(8181);
|
||||
$docker->waitUntilSucceeds("curl http://localhost:8181|grep Hello");
|
||||
start_all()
|
||||
docker.wait_for_unit("docker-nginx.service")
|
||||
docker.wait_for_open_port(8181)
|
||||
docker.wait_until_succeeds("curl http://localhost:8181 | grep Hello")
|
||||
'';
|
||||
})
|
||||
|
|
|
@ -83,5 +83,11 @@ import ./make-test.nix ({ pkgs, ... }: {
|
|||
|
||||
# Ensure image with only 2 layers can be loaded
|
||||
$docker->succeed("docker load --input='${pkgs.dockerTools.examples.two-layered-image}'");
|
||||
|
||||
# Ensure the bulk layer didn't miss store paths
|
||||
# Regression test for https://github.com/NixOS/nixpkgs/issues/78744
|
||||
$docker->succeed("docker load --input='${pkgs.dockerTools.examples.bulk-layer}'");
|
||||
# This ensure the two output paths (ls and hello) are in the layer
|
||||
$docker->succeed("docker run bulk-layer ls /bin/hello");
|
||||
'';
|
||||
})
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ./make-test-python.nix ({ pkgs, ... }: {
|
||||
import ./make-test-python.nix ({ pkgs, esr ? false, ... }: {
|
||||
name = "firefox";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ eelco shlevy ];
|
||||
|
@ -8,7 +8,9 @@ import ./make-test-python.nix ({ pkgs, ... }: {
|
|||
{ pkgs, ... }:
|
||||
|
||||
{ imports = [ ./common/x11.nix ];
|
||||
environment.systemPackages = [ pkgs.firefox pkgs.xdotool ];
|
||||
environment.systemPackages =
|
||||
(if esr then [ pkgs.firefox-esr ] else [ pkgs.firefox ])
|
||||
++ [ pkgs.xdotool ];
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
|
|
|
@ -28,6 +28,13 @@ let
|
|||
name = "knot-zones";
|
||||
paths = [ exampleZone delegatedZone ];
|
||||
};
|
||||
# DO NOT USE pkgs.writeText IN PRODUCTION. This put secrets in the nix store!
|
||||
tsigFile = pkgs.writeText "tsig.conf" ''
|
||||
key:
|
||||
- id: slave_key
|
||||
algorithm: hmac-sha256
|
||||
secret: zOYgOgnzx3TGe5J5I/0kxd7gTcxXhLYMEq3Ek3fY37s=
|
||||
'';
|
||||
in {
|
||||
name = "knot";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
|
@ -48,6 +55,7 @@ in {
|
|||
};
|
||||
services.knot.enable = true;
|
||||
services.knot.extraArgs = [ "-v" ];
|
||||
services.knot.keyFiles = [ tsigFile ];
|
||||
services.knot.extraConfig = ''
|
||||
server:
|
||||
listen: 0.0.0.0@53
|
||||
|
@ -56,6 +64,7 @@ in {
|
|||
acl:
|
||||
- id: slave_acl
|
||||
address: 192.168.0.2
|
||||
key: slave_key
|
||||
action: transfer
|
||||
|
||||
remote:
|
||||
|
@ -103,6 +112,7 @@ in {
|
|||
];
|
||||
};
|
||||
services.knot.enable = true;
|
||||
services.knot.keyFiles = [ tsigFile ];
|
||||
services.knot.extraArgs = [ "-v" ];
|
||||
services.knot.extraConfig = ''
|
||||
server:
|
||||
|
@ -117,6 +127,7 @@ in {
|
|||
remote:
|
||||
- id: master
|
||||
address: 192.168.0.1@53
|
||||
key: slave_key
|
||||
|
||||
template:
|
||||
- id: default
|
||||
|
@ -155,10 +166,10 @@ in {
|
|||
];
|
||||
};
|
||||
environment.systemPackages = [ pkgs.knot-dns ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
testScript = { nodes, ... }: let
|
||||
testScript = { nodes, ... }: let
|
||||
master4 = (lib.head nodes.master.config.networking.interfaces.eth1.ipv4.addresses).address;
|
||||
master6 = (lib.head nodes.master.config.networking.interfaces.eth1.ipv6.addresses).address;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Verifies that the configuration suggested in deprecated example values
|
||||
# will result in the expected output.
|
||||
|
||||
import ../make-test.nix ({ pkgs, ...} : {
|
||||
import ../make-test-python.nix ({ pkgs, ...} : {
|
||||
name = "krb5-with-deprecated-config";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ eqyiel ];
|
||||
|
@ -43,6 +43,8 @@ import ../make-test.nix ({ pkgs, ...} : {
|
|||
|
||||
'';
|
||||
in ''
|
||||
$machine->succeed("diff /etc/krb5.conf ${snapshot}");
|
||||
machine.succeed(
|
||||
"diff /etc/krb5.conf ${snapshot}"
|
||||
)
|
||||
'';
|
||||
})
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Verifies that the configuration suggested in (non-deprecated) example values
|
||||
# will result in the expected output.
|
||||
|
||||
import ../make-test.nix ({ pkgs, ...} : {
|
||||
import ../make-test-python.nix ({ pkgs, ...} : {
|
||||
name = "krb5-with-example-config";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ eqyiel ];
|
||||
|
@ -101,6 +101,8 @@ import ../make-test.nix ({ pkgs, ...} : {
|
|||
default = SYSLOG:NOTICE
|
||||
'';
|
||||
in ''
|
||||
$machine->succeed("diff /etc/krb5.conf ${snapshot}");
|
||||
machine.succeed(
|
||||
"diff /etc/krb5.conf ${snapshot}"
|
||||
)
|
||||
'';
|
||||
})
|
||||
|
|
|
@ -5,7 +5,7 @@ let
|
|||
# for a host utility with IPv6 support
|
||||
environment.systemPackages = [ pkgs.bind ];
|
||||
};
|
||||
in import ./make-test.nix ({ pkgs, ...} : {
|
||||
in import ./make-test-python.nix ({ pkgs, ...} : {
|
||||
name = "nsd";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ aszlig ];
|
||||
|
@ -65,37 +65,35 @@ in import ./make-test.nix ({ pkgs, ...} : {
|
|||
};
|
||||
|
||||
testScript = ''
|
||||
startAll;
|
||||
start_all()
|
||||
|
||||
$clientv4->waitForUnit("network.target");
|
||||
$clientv6->waitForUnit("network.target");
|
||||
$server->waitForUnit("nsd.service");
|
||||
clientv4.wait_for_unit("network.target")
|
||||
clientv6.wait_for_unit("network.target")
|
||||
server.wait_for_unit("nsd.service")
|
||||
|
||||
sub assertHost {
|
||||
my ($type, $rr, $query, $expected) = @_;
|
||||
my $self = $type eq 4 ? $clientv4 : $clientv6;
|
||||
my $out = $self->succeed("host -$type -t $rr $query");
|
||||
$self->log("output: $out");
|
||||
chomp $out;
|
||||
die "DNS IPv$type query on $query gave '$out' instead of '$expected'"
|
||||
if ($out !~ $expected);
|
||||
}
|
||||
|
||||
foreach (4, 6) {
|
||||
subtest "ipv$_", sub {
|
||||
assertHost($_, "a", "example.com", qr/has no [^ ]+ record/);
|
||||
assertHost($_, "aaaa", "example.com", qr/has no [^ ]+ record/);
|
||||
def assert_host(type, rr, query, expected):
|
||||
self = clientv4 if type == 4 else clientv6
|
||||
out = self.succeed(f"host -{type} -t {rr} {query}").rstrip()
|
||||
self.log(f"output: {out}")
|
||||
assert re.search(
|
||||
expected, out
|
||||
), f"DNS IPv{type} query on {query} gave '{out}' instead of '{expected}'"
|
||||
|
||||
assertHost($_, "soa", "example.com", qr/SOA.*?noc\.example\.com/);
|
||||
assertHost($_, "a", "ipv4.example.com", qr/address 1.2.3.4$/);
|
||||
assertHost($_, "aaaa", "ipv6.example.com", qr/address abcd::eeff$/);
|
||||
|
||||
assertHost($_, "a", "deleg.example.com", qr/address 9.8.7.6$/);
|
||||
assertHost($_, "aaaa", "deleg.example.com", qr/address fedc::bbaa$/);
|
||||
for ipv in 4, 6:
|
||||
with subtest(f"IPv{ipv}"):
|
||||
assert_host(ipv, "a", "example.com", "has no [^ ]+ record")
|
||||
assert_host(ipv, "aaaa", "example.com", "has no [^ ]+ record")
|
||||
|
||||
assertHost($_, "a", "root", qr/address 1.8.7.4$/);
|
||||
assertHost($_, "aaaa", "root", qr/address acbd::4$/);
|
||||
};
|
||||
}
|
||||
assert_host(ipv, "soa", "example.com", "SOA.*?noc\.example\.com")
|
||||
assert_host(ipv, "a", "ipv4.example.com", "address 1.2.3.4$")
|
||||
assert_host(ipv, "aaaa", "ipv6.example.com", "address abcd::eeff$")
|
||||
|
||||
assert_host(ipv, "a", "deleg.example.com", "address 9.8.7.6$")
|
||||
assert_host(ipv, "aaaa", "deleg.example.com", "address fedc::bbaa$")
|
||||
|
||||
assert_host(ipv, "a", "root", "address 1.8.7.4$")
|
||||
assert_host(ipv, "aaaa", "root", "address acbd::4$")
|
||||
'';
|
||||
})
|
||||
|
|
|
@ -1,41 +1,71 @@
|
|||
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||
name = "openarena";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ tomfitzhenry ];
|
||||
};
|
||||
import ./make-test-python.nix ({ pkgs, ...} :
|
||||
|
||||
machine =
|
||||
let
|
||||
client =
|
||||
{ pkgs, ... }:
|
||||
|
||||
{ imports = [];
|
||||
environment.systemPackages = with pkgs; [
|
||||
socat
|
||||
];
|
||||
services.openarena = {
|
||||
enable = true;
|
||||
extraFlags = [
|
||||
"+set dedicated 2"
|
||||
"+set sv_hostname 'My NixOS server'"
|
||||
"+map oa_dm1"
|
||||
];
|
||||
};
|
||||
{ imports = [ ./common/x11.nix ];
|
||||
hardware.opengl.driSupport = true;
|
||||
environment.systemPackages = [ pkgs.openarena ];
|
||||
};
|
||||
|
||||
in {
|
||||
name = "openarena";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ fpletz ];
|
||||
};
|
||||
|
||||
nodes =
|
||||
{ server =
|
||||
{ services.openarena = {
|
||||
enable = true;
|
||||
extraFlags = [ "+set g_gametype 0" "+map oa_dm7" "+addbot Angelyss" "+addbot Arachna" ];
|
||||
openPorts = true;
|
||||
};
|
||||
};
|
||||
|
||||
client1 = client;
|
||||
client2 = client;
|
||||
};
|
||||
|
||||
testScript =
|
||||
''
|
||||
machine.wait_for_unit("openarena.service")
|
||||
machine.wait_until_succeeds("ss --numeric --udp --listening | grep -q 27960")
|
||||
start_all()
|
||||
|
||||
# The log line containing 'resolve address' is last and only message that occurs after
|
||||
# the server starts accepting clients.
|
||||
machine.wait_until_succeeds(
|
||||
"journalctl -u openarena.service | grep 'resolve address: dpmaster.deathmask.net'"
|
||||
server.wait_for_unit("openarena")
|
||||
server.wait_until_succeeds("ss --numeric --udp --listening | grep -q 27960")
|
||||
|
||||
client1.wait_for_x()
|
||||
client2.wait_for_x()
|
||||
|
||||
client1.execute("openarena +set r_fullscreen 0 +set name Foo +connect server &")
|
||||
client2.execute("openarena +set r_fullscreen 0 +set name Bar +connect server &")
|
||||
|
||||
server.wait_until_succeeds(
|
||||
"journalctl -u openarena -e | grep -q 'Foo.*entered the game'"
|
||||
)
|
||||
server.wait_until_succeeds(
|
||||
"journalctl -u openarena -e | grep -q 'Bar.*entered the game'"
|
||||
)
|
||||
|
||||
# Check it's possible to join the server.
|
||||
# Can't use substring match instead of grep because the output is not utf-8
|
||||
machine.succeed(
|
||||
"echo -n -e '\\xff\\xff\\xff\\xffgetchallenge' | socat - UDP4-DATAGRAM:127.0.0.1:27960 | grep -q challengeResponse"
|
||||
)
|
||||
server.sleep(10) # wait for a while to get a nice screenshot
|
||||
|
||||
client1.screenshot("screen_client1_1")
|
||||
client2.screenshot("screen_client2_1")
|
||||
|
||||
client1.block()
|
||||
|
||||
server.sleep(10)
|
||||
|
||||
client1.screenshot("screen_client1_2")
|
||||
client2.screenshot("screen_client2_2")
|
||||
|
||||
client1.unblock()
|
||||
|
||||
server.sleep(10)
|
||||
|
||||
client1.screenshot("screen_client1_3")
|
||||
client2.screenshot("screen_client2_3")
|
||||
'';
|
||||
|
||||
})
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ./make-test.nix ({ pkgs, ... }: {
|
||||
import ./make-test-python.nix ({ pkgs, ... }: {
|
||||
name = "plotinus";
|
||||
meta = {
|
||||
maintainers = pkgs.plotinus.meta.maintainers;
|
||||
|
@ -12,16 +12,17 @@ import ./make-test.nix ({ pkgs, ... }: {
|
|||
environment.systemPackages = [ pkgs.gnome3.gnome-calculator pkgs.xdotool ];
|
||||
};
|
||||
|
||||
testScript =
|
||||
''
|
||||
$machine->waitForX;
|
||||
$machine->succeed("gnome-calculator &");
|
||||
$machine->waitForWindow(qr/gnome-calculator/);
|
||||
$machine->succeed("xdotool search --sync --onlyvisible --class gnome-calculator windowfocus --sync key ctrl+shift+p");
|
||||
$machine->sleep(5); # wait for the popup
|
||||
$machine->succeed("xdotool key --delay 100 p r e f e r e n c e s Return");
|
||||
$machine->waitForWindow(qr/Preferences/);
|
||||
$machine->screenshot("screen");
|
||||
'';
|
||||
|
||||
testScript = ''
|
||||
machine.wait_for_x()
|
||||
machine.succeed("gnome-calculator &")
|
||||
machine.wait_for_window("gnome-calculator")
|
||||
machine.succeed(
|
||||
"xdotool search --sync --onlyvisible --class gnome-calculator "
|
||||
+ "windowfocus --sync key --clearmodifiers --delay 1 'ctrl+shift+p'"
|
||||
)
|
||||
machine.sleep(5) # wait for the popup
|
||||
machine.succeed("xdotool key --delay 100 p r e f e r e n c e s Return")
|
||||
machine.wait_for_window("Preferences")
|
||||
machine.screenshot("screen")
|
||||
'';
|
||||
})
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ./make-test.nix ({ pkgs, ... }:
|
||||
import ./make-test-python.nix ({ pkgs, ... }:
|
||||
|
||||
{
|
||||
name = "solr";
|
||||
|
@ -21,28 +21,36 @@ import ./make-test.nix ({ pkgs, ... }:
|
|||
};
|
||||
|
||||
testScript = ''
|
||||
startAll;
|
||||
start_all()
|
||||
|
||||
$machine->waitForUnit('solr.service');
|
||||
$machine->waitForOpenPort('8983');
|
||||
$machine->succeed('curl --fail http://localhost:8983/solr/');
|
||||
machine.wait_for_unit("solr.service")
|
||||
machine.wait_for_open_port(8983)
|
||||
machine.succeed("curl --fail http://localhost:8983/solr/")
|
||||
|
||||
# adapted from pkgs.solr/examples/films/README.txt
|
||||
$machine->succeed('sudo -u solr solr create -c films');
|
||||
$machine->succeed(q(curl http://localhost:8983/solr/films/schema -X POST -H 'Content-type:application/json' --data-binary '{
|
||||
"add-field" : {
|
||||
"name":"name",
|
||||
"type":"text_general",
|
||||
"multiValued":false,
|
||||
"stored":true
|
||||
},
|
||||
"add-field" : {
|
||||
"name":"initial_release_date",
|
||||
"type":"pdate",
|
||||
"stored":true
|
||||
}
|
||||
}')) =~ /"status":0/ or die;
|
||||
$machine->succeed('sudo -u solr post -c films ${pkgs.solr}/example/films/films.json');
|
||||
$machine->succeed('curl http://localhost:8983/solr/films/query?q=name:batman') =~ /"name":"Batman Begins"/ or die;
|
||||
machine.succeed("sudo -u solr solr create -c films")
|
||||
assert '"status":0' in machine.succeed(
|
||||
"""
|
||||
curl http://localhost:8983/solr/films/schema -X POST -H 'Content-type:application/json' --data-binary '{
|
||||
"add-field" : {
|
||||
"name":"name",
|
||||
"type":"text_general",
|
||||
"multiValued":false,
|
||||
"stored":true
|
||||
},
|
||||
"add-field" : {
|
||||
"name":"initial_release_date",
|
||||
"type":"pdate",
|
||||
"stored":true
|
||||
}
|
||||
}'
|
||||
"""
|
||||
)
|
||||
machine.succeed(
|
||||
"sudo -u solr post -c films ${pkgs.solr}/example/films/films.json"
|
||||
)
|
||||
assert '"name":"Batman Begins"' in machine.succeed(
|
||||
"curl http://localhost:8983/solr/films/query?q=name:batman"
|
||||
)
|
||||
'';
|
||||
})
|
||||
|
|
|
@ -30,6 +30,9 @@ rustPlatform.buildRustPackage rec {
|
|||
sha256 = "0rm705zrk9rfv31pwbqxrswi5v6vhnghxa8dgxjmcrh00l8dm6j9";
|
||||
};
|
||||
|
||||
# Delete this on next update; see #79975 for details
|
||||
legacyCargoFetcher = true;
|
||||
|
||||
cargoSha256 = "06vgc89d93fhjcyy9d1v6lf8kr34pl5bbpwbv2jpfahpj9y84bgj";
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
|
|
@ -32,6 +32,9 @@ rustPlatform.buildRustPackage rec {
|
|||
sha256 = "0vy5i77bv8c22ldhrnr4z6kx22zqnb1lg3s7y8673bqjgd7dppi0";
|
||||
};
|
||||
|
||||
# Delete this on next update; see #79975 for details
|
||||
legacyCargoFetcher = true;
|
||||
|
||||
cargoSha256 = "1h0n8zclb8a1b1ri83viiwwzlj3anm38m4cp38aqyf6q40qga35q";
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
|
|
@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec {
|
|||
sha256 = "10jp2yh8jlvdwh297658q9fi3i62vwsbd9fbwjsir7s1c9bgdy8k";
|
||||
};
|
||||
|
||||
cargoSha256 = "1gw8wvms1ry2shvm3c79wp5nkpc39409af4qfm5hd4wgz2grh8d2";
|
||||
cargoSha256 = "0081wc3xw11hivz0nwy4my3y4a53ch857bq989dr0pm9p2pirvj1";
|
||||
|
||||
cargoBuildFlags = [ "--no-default-features" "--features" "${lib.concatStringsSep "," features}" ];
|
||||
|
||||
|
|
|
@ -1,19 +1,37 @@
|
|||
{ lib, python3Packages, ffmpeg }:
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, substituteAll
|
||||
, ffmpeg
|
||||
, python3Packages
|
||||
, sox
|
||||
}:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "r128gain";
|
||||
version = "0.9.3";
|
||||
version = "1.0.1";
|
||||
|
||||
src = python3Packages.fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "0dx2grryp0lj58bawx1zcq9a6b4ijz9r5qrg8h6nvm92kqlya26i";
|
||||
src = fetchFromGitHub {
|
||||
owner = "desbma";
|
||||
repo = "r128gain";
|
||||
rev = version;
|
||||
sha256 = "0fnxis2g7mw8mb0cz9bws909lrndli7ml54nnzda49vc2fhbjwxr";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ ffmpeg ]
|
||||
++ (with python3Packages; [ crcmod mutagen tqdm ])
|
||||
;
|
||||
patches = [
|
||||
(
|
||||
substituteAll {
|
||||
src = ./ffmpeg-location.patch;
|
||||
inherit ffmpeg;
|
||||
}
|
||||
)
|
||||
];
|
||||
|
||||
doCheck = false; # downloads media files for testing
|
||||
propagatedBuildInputs = with python3Packages; [ crcmod ffmpeg-python mutagen tqdm ];
|
||||
checkInputs = with python3Packages; [ requests sox ];
|
||||
|
||||
# Testing downloads media files for testing, which requires the
|
||||
# sandbox to be disabled.
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Fast audio loudness scanner & tagger (ReplayGain v2 / R128)";
|
||||
|
|
31
pkgs/applications/audio/r128gain/ffmpeg-location.patch
Normal file
31
pkgs/applications/audio/r128gain/ffmpeg-location.patch
Normal file
|
@ -0,0 +1,31 @@
|
|||
diff --git i/r128gain/__init__.py w/r128gain/__init__.py
|
||||
index 53fc3ef..f144e15 100755
|
||||
--- i/r128gain/__init__.py
|
||||
+++ w/r128gain/__init__.py
|
||||
@@ -78,7 +78,7 @@ def get_ffmpeg_lib_versions(ffmpeg_path=None):
|
||||
Example: 0x3040100 for FFmpeg 3.4.1
|
||||
"""
|
||||
r = collections.OrderedDict()
|
||||
- cmd = (ffmpeg_path or "ffmpeg", "-version")
|
||||
+ cmd = (ffmpeg_path or "@ffmpeg@/bin/ffmpeg", "-version")
|
||||
output = subprocess.run(cmd,
|
||||
check=True,
|
||||
stdout=subprocess.PIPE,
|
||||
@@ -156,7 +156,7 @@ def get_r128_loudness(audio_filepaths, *, calc_peak=True, enable_ffmpeg_threadin
|
||||
os.devnull,
|
||||
**additional_ffmpeg_args,
|
||||
f="null"),
|
||||
- cmd=ffmpeg_path or "ffmpeg")
|
||||
+ cmd=ffmpeg_path or "@ffmpeg@/bin/ffmpeg")
|
||||
|
||||
# run
|
||||
logger().debug(cmd_to_string(cmd))
|
||||
@@ -740,7 +740,7 @@ def cl_main():
|
||||
help="Maximum number of tracks to scan in parallel. If not specified, autodetect CPU count")
|
||||
arg_parser.add_argument("-f",
|
||||
"--ffmpeg-path",
|
||||
- default=shutil.which("ffmpeg"),
|
||||
+ default="@ffmpeg@/bin/ffmpeg",
|
||||
help="""Full file path of ffmpeg executable (only needed if not in PATH).
|
||||
If not specified, autodetect""")
|
||||
arg_parser.add_argument("-d",
|
|
@ -2,20 +2,20 @@
|
|||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "spotify-tui";
|
||||
version = "0.13.0";
|
||||
version = "0.14.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Rigellute";
|
||||
repo = "spotify-tui";
|
||||
rev = "v${version}";
|
||||
sha256 = "0gp7xb63icraqg7f0j91q474acph3ligzak2k8qqr9cqbgg509f4";
|
||||
sha256 = "06xqj83m4hz00p8796m0df7lv9875p8zc1v6l9yqbiak1h95lq7h";
|
||||
};
|
||||
|
||||
cargoSha256 = "1364z9jz3mnba3pii5h7imqlwlvbp146pcd5q8w61lsmdr2iyha2";
|
||||
cargoSha256 = "1pc4n6lm1w0660ivm0kxzicpckvb351y62dpv0cxa7ckd3raa5pr";
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ] ++ stdenv.lib.optionals stdenv.isLinux [ python3 ];
|
||||
buildInputs = [ openssl ]
|
||||
++ stdenv.lib.optional stdenv.isLinux libxcb
|
||||
++ stdenv.lib.optional stdenv.isLinux libxcb
|
||||
++ stdenv.lib.optionals stdenv.isDarwin [ AppKit Security ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
|
|
@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec {
|
|||
sha256 = "08i0zm7kgprixqjpgaxk7xid1njgj6lmi896jf9fsjqzdzlblqk8";
|
||||
};
|
||||
|
||||
cargoSha256 = "0kl8xl2qhzf8wb25ajw59frgym62lkg7p72d8z0xmkqjjcg2nyib";
|
||||
cargoSha256 = "0200apqbx769ggjnjr0m72g61ikhml2xak5n1il2pvfx1yf5nw0n";
|
||||
|
||||
cargoBuildFlags = [
|
||||
"--no-default-features"
|
||||
|
|
|
@ -1,38 +1,70 @@
|
|||
{ stdenv, fetchFromGitHub, alsaLib, faad2, flac, libmad, libvorbis, makeWrapper, mpg123 }:
|
||||
{ stdenv, fetchFromGitHub
|
||||
, alsaLib, flac, libmad, libvorbis, mpg123
|
||||
, dsdSupport ? true
|
||||
, faad2Support ? true, faad2
|
||||
, ffmpegSupport ? true, ffmpeg
|
||||
, opusSupport ? true, opusfile
|
||||
, resampleSupport ? true, soxr
|
||||
, sslSupport ? true, openssl
|
||||
}:
|
||||
|
||||
let
|
||||
runtimeDeps = [ faad2 flac libmad libvorbis mpg123 ];
|
||||
rpath = stdenv.lib.makeLibraryPath runtimeDeps;
|
||||
concatStringsSep = stdenv.lib.concatStringsSep;
|
||||
optional = stdenv.lib.optional;
|
||||
opts = [ "-DLINKALL" ]
|
||||
++ optional dsdSupport "-DDSD"
|
||||
++ optional (!faad2Support) "-DNO_FAAD"
|
||||
++ optional ffmpegSupport "-DFFMPEG"
|
||||
++ optional opusSupport "-DOPUS"
|
||||
++ optional resampleSupport "-DRESAMPLE"
|
||||
++ optional sslSupport "-DUSE_SSL";
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
name = "squeezelite-git-2018-08-14";
|
||||
pname = "squeezelite";
|
||||
|
||||
# versions are specified in `squeezelite.h`
|
||||
# see https://github.com/ralph-irving/squeezelite/issues/29
|
||||
version = "1.9.6.1196";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ralph-irving";
|
||||
repo = "squeezelite";
|
||||
rev = "ecb6e3696a42113994640e5345d0b5ca2e77d28b";
|
||||
sha256 = "0di3d5qy8fhawijq6bxy524fgffvzl08dprrws0fs2j1a70fs0fh";
|
||||
rev = "2b508464dce2cbdb2a3089c58df2a6fbc36328c0";
|
||||
sha256 = "024ypr1da2r079k3hgiifzd3d3wcfprhbl5zdm40zm0c7frzmr8i";
|
||||
};
|
||||
|
||||
buildInputs = [ alsaLib ] ++ runtimeDeps;
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildInputs = [ alsaLib flac libmad libvorbis mpg123 ]
|
||||
++ optional faad2Support faad2
|
||||
++ optional ffmpegSupport ffmpeg
|
||||
++ optional opusSupport opusfile
|
||||
++ optional resampleSupport soxr
|
||||
++ optional sslSupport openssl;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace opus.c \
|
||||
--replace "<opusfile.h>" "<opus/opusfile.h>"
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
export OPTS="${concatStringsSep " " opts}"
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -Dm755 -t $out/bin squeezelite
|
||||
install -Dm644 -t $out/share/doc/squeezelite *.txt *.md
|
||||
|
||||
wrapProgram $out/bin/squeezelite --set LD_LIBRARY_PATH $RPATH
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Lightweight headless squeezebox client emulator";
|
||||
homepage = https://github.com/ralph-irving/squeezelite;
|
||||
license = licenses.gpl3;
|
||||
license = with licenses; [ gpl3 ] ++ optional dsdSupport bsd2;
|
||||
maintainers = with maintainers; [ samdoshi ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
RPATH = rpath;
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
{ stdenv, fetchFromGitHub, rustPlatform }:
|
||||
|
||||
with rustPlatform;
|
||||
|
||||
buildRustPackage rec {
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "ethabi";
|
||||
version = "7.0.0";
|
||||
version = "11.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "paritytech";
|
||||
|
@ -13,13 +11,11 @@ buildRustPackage rec {
|
|||
sha256 = "1gqd3vwsvv1wvi659qcdywgmh41swblpwmmxb033k8irw581dwq4";
|
||||
};
|
||||
|
||||
cargoSha256 = "0zkdai31jf8f5syklaxq43ydjvp5xclr8pd6y1q6vkwjz6z49hzm";
|
||||
|
||||
cargoBuildFlags = ["--features cli"];
|
||||
cargoSha256 = "1hx8qw51rl7sn9jmnclw0hc4rx619hf78hpaih5mvny3k0zgiwpm";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Ethereum function call encoding (ABI) utility";
|
||||
homepage = https://github.com/ethcore/ethabi/;
|
||||
homepage = "https://github.com/ethcore/ethabi/";
|
||||
maintainers = [ maintainers.dbrock ];
|
||||
license = licenses.gpl3;
|
||||
inherit version;
|
||||
|
|
|
@ -17,6 +17,9 @@ rustPlatform.buildRustPackage {
|
|||
pname = "parity";
|
||||
inherit version;
|
||||
inherit cargoSha256;
|
||||
# Delete this on next update; see #79975 for details
|
||||
legacyCargoFetcher = true;
|
||||
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "paritytech";
|
||||
|
|
|
@ -16,6 +16,9 @@ rustPlatform.buildRustPackage rec {
|
|||
sha256 = "0v7g03rbml2afw0splmyjh9nqpjg0ldjw09hyc0jqd3qlhgxiiyj";
|
||||
};
|
||||
|
||||
# Delete this on next update; see #79975 for details
|
||||
legacyCargoFetcher = true;
|
||||
|
||||
cargoSha256 = "0gc3w0cwdyk8f7cgpp9sfawczk3n6wd7q0nhfvk87sry71b8vvwq";
|
||||
|
||||
buildInputs = [ pkgconfig openssl openssl.dev ];
|
||||
|
|
|
@ -11,6 +11,9 @@ rustPlatform.buildRustPackage rec {
|
|||
sha256 = "0md0pp3k97iv7kfjpfkg14pjanhrql4vafa8ggbxpkajv1j4xldv";
|
||||
};
|
||||
|
||||
# Delete this on next update; see #79975 for details
|
||||
legacyCargoFetcher = true;
|
||||
|
||||
cargoSha256 = "166v8cxlpfslbs5gljbh7wp0lxqakayw47ikxm9r9a39n7j36mq1";
|
||||
|
||||
installPhase = ''
|
||||
|
|
|
@ -3,17 +3,19 @@
|
|||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "amp";
|
||||
# The latest release (0.5.2) does not compile, so we use a git snapshot instead.
|
||||
version = "unstable-2019-06-09";
|
||||
version = "0.6.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jmacdonald";
|
||||
repo = pname;
|
||||
rev = "2c88e82a88ada8a5fd2620ef225192395a4533a2";
|
||||
sha256 = "0ha1xiabq31s687gkrnszf3zc7b3sfdl79iyg5ygbc49mzvarp8c";
|
||||
rev = version;
|
||||
sha256 = "0jhxyl27nwp7rp0lc3kic69g8x55d0azrwlwwhz3z74icqa8f03j";
|
||||
};
|
||||
|
||||
cargoSha256 = "1bvj2zg19ak4vi47vjkqlybz011kn5zq1j7zznr76zrryacw4lz1";
|
||||
# Delete this on next update; see #79975 for details
|
||||
legacyCargoFetcher = true;
|
||||
|
||||
cargoSha256 = "0rk5c8knx8swqzmj7wd18hq2h5ndkzvcbq4lzggpavkk01a8hlb1";
|
||||
|
||||
nativeBuildInputs = [ cmake pkgconfig ];
|
||||
buildInputs = [ openssl python3 xorg.libxcb libgit2 ] ++ stdenv.lib.optionals stdenv.isDarwin
|
||||
|
|
|
@ -12,7 +12,6 @@ rustPlatform.buildRustPackage {
|
|||
};
|
||||
|
||||
cargoSha256 = "06ghcd4j751mdkzwb88nqwk8la4zdb137y0iqrkpykkfx0as43x3";
|
||||
legacyCargoFetcher = false;
|
||||
|
||||
buildInputs = [ ncurses ];
|
||||
|
||||
|
|
|
@ -276,12 +276,12 @@ in
|
|||
|
||||
goland = buildGoland rec {
|
||||
name = "goland-${version}";
|
||||
version = "2019.3.1"; /* updated by script */
|
||||
version = "2019.3.2"; /* updated by script */
|
||||
description = "Up and Coming Go IDE";
|
||||
license = stdenv.lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = "https://download.jetbrains.com/go/${name}.tar.gz";
|
||||
sha256 = "1lj5i71nw2m9xwv6q48b86kipiwj927bxiwxppb4isqax2w6250d"; /* updated by script */
|
||||
sha256 = "0namvc8dfm562dgvs4mrv1c6lyi4j8yxw402fkw55l0xqv3ff0a9"; /* updated by script */
|
||||
};
|
||||
wmClass = "jetbrains-goland";
|
||||
update-channel = "GoLand RELEASE";
|
||||
|
@ -289,12 +289,12 @@ in
|
|||
|
||||
idea-community = buildIdea rec {
|
||||
name = "idea-community-${version}";
|
||||
version = "2019.3.2"; /* updated by script */
|
||||
version = "2019.3.3"; /* updated by script */
|
||||
description = "Integrated Development Environment (IDE) by Jetbrains, community edition";
|
||||
license = stdenv.lib.licenses.asl20;
|
||||
src = fetchurl {
|
||||
url = "https://download.jetbrains.com/idea/ideaIC-${version}.tar.gz";
|
||||
sha256 = "09vicd2czag07f2f7dy0mmcvz5kryv659m32zm9rlsr4nai1i3y3"; /* updated by script */
|
||||
sha256 = "15rs866fp4lrsqdk13fnbg7ncdfrhky1m5sl90p32v45j90hagrg"; /* updated by script */
|
||||
};
|
||||
wmClass = "jetbrains-idea-ce";
|
||||
update-channel = "IntelliJ IDEA RELEASE";
|
||||
|
@ -302,12 +302,12 @@ in
|
|||
|
||||
idea-ultimate = buildIdea rec {
|
||||
name = "idea-ultimate-${version}";
|
||||
version = "2019.3.2"; /* updated by script */
|
||||
version = "2019.3.3"; /* updated by script */
|
||||
description = "Integrated Development Environment (IDE) by Jetbrains, requires paid license";
|
||||
license = stdenv.lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = "https://download.jetbrains.com/idea/ideaIU-${version}-no-jbr.tar.gz";
|
||||
sha256 = "09lgdd7gkx94warjc7wah9w7s9lj81law8clavjjyjas8bhhf1hz"; /* updated by script */
|
||||
sha256 = "034aq5lf64apc152xr0889hg2xak2if9n5xl6zvd3f9q9srhivxn"; /* updated by script */
|
||||
};
|
||||
wmClass = "jetbrains-idea";
|
||||
update-channel = "IntelliJ IDEA RELEASE";
|
||||
|
@ -328,12 +328,12 @@ in
|
|||
|
||||
pycharm-community = buildPycharm rec {
|
||||
name = "pycharm-community-${version}";
|
||||
version = "2019.3.2"; /* updated by script */
|
||||
version = "2019.3.3"; /* updated by script */
|
||||
description = "PyCharm Community Edition";
|
||||
license = stdenv.lib.licenses.asl20;
|
||||
src = fetchurl {
|
||||
url = "https://download.jetbrains.com/python/${name}.tar.gz";
|
||||
sha256 = "06dzqjsq6jqgv8askzskm0bllzm9i8rzmhkjsv4na2phvdxf6qi2"; /* updated by script */
|
||||
sha256 = "0ly3cdzm4hp4qchdadjmbd39jnqpmpnlk6vgp8s4amsv35b6hydd"; /* updated by script */
|
||||
};
|
||||
wmClass = "jetbrains-pycharm-ce";
|
||||
update-channel = "PyCharm RELEASE";
|
||||
|
@ -341,12 +341,12 @@ in
|
|||
|
||||
pycharm-professional = buildPycharm rec {
|
||||
name = "pycharm-professional-${version}";
|
||||
version = "2019.3.2"; /* updated by script */
|
||||
version = "2019.3.3"; /* updated by script */
|
||||
description = "PyCharm Professional Edition";
|
||||
license = stdenv.lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = "https://download.jetbrains.com/python/${name}.tar.gz";
|
||||
sha256 = "1zp64pnzz2jy232g8fgkqmn34afbhbkkhgyb9z1v1qfb533p39ig"; /* updated by script */
|
||||
sha256 = "1305zvb5n2zqnny4l50qfv7jd1sj4ffhrig4rpfiqg65ncfpypwb"; /* updated by script */
|
||||
};
|
||||
wmClass = "jetbrains-pycharm";
|
||||
update-channel = "PyCharm RELEASE";
|
||||
|
@ -367,12 +367,12 @@ in
|
|||
|
||||
ruby-mine = buildRubyMine rec {
|
||||
name = "ruby-mine-${version}";
|
||||
version = "2019.3.1"; /* updated by script */
|
||||
version = "2019.3.2"; /* updated by script */
|
||||
description = "The Most Intelligent Ruby and Rails IDE";
|
||||
license = stdenv.lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = "https://download.jetbrains.com/ruby/RubyMine-${version}.tar.gz";
|
||||
sha256 = "0xadjx4szd9rk3bl3fqzhnfq744gmkbz9li80j5rqm27qhf4axfx"; /* updated by script */
|
||||
sha256 = "0mwzhvrhvsyb8r7sjcigv9jazim1zyipb3ym4xsd2gyl3ans2vm9"; /* updated by script */
|
||||
};
|
||||
wmClass = "jetbrains-rubymine";
|
||||
update-channel = "RubyMine RELEASE";
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "mle";
|
||||
version = "1.4.2";
|
||||
version = "1.4.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "adsr";
|
||||
repo = "mle";
|
||||
rev = "v${version}";
|
||||
sha256 = "053zvxkjx2zwq6lwkycirxz1m9sjc3zi9ic8fvp3mjvbqfri1y3x";
|
||||
sha256 = "16dbwfdd6sqqn7jfaxd5wdy8y9ghbihnz6bgn3xhqcww8rj1sia1";
|
||||
};
|
||||
|
||||
# Fix location of Lua 5.3 header and library
|
||||
|
|
|
@ -11,6 +11,9 @@ rustPlatform.buildRustPackage rec {
|
|||
sha256 = "11gb59lhc1sp5dxj2fdm6072f4nxxay0war3kmchdwsk41nvxlrh";
|
||||
};
|
||||
|
||||
# Delete this on next update; see #79975 for details
|
||||
legacyCargoFetcher = true;
|
||||
|
||||
cargoSha256 = "00r5jf5qdw02vcv3522qqrnwj14mip0l58prcncbvyg4pxlm2rb2";
|
||||
|
||||
buildInputs = [ gtk webkitgtk ];
|
||||
|
|
|
@ -14,7 +14,11 @@ pythonPackages.buildPythonApplication rec {
|
|||
sha256 = "0jlw0qksak4bdzddpsj74pm2f2bgpj3cwrlspdjjy0j9qzg0mpl9";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with pythonPackages; [ pynvim psutil ];
|
||||
propagatedBuildInputs = with pythonPackages; [
|
||||
pynvim
|
||||
psutil
|
||||
setuptools
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "A tool that helps controlling nvim processes from a terminal";
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "quilter";
|
||||
version = "2.1.0";
|
||||
version = "2.1.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "lainsce";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1756gp3f2pmxz2k4xg4cfdbdav848qb0vjglyiy1n2k9xc79dyxz";
|
||||
sha256 = "1raba835kvqq4lfpk141vg81ll7sg3jyhwyr6758pdjmncncg0wr";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
|
|
@ -12,6 +12,9 @@ rustPlatform.buildRustPackage rec {
|
|||
|
||||
buildInputs = stdenv.lib.optional stdenv.isDarwin Security;
|
||||
|
||||
# Delete this on next update; see #79975 for details
|
||||
legacyCargoFetcher = true;
|
||||
|
||||
cargoSha256 = "1y3vk8bzsaisx7wrncjxcqdh355f2wk4n59vq5qgj37fph2zpy7f";
|
||||
|
||||
# failures: structures::polyline::test::test_polyline_split
|
||||
|
|
|
@ -20,5 +20,7 @@ stdenv.mkDerivation {
|
|||
maintainers = with maintainers; [ bcdarwin ];
|
||||
platforms = platforms.unix;
|
||||
license = licenses.gpl2;
|
||||
broken = stdenv.isAarch64;
|
||||
# /build/git-3453f61/itkextras/OneDimensionalInPlaceAccumulateFilter.txx:311:10: fatal error: xmmintrin.h: No such file or directory
|
||||
};
|
||||
}
|
||||
|
|
|
@ -16,6 +16,9 @@ rustPlatform.buildRustPackage rec {
|
|||
sha256 = "1n5s7v2z13550gkqz7w6dw62jdy60wdi8w1lfa23609b4yhg4w94";
|
||||
};
|
||||
|
||||
# Delete this on next update; see #79975 for details
|
||||
legacyCargoFetcher = true;
|
||||
|
||||
cargoSha256 = "173jfjvdag97f6jvfg366hjk9v3cz301cbzpcahy51rbf1cip1w1";
|
||||
|
||||
nativeBuildInputs = [ cmake pkgconfig makeWrapper ];
|
||||
|
|
|
@ -62,6 +62,9 @@ in buildRustPackage rec {
|
|||
sha256 = "05jcg33ifngpzw2hdhgb614j87ihhhlqgar0kky183rywg0dxikg";
|
||||
};
|
||||
|
||||
# Delete this on next update; see #79975 for details
|
||||
legacyCargoFetcher = true;
|
||||
|
||||
cargoSha256 = "1kc9n10kb4j87x337pzl6wpi0qj5ib2mqmrjag2yld3138dag71n";
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
|
|
@ -5,13 +5,13 @@
|
|||
|
||||
mkDerivation rec {
|
||||
pname = "CopyQ";
|
||||
version = "3.9.3";
|
||||
version = "3.10.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hluk";
|
||||
repo = "CopyQ";
|
||||
rev = "v${version}";
|
||||
sha256 = "0wlwq9xg8rzsbj0b29z358k4mbrqy04iraa8x0p26pa95yskgcma";
|
||||
sha256 = "05nhgndiq0sm1bvb80sf5fgnm38249dclwzmfm7hzrablmkwgv3c";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
diff --git i/config.cc w/config.cc
|
||||
index 04b63f5..7a453d9 100644
|
||||
--- i/config.cc
|
||||
+++ w/config.cc
|
||||
@@ -182,7 +182,7 @@ Preferences::Preferences():
|
||||
pronounceOnLoadPopup( false ),
|
||||
useInternalPlayer( InternalPlayerBackend::anyAvailable() ),
|
||||
internalPlayerBackend( InternalPlayerBackend::defaultBackend() ),
|
||||
- checkForNewReleases( true ),
|
||||
+ checkForNewReleases( false ),
|
||||
disallowContentFromOtherSites( false ),
|
||||
enableWebPlugins( false ),
|
||||
hideGoldenDictHeader( false ),
|
||||
@@ -867,8 +867,8 @@ Class load() THROW_SPEC( exError )
|
||||
c.preferences.proxyServer.systemProxyPassword = proxy.namedItem( "systemProxyPassword" ).toElement().text();
|
||||
}
|
||||
|
||||
- if ( !preferences.namedItem( "checkForNewReleases" ).isNull() )
|
||||
- c.preferences.checkForNewReleases = ( preferences.namedItem( "checkForNewReleases" ).toElement().text() == "1" );
|
||||
+ //if ( !preferences.namedItem( "checkForNewReleases" ).isNull() )
|
||||
+ // c.preferences.checkForNewReleases = ( preferences.namedItem( "checkForNewReleases" ).toElement().text() == "1" );
|
||||
|
||||
if ( !preferences.namedItem( "disallowContentFromOtherSites" ).isNull() )
|
||||
c.preferences.disallowContentFromOtherSites = ( preferences.namedItem( "disallowContentFromOtherSites" ).toElement().text() == "1" );
|
||||
@@ -1819,9 +1819,9 @@ void save( Class const & c ) THROW_SPEC( exError )
|
||||
proxy.appendChild( opt );
|
||||
}
|
||||
|
||||
- opt = dd.createElement( "checkForNewReleases" );
|
||||
- opt.appendChild( dd.createTextNode( c.preferences.checkForNewReleases ? "1" : "0" ) );
|
||||
- preferences.appendChild( opt );
|
||||
+ //opt = dd.createElement( "checkForNewReleases" );
|
||||
+ //opt.appendChild( dd.createTextNode( c.preferences.checkForNewReleases ? "1" : "0" ) );
|
||||
+ //preferences.appendChild( opt );
|
||||
|
||||
opt = dd.createElement( "disallowContentFromOtherSites" );
|
||||
opt.appendChild( dd.createTextNode( c.preferences.disallowContentFromOtherSites ? "1" : "0" ) );
|
||||
diff --git i/preferences.cc w/preferences.cc
|
||||
index 72c3147..7e48f00 100644
|
||||
--- i/preferences.cc
|
||||
+++ w/preferences.cc
|
||||
@@ -314,6 +314,7 @@ Preferences::Preferences( QWidget * parent, Config::Class & cfg_ ):
|
||||
this, SLOT( customProxyToggled( bool ) ) );
|
||||
|
||||
ui.checkForNewReleases->setChecked( p.checkForNewReleases );
|
||||
+ ui.checkForNewReleases->setEnabled( false );
|
||||
ui.disallowContentFromOtherSites->setChecked( p.disallowContentFromOtherSites );
|
||||
ui.enableWebPlugins->setChecked( p.enableWebPlugins );
|
||||
ui.hideGoldenDictHeader->setChecked( p.hideGoldenDictHeader );
|
|
@ -0,0 +1,62 @@
|
|||
diff --git i/goldendict.pro w/goldendict.pro
|
||||
index 328dc20..5202a07 100644
|
||||
--- i/goldendict.pro
|
||||
+++ w/goldendict.pro
|
||||
@@ -210,21 +210,18 @@ mac {
|
||||
-llzo2
|
||||
!CONFIG( no_ffmpeg_player ) {
|
||||
LIBS += -lao \
|
||||
- -lavutil-gd \
|
||||
- -lavformat-gd \
|
||||
- -lavcodec-gd
|
||||
+ -lavutil \
|
||||
+ -lavformat \
|
||||
+ -lavcodec
|
||||
}
|
||||
- INCLUDEPATH = $${PWD}/maclibs/include
|
||||
- LIBS += -L$${PWD}/maclibs/lib -framework AppKit -framework Carbon
|
||||
+ LIBS += -framework AppKit -framework Carbon
|
||||
OBJECTIVE_SOURCES += lionsupport.mm \
|
||||
machotkeywrapper.mm \
|
||||
macmouseover.mm \
|
||||
speechclient_mac.mm
|
||||
ICON = icons/macicon.icns
|
||||
QMAKE_INFO_PLIST = myInfo.plist
|
||||
- QMAKE_POST_LINK = mkdir -p GoldenDict.app/Contents/Frameworks & \
|
||||
- cp -nR $${PWD}/maclibs/lib/ GoldenDict.app/Contents/Frameworks/ & \
|
||||
- mkdir -p GoldenDict.app/Contents/MacOS/locale & \
|
||||
+ QMAKE_POST_LINK = mkdir -p GoldenDict.app/Contents/MacOS/locale & \
|
||||
cp -R locale/*.qm GoldenDict.app/Contents/MacOS/locale/ & \
|
||||
mkdir -p GoldenDict.app/Contents/MacOS/help & \
|
||||
cp -R $${PWD}/help/*.qch GoldenDict.app/Contents/MacOS/help/
|
||||
@@ -232,15 +229,6 @@ mac {
|
||||
CONFIG += zim_support
|
||||
!CONFIG( no_chinese_conversion_support ) {
|
||||
CONFIG += chinese_conversion_support
|
||||
- CONFIG( x86 ) {
|
||||
- QMAKE_POST_LINK += & mkdir -p GoldenDict.app/Contents/MacOS/opencc & \
|
||||
- cp -R $${PWD}/opencc/*.json GoldenDict.app/Contents/MacOS/opencc/ & \
|
||||
- cp -R $${PWD}/opencc/*.ocd GoldenDict.app/Contents/MacOS/opencc/
|
||||
- } else {
|
||||
- QMAKE_POST_LINK += & mkdir -p GoldenDict.app/Contents/MacOS/opencc & \
|
||||
- cp -R $${PWD}/opencc/x64/*.json GoldenDict.app/Contents/MacOS/opencc/ & \
|
||||
- cp -R $${PWD}/opencc/x64/*.ocd GoldenDict.app/Contents/MacOS/opencc/
|
||||
- }
|
||||
}
|
||||
}
|
||||
DEFINES += PROGRAM_VERSION=\\\"$$VERSION\\\"
|
||||
diff --git i/tiff.cc w/tiff.cc
|
||||
index e3cb8bf..9ff880f 100644
|
||||
--- i/tiff.cc
|
||||
+++ w/tiff.cc
|
||||
@@ -6,8 +6,8 @@
|
||||
#include "tiff.hh"
|
||||
|
||||
#if defined (Q_OS_MAC) || defined (Q_OS_WIN)
|
||||
-#include "tiff/tiff.h"
|
||||
-#include "tiff/tiffio.h"
|
||||
+#include "tiff.h"
|
||||
+#include "tiffio.h"
|
||||
#else
|
||||
#include "tiff.h"
|
||||
#include "tiffio.h"
|
|
@ -1,33 +1,68 @@
|
|||
{ mkDerivation, lib, fetchFromGitHub, pkgconfig, libXtst, libvorbis, hunspell
|
||||
, libao, ffmpeg, libeb, lzo, xz, libtiff, opencc
|
||||
, qtbase, qtsvg, qtwebkit, qtx11extras, qttools, qmake }:
|
||||
mkDerivation {
|
||||
{ stdenv, mkDerivation, fetchFromGitHub, pkgconfig
|
||||
, libXtst, libvorbis, hunspell, lzo, xz, bzip2, libiconv
|
||||
, qtbase, qtsvg, qtwebkit, qtx11extras, qttools, qmake
|
||||
, withCC ? true, opencc
|
||||
, withEpwing ? true, libeb
|
||||
, withExtraTiff ? true, libtiff
|
||||
, withFFmpeg ? true, libao, ffmpeg
|
||||
, withMultimedia ? true
|
||||
, withZim ? true }:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "goldendict";
|
||||
version = "2020-01-09";
|
||||
|
||||
name = "goldendict-2019-08-01";
|
||||
src = fetchFromGitHub {
|
||||
owner = "goldendict";
|
||||
repo = "goldendict";
|
||||
rev = "0f951b06a55f3a201891cf645a556e773bda5f52";
|
||||
sha256 = "1d1hn95vhvsmbq9q96l5adn90g0hg25dl01knb4y4v6v9x4yrl2x";
|
||||
repo = pname;
|
||||
rev = "da197ff5cd0e7326124c9240a1853a0e8b1de439";
|
||||
sha256 = "0dlzwjh9wg4bzhhib71jycpp21qw762ww63a37dd50z1ymi61lxc";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./0001-dont-check-for-updates.patch
|
||||
] ++ stdenv.lib.optionals stdenv.isDarwin [
|
||||
./0001-dont-use-maclibs.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace goldendict.pro \
|
||||
--replace "hunspell-1.6.1" "hunspell-${stdenv.lib.versions.majorMinor hunspell.version}"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ pkgconfig qmake ];
|
||||
buildInputs = [
|
||||
qtbase qtsvg qtwebkit qtx11extras qttools
|
||||
libXtst libvorbis hunspell libao ffmpeg libeb lzo xz libtiff opencc
|
||||
];
|
||||
qtbase qtsvg qtwebkit qttools
|
||||
libvorbis hunspell xz lzo
|
||||
] ++ stdenv.lib.optionals stdenv.isLinux [ qtx11extras libXtst ]
|
||||
++ stdenv.lib.optionals stdenv.isDarwin [ bzip2 libiconv ]
|
||||
++ stdenv.lib.optional withCC opencc
|
||||
++ stdenv.lib.optional withEpwing libeb
|
||||
++ stdenv.lib.optional withExtraTiff libtiff
|
||||
++ stdenv.lib.optionals withFFmpeg [ libao ffmpeg ];
|
||||
|
||||
qmakeFlags = [
|
||||
qmakeFlags = with stdenv.lib; [
|
||||
"goldendict.pro"
|
||||
"CONFIG+=zim_support"
|
||||
"CONFIG+=chinese_conversion_support"
|
||||
(optional withCC "CONFIG+=chinese_conversion_support")
|
||||
(optional (!withCC) "CONFIG+=no_chinese_conversion_support")
|
||||
(optional (!withEpwing) "CONFIG+=no_epwing_support")
|
||||
(optional (!withExtraTiff) "CONFIG+=no_extra_tiff_handler")
|
||||
(optional (!withFFmpeg) "CONFIG+=no_ffmpeg_player")
|
||||
(optional (!withMultimedia)"CONFIG+=no_qtmultimedia_player")
|
||||
(optional withZim "CONFIG+=zim_support")
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = http://goldendict.org/;
|
||||
postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
mkdir -p $out/Applications
|
||||
mv GoldenDict.app $out/Applications
|
||||
wrapQtApp $out/Applications/GoldenDict.app/Contents/MacOS/GoldenDict
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "http://goldendict.org/";
|
||||
description = "A feature-rich dictionary lookup program";
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ gebner astsmtl ];
|
||||
platforms = with platforms; linux ++ darwin;
|
||||
maintainers = with maintainers; [ gebner astsmtl sikmir ];
|
||||
license = licenses.gpl3Plus;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
mkDerivation rec {
|
||||
pname = "gpxsee";
|
||||
version = "7.20";
|
||||
version = "7.22";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tumic0";
|
||||
repo = "GPXSee";
|
||||
rev = version;
|
||||
sha256 = "08scvhhdadzz9iydhpkn2k618bgw26z09y6nydi3hi8fc3xfnb8d";
|
||||
sha256 = "0gxkx255d8cn5076ync731cdygwvi95rxv463pd4rdw5srbr0gm5";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ qmake ];
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
|
||||
mkDerivation rec {
|
||||
pname = "latte-dock";
|
||||
version = "0.9.7";
|
||||
version = "0.9.8.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://download.kde.org/stable/${pname}/${pname}-${version}.tar.xz";
|
||||
sha256 = "1b8yz6r6x46xajx900m8s0sjfwiwbpp6nfb780ygfcz6inb1234q";
|
||||
sha256 = "10x5aplkjyi2w0793whjjzi777ffh3m4d0sp06qzkpx8jqd46him";
|
||||
name = "${pname}-${version}.tar.xz";
|
||||
};
|
||||
|
||||
|
|
|
@ -4,13 +4,13 @@ with stdenv.lib;
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "nnn";
|
||||
version = "2.9";
|
||||
version = "3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jarun";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "1pifrcrc8fh85b8h8x01hih9wfclb95sf38s443bs3gip1zdrlk3";
|
||||
sha256 = "0kmfg61v3xnf8m4m9nna28sr7hdwqbxwivc7j91zhfj2wpdswywp";
|
||||
};
|
||||
|
||||
configFile = optionalString (conf != null) (builtins.toFile "nnn.h" conf);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchFromGitHub, octoprint, python2Packages, marlin-calc }:
|
||||
{ stdenv, fetchgit, fetchFromGitHub, octoprint, python2Packages, marlin-calc }:
|
||||
|
||||
let
|
||||
buildPlugin = args: python2Packages.buildPythonPackage (args // {
|
||||
|
@ -168,13 +168,13 @@ let
|
|||
|
||||
printtimegenius = buildPlugin rec {
|
||||
pname = "PrintTimeGenius";
|
||||
version = "2.0.2";
|
||||
version = "2.2.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "eyal0";
|
||||
repo = "OctoPrint-${pname}";
|
||||
rev = version;
|
||||
sha256 = "1w4jm42434x87sbih45brkb9krik851vxkz153w3w5c8p74kgg6f";
|
||||
sha256 = "1dr93vbpxgxw3b1q4rwam8f4dmiwr5vnfr9796g6jx8xkpfzzy1h";
|
||||
};
|
||||
|
||||
preConfigure = ''
|
||||
|
@ -183,6 +183,10 @@ let
|
|||
sed 's@"{}.{}".format(binary_base_name, machine)@"${marlin-calc}/bin/marlin-calc"@' -i */analyzers/analyze_progress.py
|
||||
'';
|
||||
|
||||
patches = [
|
||||
./printtimegenius-logging.patch
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Better print time estimation for OctoPrint";
|
||||
homepage = "https://github.com/eyal0/OctoPrint-PrintTimeGenius";
|
||||
|
@ -191,6 +195,61 @@ let
|
|||
};
|
||||
};
|
||||
|
||||
abl-expert = buildPlugin rec {
|
||||
pname = "ABL_Expert";
|
||||
version = "2019-12-21";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://framagit.org/razer/Octoprint_ABL_Expert/";
|
||||
rev = "f11fbe05088ad618bfd9d064ac3881faec223f33";
|
||||
sha256 = "026r4prkyvwzxag5pv36455q7s3gaig37nmr2nbvhwq3d2lbi5s4";
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Marlin auto bed leveling control, mesh correction, and z probe handling";
|
||||
homepage = "https://framagit.org/razer/Octoprint_ABL_Expert/";
|
||||
license = licenses.agpl3;
|
||||
maintainers = with maintainers; [ WhittlesJr ];
|
||||
};
|
||||
};
|
||||
|
||||
gcodeeditor = buildPlugin rec {
|
||||
pname = "GcodeEditor";
|
||||
version = "0.2.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ieatacid";
|
||||
repo = "OctoPrint-${pname}";
|
||||
rev = version;
|
||||
sha256 = "0c6p78r3vd6ys3kld308pyln09zjbr9yif1ljvcx6wlml2i5l1vh";
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Edit gcode on OctoPrint";
|
||||
homepage = "https://github.com/Sebclem/OctoPrint-SimpleEmergencyStop";
|
||||
license = licenses.agpl3;
|
||||
maintainers = with maintainers; [ WhittlesJr ];
|
||||
};
|
||||
};
|
||||
|
||||
simpleemergencystop = buildPlugin rec {
|
||||
pname = "SimpleEmergencyStop";
|
||||
version = "0.2.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Sebclem";
|
||||
repo = "OctoPrint-${pname}";
|
||||
rev = version;
|
||||
sha256 = "10wadv09wv2h96igvq3byw9hz1si82n3c7v5y0ii3j7hm2d06y8p";
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A simple plugin that add an emergency stop buton on NavBar of OctoPrint";
|
||||
homepage = "https://github.com/ieatacid/OctoPrint-GcodeEditor";
|
||||
license = licenses.agpl3;
|
||||
maintainers = with maintainers; [ WhittlesJr ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
in self
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
diff --git a/setup.py b/setup.py
|
||||
index 6a6610e..cc45902 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -35,9 +35,9 @@ plugin_license = "AGPLv3"
|
||||
# Any additional requirements besides OctoPrint should be listed here
|
||||
# For now, require the working release, which is only 1.3.9rc1.
|
||||
plugin_requires = ["OctoPrint>=1.3.9rc1", "psutil", "sarge"]
|
||||
-from sys import version_info
|
||||
-if version_info[0] < 3:
|
||||
- plugin_requires.append("logging")
|
||||
+#from sys import version_info
|
||||
+#if version_info[0] < 3:
|
||||
+# plugin_requires.append("logging")
|
||||
|
||||
### --------------------------------------------------------------------------------------------------------------------
|
||||
### More advanced options that you usually shouldn't have to touch follow after this point
|
|
@ -11,6 +11,9 @@ rustPlatform.buildRustPackage rec {
|
|||
sha256 = "1c47bph1qraq3g0g5bp23jqlz7qdn4f8vh264y937jz17avvacx5";
|
||||
};
|
||||
|
||||
# Delete this on next update; see #79975 for details
|
||||
legacyCargoFetcher = true;
|
||||
|
||||
cargoSha256 = "1pfhwqj9kxm9p0mpdw7qyvivgby2bmah05kavf0a5zhzvq4v4sg0";
|
||||
|
||||
buildInputs = stdenv.lib.optional stdenv.isDarwin Security;
|
||||
|
|
|
@ -13,6 +13,9 @@ rustPlatform.buildRustPackage rec {
|
|||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
# Delete this on next update; see #79975 for details
|
||||
legacyCargoFetcher = true;
|
||||
|
||||
cargoSha256 = "1y33n0dmrssv35l0apfq1mchyh92cfbzjarh0m8zb2nxwhvk7paw";
|
||||
|
||||
postInstall = ''
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
, makeWrapper, perlPackages, mkDerivation }:
|
||||
|
||||
let
|
||||
version = "1.6";
|
||||
version = "1.6.1";
|
||||
in mkDerivation rec {
|
||||
pname = "qdirstat";
|
||||
inherit version;
|
||||
|
@ -12,7 +12,7 @@ in mkDerivation rec {
|
|||
owner = "shundhammer";
|
||||
repo = "qdirstat";
|
||||
rev = version;
|
||||
sha256 = "0q4ccjmlbqifg251kyxwys8wspdskr8scqhacyfrs9cmnjxcjqan";
|
||||
sha256 = "0q77a347qv1aka6sni6l03zh5jzyy9s74aygg554r73g01kxczpb";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ qmake makeWrapper ];
|
||||
|
|
|
@ -7,7 +7,7 @@ mkDerivation rec {
|
|||
version = "1.8.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://bitbucket.org/maproom/qlandkarte-gt/downloads/${pname}-${version}.tar.gz";
|
||||
url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
|
||||
sha256 = "1rwv5ar5jv15g1cc6pp0lk69q3ip10pjazsh3ds2ggaciymha1ly";
|
||||
};
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ stdenv.mkDerivation rec {
|
|||
version = "0.3.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://bitbucket.org/maproom/qlandkarte-gt/downloads/${pname}-${version}.tar.gz";
|
||||
url = "mirror://sourceforge/qlandkartegt/${pname}-${version}.tar.gz";
|
||||
sha256 = "1mc7rxdn9790pgbvz02xzipxp2dp9h4hfq87xgawa18sp9jqzhw6";
|
||||
};
|
||||
|
||||
|
|
|
@ -11,6 +11,9 @@ rustPlatform.buildRustPackage rec {
|
|||
sha256 = "1i93qkz6d8sbk78i4rvx099hnn4lklp4cjvanpm9ssv8na4rqvh2";
|
||||
};
|
||||
|
||||
# Delete this on next update; see #79975 for details
|
||||
legacyCargoFetcher = true;
|
||||
|
||||
cargoSha256 = "03mhlp5hi3nlybb9dkwf1gxgsg056mjq2zsxnb5qh8pdxw7fmdxk";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
|
|
@ -2,20 +2,20 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "urxvt-perls";
|
||||
version = "2.2";
|
||||
version = "2.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "muennich";
|
||||
repo = "urxvt-perls";
|
||||
rev = version;
|
||||
sha256 = "1cb0jbjmwfy2dlq2ny8wpc04k79jp3pz9qhbmgagsxs3sp1jg2hz";
|
||||
sha256 = "0xvwfw7965ghhd9g6rl6y6fgpd444l46rjqmlgg0rfjypbh6c0p1";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib/urxvt/perl
|
||||
cp clipboard \
|
||||
keyboard-select \
|
||||
url-select \
|
||||
cp keyboard-select $out/lib/urxvt/perl
|
||||
cp deprecated/clipboard \
|
||||
deprecated/url-select \
|
||||
$out/lib/urxvt/perl
|
||||
'';
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
stdenv.mkDerivation {
|
||||
|
||||
name = "rxvt_unicode-vtwheel-0.3.2";
|
||||
name = "rxvt-unicode-vtwheel-0.3.2";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://aur.archlinux.org/urxvt-vtwheel.git";
|
||||
|
@ -24,4 +24,4 @@ stdenv.mkDerivation {
|
|||
platforms = with platforms; unix;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
|
97
pkgs/applications/misc/synergy/build-tests.patch
Normal file
97
pkgs/applications/misc/synergy/build-tests.patch
Normal file
|
@ -0,0 +1,97 @@
|
|||
From 9c2278dad498b8e4040f30c80cf65b3a089ba218 Mon Sep 17 00:00:00 2001
|
||||
From: talyz <kim.lindberger@gmail.com>
|
||||
Date: Fri, 14 Feb 2020 16:26:36 +0100
|
||||
Subject: [PATCH] Build tests again
|
||||
|
||||
The tests were accidentally disabled in
|
||||
688095d0a7d22704b5c3282bc68b41ceca42ab7e. Since then, the code has
|
||||
drifted slightly: the synergy lib has been renamed from synergy to
|
||||
synlib in 4263fd17177d7717b04ac6d6ec62efa2f657ed74 and the curl
|
||||
dependency was dropped in 491bb2de000245a943b8298462c4a9d8f34c9a44.
|
||||
|
||||
This reenables the tests, targets the right lib and removes the
|
||||
obsolete test.
|
||||
---
|
||||
src/CMakeLists.txt | 2 +
|
||||
src/test/integtests/CMakeLists.txt | 2 +-
|
||||
.../integtests/arch/ArchInternetTests.cpp | 37 -------------------
|
||||
src/test/unittests/CMakeLists.txt | 2 +-
|
||||
4 files changed, 4 insertions(+), 39 deletions(-)
|
||||
delete mode 100644 src/test/integtests/arch/ArchInternetTests.cpp
|
||||
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index ab63a066..fee080ab 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -22,3 +22,5 @@ add_subdirectory(cmd)
|
||||
if (SYNERGY_BUILD_LEGACY_GUI)
|
||||
add_subdirectory(gui)
|
||||
endif (SYNERGY_BUILD_LEGACY_GUI)
|
||||
+
|
||||
+add_subdirectory(test)
|
||||
diff --git a/src/test/integtests/CMakeLists.txt b/src/test/integtests/CMakeLists.txt
|
||||
index f39968a3..096ba3d5 100644
|
||||
--- a/src/test/integtests/CMakeLists.txt
|
||||
+++ b/src/test/integtests/CMakeLists.txt
|
||||
@@ -68,4 +68,4 @@ endif()
|
||||
|
||||
add_executable(integtests ${sources})
|
||||
target_link_libraries(integtests
|
||||
- arch base client common io ipc mt net platform server synergy gtest gmock ${libs} ${OPENSSL_LIBS})
|
||||
+ arch base client common io ipc mt net platform server synlib gtest gmock ${libs} ${OPENSSL_LIBS})
|
||||
diff --git a/src/test/integtests/arch/ArchInternetTests.cpp b/src/test/integtests/arch/ArchInternetTests.cpp
|
||||
deleted file mode 100644
|
||||
index 95823e9f..00000000
|
||||
--- a/src/test/integtests/arch/ArchInternetTests.cpp
|
||||
+++ /dev/null
|
||||
@@ -1,37 +0,0 @@
|
||||
-/*
|
||||
- * synergy -- mouse and keyboard sharing utility
|
||||
- * Copyright (C) 2014-2016 Symless Ltd.
|
||||
- *
|
||||
- * This package is free software; you can redistribute it and/or
|
||||
- * modify it under the terms of the GNU General Public License
|
||||
- * found in the file LICENSE that should have accompanied this file.
|
||||
- *
|
||||
- * This package is distributed in the hope that it will be useful,
|
||||
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
- * GNU General Public License for more details.
|
||||
- *
|
||||
- * You should have received a copy of the GNU General Public License
|
||||
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
- */
|
||||
-
|
||||
-#include "arch/Arch.h"
|
||||
-
|
||||
-#include "test/global/gtest.h"
|
||||
-
|
||||
-#define TEST_URL "https://symless.com/tests/?testString"
|
||||
-//#define TEST_URL "http://localhost/synergy/tests/?testString"
|
||||
-
|
||||
-TEST(ArchInternetTests, get)
|
||||
-{
|
||||
- ARCH_INTERNET internet;
|
||||
- String result = internet.get(TEST_URL);
|
||||
- ASSERT_EQ("Hello world!", result);
|
||||
-}
|
||||
-
|
||||
-TEST(ArchInternetTests, urlEncode)
|
||||
-{
|
||||
- ARCH_INTERNET internet;
|
||||
- String result = internet.urlEncode("hello=+&world");
|
||||
- ASSERT_EQ("hello%3D%2B%26world", result);
|
||||
-}
|
||||
diff --git a/src/test/unittests/CMakeLists.txt b/src/test/unittests/CMakeLists.txt
|
||||
index 54131eb2..46307e90 100644
|
||||
--- a/src/test/unittests/CMakeLists.txt
|
||||
+++ b/src/test/unittests/CMakeLists.txt
|
||||
@@ -68,4 +68,4 @@ endif()
|
||||
|
||||
add_executable(unittests ${sources})
|
||||
target_link_libraries(unittests
|
||||
- arch base client server common io net platform server synergy mt ipc gtest gmock shared ${libs} ${OPENSSL_LIBS})
|
||||
+ arch base client server common io net platform server synlib mt ipc gtest gmock shared ${libs} ${OPENSSL_LIBS})
|
||||
--
|
||||
2.25.0
|
||||
|
|
@ -1,81 +1,69 @@
|
|||
{ stdenv, lib, fetchFromGitHub, fetchpatch, fetchurl, cmake, xlibsWrapper
|
||||
{ stdenv, lib, fetchFromGitHub, cmake, avahi-compat
|
||||
, ApplicationServices, Carbon, Cocoa, CoreServices, ScreenSaver
|
||||
, libX11, libXi, libXtst, libXrandr, xinput, curl, openssl, unzip }:
|
||||
, xlibsWrapper, libX11, libXi, libXtst, libXrandr, xinput, openssl
|
||||
, withGUI ? true, wrapQtAppsHook }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "synergy";
|
||||
version = "1.8.8";
|
||||
version = "1.11.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "symless";
|
||||
repo = "synergy-core";
|
||||
rev = "v${version}-stable";
|
||||
sha256 = "0ksgr9hkf09h54572p7k7b9zkfhcdb2g2d5x7ixxn028y8i3jyp3";
|
||||
rev = "${version}-stable";
|
||||
sha256 = "1jk60xw4h6s5crha89wk4y8rrf1f3bixgh5mzh3cq3xyrkba41gh";
|
||||
};
|
||||
|
||||
patches = [./openssl-1.1.patch ./update_gtest_gmock.patch
|
||||
] ++ lib.optional stdenv.isDarwin ./respect_macos_arch.patch;
|
||||
patches = [ ./build-tests.patch
|
||||
] ++ lib.optional stdenv.isDarwin ./macos_build_fix.patch;
|
||||
|
||||
patch_gcc6 = fetchpatch {
|
||||
url = https://raw.githubusercontent.com/gentoo/gentoo/20e2bff3697ebf5f291e9907b34aae3074a36b53/dev-cpp/gmock/files/gmock-1.7.0-gcc6.patch;
|
||||
sha256 = "0j3f381x1lf8qci9pfv6mliggl8qs2w05v5lw3rs3gn7aibg174d";
|
||||
};
|
||||
|
||||
# Due to the included gtest and gmock not supporting clang
|
||||
# we replace it with 1.7.0 for synergy-1.8.8. This should
|
||||
# become unnecessary when we update to a newer version of Synergy.
|
||||
gmock_zip = fetchurl {
|
||||
url = https://github.com/google/googlemock/archive/release-1.7.0.zip;
|
||||
sha256 = "11bd04098rzamv7f9y01zaf9c8zrmzdk6g1qrlwq780pxzlr4ya0";
|
||||
};
|
||||
|
||||
gtest_zip = fetchurl {
|
||||
url = https://github.com/google/googletest/archive/release-1.7.0.zip;
|
||||
sha256 = "1l5n6kzdypjzjrz2jh14ylzrx735lccfx2p3s4ccgci8g9abg35m";
|
||||
# Since the included gtest and gmock don't support clang and the
|
||||
# segfault when built with gcc9, we replace it with 1.10.0 for
|
||||
# synergy-1.11.0. This should become unnecessary when upstream
|
||||
# updates these dependencies.
|
||||
googletest = fetchFromGitHub {
|
||||
owner = "google";
|
||||
repo = "googletest";
|
||||
rev = "release-1.10.0";
|
||||
sha256 = "1zbmab9295scgg4z2vclgfgjchfjailjnvzc6f5x9jvlsdi3dpwz";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
${unzip}/bin/unzip -d ext/ ${gmock_zip}
|
||||
${unzip}/bin/unzip -d ext/ ${gtest_zip}
|
||||
mv ext/googlemock-release-1.7.0 ext/gmock-1.7.0
|
||||
mv ext/googletest-release-1.7.0 ext/gtest-1.7.0
|
||||
patch -d ext/gmock-1.7.0 -p1 -i ${patch_gcc6}
|
||||
''
|
||||
# We have XRRNotifyEvent (libXrandr), but with the upstream CMakeLists.txt
|
||||
# it's not able to find it (it's trying to search the store path of libX11
|
||||
# instead) and we don't get XRandR support, even though the CMake output
|
||||
# _seems_ to say so:
|
||||
#
|
||||
# Looking for XRRQueryExtension in Xrandr - found
|
||||
#
|
||||
# The relevant part however is:
|
||||
#
|
||||
# Looking for XRRNotifyEvent - not found
|
||||
#
|
||||
# So let's force it:
|
||||
+ lib.optionalString stdenv.isLinux ''
|
||||
sed -i -e '/HAVE_X11_EXTENSIONS_XRANDR_H/c \
|
||||
set(HAVE_X11_EXTENSIONS_XRANDR_H true)
|
||||
' CMakeLists.txt
|
||||
rm -r ext/*
|
||||
cp -r ${googletest}/googlemock ext/gmock/
|
||||
cp -r ${googletest}/googletest ext/gtest/
|
||||
chmod -R +w ext/
|
||||
'';
|
||||
|
||||
cmakeFlags = lib.optionals stdenv.isDarwin [ "-DOSX_TARGET_MAJOR=10" "-DOSX_TARGET_MINOR=7" ];
|
||||
cmakeFlags = lib.optionals stdenv.isDarwin [
|
||||
"-DOSX_TARGET_MAJOR=10"
|
||||
"-DOSX_TARGET_MINOR=7"
|
||||
] ++ lib.optional (!withGUI) "-DSYNERGY_BUILD_LEGACY_GUI=OFF";
|
||||
|
||||
nativeBuildInputs = [ cmake ] ++ lib.optional withGUI wrapQtAppsHook;
|
||||
|
||||
dontWrapQtApps = true;
|
||||
|
||||
buildInputs = [
|
||||
cmake curl openssl
|
||||
openssl avahi-compat
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
ApplicationServices Carbon Cocoa CoreServices ScreenSaver
|
||||
] ++ lib.optionals stdenv.isLinux [ xlibsWrapper libX11 libXi libXtst libXrandr xinput ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp ../bin/synergyc $out/bin
|
||||
cp ../bin/synergys $out/bin
|
||||
cp ../bin/synergyd $out/bin
|
||||
cp bin/{synergyc,synergys,synergyd,syntool} $out/bin/
|
||||
'' + lib.optionalString withGUI ''
|
||||
cp bin/synergy $out/bin/
|
||||
wrapQtApp $out/bin/synergy --prefix PATH : ${lib.makeBinPath [ openssl ]}
|
||||
mkdir -p $out/share/icons/hicolor/scalable/apps
|
||||
cp ../res/synergy.svg $out/share/icons/hicolor/scalable/apps/
|
||||
mkdir -p $out/share/applications
|
||||
substitute ../res/synergy.desktop $out/share/applications/synergy.desktop --replace /usr/bin $out/bin
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
checkPhase = "../bin/unittests";
|
||||
checkPhase = "bin/unittests";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Share one mouse and keyboard between multiple computers";
|
||||
|
|
29
pkgs/applications/misc/synergy/macos_build_fix.patch
Normal file
29
pkgs/applications/misc/synergy/macos_build_fix.patch
Normal file
|
@ -0,0 +1,29 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index a2297311..25a51f56 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -138,7 +138,7 @@ if (UNIX)
|
||||
|
||||
|
||||
if (APPLE)
|
||||
- set (CMAKE_CXX_FLAGS "--sysroot ${CMAKE_OSX_SYSROOT} ${CMAKE_CXX_FLAGS} -DGTEST_USE_OWN_TR1_TUPLE=1")
|
||||
+ set (CMAKE_CXX_FLAGS "--sysroot ${CMAKE_OSX_SYSROOT} ${CMAKE_CXX_FLAGS}")
|
||||
|
||||
find_library (lib_ScreenSaver ScreenSaver)
|
||||
find_library (lib_IOKit IOKit)
|
||||
@@ -292,14 +292,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||
${OPENSSL_ROOT}/lib/libssl.lib
|
||||
${OPENSSL_ROOT}/lib/libcrypto.lib
|
||||
)
|
||||
-elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
- set (OPENSSL_ROOT /usr/local/opt/openssl)
|
||||
- include_directories (BEFORE SYSTEM ${OPENSSL_ROOT}/include)
|
||||
- set (OPENSSL_LIBS
|
||||
- ${OPENSSL_ROOT}/lib/libssl.a
|
||||
- ${OPENSSL_ROOT}/lib/libcrypto.a
|
||||
- )
|
||||
-elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
+elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
set (OPENSSL_LIBS ssl crypto)
|
||||
else()
|
||||
message (FATAL_ERROR "Couldn't find OpenSSL")
|
|
@ -1,18 +0,0 @@
|
|||
--- a/src/lib/net/SecureSocket.cpp 2017-07-22 19:33:22.442645291 +0200
|
||||
+++ b/src/lib/net/SecureSocket.cpp 2017-07-22 19:36:25.632595581 +0200
|
||||
@@ -805,9 +805,14 @@
|
||||
showCipherStackDesc(sStack);
|
||||
}
|
||||
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
// m_ssl->m_ssl->session->ciphers is not forward compatable, In future release
|
||||
- // of OpenSSL, it's not visible, need to use SSL_get_client_ciphers() instead
|
||||
+ // of OpenSSL, it's not visible
|
||||
STACK_OF(SSL_CIPHER) * cStack = m_ssl->m_ssl->session->ciphers;
|
||||
+#else
|
||||
+ // Use SSL_get_client_ciphers() for newer versions
|
||||
+ STACK_OF(SSL_CIPHER) * cStack = SSL_get_client_ciphers(m_ssl->m_ssl);
|
||||
+#endif
|
||||
if (cStack == NULL) {
|
||||
LOG((CLOG_DEBUG1 "remote cipher list not available"));
|
||||
}
|
|
@ -1,61 +0,0 @@
|
|||
From 944177c76d4c7ff5ef3460eab28286a45344a0e7 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Hoang <enzime@users.noreply.github.com>
|
||||
Date: Sat, 14 Jul 2018 21:56:59 +1000
|
||||
Subject: [PATCH 2/2] Make sure CMake respects the current arch on macOS
|
||||
|
||||
Only set the macOS architecture if not defined by the user. Use the
|
||||
OpenSSL libraries and headers from Nix on macOS to prevent architecture
|
||||
mismatches.
|
||||
---
|
||||
CMakeLists.txt | 2 +-
|
||||
src/CMakeLists.txt | 14 +-------------
|
||||
2 files changed, 2 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 2f37424d..c7217e28 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -172,7 +172,7 @@ if (UNIX)
|
||||
# <= 10.5: 32-bit Intel and PowerPC
|
||||
set(CMAKE_OSX_ARCHITECTURES "ppc;i386"
|
||||
CACHE STRING "" FORCE)
|
||||
- else()
|
||||
+ elseif (NOT CMAKE_OSX_ARCHITECTURES)
|
||||
# >= 10.6: Intel only
|
||||
set(CMAKE_OSX_ARCHITECTURES "i386"
|
||||
CACHE STRING "" FORCE)
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 237ba484..04428636 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -23,11 +23,6 @@ if (WIN32)
|
||||
set(OPENSSL_INCLUDE ${CMAKE_SOURCE_DIR}/ext/${OPENSSL_PLAT_DIR}/inc32)
|
||||
endif()
|
||||
|
||||
-if (APPLE)
|
||||
- set(OPENSSL_PLAT_DIR openssl-osx)
|
||||
- set(OPENSSL_INCLUDE ${CMAKE_SOURCE_DIR}/ext/${OPENSSL_PLAT_DIR}/include)
|
||||
-endif()
|
||||
-
|
||||
if (WIN32)
|
||||
set(OPENSSL_LIBS
|
||||
${CMAKE_SOURCE_DIR}/ext/${OPENSSL_PLAT_DIR}/out32dll/libeay32.lib
|
||||
@@ -36,14 +31,7 @@ if (WIN32)
|
||||
endif()
|
||||
|
||||
if (UNIX)
|
||||
- if (APPLE)
|
||||
- set(OPENSSL_LIBS
|
||||
- ${CMAKE_SOURCE_DIR}/ext/${OPENSSL_PLAT_DIR}/libssl.a
|
||||
- ${CMAKE_SOURCE_DIR}/ext/${OPENSSL_PLAT_DIR}/libcrypto.a
|
||||
- )
|
||||
- else()
|
||||
- set(OPENSSL_LIBS ssl crypto)
|
||||
- endif()
|
||||
+ set(OPENSSL_LIBS ssl crypto)
|
||||
endif()
|
||||
|
||||
add_subdirectory(lib)
|
||||
--
|
||||
2.17.1
|
||||
|
|
@ -1,158 +0,0 @@
|
|||
From eea85dbf4bbde545d8cb07d7ee9fbdca3dcf48fd Mon Sep 17 00:00:00 2001
|
||||
From: Michael Hoang <enzime@users.noreply.github.com>
|
||||
Date: Sat, 14 Jul 2018 22:07:39 +1000
|
||||
Subject: [PATCH 1/2] Update gtest and gmock to version 1.7.0
|
||||
|
||||
Fixes compilation under clang on macOS as <tr1/tuple> is now found under
|
||||
<tuple>.
|
||||
---
|
||||
CMakeLists.txt | 2 +-
|
||||
ext/toolchain/commands1.py | 4 ++--
|
||||
src/lib/platform/CMakeLists.txt | 2 +-
|
||||
src/lib/server/CMakeLists.txt | 2 +-
|
||||
src/lib/shared/CMakeLists.txt | 2 +-
|
||||
src/lib/synergy/CMakeLists.txt | 2 +-
|
||||
src/test/CMakeLists.txt | 12 ++++++------
|
||||
src/test/integtests/CMakeLists.txt | 4 ++--
|
||||
src/test/unittests/CMakeLists.txt | 4 ++--
|
||||
9 files changed, 17 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 94c474e8..2f37424d 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -178,7 +178,7 @@ if (UNIX)
|
||||
CACHE STRING "" FORCE)
|
||||
endif()
|
||||
|
||||
- set(CMAKE_CXX_FLAGS "--sysroot ${CMAKE_OSX_SYSROOT} ${CMAKE_CXX_FLAGS} -DGTEST_USE_OWN_TR1_TUPLE=1")
|
||||
+ set(CMAKE_CXX_FLAGS "--sysroot ${CMAKE_OSX_SYSROOT} ${CMAKE_CXX_FLAGS}")
|
||||
|
||||
find_library(lib_ScreenSaver ScreenSaver)
|
||||
find_library(lib_IOKit IOKit)
|
||||
diff --git a/ext/toolchain/commands1.py b/ext/toolchain/commands1.py
|
||||
index f32ec483..bf997cf6 100644
|
||||
--- a/ext/toolchain/commands1.py
|
||||
+++ b/ext/toolchain/commands1.py
|
||||
@@ -251,10 +251,10 @@ class InternalCommands:
|
||||
macIdentity = None
|
||||
|
||||
# gtest dir with version number
|
||||
- gtestDir = 'gtest-1.6.0'
|
||||
+ gtestDir = 'gtest-1.7.0'
|
||||
|
||||
# gmock dir with version number
|
||||
- gmockDir = 'gmock-1.6.0'
|
||||
+ gmockDir = 'gmock-1.7.0'
|
||||
|
||||
win32_generators = {
|
||||
1 : VisualStudioGenerator('10'),
|
||||
diff --git a/src/lib/platform/CMakeLists.txt b/src/lib/platform/CMakeLists.txt
|
||||
index 481d8ef9..1ce67eca 100644
|
||||
--- a/src/lib/platform/CMakeLists.txt
|
||||
+++ b/src/lib/platform/CMakeLists.txt
|
||||
@@ -31,7 +31,7 @@ endif()
|
||||
|
||||
include_directories(
|
||||
../
|
||||
- ../../../ext/gtest-1.6.0/include
|
||||
+ ../../../ext/gtest-1.7.0/include
|
||||
)
|
||||
|
||||
if (UNIX)
|
||||
diff --git a/src/lib/server/CMakeLists.txt b/src/lib/server/CMakeLists.txt
|
||||
index 3cb582ec..0525d627 100644
|
||||
--- a/src/lib/server/CMakeLists.txt
|
||||
+++ b/src/lib/server/CMakeLists.txt
|
||||
@@ -24,7 +24,7 @@ endif()
|
||||
include_directories(
|
||||
../
|
||||
../../../ext
|
||||
- ../../../ext/gtest-1.6.0/include
|
||||
+ ../../../ext/gtest-1.7.0/include
|
||||
)
|
||||
|
||||
if (UNIX)
|
||||
diff --git a/src/lib/shared/CMakeLists.txt b/src/lib/shared/CMakeLists.txt
|
||||
index 891f4aa7..16c8b04a 100644
|
||||
--- a/src/lib/shared/CMakeLists.txt
|
||||
+++ b/src/lib/shared/CMakeLists.txt
|
||||
@@ -25,7 +25,7 @@ add_library(shared STATIC ${sources})
|
||||
include_directories(
|
||||
../
|
||||
../../../ext
|
||||
- ../../../ext/gtest-1.6.0/include
|
||||
+ ../../../ext/gtest-1.7.0/include
|
||||
)
|
||||
|
||||
target_link_libraries(shared arch base)
|
||||
diff --git a/src/lib/synergy/CMakeLists.txt b/src/lib/synergy/CMakeLists.txt
|
||||
index 0972be8c..e19fcce5 100644
|
||||
--- a/src/lib/synergy/CMakeLists.txt
|
||||
+++ b/src/lib/synergy/CMakeLists.txt
|
||||
@@ -36,7 +36,7 @@ endif()
|
||||
include_directories(
|
||||
../
|
||||
../../../ext
|
||||
- ../../../ext/gtest-1.6.0/include
|
||||
+ ../../../ext/gtest-1.7.0/include
|
||||
)
|
||||
|
||||
if (UNIX)
|
||||
diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt
|
||||
index 8812150a..04cdfc50 100644
|
||||
--- a/src/test/CMakeLists.txt
|
||||
+++ b/src/test/CMakeLists.txt
|
||||
@@ -15,13 +15,13 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
include_directories(
|
||||
- ../../ext/gtest-1.6.0
|
||||
- ../../ext/gtest-1.6.0/include
|
||||
- ../../ext/gmock-1.6.0
|
||||
- ../../ext/gmock-1.6.0/include)
|
||||
+ ../../ext/gtest-1.7.0
|
||||
+ ../../ext/gtest-1.7.0/include
|
||||
+ ../../ext/gmock-1.7.0
|
||||
+ ../../ext/gmock-1.7.0/include)
|
||||
|
||||
-add_library(gtest STATIC ../../ext/gtest-1.6.0/src/gtest-all.cc)
|
||||
-add_library(gmock STATIC ../../ext/gmock-1.6.0/src/gmock-all.cc)
|
||||
+add_library(gtest STATIC ../../ext/gtest-1.7.0/src/gtest-all.cc)
|
||||
+add_library(gmock STATIC ../../ext/gmock-1.7.0/src/gmock-all.cc)
|
||||
|
||||
if (UNIX)
|
||||
# ignore warnings in gtest and gmock
|
||||
diff --git a/src/test/integtests/CMakeLists.txt b/src/test/integtests/CMakeLists.txt
|
||||
index 2f1ca7f3..6ddbd29a 100644
|
||||
--- a/src/test/integtests/CMakeLists.txt
|
||||
+++ b/src/test/integtests/CMakeLists.txt
|
||||
@@ -56,8 +56,8 @@ endif()
|
||||
include_directories(
|
||||
../../
|
||||
../../lib/
|
||||
- ../../../ext/gtest-1.6.0/include
|
||||
- ../../../ext/gmock-1.6.0/include
|
||||
+ ../../../ext/gtest-1.7.0/include
|
||||
+ ../../../ext/gmock-1.7.0/include
|
||||
)
|
||||
|
||||
if (UNIX)
|
||||
diff --git a/src/test/unittests/CMakeLists.txt b/src/test/unittests/CMakeLists.txt
|
||||
index 3e49dc3c..5f6c4fac 100644
|
||||
--- a/src/test/unittests/CMakeLists.txt
|
||||
+++ b/src/test/unittests/CMakeLists.txt
|
||||
@@ -51,8 +51,8 @@ list(APPEND headers ${platform_sources})
|
||||
include_directories(
|
||||
../../
|
||||
../../lib/
|
||||
- ../../../ext/gtest-1.6.0/include
|
||||
- ../../../ext/gmock-1.6.0/include
|
||||
+ ../../../ext/gtest-1.7.0/include
|
||||
+ ../../../ext/gmock-1.7.0/include
|
||||
../../../ext
|
||||
)
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
|
@ -14,6 +14,9 @@ rustPlatform.buildRustPackage rec {
|
|||
buildInputs = [ ncurses openssl ] ++ lib.optional stdenv.isDarwin Security;
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
|
||||
# Delete this on next update; see #79975 for details
|
||||
legacyCargoFetcher = true;
|
||||
|
||||
cargoSha256 = "0h8ybhb17pqhhfjcmq1l70kp8g1yyq38228lcf86byk3r2ar2rkg";
|
||||
|
||||
meta = with lib; {
|
||||
|
|
|
@ -11,6 +11,9 @@ rustPlatform.buildRustPackage rec {
|
|||
sha256 = "1y0v8nkaqb8kn61xwarpbyrq019gxx1f5f5p1hzw73nqxadc1rcm";
|
||||
};
|
||||
|
||||
# Delete this on next update; see #79975 for details
|
||||
legacyCargoFetcher = true;
|
||||
|
||||
cargoSha256 = "0xn5p71qk0ahd2drklja16xwv7zw0797kkzpiv563kffzvd1p8id";
|
||||
|
||||
checkPhase = "cargo test --features=integration_tests";
|
||||
|
|
|
@ -6,13 +6,13 @@
|
|||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "udiskie";
|
||||
version = "1.7.7";
|
||||
version = "2.1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "coldfix";
|
||||
repo = "udiskie";
|
||||
rev = version;
|
||||
sha256 = "1j17z26vy44il2s9zgchvhq280vq8ag64ddi35f35b444wz2azlb";
|
||||
sha256 = "1d8fz0jrnpgldvdwpl27az2kjhpbcjd8nqn3qc2v6682q12p3jqb";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "worker";
|
||||
version = "4.2.0";
|
||||
version = "4.3.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.boomerangsworld.de/cms/worker/downloads/${pname}-${version}.tar.gz";
|
||||
sha256 = "17b845x09q0cfk12hd3f7y08diqrflrr2aj2nwf4szy4f52jk5gz";
|
||||
sha256 = "0s7i1qjnh4mfjyrfvbbr1dklqi0n2nwksls21106q633wk9qdlqx";
|
||||
};
|
||||
|
||||
buildInputs = [ libX11 ];
|
||||
|
|
|
@ -12,6 +12,9 @@ rustPlatform.buildRustPackage rec {
|
|||
};
|
||||
cargoPatches = [ ./cargo-lock.patch ];
|
||||
|
||||
# Delete this on next update; see #79975 for details
|
||||
legacyCargoFetcher = true;
|
||||
|
||||
cargoSha256 = "03rwf5l1l3ap03qi0xqcxsbyvpg3cqmr50j8ql6c5v55xl0ki9w8";
|
||||
|
||||
nativeBuildInputs = [ cmake pkgconfig ];
|
||||
|
|
|
@ -82,11 +82,11 @@ in
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "brave";
|
||||
version = "1.1.23";
|
||||
version = "1.3.115";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/brave/brave-browser/releases/download/v${version}/brave-browser_${version}_amd64.deb";
|
||||
sha256 = "1kb40h5d76k6p338h75p8lxs0cb88jaasss0cmb7bfc7zykfqmd3";
|
||||
sha256 = "1k9g1zjnn0bhyw133padpyym73x8v1i3nm65a040bgkwh6a5jaj8";
|
||||
};
|
||||
|
||||
dontConfigure = true;
|
||||
|
@ -151,7 +151,7 @@ stdenv.mkDerivation rec {
|
|||
contribute to your favorite creators automatically.
|
||||
'';
|
||||
license = licenses.mpl20;
|
||||
maintainers = with maintainers; [ uskudnik rht ];
|
||||
maintainers = with maintainers; [ uskudnik rht jefflabonte ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
# This file is autogenerated from update.sh in the same directory.
|
||||
{
|
||||
beta = {
|
||||
sha256 = "13mcn37nhf44bzaafr4bwmmfkihhfi1bzdd6ba2yzfwsbp56y7zm";
|
||||
sha256bin64 = "08nvmrrglssrxhp9s8bcj479dfhi83nmnjim6cignfhbzqmwpgdl";
|
||||
version = "80.0.3987.87";
|
||||
sha256 = "0vsykl3gaql8fp1h5007ljds8m8q2n6n34dsbcqqav2008zlks61";
|
||||
sha256bin64 = "1bmszzgmzv7hkczs6kcsa2r8vv6nhg39q1sv74695mr3j3j4bdp8";
|
||||
version = "81.0.4044.17";
|
||||
};
|
||||
dev = {
|
||||
sha256 = "173saw11pvz1fgw60hrfm1hnfjq3hk4zri7jpphk0ws7930zkhf4";
|
||||
sha256bin64 = "1g718g0a0m87qkvy0mf1kbhv398iyqks7d9g40cqp5rf1b7yjkw2";
|
||||
version = "81.0.4040.5";
|
||||
sha256 = "0vsykl3gaql8fp1h5007ljds8m8q2n6n34dsbcqqav2008zlks61";
|
||||
sha256bin64 = "0xx4h82w6jklwlk8p2a2qqk2a9vnf004hmgw69i8iwk6l1d9hxfb";
|
||||
version = "81.0.4044.17";
|
||||
};
|
||||
stable = {
|
||||
sha256 = "13mcn37nhf44bzaafr4bwmmfkihhfi1bzdd6ba2yzfwsbp56y7zm";
|
||||
sha256bin64 = "0qdslcl028v0fx8q0n8f5kjkwd8b0z5yz531dbn7wg2dcbp7vq45";
|
||||
version = "80.0.3987.87";
|
||||
sha256 = "10myihiyrgnm0ly41k4h8ayl3vv3cpshs3pshpqaba0l8i5r5b9f";
|
||||
sha256bin64 = "0pd4ygmyinaq22lmaqjqi1gs3svnb863mkhcf85dzm1354iz1g9k";
|
||||
version = "80.0.3987.106";
|
||||
};
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -103,10 +103,6 @@ stdenv.mkDerivation ({
|
|||
sha256 = "1zg56v3lc346fkzcjjx21vjip2s9hb2xw4pvza1dsfdnhsnzppfp";
|
||||
})
|
||||
]
|
||||
++ lib.optional (lib.versionAtLeast ffversion "71") (fetchpatch {
|
||||
url = "https://phabricator.services.mozilla.com/D56873?download=true";
|
||||
sha256 = "183949phd2n27nhiq85a04j4fjn0jxmldic6wcjrczsd8g2rrr5k";
|
||||
})
|
||||
++ patches;
|
||||
|
||||
|
||||
|
|
|
@ -16,10 +16,10 @@ in
|
|||
rec {
|
||||
firefox = common rec {
|
||||
pname = "firefox";
|
||||
ffversion = "72.0.2";
|
||||
ffversion = "73.0";
|
||||
src = fetchurl {
|
||||
url = "mirror://mozilla/firefox/releases/${ffversion}/source/firefox-${ffversion}.source.tar.xz";
|
||||
sha512 = "13l23p2dqsf2cpdzaydqqq4kbxlc5jxggz9r2i49avn4q9bqx036zvsq512q1hk37bz2bwq8zdr0530s44zickinls150xq14kq732d";
|
||||
sha512 = "2da2jn3gwck6qys3ys146jsjl9fgq10s3ii62y4ssnhl76ryir8f1mv9i1d6hyv8381hplasnxb553d5bgwnq87ymgqabakmr48n2p1";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
@ -42,10 +42,10 @@ rec {
|
|||
|
||||
firefox-esr-68 = common rec {
|
||||
pname = "firefox-esr";
|
||||
ffversion = "68.4.2esr";
|
||||
ffversion = "68.5.0esr";
|
||||
src = fetchurl {
|
||||
url = "mirror://mozilla/firefox/releases/${ffversion}/source/firefox-${ffversion}.source.tar.xz";
|
||||
sha512 = "1n7ssx4w5b822bq8zcv6vsy5ph1xjyj9qh6zbnknym5bc0spzk19nrkrpl8a2m26z6xj2lgw1n19gjf4ab6jpfxv3cqq4qwmm0v2fz1";
|
||||
sha512 = "39i05r7r4rh2jvc8v4m2s2i6d33qaa075a1lc8m9gx7s3rw8yxja2c42cv5hq1imr9zc4dldbk88paz6lv1w8rhncm0dkxw8z6lxkqa";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue