Merge master into haskell-updates
This commit is contained in:
commit
93341b51c2
13
.github/CODEOWNERS
vendored
13
.github/CODEOWNERS
vendored
|
@ -63,6 +63,15 @@
|
||||||
/.github/PULL_REQUEST_TEMPLATE.md @infinisil
|
/.github/PULL_REQUEST_TEMPLATE.md @infinisil
|
||||||
/doc/contributing/ @fricklerhandwerk @infinisil
|
/doc/contributing/ @fricklerhandwerk @infinisil
|
||||||
/doc/contributing/contributing-to-documentation.chapter.md @jtojnar @fricklerhandwerk @infinisil
|
/doc/contributing/contributing-to-documentation.chapter.md @jtojnar @fricklerhandwerk @infinisil
|
||||||
|
/lib/README.md @infinisil
|
||||||
|
/doc/README.md @infinisil
|
||||||
|
/nixos/README.md @infinisil
|
||||||
|
/pkgs/README.md @infinisil
|
||||||
|
/maintainers/README.md @infinisil
|
||||||
|
|
||||||
|
# User-facing development documentation
|
||||||
|
/doc/development.md @infinisil
|
||||||
|
/doc/development @infinisil
|
||||||
|
|
||||||
# NixOS Internals
|
# NixOS Internals
|
||||||
/nixos/default.nix @infinisil
|
/nixos/default.nix @infinisil
|
||||||
|
@ -305,5 +314,9 @@ nixos/lib/make-multi-disk-zfs-image.nix @raitobezarius
|
||||||
nixos/modules/tasks/filesystems/zfs.nix @raitobezarius
|
nixos/modules/tasks/filesystems/zfs.nix @raitobezarius
|
||||||
nixos/tests/zfs.nix @raitobezarius
|
nixos/tests/zfs.nix @raitobezarius
|
||||||
|
|
||||||
|
# Zig
|
||||||
|
/pkgs/development/compilers/zig @AndersonTorres @figsoda
|
||||||
|
/doc/hooks/zig.section.md @AndersonTorres @figsoda
|
||||||
|
|
||||||
# Linux Kernel
|
# Linux Kernel
|
||||||
pkgs/os-specific/linux/kernel/manual-config.nix @amjoseph-nixpkgs
|
pkgs/os-specific/linux/kernel/manual-config.nix @amjoseph-nixpkgs
|
||||||
|
|
719
CONTRIBUTING.md
719
CONTRIBUTING.md
|
@ -1,77 +1,198 @@
|
||||||
# How to contribute
|
# Contributing to Nixpkgs
|
||||||
|
|
||||||
Note: contributing implies licensing those contributions
|
This document is for people wanting to contribute to the implementation of Nixpkgs.
|
||||||
under the terms of [COPYING](COPYING), which is an MIT-like license.
|
This involves interacting with implementation changes that are proposed using [GitHub](https://github.com/) [pull requests](https://docs.github.com/pull-requests) to the [Nixpkgs](https://github.com/nixos/nixpkgs/) repository (which you're in right now).
|
||||||
|
|
||||||
## Opening issues
|
As such, a GitHub account is recommended, which you can sign up for [here](https://github.com/signup).
|
||||||
|
See [here](https://discourse.nixos.org/t/about-the-patches-category/477) for how to contribute without a GitHub account.
|
||||||
|
|
||||||
* Make sure you have a [GitHub account](https://github.com/signup/free)
|
Additionally this document assumes that you already know how to use GitHub and Git.
|
||||||
* Make sure there is no open issue on the topic
|
If that's not the case, we recommend learning about it first [here](https://docs.github.com/en/get-started/quickstart/hello-world).
|
||||||
* [Submit a new issue](https://github.com/NixOS/nixpkgs/issues/new/choose) by choosing the kind of topic and fill out the template
|
|
||||||
|
|
||||||
## Submitting changes
|
## Overview
|
||||||
|
[overview]: #overview
|
||||||
|
|
||||||
Read the ["Submitting changes"](https://nixos.org/nixpkgs/manual/#chap-submitting-changes) section of the nixpkgs manual. It explains how to write, test, and iterate on your change, and which branch to base your pull request against.
|
This file contains general contributing information, but individual parts also have more specific information to them in their respective `README.md` files, linked here:
|
||||||
|
- [`lib`](./lib/README.md): Sources and documentation of the [library functions](https://nixos.org/manual/nixpkgs/stable/#chap-functions)
|
||||||
|
- [`maintainers`](./maintainers/README.md): Nixpkgs maintainer and team listings, maintainer scripts
|
||||||
|
- [`pkgs`](./pkgs/README.md): Package and [builder](https://nixos.org/manual/nixpkgs/stable/#part-builders) definitions
|
||||||
|
- [`doc`](./doc/README.md): Sources and infrastructure for the [Nixpkgs manual](https://nixos.org/manual/nixpkgs/stable/)
|
||||||
|
- [`nixos`](./nixos/README.md): Implementation of [NixOS](https://nixos.org/manual/nixos/stable/)
|
||||||
|
|
||||||
Below is a short excerpt of some points in there:
|
# How to's
|
||||||
|
|
||||||
* Format the commit messages in the following way:
|
## How to create pull requests
|
||||||
|
[pr-create]: #how-to-create-pull-requests
|
||||||
|
|
||||||
```
|
This section describes in some detail how changes can be made and proposed with pull requests.
|
||||||
(pkg-name | nixos/<module>): (from -> to | init at version | refactor | etc)
|
|
||||||
|
|
||||||
(Motivation for change. Link to release notes. Additional information.)
|
> **Note**
|
||||||
|
> Be aware that contributing implies licensing those contributions under the terms of [COPYING](./COPYING), an MIT-like license.
|
||||||
|
|
||||||
|
0. Set up a local version of Nixpkgs to work with using GitHub and Git
|
||||||
|
1. [Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo#forking-a-repository) the [Nixpkgs repository](https://github.com/nixos/nixpkgs/).
|
||||||
|
1. [Clone the forked repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo#cloning-your-forked-repository) into a local `nixpkgs` directory.
|
||||||
|
1. [Configure the upstream Nixpkgs repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo#configuring-git-to-sync-your-fork-with-the-upstream-repository).
|
||||||
|
|
||||||
|
1. Figure out the branch that should be used for this change by going through [this section][branch].
|
||||||
|
If in doubt use `master`, that's where most changes should go.
|
||||||
|
This can be changed later by [rebasing][rebase].
|
||||||
|
|
||||||
|
2. Create and switch to a new Git branch, ideally such that:
|
||||||
|
- The name of the branch hints at the change you'd like to implement, e.g. `update-hello`.
|
||||||
|
- The base of the branch includes the most recent changes on the base branch from step 1, we'll assume `master` here.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Make sure you have the latest changes from upstream Nixpkgs
|
||||||
|
git fetch upstream
|
||||||
|
|
||||||
|
# Create and switch to a new branch based off the master branch in Nixpkgs
|
||||||
|
git switch --create update-hello upstream/master
|
||||||
|
```
|
||||||
|
|
||||||
|
To avoid having to download and build potentially many derivations, at the expense of using a potentially outdated version, you can base the branch off a specific [Git commit](https://www.git-scm.com/docs/gitglossary#def_commit) instead:
|
||||||
|
- The commit of the latest `nixpkgs-unstable` channel, available [here](https://channels.nixos.org/nixpkgs-unstable/git-revision).
|
||||||
|
- The commit of a local Nixpkgs downloaded using [nix-channel](https://nixos.org/manual/nix/stable/command-ref/nix-channel), available using `nix-instantiate --eval --expr '(import <nixpkgs/lib>).trivial.revisionWithDefault null'`
|
||||||
|
- If you're using NixOS, the commit of your NixOS installation, available with `nixos-version --revision`.
|
||||||
|
|
||||||
|
Once you have an appropriate commit you can use it instead of `upstream/master` in the above command:
|
||||||
|
```bash
|
||||||
|
git switch --create update-hello <the desired base commit>
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Make the desired changes in the local Nixpkgs repository using an editor of your choice.
|
||||||
|
Make sure to:
|
||||||
|
- Adhere to both the [general code conventions][code-conventions], and the code conventions specific to the part you're making changes to.
|
||||||
|
See the [overview section][overview] for more specific information.
|
||||||
|
- Test the changes.
|
||||||
|
See the [overview section][overview] for more specific information.
|
||||||
|
- If necessary, document the change.
|
||||||
|
See the [overview section][overview] for more specific information.
|
||||||
|
|
||||||
|
4. Commit your changes using `git commit`.
|
||||||
|
Make sure to adhere to the [commit conventions](#commit-conventions).
|
||||||
|
|
||||||
|
Repeat the steps 3-4 as many times as necessary.
|
||||||
|
Advance to the next step if all the commits (viewable with `git log`) make sense together.
|
||||||
|
|
||||||
|
5. Push your commits to your fork of Nixpkgs.
|
||||||
|
```
|
||||||
|
git push --set-upstream origin HEAD
|
||||||
|
```
|
||||||
|
|
||||||
|
The above command will output a link that allows you to directly quickly do the next step:
|
||||||
|
```
|
||||||
|
remote: Create a pull request for 'update-hello' on GitHub by visiting:
|
||||||
|
remote: https://github.com/myUser/nixpkgs/pull/new/update-hello
|
||||||
|
```
|
||||||
|
|
||||||
|
6. [Create a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request#creating-the-pull-request) from the new branch in your Nixpkgs fork to the upstream Nixpkgs repository.
|
||||||
|
Use the branch from step 2 as the pull requests base branch.
|
||||||
|
Go through the [pull request template](#pull-request-template) in the pre-filled default description.
|
||||||
|
|
||||||
|
7. Respond to review comments, potential CI failures and potential merge conflicts by updating the pull request.
|
||||||
|
Always keep the pull request in a mergeable state.
|
||||||
|
|
||||||
|
The custom [OfBorg](https://github.com/NixOS/ofborg) CI system will perform various checks to help ensure code quality, whose results you can see at the bottom of the pull request.
|
||||||
|
See [the OfBorg Readme](https://github.com/NixOS/ofborg#readme) for more details.
|
||||||
|
|
||||||
|
- To add new commits, repeat steps 3-4 and push the result using
|
||||||
|
```
|
||||||
|
git push
|
||||||
|
```
|
||||||
|
|
||||||
|
- To change existing commits you will have to [rewrite Git history](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History).
|
||||||
|
Useful Git commands that can help a lot with this are `git commit --patch --amend` and `git rebase --interactive`.
|
||||||
|
With a rewritten history you need to force-push the commits using
|
||||||
|
```
|
||||||
|
git push --force-with-lease
|
||||||
|
```
|
||||||
|
|
||||||
|
- In case of merge conflicts you will also have to [rebase the branch](https://git-scm.com/book/en/v2/Git-Branching-Rebasing) on top of current `master`.
|
||||||
|
Sometimes this can be done [on GitHub directly](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/keeping-your-pull-request-in-sync-with-the-base-branch#updating-your-pull-request-branch), but if not you will have to rebase locally using
|
||||||
|
```
|
||||||
|
git fetch upstream
|
||||||
|
git rebase upstream/master
|
||||||
|
git push --force-with-lease
|
||||||
|
```
|
||||||
|
|
||||||
|
- If you need to change the base branch of the pull request, you can do so by [rebasing][rebase].
|
||||||
|
|
||||||
|
8. If your pull request is merged and [acceptable for releases][release-acceptable] you may [backport][pr-backport] the pull request.
|
||||||
|
|
||||||
|
### Pull request template
|
||||||
|
[pr-template]: #pull-request-template
|
||||||
|
|
||||||
|
The pull request template helps determine what steps have been made for a contribution so far, and will help guide maintainers on the status of a change. The motivation section of the PR should include any extra details the title does not address and link any existing issues related to the pull request.
|
||||||
|
|
||||||
|
When a PR is created, it will be pre-populated with some checkboxes detailed below:
|
||||||
|
|
||||||
|
#### Tested using sandboxing
|
||||||
|
|
||||||
|
When sandbox builds are enabled, Nix will setup an isolated environment for each build process. It is used to remove further hidden dependencies set by the build environment to improve reproducibility. This includes access to the network during the build outside of `fetch*` functions and files outside the Nix store. Depending on the operating system access to other resources are blocked as well (ex. inter process communication is isolated on Linux); see [sandbox](https://nixos.org/nix/manual/#conf-sandbox) in Nix manual for details.
|
||||||
|
|
||||||
|
Sandboxing is not enabled by default in Nix due to a small performance hit on each build. In pull requests for [nixpkgs](https://github.com/NixOS/nixpkgs/) people are asked to test builds with sandboxing enabled (see `Tested using sandboxing` in the pull request template) because in [Hydra](https://nixos.org/hydra/) sandboxing is also used.
|
||||||
|
|
||||||
|
Depending if you use NixOS or other platforms you can use one of the following methods to enable sandboxing **before** building the package:
|
||||||
|
|
||||||
|
- **Globally enable sandboxing on NixOS**: add the following to `configuration.nix`
|
||||||
|
|
||||||
|
```nix
|
||||||
|
nix.settings.sandbox = true;
|
||||||
```
|
```
|
||||||
|
|
||||||
For consistency, there should not be a period at the end of the commit message's summary line (the first line of the commit message).
|
- **Globally enable sandboxing on non-NixOS platforms**: add the following to: `/etc/nix/nix.conf`
|
||||||
|
|
||||||
Examples:
|
```ini
|
||||||
|
sandbox = true
|
||||||
|
```
|
||||||
|
|
||||||
* nginx: init at 2.0.1
|
#### Built on platform(s)
|
||||||
* firefox: 54.0.1 -> 55.0
|
|
||||||
https://www.mozilla.org/en-US/firefox/55.0/releasenotes/
|
|
||||||
* nixos/hydra: add bazBaz option
|
|
||||||
|
|
||||||
Dual baz behavior is needed to do foo.
|
Many Nix packages are designed to run on multiple platforms. As such, it’s important to let the maintainer know which platforms your changes have been tested on. It’s not always practical to test a change on all platforms, and is not required for a pull request to be merged. Only check the systems you tested the build on in this section.
|
||||||
* nixos/nginx: refactor config generation
|
|
||||||
|
|
||||||
The old config generation system used impure shell scripts and could break in specific circumstances (see #1234).
|
#### Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
|
||||||
|
|
||||||
* `meta.description` must:
|
Packages with automated tests are much more likely to be merged in a timely fashion because it doesn’t require as much manual testing by the maintainer to verify the functionality of the package. If there are existing tests for the package, they should be run to verify your changes do not break the tests. Tests can only be run on Linux. For more details on writing and running tests, see the [section in the NixOS manual](https://nixos.org/nixos/manual/index.html#sec-nixos-tests).
|
||||||
* Be short, just one sentence.
|
|
||||||
* Be capitalized.
|
|
||||||
* Not start with the package name.
|
|
||||||
* More generally, it should not refer to the package name.
|
|
||||||
* Not end with a period (or any punctuation for that matter).
|
|
||||||
* Aim to inform while avoiding subjective language.
|
|
||||||
* `meta.license` must be set and fit the upstream license.
|
|
||||||
* If there is no upstream license, `meta.license` should default to `lib.licenses.unfree`.
|
|
||||||
* If in doubt, try to contact the upstream developers for clarification.
|
|
||||||
* `meta.mainProgram` must be set when appropriate.
|
|
||||||
* `meta.maintainers` should be set.
|
|
||||||
|
|
||||||
See the nixpkgs manual for more details on [standard meta-attributes](https://nixos.org/nixpkgs/manual/#sec-standard-meta-attributes).
|
#### Tested compilation of all pkgs that depend on this change using `nixpkgs-review`
|
||||||
|
|
||||||
## Writing good commit messages
|
If you are modifying a package, you can use `nixpkgs-review` to make sure all packages that depend on the updated package still compile correctly. The `nixpkgs-review` utility can look for and build all dependencies either based on uncommitted changes with the `wip` option or specifying a GitHub pull request number.
|
||||||
|
|
||||||
In addition to writing properly formatted commit messages, it's important to include relevant information so other developers can later understand *why* a change was made. While this information usually can be found by digging code, mailing list/Discourse archives, pull request discussions or upstream changes, it may require a lot of work.
|
Review changes from pull request number 12345:
|
||||||
|
|
||||||
Package version upgrades usually allow for simpler commit messages, including attribute name, old and new version, as well as a reference to the relevant release notes/changelog. Every once in a while a package upgrade requires more extensive changes, and that subsequently warrants a more verbose message.
|
```ShellSession
|
||||||
|
nix-shell -p nixpkgs-review --run "nixpkgs-review pr 12345"
|
||||||
|
```
|
||||||
|
|
||||||
Pull requests should not be squash merged in order to keep complete commit messages and GPG signatures intact and must not be when the change doesn't make sense as a single commit.
|
Alternatively, with flakes (and analogously for the other commands below):
|
||||||
This means that, when addressing review comments in order to keep the pull request in an always mergeable status, you will sometimes need to rewrite your branch's history and then force-push it with `git push --force-with-lease`.
|
|
||||||
Useful git commands that can help a lot with this are `git commit --patch --amend` and `git rebase --interactive`. For more details consult the git man pages or online resources like [git-rebase.io](https://git-rebase.io/) or [The Pro Git Book](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History).
|
|
||||||
|
|
||||||
## Testing changes
|
```ShellSession
|
||||||
|
nix run nixpkgs#nixpkgs-review -- pr 12345
|
||||||
|
```
|
||||||
|
|
||||||
To run the main types of tests locally:
|
Review uncommitted changes:
|
||||||
|
|
||||||
- Run package-internal tests with `nix-build --attr pkgs.PACKAGE.passthru.tests`
|
```ShellSession
|
||||||
- Run [NixOS tests](https://nixos.org/manual/nixos/unstable/#sec-nixos-tests) with `nix-build --attr nixosTest.NAME`, where `NAME` is the name of the test listed in `nixos/tests/all-tests.nix`
|
nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
|
||||||
- Run [global package tests](https://nixos.org/manual/nixpkgs/unstable/#sec-package-tests) with `nix-build --attr tests.PACKAGE`, where `PACKAGE` is the name of the test listed in `pkgs/test/default.nix`
|
```
|
||||||
- See `lib/tests/NAME.nix` for instructions on running specific library tests
|
|
||||||
|
|
||||||
## Rebasing between branches (i.e. from master to staging)
|
Review changes from last commit:
|
||||||
|
|
||||||
|
```ShellSession
|
||||||
|
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Tested execution of all binary files (usually in `./result/bin/`)
|
||||||
|
|
||||||
|
It’s important to test any executables generated by a build when you change or create a package in nixpkgs. This can be done by looking in `./result/bin` and running any files in there, or at a minimum, the main executable for the package. For example, if you make a change to texlive, you probably would only check the binaries associated with the change you made rather than testing all of them.
|
||||||
|
|
||||||
|
#### Meets Nixpkgs contribution standards
|
||||||
|
|
||||||
|
The last checkbox is about whether it fits the guidelines in this `CONTRIBUTING.md` file. This document has detailed information on standards the Nix community has for commit messages, reviews, licensing of contributions you make to the project, etc... Everyone should read and understand the standards the community has for contributing before submitting a pull request.
|
||||||
|
|
||||||
|
### Rebasing between branches (i.e. from master to staging)
|
||||||
|
[rebase]: #rebasing-between-branches-ie-from-master-to-staging
|
||||||
|
|
||||||
From time to time, changes between branches must be rebased, for example, if the
|
From time to time, changes between branches must be rebased, for example, if the
|
||||||
number of new rebuilds they would cause is too large for the target branch. When
|
number of new rebuilds they would cause is too large for the target branch. When
|
||||||
|
@ -115,7 +236,7 @@ git status
|
||||||
git push origin feature --force-with-lease
|
git push origin feature --force-with-lease
|
||||||
```
|
```
|
||||||
|
|
||||||
### Something went wrong and a lot of people were pinged
|
#### Something went wrong and a lot of people were pinged
|
||||||
|
|
||||||
It happens. Remember to be kind, especially to new contributors.
|
It happens. Remember to be kind, especially to new contributors.
|
||||||
There is no way back, so the pull request should be closed and locked
|
There is no way back, so the pull request should be closed and locked
|
||||||
|
@ -145,32 +266,488 @@ for review, which allows you to sidestep this issue.
|
||||||
This is not a bulletproof method though, as OfBorg still does review requests even on draft PRs.
|
This is not a bulletproof method though, as OfBorg still does review requests even on draft PRs.
|
||||||
```
|
```
|
||||||
|
|
||||||
## Backporting changes
|
## How to backport pull requests
|
||||||
|
[pr-backport]: #how-to-backport-pull-requests
|
||||||
|
|
||||||
Follow these steps to backport a change into a release branch in compliance with the [commit policy](https://nixos.org/nixpkgs/manual/#submitting-changes-stable-release-branches).
|
Once a pull request has been merged into `master`, a backport pull request to the corresponding `release-YY.MM` branch can be created either automatically or manually.
|
||||||
|
|
||||||
You can add a label such as `backport release-23.05` to a PR, so that merging it will
|
### Automatically backporting changes
|
||||||
automatically create a backport (via [a GitHub Action](.github/workflows/backport.yml)).
|
|
||||||
This also works for pull requests that have already been merged, and might take a couple of minutes to trigger.
|
|
||||||
|
|
||||||
You can also create the backport manually:
|
> **Note**
|
||||||
|
> You have to be a [Nixpkgs maintainer](./maintainers) to automatically create a backport pull request.
|
||||||
|
|
||||||
1. Take note of the commits in which the change was introduced into `master` branch.
|
Add the [`backport release-YY.MM` label](https://github.com/NixOS/nixpkgs/labels?q=backport) to the pull request on the `master` branch.
|
||||||
2. Check out the target _release branch_, e.g. `release-23.05`. Do not use a _channel branch_ like `nixos-23.05` or `nixpkgs-23.05-darwin`.
|
This will cause [a GitHub Action](.github/workflows/backport.yml) to open a pull request to the `release-YY.MM` branch a few minutes later.
|
||||||
3. Create a branch for your change, e.g. `git checkout -b backport`.
|
This can be done on both open or already merged pull requests.
|
||||||
4. When the reason to backport is not obvious from the original commit message, use `git cherry-pick -xe <original commit>` and add a reason. Otherwise use `git cherry-pick -x <original commit>`. That's fine for minor version updates that only include security and bug fixes, commits that fixes an otherwise broken package or similar. Please also ensure the commits exists on the master branch; in the case of squashed or rebased merges, the commit hash will change and the new commits can be found in the merge message at the bottom of the master pull request.
|
|
||||||
5. Push to GitHub and open a backport pull request. Make sure to select the release branch (e.g. `release-23.05`) as the target branch of the pull request, and link to the pull request in which the original change was committed to `master`. The pull request title should be the commit title with the release version as prefix, e.g. `[23.05]`.
|
|
||||||
6. When the backport pull request is merged and you have the necessary privileges you can also replace the label `9.needs: port to stable` with `8.has: port to stable` on the original pull request. This way maintainers can keep track of missing backports easier.
|
|
||||||
|
|
||||||
## Criteria for Backporting changes
|
### Manually backporting changes
|
||||||
|
|
||||||
Anything that does not cause user or downstream dependency regressions can be backported. This includes:
|
To manually create a backport pull request, follow [the standard pull request process][pr-create], with these notable differences:
|
||||||
- New Packages / Modules
|
|
||||||
- Security / Patch updates
|
|
||||||
- Version updates which include new functionality (but no breaking changes)
|
|
||||||
- Services which require a client to be up-to-date regardless. (E.g. `spotify`, `steam`, or `discord`)
|
|
||||||
- Security critical applications (E.g. `firefox`)
|
|
||||||
|
|
||||||
## Reviewing contributions
|
- Use `release-YY.MM` for the base branch, both for the local branch and the pull request.
|
||||||
|
> **Warning**
|
||||||
|
> Do not use the `nixos-YY.MM` branch, that is a branch pointing to the tested release channel commit
|
||||||
|
|
||||||
See the nixpkgs manual for more details on how to [Review contributions](https://nixos.org/nixpkgs/manual/#chap-reviewing-contributions).
|
- Instead of manually making and committing the changes, use [`git cherry-pick -x`](https://git-scm.com/docs/git-cherry-pick) for each commit from the pull request you'd like to backport.
|
||||||
|
Either `git cherry-pick -x <commit>` when the reason for the backport is obvious (such as minor versions, fixes, etc.), otherwise use `git cherry-pick -xe <commit>` to add a reason for the backport to the commit message.
|
||||||
|
Here is [an example](https://github.com/nixos/nixpkgs/commit/5688c39af5a6c5f3d646343443683da880eaefb8) of this.
|
||||||
|
|
||||||
|
> **Warning**
|
||||||
|
> Ensure the commits exists on the master branch.
|
||||||
|
> In the case of squashed or rebased merges, the commit hash will change and the new commits can be found in the merge message at the bottom of the master pull request.
|
||||||
|
|
||||||
|
- In the pull request description, link to the original pull request to `master`.
|
||||||
|
The pull request title should include `[YY.MM]` matching the release you're backporting to.
|
||||||
|
|
||||||
|
- When the backport pull request is merged and you have the necessary privileges you can also replace the label `9.needs: port to stable` with `8.has: port to stable` on the original pull request.
|
||||||
|
This way maintainers can keep track of missing backports easier.
|
||||||
|
|
||||||
|
## How to review pull requests
|
||||||
|
[pr-review]: #how-to-review-pull-requests
|
||||||
|
|
||||||
|
> **Warning**
|
||||||
|
> The following section is a draft, and the policy for reviewing is still being discussed in issues such as [#11166](https://github.com/NixOS/nixpkgs/issues/11166) and [#20836](https://github.com/NixOS/nixpkgs/issues/20836).
|
||||||
|
|
||||||
|
The Nixpkgs project receives a fairly high number of contributions via GitHub pull requests. Reviewing and approving these is an important task and a way to contribute to the project.
|
||||||
|
|
||||||
|
The high change rate of Nixpkgs makes any pull request that remains open for too long subject to conflicts that will require extra work from the submitter or the merger. Reviewing pull requests in a timely manner and being responsive to the comments is the key to avoid this issue. GitHub provides sort filters that can be used to see the [most recently](https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) and the [least recently](https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-asc) updated pull requests. We highly encourage looking at [this list of ready to merge, unreviewed pull requests](https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+is%3Aopen+review%3Anone+status%3Asuccess+-label%3A%222.status%3A+work-in-progress%22+no%3Aproject+no%3Aassignee+no%3Amilestone).
|
||||||
|
|
||||||
|
When reviewing a pull request, please always be nice and polite. Controversial changes can lead to controversial opinions, but it is important to respect every community member and their work.
|
||||||
|
|
||||||
|
GitHub provides reactions as a simple and quick way to provide feedback to pull requests or any comments. The thumb-down reaction should be used with care and if possible accompanied with some explanation so the submitter has directions to improve their contribution.
|
||||||
|
|
||||||
|
Pull request reviews should include a list of what has been reviewed in a comment, so other reviewers and mergers can know the state of the review.
|
||||||
|
|
||||||
|
All the review template samples provided in this section are generic and meant as examples. Their usage is optional and the reviewer is free to adapt them to their liking.
|
||||||
|
|
||||||
|
To get more information about how to review specific parts of Nixpkgs, refer to the documents linked to in the [overview section][overview].
|
||||||
|
|
||||||
|
If you consider having enough knowledge and experience in a topic and would like to be a long-term reviewer for related submissions, please contact the current reviewers for that topic. They will give you information about the reviewing process. The main reviewers for a topic can be hard to find as there is no list, but checking past pull requests to see who reviewed or git-blaming the code to see who committed to that topic can give some hints.
|
||||||
|
|
||||||
|
Container system, boot system and library changes are some examples of the pull requests fitting this category.
|
||||||
|
|
||||||
|
## How to merge pull requests
|
||||||
|
[pr-merge]: #how-to-merge-pull-requests
|
||||||
|
|
||||||
|
The *Nixpkgs committers* are people who have been given
|
||||||
|
permission to merge.
|
||||||
|
|
||||||
|
It is possible for community members that have enough knowledge and experience on a special topic to contribute by merging pull requests.
|
||||||
|
|
||||||
|
In case the PR is stuck waiting for the original author to apply a trivial
|
||||||
|
change (a typo, capitalisation change, etc.) and the author allowed the members
|
||||||
|
to modify the PR, consider applying it yourself (or commit the existing review
|
||||||
|
suggestion). You should pay extra attention to make sure the addition doesn't go
|
||||||
|
against the idea of the original PR and would not be opposed by the author.
|
||||||
|
|
||||||
|
<!--
|
||||||
|
The following paragraphs about how to deal with unactive contributors is just a proposition and should be modified to what the community agrees to be the right policy.
|
||||||
|
|
||||||
|
Please note that contributors with commit rights unactive for more than three months will have their commit rights revoked.
|
||||||
|
-->
|
||||||
|
|
||||||
|
Please see the discussion in [GitHub nixpkgs issue #50105](https://github.com/NixOS/nixpkgs/issues/50105) for information on how to proceed to be granted this level of access.
|
||||||
|
|
||||||
|
In a case a contributor definitively leaves the Nix community, they should create an issue or post on [Discourse](https://discourse.nixos.org) with references of packages and modules they maintain so the maintainership can be taken over by other contributors.
|
||||||
|
|
||||||
|
# Flow of merged pull requests
|
||||||
|
|
||||||
|
After a pull requests is merged, it eventually makes it to the [official Hydra CI](https://hydra.nixos.org/).
|
||||||
|
Hydra regularly evaluates and builds Nixpkgs, updating [the official channels](http://channels.nixos.org/) when specific Hydra jobs succeeded.
|
||||||
|
See [Nix Channel Status](https://status.nixos.org/) for the current channels and their state.
|
||||||
|
Here's a brief overview of the main Git branches and what channels they're used for:
|
||||||
|
|
||||||
|
- `master`: The main branch, used for the unstable channels such as `nixpkgs-unstable`, `nixos-unstable` and `nixos-unstable-small`.
|
||||||
|
- `release-YY.MM` (e.g. `release-23.05`): The NixOS release branches, used for the stable channels such as `nixos-23.05`, `nixos-23.05-small` and `nixpkgs-23.05-darwin`.
|
||||||
|
|
||||||
|
When a channel is updated, a corresponding Git branch is also updated to point to the corresponding commit.
|
||||||
|
So e.g. the [`nixpkgs-unstable` branch](https://github.com/nixos/nixpkgs/tree/nixpkgs-unstable) corresponds to the Git commit from the [`nixpkgs-unstable` channel](https://channels.nixos.org/nixpkgs-unstable).
|
||||||
|
|
||||||
|
Nixpkgs in its entirety is tied to the NixOS release process, which is documented in the [NixOS Release Wiki](https://nixos.github.io/release-wiki/).
|
||||||
|
|
||||||
|
See [this section][branch] to know when to use the release branches.
|
||||||
|
|
||||||
|
## Staging
|
||||||
|
[staging]: #staging
|
||||||
|
|
||||||
|
The staging workflow exists to batch Hydra builds of many packages together.
|
||||||
|
|
||||||
|
It works by directing commits that cause [mass rebuilds][mass-rebuild] to a separate `staging` branch that isn't directly built by Hydra.
|
||||||
|
Regularly, the `staging` branch is _manually_ merged into a `staging-next` branch to be built by Hydra using the [`nixpkgs:staging-next` jobset](https://hydra.nixos.org/jobset/nixpkgs/staging-next).
|
||||||
|
The `staging-next` branch should then only receive direct commits in order to fix Hydra builds.
|
||||||
|
Once it is verified that there are no major regressions, it is merged into `master` using [a pull requests](https://github.com/NixOS/nixpkgs/pulls?q=head%3Astaging-next).
|
||||||
|
This is done manually in order to ensure it's a good use of Hydra's computing resources.
|
||||||
|
By keeping the `staging-next` branch separate from `staging`, this batching does not block developers from merging changes into `staging`.
|
||||||
|
|
||||||
|
In order for the `staging` and `staging-next` branches to be up-to-date with the latest commits on `master`, there are regular _automated_ merges from `master` into `staging-next` and `staging`.
|
||||||
|
This is implemented using GitHub workflows [here](.github/workflows/periodic-merge-6h.yml) and [here](.github/workflows/periodic-merge-24h.yml).
|
||||||
|
|
||||||
|
> **Note**
|
||||||
|
> Changes must be sufficiently tested before being merged into any branch.
|
||||||
|
> Hydra builds should not be used as testing platform.
|
||||||
|
|
||||||
|
Here is a Git history diagram showing the flow of commits between the three branches:
|
||||||
|
```mermaid
|
||||||
|
%%{init: {
|
||||||
|
'theme': 'base',
|
||||||
|
'themeVariables': {
|
||||||
|
'gitInv0': '#ff0000',
|
||||||
|
'gitInv1': '#ff0000',
|
||||||
|
'git2': '#ff4444',
|
||||||
|
'commitLabelFontSize': '15px'
|
||||||
|
},
|
||||||
|
'gitGraph': {
|
||||||
|
'showCommitLabel':true,
|
||||||
|
'mainBranchName': 'master',
|
||||||
|
'rotateCommitLabel': true
|
||||||
|
}
|
||||||
|
} }%%
|
||||||
|
gitGraph
|
||||||
|
commit id:" "
|
||||||
|
branch staging-next
|
||||||
|
branch staging
|
||||||
|
|
||||||
|
checkout master
|
||||||
|
checkout staging
|
||||||
|
checkout master
|
||||||
|
commit id:" "
|
||||||
|
checkout staging-next
|
||||||
|
merge master id:"automatic"
|
||||||
|
checkout staging
|
||||||
|
merge staging-next id:"automatic "
|
||||||
|
|
||||||
|
checkout staging-next
|
||||||
|
merge staging type:HIGHLIGHT id:"manual"
|
||||||
|
commit id:"fixup"
|
||||||
|
|
||||||
|
checkout master
|
||||||
|
checkout staging
|
||||||
|
checkout master
|
||||||
|
commit id:" "
|
||||||
|
checkout staging-next
|
||||||
|
merge master id:"automatic "
|
||||||
|
checkout staging
|
||||||
|
merge staging-next id:"automatic "
|
||||||
|
|
||||||
|
checkout staging-next
|
||||||
|
commit id:"fixup "
|
||||||
|
checkout master
|
||||||
|
merge staging-next type:HIGHLIGHT id:"manual (PR)"
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
Here's an overview of the different branches:
|
||||||
|
|
||||||
|
| branch | `master` | `staging` | `staging-next` |
|
||||||
|
| --- | --- | --- | --- |
|
||||||
|
| Used for development | ✔️ | ✔️ | ❌ |
|
||||||
|
| Built by Hydra | ✔️ | ❌ | ✔️ |
|
||||||
|
| [Mass rebuilds][mass-rebuild] | ❌ | ✔️ | ⚠️ Only to fix Hydra builds |
|
||||||
|
| Critical security fixes | ✔️ for non-mass-rebuilds | ❌ | ✔️ for mass-rebuilds |
|
||||||
|
| Automatically merged into | `staging-next` | - | `staging` |
|
||||||
|
| Manually merged into | - | `staging-next` | `master` |
|
||||||
|
|
||||||
|
The staging workflow is used for all main branches, `master` and `release-YY.MM`, with corresponding names:
|
||||||
|
- `master`/`release-YY.MM`
|
||||||
|
- `staging`/`staging-YY.MM`
|
||||||
|
- `staging-next`/`staging-next-YY.MM`
|
||||||
|
|
||||||
|
# Conventions
|
||||||
|
|
||||||
|
## Branch conventions
|
||||||
|
<!-- This section is relevant to both contributors and reviewers -->
|
||||||
|
[branch]: #branch-conventions
|
||||||
|
|
||||||
|
Most changes should go to the `master` branch, but sometimes other branches should be used instead.
|
||||||
|
Use the following decision process to figure out which one it should be:
|
||||||
|
|
||||||
|
Is the change [acceptable for releases][release-acceptable] and do you wish to have the change in the release?
|
||||||
|
- No: Use the `master` branch, do not backport the pull request.
|
||||||
|
- Yes: Can the change be implemented the same way on the `master` and release branches?
|
||||||
|
For example, a packages major version might differ between the `master` and release branches, such that separate security patches are required.
|
||||||
|
- Yes: Use the `master` branch and [backport the pull request](#backporting-changes).
|
||||||
|
- No: Create separate pull requests to the `master` and `release-XX.YY` branches.
|
||||||
|
|
||||||
|
Furthermore, if the change causes a [mass rebuild][mass-rebuild], use the appropriate staging branch instead:
|
||||||
|
- Mass rebuilds to `master` should go to `staging` instead.
|
||||||
|
- Mass rebuilds to `release-XX.YY` should go to `staging-XX.YY` instead.
|
||||||
|
|
||||||
|
See [this section][staging] for more details about such changes propagate between the branches.
|
||||||
|
|
||||||
|
### Changes acceptable for releases
|
||||||
|
[release-acceptable]: #changes-acceptable-for-releases
|
||||||
|
|
||||||
|
Only changes to supported releases may be accepted.
|
||||||
|
The oldest supported release (`YYMM`) can be found using
|
||||||
|
```
|
||||||
|
nix-instantiate --eval -A lib.trivial.oldestSupportedRelease
|
||||||
|
```
|
||||||
|
|
||||||
|
The release branches should generally not receive any breaking changes, both for the Nix expressions and derivations.
|
||||||
|
So these changes are acceptable to backport:
|
||||||
|
- New packages, modules and functions
|
||||||
|
- Security fixes
|
||||||
|
- Package version updates
|
||||||
|
- Patch versions with fixes
|
||||||
|
- Minor versions with new functionality, but no breaking changes
|
||||||
|
|
||||||
|
In addition, major package version updates with breaking changes are also acceptable for:
|
||||||
|
- Services that would fail without up-to-date client software, such as `spotify`, `steam`, and `discord`
|
||||||
|
- Security critical applications, such as `firefox` and `chromium`
|
||||||
|
|
||||||
|
### Changes causing mass rebuilds
|
||||||
|
[mass-rebuild]: #changes-causing-mass-rebuilds
|
||||||
|
|
||||||
|
Which changes cause mass rebuilds is not formally defined.
|
||||||
|
In order to help the decision, CI automatically assigns [`rebuild` labels](https://github.com/NixOS/nixpkgs/labels?q=rebuild) to pull requests based on the number of packages they cause rebuilds for.
|
||||||
|
As a rule of thumb, if the number of rebuilds is **over 500**, it can be considered a mass rebuild.
|
||||||
|
To get a sense for what changes are considered mass rebuilds, see [previously merged pull requests to the staging branches](https://github.com/NixOS/nixpkgs/issues?q=base%3Astaging+-base%3Astaging-next+is%3Amerged).
|
||||||
|
|
||||||
|
## Commit conventions
|
||||||
|
[commit-conventions]: #commit-conventions
|
||||||
|
|
||||||
|
- Create a commit for each logical unit.
|
||||||
|
|
||||||
|
- Check for unnecessary whitespace with `git diff --check` before committing.
|
||||||
|
|
||||||
|
- If you have commits `pkg-name: oh, forgot to insert whitespace`: squash commits in this case. Use `git rebase -i`.
|
||||||
|
|
||||||
|
- Format the commit messages in the following way:
|
||||||
|
|
||||||
|
```
|
||||||
|
(pkg-name | nixos/<module>): (from -> to | init at version | refactor | etc)
|
||||||
|
|
||||||
|
(Motivation for change. Link to release notes. Additional information.)
|
||||||
|
```
|
||||||
|
|
||||||
|
For consistency, there should not be a period at the end of the commit message's summary line (the first line of the commit message).
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
* nginx: init at 2.0.1
|
||||||
|
* firefox: 54.0.1 -> 55.0
|
||||||
|
|
||||||
|
https://www.mozilla.org/en-US/firefox/55.0/releasenotes/
|
||||||
|
* nixos/hydra: add bazBaz option
|
||||||
|
|
||||||
|
Dual baz behavior is needed to do foo.
|
||||||
|
* nixos/nginx: refactor config generation
|
||||||
|
|
||||||
|
The old config generation system used impure shell scripts and could break in specific circumstances (see #1234).
|
||||||
|
|
||||||
|
### Writing good commit messages
|
||||||
|
|
||||||
|
In addition to writing properly formatted commit messages, it's important to include relevant information so other developers can later understand *why* a change was made. While this information usually can be found by digging code, mailing list/Discourse archives, pull request discussions or upstream changes, it may require a lot of work.
|
||||||
|
|
||||||
|
Package version upgrades usually allow for simpler commit messages, including attribute name, old and new version, as well as a reference to the relevant release notes/changelog. Every once in a while a package upgrade requires more extensive changes, and that subsequently warrants a more verbose message.
|
||||||
|
|
||||||
|
Pull requests should not be squash merged in order to keep complete commit messages and GPG signatures intact and must not be when the change doesn't make sense as a single commit.
|
||||||
|
|
||||||
|
## Code conventions
|
||||||
|
[code-conventions]: #code-conventions
|
||||||
|
|
||||||
|
### Release notes
|
||||||
|
|
||||||
|
If you removed packages or made some major NixOS changes, write about it in the release notes for the next stable release in [`nixos/doc/manual/release-notes`](./nixos/doc/manual/release-notes).
|
||||||
|
|
||||||
|
### File naming and organisation
|
||||||
|
|
||||||
|
Names of files and directories should be in lowercase, with dashes between words — not in camel case. For instance, it should be `all-packages.nix`, not `allPackages.nix` or `AllPackages.nix`.
|
||||||
|
|
||||||
|
### Syntax
|
||||||
|
|
||||||
|
- Use 2 spaces of indentation per indentation level in Nix expressions, 4 spaces in shell scripts.
|
||||||
|
|
||||||
|
- Do not use tab characters, i.e. configure your editor to use soft tabs. For instance, use `(setq-default indent-tabs-mode nil)` in Emacs. Everybody has different tab settings so it’s asking for trouble.
|
||||||
|
|
||||||
|
- Use `lowerCamelCase` for variable names, not `UpperCamelCase`. Note, this rule does not apply to package attribute names, which instead follow the rules in [](#sec-package-naming).
|
||||||
|
|
||||||
|
- Function calls with attribute set arguments are written as
|
||||||
|
|
||||||
|
```nix
|
||||||
|
foo {
|
||||||
|
arg = ...;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
not
|
||||||
|
|
||||||
|
```nix
|
||||||
|
foo
|
||||||
|
{
|
||||||
|
arg = ...;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Also fine is
|
||||||
|
|
||||||
|
```nix
|
||||||
|
foo { arg = ...; }
|
||||||
|
```
|
||||||
|
|
||||||
|
if it's a short call.
|
||||||
|
|
||||||
|
- In attribute sets or lists that span multiple lines, the attribute names or list elements should be aligned:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
# A long list.
|
||||||
|
list = [
|
||||||
|
elem1
|
||||||
|
elem2
|
||||||
|
elem3
|
||||||
|
];
|
||||||
|
|
||||||
|
# A long attribute set.
|
||||||
|
attrs = {
|
||||||
|
attr1 = short_expr;
|
||||||
|
attr2 =
|
||||||
|
if true then big_expr else big_expr;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Combined
|
||||||
|
listOfAttrs = [
|
||||||
|
{
|
||||||
|
attr1 = 3;
|
||||||
|
attr2 = "fff";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
attr1 = 5;
|
||||||
|
attr2 = "ggg";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
```
|
||||||
|
|
||||||
|
- Short lists or attribute sets can be written on one line:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
# A short list.
|
||||||
|
list = [ elem1 elem2 elem3 ];
|
||||||
|
|
||||||
|
# A short set.
|
||||||
|
attrs = { x = 1280; y = 1024; };
|
||||||
|
```
|
||||||
|
|
||||||
|
- Breaking in the middle of a function argument can give hard-to-read code, like
|
||||||
|
|
||||||
|
```nix
|
||||||
|
someFunction { x = 1280;
|
||||||
|
y = 1024; } otherArg
|
||||||
|
yetAnotherArg
|
||||||
|
```
|
||||||
|
|
||||||
|
(especially if the argument is very large, spanning multiple lines).
|
||||||
|
|
||||||
|
Better:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
someFunction
|
||||||
|
{ x = 1280; y = 1024; }
|
||||||
|
otherArg
|
||||||
|
yetAnotherArg
|
||||||
|
```
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
```nix
|
||||||
|
let res = { x = 1280; y = 1024; };
|
||||||
|
in someFunction res otherArg yetAnotherArg
|
||||||
|
```
|
||||||
|
|
||||||
|
- The bodies of functions, asserts, and withs are not indented to prevent a lot of superfluous indentation levels, i.e.
|
||||||
|
|
||||||
|
```nix
|
||||||
|
{ arg1, arg2 }:
|
||||||
|
assert system == "i686-linux";
|
||||||
|
stdenv.mkDerivation { ...
|
||||||
|
```
|
||||||
|
|
||||||
|
not
|
||||||
|
|
||||||
|
```nix
|
||||||
|
{ arg1, arg2 }:
|
||||||
|
assert system == "i686-linux";
|
||||||
|
stdenv.mkDerivation { ...
|
||||||
|
```
|
||||||
|
|
||||||
|
- Function formal arguments are written as:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
{ arg1, arg2, arg3 }:
|
||||||
|
```
|
||||||
|
|
||||||
|
but if they don't fit on one line they're written as:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
{ arg1, arg2, arg3
|
||||||
|
, arg4, ...
|
||||||
|
, # Some comment...
|
||||||
|
argN
|
||||||
|
}:
|
||||||
|
```
|
||||||
|
|
||||||
|
- Functions should list their expected arguments as precisely as possible. That is, write
|
||||||
|
|
||||||
|
```nix
|
||||||
|
{ stdenv, fetchurl, perl }: ...
|
||||||
|
```
|
||||||
|
|
||||||
|
instead of
|
||||||
|
|
||||||
|
```nix
|
||||||
|
args: with args; ...
|
||||||
|
```
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
```nix
|
||||||
|
{ stdenv, fetchurl, perl, ... }: ...
|
||||||
|
```
|
||||||
|
|
||||||
|
For functions that are truly generic in the number of arguments (such as wrappers around `mkDerivation`) that have some required arguments, you should write them using an `@`-pattern:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
{ stdenv, doCoverageAnalysis ? false, ... } @ args:
|
||||||
|
|
||||||
|
stdenv.mkDerivation (args // {
|
||||||
|
... if doCoverageAnalysis then "bla" else "" ...
|
||||||
|
})
|
||||||
|
```
|
||||||
|
|
||||||
|
instead of
|
||||||
|
|
||||||
|
```nix
|
||||||
|
args:
|
||||||
|
|
||||||
|
args.stdenv.mkDerivation (args // {
|
||||||
|
... if args ? doCoverageAnalysis && args.doCoverageAnalysis then "bla" else "" ...
|
||||||
|
})
|
||||||
|
```
|
||||||
|
|
||||||
|
- Unnecessary string conversions should be avoided. Do
|
||||||
|
|
||||||
|
```nix
|
||||||
|
rev = version;
|
||||||
|
```
|
||||||
|
|
||||||
|
instead of
|
||||||
|
|
||||||
|
```nix
|
||||||
|
rev = "${version}";
|
||||||
|
```
|
||||||
|
|
||||||
|
- Building lists conditionally _should_ be done with `lib.optional(s)` instead of using `if cond then [ ... ] else null` or `if cond then [ ... ] else [ ]`.
|
||||||
|
|
||||||
|
```nix
|
||||||
|
buildInputs = lib.optional stdenv.isDarwin iconv;
|
||||||
|
```
|
||||||
|
|
||||||
|
instead of
|
||||||
|
|
||||||
|
```nix
|
||||||
|
buildInputs = if stdenv.isDarwin then [ iconv ] else null;
|
||||||
|
```
|
||||||
|
|
||||||
|
As an exception, an explicit conditional expression with null can be used when fixing a important bug without triggering a mass rebuild.
|
||||||
|
If this is done a follow up pull request _should_ be created to change the code to `lib.optional(s)`.
|
||||||
|
|
||||||
|
- Arguments should be listed in the order they are used, with the exception of `lib`, which always goes first.
|
||||||
|
|
21
README.md
21
README.md
|
@ -70,26 +70,7 @@ Linux distribution. The [GitHub Insights](https://github.com/NixOS/nixpkgs/pulse
|
||||||
page gives a sense of the project activity.
|
page gives a sense of the project activity.
|
||||||
|
|
||||||
Community contributions are always welcome through GitHub Issues and
|
Community contributions are always welcome through GitHub Issues and
|
||||||
Pull Requests. When pull requests are made, our tooling automation bot,
|
Pull Requests.
|
||||||
[OfBorg](https://github.com/NixOS/ofborg) will perform various checks
|
|
||||||
to help ensure expression quality.
|
|
||||||
|
|
||||||
The *Nixpkgs maintainers* are people who have assigned themselves to
|
|
||||||
maintain specific individual packages. We encourage people who care
|
|
||||||
about a package to assign themselves as a maintainer. When a pull
|
|
||||||
request is made against a package, OfBorg will notify the appropriate
|
|
||||||
maintainer(s). The *Nixpkgs committers* are people who have been given
|
|
||||||
permission to merge.
|
|
||||||
|
|
||||||
Most contributions are based on and merged into these branches:
|
|
||||||
|
|
||||||
* `master` is the main branch where all small contributions go
|
|
||||||
* `staging` is branched from master, changes that have a big impact on
|
|
||||||
Hydra builds go to this branch
|
|
||||||
* `staging-next` is branched from staging and only fixes to stabilize
|
|
||||||
and security fixes with a big impact on Hydra builds should be
|
|
||||||
contributed to this branch. This branch is merged into master when
|
|
||||||
deemed of sufficiently high quality
|
|
||||||
|
|
||||||
For more information about contributing to the project, please visit
|
For more information about contributing to the project, please visit
|
||||||
the [contributing page](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
|
the [contributing page](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
|
||||||
|
|
111
doc/README.md
111
doc/README.md
|
@ -1,5 +1,4 @@
|
||||||
|
# Contributing to the Nixpkgs manual
|
||||||
# Nixpkgs/doc
|
|
||||||
|
|
||||||
This directory houses the sources files for the Nixpkgs manual.
|
This directory houses the sources files for the Nixpkgs manual.
|
||||||
|
|
||||||
|
@ -7,6 +6,110 @@ You can find the [rendered documentation for Nixpkgs `unstable` on nixos.org](ht
|
||||||
|
|
||||||
[Docs for Nixpkgs stable](https://nixos.org/manual/nixpkgs/stable/) are also available.
|
[Docs for Nixpkgs stable](https://nixos.org/manual/nixpkgs/stable/) are also available.
|
||||||
|
|
||||||
If you want to contribute to the documentation, [here's how to do it](https://nixos.org/manual/nixpkgs/unstable/#chap-contributing).
|
|
||||||
|
|
||||||
If you're only getting started with Nix, go to [nixos.org/learn](https://nixos.org/learn).
|
If you're only getting started with Nix, go to [nixos.org/learn](https://nixos.org/learn).
|
||||||
|
|
||||||
|
## Contributing to this documentation
|
||||||
|
|
||||||
|
You can quickly check your edits with `nix-build`:
|
||||||
|
|
||||||
|
```ShellSession
|
||||||
|
$ cd /path/to/nixpkgs
|
||||||
|
$ nix-build doc
|
||||||
|
```
|
||||||
|
|
||||||
|
If the build succeeds, the manual will be in `./result/share/doc/nixpkgs/manual.html`.
|
||||||
|
|
||||||
|
### devmode
|
||||||
|
|
||||||
|
The shell in the manual source directory makes available a command, `devmode`.
|
||||||
|
It is a daemon, that:
|
||||||
|
1. watches the manual's source for changes and when they occur — rebuilds
|
||||||
|
2. HTTP serves the manual, injecting a script that triggers reload on changes
|
||||||
|
3. opens the manual in the default browser
|
||||||
|
|
||||||
|
## Syntax
|
||||||
|
|
||||||
|
As per [RFC 0072](https://github.com/NixOS/rfcs/pull/72), all new documentation content should be written in [CommonMark](https://commonmark.org/) Markdown dialect.
|
||||||
|
|
||||||
|
Additional syntax extensions are available, all of which can be used in NixOS option documentation. The following extensions are currently used:
|
||||||
|
|
||||||
|
#### Tables
|
||||||
|
|
||||||
|
Tables, using the [GitHub-flavored Markdown syntax](https://github.github.com/gfm/#tables-extension-).
|
||||||
|
|
||||||
|
#### Anchors
|
||||||
|
|
||||||
|
Explicitly defined **anchors** on headings, to allow linking to sections. These should be always used, to ensure the anchors can be linked even when the heading text changes, and to prevent conflicts between [automatically assigned identifiers](https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/auto_identifiers.md).
|
||||||
|
|
||||||
|
It uses the widely compatible [header attributes](https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/attributes.md) syntax:
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
## Syntax {#sec-contributing-markup}
|
||||||
|
```
|
||||||
|
|
||||||
|
> **Note**
|
||||||
|
> NixOS option documentation does not support headings in general.
|
||||||
|
|
||||||
|
#### Inline Anchors
|
||||||
|
|
||||||
|
Allow linking arbitrary place in the text (e.g. individual list items, sentences…).
|
||||||
|
|
||||||
|
They are defined using a hybrid of the link syntax with the attributes syntax known from headings, called [bracketed spans](https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/bracketed_spans.md):
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
- []{#ssec-gnome-hooks-glib} `glib` setup hook will populate `GSETTINGS_SCHEMAS_PATH` and then `wrapGAppsHook` will prepend it to `XDG_DATA_DIRS`.
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Automatic links
|
||||||
|
|
||||||
|
If you **omit a link text** for a link pointing to a section, the text will be substituted automatically. For example `[](#chap-contributing)`.
|
||||||
|
|
||||||
|
This syntax is taken from [MyST](https://myst-parser.readthedocs.io/en/latest/using/syntax.html#targets-and-cross-referencing).
|
||||||
|
|
||||||
|
#### Roles
|
||||||
|
|
||||||
|
If you want to link to a man page, you can use `` {manpage}`nix.conf(5)` ``. The references will turn into links when a mapping exists in [`doc/manpage-urls.json`](./manpage-urls.json).
|
||||||
|
|
||||||
|
A few markups for other kinds of literals are also available:
|
||||||
|
|
||||||
|
- `` {command}`rm -rfi` ``
|
||||||
|
- `` {env}`XDG_DATA_DIRS` ``
|
||||||
|
- `` {file}`/etc/passwd` ``
|
||||||
|
- `` {option}`networking.useDHCP` ``
|
||||||
|
- `` {var}`/etc/passwd` ``
|
||||||
|
|
||||||
|
These literal kinds are used mostly in NixOS option documentation.
|
||||||
|
|
||||||
|
This syntax is taken from [MyST](https://myst-parser.readthedocs.io/en/latest/syntax/syntax.html#roles-an-in-line-extension-point). Though, the feature originates from [reStructuredText](https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-manpage) with slightly different syntax.
|
||||||
|
|
||||||
|
#### Admonitions
|
||||||
|
|
||||||
|
Set off from the text to bring attention to something.
|
||||||
|
|
||||||
|
It uses pandoc’s [fenced `div`s syntax](https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/fenced_divs.md):
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
::: {.warning}
|
||||||
|
This is a warning
|
||||||
|
:::
|
||||||
|
```
|
||||||
|
|
||||||
|
The following are supported:
|
||||||
|
|
||||||
|
- [`caution`](https://tdg.docbook.org/tdg/5.0/caution.html)
|
||||||
|
- [`important`](https://tdg.docbook.org/tdg/5.0/important.html)
|
||||||
|
- [`note`](https://tdg.docbook.org/tdg/5.0/note.html)
|
||||||
|
- [`tip`](https://tdg.docbook.org/tdg/5.0/tip.html)
|
||||||
|
- [`warning`](https://tdg.docbook.org/tdg/5.0/warning.html)
|
||||||
|
|
||||||
|
#### [Definition lists](https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/definition_lists.md)
|
||||||
|
|
||||||
|
For defining a group of terms:
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
pear
|
||||||
|
: green or yellow bulbous fruit
|
||||||
|
|
||||||
|
watermelon
|
||||||
|
: green fruit with red flesh
|
||||||
|
```
|
||||||
|
|
|
@ -103,14 +103,14 @@ You can install it like any other packages via `nix-env -iA myEmacs`. However, t
|
||||||
|
|
||||||
This provides a fairly full Emacs start file. It will load in addition to the user's personal config. You can always disable it by passing `-q` to the Emacs command.
|
This provides a fairly full Emacs start file. It will load in addition to the user's personal config. You can always disable it by passing `-q` to the Emacs command.
|
||||||
|
|
||||||
Sometimes `emacs.pkgs.withPackages` is not enough, as this package set has some priorities imposed on packages (with the lowest priority assigned to Melpa Unstable, and the highest for packages manually defined in `pkgs/top-level/emacs-packages.nix`). But you can't control these priorities when some package is installed as a dependency. You can override it on a per-package-basis, providing all the required dependencies manually, but it's tedious and there is always a possibility that an unwanted dependency will sneak in through some other package. To completely override such a package, you can use `overrideScope'`.
|
Sometimes `emacs.pkgs.withPackages` is not enough, as this package set has some priorities imposed on packages (with the lowest priority assigned to Melpa Unstable, and the highest for packages manually defined in `pkgs/top-level/emacs-packages.nix`). But you can't control these priorities when some package is installed as a dependency. You can override it on a per-package-basis, providing all the required dependencies manually, but it's tedious and there is always a possibility that an unwanted dependency will sneak in through some other package. To completely override such a package, you can use `overrideScope`.
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
overrides = self: super: rec {
|
overrides = self: super: rec {
|
||||||
haskell-mode = self.melpaPackages.haskell-mode;
|
haskell-mode = self.melpaPackages.haskell-mode;
|
||||||
...
|
...
|
||||||
};
|
};
|
||||||
((emacsPackagesFor emacs).overrideScope' overrides).withPackages
|
((emacsPackagesFor emacs).overrideScope overrides).withPackages
|
||||||
(p: with p; [
|
(p: with p; [
|
||||||
# here both these package will use haskell-mode of our own choice
|
# here both these package will use haskell-mode of our own choice
|
||||||
ghc-mod
|
ghc-mod
|
||||||
|
|
|
@ -1,693 +1,63 @@
|
||||||
# Coding conventions {#chap-conventions}
|
# Coding conventions {#chap-conventions}
|
||||||
|
|
||||||
|
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
|
||||||
|
|
||||||
## Syntax {#sec-syntax}
|
## Syntax {#sec-syntax}
|
||||||
|
|
||||||
- Use 2 spaces of indentation per indentation level in Nix expressions, 4 spaces in shell scripts.
|
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
|
||||||
|
|
||||||
- Do not use tab characters, i.e. configure your editor to use soft tabs. For instance, use `(setq-default indent-tabs-mode nil)` in Emacs. Everybody has different tab settings so it’s asking for trouble.
|
|
||||||
|
|
||||||
- Use `lowerCamelCase` for variable names, not `UpperCamelCase`. Note, this rule does not apply to package attribute names, which instead follow the rules in [](#sec-package-naming).
|
|
||||||
|
|
||||||
- Function calls with attribute set arguments are written as
|
|
||||||
|
|
||||||
```nix
|
|
||||||
foo {
|
|
||||||
arg = ...;
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
not
|
|
||||||
|
|
||||||
```nix
|
|
||||||
foo
|
|
||||||
{
|
|
||||||
arg = ...;
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Also fine is
|
|
||||||
|
|
||||||
```nix
|
|
||||||
foo { arg = ...; }
|
|
||||||
```
|
|
||||||
|
|
||||||
if it's a short call.
|
|
||||||
|
|
||||||
- In attribute sets or lists that span multiple lines, the attribute names or list elements should be aligned:
|
|
||||||
|
|
||||||
```nix
|
|
||||||
# A long list.
|
|
||||||
list = [
|
|
||||||
elem1
|
|
||||||
elem2
|
|
||||||
elem3
|
|
||||||
];
|
|
||||||
|
|
||||||
# A long attribute set.
|
|
||||||
attrs = {
|
|
||||||
attr1 = short_expr;
|
|
||||||
attr2 =
|
|
||||||
if true then big_expr else big_expr;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Combined
|
|
||||||
listOfAttrs = [
|
|
||||||
{
|
|
||||||
attr1 = 3;
|
|
||||||
attr2 = "fff";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
attr1 = 5;
|
|
||||||
attr2 = "ggg";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
```
|
|
||||||
|
|
||||||
- Short lists or attribute sets can be written on one line:
|
|
||||||
|
|
||||||
```nix
|
|
||||||
# A short list.
|
|
||||||
list = [ elem1 elem2 elem3 ];
|
|
||||||
|
|
||||||
# A short set.
|
|
||||||
attrs = { x = 1280; y = 1024; };
|
|
||||||
```
|
|
||||||
|
|
||||||
- Breaking in the middle of a function argument can give hard-to-read code, like
|
|
||||||
|
|
||||||
```nix
|
|
||||||
someFunction { x = 1280;
|
|
||||||
y = 1024; } otherArg
|
|
||||||
yetAnotherArg
|
|
||||||
```
|
|
||||||
|
|
||||||
(especially if the argument is very large, spanning multiple lines).
|
|
||||||
|
|
||||||
Better:
|
|
||||||
|
|
||||||
```nix
|
|
||||||
someFunction
|
|
||||||
{ x = 1280; y = 1024; }
|
|
||||||
otherArg
|
|
||||||
yetAnotherArg
|
|
||||||
```
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
```nix
|
|
||||||
let res = { x = 1280; y = 1024; };
|
|
||||||
in someFunction res otherArg yetAnotherArg
|
|
||||||
```
|
|
||||||
|
|
||||||
- The bodies of functions, asserts, and withs are not indented to prevent a lot of superfluous indentation levels, i.e.
|
|
||||||
|
|
||||||
```nix
|
|
||||||
{ arg1, arg2 }:
|
|
||||||
assert system == "i686-linux";
|
|
||||||
stdenv.mkDerivation { ...
|
|
||||||
```
|
|
||||||
|
|
||||||
not
|
|
||||||
|
|
||||||
```nix
|
|
||||||
{ arg1, arg2 }:
|
|
||||||
assert system == "i686-linux";
|
|
||||||
stdenv.mkDerivation { ...
|
|
||||||
```
|
|
||||||
|
|
||||||
- Function formal arguments are written as:
|
|
||||||
|
|
||||||
```nix
|
|
||||||
{ arg1, arg2, arg3 }:
|
|
||||||
```
|
|
||||||
|
|
||||||
but if they don't fit on one line they're written as:
|
|
||||||
|
|
||||||
```nix
|
|
||||||
{ arg1, arg2, arg3
|
|
||||||
, arg4, ...
|
|
||||||
, # Some comment...
|
|
||||||
argN
|
|
||||||
}:
|
|
||||||
```
|
|
||||||
|
|
||||||
- Functions should list their expected arguments as precisely as possible. That is, write
|
|
||||||
|
|
||||||
```nix
|
|
||||||
{ stdenv, fetchurl, perl }: ...
|
|
||||||
```
|
|
||||||
|
|
||||||
instead of
|
|
||||||
|
|
||||||
```nix
|
|
||||||
args: with args; ...
|
|
||||||
```
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
```nix
|
|
||||||
{ stdenv, fetchurl, perl, ... }: ...
|
|
||||||
```
|
|
||||||
|
|
||||||
For functions that are truly generic in the number of arguments (such as wrappers around `mkDerivation`) that have some required arguments, you should write them using an `@`-pattern:
|
|
||||||
|
|
||||||
```nix
|
|
||||||
{ stdenv, doCoverageAnalysis ? false, ... } @ args:
|
|
||||||
|
|
||||||
stdenv.mkDerivation (args // {
|
|
||||||
... if doCoverageAnalysis then "bla" else "" ...
|
|
||||||
})
|
|
||||||
```
|
|
||||||
|
|
||||||
instead of
|
|
||||||
|
|
||||||
```nix
|
|
||||||
args:
|
|
||||||
|
|
||||||
args.stdenv.mkDerivation (args // {
|
|
||||||
... if args ? doCoverageAnalysis && args.doCoverageAnalysis then "bla" else "" ...
|
|
||||||
})
|
|
||||||
```
|
|
||||||
|
|
||||||
- Unnecessary string conversions should be avoided. Do
|
|
||||||
|
|
||||||
```nix
|
|
||||||
rev = version;
|
|
||||||
```
|
|
||||||
|
|
||||||
instead of
|
|
||||||
|
|
||||||
```nix
|
|
||||||
rev = "${version}";
|
|
||||||
```
|
|
||||||
|
|
||||||
- Building lists conditionally _should_ be done with `lib.optional(s)` instead of using `if cond then [ ... ] else null` or `if cond then [ ... ] else [ ]`.
|
|
||||||
|
|
||||||
```nix
|
|
||||||
buildInputs = lib.optional stdenv.isDarwin iconv;
|
|
||||||
```
|
|
||||||
|
|
||||||
instead of
|
|
||||||
|
|
||||||
```nix
|
|
||||||
buildInputs = if stdenv.isDarwin then [ iconv ] else null;
|
|
||||||
```
|
|
||||||
|
|
||||||
As an exception, an explicit conditional expression with null can be used when fixing a important bug without triggering a mass rebuild.
|
|
||||||
If this is done a follow up pull request _should_ be created to change the code to `lib.optional(s)`.
|
|
||||||
|
|
||||||
- Arguments should be listed in the order they are used, with the exception of `lib`, which always goes first.
|
|
||||||
|
|
||||||
## Package naming {#sec-package-naming}
|
## Package naming {#sec-package-naming}
|
||||||
|
|
||||||
The key words _must_, _must not_, _required_, _shall_, _shall not_, _should_, _should not_, _recommended_, _may_, and _optional_ in this section are to be interpreted as described in [RFC 2119](https://tools.ietf.org/html/rfc2119). Only _emphasized_ words are to be interpreted in this way.
|
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
|
||||||
|
|
||||||
In Nixpkgs, there are generally three different names associated with a package:
|
|
||||||
|
|
||||||
- The `pname` attribute of the derivation. This is what most users see, in particular when using `nix-env`.
|
|
||||||
|
|
||||||
- The variable name used for the instantiated package in `all-packages.nix`, and when passing it as a dependency to other functions. Typically this is called the _package attribute name_. This is what Nix expression authors see. It can also be used when installing using `nix-env -iA`.
|
|
||||||
|
|
||||||
- The filename for (the directory containing) the Nix expression.
|
|
||||||
|
|
||||||
Most of the time, these are the same. For instance, the package `e2fsprogs` has a `pname` attribute `"e2fsprogs"`, is bound to the variable name `e2fsprogs` in `all-packages.nix`, and the Nix expression is in `pkgs/os-specific/linux/e2fsprogs/default.nix`.
|
|
||||||
|
|
||||||
There are a few naming guidelines:
|
|
||||||
|
|
||||||
- The `pname` attribute _should_ be identical to the upstream package name.
|
|
||||||
|
|
||||||
- The `pname` and the `version` attribute _must not_ contain uppercase letters — e.g., `"mplayer" instead of `"MPlayer"`.
|
|
||||||
|
|
||||||
- The `version` attribute _must_ start with a digit e.g`"0.3.1rc2".
|
|
||||||
|
|
||||||
- If a package is a commit from a repository without a version assigned, then the `version` attribute _should_ be the latest upstream version preceding that commit, followed by `-unstable-` and the date of the (fetched) commit. The date _must_ be in `"YYYY-MM-DD"` format.
|
|
||||||
|
|
||||||
Example: Given a project had its latest releases `2.2` in November 2021, and `3.0` in January 2022, a commit authored on March 15, 2022 for an upcoming bugfix release `2.2.1` would have `version = "2.2-unstable-2022-03-15"`.
|
|
||||||
|
|
||||||
- Dashes in the package `pname` _should_ be preserved in new variable names, rather than converted to underscores or camel cased — e.g., `http-parser` instead of `http_parser` or `httpParser`. The hyphenated style is preferred in all three package names.
|
|
||||||
|
|
||||||
- If there are multiple versions of a package, this _should_ be reflected in the variable names in `all-packages.nix`, e.g. `json-c_0_9` and `json-c_0_11`. If there is an obvious “default” version, make an attribute like `json-c = json-c_0_9;`. See also [](#sec-versioning)
|
|
||||||
|
|
||||||
## File naming and organisation {#sec-organisation}
|
## File naming and organisation {#sec-organisation}
|
||||||
|
|
||||||
Names of files and directories should be in lowercase, with dashes between words — not in camel case. For instance, it should be `all-packages.nix`, not `allPackages.nix` or `AllPackages.nix`.
|
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
|
||||||
|
|
||||||
### Hierarchy {#sec-hierarchy}
|
|
||||||
|
|
||||||
Each package should be stored in its own directory somewhere in the `pkgs/` tree, i.e. in `pkgs/category/subcategory/.../pkgname`. Below are some rules for picking the right category for a package. Many packages fall under several categories; what matters is the _primary_ purpose of a package. For example, the `libxml2` package builds both a library and some tools; but it’s a library foremost, so it goes under `pkgs/development/libraries`.
|
|
||||||
|
|
||||||
When in doubt, consider refactoring the `pkgs/` tree, e.g. creating new categories or splitting up an existing category.
|
|
||||||
|
|
||||||
**If it’s used to support _software development_:**
|
|
||||||
|
|
||||||
- **If it’s a _library_ used by other packages:**
|
|
||||||
|
|
||||||
- `development/libraries` (e.g. `libxml2`)
|
|
||||||
|
|
||||||
- **If it’s a _compiler_:**
|
|
||||||
|
|
||||||
- `development/compilers` (e.g. `gcc`)
|
|
||||||
|
|
||||||
- **If it’s an _interpreter_:**
|
|
||||||
|
|
||||||
- `development/interpreters` (e.g. `guile`)
|
|
||||||
|
|
||||||
- **If it’s a (set of) development _tool(s)_:**
|
|
||||||
|
|
||||||
- **If it’s a _parser generator_ (including lexers):**
|
|
||||||
|
|
||||||
- `development/tools/parsing` (e.g. `bison`, `flex`)
|
|
||||||
|
|
||||||
- **If it’s a _build manager_:**
|
|
||||||
|
|
||||||
- `development/tools/build-managers` (e.g. `gnumake`)
|
|
||||||
|
|
||||||
- **If it’s a _language server_:**
|
|
||||||
|
|
||||||
- `development/tools/language-servers` (e.g. `ccls` or `rnix-lsp`)
|
|
||||||
|
|
||||||
- **Else:**
|
|
||||||
|
|
||||||
- `development/tools/misc` (e.g. `binutils`)
|
|
||||||
|
|
||||||
- **Else:**
|
|
||||||
|
|
||||||
- `development/misc`
|
|
||||||
|
|
||||||
**If it’s a (set of) _tool(s)_:**
|
|
||||||
|
|
||||||
(A tool is a relatively small program, especially one intended to be used non-interactively.)
|
|
||||||
|
|
||||||
- **If it’s for _networking_:**
|
|
||||||
|
|
||||||
- `tools/networking` (e.g. `wget`)
|
|
||||||
|
|
||||||
- **If it’s for _text processing_:**
|
|
||||||
|
|
||||||
- `tools/text` (e.g. `diffutils`)
|
|
||||||
|
|
||||||
- **If it’s a _system utility_, i.e., something related or essential to the operation of a system:**
|
|
||||||
|
|
||||||
- `tools/system` (e.g. `cron`)
|
|
||||||
|
|
||||||
- **If it’s an _archiver_ (which may include a compression function):**
|
|
||||||
|
|
||||||
- `tools/archivers` (e.g. `zip`, `tar`)
|
|
||||||
|
|
||||||
- **If it’s a _compression_ program:**
|
|
||||||
|
|
||||||
- `tools/compression` (e.g. `gzip`, `bzip2`)
|
|
||||||
|
|
||||||
- **If it’s a _security_-related program:**
|
|
||||||
|
|
||||||
- `tools/security` (e.g. `nmap`, `gnupg`)
|
|
||||||
|
|
||||||
- **Else:**
|
|
||||||
|
|
||||||
- `tools/misc`
|
|
||||||
|
|
||||||
**If it’s a _shell_:**
|
|
||||||
|
|
||||||
- `shells` (e.g. `bash`)
|
|
||||||
|
|
||||||
**If it’s a _server_:**
|
|
||||||
|
|
||||||
- **If it’s a web server:**
|
|
||||||
|
|
||||||
- `servers/http` (e.g. `apache-httpd`)
|
|
||||||
|
|
||||||
- **If it’s an implementation of the X Windowing System:**
|
|
||||||
|
|
||||||
- `servers/x11` (e.g. `xorg` — this includes the client libraries and programs)
|
|
||||||
|
|
||||||
- **Else:**
|
|
||||||
|
|
||||||
- `servers/misc`
|
|
||||||
|
|
||||||
**If it’s a _desktop environment_:**
|
|
||||||
|
|
||||||
- `desktops` (e.g. `kde`, `gnome`, `enlightenment`)
|
|
||||||
|
|
||||||
**If it’s a _window manager_:**
|
|
||||||
|
|
||||||
- `applications/window-managers` (e.g. `awesome`, `stumpwm`)
|
|
||||||
|
|
||||||
**If it’s an _application_:**
|
|
||||||
|
|
||||||
A (typically large) program with a distinct user interface, primarily used interactively.
|
|
||||||
|
|
||||||
- **If it’s a _version management system_:**
|
|
||||||
|
|
||||||
- `applications/version-management` (e.g. `subversion`)
|
|
||||||
|
|
||||||
- **If it’s a _terminal emulator_:**
|
|
||||||
|
|
||||||
- `applications/terminal-emulators` (e.g. `alacritty` or `rxvt` or `termite`)
|
|
||||||
|
|
||||||
- **If it’s a _file manager_:**
|
|
||||||
|
|
||||||
- `applications/file-managers` (e.g. `mc` or `ranger` or `pcmanfm`)
|
|
||||||
|
|
||||||
- **If it’s for _video playback / editing_:**
|
|
||||||
|
|
||||||
- `applications/video` (e.g. `vlc`)
|
|
||||||
|
|
||||||
- **If it’s for _graphics viewing / editing_:**
|
|
||||||
|
|
||||||
- `applications/graphics` (e.g. `gimp`)
|
|
||||||
|
|
||||||
- **If it’s for _networking_:**
|
|
||||||
|
|
||||||
- **If it’s a _mailreader_:**
|
|
||||||
|
|
||||||
- `applications/networking/mailreaders` (e.g. `thunderbird`)
|
|
||||||
|
|
||||||
- **If it’s a _newsreader_:**
|
|
||||||
|
|
||||||
- `applications/networking/newsreaders` (e.g. `pan`)
|
|
||||||
|
|
||||||
- **If it’s a _web browser_:**
|
|
||||||
|
|
||||||
- `applications/networking/browsers` (e.g. `firefox`)
|
|
||||||
|
|
||||||
- **Else:**
|
|
||||||
|
|
||||||
- `applications/networking/misc`
|
|
||||||
|
|
||||||
- **Else:**
|
|
||||||
|
|
||||||
- `applications/misc`
|
|
||||||
|
|
||||||
**If it’s _data_ (i.e., does not have a straight-forward executable semantics):**
|
|
||||||
|
|
||||||
- **If it’s a _font_:**
|
|
||||||
|
|
||||||
- `data/fonts`
|
|
||||||
|
|
||||||
- **If it’s an _icon theme_:**
|
|
||||||
|
|
||||||
- `data/icons`
|
|
||||||
|
|
||||||
- **If it’s related to _SGML/XML processing_:**
|
|
||||||
|
|
||||||
- **If it’s an _XML DTD_:**
|
|
||||||
|
|
||||||
- `data/sgml+xml/schemas/xml-dtd` (e.g. `docbook`)
|
|
||||||
|
|
||||||
- **If it’s an _XSLT stylesheet_:**
|
|
||||||
|
|
||||||
(Okay, these are executable...)
|
|
||||||
|
|
||||||
- `data/sgml+xml/stylesheets/xslt` (e.g. `docbook-xsl`)
|
|
||||||
|
|
||||||
- **If it’s a _theme_ for a _desktop environment_, a _window manager_ or a _display manager_:**
|
|
||||||
|
|
||||||
- `data/themes`
|
|
||||||
|
|
||||||
**If it’s a _game_:**
|
|
||||||
|
|
||||||
- `games`
|
|
||||||
|
|
||||||
**Else:**
|
|
||||||
|
|
||||||
- `misc`
|
|
||||||
|
|
||||||
### Versioning {#sec-versioning}
|
### Versioning {#sec-versioning}
|
||||||
|
|
||||||
Because every version of a package in Nixpkgs creates a potential maintenance burden, old versions of a package should not be kept unless there is a good reason to do so. For instance, Nixpkgs contains several versions of GCC because other packages don’t build with the latest version of GCC. Other examples are having both the latest stable and latest pre-release version of a package, or to keep several major releases of an application that differ significantly in functionality.
|
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
|
||||||
|
|
||||||
If there is only one version of a package, its Nix expression should be named `e2fsprogs/default.nix`. If there are multiple versions, this should be reflected in the filename, e.g. `e2fsprogs/1.41.8.nix` and `e2fsprogs/1.41.9.nix`. The version in the filename should leave out unnecessary detail. For instance, if we keep the latest Firefox 2.0.x and 3.5.x versions in Nixpkgs, they should be named `firefox/2.0.nix` and `firefox/3.5.nix`, respectively (which, at a given point, might contain versions `2.0.0.20` and `3.5.4`). If a version requires many auxiliary files, you can use a subdirectory for each version, e.g. `firefox/2.0/default.nix` and `firefox/3.5/default.nix`.
|
|
||||||
|
|
||||||
All versions of a package _must_ be included in `all-packages.nix` to make sure that they evaluate correctly.
|
|
||||||
|
|
||||||
## Fetching Sources {#sec-sources}
|
## Fetching Sources {#sec-sources}
|
||||||
|
|
||||||
There are multiple ways to fetch a package source in nixpkgs. The general guideline is that you should package reproducible sources with a high degree of availability. Right now there is only one fetcher which has mirroring support and that is `fetchurl`. Note that you should also prefer protocols which have a corresponding proxy environment variable.
|
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
|
||||||
|
|
||||||
You can find many source fetch helpers in `pkgs/build-support/fetch*`.
|
|
||||||
|
|
||||||
In the file `pkgs/top-level/all-packages.nix` you can find fetch helpers, these have names on the form `fetchFrom*`. The intention of these are to provide snapshot fetches but using the same api as some of the version controlled fetchers from `pkgs/build-support/`. As an example going from bad to good:
|
|
||||||
|
|
||||||
- Bad: Uses `git://` which won't be proxied.
|
|
||||||
|
|
||||||
```nix
|
|
||||||
src = fetchgit {
|
|
||||||
url = "git@github.com:NixOS/nix.git"
|
|
||||||
url = "git://github.com/NixOS/nix.git";
|
|
||||||
rev = "1f795f9f44607cc5bec70d1300150bfefcef2aae";
|
|
||||||
hash = "sha256-7D4m+saJjbSFP5hOwpQq2FGR2rr+psQMTcyb1ZvtXsQ=";
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
- Better: This is ok, but an archive fetch will still be faster.
|
|
||||||
|
|
||||||
```nix
|
|
||||||
src = fetchgit {
|
|
||||||
url = "https://github.com/NixOS/nix.git";
|
|
||||||
rev = "1f795f9f44607cc5bec70d1300150bfefcef2aae";
|
|
||||||
hash = "sha256-7D4m+saJjbSFP5hOwpQq2FGR2rr+psQMTcyb1ZvtXsQ=";
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
- Best: Fetches a snapshot archive and you get the rev you want.
|
|
||||||
|
|
||||||
```nix
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "NixOS";
|
|
||||||
repo = "nix";
|
|
||||||
rev = "1f795f9f44607cc5bec70d1300150bfefcef2aae";
|
|
||||||
hash = "sha256-7D4m+saJjbSFP5hOwpQq2FGR2rr+psQMTcyb1ZvtXsQ=";
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
When fetching from GitHub, commits must always be referenced by their full commit hash. This is because GitHub shares commit hashes among all forks and returns `404 Not Found` when a short commit hash is ambiguous. It already happens for some short, 6-character commit hashes in `nixpkgs`.
|
|
||||||
It is a practical vector for a denial-of-service attack by pushing large amounts of auto generated commits into forks and was already [demonstrated against GitHub Actions Beta](https://blog.teddykatz.com/2019/11/12/github-actions-dos.html).
|
|
||||||
|
|
||||||
Find the value to put as `hash` by running `nix-shell -p nix-prefetch-github --run "nix-prefetch-github --rev 1f795f9f44607cc5bec70d1300150bfefcef2aae NixOS nix"`.
|
|
||||||
|
|
||||||
## Obtaining source hash {#sec-source-hashes}
|
## Obtaining source hash {#sec-source-hashes}
|
||||||
|
|
||||||
Preferred source hash type is sha256. There are several ways to get it.
|
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
|
||||||
|
|
||||||
1. Prefetch URL (with `nix-prefetch-XXX URL`, where `XXX` is one of `url`, `git`, `hg`, `cvs`, `bzr`, `svn`). Hash is printed to stdout.
|
|
||||||
|
|
||||||
2. Prefetch by package source (with `nix-prefetch-url '<nixpkgs>' -A PACKAGE.src`, where `PACKAGE` is package attribute name). Hash is printed to stdout.
|
|
||||||
|
|
||||||
This works well when you've upgraded existing package version and want to find out new hash, but is useless if package can't be accessed by attribute or package has multiple sources (`.srcs`, architecture-dependent sources, etc).
|
|
||||||
|
|
||||||
3. Upstream provided hash: use it when upstream provides `sha256` or `sha512` (when upstream provides `md5`, don't use it, compute `sha256` instead).
|
|
||||||
|
|
||||||
A little nuance is that `nix-prefetch-*` tools produce hash encoded with `base32`, but upstream usually provides hexadecimal (`base16`) encoding. Fetchers understand both formats. Nixpkgs does not standardize on any one format.
|
|
||||||
|
|
||||||
You can convert between formats with nix-hash, for example:
|
|
||||||
|
|
||||||
```ShellSession
|
|
||||||
$ nix-hash --type sha256 --to-base32 HASH
|
|
||||||
```
|
|
||||||
|
|
||||||
4. Extracting hash from local source tarball can be done with `sha256sum`. Use `nix-prefetch-url file:///path/to/tarball` if you want base32 hash.
|
|
||||||
|
|
||||||
5. Fake hash: set the hash to one of
|
|
||||||
|
|
||||||
- `""`
|
|
||||||
- `lib.fakeHash`
|
|
||||||
- `lib.fakeSha256`
|
|
||||||
- `lib.fakeSha512`
|
|
||||||
|
|
||||||
in the package expression, attempt build and extract correct hash from error messages.
|
|
||||||
|
|
||||||
::: {.warning}
|
|
||||||
You must use one of these four fake hashes and not some arbitrarily-chosen hash.
|
|
||||||
|
|
||||||
See [](#sec-source-hashes-security).
|
|
||||||
:::
|
|
||||||
|
|
||||||
This is last resort method when reconstructing source URL is non-trivial and `nix-prefetch-url -A` isn’t applicable (for example, [one of `kodi` dependencies](https://github.com/NixOS/nixpkgs/blob/d2ab091dd308b99e4912b805a5eb088dd536adb9/pkgs/applications/video/kodi/default.nix#L73)). The easiest way then would be replace hash with a fake one and rebuild. Nix build will fail and error message will contain desired hash.
|
|
||||||
|
|
||||||
|
|
||||||
### Obtaining hashes securely {#sec-source-hashes-security}
|
### Obtaining hashes securely {#sec-source-hashes-security}
|
||||||
|
|
||||||
Let's say Man-in-the-Middle (MITM) sits close to your network. Then instead of fetching source you can fetch malware, and instead of source hash you get hash of malware. Here are security considerations for this scenario:
|
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
|
||||||
|
|
||||||
- `http://` URLs are not secure to prefetch hash from;
|
|
||||||
|
|
||||||
- hashes from upstream (in method 3) should be obtained via secure protocol;
|
|
||||||
|
|
||||||
- `https://` URLs are secure in methods 1, 2, 3;
|
|
||||||
|
|
||||||
- `https://` URLs are secure in method 5 *only if* you use one of the listed fake hashes. If you use any other hash, `fetchurl` will pass `--insecure` to `curl` and may then degrade to HTTP in case of TLS certificate expiration.
|
|
||||||
|
|
||||||
## Patches {#sec-patches}
|
## Patches {#sec-patches}
|
||||||
|
|
||||||
Patches available online should be retrieved using `fetchpatch`.
|
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
|
||||||
|
|
||||||
```nix
|
|
||||||
patches = [
|
|
||||||
(fetchpatch {
|
|
||||||
name = "fix-check-for-using-shared-freetype-lib.patch";
|
|
||||||
url = "http://git.ghostscript.com/?p=ghostpdl.git;a=patch;h=8f5d285";
|
|
||||||
hash = "sha256-uRcxaCjd+WAuGrXOmGfFeu79cUILwkRdBu48mwcBE7g=";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
```
|
|
||||||
|
|
||||||
Otherwise, you can add a `.patch` file to the `nixpkgs` repository. In the interest of keeping our maintenance burden to a minimum, only patches that are unique to `nixpkgs` should be added in this way.
|
|
||||||
|
|
||||||
If a patch is available online but does not cleanly apply, it can be modified in some fixed ways by using additional optional arguments for `fetchpatch`. Check [](#fetchpatch) for details.
|
|
||||||
|
|
||||||
```nix
|
|
||||||
patches = [ ./0001-changes.patch ];
|
|
||||||
```
|
|
||||||
|
|
||||||
If you do need to do create this sort of patch file, one way to do so is with git:
|
|
||||||
|
|
||||||
1. Move to the root directory of the source code you're patching.
|
|
||||||
|
|
||||||
```ShellSession
|
|
||||||
$ cd the/program/source
|
|
||||||
```
|
|
||||||
|
|
||||||
2. If a git repository is not already present, create one and stage all of the source files.
|
|
||||||
|
|
||||||
```ShellSession
|
|
||||||
$ git init
|
|
||||||
$ git add .
|
|
||||||
```
|
|
||||||
|
|
||||||
3. Edit some files to make whatever changes need to be included in the patch.
|
|
||||||
|
|
||||||
4. Use git to create a diff, and pipe the output to a patch file:
|
|
||||||
|
|
||||||
```ShellSession
|
|
||||||
$ git diff -a > nixpkgs/pkgs/the/package/0001-changes.patch
|
|
||||||
```
|
|
||||||
|
|
||||||
## Package tests {#sec-package-tests}
|
## Package tests {#sec-package-tests}
|
||||||
|
|
||||||
Tests are important to ensure quality and make reviews and automatic updates easy.
|
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
|
||||||
|
|
||||||
The following types of tests exists:
|
|
||||||
|
|
||||||
* [NixOS **module tests**](https://nixos.org/manual/nixos/stable/#sec-nixos-tests), which spawn one or more NixOS VMs. They exercise both NixOS modules and the packaged programs used within them. For example, a NixOS module test can start a web server VM running the `nginx` module, and a client VM running `curl` or a graphical `firefox`, and test that they can talk to each other and display the correct content.
|
|
||||||
* Nix **package tests** are a lightweight alternative to NixOS module tests. They should be used to create simple integration tests for packages, but cannot test NixOS services, and some programs with graphical user interfaces may also be difficult to test with them.
|
|
||||||
* The **`checkPhase` of a package**, which should execute the unit tests that are included in the source code of a package.
|
|
||||||
|
|
||||||
Here in the nixpkgs manual we describe mostly _package tests_; for _module tests_ head over to the corresponding [section in the NixOS manual](https://nixos.org/manual/nixos/stable/#sec-nixos-tests).
|
|
||||||
|
|
||||||
### Writing inline package tests {#ssec-inline-package-tests-writing}
|
### Writing inline package tests {#ssec-inline-package-tests-writing}
|
||||||
|
|
||||||
For very simple tests, they can be written inline:
|
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
|
||||||
|
|
||||||
```nix
|
|
||||||
{ …, yq-go }:
|
|
||||||
|
|
||||||
buildGoModule rec {
|
|
||||||
…
|
|
||||||
|
|
||||||
passthru.tests = {
|
|
||||||
simple = runCommand "${pname}-test" {} ''
|
|
||||||
echo "test: 1" | ${yq-go}/bin/yq eval -j > $out
|
|
||||||
[ "$(cat $out | tr -d $'\n ')" = '{"test":1}' ]
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Writing larger package tests {#ssec-package-tests-writing}
|
### Writing larger package tests {#ssec-package-tests-writing}
|
||||||
|
|
||||||
This is an example using the `phoronix-test-suite` package with the current best practices.
|
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
|
||||||
|
|
||||||
Add the tests in `passthru.tests` to the package definition like this:
|
|
||||||
|
|
||||||
```nix
|
|
||||||
{ stdenv, lib, fetchurl, callPackage }:
|
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
|
||||||
…
|
|
||||||
|
|
||||||
passthru.tests = {
|
|
||||||
simple-execution = callPackage ./tests.nix { };
|
|
||||||
};
|
|
||||||
|
|
||||||
meta = { … };
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Create `tests.nix` in the package directory:
|
|
||||||
|
|
||||||
```nix
|
|
||||||
{ runCommand, phoronix-test-suite }:
|
|
||||||
|
|
||||||
let
|
|
||||||
inherit (phoronix-test-suite) pname version;
|
|
||||||
in
|
|
||||||
|
|
||||||
runCommand "${pname}-tests" { meta.timeout = 60; }
|
|
||||||
''
|
|
||||||
# automatic initial setup to prevent interactive questions
|
|
||||||
${phoronix-test-suite}/bin/phoronix-test-suite enterprise-setup >/dev/null
|
|
||||||
# get version of installed program and compare with package version
|
|
||||||
if [[ `${phoronix-test-suite}/bin/phoronix-test-suite version` != *"${version}"* ]]; then
|
|
||||||
echo "Error: program version does not match package version"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
# run dummy command
|
|
||||||
${phoronix-test-suite}/bin/phoronix-test-suite dummy_module.dummy-command >/dev/null
|
|
||||||
# needed for Nix to register the command as successful
|
|
||||||
touch $out
|
|
||||||
''
|
|
||||||
```
|
|
||||||
|
|
||||||
### Running package tests {#ssec-package-tests-running}
|
### Running package tests {#ssec-package-tests-running}
|
||||||
|
|
||||||
You can run these tests with:
|
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
|
||||||
|
|
||||||
```ShellSession
|
|
||||||
$ cd path/to/nixpkgs
|
|
||||||
$ nix-build -A phoronix-test-suite.tests
|
|
||||||
```
|
|
||||||
|
|
||||||
### Examples of package tests {#ssec-package-tests-examples}
|
### Examples of package tests {#ssec-package-tests-examples}
|
||||||
|
|
||||||
Here are examples of package tests:
|
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
|
||||||
|
|
||||||
- [Jasmin compile test](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/jasmin/test-assemble-hello-world/default.nix)
|
|
||||||
- [Lobster compile test](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/lobster/test-can-run-hello-world.nix)
|
|
||||||
- [Spacy annotation test](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/python-modules/spacy/annotation-test/default.nix)
|
|
||||||
- [Libtorch test](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/science/math/libtorch/test/default.nix)
|
|
||||||
- [Multiple tests for nanopb](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/nanopb/default.nix)
|
|
||||||
|
|
||||||
### Linking NixOS module tests to a package {#ssec-nixos-tests-linking}
|
### Linking NixOS module tests to a package {#ssec-nixos-tests-linking}
|
||||||
|
|
||||||
Like [package tests](#ssec-package-tests-writing) as shown above, [NixOS module tests](https://nixos.org/manual/nixos/stable/#sec-nixos-tests) can also be linked to a package, so that the tests can be easily run when changing the related package.
|
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
|
||||||
|
|
||||||
For example, assuming we're packaging `nginx`, we can link its module test via `passthru.tests`:
|
|
||||||
|
|
||||||
```nix
|
|
||||||
{ stdenv, lib, nixosTests }:
|
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
|
||||||
...
|
|
||||||
|
|
||||||
passthru.tests = {
|
|
||||||
nginx = nixosTests.nginx;
|
|
||||||
};
|
|
||||||
|
|
||||||
...
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Import From Derivation {#ssec-import-from-derivation}
|
### Import From Derivation {#ssec-import-from-derivation}
|
||||||
|
|
||||||
Import From Derivation (IFD) is disallowed in Nixpkgs for performance reasons:
|
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
|
||||||
[Hydra] evaluates the entire package set, and sequential builds during evaluation would increase evaluation times to become impractical.
|
|
||||||
|
|
||||||
[Hydra]: https://github.com/NixOS/hydra
|
|
||||||
|
|
||||||
Import From Derivation can be worked around in some cases by committing generated intermediate files to version control and reading those instead.
|
|
||||||
|
|
||||||
<!-- TODO: remove the following and link to Nix manual once https://github.com/NixOS/nix/pull/7332 is merged -->
|
|
||||||
|
|
||||||
See also [NixOS Wiki: Import From Derivation].
|
|
||||||
|
|
||||||
[NixOS Wiki: Import From Derivation]: https://nixos.wiki/wiki/Import_From_Derivation
|
|
||||||
|
|
|
@ -1,115 +1,11 @@
|
||||||
# Contributing to Nixpkgs documentation {#chap-contributing}
|
# Contributing to Nixpkgs documentation {#chap-contributing}
|
||||||
|
|
||||||
The sources of the Nixpkgs manual are in the [doc](https://github.com/NixOS/nixpkgs/tree/master/doc) subdirectory of the Nixpkgs repository.
|
This section has been moved to [doc/README.md](https://github.com/NixOS/nixpkgs/blob/master/doc/README.md).
|
||||||
|
|
||||||
You can quickly check your edits with `nix-build`:
|
|
||||||
|
|
||||||
```ShellSession
|
|
||||||
$ cd /path/to/nixpkgs
|
|
||||||
$ nix-build doc
|
|
||||||
```
|
|
||||||
|
|
||||||
If the build succeeds, the manual will be in `./result/share/doc/nixpkgs/manual.html`.
|
|
||||||
|
|
||||||
## devmode {#sec-contributing-devmode}
|
## devmode {#sec-contributing-devmode}
|
||||||
|
|
||||||
The shell in the manual source directory makes available a command, `devmode`.
|
This section has been moved to [doc/README.md](https://github.com/NixOS/nixpkgs/blob/master/doc/README.md).
|
||||||
It is a daemon, that:
|
|
||||||
1. watches the manual's source for changes and when they occur — rebuilds
|
|
||||||
2. HTTP serves the manual, injecting a script that triggers reload on changes
|
|
||||||
3. opens the manual in the default browser
|
|
||||||
|
|
||||||
## Syntax {#sec-contributing-markup}
|
## Syntax {#sec-contributing-markup}
|
||||||
|
|
||||||
As per [RFC 0072](https://github.com/NixOS/rfcs/pull/72), all new documentation content should be written in [CommonMark](https://commonmark.org/) Markdown dialect.
|
This section has been moved to [doc/README.md](https://github.com/NixOS/nixpkgs/blob/master/doc/README.md).
|
||||||
|
|
||||||
Additional syntax extensions are available, all of which can be used in NixOS option documentation. The following extensions are currently used:
|
|
||||||
|
|
||||||
- []{#ssec-contributing-markup-tables}
|
|
||||||
Tables, using the [GitHub-flavored Markdown syntax](https://github.github.com/gfm/#tables-extension-).
|
|
||||||
|
|
||||||
- []{#ssec-contributing-markup-anchors}
|
|
||||||
Explicitly defined **anchors** on headings, to allow linking to sections. These should be always used, to ensure the anchors can be linked even when the heading text changes, and to prevent conflicts between [automatically assigned identifiers](https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/auto_identifiers.md).
|
|
||||||
|
|
||||||
It uses the widely compatible [header attributes](https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/attributes.md) syntax:
|
|
||||||
|
|
||||||
```markdown
|
|
||||||
## Syntax {#sec-contributing-markup}
|
|
||||||
```
|
|
||||||
|
|
||||||
::: {.note}
|
|
||||||
NixOS option documentation does not support headings in general.
|
|
||||||
:::
|
|
||||||
|
|
||||||
- []{#ssec-contributing-markup-anchors-inline}
|
|
||||||
**Inline anchors**, which allow linking arbitrary place in the text (e.g. individual list items, sentences…).
|
|
||||||
|
|
||||||
They are defined using a hybrid of the link syntax with the attributes syntax known from headings, called [bracketed spans](https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/bracketed_spans.md):
|
|
||||||
|
|
||||||
```markdown
|
|
||||||
- []{#ssec-gnome-hooks-glib} `glib` setup hook will populate `GSETTINGS_SCHEMAS_PATH` and then `wrapGAppsHook` will prepend it to `XDG_DATA_DIRS`.
|
|
||||||
```
|
|
||||||
|
|
||||||
- []{#ssec-contributing-markup-automatic-links}
|
|
||||||
If you **omit a link text** for a link pointing to a section, the text will be substituted automatically. For example, `[](#chap-contributing)` will result in [](#chap-contributing).
|
|
||||||
|
|
||||||
This syntax is taken from [MyST](https://myst-parser.readthedocs.io/en/latest/using/syntax.html#targets-and-cross-referencing).
|
|
||||||
|
|
||||||
- []{#ssec-contributing-markup-inline-roles}
|
|
||||||
If you want to link to a man page, you can use `` {manpage}`nix.conf(5)` ``, which will turn into {manpage}`nix.conf(5)`. The references will turn into links when a mapping exists in {file}`doc/manpage-urls.json`.
|
|
||||||
|
|
||||||
A few markups for other kinds of literals are also available:
|
|
||||||
|
|
||||||
- `` {command}`rm -rfi` `` turns into {command}`rm -rfi`
|
|
||||||
- `` {env}`XDG_DATA_DIRS` `` turns into {env}`XDG_DATA_DIRS`
|
|
||||||
- `` {file}`/etc/passwd` `` turns into {file}`/etc/passwd`
|
|
||||||
- `` {option}`networking.useDHCP` `` turns into {option}`networking.useDHCP`
|
|
||||||
- `` {var}`/etc/passwd` `` turns into {var}`/etc/passwd`
|
|
||||||
|
|
||||||
These literal kinds are used mostly in NixOS option documentation.
|
|
||||||
|
|
||||||
This syntax is taken from [MyST](https://myst-parser.readthedocs.io/en/latest/syntax/syntax.html#roles-an-in-line-extension-point). Though, the feature originates from [reStructuredText](https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-manpage) with slightly different syntax.
|
|
||||||
|
|
||||||
- []{#ssec-contributing-markup-admonitions}
|
|
||||||
**Admonitions**, set off from the text to bring attention to something.
|
|
||||||
|
|
||||||
It uses pandoc’s [fenced `div`s syntax](https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/fenced_divs.md):
|
|
||||||
|
|
||||||
```markdown
|
|
||||||
::: {.warning}
|
|
||||||
This is a warning
|
|
||||||
:::
|
|
||||||
```
|
|
||||||
|
|
||||||
which renders as
|
|
||||||
|
|
||||||
> ::: {.warning}
|
|
||||||
> This is a warning.
|
|
||||||
> :::
|
|
||||||
|
|
||||||
The following are supported:
|
|
||||||
|
|
||||||
- [`caution`](https://tdg.docbook.org/tdg/5.0/caution.html)
|
|
||||||
- [`important`](https://tdg.docbook.org/tdg/5.0/important.html)
|
|
||||||
- [`note`](https://tdg.docbook.org/tdg/5.0/note.html)
|
|
||||||
- [`tip`](https://tdg.docbook.org/tdg/5.0/tip.html)
|
|
||||||
- [`warning`](https://tdg.docbook.org/tdg/5.0/warning.html)
|
|
||||||
|
|
||||||
- []{#ssec-contributing-markup-definition-lists}
|
|
||||||
[**Definition lists**](https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/definition_lists.md), for defining a group of terms:
|
|
||||||
|
|
||||||
```markdown
|
|
||||||
pear
|
|
||||||
: green or yellow bulbous fruit
|
|
||||||
|
|
||||||
watermelon
|
|
||||||
: green fruit with red flesh
|
|
||||||
```
|
|
||||||
|
|
||||||
which renders as
|
|
||||||
|
|
||||||
> pear
|
|
||||||
> : green or yellow bulbous fruit
|
|
||||||
>
|
|
||||||
> watermelon
|
|
||||||
> : green fruit with red flesh
|
|
||||||
|
|
|
@ -1,77 +1,3 @@
|
||||||
# Quick Start to Adding a Package {#chap-quick-start}
|
# Quick Start to Adding a Package {#chap-quick-start}
|
||||||
|
|
||||||
To add a package to Nixpkgs:
|
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
|
||||||
|
|
||||||
1. Checkout the Nixpkgs source tree:
|
|
||||||
|
|
||||||
```ShellSession
|
|
||||||
$ git clone https://github.com/NixOS/nixpkgs
|
|
||||||
$ cd nixpkgs
|
|
||||||
```
|
|
||||||
|
|
||||||
2. Find a good place in the Nixpkgs tree to add the Nix expression for your package. For instance, a library package typically goes into `pkgs/development/libraries/pkgname`, while a web browser goes into `pkgs/applications/networking/browsers/pkgname`. See [](#sec-organisation) for some hints on the tree organisation. Create a directory for your package, e.g.
|
|
||||||
|
|
||||||
```ShellSession
|
|
||||||
$ mkdir pkgs/development/libraries/libfoo
|
|
||||||
```
|
|
||||||
|
|
||||||
3. In the package directory, create a Nix expression — a piece of code that describes how to build the package. In this case, it should be a _function_ that is called with the package dependencies as arguments, and returns a build of the package in the Nix store. The expression should usually be called `default.nix`.
|
|
||||||
|
|
||||||
```ShellSession
|
|
||||||
$ emacs pkgs/development/libraries/libfoo/default.nix
|
|
||||||
$ git add pkgs/development/libraries/libfoo/default.nix
|
|
||||||
```
|
|
||||||
|
|
||||||
You can have a look at the existing Nix expressions under `pkgs/` to see how it’s done. Here are some good ones:
|
|
||||||
|
|
||||||
- GNU Hello: [`pkgs/applications/misc/hello/default.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/misc/hello/default.nix). Trivial package, which specifies some `meta` attributes which is good practice.
|
|
||||||
|
|
||||||
- GNU cpio: [`pkgs/tools/archivers/cpio/default.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/archivers/cpio/default.nix). Also a simple package. The generic builder in `stdenv` does everything for you. It has no dependencies beyond `stdenv`.
|
|
||||||
|
|
||||||
- GNU Multiple Precision arithmetic library (GMP): [`pkgs/development/libraries/gmp/5.1.x.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/gmp/5.1.x.nix). Also done by the generic builder, but has a dependency on `m4`.
|
|
||||||
|
|
||||||
- Pan, a GTK-based newsreader: [`pkgs/applications/networking/newsreaders/pan/default.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/networking/newsreaders/pan/default.nix). Has an optional dependency on `gtkspell`, which is only built if `spellCheck` is `true`.
|
|
||||||
|
|
||||||
- Apache HTTPD: [`pkgs/servers/http/apache-httpd/2.4.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/http/apache-httpd/2.4.nix). A bunch of optional features, variable substitutions in the configure flags, a post-install hook, and miscellaneous hackery.
|
|
||||||
|
|
||||||
- buildMozillaMach: [`pkgs/applications/networking/browser/firefox/common.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/networking/browsers/firefox/common.nix). A reusable build function for Firefox, Thunderbird and Librewolf.
|
|
||||||
|
|
||||||
- JDiskReport, a Java utility: [`pkgs/tools/misc/jdiskreport/default.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/jdiskreport/default.nix). Nixpkgs doesn’t have a decent `stdenv` for Java yet so this is pretty ad-hoc.
|
|
||||||
|
|
||||||
- XML::Simple, a Perl module: [`pkgs/top-level/perl-packages.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/perl-packages.nix) (search for the `XMLSimple` attribute). Most Perl modules are so simple to build that they are defined directly in `perl-packages.nix`; no need to make a separate file for them.
|
|
||||||
|
|
||||||
- Adobe Reader: [`pkgs/applications/misc/adobe-reader/default.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/misc/adobe-reader/default.nix). Shows how binary-only packages can be supported. In particular the [builder](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/misc/adobe-reader/builder.sh) uses `patchelf` to set the RUNPATH and ELF interpreter of the executables so that the right libraries are found at runtime.
|
|
||||||
|
|
||||||
Some notes:
|
|
||||||
|
|
||||||
- All [`meta`](#chap-meta) attributes are optional, but it’s still a good idea to provide at least the `description`, `homepage` and [`license`](#sec-meta-license).
|
|
||||||
|
|
||||||
- You can use `nix-prefetch-url url` to get the SHA-256 hash of source distributions. There are similar commands as `nix-prefetch-git` and `nix-prefetch-hg` available in `nix-prefetch-scripts` package.
|
|
||||||
|
|
||||||
- A list of schemes for `mirror://` URLs can be found in [`pkgs/build-support/fetchurl/mirrors.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/fetchurl/mirrors.nix).
|
|
||||||
|
|
||||||
The exact syntax and semantics of the Nix expression language, including the built-in function, are described in the Nix manual in the [chapter on writing Nix expressions](https://hydra.nixos.org/job/nix/trunk/tarball/latest/download-by-type/doc/manual/#chap-writing-nix-expressions).
|
|
||||||
|
|
||||||
4. Add a call to the function defined in the previous step to [`pkgs/top-level/all-packages.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/all-packages.nix) with some descriptive name for the variable, e.g. `libfoo`.
|
|
||||||
|
|
||||||
```ShellSession
|
|
||||||
$ emacs pkgs/top-level/all-packages.nix
|
|
||||||
```
|
|
||||||
|
|
||||||
The attributes in that file are sorted by category (like “Development / Libraries”) that more-or-less correspond to the directory structure of Nixpkgs, and then by attribute name.
|
|
||||||
|
|
||||||
5. To test whether the package builds, run the following command from the root of the nixpkgs source tree:
|
|
||||||
|
|
||||||
```ShellSession
|
|
||||||
$ nix-build -A libfoo
|
|
||||||
```
|
|
||||||
|
|
||||||
where `libfoo` should be the variable name defined in the previous step. You may want to add the flag `-K` to keep the temporary build directory in case something fails. If the build succeeds, a symlink `./result` to the package in the Nix store is created.
|
|
||||||
|
|
||||||
6. If you want to install the package into your profile (optional), do
|
|
||||||
|
|
||||||
```ShellSession
|
|
||||||
$ nix-env -f . -iA libfoo
|
|
||||||
```
|
|
||||||
|
|
||||||
7. Optionally commit the new package and open a pull request [to nixpkgs](https://github.com/NixOS/nixpkgs/pulls), or use [the Patches category](https://discourse.nixos.org/t/about-the-patches-category/477) on Discourse for sending a patch without a GitHub account.
|
|
||||||
|
|
|
@ -1,322 +1,35 @@
|
||||||
# Reviewing contributions {#chap-reviewing-contributions}
|
# Reviewing contributions {#chap-reviewing-contributions}
|
||||||
|
|
||||||
::: {.warning}
|
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
|
||||||
The following section is a draft, and the policy for reviewing is still being discussed in issues such as [#11166](https://github.com/NixOS/nixpkgs/issues/11166) and [#20836](https://github.com/NixOS/nixpkgs/issues/20836).
|
|
||||||
:::
|
|
||||||
|
|
||||||
The Nixpkgs project receives a fairly high number of contributions via GitHub pull requests. Reviewing and approving these is an important task and a way to contribute to the project.
|
|
||||||
|
|
||||||
The high change rate of Nixpkgs makes any pull request that remains open for too long subject to conflicts that will require extra work from the submitter or the merger. Reviewing pull requests in a timely manner and being responsive to the comments is the key to avoid this issue. GitHub provides sort filters that can be used to see the [most recently](https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) and the [least recently](https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-asc) updated pull requests. We highly encourage looking at [this list of ready to merge, unreviewed pull requests](https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+is%3Aopen+review%3Anone+status%3Asuccess+-label%3A%222.status%3A+work-in-progress%22+no%3Aproject+no%3Aassignee+no%3Amilestone).
|
|
||||||
|
|
||||||
When reviewing a pull request, please always be nice and polite. Controversial changes can lead to controversial opinions, but it is important to respect every community member and their work.
|
|
||||||
|
|
||||||
GitHub provides reactions as a simple and quick way to provide feedback to pull requests or any comments. The thumb-down reaction should be used with care and if possible accompanied with some explanation so the submitter has directions to improve their contribution.
|
|
||||||
|
|
||||||
Pull request reviews should include a list of what has been reviewed in a comment, so other reviewers and mergers can know the state of the review.
|
|
||||||
|
|
||||||
All the review template samples provided in this section are generic and meant as examples. Their usage is optional and the reviewer is free to adapt them to their liking.
|
|
||||||
|
|
||||||
## Package updates {#reviewing-contributions-package-updates}
|
## Package updates {#reviewing-contributions-package-updates}
|
||||||
|
|
||||||
A package update is the most trivial and common type of pull request. These pull requests mainly consist of updating the version part of the package name and the source hash.
|
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
|
||||||
|
|
||||||
It can happen that non-trivial updates include patches or more complex changes.
|
|
||||||
|
|
||||||
Reviewing process:
|
|
||||||
|
|
||||||
- Ensure that the package versioning fits the guidelines.
|
|
||||||
- Ensure that the commit text fits the guidelines.
|
|
||||||
- Ensure that the package maintainers are notified.
|
|
||||||
- [CODEOWNERS](https://help.github.com/articles/about-codeowners) will make GitHub notify users based on the submitted changes, but it can happen that it misses some of the package maintainers.
|
|
||||||
- Ensure that the meta field information is correct.
|
|
||||||
- License can change with version updates, so it should be checked to match the upstream license.
|
|
||||||
- If the package has no maintainer, a maintainer must be set. This can be the update submitter or a community member that accepts to take maintainership of the package.
|
|
||||||
- Ensure that the code contains no typos.
|
|
||||||
- Building the package locally.
|
|
||||||
- pull requests are often targeted to the master or staging branch, and building the pull request locally when it is submitted can trigger many source builds.
|
|
||||||
- It is possible to rebase the changes on nixos-unstable or nixpkgs-unstable for easier review by running the following commands from a nixpkgs clone.
|
|
||||||
|
|
||||||
```ShellSession
|
|
||||||
$ git fetch origin nixos-unstable
|
|
||||||
$ git fetch origin pull/PRNUMBER/head
|
|
||||||
$ git rebase --onto nixos-unstable BASEBRANCH FETCH_HEAD
|
|
||||||
```
|
|
||||||
|
|
||||||
- The first command fetches the nixos-unstable branch.
|
|
||||||
- The second command fetches the pull request changes, `PRNUMBER` is the number at the end of the pull request title and `BASEBRANCH` the base branch of the pull request.
|
|
||||||
- The third command rebases the pull request changes to the nixos-unstable branch.
|
|
||||||
- The [nixpkgs-review](https://github.com/Mic92/nixpkgs-review) tool can be used to review a pull request content in a single command. `PRNUMBER` should be replaced by the number at the end of the pull request title. You can also provide the full github pull request url.
|
|
||||||
|
|
||||||
```ShellSession
|
|
||||||
$ nix-shell -p nixpkgs-review --run "nixpkgs-review pr PRNUMBER"
|
|
||||||
```
|
|
||||||
- Running every binary.
|
|
||||||
|
|
||||||
Sample template for a package update review is provided below.
|
|
||||||
|
|
||||||
```markdown
|
|
||||||
##### Reviewed points
|
|
||||||
|
|
||||||
- [ ] package name fits guidelines
|
|
||||||
- [ ] package version fits guidelines
|
|
||||||
- [ ] package build on ARCHITECTURE
|
|
||||||
- [ ] executables tested on ARCHITECTURE
|
|
||||||
- [ ] all depending packages build
|
|
||||||
- [ ] patches have a comment describing either the upstream URL or a reason why the patch wasn't upstreamed
|
|
||||||
- [ ] patches that are remotely available are fetched rather than vendored
|
|
||||||
|
|
||||||
##### Possible improvements
|
|
||||||
|
|
||||||
##### Comments
|
|
||||||
```
|
|
||||||
|
|
||||||
## New packages {#reviewing-contributions-new-packages}
|
## New packages {#reviewing-contributions-new-packages}
|
||||||
|
|
||||||
New packages are a common type of pull requests. These pull requests consists in adding a new nix-expression for a package.
|
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
|
||||||
|
|
||||||
Review process:
|
|
||||||
|
|
||||||
- Ensure that the package versioning fits the guidelines.
|
|
||||||
- Ensure that the commit name fits the guidelines.
|
|
||||||
- Ensure that the meta fields contain correct information.
|
|
||||||
- License must match the upstream license.
|
|
||||||
- Platforms should be set (or the package will not get binary substitutes).
|
|
||||||
- Maintainers must be set. This can be the package submitter or a community member that accepts taking up maintainership of the package.
|
|
||||||
- Report detected typos.
|
|
||||||
- Ensure the package source:
|
|
||||||
- Uses mirror URLs when available.
|
|
||||||
- Uses the most appropriate functions (e.g. packages from GitHub should use `fetchFromGitHub`).
|
|
||||||
- Building the package locally.
|
|
||||||
- Running every binary.
|
|
||||||
|
|
||||||
Sample template for a new package review is provided below.
|
|
||||||
|
|
||||||
```markdown
|
|
||||||
##### Reviewed points
|
|
||||||
|
|
||||||
- [ ] package path fits guidelines
|
|
||||||
- [ ] package name fits guidelines
|
|
||||||
- [ ] package version fits guidelines
|
|
||||||
- [ ] package build on ARCHITECTURE
|
|
||||||
- [ ] executables tested on ARCHITECTURE
|
|
||||||
- [ ] `meta.description` is set and fits guidelines
|
|
||||||
- [ ] `meta.license` fits upstream license
|
|
||||||
- [ ] `meta.platforms` is set
|
|
||||||
- [ ] `meta.maintainers` is set
|
|
||||||
- [ ] build time only dependencies are declared in `nativeBuildInputs`
|
|
||||||
- [ ] source is fetched using the appropriate function
|
|
||||||
- [ ] the list of `phases` is not overridden
|
|
||||||
- [ ] when a phase (like `installPhase`) is overridden it starts with `runHook preInstall` and ends with `runHook postInstall`.
|
|
||||||
- [ ] patches have a comment describing either the upstream URL or a reason why the patch wasn't upstreamed
|
|
||||||
- [ ] patches that are remotely available are fetched rather than vendored
|
|
||||||
|
|
||||||
##### Possible improvements
|
|
||||||
|
|
||||||
##### Comments
|
|
||||||
```
|
|
||||||
|
|
||||||
## Module updates {#reviewing-contributions-module-updates}
|
## Module updates {#reviewing-contributions-module-updates}
|
||||||
|
|
||||||
Module updates are submissions changing modules in some ways. These often contains changes to the options or introduce new options.
|
This section has been moved to [nixos/README.md](https://github.com/NixOS/nixpkgs/blob/master/nixos/README.md).
|
||||||
|
|
||||||
Reviewing process:
|
|
||||||
|
|
||||||
- Ensure that the module maintainers are notified.
|
|
||||||
- [CODEOWNERS](https://help.github.com/articles/about-codeowners/) will make GitHub notify users based on the submitted changes, but it can happen that it misses some of the package maintainers.
|
|
||||||
- Ensure that the module tests, if any, are succeeding.
|
|
||||||
- Ensure that the introduced options are correct.
|
|
||||||
- Type should be appropriate (string related types differs in their merging capabilities, `loaOf` and `string` types are deprecated).
|
|
||||||
- Description, default and example should be provided.
|
|
||||||
- Ensure that option changes are backward compatible.
|
|
||||||
- `mkRenamedOptionModuleWith` provides a way to make option changes backward compatible.
|
|
||||||
- Ensure that removed options are declared with `mkRemovedOptionModule`
|
|
||||||
- Ensure that changes that are not backward compatible are mentioned in release notes.
|
|
||||||
- Ensure that documentations affected by the change is updated.
|
|
||||||
|
|
||||||
Sample template for a module update review is provided below.
|
|
||||||
|
|
||||||
```markdown
|
|
||||||
##### Reviewed points
|
|
||||||
|
|
||||||
- [ ] changes are backward compatible
|
|
||||||
- [ ] removed options are declared with `mkRemovedOptionModule`
|
|
||||||
- [ ] changes that are not backward compatible are documented in release notes
|
|
||||||
- [ ] module tests succeed on ARCHITECTURE
|
|
||||||
- [ ] options types are appropriate
|
|
||||||
- [ ] options description is set
|
|
||||||
- [ ] options example is provided
|
|
||||||
- [ ] documentation affected by the changes is updated
|
|
||||||
|
|
||||||
##### Possible improvements
|
|
||||||
|
|
||||||
##### Comments
|
|
||||||
```
|
|
||||||
|
|
||||||
## New modules {#reviewing-contributions-new-modules}
|
## New modules {#reviewing-contributions-new-modules}
|
||||||
|
|
||||||
New modules submissions introduce a new module to NixOS.
|
This section has been moved to [nixos/README.md](https://github.com/NixOS/nixpkgs/blob/master/nixos/README.md).
|
||||||
|
|
||||||
Reviewing process:
|
|
||||||
|
|
||||||
- Ensure that the module tests, if any, are succeeding.
|
|
||||||
- Ensure that the introduced options are correct.
|
|
||||||
- Type should be appropriate (string related types differs in their merging capabilities, `loaOf` and `string` types are deprecated).
|
|
||||||
- Description, default and example should be provided.
|
|
||||||
- Ensure that module `meta` field is present
|
|
||||||
- Maintainers should be declared in `meta.maintainers`.
|
|
||||||
- Module documentation should be declared with `meta.doc`.
|
|
||||||
- Ensure that the module respect other modules functionality.
|
|
||||||
- For example, enabling a module should not open firewall ports by default.
|
|
||||||
|
|
||||||
Sample template for a new module review is provided below.
|
|
||||||
|
|
||||||
```markdown
|
|
||||||
##### Reviewed points
|
|
||||||
|
|
||||||
- [ ] module path fits the guidelines
|
|
||||||
- [ ] module tests succeed on ARCHITECTURE
|
|
||||||
- [ ] options have appropriate types
|
|
||||||
- [ ] options have default
|
|
||||||
- [ ] options have example
|
|
||||||
- [ ] options have descriptions
|
|
||||||
- [ ] No unneeded package is added to environment.systemPackages
|
|
||||||
- [ ] meta.maintainers is set
|
|
||||||
- [ ] module documentation is declared in meta.doc
|
|
||||||
|
|
||||||
##### Possible improvements
|
|
||||||
|
|
||||||
##### Comments
|
|
||||||
```
|
|
||||||
|
|
||||||
## Individual maintainer list {#reviewing-contributions-individual-maintainer-list}
|
## Individual maintainer list {#reviewing-contributions-individual-maintainer-list}
|
||||||
|
|
||||||
When adding users to `maintainers/maintainer-list.nix`, the following
|
This section has been moved to [maintainers/README.md](https://github.com/NixOS/nixpkgs/blob/master/maintainers/README.md).
|
||||||
checks should be performed:
|
|
||||||
|
|
||||||
- If the user has specified a GPG key, verify that the commit is
|
|
||||||
signed by their key.
|
|
||||||
|
|
||||||
First, validate that the commit adding the maintainer is signed by
|
|
||||||
the key the maintainer listed. Check out the pull request and
|
|
||||||
compare its signing key with the listed key in the commit.
|
|
||||||
|
|
||||||
If the commit is not signed or it is signed by a different user, ask
|
|
||||||
them to either recommit using that key or to remove their key
|
|
||||||
information.
|
|
||||||
|
|
||||||
Given a maintainer entry like this:
|
|
||||||
|
|
||||||
``` nix
|
|
||||||
{
|
|
||||||
example = {
|
|
||||||
email = "user@example.com";
|
|
||||||
name = "Example User";
|
|
||||||
keys = [{
|
|
||||||
fingerprint = "0000 0000 2A70 6423 0AED 3C11 F04F 7A19 AAA6 3AFE";
|
|
||||||
}];
|
|
||||||
}
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
First receive their key from a keyserver:
|
|
||||||
|
|
||||||
$ gpg --recv-keys 0xF04F7A19AAA63AFE
|
|
||||||
gpg: key 0xF04F7A19AAA63AFE: public key "Example <user@example.com>" imported
|
|
||||||
gpg: Total number processed: 1
|
|
||||||
gpg: imported: 1
|
|
||||||
|
|
||||||
Then check the commit is signed by that key:
|
|
||||||
|
|
||||||
$ git log --show-signature
|
|
||||||
commit b87862a4f7d32319b1de428adb6cdbdd3a960153
|
|
||||||
gpg: Signature made Wed Mar 12 13:32:24 2003 +0000
|
|
||||||
gpg: using RSA key 000000002A7064230AED3C11F04F7A19AAA63AFE
|
|
||||||
gpg: Good signature from "Example User <user@example.com>
|
|
||||||
Author: Example User <user@example.com>
|
|
||||||
Date: Wed Mar 12 13:32:24 2003 +0000
|
|
||||||
|
|
||||||
maintainers: adding example
|
|
||||||
|
|
||||||
and validate that there is a `Good signature` and the printed key
|
|
||||||
matches the user's submitted key.
|
|
||||||
|
|
||||||
Note: GitHub's "Verified" label does not display the user's full key
|
|
||||||
fingerprint, and should not be used for validating the key matches.
|
|
||||||
|
|
||||||
- If the user has specified a `github` account name, ensure they have
|
|
||||||
also specified a `githubId` and verify the two match.
|
|
||||||
|
|
||||||
Maintainer entries that include a `github` field must also include
|
|
||||||
their `githubId`. People can and do change their GitHub name
|
|
||||||
frequently, and the ID is used as the official and stable identity
|
|
||||||
of the maintainer.
|
|
||||||
|
|
||||||
Given a maintainer entry like this:
|
|
||||||
|
|
||||||
``` nix
|
|
||||||
{
|
|
||||||
example = {
|
|
||||||
email = "user@example.com";
|
|
||||||
name = "Example User";
|
|
||||||
github = "ghost";
|
|
||||||
githubId = 10137;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
First, make sure that the listed GitHub handle matches the author of
|
|
||||||
the commit.
|
|
||||||
|
|
||||||
Then, visit the URL `https://api.github.com/users/ghost` and
|
|
||||||
validate that the `id` field matches the provided `githubId`.
|
|
||||||
|
|
||||||
## Maintainer teams {#reviewing-contributions-maintainer-teams}
|
## Maintainer teams {#reviewing-contributions-maintainer-teams}
|
||||||
|
|
||||||
Feel free to create a new maintainer team in `maintainers/team-list.nix`
|
This section has been moved to [maintainers/README.md](https://github.com/NixOS/nixpkgs/blob/master/maintainers/README.md).
|
||||||
when a group is collectively responsible for a collection of packages.
|
|
||||||
Use taste and personal judgement when deciding if a team is warranted.
|
|
||||||
|
|
||||||
Teams are allowed to define their own rules about membership.
|
|
||||||
|
|
||||||
For example, some teams will represent a business or other group which
|
|
||||||
wants to carefully track its members. Other teams may be very open about
|
|
||||||
who can join, and allow anybody to participate.
|
|
||||||
|
|
||||||
When reviewing changes to a team, read the team's scope and the context
|
|
||||||
around the member list for indications about the team's membership
|
|
||||||
policy.
|
|
||||||
|
|
||||||
In any case, request reviews from the existing team members. If the team
|
|
||||||
lists no specific membership policy, feel free to merge changes to the
|
|
||||||
team after giving the existing members a few days to respond.
|
|
||||||
|
|
||||||
*Important:* If a team says it is a closed group, do not merge additions
|
|
||||||
to the team without an approval by at least one existing member.
|
|
||||||
|
|
||||||
## Other submissions {#reviewing-contributions-other-submissions}
|
## Other submissions {#reviewing-contributions-other-submissions}
|
||||||
|
|
||||||
Other type of submissions requires different reviewing steps.
|
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
|
||||||
|
|
||||||
If you consider having enough knowledge and experience in a topic and would like to be a long-term reviewer for related submissions, please contact the current reviewers for that topic. They will give you information about the reviewing process. The main reviewers for a topic can be hard to find as there is no list, but checking past pull requests to see who reviewed or git-blaming the code to see who committed to that topic can give some hints.
|
|
||||||
|
|
||||||
Container system, boot system and library changes are some examples of the pull requests fitting this category.
|
|
||||||
|
|
||||||
## Merging pull requests {#reviewing-contributions--merging-pull-requests}
|
## Merging pull requests {#reviewing-contributions--merging-pull-requests}
|
||||||
|
|
||||||
It is possible for community members that have enough knowledge and experience on a special topic to contribute by merging pull requests.
|
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
|
||||||
|
|
||||||
In case the PR is stuck waiting for the original author to apply a trivial
|
|
||||||
change (a typo, capitalisation change, etc.) and the author allowed the members
|
|
||||||
to modify the PR, consider applying it yourself. (or commit the existing review
|
|
||||||
suggestion) You should pay extra attention to make sure the addition doesn't go
|
|
||||||
against the idea of the original PR and would not be opposed by the author.
|
|
||||||
|
|
||||||
<!--
|
|
||||||
The following paragraphs about how to deal with unactive contributors is just a proposition and should be modified to what the community agrees to be the right policy.
|
|
||||||
|
|
||||||
Please note that contributors with commit rights unactive for more than three months will have their commit rights revoked.
|
|
||||||
-->
|
|
||||||
|
|
||||||
Please see the discussion in [GitHub nixpkgs issue #50105](https://github.com/NixOS/nixpkgs/issues/50105) for information on how to proceed to be granted this level of access.
|
|
||||||
|
|
||||||
In a case a contributor definitively leaves the Nix community, they should create an issue or post on [Discourse](https://discourse.nixos.org) with references of packages and modules they maintain so the maintainership can be taken over by other contributors.
|
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
digraph {
|
|
||||||
"small changes" [shape=none]
|
|
||||||
"mass-rebuilds and other large changes" [shape=none]
|
|
||||||
"critical security fixes" [shape=none]
|
|
||||||
"broken staging-next fixes" [shape=none]
|
|
||||||
|
|
||||||
"small changes" -> master
|
|
||||||
"mass-rebuilds and other large changes" -> staging
|
|
||||||
"critical security fixes" -> master
|
|
||||||
"broken staging-next fixes" -> "staging-next"
|
|
||||||
|
|
||||||
"staging-next" -> master [color="#E85EB0"] [label="stabilization ends"] [fontcolor="#E85EB0"]
|
|
||||||
"staging" -> "staging-next" [color="#E85EB0"] [label="stabilization starts"] [fontcolor="#E85EB0"]
|
|
||||||
|
|
||||||
master -> "staging-next" -> staging [color="#5F5EE8"] [label="every six hours (GitHub Action)"] [fontcolor="#5F5EE8"]
|
|
||||||
}
|
|
|
@ -1,102 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
|
||||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
||||||
<!-- Generated by graphviz version 7.1.0 (0)
|
|
||||||
-->
|
|
||||||
<!-- Pages: 1 -->
|
|
||||||
<svg width="743pt" height="291pt"
|
|
||||||
viewBox="0.00 0.00 743.00 291.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
||||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 287)">
|
|
||||||
<polygon fill="white" stroke="none" points="-4,4 -4,-287 739,-287 739,4 -4,4"/>
|
|
||||||
<!-- small changes -->
|
|
||||||
<g id="node1" class="node">
|
|
||||||
<title>small changes</title>
|
|
||||||
<text text-anchor="middle" x="59" y="-261.3" font-family="Times,serif" font-size="14.00">small changes</text>
|
|
||||||
</g>
|
|
||||||
<!-- master -->
|
|
||||||
<g id="node5" class="node">
|
|
||||||
<title>master</title>
|
|
||||||
<ellipse fill="none" stroke="black" cx="139" cy="-192" rx="43.59" ry="18"/>
|
|
||||||
<text text-anchor="middle" x="139" y="-188.3" font-family="Times,serif" font-size="14.00">master</text>
|
|
||||||
</g>
|
|
||||||
<!-- small changes->master -->
|
|
||||||
<g id="edge1" class="edge">
|
|
||||||
<title>small changes->master</title>
|
|
||||||
<path fill="none" stroke="black" d="M77.96,-247.17C88.42,-237.89 101.55,-226.23 112.96,-216.11"/>
|
|
||||||
<polygon fill="black" stroke="black" points="114.99,-218.99 120.14,-209.74 110.34,-213.76 114.99,-218.99"/>
|
|
||||||
</g>
|
|
||||||
<!-- mass-rebuilds and other large changes -->
|
|
||||||
<g id="node2" class="node">
|
|
||||||
<title>mass-rebuilds and other large changes</title>
|
|
||||||
<text text-anchor="middle" x="588" y="-101.3" font-family="Times,serif" font-size="14.00">mass-rebuilds and other large changes</text>
|
|
||||||
</g>
|
|
||||||
<!-- staging -->
|
|
||||||
<g id="node6" class="node">
|
|
||||||
<title>staging</title>
|
|
||||||
<ellipse fill="none" stroke="black" cx="438" cy="-18" rx="45.49" ry="18"/>
|
|
||||||
<text text-anchor="middle" x="438" y="-14.3" font-family="Times,serif" font-size="14.00">staging</text>
|
|
||||||
</g>
|
|
||||||
<!-- mass-rebuilds and other large changes->staging -->
|
|
||||||
<g id="edge2" class="edge">
|
|
||||||
<title>mass-rebuilds and other large changes->staging</title>
|
|
||||||
<path fill="none" stroke="black" d="M587.48,-87.47C586.26,-76.55 582.89,-62.7 574,-54 553.19,-33.63 522.2,-24.65 495.05,-20.86"/>
|
|
||||||
<polygon fill="black" stroke="black" points="495.53,-17.39 485.2,-19.71 494.72,-24.35 495.53,-17.39"/>
|
|
||||||
</g>
|
|
||||||
<!-- critical security fixes -->
|
|
||||||
<g id="node3" class="node">
|
|
||||||
<title>critical security fixes</title>
|
|
||||||
<text text-anchor="middle" x="219" y="-261.3" font-family="Times,serif" font-size="14.00">critical security fixes</text>
|
|
||||||
</g>
|
|
||||||
<!-- critical security fixes->master -->
|
|
||||||
<g id="edge3" class="edge">
|
|
||||||
<title>critical security fixes->master</title>
|
|
||||||
<path fill="none" stroke="black" d="M200.04,-247.17C189.58,-237.89 176.45,-226.23 165.04,-216.11"/>
|
|
||||||
<polygon fill="black" stroke="black" points="167.66,-213.76 157.86,-209.74 163.01,-218.99 167.66,-213.76"/>
|
|
||||||
</g>
|
|
||||||
<!-- broken staging-next fixes -->
|
|
||||||
<g id="node4" class="node">
|
|
||||||
<title>broken staging-next fixes</title>
|
|
||||||
<text text-anchor="middle" x="414" y="-188.3" font-family="Times,serif" font-size="14.00">broken staging-next fixes</text>
|
|
||||||
</g>
|
|
||||||
<!-- staging-next -->
|
|
||||||
<g id="node7" class="node">
|
|
||||||
<title>staging-next</title>
|
|
||||||
<ellipse fill="none" stroke="black" cx="272" cy="-105" rx="68.79" ry="18"/>
|
|
||||||
<text text-anchor="middle" x="272" y="-101.3" font-family="Times,serif" font-size="14.00">staging-next</text>
|
|
||||||
</g>
|
|
||||||
<!-- broken staging-next fixes->staging-next -->
|
|
||||||
<g id="edge4" class="edge">
|
|
||||||
<title>broken staging-next fixes->staging-next</title>
|
|
||||||
<path fill="none" stroke="black" d="M410.2,-174.42C406.88,-163.48 400.98,-149.62 391,-141 377.77,-129.56 360.96,-121.86 344.17,-116.67"/>
|
|
||||||
<polygon fill="black" stroke="black" points="345.21,-113.33 334.63,-114.02 343.33,-120.07 345.21,-113.33"/>
|
|
||||||
</g>
|
|
||||||
<!-- master->staging-next -->
|
|
||||||
<g id="edge7" class="edge">
|
|
||||||
<title>master->staging-next</title>
|
|
||||||
<path fill="none" stroke="#5f5ee8" d="M96.55,-187.26C53.21,-181.83 -4.5,-169.14 20,-141 41.99,-115.74 126.36,-108.13 191.48,-106.11"/>
|
|
||||||
<polygon fill="#5f5ee8" stroke="#5f5ee8" points="191.57,-109.61 201.47,-105.85 191.38,-102.62 191.57,-109.61"/>
|
|
||||||
<text text-anchor="middle" x="133" y="-144.8" font-family="Times,serif" font-size="14.00" fill="#5f5ee8">every six hours (GitHub Action)</text>
|
|
||||||
</g>
|
|
||||||
<!-- staging->staging-next -->
|
|
||||||
<g id="edge6" class="edge">
|
|
||||||
<title>staging->staging-next</title>
|
|
||||||
<path fill="none" stroke="#e85eb0" d="M434.55,-36.2C431.48,-47.12 425.89,-60.72 416,-69 397.61,-84.41 373.51,-93.23 350.31,-98.23"/>
|
|
||||||
<polygon fill="#e85eb0" stroke="#e85eb0" points="349.67,-94.79 340.5,-100.1 350.98,-101.66 349.67,-94.79"/>
|
|
||||||
<text text-anchor="middle" x="493.5" y="-57.8" font-family="Times,serif" font-size="14.00" fill="#e85eb0">stabilization starts</text>
|
|
||||||
</g>
|
|
||||||
<!-- staging-next->master -->
|
|
||||||
<g id="edge5" class="edge">
|
|
||||||
<title>staging-next->master</title>
|
|
||||||
<path fill="none" stroke="#e85eb0" d="M268.22,-123.46C265.05,-134.22 259.46,-147.52 250,-156 233.94,-170.4 211.98,-178.87 191.83,-183.86"/>
|
|
||||||
<polygon fill="#e85eb0" stroke="#e85eb0" points="191.35,-180.38 182.34,-185.96 192.86,-187.22 191.35,-180.38"/>
|
|
||||||
<text text-anchor="middle" x="323.5" y="-144.8" font-family="Times,serif" font-size="14.00" fill="#e85eb0">stabilization ends</text>
|
|
||||||
</g>
|
|
||||||
<!-- staging-next->staging -->
|
|
||||||
<g id="edge8" class="edge">
|
|
||||||
<title>staging-next->staging</title>
|
|
||||||
<path fill="none" stroke="#5f5ee8" d="M221.07,-92.46C194.72,-84.14 170.92,-71.32 186,-54 210.78,-25.54 314.74,-19.48 381.15,-18.6"/>
|
|
||||||
<polygon fill="#5f5ee8" stroke="#5f5ee8" points="380.79,-22.1 390.76,-18.51 380.73,-15.1 380.79,-22.1"/>
|
|
||||||
<text text-anchor="middle" x="299" y="-57.8" font-family="Times,serif" font-size="14.00" fill="#5f5ee8">every six hours (GitHub Action)</text>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 5.6 KiB |
|
@ -1,344 +1,88 @@
|
||||||
# Submitting changes {#chap-submitting-changes}
|
# Submitting changes {#chap-submitting-changes}
|
||||||
|
|
||||||
## Making patches {#submitting-changes-making-patches}
|
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
|
||||||
|
|
||||||
- Read [Manual (How to write packages for Nix)](https://nixos.org/nixpkgs/manual/).
|
|
||||||
|
|
||||||
- Fork [the Nixpkgs repository](https://github.com/nixos/nixpkgs/) on GitHub.
|
|
||||||
|
|
||||||
- Create a branch for your future fix.
|
|
||||||
|
|
||||||
- You can make branch from a commit of your local `nixos-version`. That will help you to avoid additional local compilations. Because you will receive packages from binary cache. For example
|
|
||||||
|
|
||||||
```ShellSession
|
|
||||||
$ nixos-version --hash
|
|
||||||
0998212
|
|
||||||
$ git checkout 0998212
|
|
||||||
$ git checkout -b 'fix/pkg-name-update'
|
|
||||||
```
|
|
||||||
|
|
||||||
- Please avoid working directly on the `master` branch.
|
|
||||||
|
|
||||||
- Make commits of logical units.
|
|
||||||
|
|
||||||
- If you removed pkgs or made some major NixOS changes, write about it in the release notes for the next stable release. For example `nixos/doc/manual/release-notes/rl-2003.xml`.
|
|
||||||
|
|
||||||
- Check for unnecessary whitespace with `git diff --check` before committing.
|
|
||||||
|
|
||||||
- Format the commit in a following way:
|
|
||||||
|
|
||||||
```
|
|
||||||
(pkg-name | nixos/<module>): (from -> to | init at version | refactor | etc)
|
|
||||||
Additional information.
|
|
||||||
```
|
|
||||||
|
|
||||||
- Examples:
|
|
||||||
- `nginx: init at 2.0.1`
|
|
||||||
- `firefox: 54.0.1 -> 55.0`
|
|
||||||
- `nixos/hydra: add bazBaz option`
|
|
||||||
- `nixos/nginx: refactor config generation`
|
|
||||||
|
|
||||||
- Test your changes. If you work with
|
|
||||||
|
|
||||||
- nixpkgs:
|
|
||||||
|
|
||||||
- update pkg
|
|
||||||
- `nix-env -iA pkg-attribute-name -f <path to your local nixpkgs folder>`
|
|
||||||
- add pkg
|
|
||||||
- Make sure it’s in `pkgs/top-level/all-packages.nix`
|
|
||||||
- `nix-env -iA pkg-attribute-name -f <path to your local nixpkgs folder>`
|
|
||||||
- _If you don’t want to install pkg in you profile_.
|
|
||||||
- `nix-build -A pkg-attribute-name <path to your local nixpkgs folder>` and check results in the folder `result`. It will appear in the same directory where you did `nix-build`.
|
|
||||||
- If you installed your package with `nix-env`, you can run `nix-env -e pkg-name` where `pkg-name` is as reported by `nix-env -q` to uninstall it from your system.
|
|
||||||
|
|
||||||
- NixOS and its modules:
|
|
||||||
- You can add new module to your NixOS configuration file (usually it’s `/etc/nixos/configuration.nix`). And do `sudo nixos-rebuild test -I nixpkgs=<path to your local nixpkgs folder> --fast`.
|
|
||||||
|
|
||||||
- If you have commits `pkg-name: oh, forgot to insert whitespace`: squash commits in this case. Use `git rebase -i`.
|
|
||||||
|
|
||||||
- [Rebase](https://git-scm.com/book/en/v2/Git-Branching-Rebasing) your branch against current `master`.
|
|
||||||
|
|
||||||
## Submitting changes {#submitting-changes-submitting-changes}
|
## Submitting changes {#submitting-changes-submitting-changes}
|
||||||
|
|
||||||
- Push your changes to your fork of nixpkgs.
|
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
|
||||||
- Create the pull request
|
|
||||||
- Follow [the contribution guidelines](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#submitting-changes).
|
|
||||||
|
|
||||||
## Submitting security fixes {#submitting-changes-submitting-security-fixes}
|
## Submitting security fixes {#submitting-changes-submitting-security-fixes}
|
||||||
|
|
||||||
Security fixes are submitted in the same way as other changes and thus the same guidelines apply.
|
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
|
||||||
|
|
||||||
- If a new version fixing the vulnerability has been released, update the package;
|
|
||||||
- If the security fix comes in the form of a patch and a CVE is available, then add the patch to the Nixpkgs tree, and apply it to the package.
|
|
||||||
The name of the patch should be the CVE identifier, so e.g. `CVE-2019-13636.patch`; If a patch is fetched the name needs to be set as well, e.g.:
|
|
||||||
|
|
||||||
```nix
|
|
||||||
(fetchpatch {
|
|
||||||
name = "CVE-2019-11068.patch";
|
|
||||||
url = "https://gitlab.gnome.org/GNOME/libxslt/commit/e03553605b45c88f0b4b2980adfbbb8f6fca2fd6.patch";
|
|
||||||
hash = "sha256-SEKe/8HcW0UBHCfPTTOnpRlzmV2nQPPeL6HOMxBZd14=";
|
|
||||||
})
|
|
||||||
```
|
|
||||||
|
|
||||||
If a security fix applies to both master and a stable release then, similar to regular changes, they are preferably delivered via master first and cherry-picked to the release branch.
|
|
||||||
|
|
||||||
Critical security fixes may by-pass the staging branches and be delivered directly to release branches such as `master` and `release-*`.
|
|
||||||
|
|
||||||
## Deprecating/removing packages {#submitting-changes-deprecating-packages}
|
## Deprecating/removing packages {#submitting-changes-deprecating-packages}
|
||||||
|
|
||||||
There is currently no policy when to remove a package.
|
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
|
||||||
|
|
||||||
Before removing a package, one should try to find a new maintainer or fix smaller issues first.
|
|
||||||
|
|
||||||
### Steps to remove a package from Nixpkgs {#steps-to-remove-a-package-from-nixpkgs}
|
### Steps to remove a package from Nixpkgs {#steps-to-remove-a-package-from-nixpkgs}
|
||||||
|
|
||||||
We use jbidwatcher as an example for a discontinued project here.
|
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
|
||||||
|
|
||||||
1. Have Nixpkgs checked out locally and up to date.
|
|
||||||
1. Create a new branch for your change, e.g. `git checkout -b jbidwatcher`
|
|
||||||
1. Remove the actual package including its directory, e.g. `git rm -rf pkgs/applications/misc/jbidwatcher`
|
|
||||||
1. Remove the package from the list of all packages (`pkgs/top-level/all-packages.nix`).
|
|
||||||
1. Add an alias for the package name in `pkgs/top-level/aliases.nix` (There is also `pkgs/applications/editors/vim/plugins/aliases.nix`. Package sets typically do not have aliases, so we can't add them there.)
|
|
||||||
|
|
||||||
For example in this case:
|
|
||||||
|
|
||||||
```
|
|
||||||
jbidwatcher = throw "jbidwatcher was discontinued in march 2021"; # added 2021-03-15
|
|
||||||
```
|
|
||||||
|
|
||||||
The throw message should explain in short why the package was removed for users that still have it installed.
|
|
||||||
|
|
||||||
1. Test if the changes introduced any issues by running `nix-env -qaP -f . --show-trace`. It should show the list of packages without errors.
|
|
||||||
1. Commit the changes. Explain again why the package was removed. If it was declared discontinued upstream, add a link to the source.
|
|
||||||
|
|
||||||
```ShellSession
|
|
||||||
$ git add pkgs/applications/misc/jbidwatcher/default.nix pkgs/top-level/all-packages.nix pkgs/top-level/aliases.nix
|
|
||||||
$ git commit
|
|
||||||
```
|
|
||||||
|
|
||||||
Example commit message:
|
|
||||||
|
|
||||||
```
|
|
||||||
jbidwatcher: remove
|
|
||||||
|
|
||||||
project was discontinued in march 2021. the program does not work anymore because ebay changed the login.
|
|
||||||
|
|
||||||
https://web.archive.org/web/20210315205723/http://www.jbidwatcher.com/
|
|
||||||
```
|
|
||||||
|
|
||||||
1. Push changes to your GitHub fork with `git push`
|
|
||||||
1. Create a pull request against Nixpkgs. Mention the package maintainer.
|
|
||||||
|
|
||||||
This is how the pull request looks like in this case: [https://github.com/NixOS/nixpkgs/pull/116470](https://github.com/NixOS/nixpkgs/pull/116470)
|
|
||||||
|
|
||||||
## Pull Request Template {#submitting-changes-pull-request-template}
|
## Pull Request Template {#submitting-changes-pull-request-template}
|
||||||
|
|
||||||
The pull request template helps determine what steps have been made for a contribution so far, and will help guide maintainers on the status of a change. The motivation section of the PR should include any extra details the title does not address and link any existing issues related to the pull request.
|
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
|
||||||
|
|
||||||
When a PR is created, it will be pre-populated with some checkboxes detailed below:
|
|
||||||
|
|
||||||
### Tested using sandboxing {#submitting-changes-tested-with-sandbox}
|
### Tested using sandboxing {#submitting-changes-tested-with-sandbox}
|
||||||
|
|
||||||
When sandbox builds are enabled, Nix will setup an isolated environment for each build process. It is used to remove further hidden dependencies set by the build environment to improve reproducibility. This includes access to the network during the build outside of `fetch*` functions and files outside the Nix store. Depending on the operating system access to other resources are blocked as well (ex. inter process communication is isolated on Linux); see [sandbox](https://nixos.org/nix/manual/#conf-sandbox) in Nix manual for details.
|
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
|
||||||
|
|
||||||
Sandboxing is not enabled by default in Nix due to a small performance hit on each build. In pull requests for [nixpkgs](https://github.com/NixOS/nixpkgs/) people are asked to test builds with sandboxing enabled (see `Tested using sandboxing` in the pull request template) because in<https://nixos.org/hydra/> sandboxing is also used.
|
|
||||||
|
|
||||||
Depending if you use NixOS or other platforms you can use one of the following methods to enable sandboxing **before** building the package:
|
|
||||||
|
|
||||||
- **Globally enable sandboxing on NixOS**: add the following to `configuration.nix`
|
|
||||||
|
|
||||||
```nix
|
|
||||||
nix.useSandbox = true;
|
|
||||||
```
|
|
||||||
|
|
||||||
- **Globally enable sandboxing on non-NixOS platforms**: add the following to: `/etc/nix/nix.conf`
|
|
||||||
|
|
||||||
```ini
|
|
||||||
sandbox = true
|
|
||||||
```
|
|
||||||
|
|
||||||
### Built on platform(s) {#submitting-changes-platform-diversity}
|
### Built on platform(s) {#submitting-changes-platform-diversity}
|
||||||
|
|
||||||
Many Nix packages are designed to run on multiple platforms. As such, it’s important to let the maintainer know which platforms your changes have been tested on. It’s not always practical to test a change on all platforms, and is not required for a pull request to be merged. Only check the systems you tested the build on in this section.
|
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
|
||||||
|
|
||||||
### Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests) {#submitting-changes-nixos-tests}
|
### Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests) {#submitting-changes-nixos-tests}
|
||||||
|
|
||||||
Packages with automated tests are much more likely to be merged in a timely fashion because it doesn’t require as much manual testing by the maintainer to verify the functionality of the package. If there are existing tests for the package, they should be run to verify your changes do not break the tests. Tests can only be run on Linux. For more details on writing and running tests, see the [section in the NixOS manual](https://nixos.org/nixos/manual/index.html#sec-nixos-tests).
|
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
|
||||||
|
|
||||||
### Tested compilation of all pkgs that depend on this change using `nixpkgs-review` {#submitting-changes-tested-compilation}
|
### Tested compilation of all pkgs that depend on this change using `nixpkgs-review` {#submitting-changes-tested-compilation}
|
||||||
|
|
||||||
If you are updating a package’s version, you can use `nixpkgs-review` to make sure all packages that depend on the updated package still compile correctly. The `nixpkgs-review` utility can look for and build all dependencies either based on uncommitted changes with the `wip` option or specifying a GitHub pull request number.
|
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
|
||||||
|
|
||||||
Review changes from pull request number 12345:
|
|
||||||
|
|
||||||
```ShellSession
|
|
||||||
nix-shell -p nixpkgs-review --run "nixpkgs-review pr 12345"
|
|
||||||
```
|
|
||||||
|
|
||||||
Alternatively, with flakes (and analogously for the other commands below):
|
|
||||||
|
|
||||||
```ShellSession
|
|
||||||
nix run nixpkgs#nixpkgs-review -- pr 12345
|
|
||||||
```
|
|
||||||
|
|
||||||
Review uncommitted changes:
|
|
||||||
|
|
||||||
```ShellSession
|
|
||||||
nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
|
|
||||||
```
|
|
||||||
|
|
||||||
Review changes from last commit:
|
|
||||||
|
|
||||||
```ShellSession
|
|
||||||
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
|
|
||||||
```
|
|
||||||
|
|
||||||
### Tested execution of all binary files (usually in `./result/bin/`) {#submitting-changes-tested-execution}
|
### Tested execution of all binary files (usually in `./result/bin/`) {#submitting-changes-tested-execution}
|
||||||
|
|
||||||
It’s important to test any executables generated by a build when you change or create a package in nixpkgs. This can be done by looking in `./result/bin` and running any files in there, or at a minimum, the main executable for the package. For example, if you make a change to texlive, you probably would only check the binaries associated with the change you made rather than testing all of them.
|
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
|
||||||
|
|
||||||
### Meets Nixpkgs contribution standards {#submitting-changes-contribution-standards}
|
### Meets Nixpkgs contribution standards {#submitting-changes-contribution-standards}
|
||||||
|
|
||||||
The last checkbox is fits [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md). The contributing document has detailed information on standards the Nix community has for commit messages, reviews, licensing of contributions you make to the project, etc... Everyone should read and understand the standards the community has for contributing before submitting a pull request.
|
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
|
||||||
|
|
||||||
## Hotfixing pull requests {#submitting-changes-hotfixing-pull-requests}
|
## Hotfixing pull requests {#submitting-changes-hotfixing-pull-requests}
|
||||||
|
|
||||||
- Make the appropriate changes in you branch.
|
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
|
||||||
- Don’t create additional commits, do
|
|
||||||
- `git rebase -i`
|
|
||||||
- `git push --force` to your branch.
|
|
||||||
|
|
||||||
## Commit policy {#submitting-changes-commit-policy}
|
## Commit policy {#submitting-changes-commit-policy}
|
||||||
|
|
||||||
- Commits must be sufficiently tested before being merged, both for the master and staging branches.
|
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
|
||||||
- Hydra builds for master and staging should not be used as testing platform, it’s a build farm for changes that have been already tested.
|
|
||||||
- When changing the bootloader installation process, extra care must be taken. Grub installations cannot be rolled back, hence changes may break people’s installations forever. For any non-trivial change to the bootloader please file a PR asking for review, especially from \@edolstra.
|
|
||||||
|
|
||||||
### Branches {#submitting-changes-branches}
|
### Branches {#submitting-changes-branches}
|
||||||
|
|
||||||
The `nixpkgs` repository has three major branches:
|
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
|
||||||
- `master`
|
|
||||||
- `staging`
|
|
||||||
- `staging-next`
|
|
||||||
|
|
||||||
The most important distinction between them is that `staging`
|
|
||||||
(colored red in the diagram below) can receive commits which cause
|
|
||||||
a mass-rebuild (for example, anything that changes the `drvPath` of
|
|
||||||
`stdenv`). The other two branches `staging-next` and `master`
|
|
||||||
(colored green in the diagram below) can *not* receive commits which
|
|
||||||
cause a mass-rebuild.
|
|
||||||
|
|
||||||
Arcs between the branches show possible merges into these branches,
|
|
||||||
either from other branches or from independently submitted PRs. The
|
|
||||||
colors of these edges likewise show whether or not they could
|
|
||||||
trigger a mass rebuild (red) or must not trigger a mass rebuild
|
|
||||||
(green).
|
|
||||||
|
|
||||||
Hydra runs automatic builds for the green branches.
|
|
||||||
|
|
||||||
Notice that the automatic merges are all green arrows. This is by
|
|
||||||
design. Any merge which might cause a mass rebuild on a branch
|
|
||||||
which has automatic builds (`staging-next`, `master`) will be a
|
|
||||||
manual merge to make sure it is good use of compute power.
|
|
||||||
|
|
||||||
Nixpkgs has two branches so that there is one branch (`staging`)
|
|
||||||
which accepts mass-rebuilding commits, and one fast-rebuilding
|
|
||||||
branch which accepts independent PRs (`master`). The `staging-next`
|
|
||||||
branch allows the Hydra operators to batch groups of commits to
|
|
||||||
`staging` to be built. By keeping the `staging-next` branch
|
|
||||||
separate from `staging`, this batching does not block
|
|
||||||
developers from merging changes into `staging`.
|
|
||||||
|
|
||||||
```{.graphviz caption="Staging workflow"}
|
|
||||||
digraph {
|
|
||||||
master [color="green" fontcolor=green]
|
|
||||||
"staging-next" [color="green" fontcolor=green]
|
|
||||||
staging [color="red" fontcolor=red]
|
|
||||||
|
|
||||||
"small changes" [fontcolor=green shape=none]
|
|
||||||
"small changes" -> master [color=green]
|
|
||||||
|
|
||||||
"mass-rebuilds and other large changes" [fontcolor=red shape=none]
|
|
||||||
"mass-rebuilds and other large changes" -> staging [color=red]
|
|
||||||
|
|
||||||
"critical security fixes" [fontcolor=green shape=none]
|
|
||||||
"critical security fixes" -> master [color=green]
|
|
||||||
|
|
||||||
"staging fixes which do not cause staging to mass-rebuild" [fontcolor=green shape=none]
|
|
||||||
"staging fixes which do not cause staging to mass-rebuild" -> "staging-next" [color=green]
|
|
||||||
|
|
||||||
"staging-next" -> master [color="red"] [label="manual merge"] [fontcolor="red"]
|
|
||||||
"staging" -> "staging-next" [color="red"] [label="manual merge"] [fontcolor="red"]
|
|
||||||
|
|
||||||
master -> "staging-next" [color="green"] [label="automatic merge (GitHub Action)"] [fontcolor="green"]
|
|
||||||
"staging-next" -> staging [color="green"] [label="automatic merge (GitHub Action)"] [fontcolor="green"]
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
[This GitHub Action](https://github.com/NixOS/nixpkgs/blob/master/.github/workflows/periodic-merge-6h.yml) brings changes from `master` to `staging-next` and from `staging-next` to `staging` every 6 hours; these are the green arrows in the diagram above. The red arrows in the diagram above are done manually and much less frequently. You can get an idea of how often these merges occur by looking at the git history.
|
|
||||||
|
|
||||||
|
|
||||||
#### Master branch {#submitting-changes-master-branch}
|
#### Master branch {#submitting-changes-master-branch}
|
||||||
|
|
||||||
The `master` branch is the main development branch. It should only see non-breaking commits that do not cause mass rebuilds.
|
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
|
||||||
|
|
||||||
#### Staging branch {#submitting-changes-staging-branch}
|
#### Staging branch {#submitting-changes-staging-branch}
|
||||||
|
|
||||||
The `staging` branch is a development branch where mass-rebuilds go. Mass rebuilds are commits that cause rebuilds for many packages, like more than 500 (or perhaps, if it's 'light' packages, 1000). It should only see non-breaking mass-rebuild commits. That means it is not to be used for testing, and changes must have been well tested already. If the branch is already in a broken state, please refrain from adding extra new breakages.
|
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
|
||||||
|
|
||||||
During the process of a releasing a new NixOS version, this branch or the release-critical packages can be restricted to non-breaking changes.
|
|
||||||
|
|
||||||
#### Staging-next branch {#submitting-changes-staging-next-branch}
|
#### Staging-next branch {#submitting-changes-staging-next-branch}
|
||||||
|
|
||||||
The `staging-next` branch is for stabilizing mass-rebuilds submitted to the `staging` branch prior to merging them into `master`. Mass-rebuilds must go via the `staging` branch. It must only see non-breaking commits that are fixing issues blocking it from being merged into the `master` branch.
|
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
|
||||||
|
|
||||||
If the branch is already in a broken state, please refrain from adding extra new breakages. Stabilize it for a few days and then merge into master.
|
|
||||||
|
|
||||||
During the process of a releasing a new NixOS version, this branch or the release-critical packages can be restricted to non-breaking changes.
|
|
||||||
|
|
||||||
#### Stable release branches {#submitting-changes-stable-release-branches}
|
#### Stable release branches {#submitting-changes-stable-release-branches}
|
||||||
|
|
||||||
The same staging workflow applies to stable release branches, but the main branch is called `release-*` instead of `master`.
|
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
|
||||||
|
|
||||||
Example branch names: `release-21.11`, `staging-21.11`, `staging-next-21.11`.
|
|
||||||
|
|
||||||
Most changes added to the stable release branches are cherry-picked (“backported”) from the `master` and staging branches.
|
|
||||||
|
|
||||||
#### Automatically backporting a Pull Request {#submitting-changes-stable-release-branches-automatic-backports}
|
#### Automatically backporting a Pull Request {#submitting-changes-stable-release-branches-automatic-backports}
|
||||||
|
|
||||||
Assign label `backport <branch>` (e.g. `backport release-21.11`) to the PR and a backport PR is automatically created after the PR is merged.
|
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
|
||||||
|
|
||||||
#### Manually backporting changes {#submitting-changes-stable-release-branches-manual-backports}
|
#### Manually backporting changes {#submitting-changes-stable-release-branches-manual-backports}
|
||||||
|
|
||||||
Cherry-pick changes via `git cherry-pick -x <original commit>` so that the original commit id is included in the commit message.
|
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
|
||||||
|
|
||||||
Add a reason for the backport when it is not obvious from the original commit message. You can do this by cherry picking with `git cherry-pick -xe <original commit>`, which allows editing the commit message. This is not needed for minor version updates that include security and bug fixes but don't add new features or when the commit fixes an otherwise broken package.
|
|
||||||
|
|
||||||
Here is an example of a cherry-picked commit message with good reason description:
|
|
||||||
|
|
||||||
```
|
|
||||||
zfs: Keep trying root import until it works
|
|
||||||
|
|
||||||
Works around #11003.
|
|
||||||
|
|
||||||
(cherry picked from commit 98b213a11041af39b39473906b595290e2a4e2f9)
|
|
||||||
|
|
||||||
Reason: several people cannot boot with ZFS on NVMe
|
|
||||||
```
|
|
||||||
|
|
||||||
Other examples of reasons are:
|
|
||||||
|
|
||||||
- Previously the build would fail due to, e.g., `getaddrinfo` not being defined
|
|
||||||
- The previous download links were all broken
|
|
||||||
- Crash when starting on some X11 systems
|
|
||||||
|
|
||||||
#### Acceptable backport criteria {#acceptable-backport-criteria}
|
#### Acceptable backport criteria {#acceptable-backport-criteria}
|
||||||
|
|
||||||
The stable branch does have some changes which cannot be backported. Most notable are breaking changes. The desire is to have stable users be uninterrupted when updating packages.
|
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
|
||||||
|
|
||||||
However, many changes are able to be backported, including:
|
|
||||||
- New Packages / Modules
|
|
||||||
- Security / Patch updates
|
|
||||||
- Version updates which include new functionality (but no breaking changes)
|
|
||||||
- Services which require a client to be up-to-date regardless. (E.g. `spotify`, `steam`, or `discord`)
|
|
||||||
- Security critical applications (E.g. `firefox`)
|
|
||||||
|
|
|
@ -1,45 +1,11 @@
|
||||||
# Vulnerability Roundup {#chap-vulnerability-roundup}
|
# Vulnerability Roundup {#chap-vulnerability-roundup}
|
||||||
|
|
||||||
|
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
|
||||||
|
|
||||||
## Issues {#vulnerability-roundup-issues}
|
## Issues {#vulnerability-roundup-issues}
|
||||||
|
|
||||||
Vulnerable packages in Nixpkgs are managed using issues.
|
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
|
||||||
Currently opened ones can be found using the following:
|
|
||||||
|
|
||||||
[github.com/NixOS/nixpkgs/issues?q=is:issue+is:open+"Vulnerability+roundup"](https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+is%3Aopen+%22Vulnerability+roundup%22)
|
|
||||||
|
|
||||||
Each issue correspond to a vulnerable version of a package; As a consequence:
|
|
||||||
|
|
||||||
- One issue can contain several CVEs;
|
|
||||||
- One CVE can be shared across several issues;
|
|
||||||
- A single package can be concerned by several issues.
|
|
||||||
|
|
||||||
|
|
||||||
A "Vulnerability roundup" issue usually respects the following format:
|
|
||||||
|
|
||||||
```txt
|
|
||||||
<link to relevant package search on search.nix.gsc.io>, <link to relevant files in Nixpkgs on GitHub>
|
|
||||||
|
|
||||||
<list of related CVEs, their CVSS score, and the impacted NixOS version>
|
|
||||||
|
|
||||||
<list of the scanned Nixpkgs versions>
|
|
||||||
|
|
||||||
<list of relevant contributors>
|
|
||||||
```
|
|
||||||
|
|
||||||
Note that there can be an extra comment containing links to previously reported (and still open) issues for the same package.
|
|
||||||
|
|
||||||
|
|
||||||
## Triaging and Fixing {#vulnerability-roundup-triaging-and-fixing}
|
## Triaging and Fixing {#vulnerability-roundup-triaging-and-fixing}
|
||||||
|
|
||||||
**Note**: An issue can be a "false positive" (i.e. automatically opened, but without the package it refers to being actually vulnerable).
|
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
|
||||||
If you find such a "false positive", comment on the issue an explanation of why it falls into this category, linking as much information as the necessary to help maintainers double check.
|
|
||||||
|
|
||||||
If you are investigating a "true positive":
|
|
||||||
|
|
||||||
- Find the earliest patched version or a code patch in the CVE details;
|
|
||||||
- Is the issue already patched (version up-to-date or patch applied manually) in Nixpkgs's `master` branch?
|
|
||||||
- **No**:
|
|
||||||
- [Submit a security fix](#submitting-changes-submitting-security-fixes);
|
|
||||||
- Once the fix is merged into `master`, [submit the change to the vulnerable release branch(es)](https://nixos.org/manual/nixpkgs/stable/#submitting-changes-stable-release-branches);
|
|
||||||
- **Yes**: [Backport the change to the vulnerable release branch(es)](https://nixos.org/manual/nixpkgs/stable/#submitting-changes-stable-release-branches).
|
|
||||||
- When the patch has made it into all the relevant branches (`master`, and the vulnerable releases), close the relevant issue(s).
|
|
||||||
|
|
10
doc/development.md
Normal file
10
doc/development.md
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
# Development of Nixpkgs {#part-development}
|
||||||
|
|
||||||
|
This section shows you how Nixpkgs is being developed and how you can interact with the contributors and the latest updates.
|
||||||
|
If you are interested in contributing yourself, see [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
|
||||||
|
|
||||||
|
<!-- In the future this section should also include: How to test pull requests, how to know if pull requests are available in channels, etc. -->
|
||||||
|
|
||||||
|
```{=include=} chapters
|
||||||
|
development/opening-issues.chapter.md
|
||||||
|
```
|
7
doc/development/opening-issues.chapter.md
Normal file
7
doc/development/opening-issues.chapter.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# Opening issues {#sec-opening-issues}
|
||||||
|
|
||||||
|
* Make sure you have a [GitHub account](https://github.com/signup/free)
|
||||||
|
* Make sure there is no open issue on the topic
|
||||||
|
* [Submit a new issue](https://github.com/NixOS/nixpkgs/issues/new/choose) by choosing the kind of topic and fill out the template
|
||||||
|
|
||||||
|
<!-- In the future this section could also include more detailed information on the issue templates -->
|
|
@ -30,7 +30,7 @@ package set to make it the default. This guarantees you get a consistent package
|
||||||
set.
|
set.
|
||||||
```nix
|
```nix
|
||||||
mypkg = let
|
mypkg = let
|
||||||
cudaPackages = cudaPackages_11_5.overrideScope' (final: prev: {
|
cudaPackages = cudaPackages_11_5.overrideScope (final: prev: {
|
||||||
cudnn = prev.cudnn_8_3;
|
cudnn = prev.cudnn_8_3;
|
||||||
}});
|
}});
|
||||||
in callPackage { inherit cudaPackages; };
|
in callPackage { inherit cudaPackages; };
|
||||||
|
|
|
@ -10,5 +10,6 @@ using-nixpkgs.md
|
||||||
lib.md
|
lib.md
|
||||||
stdenv.md
|
stdenv.md
|
||||||
builders.md
|
builders.md
|
||||||
|
development.md
|
||||||
contributing.md
|
contributing.md
|
||||||
```
|
```
|
||||||
|
|
|
@ -269,10 +269,11 @@ rec {
|
||||||
let self = f self // {
|
let self = f self // {
|
||||||
newScope = scope: newScope (self // scope);
|
newScope = scope: newScope (self // scope);
|
||||||
callPackage = self.newScope {};
|
callPackage = self.newScope {};
|
||||||
overrideScope = g: lib.warn
|
overrideScope = g: makeScope newScope (lib.fixedPoints.extends g f);
|
||||||
"`overrideScope` (from `lib.makeScope`) is deprecated. Do `overrideScope' (self: super: { … })` instead of `overrideScope (super: self: { … })`. All other overrides have the parameters in that order, including other definitions of `overrideScope`. This was the only definition violating the pattern."
|
# Remove after 24.11 is released.
|
||||||
(makeScope newScope (lib.fixedPoints.extends (lib.flip g) f));
|
overrideScope' = g: lib.warnIf (lib.isInOldestRelease 2311)
|
||||||
overrideScope' = g: makeScope newScope (lib.fixedPoints.extends g f);
|
"`overrideScope'` (from `lib.makeScope`) has been renamed to `overrideScope`."
|
||||||
|
(makeScope newScope (lib.fixedPoints.extends g f));
|
||||||
packages = f;
|
packages = f;
|
||||||
};
|
};
|
||||||
in self;
|
in self;
|
||||||
|
|
|
@ -638,6 +638,40 @@ rec {
|
||||||
# Input list
|
# Input list
|
||||||
list: sublist count (length list) list;
|
list: sublist count (length list) list;
|
||||||
|
|
||||||
|
/* Whether the first list is a prefix of the second list.
|
||||||
|
|
||||||
|
Type: hasPrefix :: [a] -> [a] -> bool
|
||||||
|
|
||||||
|
Example:
|
||||||
|
hasPrefix [ 1 2 ] [ 1 2 3 4 ]
|
||||||
|
=> true
|
||||||
|
hasPrefix [ 0 1 ] [ 1 2 3 4 ]
|
||||||
|
=> false
|
||||||
|
*/
|
||||||
|
hasPrefix =
|
||||||
|
list1:
|
||||||
|
list2:
|
||||||
|
take (length list1) list2 == list1;
|
||||||
|
|
||||||
|
/* Remove the first list as a prefix from the second list.
|
||||||
|
Error if the first list isn't a prefix of the second list.
|
||||||
|
|
||||||
|
Type: removePrefix :: [a] -> [a] -> [a]
|
||||||
|
|
||||||
|
Example:
|
||||||
|
removePrefix [ 1 2 ] [ 1 2 3 4 ]
|
||||||
|
=> [ 3 4 ]
|
||||||
|
removePrefix [ 0 1 ] [ 1 2 3 4 ]
|
||||||
|
=> <error>
|
||||||
|
*/
|
||||||
|
removePrefix =
|
||||||
|
list1:
|
||||||
|
list2:
|
||||||
|
if hasPrefix list1 list2 then
|
||||||
|
drop (length list1) list2
|
||||||
|
else
|
||||||
|
throw "lib.lists.removePrefix: First argument is not a list prefix of the second argument";
|
||||||
|
|
||||||
/* Return a list consisting of at most `count` elements of `list`,
|
/* Return a list consisting of at most `count` elements of `list`,
|
||||||
starting at index `start`.
|
starting at index `start`.
|
||||||
|
|
||||||
|
|
|
@ -630,7 +630,13 @@ let
|
||||||
loc = prefix ++ [name];
|
loc = prefix ++ [name];
|
||||||
defns = pushedDownDefinitionsByName.${name} or [];
|
defns = pushedDownDefinitionsByName.${name} or [];
|
||||||
defns' = rawDefinitionsByName.${name} or [];
|
defns' = rawDefinitionsByName.${name} or [];
|
||||||
optionDecls = filter (m: isOption m.options) decls;
|
optionDecls = filter
|
||||||
|
(m: m.options?_type
|
||||||
|
&& (m.options._type == "option"
|
||||||
|
|| throwDeclarationTypeError loc m.options._type
|
||||||
|
)
|
||||||
|
)
|
||||||
|
decls;
|
||||||
in
|
in
|
||||||
if length optionDecls == length decls then
|
if length optionDecls == length decls then
|
||||||
let opt = fixupOptionType loc (mergeOptionDecls loc decls);
|
let opt = fixupOptionType loc (mergeOptionDecls loc decls);
|
||||||
|
@ -692,6 +698,32 @@ let
|
||||||
) unmatchedDefnsByName);
|
) unmatchedDefnsByName);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
throwDeclarationTypeError = loc: actualTag:
|
||||||
|
let
|
||||||
|
name = lib.strings.escapeNixIdentifier (lib.lists.last loc);
|
||||||
|
path = showOption loc;
|
||||||
|
depth = length loc;
|
||||||
|
|
||||||
|
paragraphs = [
|
||||||
|
"Expected an option declaration at option path `${path}` but got an attribute set with type ${actualTag}"
|
||||||
|
] ++ optional (actualTag == "option-type") ''
|
||||||
|
When declaring an option, you must wrap the type in a `mkOption` call. It should look somewhat like:
|
||||||
|
${comment}
|
||||||
|
${name} = lib.mkOption {
|
||||||
|
description = ...;
|
||||||
|
type = <the type you wrote for ${name}>;
|
||||||
|
...
|
||||||
|
};
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Ideally we'd know the exact syntax they used, but short of that,
|
||||||
|
# we can only reliably repeat the last. However, we repeat the
|
||||||
|
# full path in a non-misleading way here, in case they overlook
|
||||||
|
# the start of the message. Examples attract attention.
|
||||||
|
comment = optionalString (depth > 1) "\n # ${showOption loc}";
|
||||||
|
in
|
||||||
|
throw (concatStringsSep "\n\n" paragraphs);
|
||||||
|
|
||||||
/* Merge multiple option declarations into a single declaration. In
|
/* Merge multiple option declarations into a single declaration. In
|
||||||
general, there should be only one declaration of each option.
|
general, there should be only one declaration of each option.
|
||||||
The exception is the ‘options’ attribute, which specifies
|
The exception is the ‘options’ attribute, which specifies
|
||||||
|
|
|
@ -492,6 +492,44 @@ runTests {
|
||||||
([ 1 2 3 ] == (take 4 [ 1 2 3 ]))
|
([ 1 2 3 ] == (take 4 [ 1 2 3 ]))
|
||||||
];
|
];
|
||||||
|
|
||||||
|
testListHasPrefixExample1 = {
|
||||||
|
expr = lists.hasPrefix [ 1 2 ] [ 1 2 3 4 ];
|
||||||
|
expected = true;
|
||||||
|
};
|
||||||
|
testListHasPrefixExample2 = {
|
||||||
|
expr = lists.hasPrefix [ 0 1 ] [ 1 2 3 4 ];
|
||||||
|
expected = false;
|
||||||
|
};
|
||||||
|
testListHasPrefixLazy = {
|
||||||
|
expr = lists.hasPrefix [ 1 ] [ 1 (abort "lib.lists.hasPrefix is not lazy") ];
|
||||||
|
expected = true;
|
||||||
|
};
|
||||||
|
testListHasPrefixEmptyPrefix = {
|
||||||
|
expr = lists.hasPrefix [ ] [ 1 2 ];
|
||||||
|
expected = true;
|
||||||
|
};
|
||||||
|
testListHasPrefixEmptyList = {
|
||||||
|
expr = lists.hasPrefix [ 1 2 ] [ ];
|
||||||
|
expected = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
testListRemovePrefixExample1 = {
|
||||||
|
expr = lists.removePrefix [ 1 2 ] [ 1 2 3 4 ];
|
||||||
|
expected = [ 3 4 ];
|
||||||
|
};
|
||||||
|
testListRemovePrefixExample2 = {
|
||||||
|
expr = (builtins.tryEval (lists.removePrefix [ 0 1 ] [ 1 2 3 4 ])).success;
|
||||||
|
expected = false;
|
||||||
|
};
|
||||||
|
testListRemovePrefixEmptyPrefix = {
|
||||||
|
expr = lists.removePrefix [ ] [ 1 2 ];
|
||||||
|
expected = [ 1 2 ];
|
||||||
|
};
|
||||||
|
testListRemovePrefixEmptyList = {
|
||||||
|
expr = (builtins.tryEval (lists.removePrefix [ 1 2 ] [ ])).success;
|
||||||
|
expected = false;
|
||||||
|
};
|
||||||
|
|
||||||
testFoldAttrs = {
|
testFoldAttrs = {
|
||||||
expr = foldAttrs (n: a: [n] ++ a) [] [
|
expr = foldAttrs (n: a: [n] ++ a) [] [
|
||||||
{ a = 2; b = 7; }
|
{ a = 2; b = 7; }
|
||||||
|
|
|
@ -393,6 +393,11 @@ checkConfigError \
|
||||||
config.set \
|
config.set \
|
||||||
./declare-set.nix ./declare-enable-nested.nix
|
./declare-set.nix ./declare-enable-nested.nix
|
||||||
|
|
||||||
|
# Options: accidental use of an option-type instead of option (or other tagged type; unlikely)
|
||||||
|
checkConfigError 'Expected an option declaration at option path .result. but got an attribute set with type option-type' config.result ./options-type-error-typical.nix
|
||||||
|
checkConfigError 'Expected an option declaration at option path .result.here. but got an attribute set with type option-type' config.result.here ./options-type-error-typical-nested.nix
|
||||||
|
checkConfigError 'Expected an option declaration at option path .result. but got an attribute set with type configuration' config.result ./options-type-error-configuration.nix
|
||||||
|
|
||||||
# Check that that merging of option collisions doesn't depend on type being set
|
# Check that that merging of option collisions doesn't depend on type being set
|
||||||
checkConfigError 'The option .group..*would be a parent of the following options, but its type .<no description>. does not support nested options.\n\s*- option.s. with prefix .group.enable..*' config.group.enable ./merge-typeless-option.nix
|
checkConfigError 'The option .group..*would be a parent of the following options, but its type .<no description>. does not support nested options.\n\s*- option.s. with prefix .group.enable..*' config.group.enable ./merge-typeless-option.nix
|
||||||
|
|
||||||
|
|
6
lib/tests/modules/options-type-error-configuration.nix
Normal file
6
lib/tests/modules/options-type-error-configuration.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{ lib, ... }: {
|
||||||
|
options = {
|
||||||
|
# unlikely mistake, but we can catch any attrset with _type
|
||||||
|
result = lib.evalModules { modules = []; };
|
||||||
|
};
|
||||||
|
}
|
5
lib/tests/modules/options-type-error-typical-nested.nix
Normal file
5
lib/tests/modules/options-type-error-typical-nested.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{ lib, ... }: {
|
||||||
|
options = {
|
||||||
|
result.here = lib.types.str;
|
||||||
|
};
|
||||||
|
}
|
5
lib/tests/modules/options-type-error-typical.nix
Normal file
5
lib/tests/modules/options-type-error-typical.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{ lib, ... }: {
|
||||||
|
options = {
|
||||||
|
result = lib.types.str;
|
||||||
|
};
|
||||||
|
}
|
114
maintainers/README.md
Normal file
114
maintainers/README.md
Normal file
|
@ -0,0 +1,114 @@
|
||||||
|
# Nixpkgs Maintainers
|
||||||
|
|
||||||
|
The *Nixpkgs maintainers* are people who have assigned themselves to
|
||||||
|
maintain specific individual packages. We encourage people who care
|
||||||
|
about a package to assign themselves as a maintainer. When a pull
|
||||||
|
request is made against a package, OfBorg will notify the appropriate
|
||||||
|
maintainer(s).
|
||||||
|
|
||||||
|
## Reviewing contributions
|
||||||
|
|
||||||
|
### Individual maintainer list
|
||||||
|
|
||||||
|
When adding users to [`maintainer-list.nix`](./maintainer-list.nix), the following
|
||||||
|
checks should be performed:
|
||||||
|
|
||||||
|
- If the user has specified a GPG key, verify that the commit is
|
||||||
|
signed by their key.
|
||||||
|
|
||||||
|
First, validate that the commit adding the maintainer is signed by
|
||||||
|
the key the maintainer listed. Check out the pull request and
|
||||||
|
compare its signing key with the listed key in the commit.
|
||||||
|
|
||||||
|
If the commit is not signed or it is signed by a different user, ask
|
||||||
|
them to either recommit using that key or to remove their key
|
||||||
|
information.
|
||||||
|
|
||||||
|
Given a maintainer entry like this:
|
||||||
|
|
||||||
|
``` nix
|
||||||
|
{
|
||||||
|
example = {
|
||||||
|
email = "user@example.com";
|
||||||
|
name = "Example User";
|
||||||
|
keys = [{
|
||||||
|
fingerprint = "0000 0000 2A70 6423 0AED 3C11 F04F 7A19 AAA6 3AFE";
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
First receive their key from a keyserver:
|
||||||
|
|
||||||
|
$ gpg --recv-keys 0xF04F7A19AAA63AFE
|
||||||
|
gpg: key 0xF04F7A19AAA63AFE: public key "Example <user@example.com>" imported
|
||||||
|
gpg: Total number processed: 1
|
||||||
|
gpg: imported: 1
|
||||||
|
|
||||||
|
Then check the commit is signed by that key:
|
||||||
|
|
||||||
|
$ git log --show-signature
|
||||||
|
commit b87862a4f7d32319b1de428adb6cdbdd3a960153
|
||||||
|
gpg: Signature made Wed Mar 12 13:32:24 2003 +0000
|
||||||
|
gpg: using RSA key 000000002A7064230AED3C11F04F7A19AAA63AFE
|
||||||
|
gpg: Good signature from "Example User <user@example.com>
|
||||||
|
Author: Example User <user@example.com>
|
||||||
|
Date: Wed Mar 12 13:32:24 2003 +0000
|
||||||
|
|
||||||
|
maintainers: adding example
|
||||||
|
|
||||||
|
and validate that there is a `Good signature` and the printed key
|
||||||
|
matches the user's submitted key.
|
||||||
|
|
||||||
|
Note: GitHub's "Verified" label does not display the user's full key
|
||||||
|
fingerprint, and should not be used for validating the key matches.
|
||||||
|
|
||||||
|
- If the user has specified a `github` account name, ensure they have
|
||||||
|
also specified a `githubId` and verify the two match.
|
||||||
|
|
||||||
|
Maintainer entries that include a `github` field must also include
|
||||||
|
their `githubId`. People can and do change their GitHub name
|
||||||
|
frequently, and the ID is used as the official and stable identity
|
||||||
|
of the maintainer.
|
||||||
|
|
||||||
|
Given a maintainer entry like this:
|
||||||
|
|
||||||
|
``` nix
|
||||||
|
{
|
||||||
|
example = {
|
||||||
|
email = "user@example.com";
|
||||||
|
name = "Example User";
|
||||||
|
github = "ghost";
|
||||||
|
githubId = 10137;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
First, make sure that the listed GitHub handle matches the author of
|
||||||
|
the commit.
|
||||||
|
|
||||||
|
Then, visit the URL `https://api.github.com/users/ghost` and
|
||||||
|
validate that the `id` field matches the provided `githubId`.
|
||||||
|
|
||||||
|
### Maintainer teams
|
||||||
|
|
||||||
|
Feel free to create a new maintainer team in [`team-list.nix`](./team-list.nix)
|
||||||
|
when a group is collectively responsible for a collection of packages.
|
||||||
|
Use taste and personal judgement when deciding if a team is warranted.
|
||||||
|
|
||||||
|
Teams are allowed to define their own rules about membership.
|
||||||
|
|
||||||
|
For example, some teams will represent a business or other group which
|
||||||
|
wants to carefully track its members. Other teams may be very open about
|
||||||
|
who can join, and allow anybody to participate.
|
||||||
|
|
||||||
|
When reviewing changes to a team, read the team's scope and the context
|
||||||
|
around the member list for indications about the team's membership
|
||||||
|
policy.
|
||||||
|
|
||||||
|
In any case, request reviews from the existing team members. If the team
|
||||||
|
lists no specific membership policy, feel free to merge changes to the
|
||||||
|
team after giving the existing members a few days to respond.
|
||||||
|
|
||||||
|
*Important:* If a team says it is a closed group, do not merge additions
|
||||||
|
to the team without an approval by at least one existing member.
|
|
@ -9175,12 +9175,6 @@
|
||||||
githubId = 2037002;
|
githubId = 2037002;
|
||||||
name = "Konstantinos";
|
name = "Konstantinos";
|
||||||
};
|
};
|
||||||
kototama = {
|
|
||||||
email = "kototama@posteo.jp";
|
|
||||||
github = "kototama";
|
|
||||||
githubId = 128620;
|
|
||||||
name = "Kototama";
|
|
||||||
};
|
|
||||||
kouyk = {
|
kouyk = {
|
||||||
email = "skykinetic@stevenkou.xyz";
|
email = "skykinetic@stevenkou.xyz";
|
||||||
github = "kouyk";
|
github = "kouyk";
|
||||||
|
@ -14668,7 +14662,7 @@
|
||||||
name = "Rahul Butani";
|
name = "Rahul Butani";
|
||||||
};
|
};
|
||||||
rs0vere = {
|
rs0vere = {
|
||||||
email = "rs0vere@outlook.com";
|
email = "rs0vere@proton.me";
|
||||||
github = "rs0vere";
|
github = "rs0vere";
|
||||||
githubId = 140035635;
|
githubId = 140035635;
|
||||||
keys = [{
|
keys = [{
|
||||||
|
@ -16342,6 +16336,12 @@
|
||||||
github = "sweenu";
|
github = "sweenu";
|
||||||
githubId = 7051978;
|
githubId = 7051978;
|
||||||
};
|
};
|
||||||
|
swesterfeld = {
|
||||||
|
email = "stefan@space.twc.de";
|
||||||
|
github = "swesterfeld";
|
||||||
|
githubId = 14840066;
|
||||||
|
name = "Stefan Westerfeld";
|
||||||
|
};
|
||||||
swflint = {
|
swflint = {
|
||||||
email = "swflint@flintfam.org";
|
email = "swflint@flintfam.org";
|
||||||
github = "swflint";
|
github = "swflint";
|
||||||
|
|
|
@ -892,4 +892,14 @@ with lib.maintainers; {
|
||||||
shortName = "Xfce";
|
shortName = "Xfce";
|
||||||
enableFeatureFreezePing = true;
|
enableFeatureFreezePing = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
zig = {
|
||||||
|
members = [
|
||||||
|
AndersonTorres
|
||||||
|
figsoda
|
||||||
|
];
|
||||||
|
scope = "Maintain the Zig compiler toolchain and nixpkgs integration.";
|
||||||
|
shortName = "Zig";
|
||||||
|
enableFeatureFreezePing = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
*** NixOS ***
|
|
||||||
|
|
||||||
NixOS is a Linux distribution based on the purely functional package
|
|
||||||
management system Nix. More information can be found at
|
|
||||||
https://nixos.org/nixos and in the manual in doc/manual.
|
|
86
nixos/README.md
Normal file
86
nixos/README.md
Normal file
|
@ -0,0 +1,86 @@
|
||||||
|
# NixOS
|
||||||
|
|
||||||
|
NixOS is a Linux distribution based on the purely functional package
|
||||||
|
management system Nix. More information can be found at
|
||||||
|
https://nixos.org/nixos and in the manual in doc/manual.
|
||||||
|
|
||||||
|
## Testing changes
|
||||||
|
|
||||||
|
You can add new module to your NixOS configuration file (usually it’s `/etc/nixos/configuration.nix`). And do `sudo nixos-rebuild test -I nixpkgs=<path to your local nixpkgs folder> --fast`.
|
||||||
|
|
||||||
|
## Reviewing contributions
|
||||||
|
|
||||||
|
When changing the bootloader installation process, extra care must be taken. Grub installations cannot be rolled back, hence changes may break people’s installations forever. For any non-trivial change to the bootloader please file a PR asking for review, especially from \@edolstra.
|
||||||
|
|
||||||
|
### Module updates
|
||||||
|
|
||||||
|
Module updates are submissions changing modules in some ways. These often contains changes to the options or introduce new options.
|
||||||
|
|
||||||
|
Reviewing process:
|
||||||
|
|
||||||
|
- Ensure that the module maintainers are notified.
|
||||||
|
- [CODEOWNERS](https://help.github.com/articles/about-codeowners/) will make GitHub notify users based on the submitted changes, but it can happen that it misses some of the package maintainers.
|
||||||
|
- Ensure that the module tests, if any, are succeeding.
|
||||||
|
- Ensure that the introduced options are correct.
|
||||||
|
- Type should be appropriate (string related types differs in their merging capabilities, `loaOf` and `string` types are deprecated).
|
||||||
|
- Description, default and example should be provided.
|
||||||
|
- Ensure that option changes are backward compatible.
|
||||||
|
- `mkRenamedOptionModuleWith` provides a way to make option changes backward compatible.
|
||||||
|
- Ensure that removed options are declared with `mkRemovedOptionModule`
|
||||||
|
- Ensure that changes that are not backward compatible are mentioned in release notes.
|
||||||
|
- Ensure that documentations affected by the change is updated.
|
||||||
|
|
||||||
|
Sample template for a module update review is provided below.
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
##### Reviewed points
|
||||||
|
|
||||||
|
- [ ] changes are backward compatible
|
||||||
|
- [ ] removed options are declared with `mkRemovedOptionModule`
|
||||||
|
- [ ] changes that are not backward compatible are documented in release notes
|
||||||
|
- [ ] module tests succeed on ARCHITECTURE
|
||||||
|
- [ ] options types are appropriate
|
||||||
|
- [ ] options description is set
|
||||||
|
- [ ] options example is provided
|
||||||
|
- [ ] documentation affected by the changes is updated
|
||||||
|
|
||||||
|
##### Possible improvements
|
||||||
|
|
||||||
|
##### Comments
|
||||||
|
```
|
||||||
|
|
||||||
|
### New modules
|
||||||
|
|
||||||
|
New modules submissions introduce a new module to NixOS.
|
||||||
|
|
||||||
|
Reviewing process:
|
||||||
|
|
||||||
|
- Ensure that the module tests, if any, are succeeding.
|
||||||
|
- Ensure that the introduced options are correct.
|
||||||
|
- Type should be appropriate (string related types differs in their merging capabilities, `loaOf` and `string` types are deprecated).
|
||||||
|
- Description, default and example should be provided.
|
||||||
|
- Ensure that module `meta` field is present
|
||||||
|
- Maintainers should be declared in `meta.maintainers`.
|
||||||
|
- Module documentation should be declared with `meta.doc`.
|
||||||
|
- Ensure that the module respect other modules functionality.
|
||||||
|
- For example, enabling a module should not open firewall ports by default.
|
||||||
|
|
||||||
|
Sample template for a new module review is provided below.
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
##### Reviewed points
|
||||||
|
|
||||||
|
- [ ] module path fits the guidelines
|
||||||
|
- [ ] module tests succeed on ARCHITECTURE
|
||||||
|
- [ ] options have appropriate types
|
||||||
|
- [ ] options have default
|
||||||
|
- [ ] options have example
|
||||||
|
- [ ] options have descriptions
|
||||||
|
- [ ] No unneeded package is added to environment.systemPackages
|
||||||
|
- [ ] meta.maintainers is set
|
||||||
|
- [ ] module documentation is declared in meta.doc
|
||||||
|
|
||||||
|
##### Possible improvements
|
||||||
|
|
||||||
|
##### Comments
|
||||||
|
```
|
|
@ -68,6 +68,13 @@
|
||||||
|
|
||||||
- The `services.ananicy.extraRules` option now has the type of `listOf attrs` instead of `string`.
|
- The `services.ananicy.extraRules` option now has the type of `listOf attrs` instead of `string`.
|
||||||
|
|
||||||
|
- The `matrix-synapse` package & module have undergone some significant internal changes, for most setups no intervention is needed, though:
|
||||||
|
- The option [`services.matrix-synapse.package`](#opt-services.matrix-synapse.package) is now read-only. For modifying the package, use an overlay which modifies `matrix-synapse-unwrapped` instead. More on that below.
|
||||||
|
- The `enableSystemd` & `enableRedis` arguments have been removed and `matrix-synapse` has been renamed to `matrix-synapse-unwrapped`. Also, several optional dependencies (such as `psycopg2` or `authlib`) have been removed.
|
||||||
|
- These optional dependencies are automatically added via a wrapper (`pkgs.matrix-synapse.override { extras = ["redis"]; }` for `hiredis` & `txredisapi` for instance) if the relevant config section is declared in `services.matrix-synapse.settings`. For instance, if `services.matrix-synapse.settings.redis.enabled` is set to `true`, `"redis"` will be automatically added to the `extras` list of `pkgs.matrix-synapse`.
|
||||||
|
- A list of all extras (and the extras enabled by default) can be found at the [option's reference for `services.matrix-synapse.extras`](#opt-services.matrix-synapse.extras).
|
||||||
|
- In some cases (e.g. for running synapse workers) it was necessary to re-use the `PYTHONPATH` of `matrix-synapse.service`'s environment to have all plugins available. This isn't necessary anymore, instead `config.services.matrix-synapse.package` can be used as it points to the wrapper with properly configured `extras` and also all plugins defined via [`services.matrix-synapse.plugins`](#opt-services.matrix-synapse.plugins) available. This is also the reason for why the option is read-only now, it's supposed to be set by the module only.
|
||||||
|
|
||||||
- `etcd` has been updated to 3.5, you will want to read the [3.3 to 3.4](https://etcd.io/docs/v3.5/upgrades/upgrade_3_4/) and [3.4 to 3.5](https://etcd.io/docs/v3.5/upgrades/upgrade_3_5/) upgrade guides
|
- `etcd` has been updated to 3.5, you will want to read the [3.3 to 3.4](https://etcd.io/docs/v3.5/upgrades/upgrade_3_4/) and [3.4 to 3.5](https://etcd.io/docs/v3.5/upgrades/upgrade_3_5/) upgrade guides
|
||||||
|
|
||||||
- `consul` has been updated to `1.16.0`. See the [release note](https://github.com/hashicorp/consul/releases/tag/v1.16.0) for more details. Once a new Consul version has started and upgraded its data directory, it generally cannot be downgraded to the previous version.
|
- `consul` has been updated to `1.16.0`. See the [release note](https://github.com/hashicorp/consul/releases/tag/v1.16.0) for more details. Once a new Consul version has started and upgraded its data directory, it generally cannot be downgraded to the previous version.
|
||||||
|
@ -140,11 +147,13 @@
|
||||||
|
|
||||||
- Emacs macport version 29 was introduced.
|
- Emacs macport version 29 was introduced.
|
||||||
|
|
||||||
|
- The `html-proofer` package has been updated from major version 3 to major version 5, which includes [breaking changes](https://github.com/gjtorikian/html-proofer/blob/v5.0.8/UPGRADING.md).
|
||||||
|
|
||||||
## Other Notable Changes {#sec-release-23.11-notable-changes}
|
## Other Notable Changes {#sec-release-23.11-notable-changes}
|
||||||
|
|
||||||
- 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.
|
- 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.
|
||||||
|
|
||||||
- GNOME module no longer forces Qt applications to use Adwaita style since it was buggy and is no longer maintained upstream. If you still want it, you can add the following options to your configuration but it will probably be eventually removed:
|
- GNOME, Pantheon, Cinnamon module no longer forces Qt applications to use Adwaita style since it was buggy and is no longer maintained upstream. If you still want it, you can add the following options to your configuration but it will probably be eventually removed:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
qt = {
|
qt = {
|
||||||
|
|
|
@ -6,6 +6,7 @@ let
|
||||||
im = config.i18n.inputMethod;
|
im = config.i18n.inputMethod;
|
||||||
cfg = im.fcitx5;
|
cfg = im.fcitx5;
|
||||||
fcitx5Package = pkgs.fcitx5-with-addons.override { inherit (cfg) addons; };
|
fcitx5Package = pkgs.fcitx5-with-addons.override { inherit (cfg) addons; };
|
||||||
|
settingsFormat = pkgs.formats.ini { };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
|
@ -40,6 +41,44 @@ in
|
||||||
'';
|
'';
|
||||||
description = lib.mdDoc "Quick phrase files.";
|
description = lib.mdDoc "Quick phrase files.";
|
||||||
};
|
};
|
||||||
|
settings = {
|
||||||
|
globalOptions = lib.mkOption {
|
||||||
|
type = lib.types.submodule {
|
||||||
|
freeformType = settingsFormat.type;
|
||||||
|
};
|
||||||
|
default = { };
|
||||||
|
description = lib.mdDoc ''
|
||||||
|
The global options in `config` file in ini format.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
inputMethod = lib.mkOption {
|
||||||
|
type = lib.types.submodule {
|
||||||
|
freeformType = settingsFormat.type;
|
||||||
|
};
|
||||||
|
default = { };
|
||||||
|
description = lib.mdDoc ''
|
||||||
|
The input method configure in `profile` file in ini format.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
addons = lib.mkOption {
|
||||||
|
type = with lib.types; (attrsOf anything);
|
||||||
|
default = { };
|
||||||
|
description = lib.mdDoc ''
|
||||||
|
The addon configures in `conf` folder in ini format with global sections.
|
||||||
|
Each item is written to the corresponding file.
|
||||||
|
'';
|
||||||
|
example = literalExpression "{ pinyin.globalSection.EmojiEnabled = \"True\"; }";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
ignoreUserConfig = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
description = lib.mdDoc ''
|
||||||
|
Ignore the user configures. **Warning**: When this is enabled, the
|
||||||
|
user config files are totally ignored and the user dict can't be saved
|
||||||
|
and loaded.
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -61,12 +100,30 @@ in
|
||||||
(name: value: lib.nameValuePair ("share/fcitx5/data/quickphrase.d/${name}.mb") value)
|
(name: value: lib.nameValuePair ("share/fcitx5/data/quickphrase.d/${name}.mb") value)
|
||||||
cfg.quickPhraseFiles))
|
cfg.quickPhraseFiles))
|
||||||
];
|
];
|
||||||
|
environment.etc =
|
||||||
|
let
|
||||||
|
optionalFile = p: f: v: lib.optionalAttrs (v != { }) {
|
||||||
|
"xdg/fcitx5/${p}".text = f v;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
lib.attrsets.mergeAttrsList [
|
||||||
|
(optionalFile "config" (lib.generators.toINI { }) sts.globalOptions)
|
||||||
|
(optionalFile "profile" (lib.generators.toINI { }) sts.inputMethod)
|
||||||
|
(lib.concatMapAttrs
|
||||||
|
(name: value: optionalFile
|
||||||
|
"conf/${name}.conf"
|
||||||
|
(lib.generators.toINIWithGlobalSection { })
|
||||||
|
value)
|
||||||
|
sts.addons)
|
||||||
|
];
|
||||||
|
|
||||||
environment.variables = {
|
environment.variables = {
|
||||||
GTK_IM_MODULE = "fcitx";
|
GTK_IM_MODULE = "fcitx";
|
||||||
QT_IM_MODULE = "fcitx";
|
QT_IM_MODULE = "fcitx";
|
||||||
XMODIFIERS = "@im=fcitx";
|
XMODIFIERS = "@im=fcitx";
|
||||||
QT_PLUGIN_PATH = [ "${fcitx5Package}/${pkgs.qt6.qtbase.qtPluginPrefix}" ];
|
QT_PLUGIN_PATH = [ "${fcitx5Package}/${pkgs.qt6.qtbase.qtPluginPrefix}" ];
|
||||||
|
} // lib.optionalAttrs cfg.ignoreUserConfig {
|
||||||
|
SKIP_FCITX_USER_PATH = "1";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,11 +9,6 @@ let
|
||||||
# remove null values from the final configuration
|
# remove null values from the final configuration
|
||||||
finalSettings = lib.filterAttrsRecursive (_: v: v != null) cfg.settings;
|
finalSettings = lib.filterAttrsRecursive (_: v: v != null) cfg.settings;
|
||||||
configFile = format.generate "homeserver.yaml" finalSettings;
|
configFile = format.generate "homeserver.yaml" finalSettings;
|
||||||
logConfigFile = format.generate "log_config.yaml" cfg.logConfig;
|
|
||||||
|
|
||||||
pluginsEnv = cfg.package.python.buildEnv.override {
|
|
||||||
extraLibs = cfg.plugins;
|
|
||||||
};
|
|
||||||
|
|
||||||
usePostgresql = cfg.settings.database.name == "psycopg2";
|
usePostgresql = cfg.settings.database.name == "psycopg2";
|
||||||
hasLocalPostgresDB = let args = cfg.settings.database.args; in
|
hasLocalPostgresDB = let args = cfg.settings.database.args; in
|
||||||
|
@ -50,6 +45,29 @@ let
|
||||||
"${bindAddress}"
|
"${bindAddress}"
|
||||||
}:${builtins.toString listener.port}/"
|
}:${builtins.toString listener.port}/"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
defaultExtras = [
|
||||||
|
"systemd"
|
||||||
|
"postgres"
|
||||||
|
"url-preview"
|
||||||
|
"user-search"
|
||||||
|
];
|
||||||
|
|
||||||
|
wantedExtras = cfg.extras
|
||||||
|
++ lib.optional (cfg.settings ? oidc_providers) "oidc"
|
||||||
|
++ lib.optional (cfg.settings ? jwt_config) "jwt"
|
||||||
|
++ lib.optional (cfg.settings ? saml2_config) "saml2"
|
||||||
|
++ lib.optional (cfg.settings ? opentracing) "opentracing"
|
||||||
|
++ lib.optional (cfg.settings ? redis) "redis"
|
||||||
|
++ lib.optional (cfg.settings ? sentry) "sentry"
|
||||||
|
++ lib.optional (cfg.settings ? user_directory) "user-search"
|
||||||
|
++ lib.optional (cfg.settings.url_preview_enabled) "url-preview"
|
||||||
|
++ lib.optional (cfg.settings.database.name == "psycopg2") "postgres";
|
||||||
|
|
||||||
|
wrapped = pkgs.matrix-synapse.override {
|
||||||
|
extras = wantedExtras;
|
||||||
|
inherit (cfg) plugins;
|
||||||
|
};
|
||||||
in {
|
in {
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
|
@ -151,10 +169,53 @@ in {
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
default = pkgs.matrix-synapse;
|
readOnly = true;
|
||||||
defaultText = literalExpression "pkgs.matrix-synapse";
|
|
||||||
description = lib.mdDoc ''
|
description = lib.mdDoc ''
|
||||||
Overridable attribute of the matrix synapse server package to use.
|
Reference to the `matrix-synapse` wrapper with all extras
|
||||||
|
(e.g. for `oidc` or `saml2`) added to the `PYTHONPATH` of all executables.
|
||||||
|
|
||||||
|
This option is useful to reference the "final" `matrix-synapse` package that's
|
||||||
|
actually used by `matrix-synapse.service`. For instance, when using
|
||||||
|
workers, it's possible to run
|
||||||
|
`''${config.services.matrix-synapse.package}/bin/synapse_worker` and
|
||||||
|
no additional PYTHONPATH needs to be specified for extras or plugins configured
|
||||||
|
via `services.matrix-synapse`.
|
||||||
|
|
||||||
|
However, this means that this option is supposed to be only declared
|
||||||
|
by the `services.matrix-synapse` module itself and is thus read-only.
|
||||||
|
In order to modify `matrix-synapse` itself, use an overlay to override
|
||||||
|
`pkgs.matrix-synapse-unwrapped`.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
extras = mkOption {
|
||||||
|
type = types.listOf (types.enum (lib.attrNames pkgs.matrix-synapse-unwrapped.optional-dependencies));
|
||||||
|
default = defaultExtras;
|
||||||
|
example = literalExpression ''
|
||||||
|
[
|
||||||
|
"cache-memory" # Provide statistics about caching memory consumption
|
||||||
|
"jwt" # JSON Web Token authentication
|
||||||
|
"opentracing" # End-to-end tracing support using Jaeger
|
||||||
|
"oidc" # OpenID Connect authentication
|
||||||
|
"postgres" # PostgreSQL database backend
|
||||||
|
"redis" # Redis support for the replication stream between worker processes
|
||||||
|
"saml2" # SAML2 authentication
|
||||||
|
"sentry" # Error tracking and performance metrics
|
||||||
|
"systemd" # Provide the JournalHandler used in the default log_config
|
||||||
|
"url-preview" # Support for oEmbed URL previews
|
||||||
|
"user-search" # Support internationalized domain names in user-search
|
||||||
|
]
|
||||||
|
'';
|
||||||
|
description = lib.mdDoc ''
|
||||||
|
Explicitly install extras provided by matrix-synapse. Most
|
||||||
|
will require some additional configuration.
|
||||||
|
|
||||||
|
Extras will automatically be enabled, when the relevant
|
||||||
|
configuration sections are present.
|
||||||
|
|
||||||
|
Please note that this option is additive: i.e. when adding a new item
|
||||||
|
to this list, the defaults are still kept. To override the defaults as well,
|
||||||
|
use `lib.mkForce`.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -193,7 +254,7 @@ in {
|
||||||
default = {};
|
default = {};
|
||||||
description = mdDoc ''
|
description = mdDoc ''
|
||||||
The primary synapse configuration. See the
|
The primary synapse configuration. See the
|
||||||
[sample configuration](https://github.com/matrix-org/synapse/blob/v${cfg.package.version}/docs/sample_config.yaml)
|
[sample configuration](https://github.com/matrix-org/synapse/blob/v${pkgs.matrix-synapse-unwrapped.version}/docs/sample_config.yaml)
|
||||||
for possible values.
|
for possible values.
|
||||||
|
|
||||||
Secrets should be passed in by using the `extraConfigFiles` option.
|
Secrets should be passed in by using the `extraConfigFiles` option.
|
||||||
|
@ -706,6 +767,10 @@ in {
|
||||||
];
|
];
|
||||||
|
|
||||||
services.matrix-synapse.configFile = configFile;
|
services.matrix-synapse.configFile = configFile;
|
||||||
|
services.matrix-synapse.package = wrapped;
|
||||||
|
|
||||||
|
# default them, so they are additive
|
||||||
|
services.matrix-synapse.extras = defaultExtras;
|
||||||
|
|
||||||
users.users.matrix-synapse = {
|
users.users.matrix-synapse = {
|
||||||
group = "matrix-synapse";
|
group = "matrix-synapse";
|
||||||
|
@ -729,9 +794,7 @@ in {
|
||||||
--keys-directory ${cfg.dataDir} \
|
--keys-directory ${cfg.dataDir} \
|
||||||
--generate-keys
|
--generate-keys
|
||||||
'';
|
'';
|
||||||
environment = {
|
environment = optionalAttrs (cfg.withJemalloc) {
|
||||||
PYTHONPATH = makeSearchPathOutput "lib" cfg.package.python.sitePackages [ pluginsEnv ];
|
|
||||||
} // optionalAttrs (cfg.withJemalloc) {
|
|
||||||
LD_PRELOAD = "${pkgs.jemalloc}/lib/libjemalloc.so";
|
LD_PRELOAD = "${pkgs.jemalloc}/lib/libjemalloc.so";
|
||||||
};
|
};
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
|
|
|
@ -27,6 +27,18 @@ in {
|
||||||
Specify a path to a configuration file that Tempo should use.
|
Specify a path to a configuration file that Tempo should use.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extraFlags = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
|
default = [];
|
||||||
|
example = lib.literalExpression
|
||||||
|
''
|
||||||
|
[ "-config.expand-env=true" ]
|
||||||
|
'';
|
||||||
|
description = lib.mdDoc ''
|
||||||
|
Additional flags to pass to the `ExecStart=` in `tempo.service`.
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
@ -54,7 +66,7 @@ in {
|
||||||
else cfg.configFile;
|
else cfg.configFile;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
ExecStart = "${pkgs.tempo}/bin/tempo --config.file=${conf}";
|
ExecStart = "${pkgs.tempo}/bin/tempo --config.file=${conf} ${lib.escapeShellArgs cfg.extraFlags}";
|
||||||
DynamicUser = true;
|
DynamicUser = true;
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
ProtectSystem = "full";
|
ProtectSystem = "full";
|
||||||
|
|
|
@ -212,11 +212,6 @@ in
|
||||||
programs.bash.vteIntegration = mkDefault true;
|
programs.bash.vteIntegration = mkDefault true;
|
||||||
programs.zsh.vteIntegration = mkDefault true;
|
programs.zsh.vteIntegration = mkDefault true;
|
||||||
|
|
||||||
# Harmonize Qt applications under Cinnamon
|
|
||||||
qt.enable = true;
|
|
||||||
qt.platformTheme = "gnome";
|
|
||||||
qt.style = "adwaita";
|
|
||||||
|
|
||||||
# Default Fonts
|
# Default Fonts
|
||||||
fonts.packages = with pkgs; [
|
fonts.packages = with pkgs; [
|
||||||
source-code-pro # Default monospace font in 3.32
|
source-code-pro # Default monospace font in 3.32
|
||||||
|
|
|
@ -200,7 +200,6 @@ in
|
||||||
gtk3.out # for gtk-launch program
|
gtk3.out # for gtk-launch program
|
||||||
onboard
|
onboard
|
||||||
orca # elementary/greeter#668
|
orca # elementary/greeter#668
|
||||||
qgnomeplatform
|
|
||||||
sound-theme-freedesktop
|
sound-theme-freedesktop
|
||||||
xdg-user-dirs # Update user dirs as described in http://freedesktop.org/wiki/Software/xdg-user-dirs/
|
xdg-user-dirs # Update user dirs as described in http://freedesktop.org/wiki/Software/xdg-user-dirs/
|
||||||
]) ++ (with pkgs.pantheon; [
|
]) ++ (with pkgs.pantheon; [
|
||||||
|
@ -260,10 +259,10 @@ in
|
||||||
programs.bash.vteIntegration = mkDefault true;
|
programs.bash.vteIntegration = mkDefault true;
|
||||||
programs.zsh.vteIntegration = mkDefault true;
|
programs.zsh.vteIntegration = mkDefault true;
|
||||||
|
|
||||||
# Harmonize Qt applications under Pantheon
|
# Use native GTK file chooser on Qt apps. This is because Qt does not know Pantheon.
|
||||||
qt.enable = true;
|
# https://invent.kde.org/qt/qt/qtbase/-/blob/6.6/src/gui/platform/unix/qgenericunixthemes.cpp#L1312
|
||||||
qt.platformTheme = "gnome";
|
# https://github.com/elementary/default-settings/blob/7.0.2/profile.d/qt-qpa-platformtheme.sh
|
||||||
qt.style = "adwaita";
|
environment.variables.QT_QPA_PLATFORMTHEME = mkDefault "gtk3";
|
||||||
|
|
||||||
# Default Fonts
|
# Default Fonts
|
||||||
fonts.packages = with pkgs; [
|
fonts.packages = with pkgs; [
|
||||||
|
|
|
@ -65,7 +65,7 @@ in {
|
||||||
|
|
||||||
nodes = {
|
nodes = {
|
||||||
# Since 0.33.0, matrix-synapse doesn't allow underscores in server names
|
# Since 0.33.0, matrix-synapse doesn't allow underscores in server names
|
||||||
serverpostgres = { pkgs, nodes, ... }: let
|
serverpostgres = { pkgs, nodes, config, ... }: let
|
||||||
mailserverIP = nodes.mailserver.config.networking.primaryIPAddress;
|
mailserverIP = nodes.mailserver.config.networking.primaryIPAddress;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -77,6 +77,11 @@ in {
|
||||||
name = "psycopg2";
|
name = "psycopg2";
|
||||||
args.password = "synapse";
|
args.password = "synapse";
|
||||||
};
|
};
|
||||||
|
redis = {
|
||||||
|
enabled = true;
|
||||||
|
host = "localhost";
|
||||||
|
port = config.services.redis.servers.matrix-synapse.port;
|
||||||
|
};
|
||||||
tls_certificate_path = "${cert}";
|
tls_certificate_path = "${cert}";
|
||||||
tls_private_key_path = "${key}";
|
tls_private_key_path = "${key}";
|
||||||
registration_shared_secret = registrationSharedSecret;
|
registration_shared_secret = registrationSharedSecret;
|
||||||
|
@ -107,6 +112,11 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.redis.servers.matrix-synapse = {
|
||||||
|
enable = true;
|
||||||
|
port = 6380;
|
||||||
|
};
|
||||||
|
|
||||||
networking.extraHosts = ''
|
networking.extraHosts = ''
|
||||||
${mailserverIP} ${mailerDomain}
|
${mailserverIP} ${mailerDomain}
|
||||||
'';
|
'';
|
||||||
|
@ -208,6 +218,9 @@ in {
|
||||||
serverpostgres.wait_until_succeeds(
|
serverpostgres.wait_until_succeeds(
|
||||||
"curl --fail -L --cacert ${ca_pem} https://localhost:8448/"
|
"curl --fail -L --cacert ${ca_pem} https://localhost:8448/"
|
||||||
)
|
)
|
||||||
|
serverpostgres.wait_until_succeeds(
|
||||||
|
"journalctl -u matrix-synapse.service | grep -q 'Connected to redis'"
|
||||||
|
)
|
||||||
serverpostgres.require_unit_state("postgresql.service")
|
serverpostgres.require_unit_state("postgresql.service")
|
||||||
serverpostgres.succeed("register_new_matrix_user -u ${testUser} -p ${testPassword} -a -k ${registrationSharedSecret} https://localhost:8448/")
|
serverpostgres.succeed("register_new_matrix_user -u ${testUser} -p ${testPassword} -a -k ${registrationSharedSecret} https://localhost:8448/")
|
||||||
serverpostgres.succeed("obtain-token-and-register-email")
|
serverpostgres.succeed("obtain-token-and-register-email")
|
||||||
|
|
|
@ -14,11 +14,12 @@ let
|
||||||
# inherit testsForPackage;
|
# inherit testsForPackage;
|
||||||
};
|
};
|
||||||
|
|
||||||
testsForPackage = lib.makeOverridable (args: lib.recurseIntoAttrs {
|
testsForPackage = args: lib.recurseIntoAttrs {
|
||||||
legacyNetwork = testLegacyNetwork args;
|
legacyNetwork = testLegacyNetwork args;
|
||||||
});
|
passthru.override = args': testsForPackage (args // args');
|
||||||
|
};
|
||||||
|
|
||||||
testLegacyNetwork = { nixopsPkg }: pkgs.nixosTest ({
|
testLegacyNetwork = { nixopsPkg, ... }: pkgs.nixosTest ({
|
||||||
name = "nixops-legacy-network";
|
name = "nixops-legacy-network";
|
||||||
nodes = {
|
nodes = {
|
||||||
deployer = { config, lib, nodes, pkgs, ... }: {
|
deployer = { config, lib, nodes, pkgs, ... }: {
|
||||||
|
@ -52,7 +53,7 @@ let
|
||||||
chmod 0400 ~/.ssh/id_ed25519
|
chmod 0400 ~/.ssh/id_ed25519
|
||||||
'';
|
'';
|
||||||
serverNetworkJSON = pkgs.writeText "server-network.json"
|
serverNetworkJSON = pkgs.writeText "server-network.json"
|
||||||
(builtins.toJSON nodes.server.config.system.build.networkConfig);
|
(builtins.toJSON nodes.server.system.build.networkConfig);
|
||||||
in
|
in
|
||||||
''
|
''
|
||||||
import shlex
|
import shlex
|
||||||
|
|
837
pkgs/README.md
Normal file
837
pkgs/README.md
Normal file
|
@ -0,0 +1,837 @@
|
||||||
|
# Contributing to Nixpkgs packages
|
||||||
|
|
||||||
|
This document is for people wanting to contribute specifically to the package collection in Nixpkgs.
|
||||||
|
See the [CONTRIBUTING.md](../CONTRIBUTING.md) document for more general information.
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
- [`top-level`](./top-level): Entrypoints, package set aggregations
|
||||||
|
- [`impure.nix`](./top-level/impure.nix), [`default.nix`](./top-level/default.nix), [`config.nix`](./top-level/config.nix): Definitions for the evaluation entry point of `import <nixpkgs>`
|
||||||
|
- [`stage.nix`](./top-level/stage.nix), [`all-packages.nix`](./top-level/all-packages.nix), [`splice.nix`](./top-level/splice.nix): Definitions for the top-level attribute set made available through `import <nixpkgs> {…}`
|
||||||
|
- `*-packages.nix`, [`linux-kernels.nix`](./top-level/linux-kernels.nix), [`unixtools.nix`](./top-level/unixtools.nix): Aggregations of nested package sets defined in `development`
|
||||||
|
- [`aliases.nix`](./top-level/aliases.nix), [`python-aliases.nix`](./top-level/python-aliases.nix): Aliases for package definitions that have been renamed or removed
|
||||||
|
- `release*.nix`, [`make-tarball.nix`](./top-level/make-tarball.nix), [`packages-config.nix`](./top-level/packages-config.nix), [`metrics.nix`](./top-level/metrics.nix), [`nixpkgs-basic-release-checks.nix`](./top-level/nixpkgs-basic-release-checks.nix): Entry-points and utilities used by Hydra for continuous integration
|
||||||
|
- [`development`](./development)
|
||||||
|
- `*-modules`, `*-packages`, `*-pkgs`: Package definitions for nested package sets
|
||||||
|
- All other directories loosely categorise top-level package definitions, see [category hierarchy][categories]
|
||||||
|
- [`build-support`](./build-support): [Builders](https://nixos.org/manual/nixpkgs/stable/#part-builders)
|
||||||
|
- `fetch*`: [Fetchers](https://nixos.org/manual/nixpkgs/stable/#chap-pkgs-fetchers)
|
||||||
|
- [`stdenv`](./stdenv): [Standard environment](https://nixos.org/manual/nixpkgs/stable/#part-stdenv)
|
||||||
|
- [`pkgs-lib`](./pkgs-lib): Definitions for utilities that need packages but are not needed for packages
|
||||||
|
- [`test`](./test): Tests not directly associated with any specific packages
|
||||||
|
- All other directories loosely categorise top-level packages definitions, see [category hierarchy][categories]
|
||||||
|
|
||||||
|
## Quick Start to Adding a Package
|
||||||
|
|
||||||
|
To add a package to Nixpkgs:
|
||||||
|
|
||||||
|
1. Checkout the Nixpkgs source tree:
|
||||||
|
|
||||||
|
```ShellSession
|
||||||
|
$ git clone https://github.com/NixOS/nixpkgs
|
||||||
|
$ cd nixpkgs
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Find a good place in the Nixpkgs tree to add the Nix expression for your package. For instance, a library package typically goes into `pkgs/development/libraries/pkgname`, while a web browser goes into `pkgs/applications/networking/browsers/pkgname`. See the [category hierarchy section][categories] for some hints on the tree organisation. Create a directory for your package, e.g.
|
||||||
|
|
||||||
|
```ShellSession
|
||||||
|
$ mkdir pkgs/development/libraries/libfoo
|
||||||
|
```
|
||||||
|
|
||||||
|
3. In the package directory, create a Nix expression — a piece of code that describes how to build the package. In this case, it should be a _function_ that is called with the package dependencies as arguments, and returns a build of the package in the Nix store. The expression should usually be called `default.nix`.
|
||||||
|
|
||||||
|
```ShellSession
|
||||||
|
$ emacs pkgs/development/libraries/libfoo/default.nix
|
||||||
|
$ git add pkgs/development/libraries/libfoo/default.nix
|
||||||
|
```
|
||||||
|
|
||||||
|
You can have a look at the existing Nix expressions under `pkgs/` to see how it’s done. Here are some good ones:
|
||||||
|
|
||||||
|
- GNU Hello: [`pkgs/applications/misc/hello/default.nix`](applications/misc/hello/default.nix). Trivial package, which specifies some `meta` attributes which is good practice.
|
||||||
|
|
||||||
|
- GNU cpio: [`pkgs/tools/archivers/cpio/default.nix`](tools/archivers/cpio/default.nix). Also a simple package. The generic builder in `stdenv` does everything for you. It has no dependencies beyond `stdenv`.
|
||||||
|
|
||||||
|
- GNU Multiple Precision arithmetic library (GMP): [`pkgs/development/libraries/gmp/5.1.x.nix`](development/libraries/gmp/5.1.x.nix). Also done by the generic builder, but has a dependency on `m4`.
|
||||||
|
|
||||||
|
- Pan, a GTK-based newsreader: [`pkgs/applications/networking/newsreaders/pan/default.nix`](applications/networking/newsreaders/pan/default.nix). Has an optional dependency on `gtkspell`, which is only built if `spellCheck` is `true`.
|
||||||
|
|
||||||
|
- Apache HTTPD: [`pkgs/servers/http/apache-httpd/2.4.nix`](servers/http/apache-httpd/2.4.nix). A bunch of optional features, variable substitutions in the configure flags, a post-install hook, and miscellaneous hackery.
|
||||||
|
|
||||||
|
- buildMozillaMach: [`pkgs/applications/networking/browser/firefox/common.nix`](applications/networking/browsers/firefox/common.nix). A reusable build function for Firefox, Thunderbird and Librewolf.
|
||||||
|
|
||||||
|
- JDiskReport, a Java utility: [`pkgs/tools/misc/jdiskreport/default.nix`](tools/misc/jdiskreport/default.nix). Nixpkgs doesn’t have a decent `stdenv` for Java yet so this is pretty ad-hoc.
|
||||||
|
|
||||||
|
- XML::Simple, a Perl module: [`pkgs/top-level/perl-packages.nix`](top-level/perl-packages.nix) (search for the `XMLSimple` attribute). Most Perl modules are so simple to build that they are defined directly in `perl-packages.nix`; no need to make a separate file for them.
|
||||||
|
|
||||||
|
- Adobe Reader: [`pkgs/applications/misc/adobe-reader/default.nix`](applications/misc/adobe-reader/default.nix). Shows how binary-only packages can be supported. In particular the [builder](applications/misc/adobe-reader/builder.sh) uses `patchelf` to set the RUNPATH and ELF interpreter of the executables so that the right libraries are found at runtime.
|
||||||
|
|
||||||
|
Some notes:
|
||||||
|
|
||||||
|
- All [`meta`](https://nixos.org/manual/nixpkgs/stable/#chap-meta) attributes are optional, but it’s still a good idea to provide at least the `description`, `homepage` and [`license`](https://nixos.org/manual/nixpkgs/stable/#sec-meta-license).
|
||||||
|
|
||||||
|
- You can use `nix-prefetch-url url` to get the SHA-256 hash of source distributions. There are similar commands as `nix-prefetch-git` and `nix-prefetch-hg` available in `nix-prefetch-scripts` package.
|
||||||
|
|
||||||
|
- A list of schemes for `mirror://` URLs can be found in [`pkgs/build-support/fetchurl/mirrors.nix`](build-support/fetchurl/mirrors.nix).
|
||||||
|
|
||||||
|
The exact syntax and semantics of the Nix expression language, including the built-in function, are [described in the Nix manual](https://nixos.org/manual/nix/stable/language/).
|
||||||
|
|
||||||
|
4. Add a call to the function defined in the previous step to [`pkgs/top-level/all-packages.nix`](top-level/all-packages.nix) with some descriptive name for the variable, e.g. `libfoo`.
|
||||||
|
|
||||||
|
```ShellSession
|
||||||
|
$ emacs pkgs/top-level/all-packages.nix
|
||||||
|
```
|
||||||
|
|
||||||
|
The attributes in that file are sorted by category (like “Development / Libraries”) that more-or-less correspond to the directory structure of Nixpkgs, and then by attribute name.
|
||||||
|
|
||||||
|
5. To test whether the package builds, run the following command from the root of the nixpkgs source tree:
|
||||||
|
|
||||||
|
```ShellSession
|
||||||
|
$ nix-build -A libfoo
|
||||||
|
```
|
||||||
|
|
||||||
|
where `libfoo` should be the variable name defined in the previous step. You may want to add the flag `-K` to keep the temporary build directory in case something fails. If the build succeeds, a symlink `./result` to the package in the Nix store is created.
|
||||||
|
|
||||||
|
6. If you want to install the package into your profile (optional), do
|
||||||
|
|
||||||
|
```ShellSession
|
||||||
|
$ nix-env -f . -iA libfoo
|
||||||
|
```
|
||||||
|
|
||||||
|
7. Optionally commit the new package and open a pull request [to nixpkgs](https://github.com/NixOS/nixpkgs/pulls), or use [the Patches category](https://discourse.nixos.org/t/about-the-patches-category/477) on Discourse for sending a patch without a GitHub account.
|
||||||
|
|
||||||
|
## Category Hierarchy
|
||||||
|
[categories]: #category-hierarchy
|
||||||
|
|
||||||
|
Each package should be stored in its own directory somewhere in the `pkgs/` tree, i.e. in `pkgs/category/subcategory/.../pkgname`. Below are some rules for picking the right category for a package. Many packages fall under several categories; what matters is the _primary_ purpose of a package. For example, the `libxml2` package builds both a library and some tools; but it’s a library foremost, so it goes under `pkgs/development/libraries`.
|
||||||
|
|
||||||
|
When in doubt, consider refactoring the `pkgs/` tree, e.g. creating new categories or splitting up an existing category.
|
||||||
|
|
||||||
|
**If it’s used to support _software development_:**
|
||||||
|
|
||||||
|
- **If it’s a _library_ used by other packages:**
|
||||||
|
|
||||||
|
- `development/libraries` (e.g. `libxml2`)
|
||||||
|
|
||||||
|
- **If it’s a _compiler_:**
|
||||||
|
|
||||||
|
- `development/compilers` (e.g. `gcc`)
|
||||||
|
|
||||||
|
- **If it’s an _interpreter_:**
|
||||||
|
|
||||||
|
- `development/interpreters` (e.g. `guile`)
|
||||||
|
|
||||||
|
- **If it’s a (set of) development _tool(s)_:**
|
||||||
|
|
||||||
|
- **If it’s a _parser generator_ (including lexers):**
|
||||||
|
|
||||||
|
- `development/tools/parsing` (e.g. `bison`, `flex`)
|
||||||
|
|
||||||
|
- **If it’s a _build manager_:**
|
||||||
|
|
||||||
|
- `development/tools/build-managers` (e.g. `gnumake`)
|
||||||
|
|
||||||
|
- **If it’s a _language server_:**
|
||||||
|
|
||||||
|
- `development/tools/language-servers` (e.g. `ccls` or `rnix-lsp`)
|
||||||
|
|
||||||
|
- **Else:**
|
||||||
|
|
||||||
|
- `development/tools/misc` (e.g. `binutils`)
|
||||||
|
|
||||||
|
- **Else:**
|
||||||
|
|
||||||
|
- `development/misc`
|
||||||
|
|
||||||
|
**If it’s a (set of) _tool(s)_:**
|
||||||
|
|
||||||
|
(A tool is a relatively small program, especially one intended to be used non-interactively.)
|
||||||
|
|
||||||
|
- **If it’s for _networking_:**
|
||||||
|
|
||||||
|
- `tools/networking` (e.g. `wget`)
|
||||||
|
|
||||||
|
- **If it’s for _text processing_:**
|
||||||
|
|
||||||
|
- `tools/text` (e.g. `diffutils`)
|
||||||
|
|
||||||
|
- **If it’s a _system utility_, i.e., something related or essential to the operation of a system:**
|
||||||
|
|
||||||
|
- `tools/system` (e.g. `cron`)
|
||||||
|
|
||||||
|
- **If it’s an _archiver_ (which may include a compression function):**
|
||||||
|
|
||||||
|
- `tools/archivers` (e.g. `zip`, `tar`)
|
||||||
|
|
||||||
|
- **If it’s a _compression_ program:**
|
||||||
|
|
||||||
|
- `tools/compression` (e.g. `gzip`, `bzip2`)
|
||||||
|
|
||||||
|
- **If it’s a _security_-related program:**
|
||||||
|
|
||||||
|
- `tools/security` (e.g. `nmap`, `gnupg`)
|
||||||
|
|
||||||
|
- **Else:**
|
||||||
|
|
||||||
|
- `tools/misc`
|
||||||
|
|
||||||
|
**If it’s a _shell_:**
|
||||||
|
|
||||||
|
- `shells` (e.g. `bash`)
|
||||||
|
|
||||||
|
**If it’s a _server_:**
|
||||||
|
|
||||||
|
- **If it’s a web server:**
|
||||||
|
|
||||||
|
- `servers/http` (e.g. `apache-httpd`)
|
||||||
|
|
||||||
|
- **If it’s an implementation of the X Windowing System:**
|
||||||
|
|
||||||
|
- `servers/x11` (e.g. `xorg` — this includes the client libraries and programs)
|
||||||
|
|
||||||
|
- **Else:**
|
||||||
|
|
||||||
|
- `servers/misc`
|
||||||
|
|
||||||
|
**If it’s a _desktop environment_:**
|
||||||
|
|
||||||
|
- `desktops` (e.g. `kde`, `gnome`, `enlightenment`)
|
||||||
|
|
||||||
|
**If it’s a _window manager_:**
|
||||||
|
|
||||||
|
- `applications/window-managers` (e.g. `awesome`, `stumpwm`)
|
||||||
|
|
||||||
|
**If it’s an _application_:**
|
||||||
|
|
||||||
|
A (typically large) program with a distinct user interface, primarily used interactively.
|
||||||
|
|
||||||
|
- **If it’s a _version management system_:**
|
||||||
|
|
||||||
|
- `applications/version-management` (e.g. `subversion`)
|
||||||
|
|
||||||
|
- **If it’s a _terminal emulator_:**
|
||||||
|
|
||||||
|
- `applications/terminal-emulators` (e.g. `alacritty` or `rxvt` or `termite`)
|
||||||
|
|
||||||
|
- **If it’s a _file manager_:**
|
||||||
|
|
||||||
|
- `applications/file-managers` (e.g. `mc` or `ranger` or `pcmanfm`)
|
||||||
|
|
||||||
|
- **If it’s for _video playback / editing_:**
|
||||||
|
|
||||||
|
- `applications/video` (e.g. `vlc`)
|
||||||
|
|
||||||
|
- **If it’s for _graphics viewing / editing_:**
|
||||||
|
|
||||||
|
- `applications/graphics` (e.g. `gimp`)
|
||||||
|
|
||||||
|
- **If it’s for _networking_:**
|
||||||
|
|
||||||
|
- **If it’s a _mailreader_:**
|
||||||
|
|
||||||
|
- `applications/networking/mailreaders` (e.g. `thunderbird`)
|
||||||
|
|
||||||
|
- **If it’s a _newsreader_:**
|
||||||
|
|
||||||
|
- `applications/networking/newsreaders` (e.g. `pan`)
|
||||||
|
|
||||||
|
- **If it’s a _web browser_:**
|
||||||
|
|
||||||
|
- `applications/networking/browsers` (e.g. `firefox`)
|
||||||
|
|
||||||
|
- **Else:**
|
||||||
|
|
||||||
|
- `applications/networking/misc`
|
||||||
|
|
||||||
|
- **Else:**
|
||||||
|
|
||||||
|
- `applications/misc`
|
||||||
|
|
||||||
|
**If it’s _data_ (i.e., does not have a straight-forward executable semantics):**
|
||||||
|
|
||||||
|
- **If it’s a _font_:**
|
||||||
|
|
||||||
|
- `data/fonts`
|
||||||
|
|
||||||
|
- **If it’s an _icon theme_:**
|
||||||
|
|
||||||
|
- `data/icons`
|
||||||
|
|
||||||
|
- **If it’s related to _SGML/XML processing_:**
|
||||||
|
|
||||||
|
- **If it’s an _XML DTD_:**
|
||||||
|
|
||||||
|
- `data/sgml+xml/schemas/xml-dtd` (e.g. `docbook`)
|
||||||
|
|
||||||
|
- **If it’s an _XSLT stylesheet_:**
|
||||||
|
|
||||||
|
(Okay, these are executable...)
|
||||||
|
|
||||||
|
- `data/sgml+xml/stylesheets/xslt` (e.g. `docbook-xsl`)
|
||||||
|
|
||||||
|
- **If it’s a _theme_ for a _desktop environment_, a _window manager_ or a _display manager_:**
|
||||||
|
|
||||||
|
- `data/themes`
|
||||||
|
|
||||||
|
**If it’s a _game_:**
|
||||||
|
|
||||||
|
- `games`
|
||||||
|
|
||||||
|
**Else:**
|
||||||
|
|
||||||
|
- `misc`
|
||||||
|
|
||||||
|
# Conventions
|
||||||
|
|
||||||
|
## Package naming
|
||||||
|
|
||||||
|
The key words _must_, _must not_, _required_, _shall_, _shall not_, _should_, _should not_, _recommended_, _may_, and _optional_ in this section are to be interpreted as described in [RFC 2119](https://tools.ietf.org/html/rfc2119). Only _emphasized_ words are to be interpreted in this way.
|
||||||
|
|
||||||
|
In Nixpkgs, there are generally three different names associated with a package:
|
||||||
|
|
||||||
|
- The `pname` attribute of the derivation. This is what most users see, in particular when using `nix-env`.
|
||||||
|
|
||||||
|
- The variable name used for the instantiated package in `all-packages.nix`, and when passing it as a dependency to other functions. Typically this is called the _package attribute name_. This is what Nix expression authors see. It can also be used when installing using `nix-env -iA`.
|
||||||
|
|
||||||
|
- The filename for (the directory containing) the Nix expression.
|
||||||
|
|
||||||
|
Most of the time, these are the same. For instance, the package `e2fsprogs` has a `pname` attribute `"e2fsprogs"`, is bound to the variable name `e2fsprogs` in `all-packages.nix`, and the Nix expression is in `pkgs/os-specific/linux/e2fsprogs/default.nix`.
|
||||||
|
|
||||||
|
There are a few naming guidelines:
|
||||||
|
|
||||||
|
- The `pname` attribute _should_ be identical to the upstream package name.
|
||||||
|
|
||||||
|
- The `pname` and the `version` attribute _must not_ contain uppercase letters — e.g., `"mplayer" instead of `"MPlayer"`.
|
||||||
|
|
||||||
|
- The `version` attribute _must_ start with a digit e.g`"0.3.1rc2".
|
||||||
|
|
||||||
|
- If a package is a commit from a repository without a version assigned, then the `version` attribute _should_ be the latest upstream version preceding that commit, followed by `-unstable-` and the date of the (fetched) commit. The date _must_ be in `"YYYY-MM-DD"` format.
|
||||||
|
|
||||||
|
Example: Given a project had its latest releases `2.2` in November 2021, and `3.0` in January 2022, a commit authored on March 15, 2022 for an upcoming bugfix release `2.2.1` would have `version = "2.2-unstable-2022-03-15"`.
|
||||||
|
|
||||||
|
- Dashes in the package `pname` _should_ be preserved in new variable names, rather than converted to underscores or camel cased — e.g., `http-parser` instead of `http_parser` or `httpParser`. The hyphenated style is preferred in all three package names.
|
||||||
|
|
||||||
|
- If there are multiple versions of a package, this _should_ be reflected in the variable names in `all-packages.nix`, e.g. `json-c_0_9` and `json-c_0_11`. If there is an obvious “default” version, make an attribute like `json-c = json-c_0_9;`. See also [versioning][versioning].
|
||||||
|
|
||||||
|
## Versioning
|
||||||
|
[versioning]: #versioning
|
||||||
|
|
||||||
|
Because every version of a package in Nixpkgs creates a potential maintenance burden, old versions of a package should not be kept unless there is a good reason to do so. For instance, Nixpkgs contains several versions of GCC because other packages don’t build with the latest version of GCC. Other examples are having both the latest stable and latest pre-release version of a package, or to keep several major releases of an application that differ significantly in functionality.
|
||||||
|
|
||||||
|
If there is only one version of a package, its Nix expression should be named `e2fsprogs/default.nix`. If there are multiple versions, this should be reflected in the filename, e.g. `e2fsprogs/1.41.8.nix` and `e2fsprogs/1.41.9.nix`. The version in the filename should leave out unnecessary detail. For instance, if we keep the latest Firefox 2.0.x and 3.5.x versions in Nixpkgs, they should be named `firefox/2.0.nix` and `firefox/3.5.nix`, respectively (which, at a given point, might contain versions `2.0.0.20` and `3.5.4`). If a version requires many auxiliary files, you can use a subdirectory for each version, e.g. `firefox/2.0/default.nix` and `firefox/3.5/default.nix`.
|
||||||
|
|
||||||
|
All versions of a package _must_ be included in `all-packages.nix` to make sure that they evaluate correctly.
|
||||||
|
|
||||||
|
## Meta attributes
|
||||||
|
|
||||||
|
* `meta.description` must:
|
||||||
|
* Be short, just one sentence.
|
||||||
|
* Be capitalized.
|
||||||
|
* Not start with the package name.
|
||||||
|
* More generally, it should not refer to the package name.
|
||||||
|
* Not end with a period (or any punctuation for that matter).
|
||||||
|
* Aim to inform while avoiding subjective language.
|
||||||
|
* `meta.license` must be set and fit the upstream license.
|
||||||
|
* If there is no upstream license, `meta.license` should default to `lib.licenses.unfree`.
|
||||||
|
* If in doubt, try to contact the upstream developers for clarification.
|
||||||
|
* `meta.mainProgram` must be set when appropriate.
|
||||||
|
* `meta.maintainers` should be set.
|
||||||
|
|
||||||
|
See the nixpkgs manual for more details on [standard meta-attributes](https://nixos.org/nixpkgs/manual/#sec-standard-meta-attributes).
|
||||||
|
|
||||||
|
### Import From Derivation
|
||||||
|
|
||||||
|
Import From Derivation (IFD) is disallowed in Nixpkgs for performance reasons:
|
||||||
|
[Hydra] evaluates the entire package set, and sequential builds during evaluation would increase evaluation times to become impractical.
|
||||||
|
|
||||||
|
[Hydra]: https://github.com/NixOS/hydra
|
||||||
|
|
||||||
|
Import From Derivation can be worked around in some cases by committing generated intermediate files to version control and reading those instead.
|
||||||
|
|
||||||
|
<!-- TODO: remove the following and link to Nix manual once https://github.com/NixOS/nix/pull/7332 is merged -->
|
||||||
|
|
||||||
|
See also [NixOS Wiki: Import From Derivation].
|
||||||
|
|
||||||
|
[NixOS Wiki: Import From Derivation]: https://nixos.wiki/wiki/Import_From_Derivation
|
||||||
|
|
||||||
|
## Sources
|
||||||
|
|
||||||
|
### Fetching Sources
|
||||||
|
|
||||||
|
There are multiple ways to fetch a package source in nixpkgs. The general guideline is that you should package reproducible sources with a high degree of availability. Right now there is only one fetcher which has mirroring support and that is `fetchurl`. Note that you should also prefer protocols which have a corresponding proxy environment variable.
|
||||||
|
|
||||||
|
You can find many source fetch helpers in `pkgs/build-support/fetch*`.
|
||||||
|
|
||||||
|
In the file `pkgs/top-level/all-packages.nix` you can find fetch helpers, these have names on the form `fetchFrom*`. The intention of these are to provide snapshot fetches but using the same api as some of the version controlled fetchers from `pkgs/build-support/`. As an example going from bad to good:
|
||||||
|
|
||||||
|
- Bad: Uses `git://` which won't be proxied.
|
||||||
|
|
||||||
|
```nix
|
||||||
|
src = fetchgit {
|
||||||
|
url = "git@github.com:NixOS/nix.git"
|
||||||
|
url = "git://github.com/NixOS/nix.git";
|
||||||
|
rev = "1f795f9f44607cc5bec70d1300150bfefcef2aae";
|
||||||
|
hash = "sha256-7D4m+saJjbSFP5hOwpQq2FGR2rr+psQMTcyb1ZvtXsQ=";
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
- Better: This is ok, but an archive fetch will still be faster.
|
||||||
|
|
||||||
|
```nix
|
||||||
|
src = fetchgit {
|
||||||
|
url = "https://github.com/NixOS/nix.git";
|
||||||
|
rev = "1f795f9f44607cc5bec70d1300150bfefcef2aae";
|
||||||
|
hash = "sha256-7D4m+saJjbSFP5hOwpQq2FGR2rr+psQMTcyb1ZvtXsQ=";
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
- Best: Fetches a snapshot archive and you get the rev you want.
|
||||||
|
|
||||||
|
```nix
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "NixOS";
|
||||||
|
repo = "nix";
|
||||||
|
rev = "1f795f9f44607cc5bec70d1300150bfefcef2aae";
|
||||||
|
hash = "sha256-7D4m+saJjbSFP5hOwpQq2FGR2rr+psQMTcyb1ZvtXsQ=";
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
When fetching from GitHub, commits must always be referenced by their full commit hash. This is because GitHub shares commit hashes among all forks and returns `404 Not Found` when a short commit hash is ambiguous. It already happens for some short, 6-character commit hashes in `nixpkgs`.
|
||||||
|
It is a practical vector for a denial-of-service attack by pushing large amounts of auto generated commits into forks and was already [demonstrated against GitHub Actions Beta](https://blog.teddykatz.com/2019/11/12/github-actions-dos.html).
|
||||||
|
|
||||||
|
Find the value to put as `hash` by running `nix-shell -p nix-prefetch-github --run "nix-prefetch-github --rev 1f795f9f44607cc5bec70d1300150bfefcef2aae NixOS nix"`.
|
||||||
|
|
||||||
|
#### Obtaining source hash
|
||||||
|
|
||||||
|
Preferred source hash type is sha256. There are several ways to get it.
|
||||||
|
|
||||||
|
1. Prefetch URL (with `nix-prefetch-XXX URL`, where `XXX` is one of `url`, `git`, `hg`, `cvs`, `bzr`, `svn`). Hash is printed to stdout.
|
||||||
|
|
||||||
|
2. Prefetch by package source (with `nix-prefetch-url '<nixpkgs>' -A PACKAGE.src`, where `PACKAGE` is package attribute name). Hash is printed to stdout.
|
||||||
|
|
||||||
|
This works well when you've upgraded existing package version and want to find out new hash, but is useless if package can't be accessed by attribute or package has multiple sources (`.srcs`, architecture-dependent sources, etc).
|
||||||
|
|
||||||
|
3. Upstream provided hash: use it when upstream provides `sha256` or `sha512` (when upstream provides `md5`, don't use it, compute `sha256` instead).
|
||||||
|
|
||||||
|
A little nuance is that `nix-prefetch-*` tools produce hash encoded with `base32`, but upstream usually provides hexadecimal (`base16`) encoding. Fetchers understand both formats. Nixpkgs does not standardize on any one format.
|
||||||
|
|
||||||
|
You can convert between formats with nix-hash, for example:
|
||||||
|
|
||||||
|
```ShellSession
|
||||||
|
$ nix-hash --type sha256 --to-base32 HASH
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Extracting hash from local source tarball can be done with `sha256sum`. Use `nix-prefetch-url file:///path/to/tarball` if you want base32 hash.
|
||||||
|
|
||||||
|
5. Fake hash: set the hash to one of
|
||||||
|
|
||||||
|
- `""`
|
||||||
|
- `lib.fakeHash`
|
||||||
|
- `lib.fakeSha256`
|
||||||
|
- `lib.fakeSha512`
|
||||||
|
|
||||||
|
in the package expression, attempt build and extract correct hash from error messages.
|
||||||
|
|
||||||
|
> **Warning**
|
||||||
|
> You must use one of these four fake hashes and not some arbitrarily-chosen hash.
|
||||||
|
> See [here][secure-hashes]
|
||||||
|
|
||||||
|
This is last resort method when reconstructing source URL is non-trivial and `nix-prefetch-url -A` isn’t applicable (for example, [one of `kodi` dependencies](https://github.com/NixOS/nixpkgs/blob/d2ab091dd308b99e4912b805a5eb088dd536adb9/pkgs/applications/video/kodi/default.nix#L73)). The easiest way then would be replace hash with a fake one and rebuild. Nix build will fail and error message will contain desired hash.
|
||||||
|
|
||||||
|
|
||||||
|
#### Obtaining hashes securely
|
||||||
|
[secure-hashes]: #obtaining-hashes-securely
|
||||||
|
|
||||||
|
Let's say Man-in-the-Middle (MITM) sits close to your network. Then instead of fetching source you can fetch malware, and instead of source hash you get hash of malware. Here are security considerations for this scenario:
|
||||||
|
|
||||||
|
- `http://` URLs are not secure to prefetch hash from;
|
||||||
|
|
||||||
|
- hashes from upstream (in method 3) should be obtained via secure protocol;
|
||||||
|
|
||||||
|
- `https://` URLs are secure in methods 1, 2, 3;
|
||||||
|
|
||||||
|
- `https://` URLs are secure in method 5 *only if* you use one of the listed fake hashes. If you use any other hash, `fetchurl` will pass `--insecure` to `curl` and may then degrade to HTTP in case of TLS certificate expiration.
|
||||||
|
|
||||||
|
### Patches
|
||||||
|
|
||||||
|
Patches available online should be retrieved using `fetchpatch`.
|
||||||
|
|
||||||
|
```nix
|
||||||
|
patches = [
|
||||||
|
(fetchpatch {
|
||||||
|
name = "fix-check-for-using-shared-freetype-lib.patch";
|
||||||
|
url = "http://git.ghostscript.com/?p=ghostpdl.git;a=patch;h=8f5d285";
|
||||||
|
hash = "sha256-uRcxaCjd+WAuGrXOmGfFeu79cUILwkRdBu48mwcBE7g=";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
```
|
||||||
|
|
||||||
|
Otherwise, you can add a `.patch` file to the `nixpkgs` repository. In the interest of keeping our maintenance burden to a minimum, only patches that are unique to `nixpkgs` should be added in this way.
|
||||||
|
|
||||||
|
If a patch is available online but does not cleanly apply, it can be modified in some fixed ways by using additional optional arguments for `fetchpatch`. Check [the `fetchpatch` reference](https://nixos.org/manual/nixpkgs/unstable/#fetchpatch) for details.
|
||||||
|
|
||||||
|
```nix
|
||||||
|
patches = [ ./0001-changes.patch ];
|
||||||
|
```
|
||||||
|
|
||||||
|
If you do need to do create this sort of patch file, one way to do so is with git:
|
||||||
|
|
||||||
|
1. Move to the root directory of the source code you're patching.
|
||||||
|
|
||||||
|
```ShellSession
|
||||||
|
$ cd the/program/source
|
||||||
|
```
|
||||||
|
|
||||||
|
2. If a git repository is not already present, create one and stage all of the source files.
|
||||||
|
|
||||||
|
```ShellSession
|
||||||
|
$ git init
|
||||||
|
$ git add .
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Edit some files to make whatever changes need to be included in the patch.
|
||||||
|
|
||||||
|
4. Use git to create a diff, and pipe the output to a patch file:
|
||||||
|
|
||||||
|
```ShellSession
|
||||||
|
$ git diff -a > nixpkgs/pkgs/the/package/0001-changes.patch
|
||||||
|
```
|
||||||
|
|
||||||
|
## Deprecating/removing packages
|
||||||
|
|
||||||
|
There is currently no policy when to remove a package.
|
||||||
|
|
||||||
|
Before removing a package, one should try to find a new maintainer or fix smaller issues first.
|
||||||
|
|
||||||
|
### Steps to remove a package from Nixpkgs
|
||||||
|
|
||||||
|
We use jbidwatcher as an example for a discontinued project here.
|
||||||
|
|
||||||
|
1. Have Nixpkgs checked out locally and up to date.
|
||||||
|
1. Create a new branch for your change, e.g. `git checkout -b jbidwatcher`
|
||||||
|
1. Remove the actual package including its directory, e.g. `git rm -rf pkgs/applications/misc/jbidwatcher`
|
||||||
|
1. Remove the package from the list of all packages (`pkgs/top-level/all-packages.nix`).
|
||||||
|
1. Add an alias for the package name in `pkgs/top-level/aliases.nix` (There is also `pkgs/applications/editors/vim/plugins/aliases.nix`. Package sets typically do not have aliases, so we can't add them there.)
|
||||||
|
|
||||||
|
For example in this case:
|
||||||
|
|
||||||
|
```
|
||||||
|
jbidwatcher = throw "jbidwatcher was discontinued in march 2021"; # added 2021-03-15
|
||||||
|
```
|
||||||
|
|
||||||
|
The throw message should explain in short why the package was removed for users that still have it installed.
|
||||||
|
|
||||||
|
1. Test if the changes introduced any issues by running `nix-env -qaP -f . --show-trace`. It should show the list of packages without errors.
|
||||||
|
1. Commit the changes. Explain again why the package was removed. If it was declared discontinued upstream, add a link to the source.
|
||||||
|
|
||||||
|
```ShellSession
|
||||||
|
$ git add pkgs/applications/misc/jbidwatcher/default.nix pkgs/top-level/all-packages.nix pkgs/top-level/aliases.nix
|
||||||
|
$ git commit
|
||||||
|
```
|
||||||
|
|
||||||
|
Example commit message:
|
||||||
|
|
||||||
|
```
|
||||||
|
jbidwatcher: remove
|
||||||
|
|
||||||
|
project was discontinued in march 2021. the program does not work anymore because ebay changed the login.
|
||||||
|
|
||||||
|
https://web.archive.org/web/20210315205723/http://www.jbidwatcher.com/
|
||||||
|
```
|
||||||
|
|
||||||
|
1. Push changes to your GitHub fork with `git push`
|
||||||
|
1. Create a pull request against Nixpkgs. Mention the package maintainer.
|
||||||
|
|
||||||
|
This is how the pull request looks like in this case: [https://github.com/NixOS/nixpkgs/pull/116470](https://github.com/NixOS/nixpkgs/pull/116470)
|
||||||
|
|
||||||
|
## Package tests
|
||||||
|
|
||||||
|
To run the main types of tests locally:
|
||||||
|
|
||||||
|
- Run package-internal tests with `nix-build --attr pkgs.PACKAGE.passthru.tests`
|
||||||
|
- Run [NixOS tests](https://nixos.org/manual/nixos/unstable/#sec-nixos-tests) with `nix-build --attr nixosTest.NAME`, where `NAME` is the name of the test listed in `nixos/tests/all-tests.nix`
|
||||||
|
- Run [global package tests](https://nixos.org/manual/nixpkgs/unstable/#sec-package-tests) with `nix-build --attr tests.PACKAGE`, where `PACKAGE` is the name of the test listed in `pkgs/test/default.nix`
|
||||||
|
- See `lib/tests/NAME.nix` for instructions on running specific library tests
|
||||||
|
|
||||||
|
Tests are important to ensure quality and make reviews and automatic updates easy.
|
||||||
|
|
||||||
|
The following types of tests exists:
|
||||||
|
|
||||||
|
* [NixOS **module tests**](https://nixos.org/manual/nixos/stable/#sec-nixos-tests), which spawn one or more NixOS VMs. They exercise both NixOS modules and the packaged programs used within them. For example, a NixOS module test can start a web server VM running the `nginx` module, and a client VM running `curl` or a graphical `firefox`, and test that they can talk to each other and display the correct content.
|
||||||
|
* Nix **package tests** are a lightweight alternative to NixOS module tests. They should be used to create simple integration tests for packages, but cannot test NixOS services, and some programs with graphical user interfaces may also be difficult to test with them.
|
||||||
|
* The **`checkPhase` of a package**, which should execute the unit tests that are included in the source code of a package.
|
||||||
|
|
||||||
|
Here in the nixpkgs manual we describe mostly _package tests_; for _module tests_ head over to the corresponding [section in the NixOS manual](https://nixos.org/manual/nixos/stable/#sec-nixos-tests).
|
||||||
|
|
||||||
|
### Writing inline package tests
|
||||||
|
|
||||||
|
For very simple tests, they can be written inline:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
{ …, yq-go }:
|
||||||
|
|
||||||
|
buildGoModule rec {
|
||||||
|
…
|
||||||
|
|
||||||
|
passthru.tests = {
|
||||||
|
simple = runCommand "${pname}-test" {} ''
|
||||||
|
echo "test: 1" | ${yq-go}/bin/yq eval -j > $out
|
||||||
|
[ "$(cat $out | tr -d $'\n ')" = '{"test":1}' ]
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Writing larger package tests
|
||||||
|
[larger-package-tests]: #writing-larger-package-tests
|
||||||
|
|
||||||
|
This is an example using the `phoronix-test-suite` package with the current best practices.
|
||||||
|
|
||||||
|
Add the tests in `passthru.tests` to the package definition like this:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
{ stdenv, lib, fetchurl, callPackage }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
…
|
||||||
|
|
||||||
|
passthru.tests = {
|
||||||
|
simple-execution = callPackage ./tests.nix { };
|
||||||
|
};
|
||||||
|
|
||||||
|
meta = { … };
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Create `tests.nix` in the package directory:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
{ runCommand, phoronix-test-suite }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (phoronix-test-suite) pname version;
|
||||||
|
in
|
||||||
|
|
||||||
|
runCommand "${pname}-tests" { meta.timeout = 60; }
|
||||||
|
''
|
||||||
|
# automatic initial setup to prevent interactive questions
|
||||||
|
${phoronix-test-suite}/bin/phoronix-test-suite enterprise-setup >/dev/null
|
||||||
|
# get version of installed program and compare with package version
|
||||||
|
if [[ `${phoronix-test-suite}/bin/phoronix-test-suite version` != *"${version}"* ]]; then
|
||||||
|
echo "Error: program version does not match package version"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
# run dummy command
|
||||||
|
${phoronix-test-suite}/bin/phoronix-test-suite dummy_module.dummy-command >/dev/null
|
||||||
|
# needed for Nix to register the command as successful
|
||||||
|
touch $out
|
||||||
|
''
|
||||||
|
```
|
||||||
|
|
||||||
|
### Running package tests
|
||||||
|
|
||||||
|
You can run these tests with:
|
||||||
|
|
||||||
|
```ShellSession
|
||||||
|
$ cd path/to/nixpkgs
|
||||||
|
$ nix-build -A phoronix-test-suite.tests
|
||||||
|
```
|
||||||
|
|
||||||
|
### Examples of package tests
|
||||||
|
|
||||||
|
Here are examples of package tests:
|
||||||
|
|
||||||
|
- [Jasmin compile test](development/compilers/jasmin/test-assemble-hello-world/default.nix)
|
||||||
|
- [Lobster compile test](development/compilers/lobster/test-can-run-hello-world.nix)
|
||||||
|
- [Spacy annotation test](development/python-modules/spacy/annotation-test/default.nix)
|
||||||
|
- [Libtorch test](development/libraries/science/math/libtorch/test/default.nix)
|
||||||
|
- [Multiple tests for nanopb](development/libraries/nanopb/default.nix)
|
||||||
|
|
||||||
|
### Linking NixOS module tests to a package
|
||||||
|
|
||||||
|
Like [package tests][larger-package-tests] as shown above, [NixOS module tests](https://nixos.org/manual/nixos/stable/#sec-nixos-tests) can also be linked to a package, so that the tests can be easily run when changing the related package.
|
||||||
|
|
||||||
|
For example, assuming we're packaging `nginx`, we can link its module test via `passthru.tests`:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
{ stdenv, lib, nixosTests }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
...
|
||||||
|
|
||||||
|
passthru.tests = {
|
||||||
|
nginx = nixosTests.nginx;
|
||||||
|
};
|
||||||
|
|
||||||
|
...
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Reviewing contributions
|
||||||
|
|
||||||
|
### Package updates
|
||||||
|
|
||||||
|
A package update is the most trivial and common type of pull request. These pull requests mainly consist of updating the version part of the package name and the source hash.
|
||||||
|
|
||||||
|
It can happen that non-trivial updates include patches or more complex changes.
|
||||||
|
|
||||||
|
Reviewing process:
|
||||||
|
|
||||||
|
- Ensure that the package versioning fits the guidelines.
|
||||||
|
- Ensure that the commit text fits the guidelines.
|
||||||
|
- Ensure that the package maintainers are notified.
|
||||||
|
- [CODEOWNERS](https://help.github.com/articles/about-codeowners) will make GitHub notify users based on the submitted changes, but it can happen that it misses some of the package maintainers.
|
||||||
|
- Ensure that the meta field information is correct.
|
||||||
|
- License can change with version updates, so it should be checked to match the upstream license.
|
||||||
|
- If the package has no maintainer, a maintainer must be set. This can be the update submitter or a community member that accepts to take maintainership of the package.
|
||||||
|
- Ensure that the code contains no typos.
|
||||||
|
- Building the package locally.
|
||||||
|
- pull requests are often targeted to the master or staging branch, and building the pull request locally when it is submitted can trigger many source builds.
|
||||||
|
- It is possible to rebase the changes on nixos-unstable or nixpkgs-unstable for easier review by running the following commands from a nixpkgs clone.
|
||||||
|
|
||||||
|
```ShellSession
|
||||||
|
$ git fetch origin nixos-unstable
|
||||||
|
$ git fetch origin pull/PRNUMBER/head
|
||||||
|
$ git rebase --onto nixos-unstable BASEBRANCH FETCH_HEAD
|
||||||
|
```
|
||||||
|
|
||||||
|
- The first command fetches the nixos-unstable branch.
|
||||||
|
- The second command fetches the pull request changes, `PRNUMBER` is the number at the end of the pull request title and `BASEBRANCH` the base branch of the pull request.
|
||||||
|
- The third command rebases the pull request changes to the nixos-unstable branch.
|
||||||
|
- The [nixpkgs-review](https://github.com/Mic92/nixpkgs-review) tool can be used to review a pull request content in a single command. `PRNUMBER` should be replaced by the number at the end of the pull request title. You can also provide the full github pull request url.
|
||||||
|
|
||||||
|
```ShellSession
|
||||||
|
$ nix-shell -p nixpkgs-review --run "nixpkgs-review pr PRNUMBER"
|
||||||
|
```
|
||||||
|
- Running every binary.
|
||||||
|
|
||||||
|
Sample template for a package update review is provided below.
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
##### Reviewed points
|
||||||
|
|
||||||
|
- [ ] package name fits guidelines
|
||||||
|
- [ ] package version fits guidelines
|
||||||
|
- [ ] package build on ARCHITECTURE
|
||||||
|
- [ ] executables tested on ARCHITECTURE
|
||||||
|
- [ ] all depending packages build
|
||||||
|
- [ ] patches have a comment describing either the upstream URL or a reason why the patch wasn't upstreamed
|
||||||
|
- [ ] patches that are remotely available are fetched rather than vendored
|
||||||
|
|
||||||
|
##### Possible improvements
|
||||||
|
|
||||||
|
##### Comments
|
||||||
|
```
|
||||||
|
|
||||||
|
### New packages
|
||||||
|
|
||||||
|
New packages are a common type of pull requests. These pull requests consists in adding a new nix-expression for a package.
|
||||||
|
|
||||||
|
Review process:
|
||||||
|
|
||||||
|
- Ensure that the package versioning fits the guidelines.
|
||||||
|
- Ensure that the commit name fits the guidelines.
|
||||||
|
- Ensure that the meta fields contain correct information.
|
||||||
|
- License must match the upstream license.
|
||||||
|
- Platforms should be set (or the package will not get binary substitutes).
|
||||||
|
- Maintainers must be set. This can be the package submitter or a community member that accepts taking up maintainership of the package.
|
||||||
|
- Report detected typos.
|
||||||
|
- Ensure the package source:
|
||||||
|
- Uses mirror URLs when available.
|
||||||
|
- Uses the most appropriate functions (e.g. packages from GitHub should use `fetchFromGitHub`).
|
||||||
|
- Building the package locally.
|
||||||
|
- Running every binary.
|
||||||
|
|
||||||
|
Sample template for a new package review is provided below.
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
##### Reviewed points
|
||||||
|
|
||||||
|
- [ ] package path fits guidelines
|
||||||
|
- [ ] package name fits guidelines
|
||||||
|
- [ ] package version fits guidelines
|
||||||
|
- [ ] package build on ARCHITECTURE
|
||||||
|
- [ ] executables tested on ARCHITECTURE
|
||||||
|
- [ ] `meta.description` is set and fits guidelines
|
||||||
|
- [ ] `meta.license` fits upstream license
|
||||||
|
- [ ] `meta.platforms` is set
|
||||||
|
- [ ] `meta.maintainers` is set
|
||||||
|
- [ ] build time only dependencies are declared in `nativeBuildInputs`
|
||||||
|
- [ ] source is fetched using the appropriate function
|
||||||
|
- [ ] the list of `phases` is not overridden
|
||||||
|
- [ ] when a phase (like `installPhase`) is overridden it starts with `runHook preInstall` and ends with `runHook postInstall`.
|
||||||
|
- [ ] patches have a comment describing either the upstream URL or a reason why the patch wasn't upstreamed
|
||||||
|
- [ ] patches that are remotely available are fetched rather than vendored
|
||||||
|
|
||||||
|
##### Possible improvements
|
||||||
|
|
||||||
|
##### Comments
|
||||||
|
```
|
||||||
|
|
||||||
|
## Security
|
||||||
|
|
||||||
|
### Submitting security fixes
|
||||||
|
[security-fixes]: #submitting-security-fixes
|
||||||
|
|
||||||
|
Security fixes are submitted in the same way as other changes and thus the same guidelines apply.
|
||||||
|
|
||||||
|
- If a new version fixing the vulnerability has been released, update the package;
|
||||||
|
- If the security fix comes in the form of a patch and a CVE is available, then add the patch to the Nixpkgs tree, and apply it to the package.
|
||||||
|
The name of the patch should be the CVE identifier, so e.g. `CVE-2019-13636.patch`; If a patch is fetched the name needs to be set as well, e.g.:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
(fetchpatch {
|
||||||
|
name = "CVE-2019-11068.patch";
|
||||||
|
url = "https://gitlab.gnome.org/GNOME/libxslt/commit/e03553605b45c88f0b4b2980adfbbb8f6fca2fd6.patch";
|
||||||
|
hash = "sha256-SEKe/8HcW0UBHCfPTTOnpRlzmV2nQPPeL6HOMxBZd14=";
|
||||||
|
})
|
||||||
|
```
|
||||||
|
|
||||||
|
If a security fix applies to both master and a stable release then, similar to regular changes, they are preferably delivered via master first and cherry-picked to the release branch.
|
||||||
|
|
||||||
|
Critical security fixes may by-pass the staging branches and be delivered directly to release branches such as `master` and `release-*`.
|
||||||
|
|
||||||
|
### Vulnerability Roundup
|
||||||
|
|
||||||
|
#### Issues
|
||||||
|
|
||||||
|
Vulnerable packages in Nixpkgs are managed using issues.
|
||||||
|
Currently opened ones can be found using the following:
|
||||||
|
|
||||||
|
[github.com/NixOS/nixpkgs/issues?q=is:issue+is:open+"Vulnerability+roundup"](https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+is%3Aopen+%22Vulnerability+roundup%22)
|
||||||
|
|
||||||
|
Each issue correspond to a vulnerable version of a package; As a consequence:
|
||||||
|
|
||||||
|
- One issue can contain several CVEs;
|
||||||
|
- One CVE can be shared across several issues;
|
||||||
|
- A single package can be concerned by several issues.
|
||||||
|
|
||||||
|
|
||||||
|
A "Vulnerability roundup" issue usually respects the following format:
|
||||||
|
|
||||||
|
```txt
|
||||||
|
<link to relevant package search on search.nix.gsc.io>, <link to relevant files in Nixpkgs on GitHub>
|
||||||
|
|
||||||
|
<list of related CVEs, their CVSS score, and the impacted NixOS version>
|
||||||
|
|
||||||
|
<list of the scanned Nixpkgs versions>
|
||||||
|
|
||||||
|
<list of relevant contributors>
|
||||||
|
```
|
||||||
|
|
||||||
|
Note that there can be an extra comment containing links to previously reported (and still open) issues for the same package.
|
||||||
|
|
||||||
|
|
||||||
|
#### Triaging and Fixing
|
||||||
|
|
||||||
|
**Note**: An issue can be a "false positive" (i.e. automatically opened, but without the package it refers to being actually vulnerable).
|
||||||
|
If you find such a "false positive", comment on the issue an explanation of why it falls into this category, linking as much information as the necessary to help maintainers double check.
|
||||||
|
|
||||||
|
If you are investigating a "true positive":
|
||||||
|
|
||||||
|
- Find the earliest patched version or a code patch in the CVE details;
|
||||||
|
- Is the issue already patched (version up-to-date or patch applied manually) in Nixpkgs's `master` branch?
|
||||||
|
- **No**:
|
||||||
|
- [Submit a security fix][security-fixes];
|
||||||
|
- Once the fix is merged into `master`, [submit the change to the vulnerable release branch(es)](../CONTRIBUTING.md#how-to-backport-pull-requests);
|
||||||
|
- **Yes**: [Backport the change to the vulnerable release branch(es)](../CONTRIBUTING.md#how-to-backport-pull-requests).
|
||||||
|
- When the patch has made it into all the relevant branches (`master`, and the vulnerable releases), close the relevant issue(s).
|
52
pkgs/applications/audio/gst123/default.nix
Normal file
52
pkgs/applications/audio/gst123/default.nix
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, fetchFromGitHub
|
||||||
|
, autoreconfHook
|
||||||
|
, pkg-config
|
||||||
|
, wrapGAppsHook
|
||||||
|
, gst_all_1
|
||||||
|
, gtk3
|
||||||
|
, ncurses
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
|
pname = "gst123";
|
||||||
|
version = "0.4.1";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "swesterfeld";
|
||||||
|
repo = "gst123";
|
||||||
|
rev = finalAttrs.version;
|
||||||
|
hash = "sha256-7qS7JJ7EY1uFGX3FxBxgH6LzK4XUoTPHR0QVwUWRz+g=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
autoreconfHook
|
||||||
|
pkg-config
|
||||||
|
wrapGAppsHook
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
gtk3
|
||||||
|
ncurses
|
||||||
|
] ++ (with gst_all_1; [
|
||||||
|
gstreamer
|
||||||
|
gst-plugins-base
|
||||||
|
gst-plugins-good
|
||||||
|
gst-plugins-bad
|
||||||
|
gst-plugins-ugly
|
||||||
|
gst-libav
|
||||||
|
]);
|
||||||
|
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
broken = stdenv.isDarwin;
|
||||||
|
description = "GStreamer based command line media player";
|
||||||
|
homepage = "https://space.twc.de/~stefan/gst123.php";
|
||||||
|
license = lib.licenses.lgpl2Plus;
|
||||||
|
mainProgram = "gst123";
|
||||||
|
maintainers = with lib.maintainers; [ swesterfeld ];
|
||||||
|
inherit (ncurses.meta) platforms;
|
||||||
|
};
|
||||||
|
})
|
|
@ -5,23 +5,34 @@
|
||||||
, unstableGitUpdater
|
, unstableGitUpdater
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "uxn";
|
pname = "uxn";
|
||||||
version = "unstable-2023-07-30";
|
version = "unstable-2023-08-10";
|
||||||
|
|
||||||
src = fetchFromSourcehut {
|
src = fetchFromSourcehut {
|
||||||
owner = "~rabbits";
|
owner = "~rabbits";
|
||||||
repo = "uxn";
|
repo = "uxn";
|
||||||
rev = "9ca8e9623d0ab1c299f08d3dd9d54098557f5749";
|
rev = "a394dcb999525ac56ea37d0563d35849964b6d6a";
|
||||||
hash = "sha256-K51YiLnBwFWgD3h3l2BhsvzhnHHolZPsjjUWJSe4sPQ=";
|
hash = "sha256-3Q8460pkoATKCEqfa+OfpQ4Lp18Ro5i84s88pkz+uzU=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
outputs = [ "out" "projects" ];
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
SDL2
|
||||||
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
SDL2
|
SDL2
|
||||||
];
|
];
|
||||||
|
|
||||||
|
strictDeps = true;
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
sed -i -e 's|UXNEMU_LDFLAGS="$(brew.*$|UXNEMU_LDFLAGS="$(sdl2-config --cflags --libs)"|' build.sh
|
patchShebangs build.sh
|
||||||
|
substituteInPlace build.sh \
|
||||||
|
--replace "-L/usr/local/lib " "" \
|
||||||
|
--replace "\$(brew --prefix)/lib/libSDL2.a " ""
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
|
@ -32,13 +43,15 @@ stdenv.mkDerivation {
|
||||||
runHook postBuild
|
runHook postBuild
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# ./build.sh --install is meant to install in $HOME, therefore not useful for
|
||||||
|
# package maintainers
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
|
|
||||||
install -d $out/bin/ $out/share/uxn/
|
install -d $out/bin/
|
||||||
|
|
||||||
cp bin/uxnasm bin/uxncli bin/uxnemu $out/bin/
|
cp bin/uxnasm bin/uxncli bin/uxnemu $out/bin/
|
||||||
cp -r projects $out/share/uxn/
|
install -d $projects/share/uxn/
|
||||||
|
cp -r projects $projects/share/uxn/
|
||||||
|
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
@ -49,7 +62,12 @@ stdenv.mkDerivation {
|
||||||
homepage = "https://wiki.xxiivv.com/site/uxn.html";
|
homepage = "https://wiki.xxiivv.com/site/uxn.html";
|
||||||
description = "An assembler and emulator for the Uxn stack machine";
|
description = "An assembler and emulator for the Uxn stack machine";
|
||||||
license = lib.licenses.mit;
|
license = lib.licenses.mit;
|
||||||
maintainers = with lib.maintainers; [ AndersonTorres kototama ];
|
maintainers = with lib.maintainers; [ AndersonTorres ];
|
||||||
|
mainProgram = "uxnemu";
|
||||||
inherit (SDL2.meta) platforms;
|
inherit (SDL2.meta) platforms;
|
||||||
|
# ofborg complains about an error trying to link inexistent SDL2 library
|
||||||
|
# For full logs, run:
|
||||||
|
# 'nix log /nix/store/bmyhh0lpifl9swvkpflqldv43vcrgci1-uxn-unstable-2023-08-10.drv'.
|
||||||
|
broken = stdenv.isDarwin;
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
# Generated by ./update.sh - do not update manually!
|
# Generated by ./update.sh - do not update manually!
|
||||||
# Last updated: 2023-08-02
|
# Last updated: 2023-08-14
|
||||||
{
|
{
|
||||||
compatList = {
|
compatList = {
|
||||||
rev = "95617e06f8f19e3dcd76b694d6ba87408011cd4d";
|
rev = "fbecbb568ce45c2d118a76ff41f9e817a8b899e6";
|
||||||
hash = "sha256:1hdsza3wf9a0yvj6h55gsl7xqvhafvbz1i8paz9kg7l49b0gnlh1";
|
hash = "sha256:1hdsza3wf9a0yvj6h55gsl7xqvhafvbz1i8paz9kg7l49b0gnlh1";
|
||||||
};
|
};
|
||||||
|
|
||||||
mainline = {
|
mainline = {
|
||||||
version = "1515";
|
version = "1522";
|
||||||
hash = "sha256:0w9kg2rq43x9khws2yx6p7qad4xw6vkd04adiw021hjv1scajrlm";
|
hash = "sha256:15ka5lg9mdfgwngmsjm3dk74c64hxak2zkf36jdgqcjlwxdx81qk";
|
||||||
};
|
};
|
||||||
|
|
||||||
ea = {
|
ea = {
|
||||||
version = "3788";
|
version = "3805";
|
||||||
distHash = "sha256:0w8jm51b2fwfbr5rmqdagjkay4kams2g12qqkqla6n696zn302jx";
|
distHash = "sha256:1hxq4aifnncilnxmymgbz73m558y8v5f72cpgdfaqr450vlc5sks";
|
||||||
fullHash = "sha256:1fdv7645ijnl58749f4qa5ni7bag4chmm1c8gvji5408grfp0ldq";
|
fullHash = "sha256:1psivknzv1kycpnl81g0b9d9ck70lxddkn1gaimic37a7kxpg395";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,6 +52,7 @@ buildGoModule rec {
|
||||||
homepage = "https://github.com/TomWright/dasel";
|
homepage = "https://github.com/TomWright/dasel";
|
||||||
changelog = "https://github.com/TomWright/dasel/blob/v${version}/CHANGELOG.md";
|
changelog = "https://github.com/TomWright/dasel/blob/v${version}/CHANGELOG.md";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
|
mainProgram = "dasel";
|
||||||
maintainers = with maintainers; [ _0x4A6F ];
|
maintainers = with maintainers; [ _0x4A6F ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,14 +6,14 @@
|
||||||
|
|
||||||
python3.pkgs.buildPythonApplication rec {
|
python3.pkgs.buildPythonApplication rec {
|
||||||
pname = "dbx";
|
pname = "dbx";
|
||||||
version = "0.8.11";
|
version = "0.8.18";
|
||||||
format = "setuptools";
|
format = "setuptools";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "databrickslabs";
|
owner = "databrickslabs";
|
||||||
repo = "dbx";
|
repo = "dbx";
|
||||||
rev = "refs/tags/v${version}";
|
rev = "refs/tags/v${version}";
|
||||||
hash = "sha256-dArR1z3wkGDd3Y1WHK0sLjhuaKHAcsx6cCH2rgVdUGs=";
|
hash = "sha256-5qjEABNTSUD9I2uAn49HQ4n+gbAcmfnqS4Z2M9MvFXQ=";
|
||||||
};
|
};
|
||||||
|
|
||||||
pythonRelaxDeps = [
|
pythonRelaxDeps = [
|
||||||
|
|
|
@ -8,10 +8,10 @@ buildGoModule rec {
|
||||||
owner = "GeertJohan";
|
owner = "GeertJohan";
|
||||||
repo = "gomatrix";
|
repo = "gomatrix";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1wq55rvpyz0gjn8kiwwj49awsmi86zy1fdjcphzgb7883xalgr2m";
|
hash = "sha256-VeRHVR8InfU+vEw2F/w3KFbNVSKS8ziRlQ98f3cuBfM=";
|
||||||
};
|
};
|
||||||
|
|
||||||
vendorSha256 = "1yw0gph4zfg8w4343882l6b9lggwyak2zz8ic1l1m2m44p3aq169";
|
vendorHash = "sha256-yQSsxiWkihpoYBH9L6by/D2alqECoUEG4ei5T+B9gPs=";
|
||||||
|
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
|
|
|
@ -6,16 +6,16 @@
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
pname = "hyprdim";
|
pname = "hyprdim";
|
||||||
version = "2.1.0";
|
version = "2.2.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "donovanglover";
|
owner = "donovanglover";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = version;
|
rev = version;
|
||||||
hash = "sha256-EJ+3rmfRJOt9xiuWlR5IBoEzChwp35CUum25lYnFY14=";
|
hash = "sha256-6HeVLgEJDPy4cWL5td3Xl7+a6WUFZWUFynvBzPhItcg=";
|
||||||
};
|
};
|
||||||
|
|
||||||
cargoHash = "sha256-Pd7dM+PPI0mwxbdfTu+gZ0tScZDGa2vGqEwuj8gW1Sk=";
|
cargoHash = "sha256-qYX5o64X8PsFcTYuZ82lIShyUN69oTzQIHrQH4B7iIw=";
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
installShellFiles
|
installShellFiles
|
||||||
|
|
|
@ -1,28 +1,42 @@
|
||||||
{ lib, python3Packages, fetchPypi, xvfb-run }:
|
{ lib, python3Packages, fetchFromGitHub, xvfb-run, xdotool, dmenu }:
|
||||||
|
|
||||||
python3Packages.buildPythonApplication rec {
|
python3Packages.buildPythonApplication rec {
|
||||||
pname = "keepmenu";
|
pname = "keepmenu";
|
||||||
version = "1.3.1";
|
version = "1.4.0";
|
||||||
|
format = "pyproject";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchFromGitHub {
|
||||||
inherit pname version;
|
owner = "firecat53";
|
||||||
hash = "sha256-AGuJY7IirzIjcu/nY9CzeOqU1liwcRijYLi8hGN/pRg=";
|
repo = "keepmenu";
|
||||||
|
rev = version;
|
||||||
|
hash = "sha256-3vFg+9Nw+NhuPJbrmBahXwa13wXlBg5IMYwJ+unn88k=";
|
||||||
};
|
};
|
||||||
|
|
||||||
preConfigure = ''
|
nativeBuildInputs = with python3Packages; [
|
||||||
export HOME=$TMPDIR
|
hatchling
|
||||||
mkdir -p $HOME/.config/keepmenu
|
hatch-vcs
|
||||||
cp config.ini.example $HOME/.config/keepmenu/config.ini
|
];
|
||||||
'';
|
|
||||||
|
env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
||||||
|
|
||||||
propagatedBuildInputs = with python3Packages; [
|
propagatedBuildInputs = with python3Packages; [
|
||||||
pykeepass
|
pykeepass
|
||||||
pynput
|
pynput
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeCheckInputs = [ xvfb-run ];
|
nativeCheckInputs = [ xvfb-run xdotool dmenu ];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace tests/keepmenu-config.ini tests/tests.py \
|
||||||
|
--replace "/usr/bin/dmenu" "dmenu"
|
||||||
|
'';
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
xvfb-run python setup.py test
|
runHook preCheck
|
||||||
|
|
||||||
|
xvfb-run python tests/tests.py
|
||||||
|
|
||||||
|
runHook postCheck
|
||||||
'';
|
'';
|
||||||
|
|
||||||
pythonImportsCheck = [ "keepmenu" ];
|
pythonImportsCheck = [ "keepmenu" ];
|
||||||
|
@ -32,5 +46,6 @@ python3Packages.buildPythonApplication rec {
|
||||||
description = "Dmenu/Rofi frontend for Keepass databases";
|
description = "Dmenu/Rofi frontend for Keepass databases";
|
||||||
license = licenses.gpl3Only;
|
license = licenses.gpl3Only;
|
||||||
maintainers = with maintainers; [ elliot ];
|
maintainers = with maintainers; [ elliot ];
|
||||||
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,23 +17,23 @@
|
||||||
, util-linux
|
, util-linux
|
||||||
, xwininfo
|
, xwininfo
|
||||||
, zenity
|
, zenity
|
||||||
, zig_0_10
|
, zig_0_11
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "mepo";
|
pname = "mepo";
|
||||||
version = "1.1.2";
|
version = "1.2.0";
|
||||||
|
|
||||||
src = fetchFromSourcehut {
|
src = fetchFromSourcehut {
|
||||||
owner = "~mil";
|
owner = "~mil";
|
||||||
repo = "mepo";
|
repo = "mepo";
|
||||||
rev = finalAttrs.version;
|
rev = finalAttrs.version;
|
||||||
hash = "sha256-rKIyhr0sxG1moFsapylJWoAoHi9FSRdugIHr/TqY71s=";
|
hash = "sha256-sxN7yTnk3KDAkP/d3miKa2bEgB3AUaf9/M9ajJyRt3g=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
pkg-config
|
pkg-config
|
||||||
zig_0_10.hook
|
zig_0_11.hook
|
||||||
makeWrapper
|
makeWrapper
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -2,16 +2,16 @@
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "eks-node-viewer";
|
pname = "eks-node-viewer";
|
||||||
version = "0.4.2";
|
version = "0.4.3";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "awslabs";
|
owner = "awslabs";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-zuez0ELtlphMHP/Pxu5ARnYhkmLJW/ehNrTLXSGmGL8=";
|
sha256 = "sha256-570wOLUtKKzDDLLDrAOPAnAUpZeAqrwKsQWoHCBjKKk=";
|
||||||
};
|
};
|
||||||
|
|
||||||
vendorHash = "sha256-n2H6hiKZqujrJyojO2uQTIMLMHaX//t7328GPK6hxH0=";
|
vendorHash = "sha256-kRRUaA/psQDmcM1ZhzdZE3eyw8DWZpesJVA2zVfORGk=";
|
||||||
|
|
||||||
ldflags = [
|
ldflags = [
|
||||||
"-s"
|
"-s"
|
||||||
|
|
|
@ -92,7 +92,7 @@ let
|
||||||
}
|
}
|
||||||
).python;
|
).python;
|
||||||
|
|
||||||
pkg = interpreter.pkgs.nixops.withPlugins(ps: [
|
pkg = (interpreter.pkgs.nixops.withPlugins(ps: [
|
||||||
ps.nixops-aws
|
ps.nixops-aws
|
||||||
ps.nixops-digitalocean
|
ps.nixops-digitalocean
|
||||||
ps.nixops-encrypted-links
|
ps.nixops-encrypted-links
|
||||||
|
@ -102,11 +102,10 @@ let
|
||||||
ps.nixopsvbox
|
ps.nixopsvbox
|
||||||
ps.nixops-virtd
|
ps.nixops-virtd
|
||||||
ps.nixops-hetznercloud
|
ps.nixops-hetznercloud
|
||||||
]) // rec {
|
])).overrideAttrs (finalAttrs: prevAttrs: {
|
||||||
# Workaround for https://github.com/NixOS/nixpkgs/issues/119407
|
passthru = prevAttrs.passthru or {} // {
|
||||||
# TODO after #1199407: Use .overrideAttrs(pkg: old: { passthru.tests = .....; })
|
tests = prevAttrs.passthru.tests or {} //
|
||||||
tests = nixosTests.nixops.unstable.override { nixopsPkg = pkg; };
|
nixosTests.nixops.unstable.passthru.override { nixopsPkg = pkg; };
|
||||||
# Not strictly necessary, but probably expected somewhere; part of the workaround:
|
};
|
||||||
passthru.tests = tests;
|
});
|
||||||
};
|
|
||||||
in pkg
|
in pkg
|
||||||
|
|
|
@ -15,8 +15,8 @@ self: super: {
|
||||||
_: {
|
_: {
|
||||||
src = pkgs.fetchgit {
|
src = pkgs.fetchgit {
|
||||||
url = "https://github.com/NixOS/nixops-aws.git";
|
url = "https://github.com/NixOS/nixops-aws.git";
|
||||||
rev = "012c94fc128b1cf2497aa5f2bc8fbffd0b52b464";
|
rev = "8802d1cda9004ec1362815292c2a8ab95e6d64e8";
|
||||||
sha256 = "04lamaszl3llhbpsybi9scd7yrqc51x1h5z38b2w20ik9gv9lgrz";
|
sha256 = "1rf2dxn4gdm9a91jji4f100y62ap3p3svs6qhxf78319phba6hlb";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
228
pkgs/applications/networking/cluster/nixops/poetry.lock
generated
228
pkgs/applications/networking/cluster/nixops/poetry.lock
generated
|
@ -1,10 +1,9 @@
|
||||||
# This file is automatically @generated by Poetry and should not be changed by hand.
|
# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand.
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "apache-libcloud"
|
name = "apache-libcloud"
|
||||||
version = "3.7.0"
|
version = "3.7.0"
|
||||||
description = "A standard Python library that abstracts away differences among multiple cloud provider APIs. For more information and documentation, please see https://libcloud.apache.org"
|
description = "A standard Python library that abstracts away differences among multiple cloud provider APIs. For more information and documentation, please see https://libcloud.apache.org"
|
||||||
category = "main"
|
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=3.6, <4"
|
python-versions = ">=3.6, <4"
|
||||||
files = [
|
files = [
|
||||||
|
@ -19,7 +18,6 @@ requests = ">=2.26.0"
|
||||||
name = "boto"
|
name = "boto"
|
||||||
version = "2.49.0"
|
version = "2.49.0"
|
||||||
description = "Amazon Web Services Library"
|
description = "Amazon Web Services Library"
|
||||||
category = "main"
|
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = "*"
|
python-versions = "*"
|
||||||
files = [
|
files = [
|
||||||
|
@ -29,18 +27,17 @@ files = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "boto3"
|
name = "boto3"
|
||||||
version = "1.26.141"
|
version = "1.28.22"
|
||||||
description = "The AWS SDK for Python"
|
description = "The AWS SDK for Python"
|
||||||
category = "main"
|
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">= 3.7"
|
python-versions = ">= 3.7"
|
||||||
files = [
|
files = [
|
||||||
{file = "boto3-1.26.141-py3-none-any.whl", hash = "sha256:a5d6fdcaec863bc7ad2f8133ff9a926d6f06468b83b5fb631cd90bd33b709c45"},
|
{file = "boto3-1.28.22-py3-none-any.whl", hash = "sha256:0c1c1d19232018ac49fd2c0a94aa0b802f5d222e89448ff50734626bce454b32"},
|
||||||
{file = "boto3-1.26.141.tar.gz", hash = "sha256:152def2fcc9854dcc42383d2b53e2ed2c9ccb5ff6cc0f3ada20f1ab54418ede4"},
|
{file = "boto3-1.28.22.tar.gz", hash = "sha256:af1ce129f462cdc8dfb1a1c559d7ed725e51344fb0ae4a56d9453196bf416555"},
|
||||||
]
|
]
|
||||||
|
|
||||||
[package.dependencies]
|
[package.dependencies]
|
||||||
botocore = ">=1.29.141,<1.30.0"
|
botocore = ">=1.31.22,<1.32.0"
|
||||||
jmespath = ">=0.7.1,<2.0.0"
|
jmespath = ">=0.7.1,<2.0.0"
|
||||||
s3transfer = ">=0.6.0,<0.7.0"
|
s3transfer = ">=0.6.0,<0.7.0"
|
||||||
|
|
||||||
|
@ -49,14 +46,13 @@ crt = ["botocore[crt] (>=1.21.0,<2.0a0)"]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "botocore"
|
name = "botocore"
|
||||||
version = "1.29.141"
|
version = "1.31.22"
|
||||||
description = "Low-level, data-driven core of boto 3."
|
description = "Low-level, data-driven core of boto 3."
|
||||||
category = "main"
|
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">= 3.7"
|
python-versions = ">= 3.7"
|
||||||
files = [
|
files = [
|
||||||
{file = "botocore-1.29.141-py3-none-any.whl", hash = "sha256:b01d156c42765f3f437959e01a8c7f3cb0e29b24aa0b8f373498133408b2e3c7"},
|
{file = "botocore-1.31.22-py3-none-any.whl", hash = "sha256:b91025ca1a16b13ae662bdb46e7c16d2c53619df23bf3583a43791519da14870"},
|
||||||
{file = "botocore-1.29.141.tar.gz", hash = "sha256:e86e1633f98838317b9e1b5c874c4d85339b77f6b7e55c2a4d83913f6166f9ad"},
|
{file = "botocore-1.31.22.tar.gz", hash = "sha256:d193ab0742ddc4af3a3994af4ec993acf5ac75460f298880fe869765e7bc578d"},
|
||||||
]
|
]
|
||||||
|
|
||||||
[package.dependencies]
|
[package.dependencies]
|
||||||
|
@ -65,25 +61,23 @@ python-dateutil = ">=2.1,<3.0.0"
|
||||||
urllib3 = ">=1.25.4,<1.27"
|
urllib3 = ">=1.25.4,<1.27"
|
||||||
|
|
||||||
[package.extras]
|
[package.extras]
|
||||||
crt = ["awscrt (==0.16.9)"]
|
crt = ["awscrt (==0.16.26)"]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "certifi"
|
name = "certifi"
|
||||||
version = "2023.5.7"
|
version = "2023.7.22"
|
||||||
description = "Python package for providing Mozilla's CA Bundle."
|
description = "Python package for providing Mozilla's CA Bundle."
|
||||||
category = "main"
|
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=3.6"
|
python-versions = ">=3.6"
|
||||||
files = [
|
files = [
|
||||||
{file = "certifi-2023.5.7-py3-none-any.whl", hash = "sha256:c6c2e98f5c7869efca1f8916fed228dd91539f9f1b444c314c06eef02980c716"},
|
{file = "certifi-2023.7.22-py3-none-any.whl", hash = "sha256:92d6037539857d8206b8f6ae472e8b77db8058fec5937a1ef3f54304089edbb9"},
|
||||||
{file = "certifi-2023.5.7.tar.gz", hash = "sha256:0f0d56dc5a6ad56fd4ba36484d6cc34451e1c6548c61daad8c320169f91eddc7"},
|
{file = "certifi-2023.7.22.tar.gz", hash = "sha256:539cc1d13202e33ca466e88b2807e29f4c13049d6d87031a3c110744495cb082"},
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cffi"
|
name = "cffi"
|
||||||
version = "1.15.1"
|
version = "1.15.1"
|
||||||
description = "Foreign Function Interface for Python calling C code."
|
description = "Foreign Function Interface for Python calling C code."
|
||||||
category = "main"
|
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = "*"
|
python-versions = "*"
|
||||||
files = [
|
files = [
|
||||||
|
@ -158,94 +152,92 @@ pycparser = "*"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "charset-normalizer"
|
name = "charset-normalizer"
|
||||||
version = "3.1.0"
|
version = "3.2.0"
|
||||||
description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet."
|
description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet."
|
||||||
category = "main"
|
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=3.7.0"
|
python-versions = ">=3.7.0"
|
||||||
files = [
|
files = [
|
||||||
{file = "charset-normalizer-3.1.0.tar.gz", hash = "sha256:34e0a2f9c370eb95597aae63bf85eb5e96826d81e3dcf88b8886012906f509b5"},
|
{file = "charset-normalizer-3.2.0.tar.gz", hash = "sha256:3bb3d25a8e6c0aedd251753a79ae98a093c7e7b471faa3aa9a93a81431987ace"},
|
||||||
{file = "charset_normalizer-3.1.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:e0ac8959c929593fee38da1c2b64ee9778733cdf03c482c9ff1d508b6b593b2b"},
|
{file = "charset_normalizer-3.2.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:0b87549028f680ca955556e3bd57013ab47474c3124dc069faa0b6545b6c9710"},
|
||||||
{file = "charset_normalizer-3.1.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d7fc3fca01da18fbabe4625d64bb612b533533ed10045a2ac3dd194bfa656b60"},
|
{file = "charset_normalizer-3.2.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7c70087bfee18a42b4040bb9ec1ca15a08242cf5867c58726530bdf3945672ed"},
|
||||||
{file = "charset_normalizer-3.1.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:04eefcee095f58eaabe6dc3cc2262f3bcd776d2c67005880894f447b3f2cb9c1"},
|
{file = "charset_normalizer-3.2.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a103b3a7069b62f5d4890ae1b8f0597618f628b286b03d4bc9195230b154bfa9"},
|
||||||
{file = "charset_normalizer-3.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:20064ead0717cf9a73a6d1e779b23d149b53daf971169289ed2ed43a71e8d3b0"},
|
{file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:94aea8eff76ee6d1cdacb07dd2123a68283cb5569e0250feab1240058f53b623"},
|
||||||
{file = "charset_normalizer-3.1.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1435ae15108b1cb6fffbcea2af3d468683b7afed0169ad718451f8db5d1aff6f"},
|
{file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:db901e2ac34c931d73054d9797383d0f8009991e723dab15109740a63e7f902a"},
|
||||||
{file = "charset_normalizer-3.1.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c84132a54c750fda57729d1e2599bb598f5fa0344085dbde5003ba429a4798c0"},
|
{file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b0dac0ff919ba34d4df1b6131f59ce95b08b9065233446be7e459f95554c0dc8"},
|
||||||
{file = "charset_normalizer-3.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:75f2568b4189dda1c567339b48cba4ac7384accb9c2a7ed655cd86b04055c795"},
|
{file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:193cbc708ea3aca45e7221ae58f0fd63f933753a9bfb498a3b474878f12caaad"},
|
||||||
{file = "charset_normalizer-3.1.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:11d3bcb7be35e7b1bba2c23beedac81ee893ac9871d0ba79effc7fc01167db6c"},
|
{file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:09393e1b2a9461950b1c9a45d5fd251dc7c6f228acab64da1c9c0165d9c7765c"},
|
||||||
{file = "charset_normalizer-3.1.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:891cf9b48776b5c61c700b55a598621fdb7b1e301a550365571e9624f270c203"},
|
{file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:baacc6aee0b2ef6f3d308e197b5d7a81c0e70b06beae1f1fcacffdbd124fe0e3"},
|
||||||
{file = "charset_normalizer-3.1.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:5f008525e02908b20e04707a4f704cd286d94718f48bb33edddc7d7b584dddc1"},
|
{file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:bf420121d4c8dce6b889f0e8e4ec0ca34b7f40186203f06a946fa0276ba54029"},
|
||||||
{file = "charset_normalizer-3.1.0-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:b06f0d3bf045158d2fb8837c5785fe9ff9b8c93358be64461a1089f5da983137"},
|
{file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:c04a46716adde8d927adb9457bbe39cf473e1e2c2f5d0a16ceb837e5d841ad4f"},
|
||||||
{file = "charset_normalizer-3.1.0-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:49919f8400b5e49e961f320c735388ee686a62327e773fa5b3ce6721f7e785ce"},
|
{file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:aaf63899c94de41fe3cf934601b0f7ccb6b428c6e4eeb80da72c58eab077b19a"},
|
||||||
{file = "charset_normalizer-3.1.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:22908891a380d50738e1f978667536f6c6b526a2064156203d418f4856d6e86a"},
|
{file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:d62e51710986674142526ab9f78663ca2b0726066ae26b78b22e0f5e571238dd"},
|
||||||
{file = "charset_normalizer-3.1.0-cp310-cp310-win32.whl", hash = "sha256:12d1a39aa6b8c6f6248bb54550efcc1c38ce0d8096a146638fd4738e42284448"},
|
{file = "charset_normalizer-3.2.0-cp310-cp310-win32.whl", hash = "sha256:04e57ab9fbf9607b77f7d057974694b4f6b142da9ed4a199859d9d4d5c63fe96"},
|
||||||
{file = "charset_normalizer-3.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:65ed923f84a6844de5fd29726b888e58c62820e0769b76565480e1fdc3d062f8"},
|
{file = "charset_normalizer-3.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:48021783bdf96e3d6de03a6e39a1171ed5bd7e8bb93fc84cc649d11490f87cea"},
|
||||||
{file = "charset_normalizer-3.1.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:9a3267620866c9d17b959a84dd0bd2d45719b817245e49371ead79ed4f710d19"},
|
{file = "charset_normalizer-3.2.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:4957669ef390f0e6719db3613ab3a7631e68424604a7b448f079bee145da6e09"},
|
||||||
{file = "charset_normalizer-3.1.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6734e606355834f13445b6adc38b53c0fd45f1a56a9ba06c2058f86893ae8017"},
|
{file = "charset_normalizer-3.2.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:46fb8c61d794b78ec7134a715a3e564aafc8f6b5e338417cb19fe9f57a5a9bf2"},
|
||||||
{file = "charset_normalizer-3.1.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f8303414c7b03f794347ad062c0516cee0e15f7a612abd0ce1e25caf6ceb47df"},
|
{file = "charset_normalizer-3.2.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f779d3ad205f108d14e99bb3859aa7dd8e9c68874617c72354d7ecaec2a054ac"},
|
||||||
{file = "charset_normalizer-3.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aaf53a6cebad0eae578f062c7d462155eada9c172bd8c4d250b8c1d8eb7f916a"},
|
{file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f25c229a6ba38a35ae6e25ca1264621cc25d4d38dca2942a7fce0b67a4efe918"},
|
||||||
{file = "charset_normalizer-3.1.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3dc5b6a8ecfdc5748a7e429782598e4f17ef378e3e272eeb1340ea57c9109f41"},
|
{file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2efb1bd13885392adfda4614c33d3b68dee4921fd0ac1d3988f8cbb7d589e72a"},
|
||||||
{file = "charset_normalizer-3.1.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e1b25e3ad6c909f398df8921780d6a3d120d8c09466720226fc621605b6f92b1"},
|
{file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1f30b48dd7fa1474554b0b0f3fdfdd4c13b5c737a3c6284d3cdc424ec0ffff3a"},
|
||||||
{file = "charset_normalizer-3.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0ca564606d2caafb0abe6d1b5311c2649e8071eb241b2d64e75a0d0065107e62"},
|
{file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:246de67b99b6851627d945db38147d1b209a899311b1305dd84916f2b88526c6"},
|
||||||
{file = "charset_normalizer-3.1.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b82fab78e0b1329e183a65260581de4375f619167478dddab510c6c6fb04d9b6"},
|
{file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9bd9b3b31adcb054116447ea22caa61a285d92e94d710aa5ec97992ff5eb7cf3"},
|
||||||
{file = "charset_normalizer-3.1.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:bd7163182133c0c7701b25e604cf1611c0d87712e56e88e7ee5d72deab3e76b5"},
|
{file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:8c2f5e83493748286002f9369f3e6607c565a6a90425a3a1fef5ae32a36d749d"},
|
||||||
{file = "charset_normalizer-3.1.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:11d117e6c63e8f495412d37e7dc2e2fff09c34b2d09dbe2bee3c6229577818be"},
|
{file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:3170c9399da12c9dc66366e9d14da8bf7147e1e9d9ea566067bbce7bb74bd9c2"},
|
||||||
{file = "charset_normalizer-3.1.0-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:cf6511efa4801b9b38dc5546d7547d5b5c6ef4b081c60b23e4d941d0eba9cbeb"},
|
{file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:7a4826ad2bd6b07ca615c74ab91f32f6c96d08f6fcc3902ceeedaec8cdc3bcd6"},
|
||||||
{file = "charset_normalizer-3.1.0-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:abc1185d79f47c0a7aaf7e2412a0eb2c03b724581139193d2d82b3ad8cbb00ac"},
|
{file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:3b1613dd5aee995ec6d4c69f00378bbd07614702a315a2cf6c1d21461fe17c23"},
|
||||||
{file = "charset_normalizer-3.1.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:cb7b2ab0188829593b9de646545175547a70d9a6e2b63bf2cd87a0a391599324"},
|
{file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:9e608aafdb55eb9f255034709e20d5a83b6d60c054df0802fa9c9883d0a937aa"},
|
||||||
{file = "charset_normalizer-3.1.0-cp311-cp311-win32.whl", hash = "sha256:c36bcbc0d5174a80d6cccf43a0ecaca44e81d25be4b7f90f0ed7bcfbb5a00909"},
|
{file = "charset_normalizer-3.2.0-cp311-cp311-win32.whl", hash = "sha256:f2a1d0fd4242bd8643ce6f98927cf9c04540af6efa92323e9d3124f57727bfc1"},
|
||||||
{file = "charset_normalizer-3.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:cca4def576f47a09a943666b8f829606bcb17e2bc2d5911a46c8f8da45f56755"},
|
{file = "charset_normalizer-3.2.0-cp311-cp311-win_amd64.whl", hash = "sha256:681eb3d7e02e3c3655d1b16059fbfb605ac464c834a0c629048a30fad2b27489"},
|
||||||
{file = "charset_normalizer-3.1.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0c95f12b74681e9ae127728f7e5409cbbef9cd914d5896ef238cc779b8152373"},
|
{file = "charset_normalizer-3.2.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c57921cda3a80d0f2b8aec7e25c8aa14479ea92b5b51b6876d975d925a2ea346"},
|
||||||
{file = "charset_normalizer-3.1.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fca62a8301b605b954ad2e9c3666f9d97f63872aa4efcae5492baca2056b74ab"},
|
{file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:41b25eaa7d15909cf3ac4c96088c1f266a9a93ec44f87f1d13d4a0e86c81b982"},
|
||||||
{file = "charset_normalizer-3.1.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ac0aa6cd53ab9a31d397f8303f92c42f534693528fafbdb997c82bae6e477ad9"},
|
{file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f058f6963fd82eb143c692cecdc89e075fa0828db2e5b291070485390b2f1c9c"},
|
||||||
{file = "charset_normalizer-3.1.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c3af8e0f07399d3176b179f2e2634c3ce9c1301379a6b8c9c9aeecd481da494f"},
|
{file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a7647ebdfb9682b7bb97e2a5e7cb6ae735b1c25008a70b906aecca294ee96cf4"},
|
||||||
{file = "charset_normalizer-3.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3a5fc78f9e3f501a1614a98f7c54d3969f3ad9bba8ba3d9b438c3bc5d047dd28"},
|
{file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eef9df1eefada2c09a5e7a40991b9fc6ac6ef20b1372abd48d2794a316dc0449"},
|
||||||
{file = "charset_normalizer-3.1.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:628c985afb2c7d27a4800bfb609e03985aaecb42f955049957814e0491d4006d"},
|
{file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e03b8895a6990c9ab2cdcd0f2fe44088ca1c65ae592b8f795c3294af00a461c3"},
|
||||||
{file = "charset_normalizer-3.1.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:74db0052d985cf37fa111828d0dd230776ac99c740e1a758ad99094be4f1803d"},
|
{file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:ee4006268ed33370957f55bf2e6f4d263eaf4dc3cfc473d1d90baff6ed36ce4a"},
|
||||||
{file = "charset_normalizer-3.1.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:1e8fcdd8f672a1c4fc8d0bd3a2b576b152d2a349782d1eb0f6b8e52e9954731d"},
|
{file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:c4983bf937209c57240cff65906b18bb35e64ae872da6a0db937d7b4af845dd7"},
|
||||||
{file = "charset_normalizer-3.1.0-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:04afa6387e2b282cf78ff3dbce20f0cc071c12dc8f685bd40960cc68644cfea6"},
|
{file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:3bb7fda7260735efe66d5107fb7e6af6a7c04c7fce9b2514e04b7a74b06bf5dd"},
|
||||||
{file = "charset_normalizer-3.1.0-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:dd5653e67b149503c68c4018bf07e42eeed6b4e956b24c00ccdf93ac79cdff84"},
|
{file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:72814c01533f51d68702802d74f77ea026b5ec52793c791e2da806a3844a46c3"},
|
||||||
{file = "charset_normalizer-3.1.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:d2686f91611f9e17f4548dbf050e75b079bbc2a82be565832bc8ea9047b61c8c"},
|
{file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:70c610f6cbe4b9fce272c407dd9d07e33e6bf7b4aa1b7ffb6f6ded8e634e3592"},
|
||||||
{file = "charset_normalizer-3.1.0-cp37-cp37m-win32.whl", hash = "sha256:4155b51ae05ed47199dc5b2a4e62abccb274cee6b01da5b895099b61b1982974"},
|
{file = "charset_normalizer-3.2.0-cp37-cp37m-win32.whl", hash = "sha256:a401b4598e5d3f4a9a811f3daf42ee2291790c7f9d74b18d75d6e21dda98a1a1"},
|
||||||
{file = "charset_normalizer-3.1.0-cp37-cp37m-win_amd64.whl", hash = "sha256:322102cdf1ab682ecc7d9b1c5eed4ec59657a65e1c146a0da342b78f4112db23"},
|
{file = "charset_normalizer-3.2.0-cp37-cp37m-win_amd64.whl", hash = "sha256:c0b21078a4b56965e2b12f247467b234734491897e99c1d51cee628da9786959"},
|
||||||
{file = "charset_normalizer-3.1.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e633940f28c1e913615fd624fcdd72fdba807bf53ea6925d6a588e84e1151531"},
|
{file = "charset_normalizer-3.2.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:95eb302ff792e12aba9a8b8f8474ab229a83c103d74a750ec0bd1c1eea32e669"},
|
||||||
{file = "charset_normalizer-3.1.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:3a06f32c9634a8705f4ca9946d667609f52cf130d5548881401f1eb2c39b1e2c"},
|
{file = "charset_normalizer-3.2.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1a100c6d595a7f316f1b6f01d20815d916e75ff98c27a01ae817439ea7726329"},
|
||||||
{file = "charset_normalizer-3.1.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7381c66e0561c5757ffe616af869b916c8b4e42b367ab29fedc98481d1e74e14"},
|
{file = "charset_normalizer-3.2.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:6339d047dab2780cc6220f46306628e04d9750f02f983ddb37439ca47ced7149"},
|
||||||
{file = "charset_normalizer-3.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3573d376454d956553c356df45bb824262c397c6e26ce43e8203c4c540ee0acb"},
|
{file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e4b749b9cc6ee664a3300bb3a273c1ca8068c46be705b6c31cf5d276f8628a94"},
|
||||||
{file = "charset_normalizer-3.1.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e89df2958e5159b811af9ff0f92614dabf4ff617c03a4c1c6ff53bf1c399e0e1"},
|
{file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a38856a971c602f98472050165cea2cdc97709240373041b69030be15047691f"},
|
||||||
{file = "charset_normalizer-3.1.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:78cacd03e79d009d95635e7d6ff12c21eb89b894c354bd2b2ed0b4763373693b"},
|
{file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f87f746ee241d30d6ed93969de31e5ffd09a2961a051e60ae6bddde9ec3583aa"},
|
||||||
{file = "charset_normalizer-3.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:de5695a6f1d8340b12a5d6d4484290ee74d61e467c39ff03b39e30df62cf83a0"},
|
{file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:89f1b185a01fe560bc8ae5f619e924407efca2191b56ce749ec84982fc59a32a"},
|
||||||
{file = "charset_normalizer-3.1.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1c60b9c202d00052183c9be85e5eaf18a4ada0a47d188a83c8f5c5b23252f649"},
|
{file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e1c8a2f4c69e08e89632defbfabec2feb8a8d99edc9f89ce33c4b9e36ab63037"},
|
||||||
{file = "charset_normalizer-3.1.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:f645caaf0008bacf349875a974220f1f1da349c5dbe7c4ec93048cdc785a3326"},
|
{file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:2f4ac36d8e2b4cc1aa71df3dd84ff8efbe3bfb97ac41242fbcfc053c67434f46"},
|
||||||
{file = "charset_normalizer-3.1.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:ea9f9c6034ea2d93d9147818f17c2a0860d41b71c38b9ce4d55f21b6f9165a11"},
|
{file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:a386ebe437176aab38c041de1260cd3ea459c6ce5263594399880bbc398225b2"},
|
||||||
{file = "charset_normalizer-3.1.0-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:80d1543d58bd3d6c271b66abf454d437a438dff01c3e62fdbcd68f2a11310d4b"},
|
{file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:ccd16eb18a849fd8dcb23e23380e2f0a354e8daa0c984b8a732d9cfaba3a776d"},
|
||||||
{file = "charset_normalizer-3.1.0-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:73dc03a6a7e30b7edc5b01b601e53e7fc924b04e1835e8e407c12c037e81adbd"},
|
{file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:e6a5bf2cba5ae1bb80b154ed68a3cfa2fa00fde979a7f50d6598d3e17d9ac20c"},
|
||||||
{file = "charset_normalizer-3.1.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6f5c2e7bc8a4bf7c426599765b1bd33217ec84023033672c1e9a8b35eaeaaaf8"},
|
{file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:45de3f87179c1823e6d9e32156fb14c1927fcc9aba21433f088fdfb555b77c10"},
|
||||||
{file = "charset_normalizer-3.1.0-cp38-cp38-win32.whl", hash = "sha256:12a2b561af122e3d94cdb97fe6fb2bb2b82cef0cdca131646fdb940a1eda04f0"},
|
{file = "charset_normalizer-3.2.0-cp38-cp38-win32.whl", hash = "sha256:1000fba1057b92a65daec275aec30586c3de2401ccdcd41f8a5c1e2c87078706"},
|
||||||
{file = "charset_normalizer-3.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:3160a0fd9754aab7d47f95a6b63ab355388d890163eb03b2d2b87ab0a30cfa59"},
|
{file = "charset_normalizer-3.2.0-cp38-cp38-win_amd64.whl", hash = "sha256:8b2c760cfc7042b27ebdb4a43a4453bd829a5742503599144d54a032c5dc7e9e"},
|
||||||
{file = "charset_normalizer-3.1.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:38e812a197bf8e71a59fe55b757a84c1f946d0ac114acafaafaf21667a7e169e"},
|
{file = "charset_normalizer-3.2.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:855eafa5d5a2034b4621c74925d89c5efef61418570e5ef9b37717d9c796419c"},
|
||||||
{file = "charset_normalizer-3.1.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6baf0baf0d5d265fa7944feb9f7451cc316bfe30e8df1a61b1bb08577c554f31"},
|
{file = "charset_normalizer-3.2.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:203f0c8871d5a7987be20c72442488a0b8cfd0f43b7973771640fc593f56321f"},
|
||||||
{file = "charset_normalizer-3.1.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:8f25e17ab3039b05f762b0a55ae0b3632b2e073d9c8fc88e89aca31a6198e88f"},
|
{file = "charset_normalizer-3.2.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e857a2232ba53ae940d3456f7533ce6ca98b81917d47adc3c7fd55dad8fab858"},
|
||||||
{file = "charset_normalizer-3.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3747443b6a904001473370d7810aa19c3a180ccd52a7157aacc264a5ac79265e"},
|
{file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5e86d77b090dbddbe78867a0275cb4df08ea195e660f1f7f13435a4649e954e5"},
|
||||||
{file = "charset_normalizer-3.1.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b116502087ce8a6b7a5f1814568ccbd0e9f6cfd99948aa59b0e241dc57cf739f"},
|
{file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c4fb39a81950ec280984b3a44f5bd12819953dc5fa3a7e6fa7a80db5ee853952"},
|
||||||
{file = "charset_normalizer-3.1.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d16fd5252f883eb074ca55cb622bc0bee49b979ae4e8639fff6ca3ff44f9f854"},
|
{file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2dee8e57f052ef5353cf608e0b4c871aee320dd1b87d351c28764fc0ca55f9f4"},
|
||||||
{file = "charset_normalizer-3.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:21fa558996782fc226b529fdd2ed7866c2c6ec91cee82735c98a197fae39f706"},
|
{file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8700f06d0ce6f128de3ccdbc1acaea1ee264d2caa9ca05daaf492fde7c2a7200"},
|
||||||
{file = "charset_normalizer-3.1.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6f6c7a8a57e9405cad7485f4c9d3172ae486cfef1344b5ddd8e5239582d7355e"},
|
{file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1920d4ff15ce893210c1f0c0e9d19bfbecb7983c76b33f046c13a8ffbd570252"},
|
||||||
{file = "charset_normalizer-3.1.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:ac3775e3311661d4adace3697a52ac0bab17edd166087d493b52d4f4f553f9f0"},
|
{file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:c1c76a1743432b4b60ab3358c937a3fe1341c828ae6194108a94c69028247f22"},
|
||||||
{file = "charset_normalizer-3.1.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:10c93628d7497c81686e8e5e557aafa78f230cd9e77dd0c40032ef90c18f2230"},
|
{file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:f7560358a6811e52e9c4d142d497f1a6e10103d3a6881f18d04dbce3729c0e2c"},
|
||||||
{file = "charset_normalizer-3.1.0-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:6f4f4668e1831850ebcc2fd0b1cd11721947b6dc7c00bf1c6bd3c929ae14f2c7"},
|
{file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:c8063cf17b19661471ecbdb3df1c84f24ad2e389e326ccaf89e3fb2484d8dd7e"},
|
||||||
{file = "charset_normalizer-3.1.0-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:0be65ccf618c1e7ac9b849c315cc2e8a8751d9cfdaa43027d4f6624bd587ab7e"},
|
{file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:cd6dbe0238f7743d0efe563ab46294f54f9bc8f4b9bcf57c3c666cc5bc9d1299"},
|
||||||
{file = "charset_normalizer-3.1.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:53d0a3fa5f8af98a1e261de6a3943ca631c526635eb5817a87a59d9a57ebf48f"},
|
{file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:1249cbbf3d3b04902ff081ffbb33ce3377fa6e4c7356f759f3cd076cc138d020"},
|
||||||
{file = "charset_normalizer-3.1.0-cp39-cp39-win32.whl", hash = "sha256:a04f86f41a8916fe45ac5024ec477f41f886b3c435da2d4e3d2709b22ab02af1"},
|
{file = "charset_normalizer-3.2.0-cp39-cp39-win32.whl", hash = "sha256:6c409c0deba34f147f77efaa67b8e4bb83d2f11c8806405f76397ae5b8c0d1c9"},
|
||||||
{file = "charset_normalizer-3.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:830d2948a5ec37c386d3170c483063798d7879037492540f10a475e3fd6f244b"},
|
{file = "charset_normalizer-3.2.0-cp39-cp39-win_amd64.whl", hash = "sha256:7095f6fbfaa55defb6b733cfeb14efaae7a29f0b59d8cf213be4e7ca0b857b80"},
|
||||||
{file = "charset_normalizer-3.1.0-py3-none-any.whl", hash = "sha256:3d9098b479e78c85080c98e1e35ff40b4a31d8953102bb0fd7d1b6f8a2111a3d"},
|
{file = "charset_normalizer-3.2.0-py3-none-any.whl", hash = "sha256:8e098148dd37b4ce3baca71fb394c81dc5d9c7728c95df695d2dca218edf40e6"},
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cryptography"
|
name = "cryptography"
|
||||||
version = "40.0.1"
|
version = "40.0.1"
|
||||||
description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers."
|
description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers."
|
||||||
category = "main"
|
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=3.6"
|
python-versions = ">=3.6"
|
||||||
files = [
|
files = [
|
||||||
|
@ -287,7 +279,6 @@ tox = ["tox"]
|
||||||
name = "hcloud"
|
name = "hcloud"
|
||||||
version = "1.18.2"
|
version = "1.18.2"
|
||||||
description = "Official Hetzner Cloud python library"
|
description = "Official Hetzner Cloud python library"
|
||||||
category = "main"
|
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">3.5"
|
python-versions = ">3.5"
|
||||||
files = [
|
files = [
|
||||||
|
@ -306,7 +297,6 @@ docs = ["Sphinx (==1.8.1)", "sphinx-rtd-theme (==0.4.2)"]
|
||||||
name = "hetzner"
|
name = "hetzner"
|
||||||
version = "0.8.3"
|
version = "0.8.3"
|
||||||
description = "High level access to the Hetzner robot"
|
description = "High level access to the Hetzner robot"
|
||||||
category = "main"
|
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = "*"
|
python-versions = "*"
|
||||||
files = [
|
files = [
|
||||||
|
@ -317,7 +307,6 @@ files = [
|
||||||
name = "idna"
|
name = "idna"
|
||||||
version = "3.4"
|
version = "3.4"
|
||||||
description = "Internationalized Domain Names in Applications (IDNA)"
|
description = "Internationalized Domain Names in Applications (IDNA)"
|
||||||
category = "main"
|
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=3.5"
|
python-versions = ">=3.5"
|
||||||
files = [
|
files = [
|
||||||
|
@ -329,7 +318,6 @@ files = [
|
||||||
name = "jmespath"
|
name = "jmespath"
|
||||||
version = "1.0.1"
|
version = "1.0.1"
|
||||||
description = "JSON Matching Expressions"
|
description = "JSON Matching Expressions"
|
||||||
category = "main"
|
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=3.7"
|
python-versions = ">=3.7"
|
||||||
files = [
|
files = [
|
||||||
|
@ -341,7 +329,6 @@ files = [
|
||||||
name = "jsonpickle"
|
name = "jsonpickle"
|
||||||
version = "3.0.1"
|
version = "3.0.1"
|
||||||
description = "Python library for serializing any arbitrary object graph into JSON"
|
description = "Python library for serializing any arbitrary object graph into JSON"
|
||||||
category = "main"
|
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=3.7"
|
python-versions = ">=3.7"
|
||||||
files = [
|
files = [
|
||||||
|
@ -356,20 +343,18 @@ testing-libs = ["simplejson", "ujson"]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libvirt-python"
|
name = "libvirt-python"
|
||||||
version = "9.3.0"
|
version = "9.6.0"
|
||||||
description = "The libvirt virtualization API python binding"
|
description = "The libvirt virtualization API python binding"
|
||||||
category = "main"
|
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = "*"
|
python-versions = ">=3.6"
|
||||||
files = [
|
files = [
|
||||||
{file = "libvirt-python-9.3.0.tar.gz", hash = "sha256:9c761d88b4ddcf65b324043944da4f18f82471c74d9371d2372d3b4e0f19861b"},
|
{file = "libvirt-python-9.6.0.tar.gz", hash = "sha256:53422d8e3110139655c3d9c2ff2602b238f8a39b7bf61a92a620119b45550a99"},
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nixops"
|
name = "nixops"
|
||||||
version = "2.0.0"
|
version = "2.0.0"
|
||||||
description = "NixOS cloud provisioning and deployment tool"
|
description = "NixOS cloud provisioning and deployment tool"
|
||||||
category = "main"
|
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = "^3.10"
|
python-versions = "^3.10"
|
||||||
files = []
|
files = []
|
||||||
|
@ -391,7 +376,6 @@ resolved_reference = "fc9b55c55da62f949028143b974f67fdc7f40c8b"
|
||||||
name = "nixops-aws"
|
name = "nixops-aws"
|
||||||
version = "1.0"
|
version = "1.0"
|
||||||
description = "NixOps AWS plugin"
|
description = "NixOps AWS plugin"
|
||||||
category = "main"
|
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = "^3.7"
|
python-versions = "^3.7"
|
||||||
files = []
|
files = []
|
||||||
|
@ -408,13 +392,12 @@ typing-extensions = "^3.7.4"
|
||||||
type = "git"
|
type = "git"
|
||||||
url = "https://github.com/NixOS/nixops-aws.git"
|
url = "https://github.com/NixOS/nixops-aws.git"
|
||||||
reference = "HEAD"
|
reference = "HEAD"
|
||||||
resolved_reference = "012c94fc128b1cf2497aa5f2bc8fbffd0b52b464"
|
resolved_reference = "8802d1cda9004ec1362815292c2a8ab95e6d64e8"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nixops-digitalocean"
|
name = "nixops-digitalocean"
|
||||||
version = "2.0"
|
version = "2.0"
|
||||||
description = "NixOps plugin for Digital Ocean"
|
description = "NixOps plugin for Digital Ocean"
|
||||||
category = "main"
|
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = "^3.7"
|
python-versions = "^3.7"
|
||||||
files = []
|
files = []
|
||||||
|
@ -434,7 +417,6 @@ resolved_reference = "e977b7f11e264a6a2bff2dcbc7b94c6a97b92fff"
|
||||||
name = "nixops-encrypted-links"
|
name = "nixops-encrypted-links"
|
||||||
version = "1.0"
|
version = "1.0"
|
||||||
description = "Encrypted links support for NixOps"
|
description = "Encrypted links support for NixOps"
|
||||||
category = "main"
|
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = "^3.7"
|
python-versions = "^3.7"
|
||||||
files = []
|
files = []
|
||||||
|
@ -453,7 +435,6 @@ resolved_reference = "e2f196fce15fcfb00d18c055e1ac53aec33b8fb1"
|
||||||
name = "nixops-gcp"
|
name = "nixops-gcp"
|
||||||
version = "1.0"
|
version = "1.0"
|
||||||
description = "NixOps backend for Google Cloud Platform"
|
description = "NixOps backend for Google Cloud Platform"
|
||||||
category = "main"
|
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = "^3.10"
|
python-versions = "^3.10"
|
||||||
files = []
|
files = []
|
||||||
|
@ -475,7 +456,6 @@ resolved_reference = "d13cb794aef763338f544010ceb1816fe31d7f42"
|
||||||
name = "nixops-hercules-ci"
|
name = "nixops-hercules-ci"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = ""
|
description = ""
|
||||||
category = "main"
|
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = "^3.8"
|
python-versions = "^3.8"
|
||||||
files = []
|
files = []
|
||||||
|
@ -494,7 +474,6 @@ resolved_reference = "e601d5baffd003fd5f22deeaea0cb96444b054dc"
|
||||||
name = "nixops-hetzner"
|
name = "nixops-hetzner"
|
||||||
version = "1.0"
|
version = "1.0"
|
||||||
description = "NixOS deployment tool, but for hetzner"
|
description = "NixOS deployment tool, but for hetzner"
|
||||||
category = "main"
|
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = "^3.7"
|
python-versions = "^3.7"
|
||||||
files = []
|
files = []
|
||||||
|
@ -516,7 +495,6 @@ resolved_reference = "bc7a68070c7371468bcc8bf6e36baebc6bd2da35"
|
||||||
name = "nixops-hetznercloud"
|
name = "nixops-hetznercloud"
|
||||||
version = "0.1.3"
|
version = "0.1.3"
|
||||||
description = "NixOps Hetzner Cloud plugin"
|
description = "NixOps Hetzner Cloud plugin"
|
||||||
category = "main"
|
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = "^3.10"
|
python-versions = "^3.10"
|
||||||
files = []
|
files = []
|
||||||
|
@ -537,7 +515,6 @@ resolved_reference = "e14f340f7ffe9e2aa7ffbaac0b8a2e3b4cc116b3"
|
||||||
name = "nixops-virtd"
|
name = "nixops-virtd"
|
||||||
version = "1.0"
|
version = "1.0"
|
||||||
description = "NixOps plugin for virtd"
|
description = "NixOps plugin for virtd"
|
||||||
category = "main"
|
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = "^3.10"
|
python-versions = "^3.10"
|
||||||
files = []
|
files = []
|
||||||
|
@ -557,7 +534,6 @@ resolved_reference = "be1ea32e02d8abb3dbe1b09b7c5a7419a7412991"
|
||||||
name = "nixopsvbox"
|
name = "nixopsvbox"
|
||||||
version = "1.7"
|
version = "1.7"
|
||||||
description = "NixOps backend for VirtualBox"
|
description = "NixOps backend for VirtualBox"
|
||||||
category = "main"
|
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = "^3.7"
|
python-versions = "^3.7"
|
||||||
files = []
|
files = []
|
||||||
|
@ -576,7 +552,6 @@ resolved_reference = "2729672865ebe2aa973c062a3fbddda8c1359da0"
|
||||||
name = "nixos-modules-contrib"
|
name = "nixos-modules-contrib"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = "NixOS modules that don't quite belong in NixOS."
|
description = "NixOS modules that don't quite belong in NixOS."
|
||||||
category = "main"
|
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = "^3.7"
|
python-versions = "^3.7"
|
||||||
files = []
|
files = []
|
||||||
|
@ -593,14 +568,13 @@ resolved_reference = "81a1c2ef424dcf596a97b2e46a58ca73a1dd1ff8"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pluggy"
|
name = "pluggy"
|
||||||
version = "1.0.0"
|
version = "1.2.0"
|
||||||
description = "plugin and hook calling mechanisms for python"
|
description = "plugin and hook calling mechanisms for python"
|
||||||
category = "main"
|
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=3.6"
|
python-versions = ">=3.7"
|
||||||
files = [
|
files = [
|
||||||
{file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"},
|
{file = "pluggy-1.2.0-py3-none-any.whl", hash = "sha256:c2fd55a7d7a3863cba1a013e4e2414658b1d07b6bc57b3919e0c63c9abb99849"},
|
||||||
{file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"},
|
{file = "pluggy-1.2.0.tar.gz", hash = "sha256:d12f0c4b579b15f5e054301bb226ee85eeeba08ffec228092f8defbaa3a4c4b3"},
|
||||||
]
|
]
|
||||||
|
|
||||||
[package.extras]
|
[package.extras]
|
||||||
|
@ -611,7 +585,6 @@ testing = ["pytest", "pytest-benchmark"]
|
||||||
name = "prettytable"
|
name = "prettytable"
|
||||||
version = "0.7.2"
|
version = "0.7.2"
|
||||||
description = "A simple Python library for easily displaying tabular data in a visually appealing ASCII table format."
|
description = "A simple Python library for easily displaying tabular data in a visually appealing ASCII table format."
|
||||||
category = "main"
|
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = "*"
|
python-versions = "*"
|
||||||
files = [
|
files = [
|
||||||
|
@ -624,7 +597,6 @@ files = [
|
||||||
name = "pycparser"
|
name = "pycparser"
|
||||||
version = "2.21"
|
version = "2.21"
|
||||||
description = "C parser in Python"
|
description = "C parser in Python"
|
||||||
category = "main"
|
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
|
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
|
||||||
files = [
|
files = [
|
||||||
|
@ -636,7 +608,6 @@ files = [
|
||||||
name = "python-dateutil"
|
name = "python-dateutil"
|
||||||
version = "2.8.2"
|
version = "2.8.2"
|
||||||
description = "Extensions to the standard Python datetime module"
|
description = "Extensions to the standard Python datetime module"
|
||||||
category = "main"
|
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7"
|
python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7"
|
||||||
files = [
|
files = [
|
||||||
|
@ -651,7 +622,6 @@ six = ">=1.5"
|
||||||
name = "python-digitalocean"
|
name = "python-digitalocean"
|
||||||
version = "1.17.0"
|
version = "1.17.0"
|
||||||
description = "digitalocean.com API to manage Droplets and Images"
|
description = "digitalocean.com API to manage Droplets and Images"
|
||||||
category = "main"
|
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = "*"
|
python-versions = "*"
|
||||||
files = [
|
files = [
|
||||||
|
@ -667,7 +637,6 @@ requests = "*"
|
||||||
name = "requests"
|
name = "requests"
|
||||||
version = "2.31.0"
|
version = "2.31.0"
|
||||||
description = "Python HTTP for Humans."
|
description = "Python HTTP for Humans."
|
||||||
category = "main"
|
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=3.7"
|
python-versions = ">=3.7"
|
||||||
files = [
|
files = [
|
||||||
|
@ -689,7 +658,6 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"]
|
||||||
name = "s3transfer"
|
name = "s3transfer"
|
||||||
version = "0.6.1"
|
version = "0.6.1"
|
||||||
description = "An Amazon S3 Transfer Manager"
|
description = "An Amazon S3 Transfer Manager"
|
||||||
category = "main"
|
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">= 3.7"
|
python-versions = ">= 3.7"
|
||||||
files = [
|
files = [
|
||||||
|
@ -707,7 +675,6 @@ crt = ["botocore[crt] (>=1.20.29,<2.0a.0)"]
|
||||||
name = "six"
|
name = "six"
|
||||||
version = "1.16.0"
|
version = "1.16.0"
|
||||||
description = "Python 2 and 3 compatibility utilities"
|
description = "Python 2 and 3 compatibility utilities"
|
||||||
category = "main"
|
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*"
|
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*"
|
||||||
files = [
|
files = [
|
||||||
|
@ -719,7 +686,6 @@ files = [
|
||||||
name = "typeguard"
|
name = "typeguard"
|
||||||
version = "2.13.3"
|
version = "2.13.3"
|
||||||
description = "Run-time type checker for Python"
|
description = "Run-time type checker for Python"
|
||||||
category = "main"
|
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=3.5.3"
|
python-versions = ">=3.5.3"
|
||||||
files = [
|
files = [
|
||||||
|
@ -735,7 +701,6 @@ test = ["mypy", "pytest", "typing-extensions"]
|
||||||
name = "typing-extensions"
|
name = "typing-extensions"
|
||||||
version = "3.10.0.2"
|
version = "3.10.0.2"
|
||||||
description = "Backported and Experimental Type Hints for Python 3.5+"
|
description = "Backported and Experimental Type Hints for Python 3.5+"
|
||||||
category = "main"
|
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = "*"
|
python-versions = "*"
|
||||||
files = [
|
files = [
|
||||||
|
@ -748,7 +713,6 @@ files = [
|
||||||
name = "urllib3"
|
name = "urllib3"
|
||||||
version = "1.26.16"
|
version = "1.26.16"
|
||||||
description = "HTTP library with thread-safe connection pooling, file post, and more."
|
description = "HTTP library with thread-safe connection pooling, file post, and more."
|
||||||
category = "main"
|
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*"
|
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*"
|
||||||
files = [
|
files = [
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
buildGoPackage rec {
|
buildGoPackage rec {
|
||||||
pname = "ssm-session-manager-plugin";
|
pname = "ssm-session-manager-plugin";
|
||||||
version = "1.2.463.0";
|
version = "1.2.497.0";
|
||||||
|
|
||||||
goPackagePath = "github.com/aws/session-manager-plugin";
|
goPackagePath = "github.com/aws/session-manager-plugin";
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ buildGoPackage rec {
|
||||||
owner = "aws";
|
owner = "aws";
|
||||||
repo = "session-manager-plugin";
|
repo = "session-manager-plugin";
|
||||||
rev = version;
|
rev = version;
|
||||||
hash = "sha256-0n7/3CAPf+ioSE041Zik9xeHt5qtrdHotJjBWhizExo=";
|
hash = "sha256-DX+Jm7u0gNX3o0QYIbE6Vzsmqys+09lQGHpIuqBEwMI=";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
python3.pkgs.buildPythonApplication rec {
|
python3.pkgs.buildPythonApplication rec {
|
||||||
pname = "flexget";
|
pname = "flexget";
|
||||||
version = "3.8.5";
|
version = "3.8.6";
|
||||||
format = "pyproject";
|
format = "pyproject";
|
||||||
|
|
||||||
# Fetch from GitHub in order to use `requirements.in`
|
# Fetch from GitHub in order to use `requirements.in`
|
||||||
|
@ -14,7 +14,7 @@ python3.pkgs.buildPythonApplication rec {
|
||||||
owner = "Flexget";
|
owner = "Flexget";
|
||||||
repo = "Flexget";
|
repo = "Flexget";
|
||||||
rev = "refs/tags/v${version}";
|
rev = "refs/tags/v${version}";
|
||||||
hash = "sha256-lvZVezg5MORsNkWGo7iqtyRlo68JcVLiG+2hhiSdRZ8=";
|
hash = "sha256-KF5d9SjKUkkHoYWmNWNBMe567w2StgEFsZprS+SFw7Y=";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
|
|
@ -45,14 +45,14 @@ let
|
||||||
|
|
||||||
pname = "slack";
|
pname = "slack";
|
||||||
|
|
||||||
x86_64-darwin-version = "4.33.73";
|
x86_64-darwin-version = "4.33.84";
|
||||||
x86_64-darwin-sha256 = "0y8plkl3pm8250xpavc91kn5b9gcdwr7bqzd3i79n48395lx11ka";
|
x86_64-darwin-sha256 = "1qkcj0w5rqfdj8l7p7gv2ck0rgkm5sc8490f8mnbflgvjj9y0gsb";
|
||||||
|
|
||||||
x86_64-linux-version = "4.33.73";
|
x86_64-linux-version = "4.33.84";
|
||||||
x86_64-linux-sha256 = "007i8sjnm1ikjxvgw6nisj4nmv99bwk0r4sfpvc2j4w4wk68sx3m";
|
x86_64-linux-sha256 = "0cjl3m9gprxkm57889l1avkl21pyc7bzhcgm4j5yf938dp699zhd";
|
||||||
|
|
||||||
aarch64-darwin-version = "4.33.73";
|
aarch64-darwin-version = "4.33.84";
|
||||||
aarch64-darwin-sha256 = "15s3ss15yawb04dyzn82xmk1gs70sg2i3agsj2aw0xdx73yjl34p";
|
aarch64-darwin-sha256 = "0aw4wn4xx304dyzz7v9lmdgwg1345lhizil8yq9cjqy5kas3zj34";
|
||||||
|
|
||||||
version = {
|
version = {
|
||||||
x86_64-darwin = x86_64-darwin-version;
|
x86_64-darwin = x86_64-darwin-version;
|
||||||
|
|
|
@ -25,14 +25,14 @@ let
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "16.1.13";
|
version = "16.1.33";
|
||||||
pname = "jmol";
|
pname = "jmol";
|
||||||
|
|
||||||
src = let
|
src = let
|
||||||
baseVersion = "${lib.versions.major version}.${lib.versions.minor version}";
|
baseVersion = "${lib.versions.major version}.${lib.versions.minor version}";
|
||||||
in fetchurl {
|
in fetchurl {
|
||||||
url = "mirror://sourceforge/jmol/Jmol/Version%20${baseVersion}/Jmol%20${version}/Jmol-${version}-binary.tar.gz";
|
url = "mirror://sourceforge/jmol/Jmol/Version%20${baseVersion}/Jmol%20${version}/Jmol-${version}-binary.tar.gz";
|
||||||
hash = "sha256-BiCv1meuefFgzuhm/u5XmQNzM94xBOQsGtJceEBnu6s=";
|
hash = "sha256-vOFGmLsCQNYRBMuDRVrdjWE6/MxY7IucB1OpV4cdZrs=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
{ lib, mkDerivation, fetchFromGitHub, pkg-config, cmake
|
{ stdenv, lib, fetchFromGitHub, pkg-config, cmake, wrapQtAppsHook
|
||||||
, libzip, boost, fftw, qtbase, libusb1
|
, libzip, boost, fftw, qtbase, qtwayland, qtsvg, libusb1
|
||||||
, python3, fetchpatch
|
, python3, fetchpatch
|
||||||
}:
|
}:
|
||||||
|
|
||||||
mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "dsview";
|
pname = "dsview";
|
||||||
|
|
||||||
version = "1.2.2";
|
version = "1.3.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "DreamSourceLab";
|
owner = "DreamSourceLab";
|
||||||
repo = "DSView";
|
repo = "DSView";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-QaCVu/n9PDbAiJgPDVN6SJMILeUO/KRkKcHYAstm86Q=";
|
sha256 = "sha256-wnBVhZ3Ky9PXs48OVvSbD1aAUSEqAwaNLg7Ntim7yFM=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
|
@ -20,10 +20,10 @@ mkDerivation rec {
|
||||||
./install.patch
|
./install.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake pkg-config ];
|
nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
boost fftw qtbase libusb1 libzip
|
boost fftw qtbase qtwayland qtsvg libusb1 libzip
|
||||||
python3
|
python3
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ lib, stdenv, fetchurl, bzip2, gfortran, libX11, libXmu, libXt, libjpeg, libpng
|
{ lib, stdenv, fetchurl, bzip2, gfortran, libX11, libXmu, libXt, libjpeg, libpng
|
||||||
, libtiff, ncurses, pango, pcre2, perl, readline, tcl, texLive, tk, xz, zlib
|
, libtiff, ncurses, pango, pcre2, perl, readline, tcl, texlive, texLive, tk, xz, zlib
|
||||||
, less, texinfo, graphviz, icu, pkg-config, bison, imake, which, jdk, blas, lapack
|
, less, texinfo, graphviz, icu, pkg-config, bison, imake, which, jdk, blas, lapack
|
||||||
, curl, Cocoa, Foundation, libobjc, libcxx, tzdata
|
, curl, Cocoa, Foundation, libobjc, libcxx, tzdata
|
||||||
, withRecommendedPackages ? true
|
, withRecommendedPackages ? true
|
||||||
|
@ -24,6 +24,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
sha256 = "sha256-jdC/JPECPG9hjDsxc4PSkbSklPQNc7mDrCL/6pnkupk=";
|
sha256 = "sha256-jdC/JPECPG9hjDsxc4PSkbSklPQNc7mDrCL/6pnkupk=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
outputs = [ "out" "tex" ];
|
||||||
|
|
||||||
dontUseImakeConfigure = true;
|
dontUseImakeConfigure = true;
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config ];
|
nativeBuildInputs = [ pkg-config ];
|
||||||
|
@ -89,6 +91,13 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
|
|
||||||
installTargets = [ "install" "install-info" "install-pdf" ];
|
installTargets = [ "install" "install-info" "install-pdf" ];
|
||||||
|
|
||||||
|
# move tex files to $tex for use with texlive.combine
|
||||||
|
# add link in $out since ${R_SHARE_DIR}/texmf is hardcoded in several places
|
||||||
|
postInstall = ''
|
||||||
|
mv -T "$out/lib/R/share/texmf" "$tex"
|
||||||
|
ln -s "$tex" "$out/lib/R/share/texmf"
|
||||||
|
'';
|
||||||
|
|
||||||
# The store path to "which" is baked into src/library/base/R/unix/system.unix.R,
|
# The store path to "which" is baked into src/library/base/R/unix/system.unix.R,
|
||||||
# but Nix cannot detect it as a run-time dependency because the installed file
|
# but Nix cannot detect it as a run-time dependency because the installed file
|
||||||
# is compiled and compressed, which hides the store path.
|
# is compiled and compressed, which hides the store path.
|
||||||
|
@ -103,6 +112,12 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
|
|
||||||
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
||||||
|
|
||||||
|
# make tex output available to texlive.combine
|
||||||
|
passthru.pkgs = [ finalAttrs.finalPackage.tex ];
|
||||||
|
passthru.tlType = "run";
|
||||||
|
# dependencies (based on \RequirePackage in jss.cls, Rd.sty, Sweave.sty)
|
||||||
|
passthru.tlDeps = with texlive; [ amsfonts amsmath fancyvrb graphics hyperref iftex jknapltx latex lm tools upquote url ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "http://www.r-project.org/";
|
homepage = "http://www.r-project.org/";
|
||||||
description = "Free software environment for statistical computing and graphics";
|
description = "Free software environment for statistical computing and graphics";
|
||||||
|
|
|
@ -7,13 +7,13 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "eigenmath";
|
pname = "eigenmath";
|
||||||
version = "unstable-2023-06-16";
|
version = "unstable-2023-08-03";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "georgeweigt";
|
owner = "georgeweigt";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "800adc5c0bd654eb9ad28497e1b78c4061b3a4cb";
|
rev = "f202cf0c342e54e994c4d416daecc1b1dc8b9c98";
|
||||||
hash = "sha256-/ViU44E3myAc7B8amm/TaIh70g2Z7IC4KRRG3++nOKs=";
|
hash = "sha256-kp4zWTPYt2DiuPgTK+ib8NbKg2BJVxJDDCvIlWNuwgs=";
|
||||||
};
|
};
|
||||||
|
|
||||||
checkPhase = let emulator = stdenv.hostPlatform.emulator buildPackages; in ''
|
checkPhase = let emulator = stdenv.hostPlatform.emulator buildPackages; in ''
|
||||||
|
@ -43,5 +43,6 @@ stdenv.mkDerivation rec {
|
||||||
homepage = "https://georgeweigt.github.io";
|
homepage = "https://georgeweigt.github.io";
|
||||||
license = licenses.bsd2;
|
license = licenses.bsd2;
|
||||||
maintainers = with maintainers; [ nickcao ];
|
maintainers = with maintainers; [ nickcao ];
|
||||||
|
platforms = platforms.unix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,23 +1,28 @@
|
||||||
{ lib, stdenv, fetchurl, libxml2, readline, zlib, perl, cairo, gtk3, gsl
|
{ lib, stdenv, fetchurl, libxml2, readline, zlib, perl, cairo, gtk3, gsl
|
||||||
, pkg-config, gtksourceview, pango, gettext, dconf
|
, pkg-config, gtksourceview4, pango, gettext, dconf
|
||||||
, makeWrapper, gsettings-desktop-schemas, hicolor-icon-theme
|
, makeWrapper, gsettings-desktop-schemas, hicolor-icon-theme
|
||||||
, texinfo, ssw, python3
|
, texinfo, ssw, python3, iconv
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "pspp";
|
pname = "pspp";
|
||||||
version = "1.4.1";
|
version = "1.6.2";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://gnu/pspp/${pname}-${version}.tar.gz";
|
url = "mirror://gnu/pspp/${pname}-${version}.tar.gz";
|
||||||
sha256 = "0lqrash677b09zxdlxp89z6k02y4i23mbqg83956dwl69wc53dan";
|
sha256 = "sha256-cylMovWy9/xBu/i3jFiIyAdfQ8YJf9SCq7BPhasIR7Y=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config texinfo python3 makeWrapper ];
|
nativeBuildInputs = [ pkg-config texinfo python3 makeWrapper ];
|
||||||
buildInputs = [ libxml2 readline zlib perl cairo gtk3 gsl
|
buildInputs = [ libxml2 readline zlib perl cairo gtk3 gsl
|
||||||
gtksourceview pango gettext
|
gtksourceview4 pango gettext
|
||||||
gsettings-desktop-schemas hicolor-icon-theme ssw
|
gsettings-desktop-schemas hicolor-icon-theme ssw iconv
|
||||||
];
|
];
|
||||||
|
|
||||||
|
C_INCLUDE_PATH =
|
||||||
|
"${libxml2.dev}/include/libxml2/:" +
|
||||||
|
lib.makeSearchPathOutput "dev" "include" buildInputs;
|
||||||
|
LIBRARY_PATH = lib.makeLibraryPath buildInputs;
|
||||||
|
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
|
|
|
@ -46,8 +46,8 @@ mkOpenModelicaDerivation ({
|
||||||
|
|
||||||
preFixup = ''
|
preFixup = ''
|
||||||
for entry in $(find $out -name libipopt.so); do
|
for entry in $(find $out -name libipopt.so); do
|
||||||
patchelf --shrink-rpath --allowed-rpath-prefixes /nix/store $entry
|
patchelf --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" "$entry"
|
||||||
patchelf --set-rpath '$ORIGIN':"$(patchelf --print-rpath $entry)" $entry
|
patchelf --set-rpath '$ORIGIN':"$(patchelf --print-rpath $entry)" "$entry"
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
@ -145,6 +145,6 @@ stdenv.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
license = licenses.gpl2;
|
license = licenses.gpl2;
|
||||||
platforms = [ "x86_64-linux" "i686-linux" "aarch64-linux" ];
|
platforms = [ "x86_64-linux" "i686-linux" "aarch64-linux" ];
|
||||||
maintainers = with maintainers; [ joamaki ];
|
maintainers = with maintainers; [ joamaki kjeremy ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ set which contains `emacs.pkgs.withPackages`. For example, to override
|
||||||
`emacs.pkgs.emacs.pkgs.withPackages`,
|
`emacs.pkgs.emacs.pkgs.withPackages`,
|
||||||
```
|
```
|
||||||
let customEmacsPackages =
|
let customEmacsPackages =
|
||||||
emacs.pkgs.overrideScope' (self: super: {
|
emacs.pkgs.overrideScope (self: super: {
|
||||||
# use a custom version of emacs
|
# use a custom version of emacs
|
||||||
emacs = ...;
|
emacs = ...;
|
||||||
# use the unstable MELPA version of magit
|
# use the unstable MELPA version of magit
|
||||||
|
|
|
@ -20,7 +20,10 @@ let
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
find . -name '*.ttf' -exec install -m444 -Dt $out/share/fonts/truetype {} \;
|
find . -name '*.ttf' -exec install -m444 -Dt $out/share/fonts/truetype {} \;
|
||||||
|
|
||||||
install -m444 -Dt $out/share/doc/${pname}-${version} ${lib.concatStringsSep " " docsToInstall}
|
for i in ${toString docsToInstall}; do
|
||||||
|
# not all docs exist in all versions
|
||||||
|
install -m444 -Dt $out/share/doc/${pname}-${version} $i || true
|
||||||
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
stdenvNoCC.mkDerivation rec {
|
stdenvNoCC.mkDerivation rec {
|
||||||
pname = "numix-icon-theme-circle";
|
pname = "numix-icon-theme-circle";
|
||||||
version = "23.07.21";
|
version = "23.08.09";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "numixproject";
|
owner = "numixproject";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "sha256-QwbjJ38fWRkzd1nmsPWcwUQ7p96S/tGEvIfhLsOX1bg=";
|
sha256 = "sha256-YLr5WQox1TzGxRZGJf7NzFRhkNIPJaYFyOYwp9MfkDQ=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ gtk3 ];
|
nativeBuildInputs = [ gtk3 ];
|
||||||
|
|
|
@ -58,7 +58,14 @@
|
||||||
, runCommandLocal
|
, runCommandLocal
|
||||||
, makeWrapper
|
, makeWrapper
|
||||||
}:
|
}:
|
||||||
|
let
|
||||||
|
# run gsettings with desktop schemas for using in "kcm_access" kcm
|
||||||
|
# and in kaccess
|
||||||
|
gsettings-wrapper = runCommandLocal "gsettings-wrapper" { nativeBuildInputs = [ makeWrapper ]; } ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
makeWrapper ${glib}/bin/gsettings $out/bin/gsettings --prefix XDG_DATA_DIRS : ${gsettings-desktop-schemas.out}/share/gsettings-schemas/${gsettings-desktop-schemas.name}
|
||||||
|
'';
|
||||||
|
in
|
||||||
mkDerivation {
|
mkDerivation {
|
||||||
pname = "plasma-desktop";
|
pname = "plasma-desktop";
|
||||||
nativeBuildInputs = [ extra-cmake-modules kdoctools wayland-scanner ];
|
nativeBuildInputs = [ extra-cmake-modules kdoctools wayland-scanner ];
|
||||||
|
@ -122,19 +129,16 @@ mkDerivation {
|
||||||
./kcm-access.patch
|
./kcm-access.patch
|
||||||
];
|
];
|
||||||
CXXFLAGS =
|
CXXFLAGS =
|
||||||
let
|
|
||||||
# run gsettings with desktop schemas for using in kcm_accces kcm
|
|
||||||
gsettings-wrapper = runCommandLocal "gsettings-wrapper" { nativeBuildInputs = [ makeWrapper ]; } ''
|
|
||||||
makeWrapper ${glib}/bin/gsettings $out --prefix XDG_DATA_DIRS : ${gsettings-desktop-schemas.out}/share/gsettings-schemas/${gsettings-desktop-schemas.name}
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
[
|
[
|
||||||
''-DNIXPKGS_HWCLOCK=\"${lib.getBin util-linux}/bin/hwclock\"''
|
''-DNIXPKGS_HWCLOCK=\"${lib.getBin util-linux}/bin/hwclock\"''
|
||||||
''-DNIXPKGS_GSETTINGS=\"${gsettings-wrapper}\"''
|
''-DNIXPKGS_GSETTINGS=\"${gsettings-wrapper}/bin/gsettings\"''
|
||||||
];
|
];
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
# Display ~/Desktop contents on the desktop by default.
|
# Display ~/Desktop contents on the desktop by default.
|
||||||
sed -i "''${!outputBin}/share/plasma/shells/org.kde.plasma.desktop/contents/defaults" \
|
sed -i "''${!outputBin}/share/plasma/shells/org.kde.plasma.desktop/contents/defaults" \
|
||||||
-e 's/Containment=org.kde.desktopcontainment/Containment=org.kde.plasma.folder/'
|
-e 's/Containment=org.kde.desktopcontainment/Containment=org.kde.plasma.folder/'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# wrap kaccess with wrapped gsettings so it can access accessibility schemas
|
||||||
|
qtWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ gsettings-wrapper ]}" ];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,58 +0,0 @@
|
||||||
--- a/src/passes/02-parsing/cameligo/dune
|
|
||||||
+++ b/src/passes/02-parsing/cameligo/dune
|
|
||||||
@@ -20,7 +20,9 @@
|
|
||||||
(action
|
|
||||||
(with-stdout-to
|
|
||||||
%{targets}
|
|
||||||
- (run menhir-recover --external-tokens Lexing_cameligo.Token Parser.cmly))))
|
|
||||||
+ (run menhir-recover
|
|
||||||
+ --external-tokens Lexing_cameligo.Token.MenhirInterpreter
|
|
||||||
+ Parser.cmly))))
|
|
||||||
|
|
||||||
;; Build of the CameLIGO parser as a library
|
|
||||||
|
|
||||||
diff --git a/src/passes/02-parsing/jsligo/dune b/src/passes/02-parsing/jsligo/dune
|
|
||||||
index d691ab0af0fe6ae87119405c19e49e2b5c2d1a23..3b13a06e69737037df0df12aa087506f402d8430 100644
|
|
||||||
--- a/src/passes/02-parsing/jsligo/dune
|
|
||||||
+++ b/src/passes/02-parsing/jsligo/dune
|
|
||||||
@@ -20,7 +20,9 @@
|
|
||||||
(action
|
|
||||||
(with-stdout-to
|
|
||||||
%{targets}
|
|
||||||
- (run menhir-recover --external-tokens Lexing_jsligo.Token Parser.cmly))))
|
|
||||||
+ (run menhir-recover
|
|
||||||
+ --external-tokens Lexing_jsligo.Token.MenhirInterpreter
|
|
||||||
+ Parser.cmly))))
|
|
||||||
|
|
||||||
;; Build of the JsLIGO parser as a library
|
|
||||||
|
|
||||||
diff --git a/src/passes/02-parsing/pascaligo/dune b/src/passes/02-parsing/pascaligo/dune
|
|
||||||
index 0516a8b790d2eb3ebdb833051bd66241ca44832c..e650decc7ba9907551e1016fee1a53b806fb593e 100644
|
|
||||||
--- a/src/passes/02-parsing/pascaligo/dune
|
|
||||||
+++ b/src/passes/02-parsing/pascaligo/dune
|
|
||||||
@@ -20,7 +20,9 @@
|
|
||||||
(action
|
|
||||||
(with-stdout-to
|
|
||||||
%{targets}
|
|
||||||
- (run menhir-recover --external-tokens Lexing_pascaligo.Token Parser.cmly))))
|
|
||||||
+ (run menhir-recover
|
|
||||||
+ --external-tokens Lexing_pascaligo.Token.MenhirInterpreter
|
|
||||||
+ Parser.cmly))))
|
|
||||||
|
|
||||||
;; Build of the PascaLIGO parser as a library
|
|
||||||
|
|
||||||
diff --git a/src/passes/02-parsing/pyligo/dune b/src/passes/02-parsing/pyligo/dune
|
|
||||||
index abb0165f6f185d21ea4a52a152cef188ae9dde4b..5930d86ab721e9dd683e5c4f2873b196ac5859b4 100644
|
|
||||||
--- a/src/passes/02-parsing/pyligo/dune
|
|
||||||
+++ b/src/passes/02-parsing/pyligo/dune
|
|
||||||
@@ -20,7 +20,9 @@
|
|
||||||
(action
|
|
||||||
(with-stdout-to
|
|
||||||
%{targets}
|
|
||||||
- (run menhir-recover --external-tokens Lexing_pyligo.Token Parser.cmly))))
|
|
||||||
+ (run menhir-recover
|
|
||||||
+ --external-tokens Lexing_pyligo.Token.MenhirInterpreter
|
|
||||||
+ Parser.cmly))))
|
|
||||||
|
|
||||||
;; Build of the PyLIGO parser as a library
|
|
||||||
|
|
|
@ -15,18 +15,15 @@
|
||||||
|
|
||||||
ocamlPackages.buildDunePackage rec {
|
ocamlPackages.buildDunePackage rec {
|
||||||
pname = "ligo";
|
pname = "ligo";
|
||||||
version = "0.69.0";
|
version = "0.71.1";
|
||||||
src = fetchFromGitLab {
|
src = fetchFromGitLab {
|
||||||
owner = "ligolang";
|
owner = "ligolang";
|
||||||
repo = "ligo";
|
repo = "ligo";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "sha256-Swt4uihsAtHVMkc0DxATwB8FvgxwtSJTN3E5cBtyXf8=";
|
sha256 = "sha256-E28/bRtYS57vB3WguUDGmR2ZhXhh/taiZTLa07Hu88g=";
|
||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# https://gitlab.com/ligolang/ligo/-/merge_requests/2706.diff
|
|
||||||
patches = [ ./2706.diff ];
|
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace "vendors/tezos-ligo/src/lib_hacl/hacl.ml" \
|
substituteInPlace "vendors/tezos-ligo/src/lib_hacl/hacl.ml" \
|
||||||
--replace \
|
--replace \
|
||||||
|
|
|
@ -12,13 +12,13 @@ let
|
||||||
inherit (llvmPackages) stdenv;
|
inherit (llvmPackages) stdenv;
|
||||||
in stdenv.mkDerivation rec {
|
in stdenv.mkDerivation rec {
|
||||||
pname = "odin";
|
pname = "odin";
|
||||||
version = "dev-2023-07";
|
version = "dev-2023-08";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "odin-lang";
|
owner = "odin-lang";
|
||||||
repo = "Odin";
|
repo = "Odin";
|
||||||
rev = version;
|
rev = version;
|
||||||
hash = "sha256-ksCK1Qmjbg5ZgFoq0I4cjrWaCxd+UW7f1NLcSjCPMwE=";
|
hash = "sha256-pmgrauhB5/JWBkwrAm7tCml9IYQhXyGXsNVDKTntA0M=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
|
|
@ -48,7 +48,7 @@ in
|
||||||
# Like `buildRustPackages`, but may also contain prebuilt binaries to
|
# Like `buildRustPackages`, but may also contain prebuilt binaries to
|
||||||
# break cycle. Just like `bootstrapTools` for nixpkgs as a whole,
|
# break cycle. Just like `bootstrapTools` for nixpkgs as a whole,
|
||||||
# nothing in the final package set should refer to this.
|
# nothing in the final package set should refer to this.
|
||||||
bootstrapRustPackages = self.buildRustPackages.overrideScope' (_: _:
|
bootstrapRustPackages = self.buildRustPackages.overrideScope (_: _:
|
||||||
lib.optionalAttrs (stdenv.buildPlatform == stdenv.hostPlatform)
|
lib.optionalAttrs (stdenv.buildPlatform == stdenv.hostPlatform)
|
||||||
(selectRustPackage buildPackages).packages.prebuilt);
|
(selectRustPackage buildPackages).packages.prebuilt);
|
||||||
bootRustPlatform = makeRustPlatform bootstrapRustPackages;
|
bootRustPlatform = makeRustPlatform bootstrapRustPackages;
|
||||||
|
|
|
@ -65,7 +65,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
homepage = "https://ziglang.org/";
|
homepage = "https://ziglang.org/";
|
||||||
changelog = "https://ziglang.org/download/${finalAttrs.version}/release-notes.html";
|
changelog = "https://ziglang.org/download/${finalAttrs.version}/release-notes.html";
|
||||||
license = lib.licenses.mit;
|
license = lib.licenses.mit;
|
||||||
maintainers = with lib.maintainers; [ aiotter andrewrk AndersonTorres figsoda ];
|
maintainers = with lib.maintainers; [ andrewrk ] ++ lib.teams.zig.members;
|
||||||
platforms = lib.platforms.unix;
|
platforms = lib.platforms.unix;
|
||||||
};
|
};
|
||||||
} // removeAttrs args [ "hash" ])
|
} // removeAttrs args [ "hash" ])
|
||||||
|
|
29
pkgs/development/interpreters/anko/default.nix
Normal file
29
pkgs/development/interpreters/anko/default.nix
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
{ lib
|
||||||
|
, buildGoModule
|
||||||
|
, fetchFromGitHub
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildGoModule rec {
|
||||||
|
pname = "anko";
|
||||||
|
version = "0.1.9";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "mattn";
|
||||||
|
repo = "anko";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-ZVNkQu5IxBx3f+FkUWc36EOEcY176wQJ2ravLPQAHAA=";
|
||||||
|
};
|
||||||
|
|
||||||
|
vendorHash = null;
|
||||||
|
|
||||||
|
ldflags = [ "-s" "-w" ];
|
||||||
|
|
||||||
|
__darwinAllowLocalNetworking = true;
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Scriptable interpreter written in golang";
|
||||||
|
homepage = "https://github.com/mattn/anko";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ figsoda ];
|
||||||
|
};
|
||||||
|
}
|
38
pkgs/development/interpreters/cel-go/default.nix
Normal file
38
pkgs/development/interpreters/cel-go/default.nix
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
{ lib
|
||||||
|
, buildGoModule
|
||||||
|
, fetchFromGitHub
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildGoModule rec {
|
||||||
|
pname = "cel-go";
|
||||||
|
version = "0.17.1";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "google";
|
||||||
|
repo = "cel-go";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-qk7jopOr/woWCi5j509K4bdlIybuZZ+UFTmTHEEw9/Y=";
|
||||||
|
};
|
||||||
|
|
||||||
|
sourceRoot = "${src.name}/repl";
|
||||||
|
|
||||||
|
vendorHash = "sha256-OypSL91/2FVCF3ADNSJH33JxH0+3HxIziwmXHb/vZM4=";
|
||||||
|
|
||||||
|
subPackages = [
|
||||||
|
"main"
|
||||||
|
];
|
||||||
|
|
||||||
|
ldflags = [ "-s" "-w" ];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
mv $out/bin/{main,cel-go}
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Fast, portable, non-Turing complete expression evaluation with gradual typing";
|
||||||
|
homepage = "https://github.com/google/cel-go";
|
||||||
|
changelog = "https://github.com/google/cel-go/releases/tag/${src.rev}";
|
||||||
|
license = licenses.asl20;
|
||||||
|
maintainers = with maintainers; [ figsoda ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "clojure";
|
pname = "clojure";
|
||||||
version = "1.11.1.1347";
|
version = "1.11.1.1356";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
# https://clojure.org/releases/tools
|
# https://clojure.org/releases/tools
|
||||||
url = "https://download.clojure.org/install/clojure-tools-${finalAttrs.version}.tar.gz";
|
url = "https://download.clojure.org/install/clojure-tools-${finalAttrs.version}.tar.gz";
|
||||||
hash = "sha256-1ebAPk64tJt/Cpt3pKfMTN50YABKPflqG055f4Quv+M=";
|
hash = "sha256-Gshzo0ill96R+15DuFEdHo2bx3ePuRIuYXJfNF9jkIM=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
|
38
pkgs/development/interpreters/cyber/default.nix
Normal file
38
pkgs/development/interpreters/cyber/default.nix
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, fetchFromGitHub
|
||||||
|
, zig_0_11
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "cyber";
|
||||||
|
version = "unstable-2023-08-11";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "fubark";
|
||||||
|
repo = "cyber";
|
||||||
|
rev = "242ba2573cbac2acecc8c06878a8d754dd7a8716";
|
||||||
|
hash = "sha256-jArkFdvWnHNouNGsTn8O2lbU7eZdLbPD0xEfkrFH5Aw=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
zig_0_11.hook
|
||||||
|
];
|
||||||
|
|
||||||
|
zigBuildFlags = [
|
||||||
|
"cli"
|
||||||
|
];
|
||||||
|
|
||||||
|
env = {
|
||||||
|
COMMIT = lib.substring 0 7 src.rev;
|
||||||
|
};
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "A fast, efficient, and concurrent scripting language";
|
||||||
|
homepage = "https://github.com/fubark/cyber";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ figsoda ];
|
||||||
|
inherit (zig_0_11.meta) platforms;
|
||||||
|
broken = stdenv.isDarwin;
|
||||||
|
};
|
||||||
|
}
|
|
@ -85,7 +85,7 @@ let
|
||||||
|
|
||||||
php-packages = (callPackage ../../../top-level/php-packages.nix {
|
php-packages = (callPackage ../../../top-level/php-packages.nix {
|
||||||
phpPackage = phpWithExtensions;
|
phpPackage = phpWithExtensions;
|
||||||
}).overrideScope' packageOverrides;
|
}).overrideScope packageOverrides;
|
||||||
|
|
||||||
allExtensionFunctions = prevExtensionFunctions ++ [ extensions ];
|
allExtensionFunctions = prevExtensionFunctions ++ [ extensions ];
|
||||||
enabledExtensions =
|
enabledExtensions =
|
||||||
|
|
45
pkgs/development/interpreters/yaegi/default.nix
Normal file
45
pkgs/development/interpreters/yaegi/default.nix
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
{ lib
|
||||||
|
, buildGoModule
|
||||||
|
, fetchFromGitHub
|
||||||
|
, testers
|
||||||
|
, yaegi
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildGoModule rec {
|
||||||
|
pname = "yaegi";
|
||||||
|
version = "0.15.1";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "traefik";
|
||||||
|
repo = "yaegi";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-ZV1HidHJvwum18QIIwQiCcRcitZdHk5+FxkPs6YgDac=";
|
||||||
|
};
|
||||||
|
|
||||||
|
vendorHash = null;
|
||||||
|
|
||||||
|
subPackages = [
|
||||||
|
"cmd/yaegi"
|
||||||
|
];
|
||||||
|
|
||||||
|
ldflags = [
|
||||||
|
"-s"
|
||||||
|
"-w"
|
||||||
|
"-X=main.version=${version}"
|
||||||
|
];
|
||||||
|
|
||||||
|
passthru.tests = {
|
||||||
|
version = testers.testVersion {
|
||||||
|
package = yaegi;
|
||||||
|
command = "yaegi version";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "A Go interpreter";
|
||||||
|
homepage = "https://github.com/traefik/yaegi";
|
||||||
|
changelog = "https://github.com/traefik/yaegi/releases/tag/${src.rev}";
|
||||||
|
license = licenses.asl20;
|
||||||
|
maintainers = with maintainers; [ figsoda ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -85,7 +85,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
'' + lib.optionalString buildSamples ''
|
'' + lib.optionalString buildSamples ''
|
||||||
mkdir -p $sample/bin
|
mkdir -p $sample/bin
|
||||||
mv clients/staging/hipfft_* $sample/bin
|
mv clients/staging/hipfft_* $sample/bin
|
||||||
patchelf $sample/bin/hipfft_* --shrink-rpath --allowed-rpath-prefixes /nix/store
|
patchelf $sample/bin/hipfft_* --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE"
|
||||||
'' + lib.optionalString (buildTests || buildBenchmarks) ''
|
'' + lib.optionalString (buildTests || buildBenchmarks) ''
|
||||||
rmdir $out/bin
|
rmdir $out/bin
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -78,7 +78,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
'' + lib.optionalString buildSamples ''
|
'' + lib.optionalString buildSamples ''
|
||||||
mkdir -p $sample/bin
|
mkdir -p $sample/bin
|
||||||
mv clients/staging/example-* $sample/bin
|
mv clients/staging/example-* $sample/bin
|
||||||
patchelf $sample/bin/example-* --shrink-rpath --allowed-rpath-prefixes /nix/store
|
patchelf $sample/bin/example-* --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE"
|
||||||
'' + lib.optionalString (buildTests || buildBenchmarks) ''
|
'' + lib.optionalString (buildTests || buildBenchmarks) ''
|
||||||
rmdir $out/bin
|
rmdir $out/bin
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -140,7 +140,7 @@ in stdenv.mkDerivation (finalAttrs: {
|
||||||
'' + lib.optionalString buildTests ''
|
'' + lib.optionalString buildTests ''
|
||||||
mkdir -p $test/bin
|
mkdir -p $test/bin
|
||||||
mv bin/test_* $test/bin
|
mv bin/test_* $test/bin
|
||||||
patchelf $test/bin/test_* --shrink-rpath --allowed-rpath-prefixes /nix/store
|
patchelf $test/bin/test_* --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru.updateScript = rocmUpdateScript {
|
passthru.updateScript = rocmUpdateScript {
|
||||||
|
|
|
@ -47,12 +47,13 @@ qtModule {
|
||||||
|
|
||||||
doCheck = false; # fails 13 out of 13 tests (ctest)
|
doCheck = false; # fails 13 out of 13 tests (ctest)
|
||||||
|
|
||||||
# Hack to avoid TMPDIR in RPATHs.
|
# remove forbidden references to $TMPDIR
|
||||||
preFixup = ''
|
preFixup = lib.optionalString stdenv.isLinux ''
|
||||||
rm -rf "$(pwd)"
|
patchelf --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" "$out"/libexec/*
|
||||||
mkdir "$(pwd)"
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
maintainers = with lib.maintainers; [ abbradar periklis ];
|
maintainers = with lib.maintainers; [ abbradar periklis ];
|
||||||
knownVulnerabilities = [
|
knownVulnerabilities = [
|
||||||
|
|
|
@ -299,7 +299,7 @@ let
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
spec = { inherit pkg faslExt program flags asdf; };
|
spec = { inherit pkg faslExt program flags asdf; };
|
||||||
pkgs = (commonLispPackagesFor spec).overrideScope' packageOverrides;
|
pkgs = (commonLispPackagesFor spec).overrideScope packageOverrides;
|
||||||
withPackages = lispWithPackages pkgs;
|
withPackages = lispWithPackages pkgs;
|
||||||
withOverrides = packageOverrides:
|
withOverrides = packageOverrides:
|
||||||
wrapLisp {
|
wrapLisp {
|
||||||
|
|
|
@ -50,7 +50,7 @@ let
|
||||||
# lispLibs ofpackages in this file.
|
# lispLibs ofpackages in this file.
|
||||||
ql = quicklispPackagesFor spec;
|
ql = quicklispPackagesFor spec;
|
||||||
|
|
||||||
packages = ql.overrideScope' (self: super: {
|
packages = ql.overrideScope (self: super: {
|
||||||
|
|
||||||
cffi = let
|
cffi = let
|
||||||
jna = pkgs.fetchMavenArtifact {
|
jna = pkgs.fetchMavenArtifact {
|
||||||
|
|
|
@ -266,4 +266,4 @@ let
|
||||||
lib.optionalAttrs (builtins.pathExists ./imported.nix)
|
lib.optionalAttrs (builtins.pathExists ./imported.nix)
|
||||||
(pkgs.callPackage ./imported.nix { inherit build-asdf-system; });
|
(pkgs.callPackage ./imported.nix { inherit build-asdf-system; });
|
||||||
|
|
||||||
in qlpkgs.overrideScope' overrides
|
in qlpkgs.overrideScope overrides
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
buildDunePackage
|
buildDunePackage
|
||||||
rec {
|
rec {
|
||||||
pname = "linol";
|
pname = "linol";
|
||||||
version = "2023-04-25";
|
version = "2023-08-04";
|
||||||
|
|
||||||
minimalOCamlVersion = "4.14";
|
minimalOCamlVersion = "4.14";
|
||||||
duneVersion = "3";
|
duneVersion = "3";
|
||||||
|
@ -12,8 +12,8 @@ rec {
|
||||||
owner = "c-cube";
|
owner = "c-cube";
|
||||||
repo = "linol";
|
repo = "linol";
|
||||||
# Brings support for newer LSP
|
# Brings support for newer LSP
|
||||||
rev = "439534e0c5b7a3fbf93ba05fae7d171426153763";
|
rev = "09311ae258c55c53c62cb5eda3641682e61fe191";
|
||||||
sha256 = "sha256-EW35T7KUc/L1Zy4+oaJOC6mlVpbvhTfnU3NNFGoZAJg=";
|
sha256 = "sha256-51k+Eo3buzby9cWtbl+/0wbAxa2QSS+Oq0aEao0VBCM=";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [ yojson logs lsp ppx_yojson_conv_lib ];
|
propagatedBuildInputs = [ yojson logs lsp ppx_yojson_conv_lib ];
|
||||||
|
|
|
@ -7,13 +7,13 @@
|
||||||
|
|
||||||
buildDunePackage rec {
|
buildDunePackage rec {
|
||||||
pname = "thread-table";
|
pname = "thread-table";
|
||||||
version = "0.1.0";
|
version = "1.0.0";
|
||||||
|
|
||||||
minimalOCamlVersion = "4.08";
|
minimalOCamlVersion = "4.08";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/ocaml-multicore/${pname}/releases/download/${version}/${pname}-${version}.tbz";
|
url = "https://github.com/ocaml-multicore/${pname}/releases/download/${version}/${pname}-${version}.tbz";
|
||||||
sha256 = "d84BwC9W5udWJgYuaQwmA1e2d6uk0v210M7nK72VjXs=";
|
sha256 = "pIzYhGNZfflELEuqaczAYJHKd7px5DjTYJ+64PO4Hd0=";
|
||||||
};
|
};
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
|
@ -77,7 +77,7 @@ stdenv.mkDerivation {
|
||||||
mkdir "$out/bin"
|
mkdir "$out/bin"
|
||||||
cp build/vm/*.so* "$out/lib/"
|
cp build/vm/*.so* "$out/lib/"
|
||||||
cp build/vm/pharo "$out/bin/pharo"
|
cp build/vm/pharo "$out/bin/pharo"
|
||||||
patchelf --allowed-rpath-prefixes /nix/store --shrink-rpath "$out/bin/pharo"
|
patchelf --allowed-rpath-prefixes "$NIX_STORE" --shrink-rpath "$out/bin/pharo"
|
||||||
wrapProgram "$out/bin/pharo" --set LD_LIBRARY_PATH "${library_path}"
|
wrapProgram "$out/bin/pharo" --set LD_LIBRARY_PATH "${library_path}"
|
||||||
|
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, mock
|
, mock
|
||||||
, parameterized
|
, parameterized
|
||||||
|
, pip
|
||||||
, pyelftools
|
, pyelftools
|
||||||
, pytestCheckHook
|
, pytestCheckHook
|
||||||
, pythonOlder
|
, pythonOlder
|
||||||
|
@ -30,6 +31,7 @@ buildPythonPackage rec {
|
||||||
nativeCheckInputs = [
|
nativeCheckInputs = [
|
||||||
mock
|
mock
|
||||||
parameterized
|
parameterized
|
||||||
|
pip
|
||||||
pyelftools
|
pyelftools
|
||||||
pytestCheckHook
|
pytestCheckHook
|
||||||
];
|
];
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, jupyterhub
|
, jupyterhub
|
||||||
|
, packaging
|
||||||
, pythonOlder
|
, pythonOlder
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -21,6 +22,7 @@ buildPythonPackage rec {
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
jupyterhub
|
jupyterhub
|
||||||
|
packaging
|
||||||
];
|
];
|
||||||
|
|
||||||
# Tests require a job scheduler e.g. slurm, pbs, etc.
|
# Tests require a job scheduler e.g. slurm, pbs, etc.
|
||||||
|
@ -32,8 +34,9 @@ buildPythonPackage rec {
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A spawner for Jupyterhub to spawn notebooks using batch resource managers";
|
description = "A spawner for Jupyterhub to spawn notebooks using batch resource managers";
|
||||||
homepage = "https://jupyter.org";
|
homepage = "https://github.com/jupyterhub/batchspawner";
|
||||||
|
changelog = "https://github.com/jupyterhub/batchspawner/blob/v${version}/CHANGELOG.md";
|
||||||
license = licenses.bsd3;
|
license = licenses.bsd3;
|
||||||
maintainers = [ ];
|
maintainers = with maintainers; [ ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,14 +7,14 @@
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "django-classy-tags";
|
pname = "django-classy-tags";
|
||||||
version = "4.0.0";
|
version = "4.1.0";
|
||||||
format = "setuptools";
|
format = "setuptools";
|
||||||
|
|
||||||
disabled = pythonOlder "3.7";
|
disabled = pythonOlder "3.8";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
hash = "sha256-25/Hxe0I3CYZzEwZsZUUzawT3bYYJ4qwcJTGJtKO7w0=";
|
hash = "sha256-yNnRqi+m5xxNhm303RHSOmm40lu7dQskkKF7Fhd07lk=";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
|
|
|
@ -10,12 +10,12 @@
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "dvc-azure";
|
pname = "dvc-azure";
|
||||||
version = "2.22.0";
|
version = "2.22.1";
|
||||||
format = "setuptools";
|
format = "setuptools";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
hash = "sha256-aGPh77HLeUcddGtmFcLd9bc+WaYAFUprtpFkw3h5iSc=";
|
hash = "sha256-v3VRCN1OoST5RlfUOP9Dpfmf3o9C/ckusmh91Ya2Cik=";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Prevent circular dependency
|
# Prevent circular dependency
|
||||||
|
|
|
@ -10,12 +10,12 @@
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "dvc-ssh";
|
pname = "dvc-ssh";
|
||||||
version = "2.22.1";
|
version = "2.22.2";
|
||||||
format = "setuptools";
|
format = "setuptools";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
hash = "sha256-WHFfq0Cw17AWgmUlkZUOO6t6XcPYjLHUz4s0wcVYklc=";
|
hash = "sha256-eJwNCZvdBqYKEbX4On3pGm2bzCvH9G7rdsgeN7XPJB0=";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Prevent circular dependency
|
# Prevent circular dependency
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "dvc-studio-client";
|
pname = "dvc-studio-client";
|
||||||
version = "0.12.0";
|
version = "0.13.0";
|
||||||
format = "pyproject";
|
format = "pyproject";
|
||||||
|
|
||||||
disabled = pythonOlder "3.8";
|
disabled = pythonOlder "3.8";
|
||||||
|
@ -20,7 +20,7 @@ buildPythonPackage rec {
|
||||||
owner = "iterative";
|
owner = "iterative";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "refs/tags/${version}";
|
rev = "refs/tags/${version}";
|
||||||
hash = "sha256-Y2SMcz7aaYH1k4ieLwEijBkf6AMbCltsXBocafIVMcM=";
|
hash = "sha256-m4UJRRwY+aJdPIMHPIWe3En7FCADeT1qCZnu3BJeYXc=";
|
||||||
};
|
};
|
||||||
|
|
||||||
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
||||||
|
|
|
@ -55,14 +55,14 @@
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "dvc";
|
pname = "dvc";
|
||||||
version = "3.14.0";
|
version = "3.15.2";
|
||||||
format = "pyproject";
|
format = "pyproject";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "iterative";
|
owner = "iterative";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "refs/tags/${version}";
|
rev = "refs/tags/${version}";
|
||||||
hash = "sha256-UVDzcbVRG94vM7s78uscsJ7Oq8HvHowAN2Hj+thbrvU=";
|
hash = "sha256-dp4WovmiSHgjk48aq4BjEed80XFHgd61BkRQbYgxp0A=";
|
||||||
};
|
};
|
||||||
|
|
||||||
pythonRelaxDeps = [
|
pythonRelaxDeps = [
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "flux-led";
|
pname = "flux-led";
|
||||||
version = "1.0.1";
|
version = "1.0.2";
|
||||||
format = "setuptools";
|
format = "setuptools";
|
||||||
|
|
||||||
disabled = pythonOlder "3.7";
|
disabled = pythonOlder "3.7";
|
||||||
|
@ -18,7 +18,7 @@ buildPythonPackage rec {
|
||||||
owner = "Danielhiversen";
|
owner = "Danielhiversen";
|
||||||
repo = "flux_led";
|
repo = "flux_led";
|
||||||
rev = "refs/tags/${version}";
|
rev = "refs/tags/${version}";
|
||||||
hash = "sha256-+eklvdmlWrwvdI6IwNyAIEI0kDlzIYh7bzNY94dzA+E=";
|
hash = "sha256-DfC92gqPP9Lky4gX2v8/AbZgM7uRCKjRQC2nS/sDHsY=";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
|
|
|
@ -13,14 +13,14 @@
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "google-api-python-client";
|
pname = "google-api-python-client";
|
||||||
version = "2.88.0";
|
version = "2.96.0";
|
||||||
format = "setuptools";
|
format = "setuptools";
|
||||||
|
|
||||||
disabled = pythonOlder "3.7";
|
disabled = pythonOlder "3.7";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
hash = "sha256-NwaEU/eeoo5TlKj+IKS6YgWU5/hUEGi+ouhE2s3MnTM=";
|
hash = "sha256-9xI3PQPTOK9XufX+mMkfS1uqqHZUabAVvGI8RoHFvVE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
|
|
|
@ -23,6 +23,13 @@ buildPythonPackage rec {
|
||||||
sha256 = "0ymjv322mv6y424fmpd70f87152w55mbwwj6i7p3sjzf0ixmxy26";
|
sha256 = "0ymjv322mv6y424fmpd70f87152w55mbwwj6i7p3sjzf0ixmxy26";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
for f in influxdb/tests/dataframe_client_test.py influxdb/tests/influxdb08/dataframe_client_test.py; do
|
||||||
|
substituteInPlace "$f" \
|
||||||
|
--replace "pandas.util.testing" "pandas.testing"
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
requests
|
requests
|
||||||
python-dateutil
|
python-dateutil
|
||||||
|
@ -51,6 +58,9 @@ buildPythonPackage rec {
|
||||||
"test_write_points_from_dataframe_with_tags_and_nan_json"
|
"test_write_points_from_dataframe_with_tags_and_nan_json"
|
||||||
# Reponse is not empty but `s = '孝'` and the JSON decoder chokes on that
|
# Reponse is not empty but `s = '孝'` and the JSON decoder chokes on that
|
||||||
"test_query_with_empty_result"
|
"test_query_with_empty_result"
|
||||||
|
# Pandas API changes cause it to no longer infer datetimes in the expected manner
|
||||||
|
"test_multiquery_into_dataframe"
|
||||||
|
"test_multiquery_into_dataframe_dropna"
|
||||||
];
|
];
|
||||||
|
|
||||||
pythonImportsCheck = [ "influxdb" ];
|
pythonImportsCheck = [ "influxdb" ];
|
||||||
|
|
|
@ -1,29 +1,26 @@
|
||||||
{ lib
|
{ lib
|
||||||
|
, bash
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, jupyterhub
|
, jupyterhub
|
||||||
|
, pythonOlder
|
||||||
, tornado
|
, tornado
|
||||||
, bash
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "jupyterhub-systemdspawner";
|
pname = "jupyterhub-systemdspawner";
|
||||||
version = "0.15";
|
version = "1.0.1";
|
||||||
|
format = "setuptools";
|
||||||
|
|
||||||
|
disabled = pythonOlder "3.8";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "jupyterhub";
|
owner = "jupyterhub";
|
||||||
repo = "systemdspawner";
|
repo = "systemdspawner";
|
||||||
rev = "v${version}";
|
rev = "refs/tags/v${version}";
|
||||||
hash = "sha256-EUCA+CKCeYr+cLVrqTqe3Q32JkbqeALL6tfOnlVHk8Q=";
|
hash = "sha256-2Pxswa472umovHBUVTIX1l+Glj6bzzgBLsu+p4IA6jA=";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
|
||||||
jupyterhub
|
|
||||||
tornado
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = [ bash ];
|
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace systemdspawner/systemd.py \
|
substituteInPlace systemdspawner/systemd.py \
|
||||||
--replace "/bin/bash" "${bash}/bin/bash"
|
--replace "/bin/bash" "${bash}/bin/bash"
|
||||||
|
@ -32,7 +29,16 @@ buildPythonPackage rec {
|
||||||
--replace "/bin/bash" "${bash}/bin/bash"
|
--replace "/bin/bash" "${bash}/bin/bash"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# no tests
|
buildInputs = [
|
||||||
|
bash
|
||||||
|
];
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
jupyterhub
|
||||||
|
tornado
|
||||||
|
];
|
||||||
|
|
||||||
|
# Module has no tests
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
|
@ -41,9 +47,14 @@ buildPythonPackage rec {
|
||||||
patchShebangs $out/bin
|
patchShebangs $out/bin
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
pythonImportsCheck = [
|
||||||
|
"systemdspawner"
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "JupyterHub Spawner using systemd for resource isolation";
|
description = "JupyterHub Spawner using systemd for resource isolation";
|
||||||
homepage = "https://github.com/jupyterhub/systemdspawner";
|
homepage = "https://github.com/jupyterhub/systemdspawner";
|
||||||
|
changelog = "https://github.com/jupyterhub/systemdspawner/blob/v${version}/CHANGELOG.md";
|
||||||
license = licenses.bsd3;
|
license = licenses.bsd3;
|
||||||
maintainers = with maintainers; [ ];
|
maintainers = with maintainers; [ ];
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,30 +1,38 @@
|
||||||
{ lib
|
{ lib
|
||||||
, stdenv
|
, stdenv
|
||||||
, buildPythonPackage
|
|
||||||
, pythonOlder
|
|
||||||
, fetchPypi
|
|
||||||
, fetchzip
|
|
||||||
, alembic
|
, alembic
|
||||||
, async-generator
|
, async-generator
|
||||||
|
, beautifulsoup4
|
||||||
|
, buildPythonPackage
|
||||||
, certipy
|
, certipy
|
||||||
, python-dateutil
|
, cryptography
|
||||||
, entrypoints
|
, entrypoints
|
||||||
|
, fetchPypi
|
||||||
|
, fetchzip
|
||||||
|
, importlib-metadata
|
||||||
, jinja2
|
, jinja2
|
||||||
|
, jsonschema
|
||||||
, jupyter-telemetry
|
, jupyter-telemetry
|
||||||
|
, jupyterlab
|
||||||
|
, mock
|
||||||
|
, nbclassic
|
||||||
|
, nodePackages
|
||||||
|
, notebook
|
||||||
, oauthlib
|
, oauthlib
|
||||||
|
, packaging
|
||||||
, pamela
|
, pamela
|
||||||
|
, playwright
|
||||||
, prometheus-client
|
, prometheus-client
|
||||||
|
, pytest-asyncio
|
||||||
|
, pytestCheckHook
|
||||||
|
, python-dateutil
|
||||||
|
, pythonOlder
|
||||||
, requests
|
, requests
|
||||||
|
, requests-mock
|
||||||
|
, selenium
|
||||||
, sqlalchemy
|
, sqlalchemy
|
||||||
, tornado
|
, tornado
|
||||||
, traitlets
|
, traitlets
|
||||||
, nodePackages
|
|
||||||
, beautifulsoup4
|
|
||||||
, cryptography
|
|
||||||
, notebook
|
|
||||||
, pytest-asyncio
|
|
||||||
, pytestCheckHook
|
|
||||||
, requests-mock
|
|
||||||
, virtualenv
|
, virtualenv
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -61,12 +69,14 @@ in
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "jupyterhub";
|
pname = "jupyterhub";
|
||||||
version = "1.5.0";
|
version = "4.0.1";
|
||||||
disabled = pythonOlder "3.6";
|
format = "setuptools";
|
||||||
|
|
||||||
|
disabled = pythonOlder "3.7";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
hash = "sha256-3GGPZXwjukYoDjYlflCTGAZnS6Dp5kmK+wke/GIm1p0=";
|
hash = "sha256-jig/9Z5cQBZxIHfSVJ7XSs2RWjKDb+ACGGeKh4G9ft4=";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Most of this only applies when building from source (e.g. js/css assets are
|
# Most of this only applies when building from source (e.g. js/css assets are
|
||||||
|
@ -111,7 +121,6 @@ buildPythonPackage rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
# https://github.com/jupyterhub/jupyterhub/blob/master/requirements.txt
|
|
||||||
alembic
|
alembic
|
||||||
async-generator
|
async-generator
|
||||||
certipy
|
certipy
|
||||||
|
@ -120,12 +129,16 @@ buildPythonPackage rec {
|
||||||
jinja2
|
jinja2
|
||||||
jupyter-telemetry
|
jupyter-telemetry
|
||||||
oauthlib
|
oauthlib
|
||||||
|
packaging
|
||||||
pamela
|
pamela
|
||||||
prometheus-client
|
prometheus-client
|
||||||
requests
|
requests
|
||||||
|
selenium
|
||||||
sqlalchemy
|
sqlalchemy
|
||||||
tornado
|
tornado
|
||||||
traitlets
|
traitlets
|
||||||
|
] ++ lib.optionals (pythonOlder "3.10") [
|
||||||
|
importlib-metadata
|
||||||
];
|
];
|
||||||
|
|
||||||
preCheck = ''
|
preCheck = ''
|
||||||
|
@ -134,10 +147,14 @@ buildPythonPackage rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeCheckInputs = [
|
nativeCheckInputs = [
|
||||||
# https://github.com/jupyterhub/jupyterhub/blob/master/dev-requirements.txt
|
|
||||||
beautifulsoup4
|
beautifulsoup4
|
||||||
cryptography
|
cryptography
|
||||||
notebook
|
notebook
|
||||||
|
jsonschema
|
||||||
|
nbclassic
|
||||||
|
mock
|
||||||
|
jupyterlab
|
||||||
|
playwright
|
||||||
pytest-asyncio
|
pytest-asyncio
|
||||||
pytestCheckHook
|
pytestCheckHook
|
||||||
requests-mock
|
requests-mock
|
||||||
|
@ -151,14 +168,39 @@ buildPythonPackage rec {
|
||||||
"test_external_service"
|
"test_external_service"
|
||||||
# attempts to do ssl connection
|
# attempts to do ssl connection
|
||||||
"test_connection_notebook_wrong_certs"
|
"test_connection_notebook_wrong_certs"
|
||||||
|
# AttributeError: 'coroutine' object...
|
||||||
|
"test_valid_events"
|
||||||
|
"test_invalid_events"
|
||||||
|
"test_user_group_roles"
|
||||||
|
];
|
||||||
|
|
||||||
|
disabledTestPaths = [
|
||||||
|
# Not testing with a running instance
|
||||||
|
# AttributeError: 'coroutine' object has no attribute 'db'
|
||||||
|
"docs/test_docs.py"
|
||||||
|
"jupyterhub/tests/browser/test_browser.py"
|
||||||
|
"jupyterhub/tests/test_api.py"
|
||||||
|
"jupyterhub/tests/test_auth_expiry.py"
|
||||||
|
"jupyterhub/tests/test_auth.py"
|
||||||
|
"jupyterhub/tests/test_metrics.py"
|
||||||
|
"jupyterhub/tests/test_named_servers.py"
|
||||||
|
"jupyterhub/tests/test_orm.py"
|
||||||
|
"jupyterhub/tests/test_pages.py"
|
||||||
|
"jupyterhub/tests/test_proxy.py"
|
||||||
|
"jupyterhub/tests/test_scopes.py"
|
||||||
|
"jupyterhub/tests/test_services_auth.py"
|
||||||
|
"jupyterhub/tests/test_singleuser.py"
|
||||||
|
"jupyterhub/tests/test_spawner.py"
|
||||||
|
"jupyterhub/tests/test_user.py"
|
||||||
];
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
broken = lib.versionAtLeast sqlalchemy.version "2.0";
|
|
||||||
description = "Serves multiple Jupyter notebook instances";
|
description = "Serves multiple Jupyter notebook instances";
|
||||||
homepage = "https://jupyter.org/";
|
homepage = "https://jupyter.org/";
|
||||||
changelog = "https://github.com/jupyterhub/jupyterhub/blob/${version}/docs/source/changelog.md";
|
changelog = "https://github.com/jupyterhub/jupyterhub/blob/${version}/docs/source/reference/changelog.md";
|
||||||
license = licenses.bsd3;
|
license = licenses.bsd3;
|
||||||
maintainers = with maintainers; [ ixxie cstrahan ];
|
maintainers = with maintainers; [ ixxie cstrahan ];
|
||||||
|
# darwin: E OSError: dlopen(/nix/store/43zml0mlr17r5jsagxr00xxx91hz9lky-openpam-20170430/lib/libpam.so, 6): image not found
|
||||||
|
broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,5 +28,8 @@ buildPythonPackage rec {
|
||||||
license = licenses.bsd3;
|
license = licenses.bsd3;
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
maintainers = with maintainers; [ ];
|
maintainers = with maintainers; [ ];
|
||||||
|
# No support for Jupyterlab > 4
|
||||||
|
# https://github.com/jupyter-lsp/jupyterlab-lsp/pull/949
|
||||||
|
broken = lib.versionAtLeast jupyterlab.version "4.0";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue