Merge master into staging-next

authored by

github-actions[bot] and committed by
GitHub
03a82ba5 b6d5fc29

+437 -249
+78 -78
doc/languages-frameworks/python.section.md
··· 32 33 - `libPrefix`. Name of the folder in `${python}/lib/` for corresponding interpreter. 34 - `interpreter`. Alias for `${python}/bin/${executable}`. 35 - - `buildEnv`. Function to build python interpreter environments with extra packages bundled together. See section *python.buildEnv function* for usage and documentation. 36 - - `withPackages`. Simpler interface to `buildEnv`. See section *python.withPackages function* for usage and documentation. 37 - `sitePackages`. Alias for `lib/${libPrefix}/site-packages`. 38 - `executable`. Name of the interpreter executable, e.g. `python3.10`. 39 - `pkgs`. Set of Python packages for that specific interpreter. The package set can be modified by overriding the interpreter and passing `packageOverrides`. ··· 41 ### Building packages and applications {#building-packages-and-applications} 42 43 Python libraries and applications that use `setuptools` or 44 - `distutils` are typically built with respectively the `buildPythonPackage` and 45 - `buildPythonApplication` functions. These two functions also support installing a `wheel`. 46 47 All Python packages reside in `pkgs/top-level/python-packages.nix` and all 48 applications elsewhere. In case a package is used as both a library and an ··· 141 142 The `buildPythonPackage` mainly does four things: 143 144 - * In the `buildPhase`, it calls `${python.pythonForBuild.interpreter} setup.py bdist_wheel` to 145 build a wheel binary zipfile. 146 - * In the `installPhase`, it installs the wheel file using `pip install *.whl`. 147 - * In the `postFixup` phase, the `wrapPythonPrograms` bash function is called to 148 wrap all programs in the `$out/bin/*` directory to include `$PATH` 149 environment variable and add dependent libraries to script's `sys.path`. 150 - * In the `installCheck` phase, `${python.interpreter} setup.py test` is run. 151 152 - By default tests are run because `doCheck = true`. Test dependencies, like 153 - e.g. the test runner, should be added to `nativeCheckInputs`. 154 155 By default `meta.platforms` is set to the same value 156 as the interpreter unless overridden otherwise. 157 158 ##### `buildPythonPackage` parameters {#buildpythonpackage-parameters} 159 160 - All parameters from `stdenv.mkDerivation` function are still supported. The 161 following are specific to `buildPythonPackage`: 162 163 * `catchConflicts ? true`: If `true`, abort package build if a package name ··· 177 format. When unset, the legacy `setuptools` hooks are used for backwards 178 compatibility. 179 * `makeWrapperArgs ? []`: A list of strings. Arguments to be passed to 180 - `makeWrapper`, which wraps generated binaries. By default, the arguments to 181 - `makeWrapper` set `PATH` and `PYTHONPATH` environment variables before calling 182 the binary. Additional arguments here can allow a developer to set environment 183 variables which will be available when the binary is run. For example, 184 `makeWrapperArgs = ["--set FOO BAR" "--set BAZ QUX"]`. ··· 190 * `pipBuildFlags ? []`: A list of strings. Arguments to be passed to `pip wheel`. 191 * `pypaBuildFlags ? []`: A list of strings. Arguments to be passed to `python -m build --wheel`. 192 * `pythonPath ? []`: List of packages to be added into `$PYTHONPATH`. Packages 193 - in `pythonPath` are not propagated (contrary to `propagatedBuildInputs`). 194 * `preShellHook`: Hook to execute commands before `shellHook`. 195 * `postShellHook`: Hook to execute commands after `shellHook`. 196 * `removeBinByteCode ? true`: Remove bytecode from `/bin`. Bytecode is only ··· 198 * `setupPyGlobalFlags ? []`: List of flags passed to `setup.py` command. 199 * `setupPyBuildFlags ? []`: List of flags passed to `setup.py build_ext` command. 200 201 - The `stdenv.mkDerivation` function accepts various parameters for describing 202 build inputs (see "Specifying dependencies"). The following are of special 203 interest for Python packages, either because these are primarily used, or 204 because their behaviour is different: ··· 208 * `buildInputs ? []`: Build and/or run-time dependencies that need to be 209 compiled for the host machine. Typically non-Python libraries which are being 210 linked. 211 - * `nativeCheckInputs ? []`: Dependencies needed for running the `checkPhase`. These 212 - are added to `nativeBuildInputs` when `doCheck = true`. Items listed in 213 `tests_require` go here. 214 * `propagatedBuildInputs ? []`: Aside from propagating dependencies, 215 `buildPythonPackage` also injects code into and wraps executables with the ··· 266 267 #### `buildPythonApplication` function {#buildpythonapplication-function} 268 269 - The `buildPythonApplication` function is practically the same as 270 - `buildPythonPackage`. The main purpose of this function is to build a Python 271 package where one is interested only in the executables, and not importable 272 - modules. For that reason, when adding this package to a `python.buildEnv`, the 273 modules won't be made available. 274 275 - Another difference is that `buildPythonPackage` by default prefixes the names of 276 the packages with the version of the interpreter. Because this is irrelevant for 277 applications, the prefix is omitted. 278 279 - When packaging a Python application with `buildPythonApplication`, it should be 280 called with `callPackage` and passed `python` or `pythonPackages` (possibly 281 specifying an interpreter version), like this: 282 ··· 329 duplication the `toPythonApplication` can be used to convert a library to an 330 application. 331 332 - The Nix expression shall use `buildPythonPackage` and be called from 333 `python-packages.nix`. A reference shall be created from `all-packages.nix` to 334 the attribute in `python-packages.nix`, and the `toPythonApplication` shall be 335 applied to the reference: ··· 341 #### `toPythonModule` function {#topythonmodule-function} 342 343 In some cases, such as bindings, a package is created using 344 - `stdenv.mkDerivation` and added as attribute in `all-packages.nix`. The Python 345 bindings should be made available from `python-packages.nix`. The 346 `toPythonModule` function takes a derivation and makes certain Python-specific 347 modifications. ··· 407 408 #### `python.withPackages` function {#python.withpackages-function} 409 410 - The `python.withPackages` function provides a simpler interface to the `python.buildEnv` functionality. 411 It takes a function as an argument that is passed the set of python packages and returns the list 412 - of the packages to be included in the environment. Using the `withPackages` function, the previous 413 example for the Pyramid Web Framework environment can be written like this: 414 415 ```nix ··· 418 python.withPackages (ps: [ ps.pyramid ]) 419 ``` 420 421 - `withPackages` passes the correct package set for the specific interpreter 422 version as an argument to the function. In the above example, `ps` equals 423 `pythonPackages`. But you can also easily switch to using python3: 424 ··· 430 431 Now, `ps` is set to `python3Packages`, matching the version of the interpreter. 432 433 - As `python.withPackages` simply uses `python.buildEnv` under the hood, it also 434 supports the `env` attribute. The `shell.nix` file from the previous section can 435 thus be also written like this: 436 ··· 443 ])).env 444 ``` 445 446 - In contrast to `python.buildEnv`, `python.withPackages` does not support the 447 more advanced options such as `ignoreCollisions = true` or `postBuild`. If you 448 - need them, you have to use `python.buildEnv`. 449 450 Python 2 namespace packages may provide `__init__.py` that collide. In that case 451 - `python.buildEnv` should be used with `ignoreCollisions = true`. 452 453 #### Setup hooks {#setup-hooks} 454 455 The following are setup hooks specifically for Python packages. Most of these 456 - are used in `buildPythonPackage`. 457 458 - `eggUnpackhook` to move an egg to the correct folder so it can be installed 459 with the `eggInstallHook` ··· 486 ### Development mode {#development-mode} 487 488 Development or editable mode is supported. To develop Python packages 489 - `buildPythonPackage` has additional logic inside `shellPhase` to run `pip 490 install -e . --prefix $TMPDIR/`for the package. 491 492 Warning: `shellPhase` is executed only if `setup.py` exists. ··· 567 But Python libraries you would like to use for development cannot be installed, 568 at least not individually, because they won't be able to find each other 569 resulting in import errors. Instead, it is possible to create an environment 570 - with `python.buildEnv` or `python.withPackages` where the interpreter and other 571 executables are wrapped to be able to find each other and all of the modules. 572 573 In the following examples we will start by creating a simple, ad-hoc environment ··· 747 imports the `<nixpkgs>` function, `{}` calls it and the `with` statement 748 brings all attributes of `nixpkgs` in the local scope. These attributes form 749 the main package set. 750 - 2. Then we create a Python 3.11 environment with the `withPackages` function, as before. 751 - 3. The `withPackages` function expects us to provide a function as an argument 752 that takes the set of all Python packages and returns a list of packages to 753 include in the environment. Here, we select the packages `numpy` and `toolz` 754 from the package set. ··· 859 #### Python library packages in Nixpkgs {#python-library-packages-in-nixpkgs} 860 861 With Nix all packages are built by functions. The main function in Nix for 862 - building Python libraries is `buildPythonPackage`. Let's see how we can build the 863 `toolz` package. 864 865 ```nix ··· 904 } 905 ``` 906 907 - What happens here? The function `buildPythonPackage` is called and as argument 908 it accepts a set. In this case the set is a recursive set, `rec`. One of the 909 arguments is the name of the package, which consists of a basename (generally 910 following the name on PyPi) and a version. Another argument, `src` specifies the 911 source, which in this case is fetched from PyPI using the helper function 912 `fetchPypi`. The argument `doCheck` is used to set whether tests should be run 913 - when building the package. Since there are no tests, we rely on `pythonImportsCheck` 914 to test whether the package can be imported. Furthermore, we specify some meta 915 information. The output of the function is a derivation. 916 ··· 969 So, what did we do here? Well, we took the Nix expression that we used earlier 970 to build a Python environment, and said that we wanted to include our own 971 version of `toolz`, named `my_toolz`. To introduce our own package in the scope 972 - of `withPackages` we used a `let` expression. You can see that we used 973 `ps.numpy` to select numpy from the nixpkgs package set (`ps`). We did not take 974 `toolz` from the Nixpkgs package set this time, but instead took our own version 975 that we introduced with the `let` expression. ··· 977 #### Handling dependencies {#handling-dependencies} 978 979 Our example, `toolz`, does not have any dependencies on other Python packages or 980 - system libraries. According to the manual, `buildPythonPackage` uses the 981 - arguments `buildInputs` and `propagatedBuildInputs` to specify dependencies. If 982 something is exclusively a build-time dependency, then the dependency should be 983 - included in `buildInputs`, but if it is (also) a runtime dependency, then it 984 - should be added to `propagatedBuildInputs`. Test dependencies are considered 985 - build-time dependencies and passed to `nativeCheckInputs`. 986 987 - The following example shows which arguments are given to `buildPythonPackage` in 988 order to build [`datashape`](https://github.com/blaze/datashape). 989 990 ```nix ··· 1038 ``` 1039 1040 We can see several runtime dependencies, `numpy`, `multipledispatch`, and 1041 - `python-dateutil`. Furthermore, we have `nativeCheckInputs` with `pytest`. 1042 - `pytest` is a test runner and is only used during the `checkPhase` and is 1043 - therefore not added to `propagatedBuildInputs`. 1044 1045 In the previous case we had only dependencies on other Python packages to consider. 1046 Occasionally you have also system libraries to consider. E.g., `lxml` provides 1047 Python bindings to `libxml2` and `libxslt`. These libraries are only required 1048 - when building the bindings and are therefore added as `buildInputs`. 1049 1050 ```nix 1051 { lib ··· 1093 The example below shows bindings to The Fastest Fourier Transform in the West, 1094 commonly known as FFTW. On Nix we have separate packages of FFTW for the 1095 different types of floats (`"single"`, `"double"`, `"long-double"`). The 1096 - bindings need all three types, and therefore we add all three as `buildInputs`. 1097 The bindings don't expect to find each of them in a different folder, and 1098 therefore we have to set `LDFLAGS` and `CFLAGS`. 1099 ··· 1158 } 1159 ``` 1160 1161 - Note also the line `doCheck = false;`, we explicitly disabled running the test-suite. 1162 1163 #### Testing Python Packages {#testing-python-packages} 1164 ··· 1167 but is not usable at runtime. Currently, all packages will use the `test` 1168 command provided by the setup.py (i.e. `python setup.py test`). However, 1169 this is currently deprecated https://github.com/pypa/setuptools/pull/1878 1170 - and your package should provide its own checkPhase. 1171 1172 ::: {.note} 1173 - The `checkPhase` for python maps to the `installCheckPhase` on a 1174 normal derivation. This is due to many python packages not behaving well 1175 to the pre-installed version of the package. Version info, and natively 1176 compiled extensions generally only exist in the install directory, and ··· 1235 #### Using pytestCheckHook {#using-pytestcheckhook} 1236 1237 `pytestCheckHook` is a convenient hook which will substitute the setuptools 1238 - `test` command for a `checkPhase` which runs `pytest`. This is also beneficial 1239 when a package may need many items disabled to run the test suite. 1240 1241 Using the example above, the analogous `pytestCheckHook` usage would be: ··· 1280 ``` 1281 1282 Trying to concatenate the related strings to disable tests in a regular 1283 - `checkPhase` would be much harder to read. This also enables us to comment on 1284 why specific tests are disabled. 1285 1286 #### Using pythonImportsCheck {#using-pythonimportscheck} 1287 1288 Although unit tests are highly preferred to validate correctness of a package, not 1289 all packages have test suites that can be run easily, and some have none at all. 1290 - To help ensure the package still works, `pythonImportsCheck` can attempt to import 1291 the listed modules. 1292 1293 ``` ··· 1306 ''; 1307 ``` 1308 1309 - However, this is done in its own phase, and not dependent on whether `doCheck = true;`. 1310 1311 This can also be useful in verifying that the package doesn't assume commonly 1312 present packages (e.g. `setuptools`). ··· 1378 1379 Keep in mind that while the examples above are done with `requirements.txt`, 1380 `pythonRelaxDepsHook` works by modifying the resulting wheel file, so it should 1381 - work with any of the existing [hooks](#setup-hooks). 1382 1383 #### Using unittestCheckHook {#using-unittestcheckhook} 1384 1385 - `unittestCheckHook` is a hook which will substitute the setuptools `test` command for a `checkPhase` which runs `python -m unittest discover`: 1386 1387 ``` 1388 nativeCheckInputs = [ ··· 1452 In the previous Nix expression the source was fetched from a url. We can also 1453 refer to a local source instead using `src = ./path/to/source/tree;` 1454 1455 - If we create a `shell.nix` file which calls `buildPythonPackage`, and if `src` 1456 is a local source, and if the local source has a `setup.py`, then development 1457 mode is activated. 1458 1459 In the following example, we create a simple environment that has a Python 3.11 1460 version of our package in it, as well as its dependencies and other packages we 1461 - like to have in the environment, all specified with `propagatedBuildInputs`. 1462 Indeed, we can just add any package we like to have in our environment to 1463 - `propagatedBuildInputs`. 1464 1465 ```nix 1466 with import <nixpkgs> {}; ··· 1494 1495 ### Including a derivation using `callPackage` {#including-a-derivation-using-callpackage} 1496 1497 - Earlier we created a Python environment using `withPackages`, and included the 1498 `toolz` package via a `let` expression. 1499 Let's split the package definition from the environment definition. 1500 ··· 1533 } 1534 ``` 1535 1536 - It takes an argument `buildPythonPackage`. We now call this function using 1537 `callPackage` in the definition of our environment 1538 1539 ```nix ··· 1552 ``` 1553 1554 Important to remember is that the Python version for which the package is made 1555 - depends on the `python` derivation that is passed to `buildPythonPackage`. Nix 1556 tries to automatically pass arguments when possible, which is why generally you 1557 don't explicitly define which `python` derivation should be used. In the above 1558 - example we use `buildPythonPackage` that is part of the set `python3Packages`, 1559 and in this case the `python3` interpreter is automatically used. 1560 1561 ## FAQ {#faq} ··· 1698 packages are available. There is therefore no need to maintain a global `site-packages`. 1699 1700 If you want to create a Python environment for development, then the recommended 1701 - method is to use `nix-shell`, either with or without the `python.buildEnv` 1702 function. 1703 1704 ### How to consume Python modules using pip in a virtual environment like I am used to on other Operating Systems? {#how-to-consume-python-modules-using-pip-in-a-virtual-environment-like-i-am-used-to-on-other-operating-systems} ··· 1875 1876 ### How to override a Python package for all Python versions using extensions? {#how-to-override-a-python-package-for-all-python-versions-using-extensions} 1877 1878 - The following overlay overrides the call to `buildPythonPackage` for the 1879 `foo` package for all interpreters by appending a Python extension to the 1880 `pythonPackagesExtensions` list of extensions. 1881 ··· 1902 1903 In a `setup.py` or `setup.cfg` it is common to declare dependencies: 1904 1905 - * `setup_requires` corresponds to `nativeBuildInputs` 1906 - * `install_requires` corresponds to `propagatedBuildInputs` 1907 - * `tests_require` corresponds to `nativeCheckInputs` 1908 1909 ### How to enable interpreter optimizations? {#optimizations} 1910 ··· 1951 1952 ### How to contribute a Python package to nixpkgs? {#tools} 1953 1954 - Packages inside nixpkgs must use the `buildPythonPackage` or `buildPythonApplication` function directly, 1955 because we can only provide security support for non-vendored dependencies. 1956 1957 We recommend [nix-init](https://github.com/nix-community/nix-init) for creating new python packages within nixpkgs, ··· 1965 `nix-shell`. 1966 1967 When the environment variable `DETERMINISTIC_BUILD` is set, all bytecode will 1968 - have timestamp 1. The `buildPythonPackage` function sets `DETERMINISTIC_BUILD=1` 1969 and [PYTHONHASHSEED=0](https://docs.python.org/3.11/using/cmdline.html#envvar-PYTHONHASHSEED). 1970 Both are also exported in `nix-shell`. 1971 ··· 1975 Source distributions (`sdist`) often include test files, but not always. 1976 1977 By default the command `python setup.py test` is run as part of the 1978 - `checkPhase`, but often it is necessary to pass a custom `checkPhase`. An 1979 example of such a situation is when `py.test` is used. 1980 1981 #### Common issues {#common-issues} 1982 1983 - * Non-working tests can often be deselected. By default `buildPythonPackage` 1984 runs `python setup.py test`. which is deprecated. Most Python modules however 1985 do follow the standard test protocol where the pytest runner can be used 1986 instead. `pytest` supports the `-k` and `--ignore` parameters to ignore test ··· 2015 The following rules are desired to be respected: 2016 2017 * Python libraries are called from `python-packages.nix` and packaged with 2018 - `buildPythonPackage`. The expression of a library should be in 2019 `pkgs/development/python-modules/<name>/default.nix`. 2020 * Python applications live outside of `python-packages.nix` and are packaged 2021 - with `buildPythonApplication`. 2022 * Make sure libraries build for all Python interpreters. 2023 * By default we enable tests. Make sure the tests are found and, in the case of 2024 libraries, are passing for all interpreters. If certain tests fail they can be
··· 32 33 - `libPrefix`. Name of the folder in `${python}/lib/` for corresponding interpreter. 34 - `interpreter`. Alias for `${python}/bin/${executable}`. 35 + - `buildEnv`. Function to build python interpreter environments with extra packages bundled together. See [](#python.buildenv-function) for usage and documentation. 36 + - `withPackages`. Simpler interface to `buildEnv`. See [](#python.withpackages-function) for usage and documentation. 37 - `sitePackages`. Alias for `lib/${libPrefix}/site-packages`. 38 - `executable`. Name of the interpreter executable, e.g. `python3.10`. 39 - `pkgs`. Set of Python packages for that specific interpreter. The package set can be modified by overriding the interpreter and passing `packageOverrides`. ··· 41 ### Building packages and applications {#building-packages-and-applications} 42 43 Python libraries and applications that use `setuptools` or 44 + `distutils` are typically built with respectively the [`buildPythonPackage`](#buildpythonpackage-function) and 45 + [`buildPythonApplication`](#buildpythonapplication-function) functions. These two functions also support installing a `wheel`. 46 47 All Python packages reside in `pkgs/top-level/python-packages.nix` and all 48 applications elsewhere. In case a package is used as both a library and an ··· 141 142 The `buildPythonPackage` mainly does four things: 143 144 + * In the [`buildPhase`](#build-phase), it calls `${python.pythonForBuild.interpreter} setup.py bdist_wheel` to 145 build a wheel binary zipfile. 146 + * In the [`installPhase`](#ssec-install-phase), it installs the wheel file using `pip install *.whl`. 147 + * In the [`postFixup`](#var-stdenv-postFixup) phase, the `wrapPythonPrograms` bash function is called to 148 wrap all programs in the `$out/bin/*` directory to include `$PATH` 149 environment variable and add dependent libraries to script's `sys.path`. 150 + * In the [`installCheck`](#ssec-installCheck-phase) phase, `${python.interpreter} setup.py test` is run. 151 152 + By default tests are run because [`doCheck = true`](#var-stdenv-doCheck). Test dependencies, like 153 + e.g. the test runner, should be added to [`nativeCheckInputs`](#var-stdenv-nativeCheckInputs). 154 155 By default `meta.platforms` is set to the same value 156 as the interpreter unless overridden otherwise. 157 158 ##### `buildPythonPackage` parameters {#buildpythonpackage-parameters} 159 160 + All parameters from [`stdenv.mkDerivation`](#sec-using-stdenv) function are still supported. The 161 following are specific to `buildPythonPackage`: 162 163 * `catchConflicts ? true`: If `true`, abort package build if a package name ··· 177 format. When unset, the legacy `setuptools` hooks are used for backwards 178 compatibility. 179 * `makeWrapperArgs ? []`: A list of strings. Arguments to be passed to 180 + [`makeWrapper`](#fun-makeWrapper), which wraps generated binaries. By default, the arguments to 181 + [`makeWrapper`](#fun-makeWrapper) set `PATH` and `PYTHONPATH` environment variables before calling 182 the binary. Additional arguments here can allow a developer to set environment 183 variables which will be available when the binary is run. For example, 184 `makeWrapperArgs = ["--set FOO BAR" "--set BAZ QUX"]`. ··· 190 * `pipBuildFlags ? []`: A list of strings. Arguments to be passed to `pip wheel`. 191 * `pypaBuildFlags ? []`: A list of strings. Arguments to be passed to `python -m build --wheel`. 192 * `pythonPath ? []`: List of packages to be added into `$PYTHONPATH`. Packages 193 + in `pythonPath` are not propagated (contrary to [`propagatedBuildInputs`](#var-stdenv-propagatedBuildInputs)). 194 * `preShellHook`: Hook to execute commands before `shellHook`. 195 * `postShellHook`: Hook to execute commands after `shellHook`. 196 * `removeBinByteCode ? true`: Remove bytecode from `/bin`. Bytecode is only ··· 198 * `setupPyGlobalFlags ? []`: List of flags passed to `setup.py` command. 199 * `setupPyBuildFlags ? []`: List of flags passed to `setup.py build_ext` command. 200 201 + The [`stdenv.mkDerivation`](#sec-using-stdenv) function accepts various parameters for describing 202 build inputs (see "Specifying dependencies"). The following are of special 203 interest for Python packages, either because these are primarily used, or 204 because their behaviour is different: ··· 208 * `buildInputs ? []`: Build and/or run-time dependencies that need to be 209 compiled for the host machine. Typically non-Python libraries which are being 210 linked. 211 + * `nativeCheckInputs ? []`: Dependencies needed for running the [`checkPhase`](#ssec-check-phase). These 212 + are added to [`nativeBuildInputs`](#var-stdenv-nativeBuildInputs) when [`doCheck = true`](#var-stdenv-doCheck). Items listed in 213 `tests_require` go here. 214 * `propagatedBuildInputs ? []`: Aside from propagating dependencies, 215 `buildPythonPackage` also injects code into and wraps executables with the ··· 266 267 #### `buildPythonApplication` function {#buildpythonapplication-function} 268 269 + The [`buildPythonApplication`](#buildpythonapplication-function) function is practically the same as 270 + [`buildPythonPackage`](#buildpythonpackage-function). The main purpose of this function is to build a Python 271 package where one is interested only in the executables, and not importable 272 + modules. For that reason, when adding this package to a [`python.buildEnv`](#python.buildenv-function), the 273 modules won't be made available. 274 275 + Another difference is that [`buildPythonPackage`](#buildpythonpackage-function) by default prefixes the names of 276 the packages with the version of the interpreter. Because this is irrelevant for 277 applications, the prefix is omitted. 278 279 + When packaging a Python application with [`buildPythonApplication`](#buildpythonapplication-function), it should be 280 called with `callPackage` and passed `python` or `pythonPackages` (possibly 281 specifying an interpreter version), like this: 282 ··· 329 duplication the `toPythonApplication` can be used to convert a library to an 330 application. 331 332 + The Nix expression shall use [`buildPythonPackage`](#buildpythonpackage-function) and be called from 333 `python-packages.nix`. A reference shall be created from `all-packages.nix` to 334 the attribute in `python-packages.nix`, and the `toPythonApplication` shall be 335 applied to the reference: ··· 341 #### `toPythonModule` function {#topythonmodule-function} 342 343 In some cases, such as bindings, a package is created using 344 + [`stdenv.mkDerivation`](#sec-using-stdenv) and added as attribute in `all-packages.nix`. The Python 345 bindings should be made available from `python-packages.nix`. The 346 `toPythonModule` function takes a derivation and makes certain Python-specific 347 modifications. ··· 407 408 #### `python.withPackages` function {#python.withpackages-function} 409 410 + The [`python.withPackages`](#python.withpackages-function) function provides a simpler interface to the [`python.buildEnv`](#python.buildenv-function) functionality. 411 It takes a function as an argument that is passed the set of python packages and returns the list 412 + of the packages to be included in the environment. Using the [`withPackages`](#python.withpackages-function) function, the previous 413 example for the Pyramid Web Framework environment can be written like this: 414 415 ```nix ··· 418 python.withPackages (ps: [ ps.pyramid ]) 419 ``` 420 421 + [`withPackages`](#python.withpackages-function) passes the correct package set for the specific interpreter 422 version as an argument to the function. In the above example, `ps` equals 423 `pythonPackages`. But you can also easily switch to using python3: 424 ··· 430 431 Now, `ps` is set to `python3Packages`, matching the version of the interpreter. 432 433 + As [`python.withPackages`](#python.withpackages-function) simply uses [`python.buildEnv`](#python.buildenv-function) under the hood, it also 434 supports the `env` attribute. The `shell.nix` file from the previous section can 435 thus be also written like this: 436 ··· 443 ])).env 444 ``` 445 446 + In contrast to [`python.buildEnv`](#python.buildenv-function), [`python.withPackages`](#python.withpackages-function) does not support the 447 more advanced options such as `ignoreCollisions = true` or `postBuild`. If you 448 + need them, you have to use [`python.buildEnv`](#python.buildenv-function). 449 450 Python 2 namespace packages may provide `__init__.py` that collide. In that case 451 + [`python.buildEnv`](#python.buildenv-function) should be used with `ignoreCollisions = true`. 452 453 #### Setup hooks {#setup-hooks} 454 455 The following are setup hooks specifically for Python packages. Most of these 456 + are used in [`buildPythonPackage`](#buildpythonpackage-function). 457 458 - `eggUnpackhook` to move an egg to the correct folder so it can be installed 459 with the `eggInstallHook` ··· 486 ### Development mode {#development-mode} 487 488 Development or editable mode is supported. To develop Python packages 489 + [`buildPythonPackage`](#buildpythonpackage-function) has additional logic inside `shellPhase` to run `pip 490 install -e . --prefix $TMPDIR/`for the package. 491 492 Warning: `shellPhase` is executed only if `setup.py` exists. ··· 567 But Python libraries you would like to use for development cannot be installed, 568 at least not individually, because they won't be able to find each other 569 resulting in import errors. Instead, it is possible to create an environment 570 + with [`python.buildEnv`](#python.buildenv-function) or [`python.withPackages`](#python.withpackages-function) where the interpreter and other 571 executables are wrapped to be able to find each other and all of the modules. 572 573 In the following examples we will start by creating a simple, ad-hoc environment ··· 747 imports the `<nixpkgs>` function, `{}` calls it and the `with` statement 748 brings all attributes of `nixpkgs` in the local scope. These attributes form 749 the main package set. 750 + 2. Then we create a Python 3.11 environment with the [`withPackages`](#python.withpackages-function) function, as before. 751 + 3. The [`withPackages`](#python.withpackages-function) function expects us to provide a function as an argument 752 that takes the set of all Python packages and returns a list of packages to 753 include in the environment. Here, we select the packages `numpy` and `toolz` 754 from the package set. ··· 859 #### Python library packages in Nixpkgs {#python-library-packages-in-nixpkgs} 860 861 With Nix all packages are built by functions. The main function in Nix for 862 + building Python libraries is [`buildPythonPackage`](#buildpythonpackage-function). Let's see how we can build the 863 `toolz` package. 864 865 ```nix ··· 904 } 905 ``` 906 907 + What happens here? The function [`buildPythonPackage`](#buildpythonpackage-function) is called and as argument 908 it accepts a set. In this case the set is a recursive set, `rec`. One of the 909 arguments is the name of the package, which consists of a basename (generally 910 following the name on PyPi) and a version. Another argument, `src` specifies the 911 source, which in this case is fetched from PyPI using the helper function 912 `fetchPypi`. The argument `doCheck` is used to set whether tests should be run 913 + when building the package. Since there are no tests, we rely on [`pythonImportsCheck`](#using-pythonimportscheck) 914 to test whether the package can be imported. Furthermore, we specify some meta 915 information. The output of the function is a derivation. 916 ··· 969 So, what did we do here? Well, we took the Nix expression that we used earlier 970 to build a Python environment, and said that we wanted to include our own 971 version of `toolz`, named `my_toolz`. To introduce our own package in the scope 972 + of [`withPackages`](#python.withpackages-function) we used a `let` expression. You can see that we used 973 `ps.numpy` to select numpy from the nixpkgs package set (`ps`). We did not take 974 `toolz` from the Nixpkgs package set this time, but instead took our own version 975 that we introduced with the `let` expression. ··· 977 #### Handling dependencies {#handling-dependencies} 978 979 Our example, `toolz`, does not have any dependencies on other Python packages or 980 + system libraries. According to the manual, [`buildPythonPackage`](#buildpythonpackage-function) uses the 981 + arguments [`buildInputs`](#var-stdenv-buildInputs) and [`propagatedBuildInputs`](#var-stdenv-propagatedBuildInputs) to specify dependencies. If 982 something is exclusively a build-time dependency, then the dependency should be 983 + included in [`buildInputs`](#var-stdenv-buildInputs), but if it is (also) a runtime dependency, then it 984 + should be added to [`propagatedBuildInputs`](#var-stdenv-propagatedBuildInputs). Test dependencies are considered 985 + build-time dependencies and passed to [`nativeCheckInputs`](#var-stdenv-nativeCheckInputs). 986 987 + The following example shows which arguments are given to [`buildPythonPackage`](#buildpythonpackage-function) in 988 order to build [`datashape`](https://github.com/blaze/datashape). 989 990 ```nix ··· 1038 ``` 1039 1040 We can see several runtime dependencies, `numpy`, `multipledispatch`, and 1041 + `python-dateutil`. Furthermore, we have [`nativeCheckInputs`](#var-stdenv-nativeCheckInputs) with `pytest`. 1042 + `pytest` is a test runner and is only used during the [`checkPhase`](#ssec-check-phase) and is 1043 + therefore not added to [`propagatedBuildInputs`](#var-stdenv-propagatedBuildInputs). 1044 1045 In the previous case we had only dependencies on other Python packages to consider. 1046 Occasionally you have also system libraries to consider. E.g., `lxml` provides 1047 Python bindings to `libxml2` and `libxslt`. These libraries are only required 1048 + when building the bindings and are therefore added as [`buildInputs`](#var-stdenv-buildInputs). 1049 1050 ```nix 1051 { lib ··· 1093 The example below shows bindings to The Fastest Fourier Transform in the West, 1094 commonly known as FFTW. On Nix we have separate packages of FFTW for the 1095 different types of floats (`"single"`, `"double"`, `"long-double"`). The 1096 + bindings need all three types, and therefore we add all three as [`buildInputs`](#var-stdenv-buildInputs). 1097 The bindings don't expect to find each of them in a different folder, and 1098 therefore we have to set `LDFLAGS` and `CFLAGS`. 1099 ··· 1158 } 1159 ``` 1160 1161 + Note also the line [`doCheck = false;`](#var-stdenv-doCheck), we explicitly disabled running the test-suite. 1162 1163 #### Testing Python Packages {#testing-python-packages} 1164 ··· 1167 but is not usable at runtime. Currently, all packages will use the `test` 1168 command provided by the setup.py (i.e. `python setup.py test`). However, 1169 this is currently deprecated https://github.com/pypa/setuptools/pull/1878 1170 + and your package should provide its own [`checkPhase`](#ssec-check-phase). 1171 1172 ::: {.note} 1173 + The [`checkPhase`](#ssec-check-phase) for python maps to the `installCheckPhase` on a 1174 normal derivation. This is due to many python packages not behaving well 1175 to the pre-installed version of the package. Version info, and natively 1176 compiled extensions generally only exist in the install directory, and ··· 1235 #### Using pytestCheckHook {#using-pytestcheckhook} 1236 1237 `pytestCheckHook` is a convenient hook which will substitute the setuptools 1238 + `test` command for a [`checkPhase`](#ssec-check-phase) which runs `pytest`. This is also beneficial 1239 when a package may need many items disabled to run the test suite. 1240 1241 Using the example above, the analogous `pytestCheckHook` usage would be: ··· 1280 ``` 1281 1282 Trying to concatenate the related strings to disable tests in a regular 1283 + [`checkPhase`](#ssec-check-phase) would be much harder to read. This also enables us to comment on 1284 why specific tests are disabled. 1285 1286 #### Using pythonImportsCheck {#using-pythonimportscheck} 1287 1288 Although unit tests are highly preferred to validate correctness of a package, not 1289 all packages have test suites that can be run easily, and some have none at all. 1290 + To help ensure the package still works, [`pythonImportsCheck`](#using-pythonimportscheck) can attempt to import 1291 the listed modules. 1292 1293 ``` ··· 1306 ''; 1307 ``` 1308 1309 + However, this is done in its own phase, and not dependent on whether [`doCheck = true;`](#var-stdenv-doCheck). 1310 1311 This can also be useful in verifying that the package doesn't assume commonly 1312 present packages (e.g. `setuptools`). ··· 1378 1379 Keep in mind that while the examples above are done with `requirements.txt`, 1380 `pythonRelaxDepsHook` works by modifying the resulting wheel file, so it should 1381 + work with any of the [existing hooks](#setup-hooks). 1382 1383 #### Using unittestCheckHook {#using-unittestcheckhook} 1384 1385 + `unittestCheckHook` is a hook which will substitute the setuptools `test` command for a [`checkPhase`](#ssec-check-phase) which runs `python -m unittest discover`: 1386 1387 ``` 1388 nativeCheckInputs = [ ··· 1452 In the previous Nix expression the source was fetched from a url. We can also 1453 refer to a local source instead using `src = ./path/to/source/tree;` 1454 1455 + If we create a `shell.nix` file which calls [`buildPythonPackage`](#buildpythonpackage-function), and if `src` 1456 is a local source, and if the local source has a `setup.py`, then development 1457 mode is activated. 1458 1459 In the following example, we create a simple environment that has a Python 3.11 1460 version of our package in it, as well as its dependencies and other packages we 1461 + like to have in the environment, all specified with [`propagatedBuildInputs`](#var-stdenv-propagatedBuildInputs). 1462 Indeed, we can just add any package we like to have in our environment to 1463 + [`propagatedBuildInputs`](#var-stdenv-propagatedBuildInputs). 1464 1465 ```nix 1466 with import <nixpkgs> {}; ··· 1494 1495 ### Including a derivation using `callPackage` {#including-a-derivation-using-callpackage} 1496 1497 + Earlier we created a Python environment using [`withPackages`](#python.withpackages-function), and included the 1498 `toolz` package via a `let` expression. 1499 Let's split the package definition from the environment definition. 1500 ··· 1533 } 1534 ``` 1535 1536 + It takes an argument [`buildPythonPackage`](#buildpythonpackage-function). We now call this function using 1537 `callPackage` in the definition of our environment 1538 1539 ```nix ··· 1552 ``` 1553 1554 Important to remember is that the Python version for which the package is made 1555 + depends on the `python` derivation that is passed to [`buildPythonPackage`](#buildpythonpackage-function). Nix 1556 tries to automatically pass arguments when possible, which is why generally you 1557 don't explicitly define which `python` derivation should be used. In the above 1558 + example we use [`buildPythonPackage`](#buildpythonpackage-function) that is part of the set `python3Packages`, 1559 and in this case the `python3` interpreter is automatically used. 1560 1561 ## FAQ {#faq} ··· 1698 packages are available. There is therefore no need to maintain a global `site-packages`. 1699 1700 If you want to create a Python environment for development, then the recommended 1701 + method is to use `nix-shell`, either with or without the [`python.buildEnv`](#python.buildenv-function) 1702 function. 1703 1704 ### How to consume Python modules using pip in a virtual environment like I am used to on other Operating Systems? {#how-to-consume-python-modules-using-pip-in-a-virtual-environment-like-i-am-used-to-on-other-operating-systems} ··· 1875 1876 ### How to override a Python package for all Python versions using extensions? {#how-to-override-a-python-package-for-all-python-versions-using-extensions} 1877 1878 + The following overlay overrides the call to [`buildPythonPackage`](#buildpythonpackage-function) for the 1879 `foo` package for all interpreters by appending a Python extension to the 1880 `pythonPackagesExtensions` list of extensions. 1881 ··· 1902 1903 In a `setup.py` or `setup.cfg` it is common to declare dependencies: 1904 1905 + * `setup_requires` corresponds to [`nativeBuildInputs`](#var-stdenv-nativeBuildInputs) 1906 + * `install_requires` corresponds to [`propagatedBuildInputs`](#var-stdenv-propagatedBuildInputs) 1907 + * `tests_require` corresponds to [`nativeCheckInputs`](#var-stdenv-nativeCheckInputs) 1908 1909 ### How to enable interpreter optimizations? {#optimizations} 1910 ··· 1951 1952 ### How to contribute a Python package to nixpkgs? {#tools} 1953 1954 + Packages inside nixpkgs must use the [`buildPythonPackage`](#buildpythonpackage-function) or [`buildPythonApplication`](#buildpythonapplication-function) function directly, 1955 because we can only provide security support for non-vendored dependencies. 1956 1957 We recommend [nix-init](https://github.com/nix-community/nix-init) for creating new python packages within nixpkgs, ··· 1965 `nix-shell`. 1966 1967 When the environment variable `DETERMINISTIC_BUILD` is set, all bytecode will 1968 + have timestamp 1. The [`buildPythonPackage`](#buildpythonpackage-function) function sets `DETERMINISTIC_BUILD=1` 1969 and [PYTHONHASHSEED=0](https://docs.python.org/3.11/using/cmdline.html#envvar-PYTHONHASHSEED). 1970 Both are also exported in `nix-shell`. 1971 ··· 1975 Source distributions (`sdist`) often include test files, but not always. 1976 1977 By default the command `python setup.py test` is run as part of the 1978 + [`checkPhase`](#ssec-check-phase), but often it is necessary to pass a custom [`checkPhase`](#ssec-check-phase). An 1979 example of such a situation is when `py.test` is used. 1980 1981 #### Common issues {#common-issues} 1982 1983 + * Non-working tests can often be deselected. By default [`buildPythonPackage`](#buildpythonpackage-function) 1984 runs `python setup.py test`. which is deprecated. Most Python modules however 1985 do follow the standard test protocol where the pytest runner can be used 1986 instead. `pytest` supports the `-k` and `--ignore` parameters to ignore test ··· 2015 The following rules are desired to be respected: 2016 2017 * Python libraries are called from `python-packages.nix` and packaged with 2018 + [`buildPythonPackage`](#buildpythonpackage-function). The expression of a library should be in 2019 `pkgs/development/python-modules/<name>/default.nix`. 2020 * Python applications live outside of `python-packages.nix` and are packaged 2021 + with [`buildPythonApplication`](#buildpythonapplication-function). 2022 * Make sure libraries build for all Python interpreters. 2023 * By default we enable tests. Make sure the tests are found and, in the case of 2024 libraries, are passing for all interpreters. If certain tests fail they can be
+2
nixos/doc/manual/release-notes/rl-2311.section.md
··· 229 230 - `rome` was removed because it is no longer maintained and is succeeded by `biome`. 231 232 ## Other Notable Changes {#sec-release-23.11-notable-changes} 233 234 - The Cinnamon module now enables XDG desktop integration by default. If you are experiencing collisions related to xdg-desktop-portal-gtk you can safely remove `xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];` from your NixOS configuration.
··· 229 230 - `rome` was removed because it is no longer maintained and is succeeded by `biome`. 231 232 + - The `services.mtr-exporter.target` has been removed in favor of `services.mtr-exporter.jobs` which allows specifying multiple targets. 233 + 234 ## Other Notable Changes {#sec-release-23.11-notable-changes} 235 236 - The Cinnamon module now enables XDG desktop integration by default. If you are experiencing collisions related to xdg-desktop-portal-gtk you can safely remove `xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];` from your NixOS configuration.
+81 -30
nixos/modules/services/networking/mtr-exporter.nix
··· 2 3 let 4 inherit (lib) 5 - maintainers types mkEnableOption mkOption mkIf 6 - literalExpression escapeShellArg escapeShellArgs; 7 cfg = config.services.mtr-exporter; 8 in { 9 options = { 10 services = { 11 mtr-exporter = { 12 - enable = mkEnableOption (lib.mdDoc "a Prometheus exporter for MTR"); 13 14 - target = mkOption { 15 type = types.str; 16 - example = "example.org"; 17 - description = lib.mdDoc "Target to check using MTR."; 18 - }; 19 - 20 - interval = mkOption { 21 - type = types.int; 22 - default = 60; 23 - description = lib.mdDoc "Interval between MTR checks in seconds."; 24 }; 25 26 port = mkOption { 27 type = types.port; 28 default = 8080; 29 - description = lib.mdDoc "Listen port for MTR exporter."; 30 }; 31 32 - address = mkOption { 33 - type = types.str; 34 - default = "127.0.0.1"; 35 - description = lib.mdDoc "Listen address for MTR exporter."; 36 }; 37 38 - mtrFlags = mkOption { 39 - type = with types; listOf str; 40 - default = []; 41 - example = ["-G1"]; 42 - description = lib.mdDoc "Additional flags to pass to MTR."; 43 }; 44 }; 45 }; 46 }; 47 48 config = mkIf cfg.enable { 49 systemd.services.mtr-exporter = { 50 - script = '' 51 - exec ${pkgs.mtr-exporter}/bin/mtr-exporter \ 52 - -mtr ${pkgs.mtr}/bin/mtr \ 53 - -schedule '@every ${toString cfg.interval}s' \ 54 - -bind ${escapeShellArg cfg.address}:${toString cfg.port} \ 55 - -- \ 56 - ${escapeShellArgs (cfg.mtrFlags ++ [ cfg.target ])} 57 - ''; 58 wantedBy = [ "multi-user.target" ]; 59 requires = [ "network.target" ]; 60 after = [ "network.target" ]; 61 serviceConfig = { 62 Restart = "on-failure"; 63 # Hardening 64 CapabilityBoundingSet = [ "" ];
··· 2 3 let 4 inherit (lib) 5 + maintainers types literalExpression 6 + escapeShellArg escapeShellArgs 7 + mkEnableOption mkOption mkRemovedOptionModule mkIf mdDoc 8 + optionalString concatMapStrings concatStringsSep; 9 + 10 cfg = config.services.mtr-exporter; 11 + 12 + jobsConfig = pkgs.writeText "mtr-exporter.conf" (concatMapStrings (job: '' 13 + ${job.name} -- ${job.schedule} -- ${concatStringsSep " " job.flags} ${job.address} 14 + '') cfg.jobs); 15 in { 16 + imports = [ 17 + (mkRemovedOptionModule [ "services" "mtr-exporter" "target" ] "Use services.mtr-exporter.jobs instead.") 18 + (mkRemovedOptionModule [ "services" "mtr-exporter" "mtrFlags" ] "Use services.mtr-exporter.jobs.<job>.flags instead.") 19 + ]; 20 + 21 options = { 22 services = { 23 mtr-exporter = { 24 + enable = mkEnableOption (mdDoc "a Prometheus exporter for MTR"); 25 26 + address = mkOption { 27 type = types.str; 28 + default = "127.0.0.1"; 29 + description = lib.mdDoc "Listen address for MTR exporter."; 30 }; 31 32 port = mkOption { 33 type = types.port; 34 default = 8080; 35 + description = mdDoc "Listen port for MTR exporter."; 36 }; 37 38 + extraFlags = mkOption { 39 + type = types.listOf types.str; 40 + default = []; 41 + example = ["-flag.deprecatedMetrics"]; 42 + description = mdDoc '' 43 + Extra command line options to pass to MTR exporter. 44 + ''; 45 + }; 46 + 47 + package = mkOption { 48 + type = types.package; 49 + default = pkgs.mtr-exporter; 50 + defaultText = literalExpression "pkgs.mtr-exporter"; 51 + description = mdDoc "The MTR exporter package to use."; 52 + }; 53 + 54 + mtrPackage = mkOption { 55 + type = types.package; 56 + default = pkgs.mtr; 57 + defaultText = literalExpression "pkgs.mtr"; 58 + description = mdDoc "The MTR package to use."; 59 }; 60 61 + jobs = mkOption { 62 + description = mdDoc "List of MTR jobs. Will be added to /etc/mtr-exporter.conf"; 63 + type = types.nonEmptyListOf (types.submodule { 64 + options = { 65 + name = mkOption { 66 + type = types.str; 67 + description = mdDoc "Name of ICMP pinging job."; 68 + }; 69 + 70 + address = mkOption { 71 + type = types.str; 72 + example = "host.example.org:1234"; 73 + description = mdDoc "Target address for MTR client."; 74 + }; 75 + 76 + schedule = mkOption { 77 + type = types.str; 78 + default = "@every 60s"; 79 + example = "@hourly"; 80 + description = mdDoc "Schedule of MTR checks. Also accepts Cron format."; 81 + }; 82 + 83 + flags = mkOption { 84 + type = with types; listOf str; 85 + default = []; 86 + example = ["-G1"]; 87 + description = mdDoc "Additional flags to pass to MTR."; 88 + }; 89 + }; 90 + }); 91 }; 92 }; 93 }; 94 }; 95 96 config = mkIf cfg.enable { 97 + environment.etc."mtr-exporter.conf" = { 98 + source = jobsConfig; 99 + }; 100 + 101 systemd.services.mtr-exporter = { 102 wantedBy = [ "multi-user.target" ]; 103 requires = [ "network.target" ]; 104 after = [ "network.target" ]; 105 serviceConfig = { 106 + ExecStart = '' 107 + ${cfg.package}/bin/mtr-exporter \ 108 + -mtr '${cfg.mtrPackage}/bin/mtr' \ 109 + -bind ${escapeShellArg "${cfg.address}:${toString cfg.port}"} \ 110 + -jobs '${jobsConfig}' \ 111 + ${escapeShellArgs cfg.extraFlags} 112 + ''; 113 Restart = "on-failure"; 114 # Hardening 115 CapabilityBoundingSet = [ "" ];
+17 -4
nixos/modules/services/networking/ssh/sshd.nix
··· 27 mkValueString = mkValueStringSshd; 28 } " ";}); 29 30 - configFile = settingsFormat.generate "config" cfg.settings; 31 - sshconf = pkgs.runCommand "sshd.conf-validated" { nativeBuildInputs = [ validationPackage ]; } '' 32 cat ${configFile} - >$out <<EOL 33 ${cfg.extraConfig} 34 EOL 35 - 36 - sshd -G -f $out 37 ''; 38 39 cfg = config.services.openssh; ··· 575 HostKey ${k.path} 576 '')} 577 ''; 578 579 assertions = [{ assertion = if cfg.settings.X11Forwarding then cfgc.setXAuthLocation else true; 580 message = "cannot enable X11 forwarding without setting xauth location";}
··· 27 mkValueString = mkValueStringSshd; 28 } " ";}); 29 30 + configFile = settingsFormat.generate "sshd.conf-settings" cfg.settings; 31 + sshconf = pkgs.runCommand "sshd.conf-final" { } '' 32 cat ${configFile} - >$out <<EOL 33 ${cfg.extraConfig} 34 EOL 35 ''; 36 37 cfg = config.services.openssh; ··· 573 HostKey ${k.path} 574 '')} 575 ''; 576 + 577 + system.checks = [ 578 + (pkgs.runCommand "check-sshd-config" 579 + { 580 + nativeBuildInputs = [ validationPackage ]; 581 + } '' 582 + ${concatMapStringsSep "\n" 583 + (lport: "sshd -G -T -C lport=${toString lport} -f ${sshconf} > /dev/null") 584 + cfg.ports} 585 + ${concatMapStringsSep "\n" 586 + (la: "sshd -G -T -C laddr=${la.addr},lport=${toString la.port} -f ${sshconf} > /dev/null") 587 + cfg.listenAddresses} 588 + touch $out 589 + '') 590 + ]; 591 592 assertions = [{ assertion = if cfg.settings.X11Forwarding then cfgc.setXAuthLocation else true; 593 message = "cannot enable X11 forwarding without setting xauth location";}
+8 -1
nixos/modules/services/web-servers/garage.nix
··· 23 example = { RUST_BACKTRACE="yes"; }; 24 }; 25 26 logLevel = mkOption { 27 type = types.enum (["info" "debug" "trace"]); 28 default = "info"; ··· 80 after = [ "network.target" "network-online.target" ]; 81 wants = [ "network.target" "network-online.target" ]; 82 wantedBy = [ "multi-user.target" ]; 83 - restartTriggers = [ configFile ]; 84 serviceConfig = { 85 ExecStart = "${cfg.package}/bin/garage server"; 86 ··· 88 DynamicUser = lib.mkDefault true; 89 ProtectHome = true; 90 NoNewPrivileges = true; 91 }; 92 environment = { 93 RUST_LOG = lib.mkDefault "garage=${cfg.logLevel}";
··· 23 example = { RUST_BACKTRACE="yes"; }; 24 }; 25 26 + environmentFile = mkOption { 27 + type = types.nullOr types.path; 28 + description = lib.mdDoc "File containing environment variables to be passed to the Garage server."; 29 + default = null; 30 + }; 31 + 32 logLevel = mkOption { 33 type = types.enum (["info" "debug" "trace"]); 34 default = "info"; ··· 86 after = [ "network.target" "network-online.target" ]; 87 wants = [ "network.target" "network-online.target" ]; 88 wantedBy = [ "multi-user.target" ]; 89 + restartTriggers = [ configFile ] ++ (lib.optional (cfg.environmentFile != null) cfg.environmentFile); 90 serviceConfig = { 91 ExecStart = "${cfg.package}/bin/garage server"; 92 ··· 94 DynamicUser = lib.mkDefault true; 95 ProtectHome = true; 96 NoNewPrivileges = true; 97 + EnvironmentFile = lib.optional (cfg.environmentFile != null) cfg.environmentFile; 98 }; 99 environment = { 100 RUST_LOG = lib.mkDefault "garage=${cfg.logLevel}";
+33
nixos/tests/openssh.nix
··· 52 }; 53 }; 54 55 client = 56 { ... }: { }; 57 ··· 114 with subtest("localhost-only"): 115 server_localhost_only.succeed("ss -nlt | grep '127.0.0.1:22'") 116 server_localhost_only_lazy.succeed("ss -nlt | grep '127.0.0.1:22'") 117 ''; 118 })
··· 52 }; 53 }; 54 55 + server_match_rule = 56 + { ... }: 57 + 58 + { 59 + services.openssh = { 60 + enable = true; listenAddresses = [ { addr = "127.0.0.1"; port = 22; } ]; 61 + extraConfig = '' 62 + # Combined test for two (predictable) Match criterias 63 + Match LocalAddress 127.0.0.1 LocalPort 22 64 + PermitRootLogin yes 65 + 66 + # Separate tests for Match criterias 67 + Match User root 68 + PermitRootLogin yes 69 + Match Group root 70 + PermitRootLogin yes 71 + Match Host nohost.example 72 + PermitRootLogin yes 73 + Match LocalAddress 127.0.0.1 74 + PermitRootLogin yes 75 + Match LocalPort 22 76 + PermitRootLogin yes 77 + Match RDomain nohost.example 78 + PermitRootLogin yes 79 + Match Address 127.0.0.1 80 + PermitRootLogin yes 81 + ''; 82 + }; 83 + }; 84 + 85 client = 86 { ... }: { }; 87 ··· 144 with subtest("localhost-only"): 145 server_localhost_only.succeed("ss -nlt | grep '127.0.0.1:22'") 146 server_localhost_only_lazy.succeed("ss -nlt | grep '127.0.0.1:22'") 147 + 148 + with subtest("match-rules"): 149 + server_match_rule.succeed("ss -nlt | grep '127.0.0.1:22'") 150 ''; 151 })
+10 -3
pkgs/applications/display-managers/lemurs/default.nix
··· 3 lib, 4 linux-pam, 5 rustPlatform, 6 }: 7 rustPlatform.buildRustPackage rec { 8 pname = "lemurs"; 9 - version = "0.3.1"; 10 11 src = fetchFromGitHub { 12 owner = "coastalwhite"; 13 repo = "lemurs"; 14 rev = "v${version}"; 15 - hash = "sha256-6mNSLEWafw8yDGnemOhEiK8FTrBC+6+PuhlbOXTGmN0="; 16 }; 17 18 - cargoHash = "sha256-nfUBC1HSs7PcIbD7MViJFkfFAPda83XbAupNeShfwOs="; 19 20 # Fixes a lock issue 21 preConfigure = "cargo update --offline"; ··· 24 linux-pam 25 ]; 26 27 meta = with lib; { 28 description = "A customizable TUI display/login manager written in Rust"; 29 homepage = "https://github.com/coastalwhite/lemurs"; 30 license = with licenses; [asl20 mit]; 31 maintainers = with maintainers; [jeremiahs]; 32 }; 33 }
··· 3 lib, 4 linux-pam, 5 rustPlatform, 6 + testers, 7 + lemurs, 8 }: 9 rustPlatform.buildRustPackage rec { 10 pname = "lemurs"; 11 + version = "0.3.2"; 12 13 src = fetchFromGitHub { 14 owner = "coastalwhite"; 15 repo = "lemurs"; 16 rev = "v${version}"; 17 + hash = "sha256-YDopY+wdWlVL2X+/wc1tLSSqFclAkt++JXMK3VodD4s="; 18 }; 19 20 + cargoHash = "sha256-uuHPJe+1VsnLRGbHtgTMrib6Tk359cwTDVfvtHnDToo="; 21 22 # Fixes a lock issue 23 preConfigure = "cargo update --offline"; ··· 26 linux-pam 27 ]; 28 29 + passthru.tests.version = testers.testVersion { 30 + package = lemurs; 31 + }; 32 + 33 meta = with lib; { 34 description = "A customizable TUI display/login manager written in Rust"; 35 homepage = "https://github.com/coastalwhite/lemurs"; 36 license = with licenses; [asl20 mit]; 37 maintainers = with maintainers; [jeremiahs]; 38 + mainProgram = "lemurs"; 39 }; 40 }
+4 -2
pkgs/applications/editors/setzer/default.nix
··· 20 21 python3.pkgs.buildPythonApplication rec { 22 pname = "setzer"; 23 - version = "59"; 24 25 src = fetchFromGitHub { 26 owner = "cvfosammmm"; 27 repo = "Setzer"; 28 rev = "v${version}"; 29 - hash = "sha256-PmkEOOi30Fa8VXNmKPvp6UAaw74MID9uTaCzXs9vPpk="; 30 }; 31 32 format = "other"; ··· 54 55 propagatedBuildInputs = with python3.pkgs; [ 56 bibtexparser 57 pdfminer-six 58 pexpect 59 pycairo 60 pygobject3 61 pyxdg
··· 20 21 python3.pkgs.buildPythonApplication rec { 22 pname = "setzer"; 23 + version = "60"; 24 25 src = fetchFromGitHub { 26 owner = "cvfosammmm"; 27 repo = "Setzer"; 28 rev = "v${version}"; 29 + hash = "sha256-SfMqGQKJtPTMSv4B70jOvTAIzNQc0AC16mum4fuNch4="; 30 }; 31 32 format = "other"; ··· 54 55 propagatedBuildInputs = with python3.pkgs; [ 56 bibtexparser 57 + numpy 58 pdfminer-six 59 pexpect 60 + pillow 61 pycairo 62 pygobject3 63 pyxdg
+2 -2
pkgs/applications/file-managers/clifm/default.nix
··· 2 3 stdenv.mkDerivation rec { 4 pname = "clifm"; 5 - version = "1.13"; 6 7 src = fetchFromGitHub { 8 owner = "leo-arch"; 9 repo = pname; 10 rev = "v${version}"; 11 - sha256 = "sha256-Y9z3HT36Z1fwweOnniRgyNQX1cbrLSGGgB5UAxkq9mI="; 12 }; 13 14 buildInputs = [ libcap acl file readline ];
··· 2 3 stdenv.mkDerivation rec { 4 pname = "clifm"; 5 + version = "1.14.6"; 6 7 src = fetchFromGitHub { 8 owner = "leo-arch"; 9 repo = pname; 10 rev = "v${version}"; 11 + sha256 = "sha256-0EOG7BAZL3OPP2/qePNkljAa0/Qb3zwuJWz2P4l8GZc="; 12 }; 13 14 buildInputs = [ libcap acl file readline ];
+4 -4
pkgs/applications/misc/prusa-slicer/default.nix
··· 67 }); 68 wxGTK-override' = if wxGTK-override == null then wxGTK-prusa else wxGTK-override; 69 in 70 - stdenv.mkDerivation rec { 71 pname = "prusa-slicer"; 72 version = "2.6.1"; 73 ··· 105 xorg.libX11 106 ] ++ lib.optionals withSystemd [ 107 systemd 108 - ] ++ nativeCheckInputs; 109 110 doCheck = true; 111 nativeCheckInputs = [ gtest ]; ··· 167 owner = "prusa3d"; 168 repo = "PrusaSlicer"; 169 hash = "sha256-t5lnBL7SZVfyR680ZK29YXgE3pag+uVv4+BGJZq40/A="; 170 - rev = "version_${version}"; 171 }; 172 173 cmakeFlags = [ ··· 201 } // lib.optionalAttrs (stdenv.isDarwin) { 202 mainProgram = "PrusaSlicer"; 203 }; 204 - }
··· 67 }); 68 wxGTK-override' = if wxGTK-override == null then wxGTK-prusa else wxGTK-override; 69 in 70 + stdenv.mkDerivation (finalAttrs: { 71 pname = "prusa-slicer"; 72 version = "2.6.1"; 73 ··· 105 xorg.libX11 106 ] ++ lib.optionals withSystemd [ 107 systemd 108 + ] ++ finalAttrs.nativeCheckInputs; 109 110 doCheck = true; 111 nativeCheckInputs = [ gtest ]; ··· 167 owner = "prusa3d"; 168 repo = "PrusaSlicer"; 169 hash = "sha256-t5lnBL7SZVfyR680ZK29YXgE3pag+uVv4+BGJZq40/A="; 170 + rev = "version_${finalAttrs.version}"; 171 }; 172 173 cmakeFlags = [ ··· 201 } // lib.optionalAttrs (stdenv.isDarwin) { 202 mainProgram = "PrusaSlicer"; 203 }; 204 + })
+6 -6
pkgs/applications/networking/browsers/microsoft-edge/default.nix
··· 1 { 2 stable = import ./browser.nix { 3 channel = "stable"; 4 - version = "117.0.2045.35"; 5 revision = "1"; 6 - sha256 = "sha256-2am+TLZC024mpxOk6GLB0TZY+Kfnm/CyH8sMBLod1Js="; 7 }; 8 beta = import ./browser.nix { 9 channel = "beta"; 10 - version = "117.0.2045.31"; 11 revision = "1"; 12 - sha256 = "sha256-Nee99jE6kswYfmZlMjv4EV4HDz1l+9YhhWHonhe2uUM="; 13 }; 14 dev = import ./browser.nix { 15 channel = "dev"; 16 - version = "118.0.2088.9"; 17 revision = "1"; 18 - sha256 = "sha256-JNIccQrdLpiEItgt4Lh0eZQgnXE+5Lx3vGDjzm5sKWM="; 19 }; 20 }
··· 1 { 2 stable = import ./browser.nix { 3 channel = "stable"; 4 + version = "117.0.2045.40"; 5 revision = "1"; 6 + sha256 = "sha256-gRlw+hxix4CnviCrH+evmiwSctXJts8/68Oiwr5VKzk="; 7 }; 8 beta = import ./browser.nix { 9 channel = "beta"; 10 + version = "118.0.2088.11"; 11 revision = "1"; 12 + sha256 = "sha256-r++W+tnFxh85c9k4VooCy+6mre/8nU/7nrrt+AK1x+M="; 13 }; 14 dev = import ./browser.nix { 15 channel = "dev"; 16 + version = "119.0.2109.1"; 17 revision = "1"; 18 + sha256 = "sha256-ZIL8CD8eb/JvJs8P9GoT+yXWccS9roqPl6iDz+0K7LI="; 19 }; 20 }
+3 -3
pkgs/applications/networking/cluster/werf/default.nix
··· 10 11 buildGoModule rec { 12 pname = "werf"; 13 - version = "1.2.255"; 14 15 src = fetchFromGitHub { 16 owner = "werf"; 17 repo = "werf"; 18 rev = "v${version}"; 19 - hash = "sha256-XrW/owPeh+lpkGDy0iNigu68Zx0dZIyBhrUkOXaHsaM="; 20 }; 21 22 - vendorHash = "sha256-rLUZnjrKZd1Br4upb+cGY3AMKtKVNxO/VxntmRLGu8A="; 23 24 proxyVendor = true; 25
··· 10 11 buildGoModule rec { 12 pname = "werf"; 13 + version = "1.2.259"; 14 15 src = fetchFromGitHub { 16 owner = "werf"; 17 repo = "werf"; 18 rev = "v${version}"; 19 + hash = "sha256-A5sK+M/mjAsDMuqPvBNKML7rDzYMPKtN5VW4pX/sWCM="; 20 }; 21 22 + vendorHash = "sha256-gfh55taGIuigMCJw0hZuSA0q39V19LCPAUYqZiTinB4="; 23 24 proxyVendor = true; 25
+2 -2
pkgs/applications/office/morgen/default.nix
··· 3 4 stdenv.mkDerivation rec { 5 pname = "morgen"; 6 - version = "3.0.0"; 7 8 src = fetchurl { 9 url = "https://download.todesktop.com/210203cqcj00tw1/morgen-${version}.deb"; 10 - sha256 = "sha256-6d1KYUlXv+bHPITt2zs++AtyaAT8SSCG9T8ZsgOKDiw="; 11 }; 12 13 nativeBuildInputs = [
··· 3 4 stdenv.mkDerivation rec { 5 pname = "morgen"; 6 + version = "3.0.1"; 7 8 src = fetchurl { 9 url = "https://download.todesktop.com/210203cqcj00tw1/morgen-${version}.deb"; 10 + sha256 = "sha256-lj+V5mntZzED2ZS62Uwlt/vTXwSuwzXeuEw8y/bA6og="; 11 }; 12 13 nativeBuildInputs = [
+5 -4
pkgs/applications/science/electronics/librepcb/default.nix
··· 1 { stdenv, lib, fetchFromGitHub 2 - , qtbase, qttools, cmake, wrapQtAppsHook 3 }: 4 5 stdenv.mkDerivation rec { 6 pname = "librepcb"; 7 - version = "0.1.7"; 8 9 src = fetchFromGitHub { 10 owner = pname; 11 repo = pname; 12 rev = version; 13 - sha256 = "sha256-zqvvc3CHqdRWVUFt4BkH5Vq50/FKNvMNW2NvGyfWwFM="; 14 fetchSubmodules = true; 15 }; 16 17 - nativeBuildInputs = [ cmake qttools wrapQtAppsHook ]; 18 buildInputs = [ qtbase ]; 19 20 meta = with lib; { 21 description = "A free EDA software to develop printed circuit boards";
··· 1 { stdenv, lib, fetchFromGitHub 2 + , qtbase, qttools, qtquickcontrols2, opencascade-occt, libGLU, libSM, freeimage, cmake, wrapQtAppsHook 3 }: 4 5 stdenv.mkDerivation rec { 6 pname = "librepcb"; 7 + version = "1.0.0"; 8 9 src = fetchFromGitHub { 10 owner = pname; 11 repo = pname; 12 rev = version; 13 + sha256 = "sha256-2o2Gue/RnDWxe8jk/Ehx9CM+B3ac5rEQn0H7yodUEZ8="; 14 fetchSubmodules = true; 15 }; 16 17 + nativeBuildInputs = [ cmake qttools wrapQtAppsHook qtquickcontrols2 opencascade-occt libGLU ]; 18 buildInputs = [ qtbase ]; 19 + propagatedBuildInputs = [ libSM freeimage ]; 20 21 meta = with lib; { 22 description = "A free EDA software to develop printed circuit boards";
+2 -2
pkgs/applications/window-managers/phosh/default.nix
··· 36 37 stdenv.mkDerivation rec { 38 pname = "phosh"; 39 - version = "0.30.0"; 40 41 src = fetchFromGitLab { 42 domain = "gitlab.gnome.org"; ··· 45 repo = pname; 46 rev = "v${version}"; 47 fetchSubmodules = true; # including gvc and libcall-ui which are designated as subprojects 48 - sha256 = "sha256-AfyVtgWqvlN1n+O+apf6H9eXnXN2D0BC4dea2V4Plog="; 49 }; 50 51 nativeBuildInputs = [
··· 36 37 stdenv.mkDerivation rec { 38 pname = "phosh"; 39 + version = "0.31.1"; 40 41 src = fetchFromGitLab { 42 domain = "gitlab.gnome.org"; ··· 45 repo = pname; 46 rev = "v${version}"; 47 fetchSubmodules = true; # including gvc and libcall-ui which are designated as subprojects 48 + sha256 = "sha256-ZdZKymmOzhlJtsFl+ix5kERnfgjCggDpvDhL4vzS4mc="; 49 }; 50 51 nativeBuildInputs = [
+2 -2
pkgs/by-name/al/algol68g/package.nix
··· 9 10 stdenv.mkDerivation (finalAttrs: { 11 pname = "algol68g"; 12 - version = "3.3.22"; 13 14 src = fetchurl { 15 url = "https://jmvdveer.home.xs4all.nl/algol68g-${finalAttrs.version}.tar.gz"; 16 - hash = "sha256-cSD6lngCy7SC2P7GyUCajk6i863a3vvCjtgZLF0TrIA="; 17 }; 18 19 outputs = [ "out" "man" ] ++ lib.optional withPDFDoc "doc";
··· 9 10 stdenv.mkDerivation (finalAttrs: { 11 pname = "algol68g"; 12 + version = "3.3.23"; 13 14 src = fetchurl { 15 url = "https://jmvdveer.home.xs4all.nl/algol68g-${finalAttrs.version}.tar.gz"; 16 + hash = "sha256-NXSIm+Vl7/NT8ks0bNqWAIYlbtzGv0q0czxhGolF1bs="; 17 }; 18 19 outputs = [ "out" "man" ] ++ lib.optional withPDFDoc "doc";
+47
pkgs/by-name/sa/samrewritten/package.nix
···
··· 1 + { lib 2 + , stdenv 3 + , fetchFromGitHub 4 + , unstableGitUpdater 5 + , curl 6 + , gtkmm3 7 + , glibmm 8 + , gnutls 9 + , yajl 10 + , pkg-config 11 + }: 12 + stdenv.mkDerivation (finalAttrs: { 13 + pname = "samrewritten"; 14 + version = "unstable-2023-05-23"; 15 + 16 + src = fetchFromGitHub { 17 + owner = "PaulCombal"; 18 + repo = "SamRewritten"; 19 + # The latest release is too old, use latest commit instead 20 + rev = "39d524a72678a226bf9140db6b97641f554563c3"; 21 + hash = "sha256-sS/lVY5EWXdTOg7cDWPbi/n5TNt+pRAF1x7ZEaYG4wM="; 22 + }; 23 + 24 + makeFlags = [ "PREFIX=$(out)" ]; 25 + 26 + nativeBuildInputs = [ 27 + pkg-config 28 + ]; 29 + 30 + buildInputs = [ 31 + curl 32 + gtkmm3 33 + glibmm 34 + gnutls 35 + yajl 36 + ]; 37 + 38 + passthru.updateScript = unstableGitUpdater { }; 39 + 40 + meta = { 41 + description = "Steam Achievement Manager For Linux. Rewritten in C++"; 42 + homepage = "https://github.com/PaulCombal/SamRewritten"; 43 + license = lib.licenses.gpl3Plus; 44 + maintainers = with lib.maintainers; [ ludovicopiero ]; 45 + platforms = lib.platforms.linux; 46 + }; 47 + })
+3 -3
pkgs/development/compilers/erg/default.nix
··· 9 10 rustPlatform.buildRustPackage rec { 11 pname = "erg"; 12 - version = "0.6.20"; 13 14 src = fetchFromGitHub { 15 owner = "erg-lang"; 16 repo = "erg"; 17 rev = "v${version}"; 18 - hash = "sha256-xu6lbCdXUf5fqGoEGui44tVpVXlSOdfNFTyAurFRsDA="; 19 }; 20 21 - cargoHash = "sha256-pRuruqBXnSkTzEPTyZlX130z5IJPxEqWB2/38B7aCeI="; 22 23 nativeBuildInputs = [ 24 makeWrapper
··· 9 10 rustPlatform.buildRustPackage rec { 11 pname = "erg"; 12 + version = "0.6.21"; 13 14 src = fetchFromGitHub { 15 owner = "erg-lang"; 16 repo = "erg"; 17 rev = "v${version}"; 18 + hash = "sha256-NS9LpnCAYmninAcliwdEXPSYqqQZ8impaaK2eceoi3k="; 19 }; 20 21 + cargoHash = "sha256-JJPbArXb3Hmf7bDRlYM0ZOnaolYnDtc41EFazFtApWc="; 22 23 nativeBuildInputs = [ 24 makeWrapper
+3 -3
pkgs/development/embedded/arduino/arduino-cli/default.nix
··· 4 5 pkg = buildGoModule rec { 6 pname = "arduino-cli"; 7 - version = "0.33.0"; 8 9 src = fetchFromGitHub { 10 owner = "arduino"; 11 repo = pname; 12 rev = version; 13 - hash = "sha256-iwVxaNkz4AgLXPRjzD3vNJ7k+whWvpQUl66nSmRFW+U="; 14 }; 15 16 nativeBuildInputs = [ ··· 23 24 subPackages = [ "." ]; 25 26 - vendorHash = "sha256-efZnuxXbC31u7FciULGYvpaWiCm9boQRLUpxW9evyJQ="; 27 28 postPatch = let 29 skipTests = [
··· 4 5 pkg = buildGoModule rec { 6 pname = "arduino-cli"; 7 + version = "0.34.2"; 8 9 src = fetchFromGitHub { 10 owner = "arduino"; 11 repo = pname; 12 rev = version; 13 + hash = "sha256-X7vrcaJkVqzZoaIFLWJhhdlgRpckLG69uVmUUZd/XXY="; 14 }; 15 16 nativeBuildInputs = [ ··· 23 24 subPackages = [ "." ]; 25 26 + vendorHash = "sha256-cr5D7QDh65xWZJ4gq32ehklwrHWyQEWW/FZZ4gPTJBk="; 27 28 postPatch = let 29 skipTests = [
+3 -3
pkgs/development/interpreters/php/8.3.nix
··· 2 3 let 4 base = (callPackage ./generic.nix (_args // { 5 - version = "8.3.0RC1"; 6 hash = null; 7 })).overrideAttrs (oldAttrs: { 8 src = fetchurl { 9 - url = "https://downloads.php.net/~jakub/php-8.3.0RC1.tar.xz"; 10 - hash = "sha256-pWnkxSIhzKU8Cp+AiGzqhqRtWoJu+zBfCM45n2ugH7c="; 11 }; 12 }); 13 in
··· 2 3 let 4 base = (callPackage ./generic.nix (_args // { 5 + version = "8.3.0RC2"; 6 hash = null; 7 })).overrideAttrs (oldAttrs: { 8 src = fetchurl { 9 + url = "https://downloads.php.net/~eric/php-8.3.0RC2.tar.xz"; 10 + hash = "sha256-0Lo9msTyjfU9kuq0QkvUv4yeshM2tUizMJb9oCggMtw="; 11 }; 12 }); 13 in
+2 -2
pkgs/development/libraries/libglibutil/default.nix
··· 2 3 stdenv.mkDerivation rec { 4 pname = "libglibutil"; 5 - version = "1.0.71"; 6 7 src = fetchFromGitHub { 8 owner = "sailfishos"; 9 repo = pname; 10 rev = version; 11 - sha256 = "sha256-I58XN1Ku5VVmxuTZ6yPm8jWGKscwLOhetWC+6B6EZRE="; 12 }; 13 14 outputs = [ "out" "dev" ];
··· 2 3 stdenv.mkDerivation rec { 4 pname = "libglibutil"; 5 + version = "1.0.74"; 6 7 src = fetchFromGitHub { 8 owner = "sailfishos"; 9 repo = pname; 10 rev = version; 11 + sha256 = "sha256-+nIB516XUPjfI3fHru48sU/5PYL/w14/sMK/B8FLflI="; 12 }; 13 14 outputs = [ "out" "dev" ];
+2 -2
pkgs/development/libraries/libharu/default.nix
··· 2 3 stdenv.mkDerivation rec { 4 pname = "libharu"; 5 - version = "2.4.3"; 6 7 src = fetchFromGitHub { 8 owner = "libharu"; 9 repo = pname; 10 rev = "v${version}"; 11 - hash = "sha256-v8eD1ZEFQFA7ceWOgOmq7hP0ZMPfxjdAp7ov4PBPaAE="; 12 }; 13 14 nativeBuildInputs = [ cmake ];
··· 2 3 stdenv.mkDerivation rec { 4 pname = "libharu"; 5 + version = "2.4.4"; 6 7 src = fetchFromGitHub { 8 owner = "libharu"; 9 repo = pname; 10 rev = "v${version}"; 11 + hash = "sha256-tw/E79Cg/8kIei6NUu1W+mP0sUDCm8KTB7ZjzxsqpeM="; 12 }; 13 14 nativeBuildInputs = [ cmake ];
+2 -2
pkgs/development/php-packages/php-cs-fixer/default.nix
··· 2 3 let 4 pname = "php-cs-fixer"; 5 - version = "3.22.0"; 6 in 7 mkDerivation { 8 inherit pname version; 9 10 src = fetchurl { 11 url = "https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v${version}/php-cs-fixer.phar"; 12 - sha256 = "sha256-iP5dmJkYZ/E1TAm4oLOCCQ5DCc4+I3CcEr8tOezzCt4="; 13 }; 14 15 dontUnpack = true;
··· 2 3 let 4 pname = "php-cs-fixer"; 5 + version = "3.28.0"; 6 in 7 mkDerivation { 8 inherit pname version; 9 10 src = fetchurl { 11 url = "https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v${version}/php-cs-fixer.phar"; 12 + sha256 = "sha256-5dhS4QroRY9tGGSsXQfzWw5ObWO5fIoc+nkOUpAjUlQ="; 13 }; 14 15 dontUnpack = true;
+2 -2
pkgs/development/python-modules/pdoc/default.nix
··· 13 14 buildPythonPackage rec { 15 pname = "pdoc"; 16 - version = "14.0.0"; 17 disabled = pythonOlder "3.8"; 18 19 format = "pyproject"; ··· 22 owner = "mitmproxy"; 23 repo = "pdoc"; 24 rev = "v${version}"; 25 - hash = "sha256-rMHp0diXvWIOyucuTAXO/IOljKhDYOZKtkih5+rUJCM="; 26 }; 27 28 nativeBuildInputs = [
··· 13 14 buildPythonPackage rec { 15 pname = "pdoc"; 16 + version = "14.1.0"; 17 disabled = pythonOlder "3.8"; 18 19 format = "pyproject"; ··· 22 owner = "mitmproxy"; 23 repo = "pdoc"; 24 rev = "v${version}"; 25 + hash = "sha256-LQXhdzocw01URrmpDayK9rpsArvM/E44AE8Eok9DBwk="; 26 }; 27 28 nativeBuildInputs = [
+2 -2
pkgs/development/python-modules/peaqevcore/default.nix
··· 6 7 buildPythonPackage rec { 8 pname = "peaqevcore"; 9 - version = "19.4.2"; 10 format = "setuptools"; 11 12 disabled = pythonOlder "3.7"; 13 14 src = fetchPypi { 15 inherit pname version; 16 - hash = "sha256-SJ3G301HO0TnrupzhK4K6JPDs25Nltv+lNj1nQB7gV4="; 17 }; 18 19 postPatch = ''
··· 6 7 buildPythonPackage rec { 8 pname = "peaqevcore"; 9 + version = "19.5.0"; 10 format = "setuptools"; 11 12 disabled = pythonOlder "3.7"; 13 14 src = fetchPypi { 15 inherit pname version; 16 + hash = "sha256-b/sTrSXj3+dkg8++zDZfroSBHIMJIeyPbY5aRnv8mI4="; 17 }; 18 19 postPatch = ''
+2 -2
pkgs/development/python-modules/types-pytz/default.nix
··· 5 6 buildPythonPackage rec { 7 pname = "types-pytz"; 8 - version = "2023.3.1.0"; 9 format = "setuptools"; 10 11 src = fetchPypi { 12 inherit pname version; 13 - hash = "sha256-jn0hmMukSnLfdiiIfJD2ilaOFEXxTbZGMa9Qw8q4wJA="; 14 }; 15 16 # Modules doesn't have tests
··· 5 6 buildPythonPackage rec { 7 pname = "types-pytz"; 8 + version = "2023.3.1.1"; 9 format = "setuptools"; 10 11 src = fetchPypi { 12 inherit pname version; 13 + hash = "sha256-zCPQGSzUnI9rukTuDIHkWGqPMCBJcPwIlNIJprCNq5o="; 14 }; 15 16 # Modules doesn't have tests
+2 -2
pkgs/development/python-modules/types-requests/default.nix
··· 6 7 buildPythonPackage rec { 8 pname = "types-requests"; 9 - version = "2.31.0.2"; 10 format = "setuptools"; 11 12 src = fetchPypi { 13 inherit pname version; 14 - hash = "sha256-aqP3+vDqUtcouxjAoNFSLZv9jHLSb/b2G/w9BqQRz0A="; 15 }; 16 17 propagatedBuildInputs = [
··· 6 7 buildPythonPackage rec { 8 pname = "types-requests"; 9 + version = "2.31.0.4"; 10 format = "setuptools"; 11 12 src = fetchPypi { 13 inherit pname version; 14 + hash = "sha256-oREEEUjX4EvxAMR2vE2z7msKHNC0AYd39qZgscTxMY0="; 15 }; 16 17 propagatedBuildInputs = [
+2 -2
pkgs/development/tools/faas-cli/default.nix
··· 18 in 19 buildGoModule rec { 20 pname = "faas-cli"; 21 - version = "0.16.12"; 22 23 src = fetchFromGitHub { 24 owner = "openfaas"; 25 repo = "faas-cli"; 26 rev = version; 27 - sha256 = "sha256-1vjqSHm4/MrlbdPTNlFznQqgtu4aYsHnlw366gBgaHA="; 28 }; 29 30 vendorHash = null;
··· 18 in 19 buildGoModule rec { 20 pname = "faas-cli"; 21 + version = "0.16.14"; 22 23 src = fetchFromGitHub { 24 owner = "openfaas"; 25 repo = "faas-cli"; 26 rev = version; 27 + sha256 = "sha256-6zMmm1I2lYt/+9OcesW54Pw0V5bdRYQK5eSYAtZ7Xmo="; 28 }; 29 30 vendorHash = null;
+3 -3
pkgs/development/tools/ginkgo/default.nix
··· 2 3 buildGoModule rec { 4 pname = "ginkgo"; 5 - version = "2.12.0"; 6 7 src = fetchFromGitHub { 8 owner = "onsi"; 9 repo = "ginkgo"; 10 rev = "v${version}"; 11 - sha256 = "sha256-ikZ3vuoGYCbjvcpqol11WZ1PfxqSm1VNfdLDJIlNeP0="; 12 }; 13 - vendorHash = "sha256-huXVFvSd2KkNqb6BWsTY2megnD9dJLy7edX2mGBv0rU="; 14 15 # integration tests expect more file changes 16 # types tests are missing CodeLocation
··· 2 3 buildGoModule rec { 4 pname = "ginkgo"; 5 + version = "2.12.1"; 6 7 src = fetchFromGitHub { 8 owner = "onsi"; 9 repo = "ginkgo"; 10 rev = "v${version}"; 11 + sha256 = "sha256-2nPTCd5kV6qxv4fkneu6A4gzFsRQSJiDfzh08ona0r8="; 12 }; 13 + vendorHash = "sha256-wUpWvq6iiS9HkCi4ztXLNs1nCgAomyUo8YaFcElnfeI="; 14 15 # integration tests expect more file changes 16 # types tests are missing CodeLocation
+14 -5
pkgs/development/tools/language-servers/postgres-lsp/default.nix
··· 6 7 rustPlatform.buildRustPackage rec { 8 pname = "postgres-lsp"; 9 - version = "unstable-2023-08-23"; 10 11 - src = fetchFromGitHub { 12 owner = "supabase"; 13 repo = "postgres_lsp"; 14 - rev = "47dd0132b12661ab6c97f5fba892e567a5109c84"; 15 - hash = "sha256-aV3QAp6DkNrHiDe1Ytiu6UyTWrelV6vO83Baiv4ONLg="; 16 }; 17 18 - cargoHash = "sha256-9d/KiQ7IXhmYvTb97FKJh/cGTdnxAgCXSx4+V74b+RE="; 19 20 nativeBuildInputs = [ 21 protobuf
··· 6 7 rustPlatform.buildRustPackage rec { 8 pname = "postgres-lsp"; 9 + version = "unstable-2023-09-21"; 10 11 + src = (fetchFromGitHub { 12 owner = "supabase"; 13 repo = "postgres_lsp"; 14 + rev = "f25f23a683c4e14dea52e3e423584588ab349081"; 15 + hash = "sha256-z8WIUfgnPYdzhBit1V6A5UktjoYCblTKXxwpbHOmFJA="; 16 + fetchSubmodules = true; 17 + }).overrideAttrs { 18 + # workaround to be able to fetch git@github.com submodules 19 + # https://github.com/NixOS/nixpkgs/issues/195117 20 + env = { 21 + GIT_CONFIG_COUNT = 1; 22 + GIT_CONFIG_KEY_0 = "url.https://github.com/.insteadOf"; 23 + GIT_CONFIG_VALUE_0 = "git@github.com:"; 24 + }; 25 }; 26 27 + cargoHash = "sha256-Nyxiere6/e5Y7YcgHitVkaiS1w3JXkbohIcBNc00YXY="; 28 29 nativeBuildInputs = [ 30 protobuf
+2 -2
pkgs/development/tools/rain/default.nix
··· 7 8 buildGoModule rec { 9 pname = "rain"; 10 - version = "1.5.0"; 11 12 src = fetchFromGitHub { 13 owner = "aws-cloudformation"; 14 repo = pname; 15 rev = "v${version}"; 16 - sha256 = "sha256-vvLvsZhdkxgTREEwLFdF1MwKj1A4rHgJ3y9VdKOl5HE="; 17 }; 18 19 vendorHash = "sha256-xmpjoNfz+4d7Un0J6yEhkQG2Ax8hL0dw4OQmwrKq3QI=";
··· 7 8 buildGoModule rec { 9 pname = "rain"; 10 + version = "1.6.0"; 11 12 src = fetchFromGitHub { 13 owner = "aws-cloudformation"; 14 repo = pname; 15 rev = "v${version}"; 16 + sha256 = "sha256-sAqWVGzEQJwf7ioQjOFs+1hAn69LmDCMSu0ym59aDsU="; 17 }; 18 19 vendorHash = "sha256-xmpjoNfz+4d7Un0J6yEhkQG2Ax8hL0dw4OQmwrKq3QI=";
+2 -2
pkgs/games/lunar-client/default.nix
··· 5 6 let 7 pname = "lunar-client"; 8 - version = "3.0.10"; 9 10 src = fetchurl { 11 url = "https://launcherupdates.lunarclientcdn.com/Lunar%20Client-${version}.AppImage"; 12 - hash = "sha256-mbEV+iciL4+PtfvStyXZXK5Zb91N9H1VJ5amZj+2EyA="; 13 }; 14 15 appimageContents = appimageTools.extract { inherit pname version src; };
··· 5 6 let 7 pname = "lunar-client"; 8 + version = "3.1.0"; 9 10 src = fetchurl { 11 url = "https://launcherupdates.lunarclientcdn.com/Lunar%20Client-${version}.AppImage"; 12 + hash = "sha256-6OAGNkMyHOZI5wh92OtalnvUVFWNAS9PvkFS0e4YXhk="; 13 }; 14 15 appimageContents = appimageTools.extract { inherit pname version src; };
+6 -6
pkgs/os-specific/linux/kernel/zen-kernels.nix
··· 4 # comments with variant added for update script 5 # ./update-zen.py zen 6 zenVariant = { 7 - version = "6.5.4"; #zen 8 - suffix = "zen2"; #zen 9 - sha256 = "0p67v2rhkf0q61cvf310nkg08dpwgmkabid71qp01ig3sdp6rcsy"; #zen 10 isLqx = false; 11 }; 12 # ./update-zen.py lqx 13 lqxVariant = { 14 - version = "6.5.4"; #lqx 15 - suffix = "lqx2"; #lqx 16 - sha256 = "0zz7jn2fic7llppv4ih91jfz0k0q6c04xsyqljhiw6279dsv8h7c"; #lqx 17 isLqx = true; 18 }; 19 zenKernelsFor = { version, suffix, sha256, isLqx }: buildLinux (args // {
··· 4 # comments with variant added for update script 5 # ./update-zen.py zen 6 zenVariant = { 7 + version = "6.5.5"; #zen 8 + suffix = "zen1"; #zen 9 + sha256 = "069hxkww14dpz7k5hd93qnv6clc0dkpd3ncf1wzr5k84a0i9syj8"; #zen 10 isLqx = false; 11 }; 12 # ./update-zen.py lqx 13 lqxVariant = { 14 + version = "6.5.5"; #lqx 15 + suffix = "lqx1"; #lqx 16 + sha256 = "1sr23yjwl7sh58s5f9yy9ld163c5lm0qbn0gqg8bnkshx08r39h8"; #lqx 17 isLqx = true; 18 }; 19 zenKernelsFor = { version, suffix, sha256, isLqx }: buildLinux (args // {
+2
pkgs/tools/filesystems/curlftpfs/default.nix
··· 14 # it is known to cause problems. Search online for "rpl_malloc" and 15 # "rpl_realloc" to find out more. 16 ./fix-rpl_malloc.patch 17 ]; 18 19 nativeBuildInputs = [ autoreconfHook pkg-config ];
··· 14 # it is known to cause problems. Search online for "rpl_malloc" and 15 # "rpl_realloc" to find out more. 16 ./fix-rpl_malloc.patch 17 + ./suse-bug-580609.patch 18 + ./suse-bug-955687.patch 19 ]; 20 21 nativeBuildInputs = [ autoreconfHook pkg-config ];
+10
pkgs/tools/filesystems/curlftpfs/suse-bug-580609.patch
···
··· 1 + --- a/ftpfs.c 2008-04-30 01:05:47.000000000 +0200 2 + +++ b/ftpfs.c 2010-05-21 13:01:42.569006163 +0200 3 + @@ -503,7 +503,6 @@ static void *ftpfs_write_thread(void *da 4 + 5 + curl_easy_setopt_or_die(fh->write_conn, CURLOPT_URL, fh->full_path); 6 + curl_easy_setopt_or_die(fh->write_conn, CURLOPT_UPLOAD, 1); 7 + - curl_easy_setopt_or_die(fh->write_conn, CURLOPT_INFILESIZE, -1); 8 + curl_easy_setopt_or_die(fh->write_conn, CURLOPT_READFUNCTION, write_data_bg); 9 + curl_easy_setopt_or_die(fh->write_conn, CURLOPT_READDATA, fh); 10 + curl_easy_setopt_or_die(fh->write_conn, CURLOPT_LOW_SPEED_LIMIT, 1);
+11
pkgs/tools/filesystems/curlftpfs/suse-bug-955687.patch
···
··· 1 + --- a/ftpfs.c 2 + +++ b/ftpfs.c 3 + @@ -614,6 +614,8 @@ static void free_ftpfs_file(struct ftpfs 4 + sem_destroy(&fh->data_need); 5 + sem_destroy(&fh->data_written); 6 + sem_destroy(&fh->ready); 7 + + if (fh->buf.size) { buf_free(&fh->buf); } 8 + + if (fh->stream_buf.size) { buf_free(&fh->stream_buf); } 9 + free(fh); 10 + } 11 +
+32 -44
pkgs/tools/misc/etcher/default.nix
··· 1 - { lib, stdenv 2 , fetchurl 3 - , gcc-unwrapped 4 - , dpkg 5 , util-linux 6 - , bash 7 , makeWrapper 8 , electron 9 }: 10 11 - let 12 - inherit (stdenv.hostPlatform) system; 13 - 14 - throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}"; 15 - 16 - sha256 = { 17 - "x86_64-linux" = "1rcidar97nnpjb163x9snnnhw1z1ld4asgbd5dxpzdh8hikh66ll"; 18 - "i686-linux" = "1jll4i0j9kh78kl10s596xxs60gy7cnlafgpk89861yihj0i73a5"; 19 - }."${system}" or throwSystem; 20 - 21 - arch = { 22 - "x86_64-linux" = "amd64"; 23 - "i686-linux" = "i386"; 24 - }."${system}" or throwSystem; 25 - 26 - in 27 - 28 stdenv.mkDerivation rec { 29 pname = "etcher"; 30 - version = "1.7.9"; 31 32 src = fetchurl { 33 - url = "https://github.com/balena-io/etcher/releases/download/v${version}/balena-etcher-electron_${version}_${arch}.deb"; 34 - inherit sha256; 35 }; 36 37 - nativeBuildInputs = [ makeWrapper ]; 38 - 39 - dontConfigure = true; 40 - dontBuild = true; 41 - 42 - unpackPhase = '' 43 - ${dpkg}/bin/dpkg-deb -x $src . 44 - ''; 45 - 46 # sudo-prompt has hardcoded binary paths on Linux and we patch them here 47 # along with some other paths 48 postPatch = '' 49 - # use Nix(OS) paths 50 substituteInPlace opt/balenaEtcher/resources/app/generated/gui.js \ 51 --replace '/usr/bin/pkexec' '/usr/bin/pkexec", "/run/wrappers/bin/pkexec' \ 52 --replace '/bin/bash' '${bash}/bin/bash' \ 53 --replace '"lsblk"' '"${util-linux}/bin/lsblk"' 54 ''; 55 56 installPhase = '' 57 runHook preInstall 58 ··· 61 cp -a usr/share/* $out/share 62 cp -a opt/balenaEtcher/{locales,resources} $out/share/${pname} 63 64 - substituteInPlace $out/share/applications/balena-etcher-electron.desktop \ 65 - --replace /opt/balenaEtcher/balena-etcher-electron ${pname} 66 67 runHook postInstall 68 ''; 69 70 - postFixup = '' 71 - makeWrapper ${electron}/bin/electron $out/bin/${pname} \ 72 - --add-flags $out/share/${pname}/resources/app \ 73 - --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ gcc-unwrapped.lib ]}" 74 - ''; 75 - 76 meta = with lib; { 77 description = "Flash OS images to SD cards and USB drives, safely and easily"; 78 homepage = "https://etcher.io/"; 79 license = licenses.asl20; 80 - maintainers = [ maintainers.shou ]; 81 - platforms = [ "i686-linux" "x86_64-linux" ]; 82 sourceProvenance = with sourceTypes; [ binaryNativeCode ]; 83 }; 84 }
··· 1 + { lib 2 + , stdenv 3 , fetchurl 4 + , bash 5 , util-linux 6 + , autoPatchelfHook 7 + , dpkg 8 , makeWrapper 9 + , udev 10 , electron 11 }: 12 13 stdenv.mkDerivation rec { 14 pname = "etcher"; 15 + version = "1.18.12"; 16 17 src = fetchurl { 18 + url = "https://github.com/balena-io/etcher/releases/download/v${version}/balena-etcher_${version}_amd64.deb"; 19 + hash = "sha256-Ucs187xTpbRJ7P32hCl8cHPxO3HCs44ZneAas043FXk="; 20 }; 21 22 # sudo-prompt has hardcoded binary paths on Linux and we patch them here 23 # along with some other paths 24 postPatch = '' 25 substituteInPlace opt/balenaEtcher/resources/app/generated/gui.js \ 26 --replace '/usr/bin/pkexec' '/usr/bin/pkexec", "/run/wrappers/bin/pkexec' \ 27 --replace '/bin/bash' '${bash}/bin/bash' \ 28 --replace '"lsblk"' '"${util-linux}/bin/lsblk"' 29 ''; 30 31 + nativeBuildInputs = [ 32 + autoPatchelfHook 33 + dpkg 34 + makeWrapper 35 + ]; 36 + 37 + buildInputs = [ 38 + stdenv.cc.cc.lib 39 + udev 40 + ]; 41 + 42 + dontConfigure = true; 43 + 44 + dontBuild = true; 45 + 46 installPhase = '' 47 runHook preInstall 48 ··· 51 cp -a usr/share/* $out/share 52 cp -a opt/balenaEtcher/{locales,resources} $out/share/${pname} 53 54 + makeWrapper ${electron}/bin/electron $out/bin/${pname} \ 55 + --add-flags $out/share/${pname}/resources/app 56 + 57 + substituteInPlace $out/share/applications/balena-etcher.desktop \ 58 + --replace /opt/balenaEtcher/balena-etcher ${pname} 59 60 runHook postInstall 61 ''; 62 63 meta = with lib; { 64 description = "Flash OS images to SD cards and USB drives, safely and easily"; 65 homepage = "https://etcher.io/"; 66 license = licenses.asl20; 67 + mainProgram = pname; 68 + maintainers = with maintainers; [ wegank ]; 69 + platforms = [ "x86_64-linux" ]; 70 sourceProvenance = with sourceTypes; [ binaryNativeCode ]; 71 }; 72 }
+2 -2
pkgs/tools/networking/grpc_cli/default.nix
··· 2 3 stdenv.mkDerivation rec { 4 pname = "grpc_cli"; 5 - version = "1.58.0"; 6 src = fetchFromGitHub { 7 owner = "grpc"; 8 repo = "grpc"; 9 rev = "v${version}"; 10 - hash = "sha256-JxkQZSmI3FSAoSd45uciCpsTeGuAvRhG/BGyC4NKOjo="; 11 fetchSubmodules = true; 12 }; 13 nativeBuildInputs = [ automake cmake autoconf ];
··· 2 3 stdenv.mkDerivation rec { 4 pname = "grpc_cli"; 5 + version = "1.58.1"; 6 src = fetchFromGitHub { 7 owner = "grpc"; 8 repo = "grpc"; 9 rev = "v${version}"; 10 + hash = "sha256-h1Zg5f+3NyyvrStEPXqTNSly7TSEPbE1/SqrZfS37Bk="; 11 fetchSubmodules = true; 12 }; 13 nativeBuildInputs = [ automake cmake autoconf ];
+5 -4
pkgs/tools/security/gopass/default.nix
··· 13 14 buildGoModule rec { 15 pname = "gopass"; 16 - version = "1.15.7"; 17 18 nativeBuildInputs = [ installShellFiles makeWrapper ]; 19 ··· 21 owner = "gopasspw"; 22 repo = "gopass"; 23 rev = "v${version}"; 24 - hash = "sha256-Q3EX5giteIsH5+fXb7n2qpd9kBjaZZ/A5VuCljc72C8="; 25 }; 26 27 - vendorHash = "sha256-crnr5qXlYrhNT3nLlA7U13CaYAmAqcV+MBs/hee9ixU="; 28 29 subPackages = [ "." ]; 30 ··· 62 homepage = "https://www.gopass.pw/"; 63 license = licenses.mit; 64 maintainers = with maintainers; [ rvolosatovs sikmir ]; 65 - changelog = "https://github.com/gopasspw/gopass/raw/v${version}/CHANGELOG.md"; 66 67 longDescription = '' 68 gopass is a rewrite of the pass password manager in Go with the aim of ··· 73 users. We go by the UNIX philosophy and try to do one thing and do it 74 well, providing a stellar user experience and a sane, simple interface. 75 ''; 76 }; 77 }
··· 13 14 buildGoModule rec { 15 pname = "gopass"; 16 + version = "1.15.8"; 17 18 nativeBuildInputs = [ installShellFiles makeWrapper ]; 19 ··· 21 owner = "gopasspw"; 22 repo = "gopass"; 23 rev = "v${version}"; 24 + hash = "sha256-l8Ce0ioMnSlet+PMrQCMvyH3IvmQaE1MQSJR9myyLB8="; 25 }; 26 27 + vendorHash = "sha256-xyQTlbTPAC2iG8XQ4oEHBXjfXauwuBhaTbsew23nlVw="; 28 29 subPackages = [ "." ]; 30 ··· 62 homepage = "https://www.gopass.pw/"; 63 license = licenses.mit; 64 maintainers = with maintainers; [ rvolosatovs sikmir ]; 65 + changelog = "https://github.com/gopasspw/gopass/blob/v${version}/CHANGELOG.md"; 66 67 longDescription = '' 68 gopass is a rewrite of the pass password manager in Go with the aim of ··· 73 users. We go by the UNIX philosophy and try to do one thing and do it 74 well, providing a stellar user experience and a sane, simple interface. 75 ''; 76 + mainProgram = "gopass"; 77 }; 78 }
+1
pkgs/tools/security/gopass/git-credential.nix
··· 37 changelog = "https://github.com/gopasspw/git-credential-gopass/blob/v${version}/CHANGELOG.md"; 38 license = licenses.mit; 39 maintainers = with maintainers; [ benneti ]; 40 }; 41 }
··· 37 changelog = "https://github.com/gopasspw/git-credential-gopass/blob/v${version}/CHANGELOG.md"; 38 license = licenses.mit; 39 maintainers = with maintainers; [ benneti ]; 40 + mainProgram = "git-credential-gopass"; 41 }; 42 }
+4 -3
pkgs/tools/security/gopass/hibp.nix
··· 7 8 buildGoModule rec { 9 pname = "gopass-hibp"; 10 - version = "1.15.7"; 11 12 src = fetchFromGitHub { 13 owner = "gopasspw"; 14 repo = "gopass-hibp"; 15 rev = "v${version}"; 16 - hash = "sha256-525e2LXQ/Ldrqhxqndwpdo2HeS4xRkbPzfwvWeiEayE="; 17 }; 18 19 - vendorHash = "sha256-jfqxl21euOtOvt+RltVlSjca2o8VuLtWHgpnW4ve5JM="; 20 21 subPackages = [ "." ]; 22 ··· 37 changelog = "https://github.com/gopasspw/gopass-hibp/blob/v${version}/CHANGELOG.md"; 38 license = licenses.mit; 39 maintainers = with maintainers; [ sikmir ]; 40 }; 41 }
··· 7 8 buildGoModule rec { 9 pname = "gopass-hibp"; 10 + version = "1.15.8"; 11 12 src = fetchFromGitHub { 13 owner = "gopasspw"; 14 repo = "gopass-hibp"; 15 rev = "v${version}"; 16 + hash = "sha256-dNzvC+ubkZPHx40bVwFT2R7TMrPdeD5oJz0lAd0vtw0="; 17 }; 18 19 + vendorHash = "sha256-zaB8xrzqk3moR/ScXdHtqIgA9lZqWFzLWi4NAqbs0XU="; 20 21 subPackages = [ "." ]; 22 ··· 37 changelog = "https://github.com/gopasspw/gopass-hibp/blob/v${version}/CHANGELOG.md"; 38 license = licenses.mit; 39 maintainers = with maintainers; [ sikmir ]; 40 + mainProgram = "gopass-hibp"; 41 }; 42 }
+4 -3
pkgs/tools/security/gopass/jsonapi.nix
··· 8 9 buildGoModule rec { 10 pname = "gopass-jsonapi"; 11 - version = "1.15.7"; 12 13 src = fetchFromGitHub { 14 owner = "gopasspw"; 15 repo = "gopass-jsonapi"; 16 rev = "v${version}"; 17 - hash = "sha256-lwY5uc6eKqXO8FbvzlrpQY0y5AEcV0RQFvvnE+At6z0="; 18 }; 19 20 - vendorHash = "sha256-BKwgP22l4t4jaAHHh+ZD/2nroCtAp/A6DqHt+9HZzKw="; 21 22 subPackages = [ "." ]; 23 ··· 38 changelog = "https://github.com/gopasspw/gopass-jsonapi/blob/v${version}/CHANGELOG.md"; 39 license = licenses.mit; 40 maintainers = with maintainers; [ maxhbr ]; 41 }; 42 }
··· 8 9 buildGoModule rec { 10 pname = "gopass-jsonapi"; 11 + version = "1.15.8"; 12 13 src = fetchFromGitHub { 14 owner = "gopasspw"; 15 repo = "gopass-jsonapi"; 16 rev = "v${version}"; 17 + hash = "sha256-CL9PcztiFCCy1T7w0v2SzLmwkA6z8aPUx65ye5AJDr4="; 18 }; 19 20 + vendorHash = "sha256-Czlp3MyxRGcIV5uFZzF8t0JrucLzPzxyCUCtjICjPM0="; 21 22 subPackages = [ "." ]; 23 ··· 38 changelog = "https://github.com/gopasspw/gopass-jsonapi/blob/v${version}/CHANGELOG.md"; 39 license = licenses.mit; 40 maintainers = with maintainers; [ maxhbr ]; 41 + mainProgram = "gopass-jsonapi"; 42 }; 43 }
+4 -3
pkgs/tools/security/gopass/summon.nix
··· 7 8 buildGoModule rec { 9 pname = "gopass-summon-provider"; 10 - version = "1.15.7"; 11 12 src = fetchFromGitHub { 13 owner = "gopasspw"; 14 repo = "gopass-summon-provider"; 15 rev = "v${version}"; 16 - hash = "sha256-JoSNWgwTnFQbnrwGIk6L5SwQeNg0RfLMULceqFF/XnA="; 17 }; 18 19 - vendorHash = "sha256-gb9AZBh5oUAiuCXbsvkmYxcHRNd9KLYq35nMd4iabKw="; 20 21 subPackages = [ "." ]; 22 ··· 37 changelog = "https://github.com/gopasspw/gopass-summon-provider/blob/v${version}/CHANGELOG.md"; 38 license = licenses.mit; 39 maintainers = with maintainers; [ sikmir ]; 40 }; 41 }
··· 7 8 buildGoModule rec { 9 pname = "gopass-summon-provider"; 10 + version = "1.15.8"; 11 12 src = fetchFromGitHub { 13 owner = "gopasspw"; 14 repo = "gopass-summon-provider"; 15 rev = "v${version}"; 16 + hash = "sha256-7Oj/1h1468zz6r3+Cv5IaIFbkrs0dPteY0SRsOZ8UXI="; 17 }; 18 19 + vendorHash = "sha256-IXY8w5TLXA3SIT2Jyjqt+pPtZ35zQnG0wY08OB1spDw="; 20 21 subPackages = [ "." ]; 22 ··· 37 changelog = "https://github.com/gopasspw/gopass-summon-provider/blob/v${version}/CHANGELOG.md"; 38 license = licenses.mit; 39 maintainers = with maintainers; [ sikmir ]; 40 + mainProgram = "gopass-summon-provider"; 41 }; 42 }
+3 -3
pkgs/tools/text/mdbook-emojicodes/default.nix
··· 7 8 rustPlatform.buildRustPackage rec { 9 pname = "mdbook-emojicodes"; 10 - version = "0.2.2"; 11 12 src = fetchFromGitHub { 13 owner = "blyxyas"; 14 repo = "mdbook-emojicodes"; 15 rev = "${version}"; 16 - hash = "sha256-wj3WVDDJmRh1g4E1iqxqmu6QNNVi9pOqZDnnDX3AnFo="; 17 }; 18 19 - cargoHash = "sha256-Ia7GdMadx1Jb1BB040eRmyIpK98CsN3yjruUxUNh3co="; 20 21 buildInputs = lib.optionals stdenv.isDarwin [ 22 darwin.apple_sdk.frameworks.CoreFoundation
··· 7 8 rustPlatform.buildRustPackage rec { 9 pname = "mdbook-emojicodes"; 10 + version = "0.3.0"; 11 12 src = fetchFromGitHub { 13 owner = "blyxyas"; 14 repo = "mdbook-emojicodes"; 15 rev = "${version}"; 16 + hash = "sha256-dlvfY2AMBvTl0j9YaT+u4CeWQGGihFD8AZaAK4/hUWU="; 17 }; 18 19 + cargoHash = "sha256-SkvAtV613+ARk79dB2zRKoLjPgdzoEKQa3JrRw9qBkA="; 20 21 buildInputs = lib.optionals stdenv.isDarwin [ 22 darwin.apple_sdk.frameworks.CoreFoundation
+1 -1
pkgs/top-level/all-packages.nix
··· 7978 esshader = callPackage ../tools/graphics/esshader { }; 7979 7980 etcher = callPackage ../tools/misc/etcher { 7981 - electron = electron_12; 7982 }; 7983 7984 ethercalc = callPackage ../servers/web-apps/ethercalc { };
··· 7978 esshader = callPackage ../tools/graphics/esshader { }; 7979 7980 etcher = callPackage ../tools/misc/etcher { 7981 + electron = electron_19; 7982 }; 7983 7984 ethercalc = callPackage ../servers/web-apps/ethercalc { };