-Nixpkgs is a collection of packages for the [Nix](https://nixos.org/nix/) package
-manager. It is periodically built and tested by the [Hydra](https://hydra.nixos.org/)
-build daemon as so-called channels. To get channel information via git, add
-[nixpkgs-channels](https://github.com/NixOS/nixpkgs-channels.git) as a remote:
+[Nixpkgs](https://github.com/nixos/nixpkgs) is a collection of over
+40,000 software packages that can be installed with the
+[Nix](https://nixos.org/nix/) package manager. It also implements
+[NixOS](https://nixos.org/nixos/), a purely-functional Linux distribution.
-```
-% git remote add channels https://github.com/NixOS/nixpkgs-channels.git
-```
+# Manuals
-For stability and maximum binary package support, it is recommended to maintain
-custom changes on top of one of the channels, e.g. `nixos-19.03` for the latest
-release and `nixos-unstable` for the latest successful build of master:
+* [NixOS Manual](https://nixos.org/nixos/manual) - how to install, configure, and maintain a purely-functional Linux distribution
+* [Nixpkgs Manual](https://nixos.org/nixpkgs/manual/) - contributing to Nixpkgs and using programming-language-specific Nix expressions
+* [Nix Package Manager Manual](https://nixos.org/nix/manual) - how to write Nix expresssions (programs), and how to use Nix command line tools
-```
-% git remote update channels
-% git rebase channels/nixos-19.03
-```
-
-For pull requests, please rebase onto nixpkgs `master`.
-
-[NixOS](https://nixos.org/nixos/) Linux distribution source code is located inside
-`nixos/` folder.
-
-* [NixOS installation instructions](https://nixos.org/nixos/manual/#ch-installation)
-* [Documentation (Nix Expression Language chapter)](https://nixos.org/nix/manual/#ch-expression-language)
-* [Manual (How to write packages for Nix)](https://nixos.org/nixpkgs/manual/)
-* [Manual (NixOS)](https://nixos.org/nixos/manual/)
-* [Community maintained wiki](https://nixos.wiki/)
-* [Continuous package builds for unstable/master](https://hydra.nixos.org/jobset/nixos/trunk-combined)
-* [Continuous package builds for 19.03 release](https://hydra.nixos.org/jobset/nixos/release-19.03)
-* [Tests for unstable/master](https://hydra.nixos.org/job/nixos/trunk-combined/tested#tabs-constituents)
-* [Tests for 19.03 release](https://hydra.nixos.org/job/nixos/release-19.03/tested#tabs-constituents)
-
-Communication:
+# Community
* [Discourse Forum](https://discourse.nixos.org/)
* [IRC - #nixos on freenode.net](irc://irc.freenode.net/#nixos)
+* [NixOS Weekly](https://weekly.nixos.org/)
+* [Community-maintained wiki](https://nixos.wiki/)
-Note: MIT license does not apply to the packages built by Nixpkgs, merely to
-the package descriptions (Nix expressions, build scripts, and so on). It also
-might not apply to patches included in Nixpkgs, which may be derivative works
-of the packages to which they apply. The aforementioned artifacts are all
-covered by the licenses of the respective packages.
+# Other Project Repositories
+
+The sources of all offical Nix-related projects are in the [NixOS
+organization on GitHub](https://github.com/NixOS/). Here are some of
+the main ones:
+
+* [Nix](https://github.com/NixOS/nix) - the purely functional package manager
+* [NixOps](https://github.com/NixOS/nixops) - the tool to remotely deploy NixOS machines
+* [Nix RFCs](https://github.com/NixOS/rfcs) - the formal process for making substantial changes to the community
+* [NixOS homepage](https://github.com/NixOS/nixos-homepage) - the [NixOS.org](https://nixos.org) website
+* [hydra](https://github.com/NixOS/hydra) - our continuous integration system
+* [NixOS Artwork](https://github.com/NixOS/nixos-artwork) - NixOS artwork
+
+# Continuous Integration and Distribution
+
+Nixpkgs and NixOS are built and tested by our continuous integration
+system, [Hydra](https://hydra.nixos.org/).
+
+* [Continuous package builds for unstable/master](https://hydra.nixos.org/jobset/nixos/trunk-combined)
+* [Continuous package builds for the NixOS 19.09 release](https://hydra.nixos.org/jobset/nixos/release-19.09)
+* [Tests for unstable/master](https://hydra.nixos.org/job/nixos/trunk-combined/tested#tabs-constituents)
+* [Tests for the NixOS 19.09 release](https://hydra.nixos.org/job/nixos/release-19.09/tested#tabs-constituents)
+
+Artifacts successfully built with Hydra are published to cache at
+https://cache.nixos.org/. When successful build and test criteria are
+met, the Nixpkgs expressions are distributed via [Nix
+channels](https://nixos.org/nix/manual/#sec-channels).
+
+# Contributing
+
+Nixpkgs is among the most active projects on GitHub. While thousands
+of open issues and pull requests might seem a lot at first, it helps
+consider it in the context of the scope of the project. Nixpkgs
+describes how to build over 40,000 pieces of software and implements a
+Linux distribution. The [GitHub Insights](https://github.com/NixOS/nixpkgs/pulse)
+page gives a sense of the project activity.
+
+Community contributions are always welcome through GitHub Issues and
+Pull Requests. When pull requests are made, our tooling automation bot,
+[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
+the [contributing page](https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md).
+
+# Donations
+
+The infrastructure for NixOS and related projects is maintained by a
+nonprofit organization, the [NixOS
+Foundation](https://nixos.org/nixos/foundation.html). To ensure the
+continuity and expansion of the NixOS infrastructure, we are looking
+for donations to our organization.
+
+You can donate to the NixOS foundation by using Open Collective:
+
+
+
+# License
+
+Nixpkgs is licensed under the [MIT License](COPYING).
+
+Note: MIT license does not apply to the packages built by Nixpkgs,
+merely to the files in this repository (the Nix expressions, build
+scripts, NixOS modules, etc.). It also might not apply to patches
+included in Nixpkgs, which may be derivative works of the packages to
+which they apply. The aforementioned artifacts are all covered by the
+licenses of the respective packages.
diff --git a/doc/builders/fetchers.xml b/doc/builders/fetchers.xml
new file mode 100644
index 000000000000..6f8990e8d16c
--- /dev/null
+++ b/doc/builders/fetchers.xml
@@ -0,0 +1,148 @@
+
+ Fetchers
+
+
+ When using Nix, you will frequently need to download source code and other files from the internet. Nixpkgs comes with a few helper functions that allow you to fetch fixed-output derivations in a structured way.
+
+
+
+ The two fetcher primitives are fetchurl and fetchzip. Both of these have two required arguments, a URL and a hash. The hash is typically sha256, although many more hash algorithms are supported. Nixpkgs contributors are currently recommended to use sha256. This hash will be used by Nix to identify your source. A typical usage of fetchurl is provided below.
+
+
+
+
+
+ The main difference between fetchurl and fetchzip is in how they store the contents. fetchurl will store the unaltered contents of the URL within the Nix store. fetchzip on the other hand will decompress the archive for you, making files and directories directly accessible in the future. fetchzip can only be used with archives. Despite the name, fetchzip is not limited to .zip files and can also be used with any tarball.
+
+
+
+ fetchpatch works very similarly to fetchurl with the same arguments expected. It expects patch files as a source and and performs normalization on them before computing the checksum. For example it will remove comments or other unstable parts that are sometimes added by version control systems and can change over time.
+
+
+
+ Other fetcher functions allow you to add source code directly from a VCS such as subversion or git. These are mostly straightforward names based on the name of the command used with the VCS system. Because they give you a working repository, they act most like fetchzip.
+
+
+
+
+
+ fetchsvn
+
+
+
+ Used with Subversion. Expects url to a Subversion directory, rev, and sha256.
+
+
+
+
+
+ fetchgit
+
+
+
+ Used with Git. Expects url to a Git repo, rev, and sha256. rev in this case can be full the git commit id (SHA1 hash) or a tag name like refs/tags/v1.0.
+
+
+
+
+
+ fetchfossil
+
+
+
+ Used with Fossil. Expects url to a Fossil archive, rev, and sha256.
+
+
+
+
+
+ fetchcvs
+
+
+
+ Used with CVS. Expects cvsRoot, tag, and sha256.
+
+
+
+
+
+ fetchhg
+
+
+
+ Used with Mercurial. Expects url, rev, and sha256.
+
+
+
+
+
+
+ A number of fetcher functions wrap part of fetchurl and fetchzip. They are mainly convenience functions intended for commonly used destinations of source code in Nixpkgs. These wrapper fetchers are listed below.
+
+
+
+
+
+ fetchFromGitHub
+
+
+
+ fetchFromGitHub expects four arguments. owner is a string corresponding to the GitHub user or organization that controls this repository. repo corresponds to the name of the software repository. These are located at the top of every GitHub HTML page as owner/repo. rev corresponds to the Git commit hash or tag (e.g v1.0) that will be downloaded from Git. Finally, sha256 corresponds to the hash of the extracted directory. Again, other hash algorithms are also available but sha256 is currently preferred.
+
+
+
+
+
+ fetchFromGitLab
+
+
+
+ This is used with GitLab repositories. The arguments expected are very similar to fetchFromGitHub above.
+
+
+
+
+
+ fetchFromBitbucket
+
+
+
+ This is used with BitBucket repositories. The arguments expected are very similar to fetchFromGitHub above.
+
+
+
+
+
+ fetchFromSavannah
+
+
+
+ This is used with Savannah repositories. The arguments expected are very similar to fetchFromGitHub above.
+
+
+
+
+
+ fetchFromRepoOrCz
+
+
+
+ This is used with repo.or.cz repositories. The arguments expected are very similar to fetchFromGitHub above.
+
+
+
+
+
diff --git a/doc/builders/images.xml b/doc/builders/images.xml
new file mode 100644
index 000000000000..5e042a8ada80
--- /dev/null
+++ b/doc/builders/images.xml
@@ -0,0 +1,12 @@
+
+ Images
+
+ This chapter describes tools for creating various types of images.
+
+
+
+
+
+
diff --git a/doc/functions/appimagetools.xml b/doc/builders/images/appimagetools.xml
similarity index 74%
rename from doc/functions/appimagetools.xml
rename to doc/builders/images/appimagetools.xml
index e6dbc22f48dd..37e4251cda2e 100644
--- a/doc/functions/appimagetools.xml
+++ b/doc/builders/images/appimagetools.xml
@@ -5,17 +5,12 @@
pkgs.appimageTools
- pkgs.appimageTools is a set of functions for extracting
- and wrapping AppImage files.
- They are meant to be used if traditional packaging from source is infeasible,
- or it would take too long. To quickly run an AppImage file,
- pkgs.appimage-run can be used as well.
+ pkgs.appimageTools is a set of functions for extracting and wrapping AppImage files. They are meant to be used if traditional packaging from source is infeasible, or it would take too long. To quickly run an AppImage file, pkgs.appimage-run can be used as well.
- The appimageTools API is unstable and may be subject to
- backwards-incompatible changes in the future.
+ The appimageTools API is unstable and may be subject to backwards-incompatible changes in the future.
@@ -23,9 +18,7 @@
AppImage formats
- There are different formats for AppImages, see
- the
- specification for details.
+ There are different formats for AppImages, see the specification for details.
@@ -55,8 +48,7 @@ type2.AppImage: ELF 64-bit LSB executable, x86-64, version 1 (SYSV) (Lepton 3.x)
- Note how the type 1 AppImage is described as an ISO 9660 CD-ROM
- filesystem, and the type 2 AppImage is not.
+ Note how the type 1 AppImage is described as an ISO 9660 CD-ROM filesystem, and the type 2 AppImage is not.
@@ -64,8 +56,7 @@ type2.AppImage: ELF 64-bit LSB executable, x86-64, version 1 (SYSV) (Lepton 3.x)
Wrapping
- Depending on the type of AppImage you're wrapping, you'll have to use
- wrapType1 or wrapType2.
+ Depending on the type of AppImage you're wrapping, you'll have to use wrapType1 or wrapType2.
@@ -91,23 +82,16 @@ appimageTools.wrapType2 { # or wrapType1
- extraPkgs allows you to pass a function to include
- additional packages inside the FHS environment your AppImage is going to
- run in. There are a few ways to learn which dependencies an application
- needs:
+ extraPkgs allows you to pass a function to include additional packages inside the FHS environment your AppImage is going to run in. There are a few ways to learn which dependencies an application needs:
- Looking through the extracted AppImage files, reading its scripts and
- running patchelf and ldd on its
- executables. This can also be done in appimage-run,
- by setting APPIMAGE_DEBUG_EXEC=bash.
+ Looking through the extracted AppImage files, reading its scripts and running patchelf and ldd on its executables. This can also be done in appimage-run, by setting APPIMAGE_DEBUG_EXEC=bash.
- Running strace -vfefile on the wrapped executable,
- looking for libraries that can't be found.
+ Running strace -vfefile on the wrapped executable, looking for libraries that can't be found.
diff --git a/doc/functions/dockertools.xml b/doc/builders/images/dockertools.xml
similarity index 60%
rename from doc/functions/dockertools.xml
rename to doc/builders/images/dockertools.xml
index 3e9281557d51..2243453c3e97 100644
--- a/doc/functions/dockertools.xml
+++ b/doc/builders/images/dockertools.xml
@@ -5,17 +5,12 @@
pkgs.dockerTools
- pkgs.dockerTools is a set of functions for creating and
- manipulating Docker images according to the
-
- Docker Image Specification v1.2.0 . Docker itself is not used to
- perform any of the operations done by these functions.
+ pkgs.dockerTools is a set of functions for creating and manipulating Docker images according to the Docker Image Specification v1.2.0 . Docker itself is not used to perform any of the operations done by these functions.
- The dockerTools API is unstable and may be subject to
- backwards-incompatible changes in the future.
+ The dockerTools API is unstable and may be subject to backwards-incompatible changes in the future.
@@ -23,15 +18,11 @@
buildImage
- This function is analogous to the docker build command,
- in that it can be used to build a Docker-compatible repository tarball
- containing a single image with one or multiple layers. As such, the result
- is suitable for being loaded in Docker with docker load.
+ This function is analogous to the docker build command, in that it can be used to build a Docker-compatible repository tarball containing a single image with one or multiple layers. As such, the result is suitable for being loaded in Docker with docker load.
- The parameters of buildImage with relative example values
- are described below:
+ The parameters of buildImage with relative example values are described below:
@@ -63,135 +54,89 @@ buildImage {
- The above example will build a Docker image redis/latest
- from the given base image. Loading and running this image in Docker results
- in redis-server being started automatically.
+ The above example will build a Docker image redis/latest from the given base image. Loading and running this image in Docker results in redis-server being started automatically.
- name specifies the name of the resulting image. This is
- the only required argument for buildImage.
+ name specifies the name of the resulting image. This is the only required argument for buildImage.
- tag specifies the tag of the resulting image. By
- default it's null, which indicates that the nix output
- hash will be used as tag.
+ tag specifies the tag of the resulting image. By default it's null, which indicates that the nix output hash will be used as tag.
- fromImage is the repository tarball containing the base
- image. It must be a valid Docker image, such as exported by
- docker save. By default it's null,
- which can be seen as equivalent to FROM scratch of a
- Dockerfile.
+ fromImage is the repository tarball containing the base image. It must be a valid Docker image, such as exported by docker save. By default it's null, which can be seen as equivalent to FROM scratch of a Dockerfile.
- fromImageName can be used to further specify the base
- image within the repository, in case it contains multiple images. By
- default it's null, in which case
- buildImage will peek the first image available in the
- repository.
+ fromImageName can be used to further specify the base image within the repository, in case it contains multiple images. By default it's null, in which case buildImage will peek the first image available in the repository.
- fromImageTag can be used to further specify the tag of
- the base image within the repository, in case an image contains multiple
- tags. By default it's null, in which case
- buildImage will peek the first tag available for the
- base image.
+ fromImageTag can be used to further specify the tag of the base image within the repository, in case an image contains multiple tags. By default it's null, in which case buildImage will peek the first tag available for the base image.
- contents is a derivation that will be copied in the new
- layer of the resulting image. This can be similarly seen as ADD
- contents/ / in a Dockerfile. By default
- it's null.
+ contents is a derivation that will be copied in the new layer of the resulting image. This can be similarly seen as ADD contents/ / in a Dockerfile. By default it's null.
- runAsRoot is a bash script that will run as root in an
- environment that overlays the existing layers of the base image with the
- new resulting layer, including the previously copied
- contents derivation. This can be similarly seen as
- RUN ... in a Dockerfile.
+ runAsRoot is a bash script that will run as root in an environment that overlays the existing layers of the base image with the new resulting layer, including the previously copied contents derivation. This can be similarly seen as RUN ... in a Dockerfile.
- Using this parameter requires the kvm device to be
- available.
+ Using this parameter requires the kvm device to be available.
- config is used to specify the configuration of the
- containers that will be started off the built image in Docker. The
- available options are listed in the
-
- Docker Image Specification v1.2.0 .
+ config is used to specify the configuration of the containers that will be started off the built image in Docker. The available options are listed in the Docker Image Specification v1.2.0 .
- After the new layer has been created, its closure (to which
- contents, config and
- runAsRoot contribute) will be copied in the layer itself.
- Only new dependencies that are not already in the existing layers will be
- copied.
+ After the new layer has been created, its closure (to which contents, config and runAsRoot contribute) will be copied in the layer itself. Only new dependencies that are not already in the existing layers will be copied.
- At the end of the process, only one new single layer will be produced and
- added to the resulting image.
+ At the end of the process, only one new single layer will be produced and added to the resulting image.
- The resulting repository will only list the single image
- image/tag. In the case of
- it would be
- redis/latest.
+ The resulting repository will only list the single image image/tag. In the case of it would be redis/latest.
- It is possible to inspect the arguments with which an image was built using
- its buildArgs attribute.
+ It is possible to inspect the arguments with which an image was built using its buildArgs attribute.
- If you see errors similar to getProtocolByName: does not exist (no
- such protocol name: tcp) you may need to add
- pkgs.iana-etc to contents.
+ If you see errors similar to getProtocolByName: does not exist (no such protocol name: tcp) you may need to add pkgs.iana-etc to contents.
- If you see errors similar to Error_Protocol ("certificate has
- unknown CA",True,UnknownCa) you may need to add
- pkgs.cacert to contents.
+ If you see errors similar to Error_Protocol ("certificate has unknown CA",True,UnknownCa) you may need to add pkgs.cacert to contents.
Impurely Defining a Docker Layer's Creation Date
- By default buildImage will use a static date of one
- second past the UNIX Epoch. This allows buildImage to
- produce binary reproducible images. When listing images with
- docker images, the newly created images will be listed
- like this:
+ By default buildImage will use a static date of one second past the UNIX Epoch. This allows buildImage to produce binary reproducible images. When listing images with docker images, the newly created images will be listed like this:
- You can break binary reproducibility but have a sorted, meaningful
- CREATED column by setting created to
- now.
+ You can break binary reproducibility but have a sorted, meaningful CREATED column by setting created to now.
- and now the Docker CLI will display a reasonable date and sort the images
- as expected:
+ and now the Docker CLI will display a reasonable date and sort the images as expected:
buildLayeredImage
- Create a Docker image with many of the store paths being on their own layer
- to improve sharing between images.
+ Create a Docker image with many of the store paths being on their own layer to improve sharing between images.
@@ -264,8 +205,7 @@ hello latest de2bf4786de6 About a minute ago 25.2MB
- Top level paths in the container. Either a single derivation, or a list
- of derivations.
+ Top level paths in the container. Either a single derivation, or a list of derivations.
Default:[]
@@ -278,10 +218,7 @@ hello latest de2bf4786de6 About a minute ago 25.2MB
- Run-time configuration of the container. A full list of the options are
- available at in the
-
- Docker Image Specification v1.2.0 .
+ Run-time configuration of the container. A full list of the options are available at in the Docker Image Specification v1.2.0 .
Default:{}
@@ -294,9 +231,7 @@ hello latest de2bf4786de6 About a minute ago 25.2MB
- Date and time the layers were created. Follows the same
- now exception supported by
- buildImage.
+ Date and time the layers were created. Follows the same now exception supported by buildImage.
Default:1970-01-01T00:00:01Z
@@ -312,7 +247,20 @@ hello latest de2bf4786de6 About a minute ago 25.2MB
Maximum number of layers to create.
- Default:24
+ Default:100
+
+
+ Maximum:125
+
+
+
+
+
+ extraCommandsoptional
+
+
+
+ Shell commands to run while building the final layer, without access to most of the layer contents. Changes to this layer are "on top" of all the other layers, so can create additional directories and files.
@@ -322,8 +270,7 @@ hello latest de2bf4786de6 About a minute ago 25.2MB
Behavior of contents in the final image
- Each path directly listed in contents will have a
- symlink in the root of the image.
+ Each path directly listed in contents will have a symlink in the root of the image.
@@ -334,8 +281,7 @@ pkgs.dockerTools.buildLayeredImage {
contents = [ pkgs.hello ];
}
]]>
- will create symlinks for all the paths in the hello
- package:
+ will create symlinks for all the paths in the hello package:
/nix/store/h1zb1padqbbb7jicsvkmrym3r6snphxg-hello-2.10/bin/hello
/share/info/hello.info -> /nix/store/h1zb1padqbbb7jicsvkmrym3r6snphxg-hello-2.10/share/info/hello.info
@@ -348,13 +294,11 @@ pkgs.dockerTools.buildLayeredImage {
Automatic inclusion of config references
- The closure of config is automatically included in the
- closure of the final image.
+ The closure of config is automatically included in the closure of the final image.
- This allows you to make very simple Docker images with very little code.
- This container will start up and run hello:
+ This allows you to make very simple Docker images with very little code. This container will start up and run hello:
Adjusting maxLayers
- Increasing the maxLayers increases the number of layers
- which have a chance to be shared between different images.
+ Increasing the maxLayers increases the number of layers which have a chance to be shared between different images.
- Modern Docker installations support up to 128 layers, however older
- versions support as few as 42.
+ Modern Docker installations support up to 128 layers, however older versions support as few as 42.
- If the produced image will not be extended by other Docker builds, it is
- safe to set maxLayers to 128. However
- it will be impossible to extend the image further.
+ If the produced image will not be extended by other Docker builds, it is safe to set maxLayers to 128. However it will be impossible to extend the image further.
- The first (maxLayers-2) most "popular" paths will have
- their own individual layers, then layer #maxLayers-1
- will contain all the remaining "unpopular" paths, and finally layer
- #maxLayers will contain the Image configuration.
+ The first (maxLayers-2) most "popular" paths will have their own individual layers, then layer #maxLayers-1 will contain all the remaining "unpopular" paths, and finally layer #maxLayers will contain the Image configuration.
- Docker's Layers are not inherently ordered, they are content-addressable
- and are not explicitly layered until they are composed in to an Image.
+ Docker's Layers are not inherently ordered, they are content-addressable and are not explicitly layered until they are composed in to an Image.
@@ -401,10 +337,7 @@ pkgs.dockerTools.buildLayeredImage {
pullImage
- This function is analogous to the docker pull command, in
- that it can be used to pull a Docker image from a Docker registry. By
- default Docker Hub is used
- to pull images.
+ This function is analogous to the docker pull command, in that it can be used to pull a Docker image from a Docker registry. By default Docker Hub is used to pull images.
@@ -429,76 +362,51 @@ pullImage {
- imageName specifies the name of the image to be
- downloaded, which can also include the registry namespace (e.g.
- nixos). This argument is required.
+ imageName specifies the name of the image to be downloaded, which can also include the registry namespace (e.g. nixos). This argument is required.
- imageDigest specifies the digest of the image to be
- downloaded. This argument is required.
+ imageDigest specifies the digest of the image to be downloaded. This argument is required.
- finalImageName, if specified, this is the name of the
- image to be created. Note it is never used to fetch the image since we
- prefer to rely on the immutable digest ID. By default it's equal to
- imageName.
+ finalImageName, if specified, this is the name of the image to be created. Note it is never used to fetch the image since we prefer to rely on the immutable digest ID. By default it's equal to imageName.
- finalImageTag, if specified, this is the tag of the
- image to be created. Note it is never used to fetch the image since we
- prefer to rely on the immutable digest ID. By default it's
- latest.
+ finalImageTag, if specified, this is the tag of the image to be created. Note it is never used to fetch the image since we prefer to rely on the immutable digest ID. By default it's latest.
- sha256 is the checksum of the whole fetched image. This
- argument is required.
+ sha256 is the checksum of the whole fetched image. This argument is required.
- os, if specified, is the operating system of the
- fetched image. By default it's linux.
+ os, if specified, is the operating system of the fetched image. By default it's linux.
- arch, if specified, is the cpu architecture of the
- fetched image. By default it's x86_64.
+ arch, if specified, is the cpu architecture of the fetched image. By default it's x86_64.
- nix-prefetch-docker command can be used to get required
- image parameters:
-
+ nix-prefetch-docker command can be used to get required image parameters:
$ nix run nixpkgs.nix-prefetch-docker -c nix-prefetch-docker --image-name mysql --image-tag 5
-
- Since a given imageName may transparently refer to a
- manifest list of images which support multiple architectures and/or
- operating systems, you can supply the and
- arguments to specify exactly which image you want.
- By default it will match the OS and architecture of the host the command is
- run on.
-
+ Since a given imageName may transparently refer to a manifest list of images which support multiple architectures and/or operating systems, you can supply the and arguments to specify exactly which image you want. By default it will match the OS and architecture of the host the command is run on.
$ nix-prefetch-docker --image-name mysql --image-tag 5 --arch x86_64 --os linux
-
- Desired image name and tag can be set using
- and
- arguments:
-
+ Desired image name and tag can be set using and arguments:
$ nix-prefetch-docker --image-name mysql --image-tag 5 --final-image-name eu.gcr.io/my-project/mysql --final-image-tag prod
@@ -509,17 +417,12 @@ pullImage {
exportImage
- This function is analogous to the docker export command,
- in that it can be used to flatten a Docker image that contains multiple
- layers. It is in fact the result of the merge of all the layers of the
- image. As such, the result is suitable for being imported in Docker with
- docker import.
+ This function is analogous to the docker export command, in that it can be used to flatten a Docker image that contains multiple layers. It is in fact the result of the merge of all the layers of the image. As such, the result is suitable for being imported in Docker with docker import.
- Using this function requires the kvm device to be
- available.
+ Using this function requires the kvm device to be available.
@@ -541,14 +444,11 @@ exportImage {
- The parameters relative to the base image have the same synopsis as
- described in , except that
- fromImage is the only required argument in this case.
+ The parameters relative to the base image have the same synopsis as described in , except that fromImage is the only required argument in this case.
- The name argument is the name of the derivation output,
- which defaults to fromImage.name.
+ The name argument is the name of the derivation output, which defaults to fromImage.name.
@@ -556,11 +456,7 @@ exportImage {
shadowSetup
- This constant string is a helper for setting up the base files for managing
- users and groups, only if such files don't exist already. It is suitable for
- being used in a runAsRoot
- script for cases like
- in the example below:
+ This constant string is a helper for setting up the base files for managing users and groups, only if such files don't exist already. It is suitable for being used in a runAsRoot script for cases like in the example below:
@@ -582,9 +478,7 @@ buildImage {
- Creating base files like /etc/passwd or
- /etc/login.defs is necessary for shadow-utils to
- manipulate users and groups.
+ Creating base files like /etc/passwd or /etc/login.defs is necessary for shadow-utils to manipulate users and groups.
diff --git a/doc/builders/images/ocitools.xml b/doc/builders/images/ocitools.xml
new file mode 100644
index 000000000000..f61075b242f8
--- /dev/null
+++ b/doc/builders/images/ocitools.xml
@@ -0,0 +1,62 @@
+
+ pkgs.ociTools
+
+
+ pkgs.ociTools is a set of functions for creating containers according to the OCI container specification v1.0.0. Beyond that it makes no assumptions about the container runner you choose to use to run the created container.
+
+
+
+ buildContainer
+
+
+ This function creates a simple OCI container that runs a single command inside of it. An OCI container consists of a config.json and a rootfs directory.The nix store of the container will contain all referenced dependencies of the given command.
+
+
+
+ The parameters of buildContainer with an example value are described below:
+
+
+
+ Build Container
+
+buildContainer {
+ args = [ (with pkgs; writeScript "run.sh" ''
+ #!${bash}/bin/bash
+ ${coreutils}/bin/exec ${bash}/bin/bash
+ '').outPath ];
+
+ mounts = {
+ "/data" = {
+ type = "none";
+ source = "/var/lib/mydata";
+ options = [ "bind" ];
+ };
+ };
+
+ readonly = false;
+}
+
+
+
+
+
+ args specifies a set of arguments to run inside the container. This is the only required argument for buildContainer. All referenced packages inside the derivation will be made available inside the container
+
+
+
+
+ mounts specifies additional mount points chosen by the user. By default only a minimal set of necessary filesystems are mounted into the container (e.g procfs, cgroupfs)
+
+
+
+
+ readonly makes the container's rootfs read-only if it is set to true. The default value is false false.
+
+
+
+
+
+
diff --git a/doc/functions/snap/example-firefox.nix b/doc/builders/images/snap/example-firefox.nix
similarity index 100%
rename from doc/functions/snap/example-firefox.nix
rename to doc/builders/images/snap/example-firefox.nix
diff --git a/doc/functions/snap/example-hello.nix b/doc/builders/images/snap/example-hello.nix
similarity index 100%
rename from doc/functions/snap/example-hello.nix
rename to doc/builders/images/snap/example-hello.nix
diff --git a/doc/functions/snaptools.xml b/doc/builders/images/snaptools.xml
similarity index 61%
rename from doc/functions/snaptools.xml
rename to doc/builders/images/snaptools.xml
index d0e3efdf6c67..422fcfa37d88 100644
--- a/doc/functions/snaptools.xml
+++ b/doc/builders/images/snaptools.xml
@@ -5,28 +5,22 @@
pkgs.snapTools
- pkgs.snapTools is a set of functions for creating
- Snapcraft images. Snap and Snapcraft is not used to perform these operations.
+ pkgs.snapTools is a set of functions for creating Snapcraft images. Snap and Snapcraft is not used to perform these operations.
The makeSnap Function
- makeSnap takes a single named argument,
- meta. This argument mirrors
- the upstream
- snap.yaml format exactly.
+ makeSnap takes a single named argument, meta. This argument mirrors the upstream snap.yaml format exactly.
- The base should not be be specified, as
- makeSnap will force set it.
+ The base should not be be specified, as makeSnap will force set it.
- Currently, makeSnap does not support creating GUI
- stubs.
+ Currently, makeSnap does not support creating GUI stubs.
@@ -40,9 +34,7 @@
- nix-build this expression and install it with
- snap install ./result --dangerous.
- hello will now be the Snapcraft version of the package.
+ nix-build this expression and install it with snap install ./result --dangerous. hello will now be the Snapcraft version of the package.
@@ -53,21 +45,14 @@
Making a Graphical Snap
- Graphical programs require many more integrations with the host. This
- example uses Firefox as an example, because it is one of the most
- complicated programs we could package.
+ Graphical programs require many more integrations with the host. This example uses Firefox as an example, because it is one of the most complicated programs we could package.
- nix-build this expression and install it with
- snap install ./result --dangerous.
- nix-example-firefox will now be the Snapcraft version of
- the Firefox package.
+ nix-build this expression and install it with snap install ./result --dangerous. nix-example-firefox will now be the Snapcraft version of the Firefox package.
- The specific meaning behind plugs can be looked up in the
- Snapcraft
- interface documentation.
+ The specific meaning behind plugs can be looked up in the Snapcraft interface documentation.
diff --git a/doc/builders/special.xml b/doc/builders/special.xml
new file mode 100644
index 000000000000..56d98f025278
--- /dev/null
+++ b/doc/builders/special.xml
@@ -0,0 +1,12 @@
+
+ Special builders
+
+ This chapter describes several special builders.
+
+
+
+
+
+
diff --git a/doc/functions/fhs-environments.xml b/doc/builders/special/fhs-environments.xml
similarity index 65%
rename from doc/functions/fhs-environments.xml
rename to doc/builders/special/fhs-environments.xml
index 79682080be31..e7b81e97a23f 100644
--- a/doc/functions/fhs-environments.xml
+++ b/doc/builders/special/fhs-environments.xml
@@ -5,15 +5,7 @@
buildFHSUserEnv
- buildFHSUserEnv provides a way to build and run
- FHS-compatible lightweight sandboxes. It creates an isolated root with bound
- /nix/store, so its footprint in terms of disk space
- needed is quite small. This allows one to run software which is hard or
- unfeasible to patch for NixOS -- 3rd-party source trees with FHS assumptions,
- games distributed as tarballs, software with integrity checking and/or
- external self-updated binaries. It uses Linux namespaces feature to create
- temporary lightweight environments which are destroyed after all child
- processes exit, without root user rights requirement. Accepted arguments are:
+ buildFHSUserEnv provides a way to build and run FHS-compatible lightweight sandboxes. It creates an isolated root with bound /nix/store, so its footprint in terms of disk space needed is quite small. This allows one to run software which is hard or unfeasible to patch for NixOS -- 3rd-party source trees with FHS assumptions, games distributed as tarballs, software with integrity checking and/or external self-updated binaries. It uses Linux namespaces feature to create temporary lightweight environments which are destroyed after all child processes exit, without root user rights requirement. Accepted arguments are:
@@ -33,8 +25,7 @@
- Packages to be installed for the main host's architecture (i.e. x86_64 on
- x86_64 installations). Along with libraries binaries are also installed.
+ Packages to be installed for the main host's architecture (i.e. x86_64 on x86_64 installations). Along with libraries binaries are also installed.
@@ -44,9 +35,7 @@
- Packages to be installed for all architectures supported by a host (i.e.
- i686 and x86_64 on x86_64 installations). Only libraries are installed by
- default.
+ Packages to be installed for all architectures supported by a host (i.e. i686 and x86_64 on x86_64 installations). Only libraries are installed by default.
@@ -66,8 +55,7 @@
- Like extraBuildCommands, but executed only on multilib
- architectures.
+ Like extraBuildCommands, but executed only on multilib architectures.
@@ -77,8 +65,7 @@
- Additional derivation outputs to be linked for both target and
- multi-architecture packages.
+ Additional derivation outputs to be linked for both target and multi-architecture packages.
@@ -88,8 +75,7 @@
- Additional commands to be executed for finalizing the derivation with
- runner script.
+ Additional commands to be executed for finalizing the derivation with runner script.
@@ -99,16 +85,14 @@
- A command that would be executed inside the sandbox and passed all the
- command line arguments. It defaults to bash.
+ A command that would be executed inside the sandbox and passed all the command line arguments. It defaults to bash.
- One can create a simple environment using a shell.nix like
- that:
+ One can create a simple environment using a shell.nix like that:
- Running nix-shell would then drop you into a shell with
- these libraries and binaries available. You can use this to run closed-source
- applications which expect FHS structure without hassles: simply change
- runScript to the application path, e.g.
- ./bin/start.sh -- relative paths are supported.
+ Running nix-shell would then drop you into a shell with these libraries and binaries available. You can use this to run closed-source applications which expect FHS structure without hassles: simply change runScript to the application path, e.g. ./bin/start.sh -- relative paths are supported.
diff --git a/doc/functions/shell.xml b/doc/builders/special/mkshell.xml
similarity index 79%
rename from doc/functions/shell.xml
rename to doc/builders/special/mkshell.xml
index e5031c9463c0..cef65d06b882 100644
--- a/doc/functions/shell.xml
+++ b/doc/builders/special/mkshell.xml
@@ -5,9 +5,7 @@
pkgs.mkShell
- pkgs.mkShell is a special kind of derivation that is
- only useful when using it combined with nix-shell. It will
- in fact fail to instantiate when invoked with nix-build.
+ pkgs.mkShell is a special kind of derivation that is only useful when using it combined with nix-shell. It will in fact fail to instantiate when invoked with nix-build.
diff --git a/doc/builders/trivial-builders.xml b/doc/builders/trivial-builders.xml
new file mode 100644
index 000000000000..c99425620b16
--- /dev/null
+++ b/doc/builders/trivial-builders.xml
@@ -0,0 +1,79 @@
+
+ Trivial builders
+
+
+ Nixpkgs provides a couple of functions that help with building derivations. The most important one, stdenv.mkDerivation, has already been documented above. The following functions wrap stdenv.mkDerivation, making it easier to use in certain cases.
+
+
+
+
+
+ runCommand
+
+
+
+ This takes three arguments, name, env, and buildCommand. name is just the name that Nix will append to the store path in the same way that stdenv.mkDerivation uses its name attribute. env is an attribute set specifying environment variables that will be set for this derivation. These attributes are then passed to the wrapped stdenv.mkDerivation. buildCommand specifies the commands that will be run to create this derivation. Note that you will need to create $out for Nix to register the command as successful.
+
+
+ An example of using runCommand is provided below.
+
+
+(import <nixpkgs> {}).runCommand "my-example" {} ''
+ echo My example command is running
+
+ mkdir $out
+
+ echo I can write data to the Nix store > $out/message
+
+ echo I can also run basic commands like:
+
+ echo ls
+ ls
+
+ echo whoami
+ whoami
+
+ echo date
+ date
+''
+
+
+
+
+
+ runCommandCC
+
+
+
+ This works just like runCommand. The only difference is that it also provides a C compiler in buildCommand’s environment. To minimize your dependencies, you should only use this if you are sure you will need a C compiler as part of running your command.
+
+
+
+
+
+ writeTextFile, writeText, writeTextDir, writeScript, writeScriptBin
+
+
+
+ These functions write text to the Nix store. This is useful for creating scripts from Nix expressions. writeTextFile takes an attribute set and expects two arguments, name and text. name corresponds to the name used in the Nix store path. text will be the contents of the file. You can also set executable to true to make this file have the executable bit set.
+
+
+ Many more commands wrap writeTextFile including writeText, writeTextDir, writeScript, and writeScriptBin. These are convenience functions over writeTextFile.
+
+
+
+
+
+ symlinkJoin
+
+
+
+ This can be used to put many derivations into the same directory structure. It works by creating a new derivation and adding symlinks to each of the paths listed. It expects two arguments, name, and paths. name is the name used in the Nix store path for the created derivation. paths is a list of paths that will be symlinked. These paths can be to Nix store derivations or any other subdirectory contained within.
+
+
+
+
+
diff --git a/doc/coding-conventions.xml b/doc/coding-conventions.xml
index 48356247a49e..799f1479467a 100644
--- a/doc/coding-conventions.xml
+++ b/doc/coding-conventions.xml
@@ -8,24 +8,17 @@
- Use 2 spaces of indentation per indentation level in Nix expressions, 4
- spaces in shell scripts.
+ 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.
+ 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
- .
+ Use lowerCamelCase for variable names, not UpperCamelCase. Note, this rule does not apply to package attribute names, which instead follow the rules in .
@@ -52,8 +45,7 @@ foo { arg = ...; }
- In attribute sets or lists that span multiple lines, the attribute names
- or list elements should be aligned:
+ In attribute sets or lists that span multiple lines, the attribute names or list elements should be aligned:
# A long list.
list = [
@@ -97,8 +89,7 @@ attrs = { x = 1280; y = 1024; };
- Breaking in the middle of a function argument can give hard-to-read code,
- like
+ Breaking in the middle of a function argument can give hard-to-read code, like
someFunction { x = 1280;
y = 1024; } otherArg
@@ -123,8 +114,7 @@ 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.
+ The bodies of functions, asserts, and withs are not indented to prevent a lot of superfluous indentation levels, i.e.
{ arg1, arg2 }:
assert system == "i686-linux";
@@ -156,8 +146,7 @@ stdenv.mkDerivation { ...
- Functions should list their expected arguments as precisely as possible.
- That is, write
+ Functions should list their expected arguments as precisely as possible. That is, write
{ stdenv, fetchurl, perl }: ...
@@ -171,9 +160,7 @@ args: with args; ...
- 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:
+ 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:
{ stdenv, doCoverageAnalysis ? false, ... } @ args:
@@ -197,35 +184,20 @@ args.stdenv.mkDerivation (args // {
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. Only emphasized words are to be
- interpreted in this way.
+ 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. Only emphasized words are to be interpreted in this way.
- In Nixpkgs, there are generally three different names associated with a
- package:
+ In Nixpkgs, there are generally three different names associated with a package:
- The name attribute of the derivation (excluding the
- version part). This is what most users see, in particular when using
- nix-env.
+ The name attribute of the derivation (excluding the version part). 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 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.
@@ -234,12 +206,7 @@ args.stdenv.mkDerivation (args // {
- Most of the time, these are the same. For instance, the package
- e2fsprogs has a name attribute
- "e2fsprogs-version", is bound
- to the variable name e2fsprogs in
- all-packages.nix, and the Nix expression is in
- pkgs/os-specific/linux/e2fsprogs/default.nix.
+ Most of the time, these are the same. For instance, the package e2fsprogs has a name attribute "e2fsprogs-version", is bound to the variable name e2fsprogs in all-packages.nix, and the Nix expression is in pkgs/os-specific/linux/e2fsprogs/default.nix.
@@ -247,51 +214,32 @@ args.stdenv.mkDerivation (args // {
- The name attribute should be
- identical to the upstream package name.
+ The name attribute should be identical to the upstream package name.
- The name attribute must not
- contain uppercase letters — e.g., "mplayer-1.0rc2"
- instead of "MPlayer-1.0rc2".
+ The name attribute must not contain uppercase letters — e.g., "mplayer-1.0rc2" instead of "MPlayer-1.0rc2".
- The version part of the name attribute
- must start with a digit (following a dash) — e.g.,
- "hello-0.3.1rc2".
+ The version part of the name attribute must start with a digit (following a dash) — e.g., "hello-0.3.1rc2".
- If a package is not a release but a commit from a repository, then the
- version part of the name must be the date of that
- (fetched) commit. The date must be in
- "YYYY-MM-DD" format. Also append
- "unstable" to the name - e.g.,
- "pkgname-unstable-2014-09-23".
+ If a package is not a release but a commit from a repository, then the version part of the name must be the date of that (fetched) commit. The date must be in "YYYY-MM-DD" format. Also append "unstable" to the name - e.g., "pkgname-unstable-2014-09-23".
- Dashes in the package name 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.
+ Dashes in the package name 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
+ 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
@@ -301,31 +249,18 @@ args.stdenv.mkDerivation (args // {
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.
+ 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.
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.
+ 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.
+ When in doubt, consider refactoring the pkgs/ tree, e.g. creating new categories or splitting up an existing category.
@@ -341,8 +276,7 @@ args.stdenv.mkDerivation (args // {
- development/libraries (e.g.
- libxml2)
+ development/libraries (e.g. libxml2)
@@ -352,8 +286,7 @@ args.stdenv.mkDerivation (args // {
- development/compilers (e.g.
- gcc)
+ development/compilers (e.g. gcc)
@@ -363,8 +296,7 @@ args.stdenv.mkDerivation (args // {
- development/interpreters (e.g.
- guile)
+ development/interpreters (e.g. guile)
@@ -380,8 +312,7 @@ args.stdenv.mkDerivation (args // {
- development/tools/parsing (e.g.
- bison, flex)
+ development/tools/parsing (e.g. bison, flex)
@@ -391,8 +322,7 @@ args.stdenv.mkDerivation (args // {
- development/tools/build-managers (e.g.
- gnumake)
+ development/tools/build-managers (e.g. gnumake)
@@ -402,8 +332,7 @@ args.stdenv.mkDerivation (args // {
- development/tools/misc (e.g.
- binutils)
+ development/tools/misc (e.g. binutils)
@@ -429,8 +358,7 @@ args.stdenv.mkDerivation (args // {
- (A tool is a relatively small program, especially one intended to be
- used non-interactively.)
+ (A tool is a relatively small program, especially one intended to be used non-interactively.)
@@ -439,8 +367,7 @@ args.stdenv.mkDerivation (args // {
- tools/networking (e.g.
- wget)
+ tools/networking (e.g. wget)
@@ -470,8 +397,7 @@ args.stdenv.mkDerivation (args // {
- tools/archivers (e.g. zip,
- tar)
+ tools/archivers (e.g. zip, tar)
@@ -481,8 +407,7 @@ args.stdenv.mkDerivation (args // {
- tools/compression (e.g.
- gzip, bzip2)
+ tools/compression (e.g. gzip, bzip2)
@@ -492,8 +417,7 @@ args.stdenv.mkDerivation (args // {
- tools/security (e.g. nmap,
- gnupg)
+ tools/security (e.g. nmap, gnupg)
@@ -532,8 +456,7 @@ args.stdenv.mkDerivation (args // {
- servers/http (e.g.
- apache-httpd)
+ servers/http (e.g. apache-httpd)
@@ -543,8 +466,7 @@ args.stdenv.mkDerivation (args // {
- servers/x11 (e.g. xorg —
- this includes the client libraries and programs)
+ servers/x11 (e.g. xorg — this includes the client libraries and programs)
@@ -567,8 +489,7 @@ args.stdenv.mkDerivation (args // {
- desktops (e.g. kde,
- gnome, enlightenment)
+ desktops (e.g. kde, gnome, enlightenment)
@@ -578,8 +499,7 @@ args.stdenv.mkDerivation (args // {
- applications/window-managers (e.g.
- awesome, stumpwm)
+ applications/window-managers (e.g. awesome, stumpwm)
@@ -589,8 +509,7 @@ args.stdenv.mkDerivation (args // {
- A (typically large) program with a distinct user interface, primarily
- used interactively.
+ A (typically large) program with a distinct user interface, primarily used interactively.
@@ -599,8 +518,7 @@ args.stdenv.mkDerivation (args // {
- applications/version-management (e.g.
- subversion)
+ applications/version-management (e.g. subversion)
@@ -610,8 +528,7 @@ args.stdenv.mkDerivation (args // {
- applications/video (e.g.
- vlc)
+ applications/video (e.g. vlc)
@@ -621,8 +538,7 @@ args.stdenv.mkDerivation (args // {
- applications/graphics (e.g.
- gimp)
+ applications/graphics (e.g. gimp)
@@ -638,8 +554,7 @@ args.stdenv.mkDerivation (args // {
- applications/networking/mailreaders (e.g.
- thunderbird)
+ applications/networking/mailreaders (e.g. thunderbird)
@@ -649,8 +564,7 @@ args.stdenv.mkDerivation (args // {
- applications/networking/newsreaders (e.g.
- pan)
+ applications/networking/newsreaders (e.g. pan)
@@ -660,8 +574,7 @@ args.stdenv.mkDerivation (args // {
- applications/networking/browsers (e.g.
- firefox)
+ applications/networking/browsers (e.g. firefox)
@@ -719,8 +632,7 @@ args.stdenv.mkDerivation (args // {
- data/sgml+xml/schemas/xml-dtd (e.g.
- docbook)
+ data/sgml+xml/schemas/xml-dtd (e.g. docbook)
@@ -733,8 +645,7 @@ args.stdenv.mkDerivation (args // {
(Okay, these are executable...)
- data/sgml+xml/stylesheets/xslt (e.g.
- docbook-xsl)
+ data/sgml+xml/stylesheets/xslt (e.g. docbook-xsl)
@@ -771,36 +682,15 @@ args.stdenv.mkDerivation (args // {
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.
+ 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.
+ 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.
+ All versions of a package must be included in all-packages.nix to make sure that they evaluate correctly.
@@ -808,25 +698,15 @@ args.stdenv.mkDerivation (args // {
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.
+ 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*.
+ 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:
+ 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:
@@ -863,11 +743,7 @@ src = fetchFromGitHub {
sha256 = "1i2yxndxb6yc9l6c99pypbd92lfq5aac4klq7y2v93c9qvx2cgpc";
}
- Find the value to put as sha256 by running
- nix run -f '<nixpkgs>' nix-prefetch-github -c
- nix-prefetch-github --rev 1f795f9f44607cc5bec70d1300150bfefcef2aae NixOS
- nix or nix-prefetch-url --unpack
- https://github.com/NixOS/nix/archive/1f795f9f44607cc5bec70d1300150bfefcef2aae.tar.gz.
+ Find the value to put as sha256 by running nix run -f '<nixpkgs>' nix-prefetch-github -c nix-prefetch-github --rev 1f795f9f44607cc5bec70d1300150bfefcef2aae NixOS nix or nix-prefetch-url --unpack https://github.com/NixOS/nix/archive/1f795f9f44607cc5bec70d1300150bfefcef2aae.tar.gz.
@@ -883,40 +759,23 @@ src = fetchFromGitHub {
- Prefetch URL (with nix-prefetch-XXX
- URL, where
- XXX is one of url,
- git, hg, cvs,
- bzr, svn). Hash is printed to
- stdout.
+ Prefetch URL (with nix-prefetch-XXXURL, where XXX is one of url, git, hg, cvs, bzr, svn). Hash is printed to stdout.
- Prefetch by package source (with nix-prefetch-url
- '<nixpkgs>' -A PACKAGE.src,
- where PACKAGE is package attribute name). Hash
- is printed to stdout.
+ 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).
+ 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).
- Upstream provided hash: use it when upstream provides
- sha256 or sha512 (when upstream
- provides md5, don't use it, compute
- sha256 instead).
+ 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.
+ 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:
@@ -927,28 +786,18 @@ src = fetchFromGitHub {
- Extracting hash from local source tarball can be done with
- sha256sum. Use nix-prefetch-url
- file:///path/to/tarball if you want base32 hash.
+ Extracting hash from local source tarball can be done with sha256sum. Use nix-prefetch-url file:///path/to/tarball if you want base32 hash.
- Fake hash: set fake hash in package expression, perform build and extract
- correct hash from error Nix prints.
+ Fake hash: set fake hash in package expression, perform build and extract correct hash from error Nix prints.
- For package updates it is enough to change one symbol to make hash fake.
- For new packages, you can use lib.fakeSha256,
- lib.fakeSha512 or any other fake hash.
+ For package updates it is enough to change one symbol to make hash fake. For new packages, you can use lib.fakeSha256, lib.fakeSha512 or any other fake hash.
- 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). 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.
+ 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). 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.
@@ -962,9 +811,7 @@ src = fetchFromGitHub {
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:
+ 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:
@@ -975,8 +822,7 @@ src = fetchFromGitHub {
- hashes from upstream (in method 3) should be obtained via secure
- protocol;
+ hashes from upstream (in method 3) should be obtained via secure protocol;
@@ -986,12 +832,7 @@ src = fetchFromGitHub {
- https:// URLs are not secure in method 5. When
- obtaining hashes with fake hash method, TLS checks are disabled. So
- refetch source hash from several different networks to exclude MITM
- scenario. Alternatively, use fake hash method to make Nix error, but
- instead of extracting hash from error, extract
- https:// URL and prefetch it with method 1.
+ https:// URLs are not secure in method 5. When obtaining hashes with fake hash method, TLS checks are disabled. So refetch source hash from several different networks to exclude MITM scenario. Alternatively, use fake hash method to make Nix error, but instead of extracting hash from error, extract https:// URL and prefetch it with method 1.
@@ -1001,8 +842,7 @@ src = fetchFromGitHub {
Patches
- Patches available online should be retrieved using
- fetchpatch.
+ Patches available online should be retrieved using fetchpatch.
@@ -1018,10 +858,7 @@ patches = [
- 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.
+ 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.
@@ -1031,8 +868,7 @@ patches = [ ./0001-changes.patch ];
- If you do need to do create this sort of patch file, one way to do so is
- with git:
+ If you do need to do create this sort of patch file, one way to do so is with git:
@@ -1043,8 +879,7 @@ patches = [ ./0001-changes.patch ];
- If a git repository is not already present, create one and stage all of
- the source files.
+ If a git repository is not already present, create one and stage all of the source files.
$ git init
$ git add .
@@ -1052,8 +887,7 @@ patches = [ ./0001-changes.patch ];
- Edit some files to make whatever changes need to be included in the
- patch.
+ Edit some files to make whatever changes need to be included in the patch.
diff --git a/doc/configuration.xml b/doc/configuration.xml
index b497fa4e2722..a68ae739f52e 100644
--- a/doc/configuration.xml
+++ b/doc/configuration.xml
@@ -3,49 +3,38 @@
xml:id="chap-packageconfig">
Global configuration
- Nix comes with certain defaults about what packages can and cannot be
- installed, based on a package's metadata. By default, Nix will prevent
- installation if any of the following criteria are true:
+ Nix comes with certain defaults about what packages can and cannot be installed, based on a package's metadata. By default, Nix will prevent installation if any of the following criteria are true:
- The package is thought to be broken, and has had its
- meta.broken set to true.
+ The package is thought to be broken, and has had its meta.broken set to true.
- The package isn't intended to run on the given system, as none of its
- meta.platforms match the given system.
+ The package isn't intended to run on the given system, as none of its meta.platforms match the given system.
- The package's meta.license is set to a license which is
- considered to be unfree.
+ The package's meta.license is set to a license which is considered to be unfree.
- The package has known security vulnerabilities but has not or can not be
- updated for some reason, and a list of issues has been entered in to the
- package's meta.knownVulnerabilities.
+ The package has known security vulnerabilities but has not or can not be updated for some reason, and a list of issues has been entered in to the package's meta.knownVulnerabilities.
- Note that all this is checked during evaluation already, and the check
- includes any package that is evaluated. In particular, all build-time
- dependencies are checked. nix-env -qa will (attempt to)
- hide any packages that would be refused.
+ Note that all this is checked during evaluation already, and the check includes any package that is evaluated. In particular, all build-time dependencies are checked. nix-env -qa will (attempt to) hide any packages that would be refused.
Each of these criteria can be altered in the nixpkgs configuration.
- The nixpkgs configuration for a NixOS system is set in the
- configuration.nix, as in the following example:
+ The nixpkgs configuration for a NixOS system is set in the configuration.nix, as in the following example:
{
nixpkgs.config = {
@@ -53,13 +42,10 @@
};
}
- However, this does not allow unfree software for individual users. Their
- configurations are managed separately.
+ However, this does not allow unfree software for individual users. Their configurations are managed separately.
- A user's of nixpkgs configuration is stored in a user-specific configuration
- file located at ~/.config/nixpkgs/config.nix. For
- example:
+ A user's nixpkgs configuration is stored in a user-specific configuration file located at ~/.config/nixpkgs/config.nix. For example:
{
allowUnfree = true;
@@ -67,31 +53,25 @@
- Note that we are not able to test or build unfree software on Hydra due to
- policy. Most unfree licenses prohibit us from either executing or
- distributing the software.
+ Note that we are not able to test or build unfree software on Hydra due to policy. Most unfree licenses prohibit us from either executing or distributing the software.
Installing broken packages
- There are two ways to try compiling a package which has been marked as
- broken.
+ There are two ways to try compiling a package which has been marked as broken.
- For allowing the build of a broken package once, you can use an
- environment variable for a single invocation of the nix tools:
+ For allowing the build of a broken package once, you can use an environment variable for a single invocation of the nix tools:
$ export NIXPKGS_ALLOW_BROKEN=1
- For permanently allowing broken packages to be built, you may add
- allowBroken = true; to your user's configuration file,
- like this:
+ For permanently allowing broken packages to be built, you may add allowBroken = true; to your user's configuration file, like this:
{
allowBroken = true;
@@ -105,23 +85,19 @@
Installing packages on unsupported systems
- There are also two ways to try compiling a package which has been marked as
- unsuported for the given system.
+ There are also two ways to try compiling a package which has been marked as unsuported for the given system.
- For allowing the build of a broken package once, you can use an
- environment variable for a single invocation of the nix tools:
+ For allowing the build of a broken package once, you can use an environment variable for a single invocation of the nix tools:
$ export NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1
- For permanently allowing broken packages to be built, you may add
- allowUnsupportedSystem = true; to your user's
- configuration file, like this:
+ For permanently allowing broken packages to be built, you may add allowUnsupportedSystem = true; to your user's configuration file, like this:
{
allowUnsupportedSystem = true;
@@ -132,42 +108,29 @@
- The difference between a package being unsupported on some system and being
- broken is admittedly a bit fuzzy. If a program ought to
- work on a certain platform, but doesn't, the platform should be included in
- meta.platforms, but marked as broken with e.g.
- meta.broken = !hostPlatform.isWindows. Of course, this
- begs the question of what "ought" means exactly. That is left to the package
- maintainer.
+ The difference between a package being unsupported on some system and being broken is admittedly a bit fuzzy. If a program ought to work on a certain platform, but doesn't, the platform should be included in meta.platforms, but marked as broken with e.g. meta.broken = !hostPlatform.isWindows. Of course, this begs the question of what "ought" means exactly. That is left to the package maintainer.
Installing unfree packages
- There are several ways to tweak how Nix handles a package which has been
- marked as unfree.
+ There are several ways to tweak how Nix handles a package which has been marked as unfree.
- To temporarily allow all unfree packages, you can use an environment
- variable for a single invocation of the nix tools:
+ To temporarily allow all unfree packages, you can use an environment variable for a single invocation of the nix tools:
$ export NIXPKGS_ALLOW_UNFREE=1
- It is possible to permanently allow individual unfree packages, while
- still blocking unfree packages by default using the
- allowUnfreePredicate configuration option in the user
- configuration file.
+ It is possible to permanently allow individual unfree packages, while still blocking unfree packages by default using the allowUnfreePredicate configuration option in the user configuration file.
- This option is a function which accepts a package as a parameter, and
- returns a boolean. The following example configuration accepts a package
- and always returns false:
+ This option is a function which accepts a package as a parameter, and returns a boolean. The following example configuration accepts a package and always returns false:
{
allowUnfreePredicate = (pkg: false);
@@ -175,8 +138,7 @@
- For a more useful example, try the following. This configuration only
- allows unfree packages named flash player and visual studio code:
+ For a more useful example, try the following. This configuration only allows unfree packages named flash player and visual studio code:
{
allowUnfreePredicate = (pkg: builtins.elem
@@ -190,14 +152,10 @@
- It is also possible to whitelist and blacklist licenses that are
- specifically acceptable or not acceptable, using
- whitelistedLicenses and
- blacklistedLicenses, respectively.
+ It is also possible to whitelist and blacklist licenses that are specifically acceptable or not acceptable, using whitelistedLicenses and blacklistedLicenses, respectively.
- The following example configuration whitelists the licenses
- amd and wtfpl:
+ The following example configuration whitelists the licenses amd and wtfpl:
{
whitelistedLicenses = with stdenv.lib.licenses; [ amd wtfpl ];
@@ -205,8 +163,7 @@
- The following example configuration blacklists the gpl3
- and agpl3 licenses:
+ The following example configuration blacklists the gpl3 and agpl3 licenses:
{
blacklistedLicenses = with stdenv.lib.licenses; [ agpl3 gpl3 ];
@@ -217,37 +174,29 @@
- A complete list of licenses can be found in the file
- lib/licenses.nix of the nixpkgs tree.
+ A complete list of licenses can be found in the file lib/licenses.nix of the nixpkgs tree.
Installing insecure packages
- There are several ways to tweak how Nix handles a package which has been
- marked as insecure.
+ There are several ways to tweak how Nix handles a package which has been marked as insecure.
- To temporarily allow all insecure packages, you can use an environment
- variable for a single invocation of the nix tools:
+ To temporarily allow all insecure packages, you can use an environment variable for a single invocation of the nix tools:
$ export NIXPKGS_ALLOW_INSECURE=1
- It is possible to permanently allow individual insecure packages, while
- still blocking other insecure packages by default using the
- permittedInsecurePackages configuration option in the
- user configuration file.
+ It is possible to permanently allow individual insecure packages, while still blocking other insecure packages by default using the permittedInsecurePackages configuration option in the user configuration file.
- The following example configuration permits the installation of the
- hypothetically insecure package hello, version
- 1.2.3:
+ The following example configuration permits the installation of the hypothetically insecure package hello, version 1.2.3:
{
permittedInsecurePackages = [
@@ -259,18 +208,13 @@
- It is also possible to create a custom policy around which insecure
- packages to allow and deny, by overriding the
- allowInsecurePredicate configuration option.
+ It is also possible to create a custom policy around which insecure packages to allow and deny, by overriding the allowInsecurePredicate configuration option.
- The allowInsecurePredicate option is a function which
- accepts a package and returns a boolean, much like
- allowUnfreePredicate.
+ The allowInsecurePredicate option is a function which accepts a package and returns a boolean, much like allowUnfreePredicate.
- The following configuration example only allows insecure packages with
- very short names:
+ The following configuration example only allows insecure packages with very short names:
{
allowInsecurePredicate = (pkg: (builtins.stringLength (builtins.parseDrvName pkg.name).name) <= 5);
@@ -278,8 +222,7 @@
- Note that permittedInsecurePackages is only checked if
- allowInsecurePredicate is not specified.
+ Note that permittedInsecurePackages is only checked if allowInsecurePredicate is not specified.
@@ -289,10 +232,7 @@
Modify packages via packageOverrides
- You can define a function called packageOverrides in your
- local ~/.config/nixpkgs/config.nix to override Nix
- packages. It must be a function that takes pkgs as an argument and returns a
- modified set of packages.
+ You can define a function called packageOverrides in your local ~/.config/nixpkgs/config.nix to override Nix packages. It must be a function that takes pkgs as an argument and returns a modified set of packages.
{
packageOverrides = pkgs: rec {
@@ -309,15 +249,7 @@
Build an environment
- Using packageOverrides, it is possible to manage
- packages declaratively. This means that we can list all of our desired
- packages within a declarative Nix expression. For example, to have
- aspell, bc,
- ffmpeg, coreutils,
- gdb, nixUnstable,
- emscripten, jq,
- nox, and silver-searcher, we could
- use the following in ~/.config/nixpkgs/config.nix:
+ Using packageOverrides, it is possible to manage packages declaratively. This means that we can list all of our desired packages within a declarative Nix expression. For example, to have aspell, bc, ffmpeg, coreutils, gdb, nixUnstable, emscripten, jq, nox, and silver-searcher, we could use the following in ~/.config/nixpkgs/config.nix:
@@ -343,13 +275,7 @@
- To install it into our environment, you can just run nix-env -iA
- nixpkgs.myPackages. If you want to load the packages to be built
- from a working copy of nixpkgs you just run
- nix-env -f. -iA myPackages. To explore what's been
- installed, just look through ~/.nix-profile/. You can
- see that a lot of stuff has been installed. Some of this stuff is useful
- some of it isn't. Let's tell Nixpkgs to only link the stuff that we want:
+ To install it into our environment, you can just run nix-env -iA nixpkgs.myPackages. If you want to load the packages to be built from a working copy of nixpkgs you just run nix-env -f. -iA myPackages. To explore what's been installed, just look through ~/.nix-profile/. You can see that a lot of stuff has been installed. Some of this stuff is useful some of it isn't. Let's tell Nixpkgs to only link the stuff that we want:
@@ -376,12 +302,7 @@
- pathsToLink tells Nixpkgs to only link the paths listed
- which gets rid of the extra stuff in the profile. /bin
- and /share are good defaults for a user environment,
- getting rid of the clutter. If you are running on Nix on MacOS, you may
- want to add another path as well, /Applications, that
- makes GUI apps available.
+ pathsToLink tells Nixpkgs to only link the paths listed which gets rid of the extra stuff in the profile. /bin and /share are good defaults for a user environment, getting rid of the clutter. If you are running on Nix on MacOS, you may want to add another path as well, /Applications, that makes GUI apps available.
@@ -389,13 +310,7 @@
Getting documentation
- After building that new environment, look through
- ~/.nix-profile to make sure everything is there that
- we wanted. Discerning readers will note that some files are missing. Look
- inside ~/.nix-profile/share/man/man1/ to verify this.
- There are no man pages for any of the Nix tools! This is because some
- packages like Nix have multiple outputs for things like documentation (see
- section 4). Let's make Nix install those as well.
+ After building that new environment, look through ~/.nix-profile to make sure everything is there that we wanted. Discerning readers will note that some files are missing. Look inside ~/.nix-profile/share/man/man1/ to verify this. There are no man pages for any of the Nix tools! This is because some packages like Nix have multiple outputs for things like documentation (see section 4). Let's make Nix install those as well.
@@ -422,9 +337,7 @@
- This provides us with some useful documentation for using our packages.
- However, if we actually want those manpages to be detected by man, we need
- to set up our environment. This can also be managed within Nix expressions.
+ This provides us with some useful documentation for using our packages. However, if we actually want those manpages to be detected by man, we need to set up our environment. This can also be managed within Nix expressions.
@@ -460,9 +373,7 @@
- For this to work fully, you must also have this script sourced when you are
- logged in. Try adding something like this to your
- ~/.profile file:
+ For this to work fully, you must also have this script sourced when you are logged in. Try adding something like this to your ~/.profile file:
@@ -477,8 +388,7 @@ fi
- Now just run source $HOME/.profile and you can starting
- loading man pages from your environent.
+ Now just run source $HOME/.profile and you can starting loading man pages from your environent.
@@ -486,9 +396,7 @@ fi
GNU info setup
- Configuring GNU info is a little bit trickier than man pages. To work
- correctly, info needs a database to be generated. This can be done with
- some small modifications to our environment scripts.
+ Configuring GNU info is a little bit trickier than man pages. To work correctly, info needs a database to be generated. This can be done with some small modifications to our environment scripts.
@@ -534,11 +442,7 @@ fi
- postBuild tells Nixpkgs to run a command after building
- the environment. In this case, install-info adds the
- installed info pages to dir which is GNU info's default
- root node. Note that texinfoInteractive is added to the
- environment to give the install-info command.
+ postBuild tells Nixpkgs to run a command after building the environment. In this case, install-info adds the installed info pages to dir which is GNU info's default root node. Note that texinfoInteractive is added to the environment to give the install-info command.
diff --git a/doc/contributing.xml b/doc/contributing-to-documentation.xml
similarity index 71%
rename from doc/contributing.xml
rename to doc/contributing-to-documentation.xml
index 523c1c9c8f03..b0266043775f 100644
--- a/doc/contributing.xml
+++ b/doc/contributing-to-documentation.xml
@@ -3,10 +3,8 @@
xml:id="chap-contributing">
Contributing to this documentation
- The DocBook sources of the Nixpkgs manual are in the
- doc
- subdirectory of the Nixpkgs repository.
+ The DocBook sources of the Nixpkgs manual are in the doc subdirectory of the Nixpkgs repository.
You can quickly check your edits with make:
@@ -17,19 +15,16 @@ xlink:href="https://github.com/NixOS/nixpkgs/tree/master/doc">doc
[nix-shell]$ make
- If you experience problems, run make debug to help
- understand the docbook errors.
+ If you experience problems, run make debug to help understand the docbook errors.
- After making modifications to the manual, it's important to build it before
- committing. You can do that as follows:
+ After making modifications to the manual, it's important to build it before committing. You can do that as follows:
$ cd /path/to/nixpkgs/doc
$ nix-shell
[nix-shell]$ make clean
[nix-shell]$ nix-build .
- If the build succeeds, the manual will be in
- ./result/share/doc/nixpkgs/manual.html.
+ If the build succeeds, the manual will be in ./result/share/doc/nixpkgs/manual.html.
diff --git a/doc/cross-compilation.xml b/doc/cross-compilation.xml
index b7844da195d7..93fe9095ce2f 100644
--- a/doc/cross-compilation.xml
+++ b/doc/cross-compilation.xml
@@ -6,25 +6,11 @@
Introduction
- "Cross-compilation" means compiling a program on one machine for another
- type of machine. For example, a typical use of cross-compilation is to
- compile programs for embedded devices. These devices often don't have the
- computing power and memory to compile their own programs. One might think
- that cross-compilation is a fairly niche concern. However, there are
- significant advantages to rigorously distinguishing between build-time and
- run-time environments! Significant, because the benefits apply even when one
- is developing and deploying on the same machine. Nixpkgs is increasingly
- adopting the opinion that packages should be written with cross-compilation
- in mind, and nixpkgs should evaluate in a similar way (by minimizing
- cross-compilation-specific special cases) whether or not one is
- cross-compiling.
+ "Cross-compilation" means compiling a program on one machine for another type of machine. For example, a typical use of cross-compilation is to compile programs for embedded devices. These devices often don't have the computing power and memory to compile their own programs. One might think that cross-compilation is a fairly niche concern. However, there are significant advantages to rigorously distinguishing between build-time and run-time environments! Significant, because the benefits apply even when one is developing and deploying on the same machine. Nixpkgs is increasingly adopting the opinion that packages should be written with cross-compilation in mind, and nixpkgs should evaluate in a similar way (by minimizing cross-compilation-specific special cases) whether or not one is cross-compiling.
- This chapter will be organized in three parts. First, it will describe the
- basics of how to package software in a way that supports cross-compilation.
- Second, it will describe how to use Nixpkgs when cross-compiling. Third, it
- will describe the internal infrastructure supporting cross-compilation.
+ This chapter will be organized in three parts. First, it will describe the basics of how to package software in a way that supports cross-compilation. Second, it will describe how to use Nixpkgs when cross-compiling. Third, it will describe the internal infrastructure supporting cross-compilation.
@@ -35,24 +21,12 @@
Platform parameters
- Nixpkgs follows the
- conventions
- of GNU autoconf. We distinguish between 3 types of platforms when
- building a derivation: build,
- host, and target. In
- summary, build is the platform on which a package
- is being built, host is the platform on which it
- will run. The third attribute, target, is relevant
- only for certain specific compilers and build tools.
+ Nixpkgs follows the conventions of GNU autoconf. We distinguish between 3 types of platforms when building a derivation: build, host, and target. In summary, build is the platform on which a package is being built, host is the platform on which it will run. The third attribute, target, is relevant only for certain specific compilers and build tools.
- In Nixpkgs, these three platforms are defined as attribute sets under the
- names buildPlatform, hostPlatform,
- and targetPlatform. They are always defined as
- attributes in the standard environment. That means one can access them
- like:
+ In Nixpkgs, these three platforms are defined as attribute sets under the names buildPlatform, hostPlatform, and targetPlatform. They are always defined as attributes in the standard environment. That means one can access them like:
{ stdenv, fooDep, barDep, .. }: ...stdenv.buildPlatform...
.
@@ -64,9 +38,7 @@
- The "build platform" is the platform on which a package is built. Once
- someone has a built package, or pre-built binary package, the build
- platform should not matter and can be ignored.
+ The "build platform" is the platform on which a package is built. Once someone has a built package, or pre-built binary package, the build platform should not matter and can be ignored.
@@ -76,9 +48,7 @@
- The "host platform" is the platform on which a package will be run. This
- is the simplest platform to understand, but also the one with the worst
- name.
+ The "host platform" is the platform on which a package will be run. This is the simplest platform to understand, but also the one with the worst name.
@@ -88,44 +58,23 @@
- The "target platform" attribute is, unlike the other two attributes, not
- actually fundamental to the process of building software. Instead, it is
- only relevant for compatibility with building certain specific compilers
- and build tools. It can be safely ignored for all other packages.
+ The "target platform" attribute is, unlike the other two attributes, not actually fundamental to the process of building software. Instead, it is only relevant for compatibility with building certain specific compilers and build tools. It can be safely ignored for all other packages.
- The build process of certain compilers is written in such a way that the
- compiler resulting from a single build can itself only produce binaries
- for a single platform. The task of specifying this single "target
- platform" is thus pushed to build time of the compiler. The root cause
- of this is that the compiler (which will be run on the host) and the
- standard library/runtime (which will be run on the target) are built by
- a single build process.
+ The build process of certain compilers is written in such a way that the compiler resulting from a single build can itself only produce binaries for a single platform. The task of specifying this single "target platform" is thus pushed to build time of the compiler. The root cause of this is that the compiler (which will be run on the host) and the standard library/runtime (which will be run on the target) are built by a single build process.
- There is no fundamental need to think about a single target ahead of
- time like this. If the tool supports modular or pluggable backends, both
- the need to specify the target at build time and the constraint of
- having only a single target disappear. An example of such a tool is
- LLVM.
+ There is no fundamental need to think about a single target ahead of time like this. If the tool supports modular or pluggable backends, both the need to specify the target at build time and the constraint of having only a single target disappear. An example of such a tool is LLVM.
- Although the existence of a "target platfom" is arguably a historical
- mistake, it is a common one: examples of tools that suffer from it are
- GCC, Binutils, GHC and Autoconf. Nixpkgs tries to avoid sharing in the
- mistake where possible. Still, because the concept of a target platform
- is so ingrained, it is best to support it as is.
+ Although the existence of a "target platfom" is arguably a historical mistake, it is a common one: examples of tools that suffer from it are GCC, Binutils, GHC and Autoconf. Nixpkgs tries to avoid sharing in the mistake where possible. Still, because the concept of a target platform is so ingrained, it is best to support it as is.
- The exact schema these fields follow is a bit ill-defined due to a long and
- convoluted evolution, but this is slowly being cleaned up. You can see
- examples of ones used in practice in
- lib.systems.examples; note how they are not all very
- consistent. For now, here are few fields can count on them containing:
+ The exact schema these fields follow is a bit ill-defined due to a long and convoluted evolution, but this is slowly being cleaned up. You can see examples of ones used in practice in lib.systems.examples; note how they are not all very consistent. For now, here are few fields can count on them containing:
@@ -135,13 +84,7 @@
- This is a two-component shorthand for the platform. Examples of this
- would be "x86_64-darwin" and "i686-linux"; see
- lib.systems.doubles for more. The first component
- corresponds to the CPU architecture of the platform and the second to
- the operating system of the platform ([cpu]-[os]).
- This format has built-in support in Nix, such as the
- builtins.currentSystem impure string.
+ This is a two-component shorthand for the platform. Examples of this would be "x86_64-darwin" and "i686-linux"; see lib.systems.doubles for more. The first component corresponds to the CPU architecture of the platform and the second to the operating system of the platform ([cpu]-[os]). This format has built-in support in Nix, such as the builtins.currentSystem impure string.
@@ -151,15 +94,7 @@
- This is a 3- or 4- component shorthand for the platform. Examples of
- this would be x86_64-unknown-linux-gnu and
- aarch64-apple-darwin14. This is a standard format
- called the "LLVM target triple", as they are pioneered by LLVM. In the
- 4-part form, this corresponds to
- [cpu]-[vendor]-[os]-[abi]. This format is strictly
- more informative than the "Nix host double", as the previous format
- could analogously be termed. This needs a better name than
- config!
+ This is a 3- or 4- component shorthand for the platform. Examples of this would be x86_64-unknown-linux-gnu and aarch64-apple-darwin14. This is a standard format called the "LLVM target triple", as they are pioneered by LLVM. In the 4-part form, this corresponds to [cpu]-[vendor]-[os]-[abi]. This format is strictly more informative than the "Nix host double", as the previous format could analogously be termed. This needs a better name than config!
@@ -169,10 +104,7 @@
- This is a Nix representation of a parsed LLVM target triple with
- white-listed components. This can be specified directly, or actually
- parsed from the config. See
- lib.systems.parse for the exact representation.
+ This is a Nix representation of a parsed LLVM target triple with white-listed components. This can be specified directly, or actually parsed from the config. See lib.systems.parse for the exact representation.
@@ -182,10 +114,7 @@
- This is a string identifying the standard C library used. Valid
- identifiers include "glibc" for GNU libc, "libSystem" for Darwin's
- Libsystem, and "uclibc" for µClibc. It should probably be refactored to
- use the module system, like parse.
+ This is a string identifying the standard C library used. Valid identifiers include "glibc" for GNU libc, "libSystem" for Darwin's Libsystem, and "uclibc" for µClibc. It should probably be refactored to use the module system, like parse.
@@ -195,10 +124,7 @@
- These predicates are defined in lib.systems.inspect,
- and slapped onto every platform. They are superior to the ones in
- stdenv as they force the user to be explicit about
- which platform they are inspecting. Please use these instead of those.
+ These predicates are defined in lib.systems.inspect, and slapped onto every platform. They are superior to the ones in stdenv as they force the user to be explicit about which platform they are inspecting. Please use these instead of those.
@@ -208,11 +134,7 @@
- This is, quite frankly, a dumping ground of ad-hoc settings (it's an
- attribute set). See lib.systems.platforms for
- examples—there's hopefully one in there that will work verbatim for
- each platform that is working. Please help us triage these flags and
- give them better homes!
+ This is, quite frankly, a dumping ground of ad-hoc settings (it's an attribute set). See lib.systems.platforms for examples—there's hopefully one in there that will work verbatim for each platform that is working. Please help us triage these flags and give them better homes!
@@ -224,62 +146,33 @@
- This is a rather philosophical description that isn't very
- Nixpkgs-specific. For an overview of all the relevant attributes given to
- mkDerivation, see
- . For a description of how
- everything is implemented, see
- .
+ This is a rather philosophical description that isn't very Nixpkgs-specific. For an overview of all the relevant attributes given to mkDerivation, see . For a description of how everything is implemented, see .
- In this section we explore the relationship between both runtime and
- build-time dependencies and the 3 Autoconf platforms.
+ In this section we explore the relationship between both runtime and build-time dependencies and the 3 Autoconf platforms.
- A run time dependency between two packages requires that their host
- platforms match. This is directly implied by the meaning of "host platform"
- and "runtime dependency": The package dependency exists while both packages
- are running on a single host platform.
+ A run time dependency between two packages requires that their host platforms match. This is directly implied by the meaning of "host platform" and "runtime dependency": The package dependency exists while both packages are running on a single host platform.
- A build time dependency, however, has a shift in platforms between the
- depending package and the depended-on package. "build time dependency"
- means that to build the depending package we need to be able to run the
- depended-on's package. The depending package's build platform is therefore
- equal to the depended-on package's host platform.
+ A build time dependency, however, has a shift in platforms between the depending package and the depended-on package. "build time dependency" means that to build the depending package we need to be able to run the depended-on's package. The depending package's build platform is therefore equal to the depended-on package's host platform.
- If both the dependency and depending packages aren't compilers or other
- machine-code-producing tools, we're done. And indeed
- buildInputs and nativeBuildInputs
- have covered these simpler build-time and run-time (respectively) changes
- for many years. But if the dependency does produce machine code, we might
- need to worry about its target platform too. In principle, that target
- platform might be any of the depending package's build, host, or target
- platforms, but we prohibit dependencies from a "later" platform to an
- earlier platform to limit confusion because we've never seen a legitimate
- use for them.
+ If both the dependency and depending packages aren't compilers or other machine-code-producing tools, we're done. And indeed buildInputs and nativeBuildInputs have covered these simpler build-time and run-time (respectively) changes for many years. But if the dependency does produce machine code, we might need to worry about its target platform too. In principle, that target platform might be any of the depending package's build, host, or target platforms, but we prohibit dependencies from a "later" platform to an earlier platform to limit confusion because we've never seen a legitimate use for them.
- Finally, if the depending package is a compiler or other
- machine-code-producing tool, it might need dependencies that run at "emit
- time". This is for compilers that (regrettably) insist on being built
- together with their source langauges' standard libraries. Assuming build !=
- host != target, a run-time dependency of the standard library cannot be run
- at the compiler's build time or run time, but only at the run time of code
- emitted by the compiler.
+ Finally, if the depending package is a compiler or other machine-code-producing tool, it might need dependencies that run at "emit time". This is for compilers that (regrettably) insist on being built together with their source langauges' standard libraries. Assuming build != host != target, a run-time dependency of the standard library cannot be run at the compiler's build time or run time, but only at the run time of code emitted by the compiler.
- Putting this all together, that means we have dependencies in the form
- "host → target", in at most the following six combinations:
+ Putting this all together, that means we have dependencies in the form "host → target", in at most the following six combinations:
Possible dependency types
@@ -318,16 +211,7 @@
- Some examples will make this table clearer. Suppose there's some package
- that is being built with a (build, host, target)
- platform triple of (foo, bar, baz). If it has a
- build-time library dependency, that would be a "host → build" dependency
- with a triple of (foo, foo, *) (the target platform is
- irrelevant). If it needs a compiler to be built, that would be a "build →
- host" dependency with a triple of (foo, foo, *) (the
- target platform is irrelevant). That compiler, would be built with another
- compiler, also "build → host" dependency, with a triple of (foo,
- foo, foo).
+ Some examples will make this table clearer. Suppose there's some package that is being built with a (build, host, target) platform triple of (foo, bar, baz). If it has a build-time library dependency, that would be a "host → build" dependency with a triple of (foo, foo, *) (the target platform is irrelevant). If it needs a compiler to be built, that would be a "build → host" dependency with a triple of (foo, foo, *) (the target platform is irrelevant). That compiler, would be built with another compiler, also "build → host" dependency, with a triple of (foo, foo, foo).
@@ -335,20 +219,14 @@
Cross packaging cookbook
- Some frequently encountered problems when packaging for cross-compilation
- should be answered here. Ideally, the information above is exhaustive, so
- this section cannot provide any new information, but it is ludicrous and
- cruel to expect everyone to spend effort working through the interaction of
- many features just to figure out the same answer to the same common
- problem. Feel free to add to this list!
+ Some frequently encountered problems when packaging for cross-compilation should be answered here. Ideally, the information above is exhaustive, so this section cannot provide any new information, but it is ludicrous and cruel to expect everyone to spend effort working through the interaction of many features just to figure out the same answer to the same common problem. Feel free to add to this list!
- What if my package's build system needs to build a C program to be run
- under the build environment?
+ What if my package's build system needs to build a C program to be run under the build environment?
@@ -366,11 +244,7 @@
- Many packages assume that an unprefixed ar is
- available, but Nix doesn't provide one. It only provides a prefixed one,
- just as it only does for all the other binutils programs. It may be
- necessary to patch the package to fix the build system to use a prefixed
- `ar`.
+ Many packages assume that an unprefixed ar is available, but Nix doesn't provide one. It only provides a prefixed one, just as it only does for all the other binutils programs. It may be necessary to patch the package to fix the build system to use a prefixed `ar`.
@@ -395,82 +269,32 @@
Cross-building packages
- Nixpkgs can be instantiated with localSystem alone, in
- which case there is no cross-compiling and everything is built by and for
- that system, or also with crossSystem, in which case
- packages run on the latter, but all building happens on the former. Both
- parameters take the same schema as the 3 (build, host, and target) platforms
- defined in the previous section. As mentioned above,
- lib.systems.examples has some platforms which are used as
- arguments for these parameters in practice. You can use them
- programmatically, or on the command line:
+ Nixpkgs can be instantiated with localSystem alone, in which case there is no cross-compiling and everything is built by and for that system, or also with crossSystem, in which case packages run on the latter, but all building happens on the former. Both parameters take the same schema as the 3 (build, host, and target) platforms defined in the previous section. As mentioned above, lib.systems.examples has some platforms which are used as arguments for these parameters in practice. You can use them programmatically, or on the command line:
-nix-build <nixpkgs> --arg crossSystem '(import <nixpkgs/lib>).systems.examples.fooBarBaz' -A whatever
+nix-build '<nixpkgs>' --arg crossSystem '(import <nixpkgs/lib>).systems.examples.fooBarBaz' -A whatever
- Eventually we would like to make these platform examples an unnecessary
- convenience so that
+ Eventually we would like to make these platform examples an unnecessary convenience so that
-nix-build <nixpkgs> --arg crossSystem '{ config = "<arch>-<os>-<vendor>-<abi>"; }' -A whatever
- works in the vast majority of cases. The problem today is dependencies on
- other sorts of configuration which aren't given proper defaults. We rely on
- the examples to crudely to set those configuration parameters in some
- vaguely sane manner on the users behalf. Issue
- #34274
- tracks this inconvenience along with its root cause in crufty configuration
- options.
+nix-build '<nixpkgs>' --arg crossSystem '{ config = "<arch>-<os>-<vendor>-<abi>"; }' -A whatever
+ works in the vast majority of cases. The problem today is dependencies on other sorts of configuration which aren't given proper defaults. We rely on the examples to crudely to set those configuration parameters in some vaguely sane manner on the users behalf. Issue #34274 tracks this inconvenience along with its root cause in crufty configuration options.
- While one is free to pass both parameters in full, there's a lot of logic to
- fill in missing fields. As discussed in the previous section, only one of
- system, config, and
- parsed is needed to infer the other two. Additionally,
- libc will be inferred from parse.
- Finally, localSystem.system is also
- impurely inferred based on the platform evaluation
- occurs. This means it is often not necessary to pass
- localSystem at all, as in the command-line example in the
- previous paragraph.
+ While one is free to pass both parameters in full, there's a lot of logic to fill in missing fields. As discussed in the previous section, only one of system, config, and parsed is needed to infer the other two. Additionally, libc will be inferred from parse. Finally, localSystem.system is also impurely inferred based on the platform evaluation occurs. This means it is often not necessary to pass localSystem at all, as in the command-line example in the previous paragraph.
- Many sources (manual, wiki, etc) probably mention passing
- system, platform, along with the
- optional crossSystem to nixpkgs: import
- <nixpkgs> { system = ..; platform = ..; crossSystem = ..;
- }. Passing those two instead of localSystem is
- still supported for compatibility, but is discouraged. Indeed, much of the
- inference we do for these parameters is motivated by compatibility as much
- as convenience.
+ Many sources (manual, wiki, etc) probably mention passing system, platform, along with the optional crossSystem to nixpkgs: import <nixpkgs> { system = ..; platform = ..; crossSystem = ..; }. Passing those two instead of localSystem is still supported for compatibility, but is discouraged. Indeed, much of the inference we do for these parameters is motivated by compatibility as much as convenience.
- One would think that localSystem and
- crossSystem overlap horribly with the three
- *Platforms (buildPlatform,
- hostPlatform, and targetPlatform; see
- stage.nix or the manual). Actually, those identifiers are
- purposefully not used here to draw a subtle but important distinction: While
- the granularity of having 3 platforms is necessary to properly *build*
- packages, it is overkill for specifying the user's *intent* when making a
- build plan or package set. A simple "build vs deploy" dichotomy is adequate:
- the sliding window principle described in the previous section shows how to
- interpolate between the these two "end points" to get the 3 platform triple
- for each bootstrapping stage. That means for any package a given package
- set, even those not bound on the top level but only reachable via
- dependencies or buildPackages, the three platforms will
- be defined as one of localSystem or
- crossSystem, with the former replacing the latter as one
- traverses build-time dependencies. A last simple difference is that
- crossSystem should be null when one doesn't want to
- cross-compile, while the *Platforms are always non-null.
- localSystem is always non-null.
+ One would think that localSystem and crossSystem overlap horribly with the three *Platforms (buildPlatform, hostPlatform, and targetPlatform; see stage.nix or the manual). Actually, those identifiers are purposefully not used here to draw a subtle but important distinction: While the granularity of having 3 platforms is necessary to properly *build* packages, it is overkill for specifying the user's *intent* when making a build plan or package set. A simple "build vs deploy" dichotomy is adequate: the sliding window principle described in the previous section shows how to interpolate between the these two "end points" to get the 3 platform triple for each bootstrapping stage. That means for any package a given package set, even those not bound on the top level but only reachable via dependencies or buildPackages, the three platforms will be defined as one of localSystem or crossSystem, with the former replacing the latter as one traverses build-time dependencies. A last simple difference is that crossSystem should be null when one doesn't want to cross-compile, while the *Platforms are always non-null. localSystem is always non-null.
@@ -481,62 +305,20 @@ nix-build <nixpkgs> --arg crossSystem '{ config = "<arch>-<os>
Implementation of dependencies
- The categorizes of dependencies developed in
- are specified as
- lists of derivations given to mkDerivation, as
- documented in . In short,
- each list of dependencies for "host → target" of "foo → bar" is called
- depsFooBar, with exceptions for backwards
- compatibility that depsBuildHost is instead called
- nativeBuildInputs and depsHostTarget
- is instead called buildInputs. Nixpkgs is now structured
- so that each depsFooBar is automatically taken from
- pkgsFooBar. (These pkgsFooBars are
- quite new, so there is no special case for
- nativeBuildInputs and buildInputs.)
- For example, pkgsBuildHost.gcc should be used at
- build-time, while pkgsHostTarget.gcc should be used at
- run-time.
+ The categorizes of dependencies developed in are specified as lists of derivations given to mkDerivation, as documented in . In short, each list of dependencies for "host → target" of "foo → bar" is called depsFooBar, with exceptions for backwards compatibility that depsBuildHost is instead called nativeBuildInputs and depsHostTarget is instead called buildInputs. Nixpkgs is now structured so that each depsFooBar is automatically taken from pkgsFooBar. (These pkgsFooBars are quite new, so there is no special case for nativeBuildInputs and buildInputs.) For example, pkgsBuildHost.gcc should be used at build-time, while pkgsHostTarget.gcc should be used at run-time.
- Now, for most of Nixpkgs's history, there were no
- pkgsFooBar attributes, and most packages have not been
- refactored to use it explicitly. Prior to those, there were just
- buildPackages, pkgs, and
- targetPackages. Those are now redefined as aliases to
- pkgsBuildHost, pkgsHostTarget, and
- pkgsTargetTarget. It is acceptable, even
- recommended, to use them for libraries to show that the host platform is
- irrelevant.
+ Now, for most of Nixpkgs's history, there were no pkgsFooBar attributes, and most packages have not been refactored to use it explicitly. Prior to those, there were just buildPackages, pkgs, and targetPackages. Those are now redefined as aliases to pkgsBuildHost, pkgsHostTarget, and pkgsTargetTarget. It is acceptable, even recommended, to use them for libraries to show that the host platform is irrelevant.
- But before that, there was just pkgs, even though both
- buildInputs and nativeBuildInputs
- existed. [Cross barely worked, and those were implemented with some hacks
- on mkDerivation to override dependencies.] What this
- means is the vast majority of packages do not use any explicit package set
- to populate their dependencies, just using whatever
- callPackage gives them even if they do correctly sort
- their dependencies into the multiple lists described above. And indeed,
- asking that users both sort their dependencies, and
- take them from the right attribute set, is both too onerous and redundant,
- so the recommended approach (for now) is to continue just categorizing by
- list and not using an explicit package set.
+ But before that, there was just pkgs, even though both buildInputs and nativeBuildInputs existed. [Cross barely worked, and those were implemented with some hacks on mkDerivation to override dependencies.] What this means is the vast majority of packages do not use any explicit package set to populate their dependencies, just using whatever callPackage gives them even if they do correctly sort their dependencies into the multiple lists described above. And indeed, asking that users both sort their dependencies, and take them from the right attribute set, is both too onerous and redundant, so the recommended approach (for now) is to continue just categorizing by list and not using an explicit package set.
- To make this work, we "splice" together the six
- pkgsFooBar package sets and have
- callPackage actually take its arguments from that. This
- is currently implemented in pkgs/top-level/splice.nix.
- mkDerivation then, for each dependency attribute, pulls
- the right derivation out from the splice. This splicing can be skipped when
- not cross-compiling as the package sets are the same, but still is a bit
- slow for cross-compiling. We'd like to do something better, but haven't
- come up with anything yet.
+ To make this work, we "splice" together the six pkgsFooBar package sets and have callPackage actually take its arguments from that. This is currently implemented in pkgs/top-level/splice.nix. mkDerivation then, for each dependency attribute, pulls the right derivation out from the splice. This splicing can be skipped when not cross-compiling as the package sets are the same, but still is a bit slow for cross-compiling. We'd like to do something better, but haven't come up with anything yet.
@@ -544,21 +326,11 @@ nix-build <nixpkgs> --arg crossSystem '{ config = "<arch>-<os>
Bootstrapping
- Each of the package sets described above come from a single bootstrapping
- stage. While pkgs/top-level/default.nix, coordinates
- the composition of stages at a high level,
- pkgs/top-level/stage.nix "ties the knot" (creates the
- fixed point) of each stage. The package sets are defined per-stage however,
- so they can be thought of as edges between stages (the nodes) in a graph.
- Compositions like pkgsBuildTarget.targetPackages can be
- thought of as paths to this graph.
+ Each of the package sets described above come from a single bootstrapping stage. While pkgs/top-level/default.nix, coordinates the composition of stages at a high level, pkgs/top-level/stage.nix "ties the knot" (creates the fixed point) of each stage. The package sets are defined per-stage however, so they can be thought of as edges between stages (the nodes) in a graph. Compositions like pkgsBuildTarget.targetPackages can be thought of as paths to this graph.
- While there are many package sets, and thus many edges, the stages can also
- be arranged in a linear chain. In other words, many of the edges are
- redundant as far as connectivity is concerned. This hinges on the type of
- bootstrapping we do. Currently for cross it is:
+ While there are many package sets, and thus many edges, the stages can also be arranged in a linear chain. In other words, many of the edges are redundant as far as connectivity is concerned. This hinges on the type of bootstrapping we do. Currently for cross it is:
@@ -576,101 +348,45 @@ nix-build <nixpkgs> --arg crossSystem '{ config = "<arch>-<os>
- In each stage, pkgsBuildHost refers the the previous
- stage, pkgsBuildBuild refers to the one before that, and
- pkgsHostTarget refers to the current one, and
- pkgsTargetTarget refers to the next one. When there is
- no previous or next stage, they instead refer to the current stage. Note
- how all the invariants regarding the mapping between dependency and depending
- packages' build host and target platforms are preserved.
- pkgsBuildTarget and pkgsHostHost are
- more complex in that the stage fitting the requirements isn't always a
- fixed chain of "prevs" and "nexts" away (modulo the "saturating"
- self-references at the ends). We just special case each instead. All the primary
- edges are implemented is in pkgs/stdenv/booter.nix,
- and secondarily aliases in pkgs/top-level/stage.nix.
+ In each stage, pkgsBuildHost refers the the previous stage, pkgsBuildBuild refers to the one before that, and pkgsHostTarget refers to the current one, and pkgsTargetTarget refers to the next one. When there is no previous or next stage, they instead refer to the current stage. Note how all the invariants regarding the mapping between dependency and depending packages' build host and target platforms are preserved. pkgsBuildTarget and pkgsHostHost are more complex in that the stage fitting the requirements isn't always a fixed chain of "prevs" and "nexts" away (modulo the "saturating" self-references at the ends). We just special case each instead. All the primary edges are implemented is in pkgs/stdenv/booter.nix, and secondarily aliases in pkgs/top-level/stage.nix.
- Note the native stages are bootstrapped in legacy ways that predate the
- current cross implementation. This is why the the bootstrapping stages
- leading up to the final stages are ignored inthe previous paragraph.
+ Note the native stages are bootstrapped in legacy ways that predate the current cross implementation. This is why the the bootstrapping stages leading up to the final stages are ignored inthe previous paragraph.
- If one looks at the 3 platform triples, one can see that they overlap such
- that one could put them together into a chain like:
+ If one looks at the 3 platform triples, one can see that they overlap such that one could put them together into a chain like:
(native, native, native, foreign, foreign)
- If one imagines the saturating self references at the end being replaced
- with infinite stages, and then overlays those platform triples, one ends up
- with the infinite tuple:
+ If one imagines the saturating self references at the end being replaced with infinite stages, and then overlays those platform triples, one ends up with the infinite tuple:
(native..., native, native, native, foreign, foreign, foreign...)
- On can then imagine any sequence of platforms such that there are bootstrap
- stages with their 3 platforms determined by "sliding a window" that is the
- 3 tuple through the sequence. This was the original model for
- bootstrapping. Without a target platform (assume a better world where all
- compilers are multi-target and all standard libraries are built in their
- own derivation), this is sufficient. Conversely if one wishes to cross
- compile "faster", with a "Canadian Cross" bootstraping stage where
- build != host != target, more bootstrapping stages are
- needed since no sliding window providess the pesky
- pkgsBuildTarget package set since it skips the Canadian
- cross stage's "host".
+ On can then imagine any sequence of platforms such that there are bootstrap stages with their 3 platforms determined by "sliding a window" that is the 3 tuple through the sequence. This was the original model for bootstrapping. Without a target platform (assume a better world where all compilers are multi-target and all standard libraries are built in their own derivation), this is sufficient. Conversely if one wishes to cross compile "faster", with a "Canadian Cross" bootstraping stage where build != host != target, more bootstrapping stages are needed since no sliding window providess the pesky pkgsBuildTarget package set since it skips the Canadian cross stage's "host".
- It is much better to refer to buildPackages than
- targetPackages, or more broadly package sets that do
- not mention "target". There are three reasons for this.
+ It is much better to refer to buildPackages than targetPackages, or more broadly package sets that do not mention "target". There are three reasons for this.
- First, it is because bootstrapping stages do not have a unique
- targetPackages. For example a (x86-linux,
- x86-linux, arm-linux) and (x86-linux, x86-linux,
- x86-windows) package set both have a (x86-linux,
- x86-linux, x86-linux) package set. Because there is no canonical
- targetPackages for such a native (build ==
- host == target) package set, we set their
- targetPackages
+ First, it is because bootstrapping stages do not have a unique targetPackages. For example a (x86-linux, x86-linux, arm-linux) and (x86-linux, x86-linux, x86-windows) package set both have a (x86-linux, x86-linux, x86-linux) package set. Because there is no canonical targetPackages for such a native (build == host == target) package set, we set their targetPackages
- Second, it is because this is a frequent source of hard-to-follow
- "infinite recursions" / cycles. When only package sets that don't mention
- target are used, the package set forms a directed acyclic graph. This
- means that all cycles that exist are confined to one stage. This means
- they are a lot smaller, and easier to follow in the code or a backtrace. It
- also means they are present in native and cross builds alike, and so more
- likely to be caught by CI and other users.
+ Second, it is because this is a frequent source of hard-to-follow "infinite recursions" / cycles. When only package sets that don't mention target are used, the package set forms a directed acyclic graph. This means that all cycles that exist are confined to one stage. This means they are a lot smaller, and easier to follow in the code or a backtrace. It also means they are present in native and cross builds alike, and so more likely to be caught by CI and other users.
- Thirdly, it is because everything target-mentioning only exists to
- accommodate compilers with lousy build systems that insist on the compiler
- itself and standard library being built together. Of course that is bad
- because bigger derivations means longer rebuilds. It is also problematic because
- it tends to make the standard libraries less like other libraries than
- they could be, complicating code and build systems alike. Because of the
- other problems, and because of these innate disadvantages, compilers ought
- to be packaged another way where possible.
+ Thirdly, it is because everything target-mentioning only exists to accommodate compilers with lousy build systems that insist on the compiler itself and standard library being built together. Of course that is bad because bigger derivations means longer rebuilds. It is also problematic because it tends to make the standard libraries less like other libraries than they could be, complicating code and build systems alike. Because of the other problems, and because of these innate disadvantages, compilers ought to be packaged another way where possible.
- If one explores Nixpkgs, they will see derivations with names like
- gccCross. Such *Cross derivations is
- a holdover from before we properly distinguished between the host and
- target platforms—the derivation with "Cross" in the name covered the
- build = host != target case, while the other covered
- the host = target, with build platform the same or not
- based on whether one was using its .nativeDrv or
- .crossDrv. This ugliness will disappear soon.
+ If one explores Nixpkgs, they will see derivations with names like gccCross. Such *Cross derivations is a holdover from before we properly distinguished between the host and target platforms—the derivation with "Cross" in the name covered the build = host != target case, while the other covered the host = target, with build platform the same or not based on whether one was using its .nativeDrv or .crossDrv. This ugliness will disappear soon.
diff --git a/doc/doc-support/lib-function-locations.nix b/doc/doc-support/lib-function-locations.nix
index ae7036e46264..68edd2709854 100644
--- a/doc/doc-support/lib-function-locations.nix
+++ b/doc/doc-support/lib-function-locations.nix
@@ -14,10 +14,10 @@ let
builtins.map
(subsetname: {
subsetname = subsetname;
- functions = libDefPos toplib."${subsetname}";
+ functions = libDefPos toplib.${subsetname};
})
(builtins.filter
- (name: builtins.isAttrs toplib."${name}")
+ (name: builtins.isAttrs toplib.${name})
(builtins.attrNames toplib));
nixpkgsLib = pkgs.lib;
diff --git a/doc/doc-support/parameters.xml b/doc/doc-support/parameters.xml
index bc13e2b70dec..e4b33e66ee4d 100644
--- a/doc/doc-support/parameters.xml
+++ b/doc/doc-support/parameters.xml
@@ -8,7 +8,7 @@
-
+
diff --git a/doc/functions.xml b/doc/functions.xml
index 3b60f46d81da..5a9240ec800e 100644
--- a/doc/functions.xml
+++ b/doc/functions.xml
@@ -4,20 +4,11 @@
xml:id="chap-functions">
Functions reference
- The nixpkgs repository has several utility functions to manipulate Nix
- expressions.
+ The nixpkgs repository has several utility functions to manipulate Nix expressions.
-
-
-
-
-
-
-
-
diff --git a/doc/functions/debug.xml b/doc/functions/debug.xml
index c6b3611eea53..c27421f12e76 100644
--- a/doc/functions/debug.xml
+++ b/doc/functions/debug.xml
@@ -5,17 +5,10 @@
Debugging Nix Expressions
- Nix is a unityped, dynamic language, this means every value can potentially
- appear anywhere. Since it is also non-strict, evaluation order and what
- ultimately is evaluated might surprise you. Therefore it is important to be
- able to debug nix expressions.
+ Nix is a unityped, dynamic language, this means every value can potentially appear anywhere. Since it is also non-strict, evaluation order and what ultimately is evaluated might surprise you. Therefore it is important to be able to debug nix expressions.
- In the lib/debug.nix file you will find a number of
- functions that help (pretty-)printing values while evaluation is runnnig. You
- can even specify how deep these values should be printed recursively, and
- transform them on the fly. Please consult the docstrings in
- lib/debug.nix for usage information.
+ In the lib/debug.nix file you will find a number of functions that help (pretty-)printing values while evaluation is runnnig. You can even specify how deep these values should be printed recursively, and transform them on the fly. Please consult the docstrings in lib/debug.nix for usage information.
diff --git a/doc/functions/fetchers.xml b/doc/functions/fetchers.xml
deleted file mode 100644
index a736008c9d41..000000000000
--- a/doc/functions/fetchers.xml
+++ /dev/null
@@ -1,194 +0,0 @@
-
- Fetcher functions
-
-
- When using Nix, you will frequently need to download source code and other
- files from the internet. Nixpkgs comes with a few helper functions that allow
- you to fetch fixed-output derivations in a structured way.
-
-
-
- The two fetcher primitives are fetchurl and
- fetchzip. Both of these have two required arguments, a
- URL and a hash. The hash is typically sha256, although
- many more hash algorithms are supported. Nixpkgs contributors are currently
- recommended to use sha256. This hash will be used by Nix
- to identify your source. A typical usage of fetchurl is provided below.
-
-
-
-
-
- The main difference between fetchurl and
- fetchzip is in how they store the contents.
- fetchurl will store the unaltered contents of the URL
- within the Nix store. fetchzip on the other hand will
- decompress the archive for you, making files and directories directly
- accessible in the future. fetchzip can only be used with
- archives. Despite the name, fetchzip is not limited to
- .zip files and can also be used with any tarball.
-
-
-
- fetchpatch works very similarly to
- fetchurl with the same arguments expected. It expects
- patch files as a source and and performs normalization on them before
- computing the checksum. For example it will remove comments or other unstable
- parts that are sometimes added by version control systems and can change over
- time.
-
-
-
- Other fetcher functions allow you to add source code directly from a VCS such
- as subversion or git. These are mostly straightforward names based on the
- name of the command used with the VCS system. Because they give you a working
- repository, they act most like fetchzip.
-
-
-
-
-
- fetchsvn
-
-
-
- Used with Subversion. Expects url to a Subversion
- directory, rev, and sha256.
-
-
-
-
-
- fetchgit
-
-
-
- Used with Git. Expects url to a Git repo,
- rev, and sha256.
- rev in this case can be full the git commit id (SHA1
- hash) or a tag name like refs/tags/v1.0.
-
-
-
-
-
- fetchfossil
-
-
-
- Used with Fossil. Expects url to a Fossil archive,
- rev, and sha256.
-
-
-
-
-
- fetchcvs
-
-
-
- Used with CVS. Expects cvsRoot, tag,
- and sha256.
-
-
-
-
-
- fetchhg
-
-
-
- Used with Mercurial. Expects url,
- rev, and sha256.
-
-
-
-
-
-
- A number of fetcher functions wrap part of fetchurl and
- fetchzip. They are mainly convenience functions intended
- for commonly used destinations of source code in Nixpkgs. These wrapper
- fetchers are listed below.
-
-
-
-
-
- fetchFromGitHub
-
-
-
- fetchFromGitHub expects four arguments.
- owner is a string corresponding to the GitHub user or
- organization that controls this repository. repo
- corresponds to the name of the software repository. These are located at
- the top of every GitHub HTML page as
- owner/repo. rev
- corresponds to the Git commit hash or tag (e.g v1.0)
- that will be downloaded from Git. Finally, sha256
- corresponds to the hash of the extracted directory. Again, other hash
- algorithms are also available but sha256 is currently
- preferred.
-
-
-
-
-
- fetchFromGitLab
-
-
-
- This is used with GitLab repositories. The arguments expected are very
- similar to fetchFromGitHub above.
-
-
-
-
-
- fetchFromBitbucket
-
-
-
- This is used with BitBucket repositories. The arguments expected are very
- similar to fetchFromGitHub above.
-
-
-
-
-
- fetchFromSavannah
-
-
-
- This is used with Savannah repositories. The arguments expected are very
- similar to fetchFromGitHub above.
-
-
-
-
-
- fetchFromRepoOrCz
-
-
-
- This is used with repo.or.cz repositories. The arguments expected are very
- similar to fetchFromGitHub above.
-
-
-
-
-
diff --git a/doc/functions/generators.xml b/doc/functions/generators.xml
index e860b10e8979..9ce1f85eb173 100644
--- a/doc/functions/generators.xml
+++ b/doc/functions/generators.xml
@@ -5,28 +5,15 @@
Generators
- Generators are functions that create file formats from nix data structures,
- e. g. for configuration files. There are generators available for:
- INI, JSON and YAML
+ Generators are functions that create file formats from nix data structures, e. g. for configuration files. There are generators available for: INI, JSON and YAML
- All generators follow a similar call interface: generatorName
- configFunctions data, where configFunctions is an
- attrset of user-defined functions that format nested parts of the content.
- They each have common defaults, so often they do not need to be set manually.
- An example is mkSectionName ? (name: libStr.escape [ "[" "]" ]
- name) from the INI generator. It receives the name
- of a section and sanitizes it. The default mkSectionName
- escapes [ and ] with a backslash.
+ All generators follow a similar call interface: generatorName configFunctions data, where configFunctions is an attrset of user-defined functions that format nested parts of the content. They each have common defaults, so often they do not need to be set manually. An example is mkSectionName ? (name: libStr.escape [ "[" "]" ] name) from the INI generator. It receives the name of a section and sanitizes it. The default mkSectionName escapes [ and ] with a backslash.
- Generators can be fine-tuned to produce exactly the file format required by
- your application/service. One example is an INI-file format which uses
- : as separator, the strings
- "yes"/"no" as boolean values and
- requires all string values to be quoted:
+ Generators can be fine-tuned to produce exactly the file format required by your application/service. One example is an INI-file format which uses : as separator, the strings "yes"/"no" as boolean values and requires all string values to be quoted:
@@ -77,13 +64,11 @@ merge:"diff3"
- Nix store paths can be converted to strings by enclosing a derivation
- attribute like so: "${drv}".
+ Nix store paths can be converted to strings by enclosing a derivation attribute like so: "${drv}".
- Detailed documentation for each generator can be found in
- lib/generators.nix.
+ Detailed documentation for each generator can be found in lib/generators.nix.
diff --git a/doc/functions/library.xml b/doc/functions/library.xml
index e6aedaa6efdd..6ffb944b5a60 100644
--- a/doc/functions/library.xml
+++ b/doc/functions/library.xml
@@ -5,8 +5,7 @@
Nixpkgs Library Functions
- Nixpkgs provides a standard library at pkgs.lib, or
- through import <nixpkgs/lib>.
+ Nixpkgs provides a standard library at pkgs.lib, or through import <nixpkgs/lib>.
diff --git a/doc/functions/library/asserts.xml b/doc/functions/library/asserts.xml
index 437850e408bc..10891039e869 100644
--- a/doc/functions/library/asserts.xml
+++ b/doc/functions/library/asserts.xml
@@ -27,8 +27,7 @@
- Condition under which the msg should
- not be printed.
+ Condition under which the msg should not be printed.
@@ -64,9 +63,7 @@ stderr> assert failed
- Specialized asserts.assertMsg for checking if
- val is one of the elements of xs.
- Useful for checking enums.
+ Specialized asserts.assertMsg for checking if val is one of the elements of xs. Useful for checking enums.
@@ -76,8 +73,7 @@ stderr> assert failed
- The name of the variable the user entered val into,
- for inclusion in the error message.
+ The name of the variable the user entered val into, for inclusion in the error message.
@@ -87,8 +83,7 @@ stderr> assert failed
- The value of what the user provided, to be compared against the values in
- xs.
+ The value of what the user provided, to be compared against the values in xs.
diff --git a/doc/functions/library/attrsets.xml b/doc/functions/library/attrsets.xml
index 65d0b40e2e82..f9234069392e 100644
--- a/doc/functions/library/attrsets.xml
+++ b/doc/functions/library/attrsets.xml
@@ -23,8 +23,7 @@
- A list of strings representing the path through the nested attribute set
- set.
+ A list of strings representing the path through the nested attribute set set.
@@ -34,8 +33,7 @@
- Default value if attrPath does not resolve to an
- existing value.
+ Default value if attrPath does not resolve to an existing value.
@@ -88,8 +86,7 @@ lib.attrsets.attrByPath [ "a" "b" ] 0 {}
- A list of strings representing the path through the nested attribute set
- set.
+ A list of strings representing the path through the nested attribute set set.
@@ -125,8 +122,7 @@ lib.attrsets.hasAttrByPath
- Create a new attribute set with value set at the nested
- attribute location specified in attrPath.
+ Create a new attribute set with value set at the nested attribute location specified in attrPath.
@@ -146,8 +142,7 @@ lib.attrsets.hasAttrByPath
- The value to set at the location described by
- attrPath.
+ The value to set at the location described by attrPath.
@@ -171,8 +166,7 @@ lib.attrsets.setAttrByPath [ "a" "b" ] 3
- Like except
- without a default, and it will throw if the value doesn't exist.
+ Like except without a default, and it will throw if the value doesn't exist.
@@ -182,8 +176,7 @@ lib.attrsets.setAttrByPath [ "a" "b" ] 3
- A list of strings representing the path through the nested attribute set
- set.
+ A list of strings representing the path through the nested attribute set set.
@@ -235,8 +228,7 @@ lib.attrsets.getAttrFromPath [ "x" "y" ] { }
- The list of attributes to fetch from set. Each
- attribute name must exist on the attrbitue set.
+ The list of attributes to fetch from set. Each attribute name must exist on the attrbitue set.
@@ -282,8 +274,7 @@ error: attribute 'd' missing
- Provides a backwards-compatible interface of
- builtins.attrValues for Nix version older than 1.8.
+ Provides a backwards-compatible interface of builtins.attrValues for Nix version older than 1.8.
@@ -317,14 +308,11 @@ lib.attrsets.attrValues { a = 1; b = 2; c = 3; }
- Collect each attribute named `attr' from the list of attribute sets,
- sets. Sets that don't contain the named attribute are
- ignored.
+ Collect each attribute named `attr' from the list of attribute sets, sets. Sets that don't contain the named attribute are ignored.
- Provides a backwards-compatible interface of
- builtins.catAttrs for Nix version older than 1.9.
+ Provides a backwards-compatible interface of builtins.catAttrs for Nix version older than 1.9.
@@ -334,8 +322,7 @@ lib.attrsets.attrValues { a = 1; b = 2; c = 3; }
- Attribute name to select from each attribute set in
- sets.
+ Attribute name to select from each attribute set in sets.
@@ -372,8 +359,7 @@ catAttrs "a" [{a = 1;} {b = 0;} {a = 2;}]
- Filter an attribute set by removing all attributes for which the given
- predicate return false.
+ Filter an attribute set by removing all attributes for which the given predicate return false.
@@ -386,8 +372,7 @@ catAttrs "a" [{a = 1;} {b = 0;} {a = 2;}]
String -> Any -> Bool
- Predicate which returns true to include an attribute, or returns false to
- exclude it.
+ Predicate which returns true to include an attribute, or returns false to exclude it.
@@ -412,8 +397,7 @@ catAttrs "a" [{a = 1;} {b = 0;} {a = 2;}]
- Returns true to include the attribute,
- false to exclude the attribute.
+ Returns true to include the attribute, false to exclude the attribute.
@@ -447,8 +431,7 @@ filterAttrs (n: v: n == "foo") { foo = 1; bar = 2; }
- Filter an attribute set recursively by removing all attributes for which the
- given predicate return false.
+ Filter an attribute set recursively by removing all attributes for which the given predicate return false.
@@ -461,8 +444,7 @@ filterAttrs (n: v: n == "foo") { foo = 1; bar = 2; }
String -> Any -> Bool
- Predicate which returns true to include an attribute, or returns false to
- exclude it.
+ Predicate which returns true to include an attribute, or returns false to exclude it.
@@ -487,8 +469,7 @@ filterAttrs (n: v: n == "foo") { foo = 1; bar = 2; }
- Returns true to include the attribute,
- false to exclude the attribute.
+ Returns true to include the attribute, false to exclude the attribute.
@@ -557,8 +538,7 @@ lib.attrsets.filterAttrsRecursive
Any -> Any -> Any
- Given a value val and a collector
- col, combine the two.
+ Given a value val and a collector col, combine the two.
@@ -578,8 +558,7 @@ lib.attrsets.filterAttrsRecursive
- The result of previous op calls with other values
- and nul.
+ The result of previous op calls with other values and nul.
@@ -632,9 +611,7 @@ lib.attrsets.foldAttrs
- Recursively collect sets that verify a given predicate named
- pred from the set attrs. The recursion
- stops when pred returns true.
+ Recursively collect sets that verify a given predicate named pred from the set attrs. The recursion stops when pred returns true.
@@ -702,8 +679,7 @@ collect (x: x ? outPath)
- Utility function that creates a {name, value} pair as
- expected by builtins.listToAttrs.
+ Utility function that creates a {name, value} pair as expected by builtins.listToAttrs.
@@ -747,13 +723,11 @@ nameValuePair "some" 6
- Apply a function to each element in an attribute set, creating a new
- attribute set.
+ Apply a function to each element in an attribute set, creating a new attribute set.
- Provides a backwards-compatible interface of
- builtins.mapAttrs for Nix version older than 2.1.
+ Provides a backwards-compatible interface of builtins.mapAttrs for Nix version older than 2.1.
@@ -814,9 +788,7 @@ lib.attrsets.mapAttrs
- Like mapAttrs, but allows the name of each attribute to
- be changed in addition to the value. The applied function should return both
- the new name and value as a nameValuePair.
+ Like mapAttrs, but allows the name of each attribute to be changed in addition to the value. The applied function should return both the new name and value as a nameValuePair.
@@ -829,10 +801,8 @@ lib.attrsets.mapAttrs
String -> Any -> { name = String; value = Any }
- Given an attribute's name and value, return a new
- name
- value pair.
+ Given an attribute's name and value, return a new name value pair.
@@ -891,8 +861,7 @@ lib.attrsets.mapAttrs' (name: value: lib.attrsets.nameValuePair ("foo_" + name)
- Call fn for each attribute in the given
- set and return the result in a list.
+ Call fn for each attribute in the given set and return the result in a list.
@@ -962,9 +931,7 @@ lib.attrsets.mapAttrsToList (name: value: "${name}=${value}")
- Like mapAttrs, except that it recursively applies
- itself to attribute sets. Also, the first argument of the argument function
- is a list of the names of the containing attributes.
+ Like mapAttrs, except that it recursively applies itself to attribute sets. Also, the first argument of the argument function is a list of the names of the containing attributes.
@@ -989,10 +956,7 @@ lib.attrsets.mapAttrsToList (name: value: "${name}=${value}")
The list of attribute names to this value.
- For example, the name_path for the
- example string in the attribute set { foo
- = { bar = "example"; }; } is [ "foo" "bar"
- ].
+ For example, the name_path for the example string in the attribute set { foo = { bar = "example"; }; } is [ "foo" "bar" ].
@@ -1059,11 +1023,7 @@ mapAttrsRecursive
- Like mapAttrsRecursive, but it takes an additional
- predicate function that tells it whether to recursive into an attribute set.
- If it returns false, mapAttrsRecursiveCond does not
- recurse, but does apply the map function. It is returns true, it does
- recurse, and does not apply the map function.
+ Like mapAttrsRecursive, but it takes an additional predicate function that tells it whether to recursive into an attribute set. If it returns false, mapAttrsRecursiveCond does not recurse, but does apply the map function. It is returns true, it does recurse, and does not apply the map function.
@@ -1076,8 +1036,7 @@ mapAttrsRecursive
(AttrSet -> Bool)
- Determine if mapAttrsRecursive should recurse deeper
- in to the attribute set.
+ Determine if mapAttrsRecursive should recurse deeper in to the attribute set.
@@ -1114,10 +1073,7 @@ mapAttrsRecursive
The list of attribute names to this value.
- For example, the name_path for the
- example string in the attribute set { foo
- = { bar = "example"; }; } is [ "foo" "bar"
- ].
+ For example, the name_path for the example string in the attribute set { foo = { bar = "example"; }; } is [ "foo" "bar" ].
@@ -1181,8 +1137,7 @@ lib.attrsets.mapAttrsRecursiveCond
- Generate an attribute set by mapping a function over a list of attribute
- names.
+ Generate an attribute set by mapping a function over a list of attribute names.
@@ -1241,8 +1196,7 @@ lib.attrsets.genAttrs [ "foo" "bar" ] (name: "x_${name}")
- Check whether the argument is a derivation. Any set with { type =
- "derivation"; } counts as a derivation.
+ Check whether the argument is a derivation. Any set with { type = "derivation"; } counts as a derivation.
@@ -1320,8 +1274,7 @@ lib.attrsets.isDerivation "foobar"
- Condition under which the as attribute set is
- returned.
+ Condition under which the as attribute set is returned.
@@ -1363,8 +1316,7 @@ lib.attrsets.optionalAttrs false { my = "set"; }
- Merge sets of attributes and use the function f to merge
- attribute values where the attribute name is in names.
+ Merge sets of attributes and use the function f to merge attribute values where the attribute name is in names.
@@ -1451,11 +1403,8 @@ lib.attrsets.zipAttrsWithNames
- Merge sets of attributes and use the function f to merge
- attribute values. Similar to
- where
- all key names are passed for names.
+ Merge sets of attributes and use the function f to merge attribute values. Similar to where all key names are passed for names.
@@ -1531,9 +1480,7 @@ lib.attrsets.zipAttrsWith
- Merge sets of attributes and combine each attribute value in to a list.
- Similar to
- where the merge function returns a list of all values.
+ Merge sets of attributes and combine each attribute value in to a list. Similar to where the merge function returns a list of all values.
@@ -1573,12 +1520,7 @@ lib.attrsets.zipAttrs
- Does the same as the update operator // except that
- attributes are merged until the given predicate is verified. The predicate
- should accept 3 arguments which are the path to reach the attribute, a part
- of the first attribute set and a part of the second attribute set. When the
- predicate is verified, the value of the first attribute set is replaced by
- the value of the second attribute set.
+ Does the same as the update operator // except that attributes are merged until the given predicate is verified. The predicate should accept 3 arguments which are the path to reach the attribute, a part of the first attribute set and a part of the second attribute set. When the predicate is verified, the value of the first attribute set is replaced by the value of the second attribute set.
@@ -1681,10 +1623,7 @@ lib.attrsets.recursiveUpdateUntil (path: l: r: path == ["foo"])
- A recursive variant of the update operator //. The
- recursion stops when one of the attribute values is not an attribute set, in
- which case the right hand side value takes precedence over the left hand
- side value.
+ A recursive variant of the update operator //. The recursion stops when one of the attribute values is not an attribute set, in which case the right hand side value takes precedence over the left hand side value.
diff --git a/doc/functions/nix-gitignore.xml b/doc/functions/nix-gitignore.xml
index 9011570d1eae..37a82b196ccf 100644
--- a/doc/functions/nix-gitignore.xml
+++ b/doc/functions/nix-gitignore.xml
@@ -5,21 +5,14 @@
pkgs.nix-gitignore
- pkgs.nix-gitignore is a function that acts similarly to
- builtins.filterSource but also allows filtering with the
- help of the gitignore format.
+ pkgs.nix-gitignore is a function that acts similarly to builtins.filterSource but also allows filtering with the help of the gitignore format.
Usage
- pkgs.nix-gitignore exports a number of functions, but
- you'll most likely need either gitignoreSource or
- gitignoreSourcePure. As their first argument, they both
- accept either 1. a file with gitignore lines or 2. a string with gitignore
- lines, or 3. a list of either of the two. They will be concatenated into a
- single big string.
+ pkgs.nix-gitignore exports a number of functions, but you'll most likely need either gitignoreSource or gitignoreSourcePure. As their first argument, they both accept either 1. a file with gitignore lines or 2. a string with gitignore lines, or 3. a list of either of the two. They will be concatenated into a single big string.
- These functions are derived from the Filter functions by
- setting the first filter argument to (_: _: true):
+ These functions are derived from the Filter functions by setting the first filter argument to (_: _: true):
- Those filter functions accept the same arguments the
- builtins.filterSource function would pass to its filters,
- thus fn: gitignoreFilterSourcePure fn "" should be
- extensionally equivalent to filterSource. The file is
- blacklisted iff it's blacklisted by either your filter or the
- gitignoreFilter.
+ Those filter functions accept the same arguments the builtins.filterSource function would pass to its filters, thus fn: gitignoreFilterSourcePure fn "" should be extensionally equivalent to filterSource. The file is blacklisted iff it's blacklisted by either your filter or the gitignoreFilter.
@@ -71,8 +58,7 @@ gitignoreFilter = ign: root: filterPattern (gitignoreToPatterns ign) root;
gitignore files in subdirectories
- If you wish to use a filter that would search for .gitignore files in
- subdirectories, just like git does by default, use this function:
+ If you wish to use a filter that would search for .gitignore files in subdirectories, just like git does by default, use this function:
- Overriding
-
-
- Sometimes one wants to override parts of nixpkgs, e.g.
- derivation attributes, the results of derivations.
-
-
-
- These functions are used to make changes to packages, returning only single
- packages. Overlays, on the other
- hand, can be used to combine the overridden packages across the entire
- package set of Nixpkgs.
-
-
-
- <pkg>.override
-
-
- The function override is usually available for all the
- derivations in the nixpkgs expression (pkgs).
-
-
-
- It is used to override the arguments passed to a function.
-
-
-
- Example usages:
-pkgs.foo.override { arg1 = val1; arg2 = val2; ... }
-
-
-import pkgs.path { overlays = [ (self: super: {
- foo = super.foo.override { barSupport = true ; };
- })]};
-
-
-mypkg = pkgs.callPackage ./mypkg.nix {
- mydep = pkgs.mydep.override { ... };
- }
-
-
-
-
- In the first example, pkgs.foo is the result of a
- function call with some default arguments, usually a derivation. Using
- pkgs.foo.override will call the same function with the
- given new arguments.
-
-
-
-
- <pkg>.overrideAttrs
-
-
- The function overrideAttrs allows overriding the
- attribute set passed to a stdenv.mkDerivation call,
- producing a new derivation based on the original one. This function is
- available on all derivations produced by the
- stdenv.mkDerivation function, which is most packages in
- the nixpkgs expression pkgs.
-
-
-
- Example usage:
-
-helloWithDebug = pkgs.hello.overrideAttrs (oldAttrs: rec {
- separateDebugInfo = true;
-});
-
-
-
-
- In the above example, the separateDebugInfo attribute is
- overridden to be true, thus building debug info for
- helloWithDebug, while all other attributes will be
- retained from the original hello package.
-
-
-
- The argument oldAttrs is conventionally used to refer to
- the attr set originally passed to stdenv.mkDerivation.
-
-
-
-
- Note that separateDebugInfo is processed only by the
- stdenv.mkDerivation function, not the generated, raw Nix
- derivation. Thus, using overrideDerivation will not work
- in this case, as it overrides only the attributes of the final derivation.
- It is for this reason that overrideAttrs should be
- preferred in (almost) all cases to overrideDerivation,
- i.e. to allow using stdenv.mkDerivation to process input
- arguments, as well as the fact that it is easier to use (you can use the
- same attribute names you see in your Nix code, instead of the ones
- generated (e.g. buildInputs vs
- nativeBuildInputs), and it involves less typing).
-
-
-
-
-
- <pkg>.overrideDerivation
-
-
-
- You should prefer overrideAttrs in almost all cases, see
- its documentation for the reasons why.
- overrideDerivation is not deprecated and will continue
- to work, but is less nice to use and does not have as many abilities as
- overrideAttrs.
-
-
-
-
-
- Do not use this function in Nixpkgs as it evaluates a Derivation before
- modifying it, which breaks package abstraction and removes error-checking
- of function arguments. In addition, this evaluation-per-function
- application incurs a performance penalty, which can become a problem if
- many overrides are used. It is only intended for ad-hoc customisation, such
- as in ~/.config/nixpkgs/config.nix.
-
-
-
-
- The function overrideDerivation creates a new derivation
- based on an existing one by overriding the original's attributes with the
- attribute set produced by the specified function. This function is available
- on all derivations defined using the makeOverridable
- function. Most standard derivation-producing functions, such as
- stdenv.mkDerivation, are defined using this function,
- which means most packages in the nixpkgs expression,
- pkgs, have this function.
-
-
-
- Example usage:
-
-mySed = pkgs.gnused.overrideDerivation (oldAttrs: {
- name = "sed-4.2.2-pre";
- src = fetchurl {
- url = ftp://alpha.gnu.org/gnu/sed/sed-4.2.2-pre.tar.bz2;
- sha256 = "11nq06d131y4wmf3drm0yk502d2xc6n5qy82cg88rb9nqd2lj41k";
- };
- patches = [];
-});
-
-
-
-
- In the above example, the name, src,
- and patches of the derivation will be overridden, while
- all other attributes will be retained from the original derivation.
-
-
-
- The argument oldAttrs is used to refer to the attribute
- set of the original derivation.
-
-
-
-
- A package's attributes are evaluated *before* being modified by the
- overrideDerivation function. For example, the
- name attribute reference in url =
- "mirror://gnu/hello/${name}.tar.gz"; is filled-in *before* the
- overrideDerivation function modifies the attribute set.
- This means that overriding the name attribute, in this
- example, *will not* change the value of the url
- attribute. Instead, we need to override both the name
- *and* url attributes.
-
-
-
-
-
- lib.makeOverridable
-
-
- The function lib.makeOverridable is used to make the
- result of a function easily customizable. This utility only makes sense for
- functions that accept an argument set and return an attribute set.
-
-
-
- Example usage:
-
-f = { a, b }: { result = a+b; };
-c = lib.makeOverridable f { a = 1; b = 2; };
-
-
-
-
- The variable c is the value of the f
- function applied with some default arguments. Hence the value of
- c.result is 3, in this example.
-
-
-
- The variable c however also has some additional
- functions, like c.override which can
- be used to override the default arguments. In this example the value of
- (c.override { a = 4; }).result is 6.
-
-
-
diff --git a/doc/functions/prefer-remote-fetch.xml b/doc/functions/prefer-remote-fetch.xml
index 3e43fd28ade8..94d25d3d3aeb 100644
--- a/doc/functions/prefer-remote-fetch.xml
+++ b/doc/functions/prefer-remote-fetch.xml
@@ -5,16 +5,12 @@
prefer-remote-fetch overlay
- prefer-remote-fetch is an overlay that download sources
- on remote builder. This is useful when the evaluating machine has a slow
- upload while the builder can fetch faster directly from the source. To use
- it, put the following snippet as a new overlay:
+ prefer-remote-fetch is an overlay that download sources on remote builder. This is useful when the evaluating machine has a slow upload while the builder can fetch faster directly from the source. To use it, put the following snippet as a new overlay:
self: super:
(super.prefer-remote-fetch self super)
- A full configuration example for that sets the overlay up for your own
- account, could look like this
+ A full configuration example for that sets the overlay up for your own account, could look like this
$ mkdir ~/.config/nixpkgs/overlays/
$ cat > ~/.config/nixpkgs/overlays/prefer-remote-fetch.nix <<EOF
diff --git a/doc/functions/trivial-builders.xml b/doc/functions/trivial-builders.xml
deleted file mode 100644
index 0211a4f31728..000000000000
--- a/doc/functions/trivial-builders.xml
+++ /dev/null
@@ -1,113 +0,0 @@
-
- Trivial builders
-
-
- Nixpkgs provides a couple of functions that help with building derivations.
- The most important one, stdenv.mkDerivation, has already
- been documented above. The following functions wrap
- stdenv.mkDerivation, making it easier to use in certain
- cases.
-
-
-
-
-
- runCommand
-
-
-
- This takes three arguments, name,
- env, and buildCommand.
- name is just the name that Nix will append to the store
- path in the same way that stdenv.mkDerivation uses its
- name attribute. env is an attribute
- set specifying environment variables that will be set for this derivation.
- These attributes are then passed to the wrapped
- stdenv.mkDerivation. buildCommand
- specifies the commands that will be run to create this derivation. Note
- that you will need to create $out for Nix to register
- the command as successful.
-
-
- An example of using runCommand is provided below.
-
-
-(import <nixpkgs> {}).runCommand "my-example" {} ''
- echo My example command is running
-
- mkdir $out
-
- echo I can write data to the Nix store > $out/message
-
- echo I can also run basic commands like:
-
- echo ls
- ls
-
- echo whoami
- whoami
-
- echo date
- date
-''
-
-
-
-
-
- runCommandCC
-
-
-
- This works just like runCommand. The only difference is
- that it also provides a C compiler in buildCommand’s
- environment. To minimize your dependencies, you should only use this if
- you are sure you will need a C compiler as part of running your command.
-
-
-
-
-
- writeTextFile, writeText, writeTextDir, writeScript, writeScriptBin
-
-
-
- These functions write text to the Nix store. This is
- useful for creating scripts from Nix expressions.
- writeTextFile takes an attribute set and expects two
- arguments, name and text.
- name corresponds to the name used in the Nix store
- path. text will be the contents of the file. You can
- also set executable to true to make this file have the
- executable bit set.
-
-
- Many more commands wrap writeTextFile including
- writeText, writeTextDir,
- writeScript, and writeScriptBin.
- These are convenience functions over writeTextFile.
-
-
-
-
-
- symlinkJoin
-
-
-
- This can be used to put many derivations into the same directory
- structure. It works by creating a new derivation and adding symlinks to
- each of the paths listed. It expects two arguments,
- name, and paths.
- name is the name used in the Nix store path for the
- created derivation. paths is a list of paths that will
- be symlinked. These paths can be to Nix store derivations or any other
- subdirectory contained within.
-
-
-
-
-
diff --git a/doc/introduction.chapter.md b/doc/introduction.chapter.md
index 6abdc2714e2c..713c7181a3a0 100644
--- a/doc/introduction.chapter.md
+++ b/doc/introduction.chapter.md
@@ -47,5 +47,5 @@ which also builds binary packages from the Nix expressions in Nixpkgs for
The binaries are made available via a [binary cache](https://cache.nixos.org).
The current Nix expressions of the channels are available in the
-[`nixpkgs-channels`](https://github.com/NixOS/nixpkgs-channels) repository,
-which has branches corresponding to the available channels.
+[`nixpkgs`](https://github.com/NixOS/nixpkgs) repository in branches
+that correspond to the channel names (e.g. `nixos-19.09-small`).
diff --git a/doc/languages-frameworks/android.section.md b/doc/languages-frameworks/android.section.md
index 237f3441874f..f268c5525660 100644
--- a/doc/languages-frameworks/android.section.md
+++ b/doc/languages-frameworks/android.section.md
@@ -185,10 +185,9 @@ with import {};
androidenv.emulateApp {
name = "emulate-MyAndroidApp";
- platformVersion = "24";
- abiVersion = "armeabi-v7a"; # mips, x86 or x86_64
- systemImageType = "default";
- useGoogleAPIs = false;
+ platformVersion = "28";
+ abiVersion = "x86_64"; # armeabi-v7a, mips, x86
+ systemImageType = "google_apis_playstore";
}
```
@@ -201,7 +200,7 @@ with import {};
androidenv.emulateApp {
name = "emulate-MyAndroidApp";
platformVersion = "24";
- abiVersion = "armeabi-v7a"; # mips, x86 or x86_64
+ abiVersion = "armeabi-v7a"; # mips, x86, x86_64
systemImageType = "default";
useGoogleAPIs = false;
app = ./MyApp.apk;
diff --git a/doc/languages-frameworks/beam.xml b/doc/languages-frameworks/beam.xml
index dee7f2d74191..74c595cc89b4 100644
--- a/doc/languages-frameworks/beam.xml
+++ b/doc/languages-frameworks/beam.xml
@@ -7,12 +7,7 @@
Introduction
- In this document and related Nix expressions, we use the term,
- BEAM, to describe the environment. BEAM is the name of
- the Erlang Virtual Machine and, as far as we're concerned, from a packaging
- perspective, all languages that run on the BEAM are interchangeable. That
- which varies, like the build system, is transparent to users of any given
- BEAM package, so we make no distinction.
+ In this document and related Nix expressions, we use the term, BEAM, to describe the environment. BEAM is the name of the Erlang Virtual Machine and, as far as we're concerned, from a packaging perspective, all languages that run on the BEAM are interchangeable. That which varies, like the build system, is transparent to users of any given BEAM package, so we make no distinction.
@@ -20,57 +15,36 @@
Structure
- All BEAM-related expressions are available via the top-level
- beam attribute, which includes:
+ All BEAM-related expressions are available via the top-level beam attribute, which includes:
- interpreters: a set of compilers running on the BEAM,
- including multiple Erlang/OTP versions
- (beam.interpreters.erlangR19, etc), Elixir
- (beam.interpreters.elixir) and LFE
- (beam.interpreters.lfe).
+ interpreters: a set of compilers running on the BEAM, including multiple Erlang/OTP versions (beam.interpreters.erlangR19, etc), Elixir (beam.interpreters.elixir) and LFE (beam.interpreters.lfe).
- packages: a set of package sets, each compiled with a
- specific Erlang/OTP version, e.g.
- beam.packages.erlangR19.
+ packages: a set of package sets, each compiled with a specific Erlang/OTP version, e.g. beam.packages.erlangR19.
- The default Erlang compiler, defined by
- beam.interpreters.erlang, is aliased as
- erlang. The default BEAM package set is defined by
- beam.packages.erlang and aliased at the top level as
- beamPackages.
+ The default Erlang compiler, defined by beam.interpreters.erlang, is aliased as erlang. The default BEAM package set is defined by beam.packages.erlang and aliased at the top level as beamPackages.
- To create a package set built with a custom Erlang version, use the lambda,
- beam.packagesWith, which accepts an Erlang/OTP derivation
- and produces a package set similar to
- beam.packages.erlang.
+ To create a package set built with a custom Erlang version, use the lambda, beam.packagesWith, which accepts an Erlang/OTP derivation and produces a package set similar to beam.packages.erlang.
- Many Erlang/OTP distributions available in
- beam.interpreters have versions with ODBC and/or Java
- enabled. For example, there's
- beam.interpreters.erlangR19_odbc_javac, which corresponds
- to beam.interpreters.erlangR19.
+ Many Erlang/OTP distributions available in beam.interpreters have versions with ODBC and/or Java enabled. For example, there's beam.interpreters.erlangR19_odbc_javac, which corresponds to beam.interpreters.erlangR19.
- We also provide the lambda,
- beam.packages.erlang.callPackage, which simplifies
- writing BEAM package definitions by injecting all packages from
- beam.packages.erlang into the top-level context.
+ We also provide the lambda, beam.packages.erlang.callPackage, which simplifies writing BEAM package definitions by injecting all packages from beam.packages.erlang into the top-level context.
@@ -81,28 +55,7 @@
Rebar3
- By default, Rebar3 wants to manage its own dependencies. This is perfectly
- acceptable in the normal, non-Nix setup, but in the Nix world, it is not.
- To rectify this, we provide two versions of Rebar3:
-
-
-
- rebar3: patched to remove the ability to download
- anything. When not running it via nix-shell or
- nix-build, it's probably not going to work as
- desired.
-
-
-
-
- rebar3-open: the normal, unmodified Rebar3. It should
- work exactly as would any other version of Rebar3. Any Erlang package
- should rely on rebar3 instead. See
- .
-
-
-
+ We provide a version of Rebar3, which is the normal, unmodified Rebar3, under rebar3. We also provide a helper to fetch Rebar3 dependencies from a lockfile under fetchRebar3Deps.
@@ -110,10 +63,7 @@
Mix & Erlang.mk
- Both Mix and Erlang.mk work exactly as expected. There is a bootstrap
- process that needs to be run for both, however, which is supported by the
- buildMix and buildErlangMk
- derivations, respectively.
+ Both Mix and Erlang.mk work exactly as expected. There is a bootstrap process that needs to be run for both, however, which is supported by the buildMix and buildErlangMk derivations, respectively.
@@ -122,13 +72,7 @@
How to Install BEAM Packages
- BEAM packages are not registered at the top level, simply because they are
- not relevant to the vast majority of Nix users. They are installable using
- the beam.packages.erlang attribute set (aliased as
- beamPackages), which points to packages built by the
- default Erlang/OTP version in Nixpkgs, as defined by
- beam.interpreters.erlang. To list the available packages
- in beamPackages, use the following command:
+ BEAM packages are not registered at the top level, simply because they are not relevant to the vast majority of Nix users. They are installable using the beam.packages.erlang attribute set (aliased as beamPackages), which points to packages built by the default Erlang/OTP version in Nixpkgs, as defined by beam.interpreters.erlang. To list the available packages in beamPackages, use the following command:
@@ -143,8 +87,7 @@ beamPackages.rebar3-pc pc-1.1.0
- To install any of those packages into your profile, refer to them by their
- attribute path (first column):
+ To install any of those packages into your profile, refer to them by their attribute path (first column):
@@ -152,9 +95,7 @@ beamPackages.rebar3-pc pc-1.1.0
- The attribute path of any BEAM package corresponds to the name of that
- particular package in Hex or its
- OTP Application/Release name.
+ The attribute path of any BEAM package corresponds to the name of that particular package in Hex or its OTP Application/Release name.
@@ -168,13 +109,8 @@ beamPackages.rebar3-pc pc-1.1.0
Rebar3 Packages
- The Nix function, buildRebar3, defined in
- beam.packages.erlang.buildRebar3 and aliased at the top
- level, can be used to build a derivation that understands how to build a
- Rebar3 project. For example, we can build
- hex2nix
- as follows:
+ The Nix function, buildRebar3, defined in beam.packages.erlang.buildRebar3 and aliased at the top level, can be used to build a derivation that understands how to build a Rebar3 project. For example, we can build hex2nix as follows:
@@ -196,25 +132,16 @@ buildRebar3 rec {
- Such derivations are callable with
- beam.packages.erlang.callPackage (see
- ). To call this package using
- the normal callPackage, refer to dependency packages
- via beamPackages, e.g.
- beamPackages.ibrowse.
+ Such derivations are callable with beam.packages.erlang.callPackage (see ). To call this package using the normal callPackage, refer to dependency packages via beamPackages, e.g. beamPackages.ibrowse.
- Notably, buildRebar3 includes
- beamDeps, while stdenv.mkDerivation
- does not. BEAM dependencies added there will be correctly handled by the
- system.
+ Notably, buildRebar3 includes beamDeps, while stdenv.mkDerivation does not. BEAM dependencies added there will be correctly handled by the system.
- If a package needs to compile native code via Rebar3's port compilation
- mechanism, add compilePort = true; to the derivation.
+ If a package needs to compile native code via Rebar3's port compilation mechanism, add compilePort = true; to the derivation.
@@ -222,9 +149,7 @@ buildRebar3 rec {
Erlang.mk Packages
- Erlang.mk functions similarly to Rebar3, except we use
- buildErlangMk instead of
- buildRebar3.
+ Erlang.mk functions similarly to Rebar3, except we use buildErlangMk instead of buildRebar3.
@@ -257,8 +182,7 @@ buildErlangMk {
Mix Packages
- Mix functions similarly to Rebar3, except we use
- buildMix instead of buildRebar3.
+ Mix functions similarly to Rebar3, except we use buildMix instead of buildRebar3.
@@ -323,11 +247,7 @@ buildHex {
Accessing an Environment
- Often, we simply want to access a valid environment that contains a
- specific package and its dependencies. We can accomplish that with the
- env attribute of a derivation. For example, let's say we
- want to access an Erlang REPL with ibrowse loaded up. We
- could do the following:
+ Often, we simply want to access a valid environment that contains a specific package and its dependencies. We can accomplish that with the env attribute of a derivation. For example, let's say we want to access an Erlang REPL with ibrowse loaded up. We could do the following:
@@ -373,8 +293,7 @@ ok
- Notice the -A beamPackages.ibrowse.env. That is the key
- to this functionality.
+ Notice the -A beamPackages.ibrowse.env. That is the key to this functionality.
@@ -382,11 +301,7 @@ ok
Creating a Shell
- Getting access to an environment often isn't enough to do real development.
- Usually, we need to create a shell.nix file and do our
- development inside of the environment specified therein. This file looks a
- lot like the packaging described above, except that src
- points to the project root and we call the package directly.
+ Getting access to an environment often isn't enough to do real development. Usually, we need to create a shell.nix file and do our development inside of the environment specified therein. This file looks a lot like the packaging described above, except that src points to the project root and we call the package directly.
@@ -414,8 +329,7 @@ in
Building in a Shell (for Mix Projects)
- We can leverage the support of the derivation, irrespective of the build
- derivation, by calling the commands themselves.
+ We can leverage the support of the derivation, irrespective of the build derivation, by calling the commands themselves.
@@ -477,12 +391,8 @@ analyze: build plt
- Using a shell.nix as described (see
- ) should just work. Aside from
- test, plt, and
- analyze, the Make targets work just fine for all of the
- build derivations.
+ Using a shell.nix as described (see ) should just work. Aside from test, plt, and analyze, the Make targets work just fine for all of the build derivations.
@@ -492,25 +402,14 @@ analyze: build plt
Generating Packages from Hex with hex2nix
- Updating the Hex package set
- requires
- hex2nix.
- Given the path to the Erlang modules (usually
- pkgs/development/erlang-modules), it will dump a file
- called hex-packages.nix, containing all the packages that
- use a recognized build system in
- Hex. It can't be determined,
- however, whether every package is buildable.
+ Updating the Hex package set requires hex2nix. Given the path to the Erlang modules (usually pkgs/development/erlang-modules), it will dump a file called hex-packages.nix, containing all the packages that use a recognized build system in Hex. It can't be determined, however, whether every package is buildable.
- To make life easier for our users, try to build every
- Hex package and remove those
- that fail. To do that, simply run the following command in the root of your
- nixpkgs repository:
+ To make life easier for our users, try to build every Hex package and remove those that fail. To do that, simply run the following command in the root of your nixpkgs repository:
@@ -518,11 +417,8 @@ analyze: build plt
- That will attempt to build every package in beamPackages.
- Then manually remove those that fail. Hopefully, someone will improve
- hex2nix
- in the future to automate the process.
+ That will attempt to build every package in beamPackages. Then manually remove those that fail. Hopefully, someone will improve hex2nix in the future to automate the process.
diff --git a/doc/languages-frameworks/bower.xml b/doc/languages-frameworks/bower.xml
index 118f6e10473a..b0738cad293b 100644
--- a/doc/languages-frameworks/bower.xml
+++ b/doc/languages-frameworks/bower.xml
@@ -4,32 +4,22 @@
Bower
- Bower is a package manager for web
- site front-end components. Bower packages (comprising of build artefacts and
- sometimes sources) are stored in git repositories,
- typically on Github. The package registry is run by the Bower team with
- package metadata coming from the bower.json file within
- each package.
+ Bower is a package manager for web site front-end components. Bower packages (comprising of build artefacts and sometimes sources) are stored in git repositories, typically on Github. The package registry is run by the Bower team with package metadata coming from the bower.json file within each package.
- The end result of running Bower is a bower_components
- directory which can be included in the web app's build process.
+ The end result of running Bower is a bower_components directory which can be included in the web app's build process.
- Bower can be run interactively, by installing
- nodePackages.bower. More interestingly, the Bower
- components can be declared in a Nix derivation, with the help of
- nodePackages.bower2nix.
+ Bower can be run interactively, by installing nodePackages.bower. More interestingly, the Bower components can be declared in a Nix derivation, with the help of nodePackages.bower2nix.
bower2nix usage
- Suppose you have a bower.json with the following
- contents:
+ Suppose you have a bower.json with the following contents:
bower.json
@@ -45,8 +35,7 @@
- Running bower2nix will produce something like the
- following output:
+ Running bower2nix will produce something like the following output:
- Using the bower2nix command line arguments, the output
- can be redirected to a file. A name like
- bower-packages.nix would be fine.
+ Using the bower2nix command line arguments, the output can be redirected to a file. A name like bower-packages.nix would be fine.
- The resulting derivation is a union of all the downloaded Bower packages
- (and their dependencies). To use it, they still need to be linked together
- by Bower, which is where buildBowerComponents is useful.
+ The resulting derivation is a union of all the downloaded Bower packages (and their dependencies). To use it, they still need to be linked together by Bower, which is where buildBowerComponents is useful.
@@ -74,10 +59,7 @@ buildEnv { name = "bower-env"; ignoreCollisions = true; paths = [
buildBowerComponents function
- The function is implemented in
-
- pkgs/development/bower-modules/generic/default.nix.
- Example usage:
+ The function is implemented in pkgs/development/bower-modules/generic/default.nix. Example usage:
buildBowerComponents
@@ -91,34 +73,27 @@ bowerComponents = buildBowerComponents {
- In , the following arguments are
- of special significance to the function:
+ In , the following arguments are of special significance to the function:
- generated specifies the file which was created by
- bower2nix.
+ generated specifies the file which was created by bower2nix.
- src is your project's sources. It needs to contain a
- bower.json file.
+ src is your project's sources. It needs to contain a bower.json file.
- buildBowerComponents will run Bower to link together the
- output of bower2nix, resulting in a
- bower_components directory which can be used.
+ buildBowerComponents will run Bower to link together the output of bower2nix, resulting in a bower_components directory which can be used.
- Here is an example of a web frontend build process using
- gulp. You might use grunt, or anything
- else.
+ Here is an example of a web frontend build process using gulp. You might use grunt, or anything else.
@@ -174,21 +149,17 @@ pkgs.stdenv.mkDerivation {
- The result of buildBowerComponents is an input to the
- frontend build.
+ The result of buildBowerComponents is an input to the frontend build.
- Whether to symlink or copy the bower_components
- directory depends on the build tool in use. In this case a copy is used
- to avoid gulp silliness with permissions.
+ Whether to symlink or copy the bower_components directory depends on the build tool in use. In this case a copy is used to avoid gulp silliness with permissions.
- gulp requires HOME to refer to a
- writeable directory.
+ gulp requires HOME to refer to a writeable directory.
@@ -210,17 +181,13 @@ pkgs.stdenv.mkDerivation {
- This means that Bower was looking for a package version which doesn't
- exist in the generated bower-packages.nix.
+ This means that Bower was looking for a package version which doesn't exist in the generated bower-packages.nix.
- If bower.json has been updated, then run
- bower2nix again.
+ If bower.json has been updated, then run bower2nix again.
- It could also be a bug in bower2nix or
- fetchbower. If possible, try reformulating the version
- specification in bower.json.
+ It could also be a bug in bower2nix or fetchbower. If possible, try reformulating the version specification in bower.json.
diff --git a/doc/languages-frameworks/coq.xml b/doc/languages-frameworks/coq.xml
index 4314df5c9df2..86d9226166f5 100644
--- a/doc/languages-frameworks/coq.xml
+++ b/doc/languages-frameworks/coq.xml
@@ -4,31 +4,19 @@
Coq
- Coq libraries should be installed in
- $(out)/lib/coq/${coq.coq-version}/user-contrib/. Such
- directories are automatically added to the $COQPATH
- environment variable by the hook defined in the Coq derivation.
+ Coq libraries should be installed in $(out)/lib/coq/${coq.coq-version}/user-contrib/. Such directories are automatically added to the $COQPATH environment variable by the hook defined in the Coq derivation.
- Some extensions (plugins) might require OCaml and sometimes other OCaml
- packages. The coq.ocamlPackages attribute can be used to
- depend on the same package set Coq was built against.
+ Some extensions (plugins) might require OCaml and sometimes other OCaml packages. The coq.ocamlPackages attribute can be used to depend on the same package set Coq was built against.
- Coq libraries may be compatible with some specific versions of Coq only. The
- compatibleCoqVersions attribute is used to precisely
- select those versions of Coq that are compatible with this derivation.
+ Coq libraries may be compatible with some specific versions of Coq only. The compatibleCoqVersions attribute is used to precisely select those versions of Coq that are compatible with this derivation.
- Here is a simple package example. It is a pure Coq library, thus it depends
- on Coq. It builds on the Mathematical Components library, thus it also takes
- mathcomp as buildInputs. Its
- Makefile has been generated using
- coq_makefile so we only have to set the
- $COQLIB variable at install time.
+ Here is a simple package example. It is a pure Coq library, thus it depends on Coq. It builds on the Mathematical Components library, thus it also takes mathcomp as buildInputs. Its Makefile has been generated using coq_makefile so we only have to set the $COQLIB variable at install time.
diff --git a/doc/languages-frameworks/crystal.section.md b/doc/languages-frameworks/crystal.section.md
new file mode 100644
index 000000000000..07bfc65a553f
--- /dev/null
+++ b/doc/languages-frameworks/crystal.section.md
@@ -0,0 +1,71 @@
+# Crystal
+
+## Building a Crystal package
+
+This section uses [Mint](https://github.com/mint-lang/mint) as an example for how to build a Crystal package.
+
+If the Crystal project has any dependencies, the first step is to get a `shards.nix` file encoding those. Get a copy of the project and go to its root directory such that its `shard.lock` file is in the current directory, then run `crystal2nix` in it
+```bash
+$ git clone https://github.com/mint-lang/mint
+$ cd mint
+$ git checkout 0.5.0
+$ nix-shell -p crystal2nix --run crystal2nix
+```
+
+This should have generated a `shards.nix` file.
+
+Next create a Nix file for your derivation and use `pkgs.crystal.buildCrystalPackage` as follows:
+```nix
+with import {};
+crystal.buildCrystalPackage rec {
+ pname = "mint";
+ version = "0.5.0";
+
+ src = fetchFromGitHub {
+ owner = "mint-lang";
+ repo = "mint";
+ rev = version;
+ sha256 = "0vxbx38c390rd2ysvbwgh89v2232sh5rbsp3nk9wzb70jybpslvl";
+ };
+
+ # Insert the path to your shards.nix file here
+ shardsFile = ./shards.nix;
+
+ ...
+}
+```
+
+This won't build anything yet, because we haven't told it what files build. We can specify a mapping from binary names to source files with the `crystalBinaries` attribute. The project's compilation instructions should show this. For Mint, the binary is called "mint", which is compiled from the source file `src/mint.cr`, so we'll specify this as follows:
+
+```nix
+ crystalBinaries.mint.src = "src/mint.cr";
+
+ # ...
+```
+
+Additionally you can override the default `crystal build` options (which are currently `--release --progress --no-debug --verbose`) with
+
+```nix
+ crystalBinaries.mint.options = [ "--release" "--verbose" ];
+```
+
+Depending on the project, you might need additional steps to get it to compile successfully. In Mint's case, we need to link against openssl, so in the end the Nix file looks as follows:
+
+```nix
+with import {};
+crystal.buildCrystalPackage rec {
+ version = "0.5.0";
+ pname = "mint";
+ src = fetchFromGitHub {
+ owner = "mint-lang";
+ repo = "mint";
+ rev = version;
+ sha256 = "0vxbx38c390rd2ysvbwgh89v2232sh5rbsp3nk9wzb70jybpslvl";
+ };
+
+ shardsFile = ./shards.nix;
+ crystalBinaries.mint.src = "src/mint.cr";
+
+ buildInputs = [ openssl_1_0_2 ];
+}
+```
diff --git a/doc/languages-frameworks/emscripten.section.md b/doc/languages-frameworks/emscripten.section.md
index 24c49ec1409c..80e1094809ad 100644
--- a/doc/languages-frameworks/emscripten.section.md
+++ b/doc/languages-frameworks/emscripten.section.md
@@ -1,4 +1,4 @@
-# User's Guide to Emscripten in Nixpkgs
+# Emscripten
[Emscripten](https://github.com/kripken/emscripten): An LLVM-to-JavaScript Compiler
diff --git a/doc/languages-frameworks/gnome.xml b/doc/languages-frameworks/gnome.xml
new file mode 100644
index 000000000000..3d69d77a1c84
--- /dev/null
+++ b/doc/languages-frameworks/gnome.xml
@@ -0,0 +1,282 @@
+
+ GNOME
+
+
+ Packaging GNOME applications
+
+
+ Programs in the GNOME universe are written in various languages but they all use GObject-based libraries like GLib, GTK or GStreamer. These libraries are often modular, relying on looking into certain directories to find their modules. However, due to Nix’s specific file system organization, this will fail without our intervention. Fortunately, the libraries usually allow overriding the directories through environment variables, either natively or thanks to a patch in nixpkgs. Wrapping the executables to ensure correct paths are available to the application constitutes a significant part of packaging a modern desktop application. In this section, we will describe various modules needed by such applications, environment variables needed to make the modules load, and finally a script that will do the work for us.
+
+
+
+ Settings
+
+
+ GSettings API is often used for storing settings. GSettings schemas are required, to know the type and other metadata of the stored values. GLib looks for glib-2.0/schemas/gschemas.compiled files inside the directories of XDG_DATA_DIRS.
+
+
+
+ On Linux, GSettings API is implemented using dconf backend. You will need to add dconf GIO module to GIO_EXTRA_MODULES variable, otherwise the memory backend will be used and the saved settings will not be persistent.
+
+
+
+ Last you will need the dconf database D-Bus service itself. You can enable it using .
+
+
+
+ Some applications will also require gsettings-desktop-schemas for things like reading proxy configuration or user interface customization. This dependency is often not mentioned by upstream, you should grep for org.gnome.desktop and org.gnome.system to see if the schemas are needed.
+
+
+
+
+ Icons
+
+
+ When an application uses icons, an icon theme should be available in XDG_DATA_DIRS during runtime. The package for the default, icon-less hicolor-icon-theme (should be propagated by every icon theme) contains a setup hook that will pick up icon themes from buildInputs and pass it to our wrapper. Unfortunately, relying on that would mean every user has to download the theme included in the package expression no matter their preference. For that reason, we leave the installation of icon theme on the user. If you use one of the desktop environments, you probably already have an icon theme installed.
+
+
+
+ To avoid costly file system access when locating icons, GTK, as well as Qt, can rely on icon-theme.cache files from the themes’ top-level directories. These files are generated using gtk-update-icon-cache, which is expected to be run whenever an icon is added or removed to an icon theme (typically an application icon into hicolor theme) and some programs do indeed run this after icon installation. However, since packages are installed into their own prefix by Nix, this would lead to conflicts. For that reason, gtk3 provides a setup hook that will clean the file from installation. Since most applications only ship their own icon that will be loaded on start-up, it should not affect them too much. On the other hand, icon themes are much larger and more widely used so we need to cache them. Because we recommend installing icon themes globally, we will generate the cache files from all packages in a profile using a NixOS module. You can enable the cache generation using option if your desktop environment does not already do that.
+
+
+
+
+ GTK Themes
+
+
+ Previously, a GTK theme needed to be in XDG_DATA_DIRS. This is no longer necessary for most programs since GTK incorporated Adwaita theme. Some programs (for example, those designed for elementary HIG) might require a special theme like pantheon.elementary-gtk-theme.
+
+
+
+
+ GObject introspection typelibs
+
+
+ GObject introspection allows applications to use C libraries in other languages easily. It does this through typelib files searched in GI_TYPELIB_PATH.
+
+
+
+
+ Various plug-ins
+
+
+ If your application uses GStreamer or Grilo, you should set GST_PLUGIN_SYSTEM_PATH_1_0 and GRL_PLUGIN_PATH, respectively.
+
+
+
+
+
+ Onto wrapGAppsHook
+
+
+ Given the requirements above, the package expression would become messy quickly:
+
+preFixup = ''
+ for f in $(find $out/bin/ $out/libexec/ -type f -executable); do
+ wrapProgram "$f" \
+ --prefix GIO_EXTRA_MODULES : "${getLib gnome3.dconf}/lib/gio/modules" \
+ --prefix XDG_DATA_DIRS : "$out/share" \
+ --prefix XDG_DATA_DIRS : "$out/share/gsettings-schemas/${name}" \
+ --prefix XDG_DATA_DIRS : "${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}" \
+ --prefix XDG_DATA_DIRS : "${hicolor-icon-theme}/share" \
+ --prefix GI_TYPELIB_PATH : "${lib.makeSearchPath "lib/girepository-1.0" [ pango json-glib ]}"
+ done
+'';
+
+ Fortunately, there is wrapGAppsHook, that does the wrapping for us. In particular, it works in conjunction with other setup hooks that will populate the variable:
+
+
+
+ wrapGAppsHook itself will add the package’s share directory to XDG_DATA_DIRS.
+
+
+
+
+ glib setup hook will populate GSETTINGS_SCHEMAS_PATH and then wrapGAppsHook will prepend it to XDG_DATA_DIRS.
+
+
+
+
+ One of gtk3’s setup hooks will remove icon-theme.cache files from package’s icon theme directories to avoid conflicts. Icon theme packages should prevent this with dontDropIconThemeCache = true;.
+
+
+
+
+ gnome3.dconf.lib is a dependency of wrapGAppsHook, which then also adds it to the GIO_EXTRA_MODULES variable.
+
+
+
+
+ hicolor-icon-theme’s setup hook will add icon themes to XDG_ICON_DIRS which is prepended to XDG_DATA_DIRS by wrapGAppsHook.
+
+
+
+
+ gobject-introspection setup hook populates GI_TYPELIB_PATH variable with lib/girepository-1.0 directories of dependencies, which is then added to wrapper by wrapGAppsHook. It also adds share directories of dependencies to XDG_DATA_DIRS, which is intended to promote GIR files but it also pollutes the closures of packages using wrapGAppsHook.
+
+
+
+ The setup hook currently does not work in expressions with strictDeps enabled, like Python packages. In those cases, you will need to disable it with strictDeps = false;.
+
+
+
+
+
+ Setup hooks of gst_all_1.gstreamer and gnome3.grilo will populate the GST_PLUGIN_SYSTEM_PATH_1_0 and GRL_PLUGIN_PATH variables, respectively, which will then be added to the wrapper by wrapGAppsHook.
+
+
+
+
+
+
+ You can also pass additional arguments to makeWrapper using gappsWrapperArgs in preFixup hook:
+
+preFixup = ''
+ gappsWrapperArgs+=(
+ # Thumbnailers
+ --prefix XDG_DATA_DIRS : "${gdk-pixbuf}/share"
+ --prefix XDG_DATA_DIRS : "${librsvg}/share"
+ --prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
+ )
+'';
+
+
+
+
+
+ Updating GNOME packages
+
+
+ Most GNOME package offer updateScript, it is therefore possible to update to latest source tarball by running nix-shell maintainers/scripts/update.nix --argstr package gnome3.nautilus or even en masse with nix-shell maintainers/scripts/update.nix --argstr path gnome3. Read the package’s NEWS file to see what changed.
+
+
+
+
+ Frequently encountered issues
+
+
+
+
+ GLib-GIO-ERROR **: 06:04:50.903: No GSettings schemas are installed on the system
+
+
+
+ There are no schemas avalable in XDG_DATA_DIRS. Temporarily add a random package containing schemas like gsettings-desktop-schemas to buildInputs. glib and wrapGAppsHook setup hooks will take care of making the schemas available to application and you will see the actual missing schemas with the next error. Or you can try looking through the source code for the actual schemas used.
+
+
+
+
+
+ GLib-GIO-ERROR **: 06:04:50.903: Settings schema ‘org.gnome.foo’ is not installed
+
+
+
+ Package is missing some GSettings schemas. You can find out the package containing the schema with nix-locate org.gnome.foo.gschema.xml and let the hooks handle the wrapping as above.
+
+
+
+
+
+ When using wrapGAppsHook with special derivers you can end up with double wrapped binaries.
+
+
+
+ This is because derivers like python.pkgs.buildPythonApplication or qt5.mkDerivation have setup-hooks automatically added that produce wrappers with makeWrapper. The simplest way to workaround that is to disable the wrapGAppsHook automatic wrapping with dontWrapGApps = true; and pass the arguments it intended to pass to makeWrapper to another.
+
+
+ In the case of a Python application it could look like:
+
+python3.pkgs.buildPythonApplication {
+ pname = "gnome-music";
+ version = "3.32.2";
+
+ nativeBuildInputs = [
+ wrapGAppsHook
+ gobject-introspection
+ ...
+ ];
+
+ dontWrapGApps = true;
+
+ # Arguments to be passed to `makeWrapper`, only used by buildPython*
+ makeWrapperArgs = [
+ "\${gappsWrapperArgs[@]}"
+ ];
+}
+
+ And for a QT app like:
+
+mkDerivation {
+ pname = "calibre";
+ version = "3.47.0";
+
+ nativeBuildInputs = [
+ wrapGAppsHook
+ qmake
+ ...
+ ];
+
+ dontWrapGApps = true;
+
+ # Arguments to be passed to `makeWrapper`, only used by qt5’s mkDerivation
+ qtWrapperArgs = [
+ "\${gappsWrapperArgs[@]}"
+ ];
+}
+
+
+
+
+
+
+ I am packaging a project that cannot be wrapped, like a library or GNOME Shell extension.
+
+
+
+ You can rely on applications depending on the library set the necessary environment variables but that it often easy to miss. Instead we recommend to patch the paths in the source code whenever possible. Here are some examples:
+
+
+
+ Replacing a GI_TYPELIB_PATH in GNOME Shell extension – we are using substituteAll to include the path to a typelib into a patch.
+
+
+
+
+ The following examples are hardcoding GSettings schema paths. To get the schema paths we use the functions
+
+
+
+ glib.getSchemaPath Takes a nix package attribute as an argument.
+
+
+
+
+ glib.makeSchemaPath Takes a package output like $out and a derivation name. You should use this if the schemas you need to hardcode are in the same derivation.
+
+
+
+
+
+ Hard-coding GSettings schema path in Vala plug-in (dynamically loaded library) – here, substituteAll cannot be used since the schema comes from the same package preventing us from pass its path to the function, probably due to a Nix bug.
+
+
+ Hard-coding GSettings schema path in C library – nothing special other than using Coccinelle patch to generate the patch itself.
+
+
+
+
+
+
+
+
+ I need to wrap a binary outside bin and libexec directories.
+
+
+
+ You can manually trigger the wrapping with wrapGApp in preFixup phase. It takes a path to a program as a first argument; the remaining arguments are passed directly to wrapProgram function.
+
+
+
+
+
+
diff --git a/doc/languages-frameworks/go.xml b/doc/languages-frameworks/go.xml
index b2b4962cb5f6..288a90298631 100644
--- a/doc/languages-frameworks/go.xml
+++ b/doc/languages-frameworks/go.xml
@@ -7,21 +7,16 @@
Go modules
- The function buildGoModule builds Go programs managed
- with Go modules. It builds a
- Go
- modules through a two phase build:
+ The function buildGoModule builds Go programs managed with Go modules. It builds a Go modules through a two phase build:
- An intermediate fetcher derivation. This derivation will be used to fetch
- all of the dependencies of the Go module.
+ An intermediate fetcher derivation. This derivation will be used to fetch all of the dependencies of the Go module.
- A final derivation will use the output of the intermediate derivation to
- build the binaries and produce the final output.
+ A final derivation will use the output of the intermediate derivation to build the binaries and produce the final output.
@@ -57,21 +52,16 @@ pet = buildGoModule rec {
- is an example expression using
- buildGoModule, the following arguments are of special significance to the
- function:
+ is an example expression using buildGoModule, the following arguments are of special significance to the function:
- modSha256 is the hash of the output of the
- intermediate fetcher derivation.
+ modSha256 is the hash of the output of the intermediate fetcher derivation.
- subPackages limits the builder from building child
- packages that have not been listed. If subPackages is
- not specified, all child packages will be built.
+ subPackages limits the builder from building child packages that have not been listed. If subPackages is not specified, all child packages will be built.
@@ -82,8 +72,7 @@ pet = buildGoModule rec {
Go legacy
- The function buildGoPackage builds legacy Go programs,
- not supporting Go modules.
+ The function buildGoPackage builds legacy Go programs, not supporting Go modules.
@@ -111,49 +100,36 @@ deis = buildGoPackage rec {
- is an example expression using
- buildGoPackage, the following arguments are of special significance to the
- function:
+ is an example expression using buildGoPackage, the following arguments are of special significance to the function:
- goPackagePath specifies the package's canonical Go
- import path.
+ goPackagePath specifies the package's canonical Go import path.
- subPackages limits the builder from building child
- packages that have not been listed. If subPackages is
- not specified, all child packages will be built.
+ subPackages limits the builder from building child packages that have not been listed. If subPackages is not specified, all child packages will be built.
- In this example only github.com/deis/deis/client will
- be built.
+ In this example only github.com/deis/deis/client will be built.
- goDeps is where the Go dependencies of a Go program
- are listed as a list of package source identified by Go import path. It
- could be imported as a separate deps.nix file for
- readability. The dependency data structure is described below.
+ goDeps is where the Go dependencies of a Go program are listed as a list of package source identified by Go import path. It could be imported as a separate deps.nix file for readability. The dependency data structure is described below.
- buildFlags is a list of flags passed to the go build
- command.
+ buildFlags is a list of flags passed to the go build command.
- The goDeps attribute can be imported from a separate
- nix file that defines which Go libraries are needed and
- should be included in GOPATH for
- buildPhase.
+ The goDeps attribute can be imported from a separate nix file that defines which Go libraries are needed and should be included in GOPATH for buildPhase.
@@ -196,27 +172,18 @@ deis = buildGoPackage rec {
- fetch type that needs to be used to get package
- source. If git is used there should be
- url, rev and
- sha256 defined next to it.
+ fetch type that needs to be used to get package source. If git is used there should be url, rev and sha256 defined next to it.
- To extract dependency information from a Go package in automated way use
- go2nix. It can
- produce complete derivation and goDeps file for Go
- programs.
+ To extract dependency information from a Go package in automated way use go2nix. It can produce complete derivation and goDeps file for Go programs.
- buildGoPackage produces
- where
- bin includes program binaries. You can test build a Go
- binary as follows:
+ buildGoPackage produces where bin includes program binaries. You can test build a Go binary as follows:
$ nix-build -A deis.bin
@@ -224,13 +191,11 @@ deis = buildGoPackage rec {
$ nix-build -A deis.all
- bin output will be installed by default with
- nix-env -i or systemPackages.
+ bin output will be installed by default with nix-env -i or systemPackages.
- You may use Go packages installed into the active Nix profiles by adding the
- following to your ~/.bashrc:
+ You may use Go packages installed into the active Nix profiles by adding the following to your ~/.bashrc:
for p in $NIX_PROFILES; do
GOPATH="$p/share/go:$GOPATH"
diff --git a/doc/languages-frameworks/haskell.section.md b/doc/languages-frameworks/haskell.section.md
index 48d22831cd9b..1e677450aa19 100644
--- a/doc/languages-frameworks/haskell.section.md
+++ b/doc/languages-frameworks/haskell.section.md
@@ -3,7 +3,7 @@ title: User's Guide for Haskell in Nixpkgs
author: Peter Simons
date: 2015-06-01
---
-# User's Guide to the Haskell Infrastructure
+# Haskell
## How to install Haskell packages
diff --git a/doc/languages-frameworks/idris.section.md b/doc/languages-frameworks/idris.section.md
index 3025172b5c98..8d7962d7fb9b 100644
--- a/doc/languages-frameworks/idris.section.md
+++ b/doc/languages-frameworks/idris.section.md
@@ -1,4 +1,4 @@
-# Idris packages
+# Idris
## Installing Idris
@@ -124,3 +124,21 @@ in another file (say `default.nix`) to be able to build it with
```
$ nix-build -A yaml
```
+
+## Passing options to `idris` commands
+
+The `build-idris-package` function provides also optional input values to set additional options for the used `idris` commands.
+
+Specifically, you can set `idrisBuildOptions`, `idrisTestOptions`, `idrisInstallOptions` and `idrisDocOptions` to provide additional options to the `idris` command respectively when building, testing, installing and generating docs for your package.
+
+For example you could set
+
+```
+build-idris-package {
+ idrisBuildOptions = [ "--log" "1" "--verbose" ]
+
+ ...
+}
+```
+
+to require verbose output during `idris` build phase.
diff --git a/doc/languages-frameworks/index.xml b/doc/languages-frameworks/index.xml
index 4564df98fe99..9364c764bbf9 100644
--- a/doc/languages-frameworks/index.xml
+++ b/doc/languages-frameworks/index.xml
@@ -1,19 +1,17 @@
- Support for specific programming languages and frameworks
+ Languages and frameworks
- The standard build environment makes it
- easy to build typical Autotools-based packages with very little code. Any
- other kind of package can be accomodated by overriding the appropriate phases
- of stdenv. However, there are specialised functions in
- Nixpkgs to easily build packages for other programming languages, such as
- Perl or Haskell. These are described in this chapter.
+ The standard build environment makes it easy to build typical Autotools-based packages with very little code. Any other kind of package can be accomodated by overriding the appropriate phases of stdenv. However, there are specialised functions in Nixpkgs to easily build packages for other programming languages, such as Perl or Haskell. These are described in this chapter.
+
+
+
@@ -31,5 +29,4 @@
-
diff --git a/doc/languages-frameworks/java.xml b/doc/languages-frameworks/java.xml
index 68a1a097984d..bf0fc4883922 100644
--- a/doc/languages-frameworks/java.xml
+++ b/doc/languages-frameworks/java.xml
@@ -15,37 +15,24 @@ stdenv.mkDerivation {
buildPhase = "ant";
}
- Note that jdk is an alias for the OpenJDK (self-built
- where available, or pre-built via Zulu). Platforms with OpenJDK not (yet) in
- Nixpkgs (Aarch32, Aarch64) point to the
- (unfree) oraclejdk.
+ Note that jdk is an alias for the OpenJDK (self-built where available, or pre-built via Zulu). Platforms with OpenJDK not (yet) in Nixpkgs (Aarch32, Aarch64) point to the (unfree) oraclejdk.
- JAR files that are intended to be used by other packages should be installed
- in $out/share/java. JDKs have a stdenv setup hook that
- add any JARs in the share/java directories of the build
- inputs to the CLASSPATH environment variable. For instance, if
- the package libfoo installs a JAR named
- foo.jar in its share/java
- directory, and another package declares the attribute
+ JAR files that are intended to be used by other packages should be installed in $out/share/java. JDKs have a stdenv setup hook that add any JARs in the share/java directories of the build inputs to the CLASSPATH environment variable. For instance, if the package libfoo installs a JAR named foo.jar in its share/java directory, and another package declares the attribute
buildInputs = [ libfoo ];
nativeBuildInputs = [ jdk ];
- then CLASSPATH will be set to
- /nix/store/...-libfoo/share/java/foo.jar.
+ then CLASSPATH will be set to /nix/store/...-libfoo/share/java/foo.jar.
- Private JARs should be installed in a location like
- $out/share/package-name.
+ Private JARs should be installed in a location like $out/share/package-name.
- If your Java package provides a program, you need to generate a wrapper
- script to run it using the OpenJRE. You can use
- makeWrapper for this:
+ If your Java package provides a program, you need to generate a wrapper script to run it using the OpenJRE. You can use makeWrapper for this:
nativeBuildInputs = [ makeWrapper ];
@@ -56,30 +43,21 @@ installPhase =
--add-flags "-cp $out/share/java/foo.jar org.foo.Main"
'';
- Note the use of jre, which is the part of the OpenJDK
- package that contains the Java Runtime Environment. By using
- ${jre}/bin/java instead of
- ${jdk}/bin/java, you prevent your package from depending
- on the JDK at runtime.
+ Note the use of jre, which is the part of the OpenJDK package that contains the Java Runtime Environment. By using ${jre}/bin/java instead of ${jdk}/bin/java, you prevent your package from depending on the JDK at runtime.
- Note all JDKs passthru home, so if your application
- requires environment variables like JAVA_HOME being set, that
- can be done in a generic fashion with the --set argument
- of makeWrapper:
+ Note all JDKs passthru home, so if your application requires environment variables like JAVA_HOME being set, that can be done in a generic fashion with the --set argument of makeWrapper:
--set JAVA_HOME ${jdk.home}
- It is possible to use a different Java compiler than javac
- from the OpenJDK. For instance, to use the GNU Java Compiler:
+ It is possible to use a different Java compiler than javac from the OpenJDK. For instance, to use the GNU Java Compiler:
nativeBuildInputs = [ gcj ant ];
- Here, Ant will automatically use gij (the GNU Java
- Runtime) instead of the OpenJRE.
+ Here, Ant will automatically use gij (the GNU Java Runtime) instead of the OpenJRE.
diff --git a/doc/languages-frameworks/lua.xml b/doc/languages-frameworks/lua.xml
index 5144bb24ff6e..bcca6b737539 100644
--- a/doc/languages-frameworks/lua.xml
+++ b/doc/languages-frameworks/lua.xml
@@ -4,18 +4,11 @@
Lua
- Lua packages are built by the buildLuaPackage function.
- This function is implemented in
-
- pkgs/development/lua-modules/generic/default.nix
- and works similarly to buildPerlPackage. (See
- for details.)
+ Lua packages are built by the buildLuaPackage function. This function is implemented in pkgs/development/lua-modules/generic/default.nix and works similarly to buildPerlPackage. (See for details.)
- Lua packages are defined in
- pkgs/top-level/lua-packages.nix.
- Most of them are simple. For example:
+ Lua packages are defined in pkgs/top-level/lua-packages.nix. Most of them are simple. For example:
fileSystem = buildLuaPackage {
name = "filesystem-1.6.2";
@@ -33,16 +26,11 @@ fileSystem = buildLuaPackage {
- Though, more complicated package should be placed in a seperate file in
- pkgs/development/lua-modules.
- Lua packages accept additional parameter disabled, which
- defines the condition of disabling package from luaPackages. For example, if
- package has disabled assigned to lua.luaversion
- != "5.1", it will not be included in any luaPackages except
- lua51Packages, making it only be built for lua 5.1.
+ Lua packages accept additional parameter disabled, which defines the condition of disabling package from luaPackages. For example, if package has disabled assigned to lua.luaversion != "5.1", it will not be included in any luaPackages except lua51Packages, making it only be built for lua 5.1.
diff --git a/doc/languages-frameworks/node.section.md b/doc/languages-frameworks/node.section.md
index c6dce04c7b8b..4dc95fc1dd98 100644
--- a/doc/languages-frameworks/node.section.md
+++ b/doc/languages-frameworks/node.section.md
@@ -1,5 +1,5 @@
-Node.js packages
-================
+Node.js
+=======
The `pkgs/development/node-packages` folder contains a generated collection of
[NPM packages](https://npmjs.com/) that can be installed with the Nix package
manager.
diff --git a/doc/languages-frameworks/ocaml.xml b/doc/languages-frameworks/ocaml.xml
index b7006ecba998..a0ea209b493c 100644
--- a/doc/languages-frameworks/ocaml.xml
+++ b/doc/languages-frameworks/ocaml.xml
@@ -4,35 +4,15 @@
OCaml
- OCaml libraries should be installed in
- $(out)/lib/ocaml/${ocaml.version}/site-lib/. Such
- directories are automatically added to the $OCAMLPATH
- environment variable when building another package that depends on them or
- when opening a nix-shell.
+ OCaml libraries should be installed in $(out)/lib/ocaml/${ocaml.version}/site-lib/. Such directories are automatically added to the $OCAMLPATH environment variable when building another package that depends on them or when opening a nix-shell.
- Given that most of the OCaml ecosystem is now built with dune, nixpkgs
- includes a convenience build support function called
- buildDunePackage that will build an OCaml package using
- dune, OCaml and findlib and any additional dependencies provided as
- buildInputs or propagatedBuildInputs.
+ Given that most of the OCaml ecosystem is now built with dune, nixpkgs includes a convenience build support function called buildDunePackage that will build an OCaml package using dune, OCaml and findlib and any additional dependencies provided as buildInputs or propagatedBuildInputs.
- Here is a simple package example. It defines an (optional) attribute
- minimumOCamlVersion that will be used to throw a
- descriptive evaluation error if building with an older OCaml is attempted. It
- uses the fetchFromGitHub fetcher to get its source. It
- sets the doCheck (optional) attribute to
- true which means that tests will be run with dune
- runtest -p angstrom after the build (dune build -p
- angstrom) is complete. It uses alcotest as a
- build input (because it is needed to run the tests) and
- bigstringaf and result as propagated
- build inputs (thus they will also be available to libraries depending on this
- library). The library will be installed using the
- angstrom.install file that dune generates.
+ Here is a simple package example. It defines an (optional) attribute minimumOCamlVersion that will be used to throw a descriptive evaluation error if building with an older OCaml is attempted. It uses the fetchFromGitHub fetcher to get its source. It sets the doCheck (optional) attribute to true which means that tests will be run with dune runtest -p angstrom after the build (dune build -p angstrom) is complete. It uses alcotest as a build input (because it is needed to run the tests) and bigstringaf and result as propagated build inputs (thus they will also be available to libraries depending on this library). The library will be installed using the angstrom.install file that dune generates.
@@ -65,11 +45,7 @@ buildDunePackage rec {
- Here is a second example, this time using a source archive generated with
- dune-release. It is a good idea to use this archive when
- it is available as it will usually contain substituted variables such as a
- %%VERSION%% field. This library does not depend on any
- other OCaml library and no tests are run after building it.
+ Here is a second example, this time using a source archive generated with dune-release. It is a good idea to use this archive when it is available as it will usually contain substituted variables such as a %%VERSION%% field. This library does not depend on any other OCaml library and no tests are run after building it.
diff --git a/doc/languages-frameworks/perl.xml b/doc/languages-frameworks/perl.xml
index d0f124f29d42..d9b6b2721c67 100644
--- a/doc/languages-frameworks/perl.xml
+++ b/doc/languages-frameworks/perl.xml
@@ -4,24 +4,13 @@
Perl
- Nixpkgs provides a function buildPerlPackage, a generic
- package builder function for any Perl package that has a standard
- Makefile.PL. It’s implemented in
- buildPerlPackage, a generic package builder function for any Perl package that has a standard Makefile.PL. It’s implemented in pkgs/development/perl-modules/generic.
- Perl packages from CPAN are defined in
- pkgs/top-level/perl-packages.nix,
- rather than pkgs/all-packages.nix. Most Perl packages
- are so straight-forward to build that they are defined here directly, rather
- than having a separate function for each package called from
- perl-packages.nix. However, more complicated packages
- should be put in a separate file, typically in
- pkgs/development/perl-modules. Here is an example of the
- former:
+ Perl packages from CPAN are defined in pkgs/top-level/perl-packages.nix, rather than pkgs/all-packages.nix. Most Perl packages are so straight-forward to build that they are defined here directly, rather than having a separate function for each package called from perl-packages.nix. However, more complicated packages should be put in a separate file, typically in pkgs/development/perl-modules. Here is an example of the former:
ClassC3 = buildPerlPackage rec {
name = "Class-C3-0.21";
@@ -31,32 +20,22 @@ ClassC3 = buildPerlPackage rec {
};
};
- Note the use of mirror://cpan/, and the
- ${name} in the URL definition to ensure that the name
- attribute is consistent with the source that we’re actually downloading.
- Perl packages are made available in all-packages.nix
- through the variable perlPackages. For instance, if you
- have a package that needs ClassC3, you would typically
- write
+ Note the use of mirror://cpan/, and the ${name} in the URL definition to ensure that the name attribute is consistent with the source that we’re actually downloading. Perl packages are made available in all-packages.nix through the variable perlPackages. For instance, if you have a package that needs ClassC3, you would typically write
foo = import ../path/to/foo.nix {
inherit stdenv fetchurl ...;
inherit (perlPackages) ClassC3;
};
- in all-packages.nix. You can test building a Perl
- package as follows:
+ in all-packages.nix. You can test building a Perl package as follows:
$ nix-build -A perlPackages.ClassC3
- buildPerlPackage adds perl- to the
- start of the name attribute, so the package above is actually called
- perl-Class-C3-0.21. So to install it, you can say:
+ buildPerlPackage adds perl- to the start of the name attribute, so the package above is actually called perl-Class-C3-0.21. So to install it, you can say:
$ nix-env -i perl-Class-C3
- (Of course you can also install using the attribute name: nix-env -i
- -A perlPackages.ClassC3.)
+ (Of course you can also install using the attribute name: nix-env -i -A perlPackages.ClassC3.)
@@ -64,39 +43,24 @@ foo = import ../path/to/foo.nix {
- In the configure phase, it calls perl Makefile.PL to
- generate a Makefile. You can set the variable
- makeMakerFlags to pass flags to
- Makefile.PL
+ In the configure phase, it calls perl Makefile.PL to generate a Makefile. You can set the variable makeMakerFlags to pass flags to Makefile.PL
- It adds the contents of the PERL5LIB environment variable
- to #! .../bin/perl line of Perl scripts as
- -Idir flags. This ensures
- that a script can find its dependencies.
+ It adds the contents of the PERL5LIB environment variable to #! .../bin/perl line of Perl scripts as -Idir flags. This ensures that a script can find its dependencies. (This can cause this shebang line to become too long for Darwin to handle; see the note below.)
- In the fixup phase, it writes the propagated build inputs
- (propagatedBuildInputs) to the file
- $out/nix-support/propagated-user-env-packages.
- nix-env recursively installs all packages listed in
- this file when you install a package that has it. This ensures that a Perl
- package can find its dependencies.
+ In the fixup phase, it writes the propagated build inputs (propagatedBuildInputs) to the file $out/nix-support/propagated-user-env-packages. nix-env recursively installs all packages listed in this file when you install a package that has it. This ensures that a Perl package can find its dependencies.
- buildPerlPackage is built on top of
- stdenv, so everything can be customised in the usual way.
- For instance, the BerkeleyDB module has a
- preConfigure hook to generate a configuration file used by
- Makefile.PL:
+ buildPerlPackage is built on top of stdenv, so everything can be customised in the usual way. For instance, the BerkeleyDB module has a preConfigure hook to generate a configuration file used by Makefile.PL:
{ buildPerlPackage, fetchurl, db }:
@@ -117,12 +81,7 @@ buildPerlPackage rec {
- Dependencies on other Perl packages can be specified in the
- buildInputs and propagatedBuildInputs
- attributes. If something is exclusively a build-time dependency, use
- buildInputs; if it’s (also) a runtime dependency, use
- propagatedBuildInputs. For instance, this builds a Perl
- module that has runtime dependencies on a bunch of other modules:
+ Dependencies on other Perl packages can be specified in the buildInputs and propagatedBuildInputs attributes. If something is exclusively a build-time dependency, use buildInputs; if it’s (also) a runtime dependency, use propagatedBuildInputs. For instance, this builds a Perl module that has runtime dependencies on a bunch of other modules:
ClassC3Componentised = buildPerlPackage rec {
name = "Class-C3-Componentised-1.0004";
@@ -137,14 +96,34 @@ ClassC3Componentised = buildPerlPackage rec {
+
+ On Darwin, if a script has too many -Idir flags in its first line (its “shebang line”), it will not run. This can be worked around by calling the shortenPerlShebang function from the postInstall phase:
+
+{ stdenv, buildPerlPackage, fetchurl, shortenPerlShebang }:
+
+ImageExifTool = buildPerlPackage {
+ pname = "Image-ExifTool";
+ version = "11.50";
+
+ src = fetchurl {
+ url = "https://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-11.50.tar.gz";
+ sha256 = "0d8v48y94z8maxkmw1rv7v9m0jg2dc8xbp581njb6yhr7abwqdv3";
+ };
+
+ buildInputs = stdenv.lib.optional stdenv.isDarwin shortenPerlShebang;
+ postInstall = stdenv.lib.optional stdenv.isDarwin ''
+ shortenPerlShebang $out/bin/exiftool
+ '';
+};
+
+ This will remove the -I flags from the shebang line, rewrite them in the use lib form, and put them on the next line instead. This function can be given any number of Perl scripts as arguments; it will modify them in-place.
+
+
Generation from CPAN
- Nix expressions for Perl packages can be generated (almost) automatically
- from CPAN. This is done by the program
- nix-generate-from-cpan, which can be installed as
- follows:
+ Nix expressions for Perl packages can be generated (almost) automatically from CPAN. This is done by the program nix-generate-from-cpan, which can be installed as follows:
@@ -152,9 +131,7 @@ ClassC3Componentised = buildPerlPackage rec {
- This program takes a Perl module name, looks it up on CPAN, fetches and
- unpacks the corresponding package, and prints a Nix expression on standard
- output. For example:
+ This program takes a Perl module name, looks it up on CPAN, fetches and unpacks the corresponding package, and prints a Nix expression on standard output. For example:
$ nix-generate-from-cpan XML::Simple
XMLSimple = buildPerlPackage rec {
@@ -170,9 +147,7 @@ ClassC3Componentised = buildPerlPackage rec {
};
};
- The output can be pasted into
- pkgs/top-level/perl-packages.nix or wherever else you
- need it.
+ The output can be pasted into pkgs/top-level/perl-packages.nix or wherever else you need it.
@@ -180,13 +155,7 @@ ClassC3Componentised = buildPerlPackage rec {
Cross-compiling modules
- Nixpkgs has experimental support for cross-compiling Perl modules. In many
- cases, it will just work out of the box, even for modules with native
- extensions. Sometimes, however, the Makefile.PL for a module may
- (indirectly) import a native module. In that case, you will need to make a
- stub for that module that will satisfy the Makefile.PL and install it into
- lib/perl5/site_perl/cross_perl/${perl.version}. See the
- postInstall for DBI for an example.
+ Nixpkgs has experimental support for cross-compiling Perl modules. In many cases, it will just work out of the box, even for modules with native extensions. Sometimes, however, the Makefile.PL for a module may (indirectly) import a native module. In that case, you will need to make a stub for that module that will satisfy the Makefile.PL and install it into lib/perl5/site_perl/cross_perl/${perl.version}. See the postInstall for DBI for an example.
diff --git a/doc/languages-frameworks/python.section.md b/doc/languages-frameworks/python.section.md
index 4963c97a6c9a..4b18a9139d8e 100644
--- a/doc/languages-frameworks/python.section.md
+++ b/doc/languages-frameworks/python.section.md
@@ -540,7 +540,8 @@ and the aliases
#### `buildPythonPackage` function
The `buildPythonPackage` function is implemented in
-`pkgs/development/interpreters/python/build-python-package.nix`
+`pkgs/development/interpreters/python/mk-python-derivation`
+using setup hooks.
The following is an example:
```nix
@@ -797,6 +798,22 @@ such as `ignoreCollisions = true` or `postBuild`. If you need them, you have to
Python 2 namespace packages may provide `__init__.py` that collide. In that case `python.buildEnv`
should be used with `ignoreCollisions = true`.
+#### Setup hooks
+
+The following are setup hooks specifically for Python packages. Most of these are
+used in `buildPythonPackage`.
+
+- `flitBuildHook` to build a wheel using `flit`.
+- `pipBuildHook` to build a wheel using `pip` and PEP 517. Note a build system (e.g. `setuptools` or `flit`) should still be added as `nativeBuildInput`.
+- `pipInstallHook` to install wheels.
+- `pytestCheckHook` to run tests with `pytest`.
+- `pythonCatchConflictsHook` to check whether a Python package is not already existing.
+- `pythonImportsCheckHook` to check whether importing the listed modules works.
+- `pythonRemoveBinBytecode` to remove bytecode from the `/bin` folder.
+- `setuptoolsBuildHook` to build a wheel using `setuptools`.
+- `setuptoolsCheckHook` to run tests with `python setup.py test`.
+- `wheelUnpackHook` to move a wheel to the correct folder so it can be installed with the `pipInstallHook`.
+
### Development mode
Development or editable mode is supported. To develop Python packages
@@ -833,9 +850,8 @@ Note: There is a boolean value `lib.inNixShell` set to `true` if nix-shell is in
Packages inside nixpkgs are written by hand. However many tools exist in
community to help save time. No tool is preferred at the moment.
-- [python2nix](https://github.com/proger/python2nix) by Vladimir Kirillov
-- [pypi2nix](https://github.com/garbas/pypi2nix) by Rok Garbas
-- [pypi2nix](https://github.com/offlinehacker/pypi2nix) by Jaka Hudoklin
+- [pypi2nix](https://github.com/nix-community/pypi2nix): Generate Nix expressions for your Python project. Note that [sharing derivations from pypi2nix with nixpkgs is possible but not encouraged](https://github.com/nix-community/pypi2nix/issues/222#issuecomment-443497376).
+- [python2nix](https://github.com/proger/python2nix) by Vladimir Kirillov.
### Deterministic builds
diff --git a/doc/languages-frameworks/qt.xml b/doc/languages-frameworks/qt.xml
index 032cdd9945b3..8d97de504ad3 100644
--- a/doc/languages-frameworks/qt.xml
+++ b/doc/languages-frameworks/qt.xml
@@ -4,16 +4,12 @@
Qt
- This section describes the differences between Nix expressions for Qt
- libraries and applications and Nix expressions for other C++ software. Some
- knowledge of the latter is assumed. There are primarily two problems which
- the Qt infrastructure is designed to address: ensuring consistent versioning
- of all dependencies and finding dependencies at runtime.
+ This section describes the differences between Nix expressions for Qt libraries and applications and Nix expressions for other C++ software. Some knowledge of the latter is assumed. There are primarily two problems which the Qt infrastructure is designed to address: ensuring consistent versioning of all dependencies and finding dependencies at runtime.
- Nix expression for a Qt package (default.nix)
-
+ Nix expression for a Qt package (default.nix)
+
{ mkDerivation, lib, qtbase }:
mkDerivation {
@@ -26,53 +22,36 @@ mkDerivation {
-
-
- Import mkDerivation and Qt (such as
- qtbase modules directly. Do not
- import Qt package sets; the Qt versions of dependencies may not be
- coherent, causing build and runtime failures.
-
-
-
-
- Use mkDerivation instead of
- stdenv.mkDerivation. mkDerivation
- is a wrapper around stdenv.mkDerivation which
- applies some Qt-specific settings.
- This deriver accepts the same arguments as
- stdenv.mkDerivation; refer to
- for details.
-
-
- To use another deriver instead of
- stdenv.mkDerivation, use
- mkDerivationWith:
+
+
+ Import mkDerivation and Qt (such as qtbase modules directly. Do not import Qt package sets; the Qt versions of dependencies may not be coherent, causing build and runtime failures.
+
+
+
+
+ Use mkDerivation instead of stdenv.mkDerivation. mkDerivation is a wrapper around stdenv.mkDerivation which applies some Qt-specific settings. This deriver accepts the same arguments as stdenv.mkDerivation; refer to for details.
+
+
+ To use another deriver instead of stdenv.mkDerivation, use mkDerivationWith:
mkDerivationWith myDeriver {
# ...
}
- If you cannot use mkDerivationWith, please refer to
- .
-
-
-
-
- mkDerivation accepts the same arguments as
- stdenv.mkDerivation, such as
- buildInputs.
-
-
+ If you cannot use mkDerivationWith, please refer to .
+
+
+
+
+ mkDerivation accepts the same arguments as stdenv.mkDerivation, such as buildInputs.
+
+
- Locating runtime dependencies
-
- Qt applications need to be wrapped to find runtime dependencies. If you
- cannot use mkDerivation or
- mkDerivationWith above, include
- wrapQtAppsHook in nativeBuildInputs:
+ Locating runtime dependencies
+
+ Qt applications need to be wrapped to find runtime dependencies. If you cannot use mkDerivation or mkDerivationWith above, include wrapQtAppsHook in nativeBuildInputs:
stdenv.mkDerivation {
# ...
@@ -80,13 +59,11 @@ stdenv.mkDerivation {
nativeBuildInputs = [ wrapQtAppsHook ];
}
-
+
- Entries added to qtWrapperArgs are used to modify the
- wrappers created by wrapQtAppsHook. The entries are
- passed as arguments to .
+ Entries added to qtWrapperArgs are used to modify the wrappers created by wrapQtAppsHook. The entries are passed as arguments to .
mkDerivation {
# ...
@@ -97,10 +74,7 @@ mkDerivation {
- Set dontWrapQtApps to stop applications from being
- wrapped automatically. It is required to wrap applications manually with
- wrapQtApp, using the syntax of
- :
+ Set dontWrapQtApps to stop applications from being wrapped automatically. It is required to wrap applications manually with wrapQtApp, using the syntax of :
mkDerivation {
# ...
@@ -113,9 +87,14 @@ mkDerivation {
+
+
+ wrapQtAppsHook ignores files that are non-ELF executables. This means that scripts won't be automatically wrapped so you'll need to manually wrap them as previously mentioned. An example of when you'd always need to do this is with Python applications that use PyQT.
+
+
+
- Libraries are built with every available version of Qt. Use the meta.broken
- attribute to disable the package for unsupported Qt versions:
+ Libraries are built with every available version of Qt. Use the meta.broken attribute to disable the package for unsupported Qt versions:
mkDerivation {
# ...
@@ -127,13 +106,11 @@ mkDerivation {
- Adding a library to Nixpkgs
-
- Add a Qt library to all-packages.nix by adding it to the
- collection inside mkLibsForQt5. This ensures that the
- library is built with every available version of Qt as needed.
-
- Adding a Qt library to all-packages.nix
+ Adding a library to Nixpkgs
+
+ Add a Qt library to all-packages.nix by adding it to the collection inside mkLibsForQt5. This ensures that the library is built with every available version of Qt as needed.
+
+ Adding a Qt library to all-packages.nix
{
# ...
@@ -147,19 +124,16 @@ mkDerivation {
# ...
}
-
-
+
+
- Adding an application to Nixpkgs
-
- Add a Qt application to all-packages.nix using
- libsForQt5.callPackage instead of the usual
- callPackage. The former ensures that all dependencies
- are built with the same version of Qt.
-
- Adding a Qt application to all-packages.nix
+ Adding an application to Nixpkgs
+
+ Add a Qt application to all-packages.nix using libsForQt5.callPackage instead of the usual callPackage. The former ensures that all dependencies are built with the same version of Qt.
+
+ Adding a Qt application to all-packages.nix
{
# ...
@@ -169,8 +143,7 @@ mkDerivation {
# ...
}
-
-
+
+
-
diff --git a/doc/languages-frameworks/r.section.md b/doc/languages-frameworks/r.section.md
index c8f02bd14780..d4e1617779ce 100644
--- a/doc/languages-frameworks/r.section.md
+++ b/doc/languages-frameworks/r.section.md
@@ -1,5 +1,5 @@
-R packages
-==========
+R
+=
## Installation
diff --git a/doc/languages-frameworks/ruby.section.md b/doc/languages-frameworks/ruby.section.md
new file mode 100644
index 000000000000..e4c4ffce0432
--- /dev/null
+++ b/doc/languages-frameworks/ruby.section.md
@@ -0,0 +1,365 @@
+---
+title: Ruby
+author: Michael Fellinger
+date: 2019-05-23
+---
+
+# Ruby
+
+## User Guide
+
+### Using Ruby
+
+#### Overview
+
+Several versions of Ruby interpreters are available on Nix, as well as over 250 gems and many applications written in Ruby.
+The attribute `ruby` refers to the default Ruby interpreter, which is currently
+MRI 2.5. It's also possible to refer to specific versions, e.g. `ruby_2_6`, `jruby`, or `mruby`.
+
+In the nixpkgs tree, Ruby packages can be found throughout, depending on what
+they do, and are called from the main package set. Ruby gems, however are
+separate sets, and there's one default set for each interpreter (currently MRI
+only).
+
+There are two main approaches for using Ruby with gems.
+One is to use a specifically locked `Gemfile` for an application that has very strict dependencies.
+The other is to depend on the common gems, which we'll explain further down, and
+rely on them being updated regularly.
+
+The interpreters have common attributes, namely `gems`, and `withPackages`. So
+you can refer to `ruby.gems.nokogiri`, or `ruby_2_5.gems.nokogiri` to get the
+Nokogiri gem already compiled and ready to use.
+
+Since not all gems have executables like `nokogiri`, it's usually more
+convenient to use the `withPackages` function like this:
+`ruby.withPackages (p: with p; [ nokogiri ])`. This will also make sure that the
+Ruby in your environment will be able to find the gem and it can be used in your
+Ruby code (for example via `ruby` or `irb` executables) via `require "nokogiri"`
+as usual.
+
+#### Temporary Ruby environment with `nix-shell`
+
+Rather than having a single Ruby environment shared by all Ruby
+development projects on a system, Nix allows you to create separate
+environments per project. `nix-shell` gives you the possibility to
+temporarily load another environment akin to a combined `chruby` or
+`rvm` and `bundle exec`.
+
+There are two methods for loading a shell with Ruby packages. The first and
+recommended method is to create an environment with `ruby.withPackages` and load
+that.
+
+```shell
+nix-shell -p "ruby.withPackages (ps: with ps; [ nokogiri pry ])"
+```
+
+The other method, which is not recommended, is to create an environment and list
+all the packages directly.
+
+```shell
+nix-shell -p ruby.gems.nokogiri ruby.gems.pry
+```
+
+Again, it's possible to launch the interpreter from the shell. The Ruby
+interpreter has the attribute `gems` which contains all Ruby gems for that
+specific interpreter.
+
+##### Load environment from `.nix` expression
+
+As explained in the Nix manual, `nix-shell` can also load an expression from a
+`.nix` file. Say we want to have Ruby 2.5, `nokogori`, and `pry`. Consider a
+`shell.nix` file with:
+
+```nix
+with import {};
+ruby.withPackages (ps: with ps; [ nokogiri pry ])
+```
+
+What's happening here?
+
+1. We begin with importing the Nix Packages collections. `import `
+ imports the `` function, `{}` calls it and the `with` statement
+ brings all attributes of `nixpkgs` in the local scope. These attributes form
+ the main package set.
+2. Then we create a Ruby environment with the `withPackages` function.
+3. The `withPackages` function expects us to provide a function as an argument
+ that takes the set of all ruby gems and returns a list of packages to include
+ in the environment. Here, we select the packages `nokogiri` and `pry` from
+ the package set.
+
+##### Execute command with `--run`
+
+A convenient flag for `nix-shell` is `--run`. It executes a command in the
+`nix-shell`. We can e.g. directly open a `pry` REPL:
+
+```shell
+nix-shell -p "ruby.withPackages (ps: with ps; [ nokogiri pry ])" --run "pry"
+```
+
+Or immediately require `nokogiri` in pry:
+
+```shell
+nix-shell -p "ruby.withPackages (ps: with ps; [ nokogiri pry ])" --run "pry -rnokogiri"
+```
+
+Or run a script using this environment:
+
+```shell
+nix-shell -p "ruby.withPackages (ps: with ps; [ nokogiri pry ])" --run "ruby example.rb"
+```
+
+##### Using `nix-shell` as shebang
+
+In fact, for the last case, there is a more convenient method. You can add a
+[shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) to your script
+specifying which dependencies `nix-shell` needs. With the following shebang, you
+can just execute `./example.rb`, and it will run with all dependencies.
+
+```ruby
+#! /usr/bin/env nix-shell
+#! nix-shell -i ruby -p "ruby.withPackages (ps: with ps; [ nokogiri rest-client ])"
+
+require 'nokogiri'
+require 'rest-client'
+
+body = RestClient.get('http://example.com').body
+puts Nokogiri::HTML(body).at('h1').text
+```
+
+### Developing with Ruby
+
+#### Using an existing Gemfile
+
+In most cases, you'll already have a `Gemfile.lock` listing all your dependencies.
+This can be used to generate a `gemset.nix` which is used to fetch the gems and
+combine them into a single environment.
+The reason why you need to have a separate file for this, is that Nix requires
+you to have a checksum for each input to your build.
+Since the `Gemfile.lock` that `bundler` generates doesn't provide us with
+checksums, we have to first download each gem, calculate its SHA256, and store
+it in this separate file.
+
+So the steps from having just a `Gemfile` to a `gemset.nix` are:
+
+```shell
+bundle lock
+bundix
+```
+
+If you already have a `Gemfile.lock`, you can simply run `bundix` and it will
+work the same.
+
+To update the gems in your `Gemfile.lock`, you may use the `bundix -l` flag,
+which will create a new `Gemfile.lock` in case the `Gemfile` has a more recent
+time of modification.
+
+Once the `gemset.nix` is generated, it can be used in a
+`bundlerEnv` derivation. Here is an example you could use for your `shell.nix`:
+
+```nix
+# ...
+let
+ gems = bundlerEnv {
+ name = "gems-for-some-project";
+ gemdir = ./.;
+ };
+in mkShell { buildInputs = [ gems gems.wrappedRuby ]; }
+```
+
+With this file in your directory, you can run `nix-shell` to build and use the gems.
+The important parts here are `bundlerEnv` and `wrappedRuby`.
+
+The `bundlerEnv` is a wrapper over all the gems in your gemset. This means that
+all the `/lib` and `/bin` directories will be available, and the executables of
+all gems (even of indirect dependencies) will end up in your `$PATH`.
+The `wrappedRuby` provides you with all executables that come with Ruby itself,
+but wrapped so they can easily find the gems in your gemset.
+
+One common issue that you might have is that you have Ruby 2.6, but also
+`bundler` in your gemset. That leads to a conflict for `/bin/bundle` and
+`/bin/bundler`. You can resolve this by wrapping either your Ruby or your gems
+in a `lowPrio` call. So in order to give the `bundler` from your gemset
+priority, it would be used like this:
+
+```nix
+# ...
+mkShell { buildInputs = [ gems (lowPrio gems.wrappedRuby) ]; }
+```
+
+
+#### Gem-specific configurations and workarounds
+
+In some cases, especially if the gem has native extensions, you might need to
+modify the way the gem is built.
+
+This is done via a common configuration file that includes all of the
+workarounds for each gem.
+
+This file lives at `/pkgs/development/ruby-modules/gem-config/default.nix`,
+since it already contains a lot of entries, it should be pretty easy to add the
+modifications you need for your needs.
+
+In the meanwhile, or if the modification is for a private gem, you can also add
+the configuration to only your own environment.
+
+Two places that allow this modification are the `ruby` derivation, or `bundlerEnv`.
+
+Here's the `ruby` one:
+
+```nix
+{ pg_version ? "10", pkgs ? import { } }:
+let
+ myRuby = pkgs.ruby.override {
+ defaultGemConfig = pkgs.defaultGemConfig // {
+ pg = attrs: {
+ buildFlags =
+ [ "--with-pg-config=${pkgs."postgresql_${pg_version}"}/bin/pg_config" ];
+ };
+ };
+ };
+in myRuby.withPackages (ps: with ps; [ pg ])
+```
+
+And an example with `bundlerEnv`:
+
+```nix
+{ pg_version ? "10", pkgs ? import { } }:
+let
+ gems = pkgs.bundlerEnv {
+ name = "gems-for-some-project";
+ gemdir = ./.;
+ gemConfig = pkgs.defaultGemConfig // {
+ pg = attrs: {
+ buildFlags =
+ [ "--with-pg-config=${pkgs."postgresql_${pg_version}"}/bin/pg_config" ];
+ };
+ };
+ };
+in mkShell { buildInputs = [ gems gems.wrappedRuby ]; }
+```
+
+And finally via overlays:
+
+```nix
+{ pg_version ? "10" }:
+let
+ pkgs = import {
+ overlays = [
+ (self: super: {
+ defaultGemConfig = super.defaultGemConfig // {
+ pg = attrs: {
+ buildFlags = [
+ "--with-pg-config=${
+ pkgs."postgresql_${pg_version}"
+ }/bin/pg_config"
+ ];
+ };
+ };
+ })
+ ];
+ };
+in pkgs.ruby.withPackages (ps: with ps; [ pg ])
+```
+
+Then we can get whichever postgresql version we desire and the `pg` gem will
+always reference it correctly:
+
+```shell
+$ nix-shell --argstr pg_version 9_4 --run 'ruby -rpg -e "puts PG.library_version"'
+90421
+
+$ nix-shell --run 'ruby -rpg -e "puts PG.library_version"'
+100007
+```
+
+Of course for this use-case one could also use overlays since the configuration
+for `pg` depends on the `postgresql` alias, but for demonstration purposes this
+has to suffice.
+
+#### Adding a gem to the default gemset
+
+Now that you know how to get a working Ruby environment with Nix, it's time to
+go forward and start actually developing with Ruby.
+We will first have a look at how Ruby gems are packaged on Nix. Then, we will
+look at how you can use development mode with your code.
+
+All gems in the standard set are automatically generated from a single
+`Gemfile`. The dependency resolution is done with `bundler` and makes it more
+likely that all gems are compatible to each other.
+
+In order to add a new gem to nixpkgs, you can put it into the
+`/pkgs/development/ruby-modules/with-packages/Gemfile` and run
+`./maintainers/scripts/update-ruby-packages`.
+
+To test that it works, you can then try using the gem with:
+
+```shell
+NIX_PATH=nixpkgs=$PWD nix-shell -p "ruby.withPackages (ps: with ps; [ name-of-your-gem ])"
+```
+
+#### Packaging applications
+
+A common task is to add a ruby executable to nixpkgs, popular examples would be
+`chef`, `jekyll`, or `sass`. A good way to do that is to use the `bundlerApp`
+function, that allows you to make a package that only exposes the listed
+executables, otherwise the package may cause conflicts through common paths like
+`bin/rake` or `bin/bundler` that aren't meant to be used.
+
+The absolute easiest way to do that is to write a
+`Gemfile` along these lines:
+
+```ruby
+source 'https://rubygems.org' do
+ gem 'mdl'
+end
+```
+
+If you want to package a specific version, you can use the standard Gemfile
+syntax for that, e.g. `gem 'mdl', '0.5.0'`, but if you want the latest stable
+version anyway, it's easier to update by simply running the `bundle lock` and
+`bundix` steps again.
+
+Now you can also also make a `default.nix` that looks like this:
+
+```nix
+{ lib, bundlerApp }:
+
+bundlerApp {
+ pname = "mdl";
+ gemdir = ./.;
+ exes = [ "mdl" ];
+}
+```
+
+All that's left to do is to generate the corresponding `Gemfile.lock` and
+`gemset.nix` as described above in the `Using an existing Gemfile` section.
+
+##### Packaging executables that require wrapping
+
+Sometimes your app will depend on other executables at runtime, and tries to
+find it through the `PATH` environment variable.
+
+In this case, you can provide a `postBuild` hook to `bundlerApp` that wraps the
+gem in another script that prefixes the `PATH`.
+
+Of course you could also make a custom `gemConfig` if you know exactly how to
+patch it, but it's usually much easier to maintain with a simple wrapper so the
+patch doesn't have to be adjusted for each version.
+
+Here's another example:
+
+```nix
+{ lib, bundlerApp, makeWrapper, git, gnutar, gzip }:
+
+bundlerApp {
+ pname = "r10k";
+ gemdir = ./.;
+ exes = [ "r10k" ];
+
+ buildInputs = [ makeWrapper ];
+
+ postBuild = ''
+ wrapProgram $out/bin/r10k --prefix PATH : ${lib.makeBinPath [ git gnutar gzip ]}
+ '';
+}
+```
diff --git a/doc/languages-frameworks/ruby.xml b/doc/languages-frameworks/ruby.xml
index df4e5acb22cb..b28745fd6e27 100644
--- a/doc/languages-frameworks/ruby.xml
+++ b/doc/languages-frameworks/ruby.xml
@@ -4,11 +4,7 @@
Ruby
- There currently is support to bundle applications that are packaged as Ruby
- gems. The utility "bundix" allows you to write a
- Gemfile, let bundler create a
- Gemfile.lock, and then convert this into a nix
- expression that contains all Gem dependencies automatically.
+ There currently is support to bundle applications that are packaged as Ruby gems. The utility "bundix" allows you to write a Gemfile, let bundler create a Gemfile.lock, and then convert this into a nix expression that contains all Gem dependencies automatically.
@@ -45,9 +41,7 @@ bundlerEnv rec {
- Please check in the Gemfile,
- Gemfile.lock and the gemset.nix so
- future updates can be run easily.
+ Please check in the Gemfile, Gemfile.lock and the gemset.nix so future updates can be run easily.
@@ -62,10 +56,7 @@ $ nix-shell -p bundix --run 'bundix'
- For tools written in Ruby - i.e. where the desire is to install a package and
- then execute e.g. rake at the command line, there is an
- alternative builder called bundlerApp. Set up the
- gemset.nix the same way, and then, for example:
+ For tools written in Ruby - i.e. where the desire is to install a package and then execute e.g. rake at the command line, there is an alternative builder called bundlerApp. Set up the gemset.nix the same way, and then, for example:
@@ -87,29 +78,11 @@ bundlerApp {
- The chief advantage of bundlerApp over
- bundlerEnv is the executables introduced in the
- environment are precisely those selected in the exes list,
- as opposed to bundlerEnv which adds all the executables
- made available by gems in the gemset, which can mean e.g.
- rspec or rake in unpredictable versions
- available from various packages.
+ The chief advantage of bundlerApp over bundlerEnv is the executables introduced in the environment are precisely those selected in the exes list, as opposed to bundlerEnv which adds all the executables made available by gems in the gemset, which can mean e.g. rspec or rake in unpredictable versions available from various packages.
- Resulting derivations for both builders also have two helpful attributes,
- env and wrappedRuby. The first one
- allows one to quickly drop into nix-shell with the
- specified environment present. E.g. nix-shell -A sensu.env
- would give you an environment with Ruby preset so it has all the libraries
- necessary for sensu in its paths. The second one can be
- used to make derivations from custom Ruby scripts which have
- Gemfiles with their dependencies specified. It is a
- derivation with ruby wrapped so it can find all the needed
- dependencies. For example, to make a derivation my-script
- for a my-script.rb (which should be placed in
- bin) you should run bundix as
- specified above and then use bundlerEnv like this:
+ Resulting derivations for both builders also have two helpful attributes, env and wrappedRuby. The first one allows one to quickly drop into nix-shell with the specified environment present. E.g. nix-shell -A sensu.env would give you an environment with Ruby preset so it has all the libraries necessary for sensu in its paths. The second one can be used to make derivations from custom Ruby scripts which have Gemfiles with their dependencies specified. It is a derivation with ruby wrapped so it can find all the needed dependencies. For example, to make a derivation my-script for a my-script.rb (which should be placed in bin) you should run bundix as specified above and then use bundlerEnv like this:
diff --git a/doc/languages-frameworks/rust.section.md b/doc/languages-frameworks/rust.section.md
index 2d9338f2e89b..31f1abd197b5 100644
--- a/doc/languages-frameworks/rust.section.md
+++ b/doc/languages-frameworks/rust.section.md
@@ -4,7 +4,7 @@ author: Matthias Beyer
date: 2017-03-05
---
-# User's Guide to the Rust Infrastructure
+# Rust
To install the rust compiler and cargo put
@@ -43,6 +43,7 @@ rustPlatform.buildRustPackage rec {
};
cargoSha256 = "0q68qyl2h6i0qsz82z840myxlnjay8p1w5z7hfyr8fqp7wgwa9cx";
+ verifyCargoDeps = true;
meta = with stdenv.lib; {
description = "A fast line-oriented regex search tool, similar to ag and ack";
@@ -64,6 +65,9 @@ When the `Cargo.lock`, provided by upstream, is not in sync with the
added in `cargoPatches` will also be prepended to the patches in `patches` at
build-time.
+When `verifyCargoDeps` is set to `true`, the build will also verify that the
+`cargoSha256` is not out of date by comparing the `Cargo.lock` file in both the `cargoDeps` and `src`. Note that this option changes the value of `cargoSha256` since it also copies the `Cargo.lock` in it. To avoid breaking backward-compatibility this option is not enabled by default but hopefully will be in the future.
+
## Compiling Rust crates using Nix instead of Cargo
### Simple operation
diff --git a/doc/languages-frameworks/texlive.xml b/doc/languages-frameworks/texlive.xml
index 97f274933bef..7876cc213b66 100644
--- a/doc/languages-frameworks/texlive.xml
+++ b/doc/languages-frameworks/texlive.xml
@@ -4,8 +4,7 @@
TeX Live
- Since release 15.09 there is a new TeX Live packaging that lives entirely
- under attribute texlive.
+ Since release 15.09 there is a new TeX Live packaging that lives entirely under attribute texlive.
@@ -14,28 +13,23 @@
- For basic usage just pull texlive.combined.scheme-basic
- for an environment with basic LaTeX support.
+ For basic usage just pull texlive.combined.scheme-basic for an environment with basic LaTeX support.
- It typically won't work to use separately installed packages together.
- Instead, you can build a custom set of packages like this:
+ It typically won't work to use separately installed packages together. Instead, you can build a custom set of packages like this:
texlive.combine {
inherit (texlive) scheme-small collection-langkorean algorithms cm-super;
}
- There are all the schemes, collections and a few thousand packages, as
- defined upstream (perhaps with tiny differences).
+ There are all the schemes, collections and a few thousand packages, as defined upstream (perhaps with tiny differences).
- By default you only get executables and files needed during runtime, and a
- little documentation for the core packages. To change that, you need to
- add pkgFilter function to combine.
+ By default you only get executables and files needed during runtime, and a little documentation for the core packages. To change that, you need to add pkgFilter function to combine.
texlive.combine {
# inherit (texlive) whatever-you-want;
@@ -59,10 +53,7 @@ nix-repl> texlive.collection-
- Note that the wrapper assumes that the result has a chance to be useful.
- For example, the core executables should be present, as well as some core
- data files. The supported way of ensuring this is by including some
- scheme, for example scheme-basic, into the combination.
+ Note that the wrapper assumes that the result has a chance to be useful. For example, the core executables should be present, as well as some core data files. The supported way of ensuring this is by including some scheme, for example scheme-basic, into the combination.
@@ -84,14 +75,12 @@ nix-repl> texlive.collection-
- feature/bug: when a package is rejected by pkgFilter,
- its dependencies are still propagated;
+ feature/bug: when a package is rejected by pkgFilter, its dependencies are still propagated;
- in case of any bugs or feature requests, file a github issue or better a
- pull request and /cc @vcunat.
+ in case of any bugs or feature requests, file a github issue or better a pull request and /cc @vcunat.
diff --git a/doc/languages-frameworks/vim.section.md b/doc/languages-frameworks/vim.section.md
index 537e7b93e523..05a23d26cf2f 100644
--- a/doc/languages-frameworks/vim.section.md
+++ b/doc/languages-frameworks/vim.section.md
@@ -3,7 +3,7 @@ title: User's Guide for Vim in Nixpkgs
author: Marc Weber
date: 2016-06-25
---
-# User's Guide to Vim Plugins/Addons/Bundles/Scripts in Nixpkgs
+# Vim
Both Neovim and Vim can be configured to include your favorite plugins
and additional libraries.
diff --git a/doc/manual.xml b/doc/manual.xml
index ab845e1a1086..de2c70eaf352 100644
--- a/doc/manual.xml
+++ b/doc/manual.xml
@@ -6,20 +6,36 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ Using Nixpkgs
+
+
+
+
+
+
+ Standard environment
+
+
+
+
+
+
+
+ Builders
+
+
+
+
+
+
+
+
+ Contributing to Nixpkgs
+
+
+
+
+
+
diff --git a/doc/meta.xml b/doc/meta.xml
index 58c390a68b84..9371196818ad 100644
--- a/doc/meta.xml
+++ b/doc/meta.xml
@@ -3,10 +3,7 @@
xml:id="chap-meta">
Meta-attributes
- Nix packages can declare meta-attributes that contain
- information about a package such as a description, its homepage, its license,
- and so on. For instance, the GNU Hello package has a meta
- declaration like this:
+ Nix packages can declare meta-attributes that contain information about a package such as a description, its homepage, its license, and so on. For instance, the GNU Hello package has a meta declaration like this:
meta = with stdenv.lib; {
description = "A program that produces a familiar, friendly greeting";
@@ -22,13 +19,10 @@ meta = with stdenv.lib; {
- Meta-attributes are not passed to the builder of the package. Thus, a change
- to a meta-attribute doesn’t trigger a recompilation of the package. The
- value of a meta-attribute must be a string.
+ Meta-attributes are not passed to the builder of the package. Thus, a change to a meta-attribute doesn’t trigger a recompilation of the package. The value of a meta-attribute must be a string.
- The meta-attributes of a package can be queried from the command-line using
- nix-env:
+ The meta-attributes of a package can be queried from the command-line using nix-env:
$ nix-env -qa hello --json
{
@@ -67,8 +61,7 @@ meta = with stdenv.lib; {
- nix-env knows about the description
- field specifically:
+ nix-env knows about the description field specifically:
$ nix-env -qa hello --description
hello-2.3 A program that produces a familiar, friendly greeting
@@ -88,18 +81,13 @@ hello-2.3 A program that produces a familiar, friendly greeting
- A short (one-line) description of the package. This is shown by
- nix-env -q --description and also on the Nixpkgs
- release pages.
+ A short (one-line) description of the package. This is shown by nix-env -q --description and also on the Nixpkgs release pages.
- Don’t include a period at the end. Don’t include newline characters.
- Capitalise the first character. For brevity, don’t repeat the name of
- package — just describe what it does.
+ Don’t include a period at the end. Don’t include newline characters. Capitalise the first character. For brevity, don’t repeat the name of package — just describe what it does.
- Wrong: "libpng is a library that allows you to decode PNG
- images."
+ Wrong: "libpng is a library that allows you to decode PNG images."
Right: "A library for decoding PNG images"
@@ -122,9 +110,7 @@ hello-2.3 A program that produces a familiar, friendly greeting
- Release branch. Used to specify that a package is not going to receive
- updates that are not in this branch; for example, Linux kernel 3.0 is
- supposed to be updated to 3.0.X, not 3.1.
+ Release branch. Used to specify that a package is not going to receive updates that are not in this branch; for example, Linux kernel 3.0 is supposed to be updated to 3.0.X, not 3.1.
@@ -134,8 +120,7 @@ hello-2.3 A program that produces a familiar, friendly greeting
- The package’s homepage. Example:
- https://www.gnu.org/software/hello/manual/
+ The package’s homepage. Example: https://www.gnu.org/software/hello/manual/
@@ -145,8 +130,7 @@ hello-2.3 A program that produces a familiar, friendly greeting
- The page where a link to the current version can be found. Example:
- https://ftp.gnu.org/gnu/hello/
+ The page where a link to the current version can be found. Example: https://ftp.gnu.org/gnu/hello/
@@ -156,10 +140,7 @@ hello-2.3 A program that produces a familiar, friendly greeting
- A link or a list of links to the location of Changelog for a package.
- A link may use expansion to refer to the correct changelog version.
- Example:
- "https://git.savannah.gnu.org/cgit/hello.git/plain/NEWS?h=v${version}"
+ A link or a list of links to the location of Changelog for a package. A link may use expansion to refer to the correct changelog version. Example: "https://git.savannah.gnu.org/cgit/hello.git/plain/NEWS?h=v${version}"
@@ -169,46 +150,32 @@ hello-2.3 A program that produces a familiar, friendly greeting
- The license, or licenses, for the package. One from the attribute set
- defined in
-
- nixpkgs/lib/licenses.nix. At this moment
- using both a list of licenses and a single license is valid. If the
- license field is in the form of a list representation, then it means that
- parts of the package are licensed differently. Each license should
- preferably be referenced by their attribute. The non-list attribute value
- can also be a space delimited string representation of the contained
- attribute shortNames or spdxIds. The following are all valid examples:
+ The license, or licenses, for the package. One from the attribute set defined in nixpkgs/lib/licenses.nix. At this moment using both a list of licenses and a single license is valid. If the license field is in the form of a list representation, then it means that parts of the package are licensed differently. Each license should preferably be referenced by their attribute. The non-list attribute value can also be a space delimited string representation of the contained attribute shortNames or spdxIds. The following are all valid examples:
- Single license referenced by attribute (preferred)
- stdenv.lib.licenses.gpl3.
+ Single license referenced by attribute (preferred) stdenv.lib.licenses.gpl3.
- Single license referenced by its attribute shortName (frowned upon)
- "gpl3".
+ Single license referenced by its attribute shortName (frowned upon) "gpl3".
- Single license referenced by its attribute spdxId (frowned upon)
- "GPL-3.0".
+ Single license referenced by its attribute spdxId (frowned upon) "GPL-3.0".
- Multiple licenses referenced by attribute (preferred) with
- stdenv.lib.licenses; [ asl20 free ofl ].
+ Multiple licenses referenced by attribute (preferred) with stdenv.lib.licenses; [ asl20 free ofl ].
- Multiple licenses referenced as a space delimited string of attribute
- shortNames (frowned upon) "asl20 free ofl".
+ Multiple licenses referenced as a space delimited string of attribute shortNames (frowned upon) "asl20 free ofl".
@@ -222,13 +189,8 @@ hello-2.3 A program that produces a familiar, friendly greeting
- A list of names and e-mail addresses of the maintainers of this Nix
- expression. If you would like to be a maintainer of a package, you may
- want to add yourself to
- nixpkgs/maintainers/maintainer-list.nix
- and write something like [ stdenv.lib.maintainers.alice
- stdenv.lib.maintainers.bob ].
+ A list of names and e-mail addresses of the maintainers of this Nix expression. If you would like to be a maintainer of a package, you may want to add yourself to nixpkgs/maintainers/maintainer-list.nix and write something like [ stdenv.lib.maintainers.alice stdenv.lib.maintainers.bob ].
@@ -238,10 +200,7 @@ hello-2.3 A program that produces a familiar, friendly greeting
- The priority of the package, used by
- nix-env to resolve file name conflicts between
- packages. See the Nix manual page for nix-env for
- details. Example: "10" (a low-priority package).
+ The priority of the package, used by nix-env to resolve file name conflicts between packages. See the Nix manual page for nix-env for details. Example: "10" (a low-priority package).
@@ -251,15 +210,11 @@ hello-2.3 A program that produces a familiar, friendly greeting
- The list of Nix platform types on which the package is supported. Hydra
- builds packages according to the platform specified. If no platform is
- specified, the package does not have prebuilt binaries. An example is:
+ The list of Nix platform types on which the package is supported. Hydra builds packages according to the platform specified. If no platform is specified, the package does not have prebuilt binaries. An example is:
meta.platforms = stdenv.lib.platforms.linux;
- Attribute Set stdenv.lib.platforms defines
-
- various common lists of platforms types.
+ Attribute Set stdenv.lib.platforms defines various common lists of platforms types.
@@ -270,23 +225,14 @@ meta.platforms = stdenv.lib.platforms.linux;
- This attribute is special in that it is not actually under the
- meta attribute set but rather under the
- passthru attribute set. This is due to how
- meta attributes work, and the fact that they
- are supposed to contain only metadata, not derivations.
+ This attribute is special in that it is not actually under the meta attribute set but rather under the passthru attribute set. This is due to how meta attributes work, and the fact that they are supposed to contain only metadata, not derivations.
- An attribute set with as values tests. A test is a derivation, which
- builds successfully when the test passes, and fails to build otherwise. A
- derivation that is a test needs to have meta.timeout
- defined.
+ An attribute set with as values tests. A test is a derivation, which builds successfully when the test passes, and fails to build otherwise. A derivation that is a test needs to have meta.timeout defined.
- The NixOS tests are available as nixosTests in
- parameters of derivations. For instance, the OpenSMTPD derivation
- includes lines similar to:
+ The NixOS tests are available as nixosTests in parameters of derivations. For instance, the OpenSMTPD derivation includes lines similar to:
{ /* ... */, nixosTests }:
{
@@ -305,13 +251,7 @@ meta.platforms = stdenv.lib.platforms.linux;
- A timeout (in seconds) for building the derivation. If the derivation
- takes longer than this time to build, it can fail due to breaking the
- timeout. However, all computers do not have the same computing power,
- hence some builders may decide to apply a multiplicative factor to this
- value. When filling this value in, try to keep it approximately
- consistent with other values already present in
- nixpkgs.
+ A timeout (in seconds) for building the derivation. If the derivation takes longer than this time to build, it can fail due to breaking the timeout. However, all computers do not have the same computing power, hence some builders may decide to apply a multiplicative factor to this value. When filling this value in, try to keep it approximately consistent with other values already present in nixpkgs.
@@ -321,13 +261,7 @@ meta.platforms = stdenv.lib.platforms.linux;
- The list of Nix platform types for which the Hydra instance at
- hydra.nixos.org will build the package. (Hydra is the
- Nix-based continuous build system.) It defaults to the value of
- meta.platforms. Thus, the only reason to set
- meta.hydraPlatforms is if you want
- hydra.nixos.org to build the package on a subset of
- meta.platforms, or not at all, e.g.
+ The list of Nix platform types for which the Hydra instance at hydra.nixos.org will build the package. (Hydra is the Nix-based continuous build system.) It defaults to the value of meta.platforms. Thus, the only reason to set meta.hydraPlatforms is if you want hydra.nixos.org to build the package on a subset of meta.platforms, or not at all, e.g.
meta.platforms = stdenv.lib.platforms.linux;
meta.hydraPlatforms = [];
@@ -341,10 +275,7 @@ meta.hydraPlatforms = [];
- If set to true, the package is marked as “broken”,
- meaning that it won’t show up in nix-env -qa, and
- cannot be built or installed. Such packages should be removed from
- Nixpkgs eventually unless they are fixed.
+ If set to true, the package is marked as “broken”, meaning that it won’t show up in nix-env -qa, and cannot be built or installed. Such packages should be removed from Nixpkgs eventually unless they are fixed.
@@ -354,12 +285,7 @@ meta.hydraPlatforms = [];
- If set to true, the package is tested to be updated
- correctly by the update-walker.sh script without
- additional settings. Such packages have meta.version
- set and their homepage (or the page specified by
- meta.downloadPage) contains a direct link to the
- package tarball.
+ If set to true, the package is tested to be updated correctly by the update-walker.sh script without additional settings. Such packages have meta.version set and their homepage (or the page specified by meta.downloadPage) contains a direct link to the package tarball.
@@ -369,17 +295,11 @@ meta.hydraPlatforms = [];
Licenses
- The meta.license attribute should preferrably contain a
- value from stdenv.lib.licenses defined in
-
- nixpkgs/lib/licenses.nix, or in-place license
- description of the same format if the license is unlikely to be useful in
- another expression.
+ The meta.license attribute should preferrably contain a value from stdenv.lib.licenses defined in nixpkgs/lib/licenses.nix, or in-place license description of the same format if the license is unlikely to be useful in another expression.
- Although it's typically better to indicate the specific license, a few
- generic options are available:
+ Although it's typically better to indicate the specific license, a few generic options are available:
@@ -397,18 +317,10 @@ meta.hydraPlatforms = [];
- Unfree package that can be redistributed in binary form. That is, it’s
- legal to redistribute the output of the derivation.
- This means that the package can be included in the Nixpkgs channel.
+ Unfree package that can be redistributed in binary form. That is, it’s legal to redistribute the output of the derivation. This means that the package can be included in the Nixpkgs channel.
- Sometimes proprietary software can only be redistributed unmodified.
- Make sure the builder doesn’t actually modify the original binaries;
- otherwise we’re breaking the license. For instance, the NVIDIA X11
- drivers can be redistributed unmodified, but our builder applies
- patchelf to make them work. Thus, its license is
- "unfree" and it cannot be included in the Nixpkgs
- channel.
+ Sometimes proprietary software can only be redistributed unmodified. Make sure the builder doesn’t actually modify the original binaries; otherwise we’re breaking the license. For instance, the NVIDIA X11 drivers can be redistributed unmodified, but our builder applies patchelf to make them work. Thus, its license is "unfree" and it cannot be included in the Nixpkgs channel.
@@ -418,9 +330,7 @@ meta.hydraPlatforms = [];
- Unfree package that cannot be redistributed. You can build it yourself,
- but you cannot redistribute the output of the derivation. Thus it cannot
- be included in the Nixpkgs channel.
+ Unfree package that cannot be redistributed. You can build it yourself, but you cannot redistribute the output of the derivation. Thus it cannot be included in the Nixpkgs channel.
@@ -430,9 +340,7 @@ meta.hydraPlatforms = [];
- This package supplies unfree, redistributable firmware. This is a
- separate value from unfree-redistributable because
- not everybody cares whether firmware is free.
+ This package supplies unfree, redistributable firmware. This is a separate value from unfree-redistributable because not everybody cares whether firmware is free.
diff --git a/doc/multiple-output.xml b/doc/multiple-output.xml
index d0247e081f99..83275bb2fbd1 100644
--- a/doc/multiple-output.xml
+++ b/doc/multiple-output.xml
@@ -10,31 +10,16 @@
Introduction
- The Nix language allows a derivation to produce multiple outputs, which is
- similar to what is utilized by other Linux distribution packaging systems.
- The outputs reside in separate Nix store paths, so they can be mostly
- handled independently of each other, including passing to build inputs,
- garbage collection or binary substitution. The exception is that building
- from source always produces all the outputs.
+ The Nix language allows a derivation to produce multiple outputs, which is similar to what is utilized by other Linux distribution packaging systems. The outputs reside in separate Nix store paths, so they can be mostly handled independently of each other, including passing to build inputs, garbage collection or binary substitution. The exception is that building from source always produces all the outputs.
- The main motivation is to save disk space by reducing runtime closure sizes;
- consequently also sizes of substituted binaries get reduced. Splitting can
- be used to have more granular runtime dependencies, for example the typical
- reduction is to split away development-only files, as those are typically
- not needed during runtime. As a result, closure sizes of many packages can
- get reduced to a half or even much less.
+ The main motivation is to save disk space by reducing runtime closure sizes; consequently also sizes of substituted binaries get reduced. Splitting can be used to have more granular runtime dependencies, for example the typical reduction is to split away development-only files, as those are typically not needed during runtime. As a result, closure sizes of many packages can get reduced to a half or even much less.
- The reduction effects could be instead achieved by building the parts in
- completely separate derivations. That would often additionally reduce
- build-time closures, but it tends to be much harder to write such
- derivations, as build systems typically assume all parts are being built at
- once. This compromise approach of single source package producing multiple
- binary packages is also utilized often by rpm and deb.
+ The reduction effects could be instead achieved by building the parts in completely separate derivations. That would often additionally reduce build-time closures, but it tends to be much harder to write such derivations, as build systems typically assume all parts are being built at once. This compromise approach of single source package producing multiple binary packages is also utilized often by rpm and deb.
@@ -42,23 +27,18 @@
Installing a split package
- When installing a package via systemPackages or
- nix-env you have several options:
+ When installing a package via systemPackages or nix-env you have several options:
- You can install particular outputs explicitly, as each is available in the
- Nix language as an attribute of the package. The
- outputs attribute contains a list of output names.
+ You can install particular outputs explicitly, as each is available in the Nix language as an attribute of the package. The outputs attribute contains a list of output names.
- You can let it use the default outputs. These are handled by
- meta.outputsToInstall attribute that contains a list of
- output names.
+ You can let it use the default outputs. These are handled by meta.outputsToInstall attribute that contains a list of output names.
TODO: more about tweaking the attribute, etc.
@@ -66,19 +46,11 @@
- NixOS provides configuration option
- environment.extraOutputsToInstall that allows adding
- extra outputs of environment.systemPackages atop the
- default ones. It's mainly meant for documentation and debug symbols, and
- it's also modified by specific options.
+ NixOS provides configuration option environment.extraOutputsToInstall that allows adding extra outputs of environment.systemPackages atop the default ones. It's mainly meant for documentation and debug symbols, and it's also modified by specific options.
- At this moment there is no similar configurability for packages installed
- by nix-env. You can still use approach from
- to override
- meta.outputsToInstall attributes, but that's a rather
- inconvenient way.
+ At this moment there is no similar configurability for packages installed by nix-env. You can still use approach from to override meta.outputsToInstall attributes, but that's a rather inconvenient way.
@@ -88,25 +60,15 @@
Using a split package
- In the Nix language the individual outputs can be reached explicitly as
- attributes, e.g. coreutils.info, but the typical case is
- just using packages as build inputs.
+ In the Nix language the individual outputs can be reached explicitly as attributes, e.g. coreutils.info, but the typical case is just using packages as build inputs.
- When a multiple-output derivation gets into a build input of another
- derivation, the dev output is added if it exists,
- otherwise the first output is added. In addition to that,
- propagatedBuildOutputs of that package which by default
- contain $outputBin and $outputLib are
- also added. (See .)
+ When a multiple-output derivation gets into a build input of another derivation, the dev output is added if it exists, otherwise the first output is added. In addition to that, propagatedBuildOutputs of that package which by default contain $outputBin and $outputLib are also added. (See .)
- In some cases it may be desirable to combine different outputs under a
- single store path. A function symlinkJoin can be used to
- do this. (Note that it may negate some closure size benefits of using a
- multiple-output package.)
+ In some cases it may be desirable to combine different outputs under a single store path. A function symlinkJoin can be used to do this. (Note that it may negate some closure size benefits of using a multiple-output package.)
@@ -117,29 +79,18 @@
- In nixpkgs there is a framework supporting multiple-output derivations. It
- tries to cover most cases by default behavior. You can find the source
- separated in
- <nixpkgs/pkgs/build-support/setup-hooks/multiple-outputs.sh>;
- it's relatively well-readable. The whole machinery is triggered by defining
- the outputs attribute to contain the list of desired
- output names (strings).
+ In nixpkgs there is a framework supporting multiple-output derivations. It tries to cover most cases by default behavior. You can find the source separated in <nixpkgs/pkgs/build-support/setup-hooks/multiple-outputs.sh>; it's relatively well-readable. The whole machinery is triggered by defining the outputs attribute to contain the list of desired output names (strings).
outputs = [ "bin" "dev" "out" "doc" ];
- Often such a single line is enough. For each output an equally named
- environment variable is passed to the builder and contains the path in nix
- store for that output. Typically you also want to have the main
- out output, as it catches any files that didn't get
- elsewhere.
+ Often such a single line is enough. For each output an equally named environment variable is passed to the builder and contains the path in nix store for that output. Typically you also want to have the main out output, as it catches any files that didn't get elsewhere.
- There is a special handling of the debug output,
- described at .
+ There is a special handling of the debug output, described at .
@@ -147,36 +98,15 @@
Binaries first
- A commonly adopted convention in nixpkgs is that
- executables provided by the package are contained within its first output.
- This convention allows the dependent packages to reference the executables
- provided by packages in a uniform manner. For instance, provided with the
- knowledge that the perl package contains a
- perl executable it can be referenced as
- ${pkgs.perl}/bin/perl within a Nix derivation that needs
- to execute a Perl script.
+ A commonly adopted convention in nixpkgs is that executables provided by the package are contained within its first output. This convention allows the dependent packages to reference the executables provided by packages in a uniform manner. For instance, provided with the knowledge that the perl package contains a perl executable it can be referenced as ${pkgs.perl}/bin/perl within a Nix derivation that needs to execute a Perl script.
- The glibc package is a deliberate single exception to
- the binaries first convention. The glibc
- has libs as its first output allowing the libraries
- provided by glibc to be referenced directly (e.g.
- ${stdenv.glibc}/lib/ld-linux-x86-64.so.2). The
- executables provided by glibc can be accessed via its
- bin attribute (e.g.
- ${stdenv.glibc.bin}/bin/ldd).
+ The glibc package is a deliberate single exception to the binaries first convention. The glibc has libs as its first output allowing the libraries provided by glibc to be referenced directly (e.g. ${stdenv.glibc}/lib/ld-linux-x86-64.so.2). The executables provided by glibc can be accessed via its bin attribute (e.g. ${stdenv.glibc.bin}/bin/ldd).
- The reason for why glibc deviates from the convention is
- because referencing a library provided by glibc is a
- very common operation among Nix packages. For instance, third-party
- executables packaged by Nix are typically patched and relinked with the
- relevant version of glibc libraries from Nix packages
- (please see the documentation on
- patchelf for more
- details).
+ The reason for why glibc deviates from the convention is because referencing a library provided by glibc is a very common operation among Nix packages. For instance, third-party executables packaged by Nix are typically patched and relinked with the relevant version of glibc libraries from Nix packages (please see the documentation on patchelf for more details).
@@ -184,13 +114,7 @@
File type groups
- The support code currently recognizes some particular kinds of outputs and
- either instructs the build system of the package to put files into their
- desired outputs or it moves the files during the fixup phase. Each group of
- file types has an outputFoo variable specifying the
- output name where they should go. If that variable isn't defined by the
- derivation writer, it is guessed – a default output name is defined,
- falling back to other possibilities if the output isn't defined.
+ The support code currently recognizes some particular kinds of outputs and either instructs the build system of the package to put files into their desired outputs or it moves the files during the fixup phase. Each group of file types has an outputFoo variable specifying the output name where they should go. If that variable isn't defined by the derivation writer, it is guessed – a default output name is defined, falling back to other possibilities if the output isn't defined.
@@ -200,9 +124,7 @@
- is for development-only files. These include C(++) headers, pkg-config,
- cmake and aclocal files. They go to dev or
- out by default.
+ is for development-only files. These include C(++) headers, pkg-config, cmake and aclocal files. They go to dev or out by default.
@@ -212,8 +134,7 @@
- is meant for user-facing binaries, typically residing in bin/. They go
- to bin or out by default.
+ is meant for user-facing binaries, typically residing in bin/. They go to bin or out by default.
@@ -223,9 +144,7 @@
- is meant for libraries, typically residing in lib/
- and libexec/. They go to lib or
- out by default.
+ is meant for libraries, typically residing in lib/ and libexec/. They go to lib or out by default.
@@ -235,9 +154,7 @@
- is for user documentation, typically residing in
- share/doc/. It goes to doc or
- out by default.
+ is for user documentation, typically residing in share/doc/. It goes to doc or out by default.
@@ -247,10 +164,7 @@
- is for developer documentation. Currently we count
- gtk-doc and devhelp books in there. It goes to devdoc
- or is removed (!) by default. This is because e.g. gtk-doc tends to be
- rather large and completely unused by nixpkgs users.
+ is for developer documentation. Currently we count gtk-doc and devhelp books in there. It goes to devdoc or is removed (!) by default. This is because e.g. gtk-doc tends to be rather large and completely unused by nixpkgs users.
@@ -260,8 +174,7 @@
- is for man pages (except for section 3). They go to
- man or $outputBin by default.
+ is for man pages (except for section 3). They go to man or $outputBin by default.
@@ -271,8 +184,7 @@
- is for section 3 man pages. They go to devman or
- $outputMan by default.
+ is for section 3 man pages. They go to devman or $outputMan by default.
@@ -282,8 +194,7 @@
- is for info pages. They go to info or
- $outputBin by default.
+ is for info pages. They go to info or $outputBin by default.
@@ -296,31 +207,22 @@
- Some configure scripts don't like some of the parameters passed by
- default by the framework, e.g. --docdir=/foo/bar. You
- can disable this by setting setOutputFlags = false;.
+ Some configure scripts don't like some of the parameters passed by default by the framework, e.g. --docdir=/foo/bar. You can disable this by setting setOutputFlags = false;.
- The outputs of a single derivation can retain references to each other,
- but note that circular references are not allowed. (And each
- strongly-connected component would act as a single output anyway.)
+ The outputs of a single derivation can retain references to each other, but note that circular references are not allowed. (And each strongly-connected component would act as a single output anyway.)
- Most of split packages contain their core functionality in libraries.
- These libraries tend to refer to various kind of data that typically gets
- into out, e.g. locale strings, so there is often no
- advantage in separating the libraries into lib, as
- keeping them in out is easier.
+ Most of split packages contain their core functionality in libraries. These libraries tend to refer to various kind of data that typically gets into out, e.g. locale strings, so there is often no advantage in separating the libraries into lib, as keeping them in out is easier.
- Some packages have hidden assumptions on install paths, which complicates
- splitting.
+ Some packages have hidden assumptions on install paths, which complicates splitting.
diff --git a/doc/overlays.xml b/doc/overlays.xml
index bff2339ca933..26a888368abf 100644
--- a/doc/overlays.xml
+++ b/doc/overlays.xml
@@ -3,47 +3,32 @@
xml:id="chap-overlays">
Overlays
- This chapter describes how to extend and change Nixpkgs using overlays.
- Overlays are used to add layers in the fixed-point used by Nixpkgs to compose
- the set of all packages.
+ This chapter describes how to extend and change Nixpkgs using overlays. Overlays are used to add layers in the fixed-point used by Nixpkgs to compose the set of all packages.
- Nixpkgs can be configured with a list of overlays, which are applied in
- order. This means that the order of the overlays can be significant if
- multiple layers override the same package.
+ Nixpkgs can be configured with a list of overlays, which are applied in order. This means that the order of the overlays can be significant if multiple layers override the same package.
Installing overlays
- The list of overlays can be set either explicitly in a Nix expression, or
- through <nixpkgs-overlays> or user configuration
- files.
+ The list of overlays can be set either explicitly in a Nix expression, or through <nixpkgs-overlays> or user configuration files.
Set overlays in NixOS or Nix expressions
- On a NixOS system the value of the nixpkgs.overlays
- option, if present, is passed to the system Nixpkgs directly as an
- argument. Note that this does not affect the overlays for non-NixOS
- operations (e.g. nix-env), which are
- looked up independently.
+ On a NixOS system the value of the nixpkgs.overlays option, if present, is passed to the system Nixpkgs directly as an argument. Note that this does not affect the overlays for non-NixOS operations (e.g. nix-env), which are looked up independently.
- The list of overlays can be passed explicitly when importing nixpkgs, for
- example import <nixpkgs> { overlays = [ overlay1 overlay2 ];
- }.
+ The list of overlays can be passed explicitly when importing nixpkgs, for example import <nixpkgs> { overlays = [ overlay1 overlay2 ]; }.
- Further overlays can be added by calling the pkgs.extend
- or pkgs.appendOverlays, although it is often preferable
- to avoid these functions, because they recompute the Nixpkgs fixpoint,
- which is somewhat expensive to do.
+ Further overlays can be added by calling the pkgs.extend or pkgs.appendOverlays, although it is often preferable to avoid these functions, because they recompute the Nixpkgs fixpoint, which is somewhat expensive to do.
@@ -58,30 +43,20 @@
- First, if an
- overlays
- argument to the Nixpkgs function itself is given, then that is
- used and no path lookup will be performed.
+ First, if an overlays argument to the Nixpkgs function itself is given, then that is used and no path lookup will be performed.
- Otherwise, if the Nix path entry
- <nixpkgs-overlays> exists, we look for overlays at
- that path, as described below.
+ Otherwise, if the Nix path entry <nixpkgs-overlays> exists, we look for overlays at that path, as described below.
- See the section on NIX_PATH in the Nix manual for
- more details on how to set a value for
- <nixpkgs-overlays>.
+ See the section on NIX_PATH in the Nix manual for more details on how to set a value for <nixpkgs-overlays>.
- If one of ~/.config/nixpkgs/overlays.nix and
- ~/.config/nixpkgs/overlays/ exists, then we look
- for overlays at that path, as described below. It is an error if both
- exist.
+ If one of ~/.config/nixpkgs/overlays.nix and ~/.config/nixpkgs/overlays/ exists, then we look for overlays at that path, as described below. It is an error if both exist.
@@ -92,15 +67,12 @@
- If the path is a file, then the file is imported as a Nix expression and
- used as the list of overlays.
+ If the path is a file, then the file is imported as a Nix expression and used as the list of overlays.
- If the path is a directory, then we take the content of the directory,
- order it lexicographically, and attempt to interpret each as an overlay
- by:
+ If the path is a directory, then we take the content of the directory, order it lexicographically, and attempt to interpret each as an overlay by:
@@ -109,8 +81,7 @@
- Importing a top-level default.nix file, if it is
- a directory.
+ Importing a top-level default.nix file, if it is a directory.
@@ -120,12 +91,7 @@
- Because overlays that are set in NixOS configuration do not affect
- non-NixOS operations such as nix-env, the
- overlays.nix option provides a convenient way to use
- the same overlays for a NixOS system configuration and user configuration:
- the same file can be used as overlays.nix and imported
- as the value of nixpkgs.overlays.
+ Because overlays that are set in NixOS configuration do not affect non-NixOS operations such as nix-env, the overlays.nix option provides a convenient way to use the same overlays for a NixOS system configuration and user configuration: the same file can be used as overlays.nix and imported as the value of nixpkgs.overlays.
+
+import pkgs.path { overlays = [ (self: super: {
+ foo = super.foo.override { barSupport = true ; };
+ })]};
+
+
+mypkg = pkgs.callPackage ./mypkg.nix {
+ mydep = pkgs.mydep.override { ... };
+ }
+
+
+
+
+ In the first example, pkgs.foo is the result of a function call with some default arguments, usually a derivation. Using pkgs.foo.override will call the same function with the given new arguments.
+
+
+
+
+ <pkg>.overrideAttrs
+
+
+ The function overrideAttrs allows overriding the attribute set passed to a stdenv.mkDerivation call, producing a new derivation based on the original one. This function is available on all derivations produced by the stdenv.mkDerivation function, which is most packages in the nixpkgs expression pkgs.
+
+
+
+ Example usage:
+
+helloWithDebug = pkgs.hello.overrideAttrs (oldAttrs: rec {
+ separateDebugInfo = true;
+});
+
+
+
+
+ In the above example, the separateDebugInfo attribute is overridden to be true, thus building debug info for helloWithDebug, while all other attributes will be retained from the original hello package.
+
+
+
+ The argument oldAttrs is conventionally used to refer to the attr set originally passed to stdenv.mkDerivation.
+
+
+
+
+ Note that separateDebugInfo is processed only by the stdenv.mkDerivation function, not the generated, raw Nix derivation. Thus, using overrideDerivation will not work in this case, as it overrides only the attributes of the final derivation. It is for this reason that overrideAttrs should be preferred in (almost) all cases to overrideDerivation, i.e. to allow using stdenv.mkDerivation to process input arguments, as well as the fact that it is easier to use (you can use the same attribute names you see in your Nix code, instead of the ones generated (e.g. buildInputs vs nativeBuildInputs), and it involves less typing).
+
+
+
+
+
+ <pkg>.overrideDerivation
+
+
+
+ You should prefer overrideAttrs in almost all cases, see its documentation for the reasons why. overrideDerivation is not deprecated and will continue to work, but is less nice to use and does not have as many abilities as overrideAttrs.
+
+
+
+
+
+ Do not use this function in Nixpkgs as it evaluates a Derivation before modifying it, which breaks package abstraction and removes error-checking of function arguments. In addition, this evaluation-per-function application incurs a performance penalty, which can become a problem if many overrides are used. It is only intended for ad-hoc customisation, such as in ~/.config/nixpkgs/config.nix.
+
+
+
+
+ The function overrideDerivation creates a new derivation based on an existing one by overriding the original's attributes with the attribute set produced by the specified function. This function is available on all derivations defined using the makeOverridable function. Most standard derivation-producing functions, such as stdenv.mkDerivation, are defined using this function, which means most packages in the nixpkgs expression, pkgs, have this function.
+
+
+
+ Example usage:
+
+mySed = pkgs.gnused.overrideDerivation (oldAttrs: {
+ name = "sed-4.2.2-pre";
+ src = fetchurl {
+ url = ftp://alpha.gnu.org/gnu/sed/sed-4.2.2-pre.tar.bz2;
+ sha256 = "11nq06d131y4wmf3drm0yk502d2xc6n5qy82cg88rb9nqd2lj41k";
+ };
+ patches = [];
+});
+
+
+
+
+ In the above example, the name, src, and patches of the derivation will be overridden, while all other attributes will be retained from the original derivation.
+
+
+
+ The argument oldAttrs is used to refer to the attribute set of the original derivation.
+
+
+
+
+ A package's attributes are evaluated *before* being modified by the overrideDerivation function. For example, the name attribute reference in url = "mirror://gnu/hello/${name}.tar.gz"; is filled-in *before* the overrideDerivation function modifies the attribute set. This means that overriding the name attribute, in this example, *will not* change the value of the url attribute. Instead, we need to override both the name *and* url attributes.
+
+
+
+
+
+ lib.makeOverridable
+
+
+ The function lib.makeOverridable is used to make the result of a function easily customizable. This utility only makes sense for functions that accept an argument set and return an attribute set.
+
+
+
+ Example usage:
+
+f = { a, b }: { result = a+b; };
+c = lib.makeOverridable f { a = 1; b = 2; };
+
+
+
+
+ The variable c is the value of the f function applied with some default arguments. Hence the value of c.result is 3, in this example.
+
+
+
+ The variable c however also has some additional functions, like c.override which can be used to override the default arguments. In this example the value of (c.override { a = 4; }).result is 6.
+
+
+
diff --git a/doc/package-notes.xml b/doc/package-notes.xml
deleted file mode 100644
index d2c660e22a9b..000000000000
--- a/doc/package-notes.xml
+++ /dev/null
@@ -1,590 +0,0 @@
-
- Package Notes
-
- This chapter contains information about how to use and maintain the Nix
- expressions for a number of specific packages, such as the Linux kernel or
- X.org.
-
-
-
- Linux kernel
-
-
- The Nix expressions to build the Linux kernel are in
- pkgs/os-specific/linux/kernel.
-
-
-
- The function that builds the kernel has an argument
- kernelPatches which should be a list of {name,
- patch, extraConfig} attribute sets, where name
- is the name of the patch (which is included in the kernel’s
- meta.description attribute), patch is
- the patch itself (possibly compressed), and extraConfig
- (optional) is a string specifying extra options to be concatenated to the
- kernel configuration file (.config).
-
-
-
- The kernel derivation exports an attribute features
- specifying whether optional functionality is or isn’t enabled. This is
- used in NixOS to implement kernel-specific behaviour. For instance, if the
- kernel has the iwlwifi feature (i.e. has built-in support
- for Intel wireless chipsets), then NixOS doesn’t have to build the
- external iwlwifi package:
-
-modulesTree = [kernel]
- ++ pkgs.lib.optional (!kernel.features ? iwlwifi) kernelPackages.iwlwifi
- ++ ...;
-
-
-
-
- How to add a new (major) version of the Linux kernel to Nixpkgs:
-
-
-
- Copy the old Nix expression (e.g. linux-2.6.21.nix)
- to the new one (e.g. linux-2.6.22.nix) and update
- it.
-
-
-
-
- Add the new kernel to all-packages.nix (e.g., create
- an attribute kernel_2_6_22).
-
-
-
-
- Now we’re going to update the kernel configuration. First unpack the
- kernel. Then for each supported platform (i686,
- x86_64, uml) do the following:
-
-
-
- Make an copy from the old config (e.g.
- config-2.6.21-i686-smp) to the new one (e.g.
- config-2.6.22-i686-smp).
-
-
-
-
- Copy the config file for this platform (e.g.
- config-2.6.22-i686-smp) to
- .config in the kernel source tree.
-
-
-
-
- Run make oldconfig
- ARCH={i386,x86_64,um} and answer
- all questions. (For the uml configuration, also add
- SHELL=bash.) Make sure to keep the configuration
- consistent between platforms (i.e. don’t enable some feature on
- i686 and disable it on x86_64).
-
-
-
-
- If needed you can also run make menuconfig:
-
-$ nix-env -i ncurses
-$ export NIX_CFLAGS_LINK=-lncurses
-$ make menuconfig ARCH=arch
-
-
-
-
- Copy .config over the new config file (e.g.
- config-2.6.22-i686-smp).
-
-
-
-
-
-
-
- Test building the kernel: nix-build -A kernel_2_6_22.
- If it compiles, ship it! For extra credit, try booting NixOS with it.
-
-
-
-
- It may be that the new kernel requires updating the external kernel
- modules and kernel-dependent packages listed in the
- linuxPackagesFor function in
- all-packages.nix (such as the NVIDIA drivers, AUFS,
- etc.). If the updated packages aren’t backwards compatible with older
- kernels, you may need to keep the older versions around.
-
-
-
-
-
-
-
- X.org
-
-
- The Nix expressions for the X.org packages reside in
- pkgs/servers/x11/xorg/default.nix. This file is
- automatically generated from lists of tarballs in an X.org release. As such
- it should not be modified directly; rather, you should modify the lists, the
- generator script or the file
- pkgs/servers/x11/xorg/overrides.nix, in which you can
- override or add to the derivations produced by the generator.
-
-
-
- The generator is invoked as follows:
-
-$ cd pkgs/servers/x11/xorg
-$ cat tarballs-7.5.list extra.list old.list \
- | perl ./generate-expr-from-tarballs.pl
-
- For each of the tarballs in the .list files, the script
- downloads it, unpacks it, and searches its configure.ac
- and *.pc.in files for dependencies. This information is
- used to generate default.nix. The generator caches
- downloaded tarballs between runs. Pay close attention to the NOT
- FOUND: name messages at the end of the
- run, since they may indicate missing dependencies. (Some might be optional
- dependencies, however.)
-
-
-
- A file like tarballs-7.5.list contains all tarballs in
- a X.org release. It can be generated like this:
-
-$ export i="mirror://xorg/X11R7.4/src/everything/"
-$ cat $(PRINT_PATH=1 nix-prefetch-url $i | tail -n 1) \
- | perl -e 'while (<>) { if (/(href|HREF)="([^"]*.bz2)"/) { print "$ENV{'i'}$2\n"; }; }' \
- | sort > tarballs-7.4.list
-
- extra.list contains libraries that aren’t part of
- X.org proper, but are closely related to it, such as
- libxcb. old.list contains some
- packages that were removed from X.org, but are still needed by some people
- or by other packages (such as imake).
-
-
-
- If the expression for a package requires derivation attributes that the
- generator cannot figure out automatically (say, patches
- or a postInstall hook), you should modify
- pkgs/servers/x11/xorg/overrides.nix.
-
-
-
-
-
-
-
-
- Eclipse
-
-
- The Nix expressions related to the Eclipse platform and IDE are in
- pkgs/applications/editors/eclipse.
-
-
-
- Nixpkgs provides a number of packages that will install Eclipse in its
- various forms. These range from the bare-bones Eclipse Platform to the more
- fully featured Eclipse SDK or Scala-IDE packages and multiple version are
- often available. It is possible to list available Eclipse packages by
- issuing the command:
-
-$ nix-env -f '<nixpkgs>' -qaP -A eclipses --description
-
- Once an Eclipse variant is installed it can be run using the
- eclipse command, as expected. From within Eclipse it is
- then possible to install plugins in the usual manner by either manually
- specifying an Eclipse update site or by installing the Marketplace Client
- plugin and using it to discover and install other plugins. This installation
- method provides an Eclipse installation that closely resemble a manually
- installed Eclipse.
-
-
-
- If you prefer to install plugins in a more declarative manner then Nixpkgs
- also offer a number of Eclipse plugins that can be installed in an
- Eclipse environment. This type of environment is
- created using the function eclipseWithPlugins found
- inside the nixpkgs.eclipses attribute set. This function
- takes as argument { eclipse, plugins ? [], jvmArgs ? [] }
- where eclipse is a one of the Eclipse packages described
- above, plugins is a list of plugin derivations, and
- jvmArgs is a list of arguments given to the JVM running
- the Eclipse. For example, say you wish to install the latest Eclipse
- Platform with the popular Eclipse Color Theme plugin and also allow Eclipse
- to use more RAM. You could then add
-
-packageOverrides = pkgs: {
- myEclipse = with pkgs.eclipses; eclipseWithPlugins {
- eclipse = eclipse-platform;
- jvmArgs = [ "-Xmx2048m" ];
- plugins = [ plugins.color-theme ];
- };
-}
-
- to your Nixpkgs configuration
- (~/.config/nixpkgs/config.nix) and install it by
- running nix-env -f '<nixpkgs>' -iA myEclipse and
- afterward run Eclipse as usual. It is possible to find out which plugins are
- available for installation using eclipseWithPlugins by
- running
-
-$ nix-env -f '<nixpkgs>' -qaP -A eclipses.plugins --description
-
-
-
-
- If there is a need to install plugins that are not available in Nixpkgs then
- it may be possible to define these plugins outside Nixpkgs using the
- buildEclipseUpdateSite and
- buildEclipsePlugin functions found in the
- nixpkgs.eclipses.plugins attribute set. Use the
- buildEclipseUpdateSite function to install a plugin
- distributed as an Eclipse update site. This function takes { name,
- src } as argument where src indicates the
- Eclipse update site archive. All Eclipse features and plugins within the
- downloaded update site will be installed. When an update site archive is not
- available then the buildEclipsePlugin function can be
- used to install a plugin that consists of a pair of feature and plugin JARs.
- This function takes an argument { name, srcFeature, srcPlugin
- } where srcFeature and
- srcPlugin are the feature and plugin JARs, respectively.
-
-
-
- Expanding the previous example with two plugins using the above functions we
- have
-
-packageOverrides = pkgs: {
- myEclipse = with pkgs.eclipses; eclipseWithPlugins {
- eclipse = eclipse-platform;
- jvmArgs = [ "-Xmx2048m" ];
- plugins = [
- plugins.color-theme
- (plugins.buildEclipsePlugin {
- name = "myplugin1-1.0";
- srcFeature = fetchurl {
- url = "http://…/features/myplugin1.jar";
- sha256 = "123…";
- };
- srcPlugin = fetchurl {
- url = "http://…/plugins/myplugin1.jar";
- sha256 = "123…";
- };
- });
- (plugins.buildEclipseUpdateSite {
- name = "myplugin2-1.0";
- src = fetchurl {
- stripRoot = false;
- url = "http://…/myplugin2.zip";
- sha256 = "123…";
- };
- });
- ];
- };
-}
-
-
-
-
- Elm
-
-
- To start a development environment do nix-shell -p elmPackages.elm elmPackages.elm-format
-
-
-
- To update Elm compiler, see
- nixpkgs/pkgs/development/compilers/elm/README.md.
-
-
-
- To package Elm applications,
- read about
- elm2nix.
-
-
-
- Kakoune
-
-
- Kakoune can be built to autoload plugins:
-(kakoune.override {
- configure = {
- plugins = with pkgs.kakounePlugins; [ parinfer-rust ];
- };
-})
-
-
-
- Interactive shell helpers
-
-
- Some packages provide the shell integration to be more useful. But unlike
- other systems, nix doesn't have a standard share directory location. This is
- why a bunch PACKAGE-share scripts are shipped that print
- the location of the corresponding shared folder. Current list of such
- packages is as following:
-
-
-
- autojump: autojump-share
-
-
-
-
- fzf: fzf-share
-
-
-
- E.g. autojump can then used in the .bashrc like this:
-
- source "$(autojump-share)/autojump.bash"
-
-
-
-
- Weechat
-
-
- Weechat can be configured to include your choice of plugins, reducing its
- closure size from the default configuration which includes all available
- plugins. To make use of this functionality, install an expression that
- overrides its configuration such as
-weechat.override {configure = {availablePlugins, ...}: {
- plugins = with availablePlugins; [ python perl ];
- }
-}
- If the configure function returns an attrset without the
- plugins attribute, availablePlugins
- will be used automatically.
-
-
-
- The plugins currently available are python,
- perl, ruby, guile,
- tcl and lua.
-
-
-
- The python and perl plugins allows the addition of extra libraries. For
- instance, the inotify.py script in weechat-scripts
- requires D-Bus or libnotify, and the fish.py script
- requires pycrypto. To use these scripts, use the plugin's
- withPackages attribute:
-weechat.override { configure = {availablePlugins, ...}: {
- plugins = with availablePlugins; [
- (python.withPackages (ps: with ps; [ pycrypto python-dbus ]))
- ];
- };
-}
-
-
-
-
- In order to also keep all default plugins installed, it is possible to use
- the following method:
-weechat.override { configure = { availablePlugins, ... }: {
- plugins = builtins.attrValues (availablePlugins // {
- python = availablePlugins.python.withPackages (ps: with ps; [ pycrypto python-dbus ]);
- });
-}; }
-
-
-
-
- WeeChat allows to set defaults on startup using the
- --run-command. The configure method
- can be used to pass commands to the program:
-weechat.override {
- configure = { availablePlugins, ... }: {
- init = ''
- /set foo bar
- /server add freenode chat.freenode.org
- '';
- };
-}
- Further values can be added to the list of commands when running
- weechat --run-command "your-commands".
-
-
-
- Additionally it's possible to specify scripts to be loaded when starting
- weechat. These will be loaded before the commands from
- init:
-weechat.override {
- configure = { availablePlugins, ... }: {
- scripts = with pkgs.weechatScripts; [
- weechat-xmpp weechat-matrix-bridge wee-slack
- ];
- init = ''
- /set plugins.var.python.jabber.key "val"
- '':
- };
-}
-
-
-
- In nixpkgs there's a subpackage which contains
- derivations for WeeChat scripts. Such derivations expect a
- passthru.scripts attribute which contains a list of all
- scripts inside the store path. Furthermore all scripts have to live in
- $out/share. An exemplary derivation looks like this:
-{ stdenv, fetchurl }:
-
-stdenv.mkDerivation {
- name = "exemplary-weechat-script";
- src = fetchurl {
- url = "https://scripts.tld/your-scripts.tar.gz";
- sha256 = "...";
- };
- passthru.scripts = [ "foo.py" "bar.lua" ];
- installPhase = ''
- mkdir $out/share
- cp foo.py $out/share
- cp bar.lua $out/share
- '';
-}
-
-
-
- ibus-engines.typing-booster
-
-
- This package is an ibus-based completion method to speed up typing.
-
-
-
- Activating the engine
-
-
- IBus needs to be configured accordingly to activate
- typing-booster. The configuration depends on the desktop
- manager in use. For detailed instructions, please refer to the
- upstream
- docs.
-
-
-
- On NixOS you need to explicitly enable ibus with given
- engines before customizing your desktop to use
- typing-booster. This can be achieved using the
- ibus module:
-{ pkgs, ... }: {
- i18n.inputMethod = {
- enabled = "ibus";
- ibus.engines = with pkgs.ibus-engines; [ typing-booster ];
- };
-}
-
-
-
-
- Using custom hunspell dictionaries
-
-
- The IBus engine is based on hunspell to support
- completion in many languages. By default the dictionaries
- de-de, en-us, fr-moderne
- es-es, it-it,
- sv-se and sv-fi are in use. To add
- another dictionary, the package can be overridden like this:
-ibus-engines.typing-booster.override {
- langs = [ "de-at" "en-gb" ];
-}
-
-
-
- Note: each language passed to langs must be an
- attribute name in pkgs.hunspellDicts.
-
-
-
-
- Built-in emoji picker
-
-
- The ibus-engines.typing-booster package contains a
- program named emoji-picker. To display all emojis
- correctly, a special font such as noto-fonts-emoji is
- needed:
-
-
-
- On NixOS it can be installed using the following expression:
-{ pkgs, ... }: {
- fonts.fonts = with pkgs; [ noto-fonts-emoji ];
-}
-
-
-
-
- Nginx
-
-
- Nginx is a
- reverse proxy and lightweight webserver.
-
-
-
- ETags on static files served from the Nix store
-
-
- HTTP has a couple different mechanisms for caching to prevent
- clients from having to download the same content repeatedly
- if a resource has not changed since the last time it was requested.
- When nginx is used as a server for static files, it implements
- the caching mechanism based on the
- Last-Modified
- response header automatically; unfortunately, it works by using
- filesystem timestamps to determine the value of the
- Last-Modified header. This doesn't give the
- desired behavior when the file is in the Nix store, because all
- file timestamps are set to 0 (for reasons related to build
- reproducibility).
-
-
-
- Fortunately, HTTP supports an alternative (and more effective)
- caching mechanism: the
- ETag
- response header. The value of the ETag header
- specifies some identifier for the particular content that the
- server is sending (e.g. a hash). When a client makes a second
- request for the same resource, it sends that value back in an
- If-None-Match header. If the ETag value is
- unchanged, then the server does not need to resend the content.
-
-
-
- As of NixOS 19.09, the nginx package in Nixpkgs is patched such
- that when nginx serves a file out of /nix/store,
- the hash in the store path is used as the ETag
- header in the HTTP response, thus providing proper caching functionality.
- This happens automatically; you do not need to do modify any
- configuration to get this behavior.
-
-
-
-
diff --git a/doc/package-specific-user-notes.xml b/doc/package-specific-user-notes.xml
deleted file mode 100644
index 196c760251f0..000000000000
--- a/doc/package-specific-user-notes.xml
+++ /dev/null
@@ -1,482 +0,0 @@
-
- Package-specific usage notes
-
- These chapters includes some notes
- that apply to specific packages and should
- answer some of the frequently asked questions
- related to Nixpkgs use.
-
- Some useful information related to package use
- can be found in package-specific development notes.
-
-
-
- OpenGL
-
-
- Packages that use OpenGL have NixOS desktop as their primary target. The
- current solution for loading the GPU-specific drivers is based on
- libglvnd and looks for the driver implementation in
- LD_LIBRARY_PATH. If you are using a non-NixOS
- GNU/Linux/X11 desktop with free software video drivers, consider launching
- OpenGL-dependent programs from Nixpkgs with Nixpkgs versions of
- libglvnd and mesa_drivers in
- LD_LIBRARY_PATH. For proprietary video drivers you might
- have luck with also adding the corresponding video driver package.
-
-
-
- Locales
-
-
- To allow simultaneous use of packages linked against different versions of
- glibc with different locale archive formats Nixpkgs
- patches glibc to rely on
- LOCALE_ARCHIVE environment variable.
-
-
-
- On non-NixOS distributions this variable is obviously not set. This can
- cause regressions in language support or even crashes in some
- Nixpkgs-provided programs. The simplest way to mitigate this problem is
- exporting the LOCALE_ARCHIVE variable pointing to
- ${glibcLocales}/lib/locale/locale-archive. The drawback
- (and the reason this is not the default) is the relatively large (a hundred
- MiB) size of the full set of locales. It is possible to build a custom set
- of locales by overriding parameters allLocales and
- locales of the package.
-
-
-
-
- Emacs
-
-
- Configuring Emacs
-
-
- The Emacs package comes with some extra helpers to make it easier to
- configure. emacsWithPackages allows you to manage
- packages from ELPA. This means that you will not have to install that
- packages from within Emacs. For instance, if you wanted to use
- company, counsel,
- flycheck, ivy,
- magit, projectile, and
- use-package you could use this as a
- ~/.config/nixpkgs/config.nix override:
-
-
-
-{
- packageOverrides = pkgs: with pkgs; {
- myEmacs = emacsWithPackages (epkgs: (with epkgs.melpaStablePackages; [
- company
- counsel
- flycheck
- ivy
- magit
- projectile
- use-package
- ]));
- }
-}
-
-
-
- You can install it like any other packages via nix-env -iA
- myEmacs. However, this will only install those packages. It will
- not configure them for us. To do this, we need to
- provide a configuration file. Luckily, it is possible to do this from
- within Nix! By modifying the above example, we can make Emacs load a custom
- config file. The key is to create a package that provide a
- default.el file in
- /share/emacs/site-start/. Emacs knows to load this
- file automatically when it starts.
-
-
-
-{
- packageOverrides = pkgs: with pkgs; rec {
- myEmacsConfig = writeText "default.el" ''
-;; initialize package
-
-(require 'package)
-(package-initialize 'noactivate)
-(eval-when-compile
- (require 'use-package))
-
-;; load some packages
-
-(use-package company
- :bind ("<C-tab>" . company-complete)
- :diminish company-mode
- :commands (company-mode global-company-mode)
- :defer 1
- :config
- (global-company-mode))
-
-(use-package counsel
- :commands (counsel-descbinds)
- :bind (([remap execute-extended-command] . counsel-M-x)
- ("C-x C-f" . counsel-find-file)
- ("C-c g" . counsel-git)
- ("C-c j" . counsel-git-grep)
- ("C-c k" . counsel-ag)
- ("C-x l" . counsel-locate)
- ("M-y" . counsel-yank-pop)))
-
-(use-package flycheck
- :defer 2
- :config (global-flycheck-mode))
-
-(use-package ivy
- :defer 1
- :bind (("C-c C-r" . ivy-resume)
- ("C-x C-b" . ivy-switch-buffer)
- :map ivy-minibuffer-map
- ("C-j" . ivy-call))
- :diminish ivy-mode
- :commands ivy-mode
- :config
- (ivy-mode 1))
-
-(use-package magit
- :defer
- :if (executable-find "git")
- :bind (("C-x g" . magit-status)
- ("C-x G" . magit-dispatch-popup))
- :init
- (setq magit-completing-read-function 'ivy-completing-read))
-
-(use-package projectile
- :commands projectile-mode
- :bind-keymap ("C-c p" . projectile-command-map)
- :defer 5
- :config
- (projectile-global-mode))
- '';
- myEmacs = emacsWithPackages (epkgs: (with epkgs.melpaStablePackages; [
- (runCommand "default.el" {} ''
-mkdir -p $out/share/emacs/site-lisp
-cp ${myEmacsConfig} $out/share/emacs/site-lisp/default.el
-'')
- company
- counsel
- flycheck
- ivy
- magit
- projectile
- use-package
- ]));
- };
-}
-
-
-
- This provides a fairly full Emacs start file. It will load in addition to
- the user's presonal config. You can always disable it by passing
- -q to the Emacs command.
-
-
-
- Sometimes emacsWithPackages 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 this priorities when some package is installed as a
- dependency. You can override it on 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'.
-
-
-
-overrides = self: super: rec {
- haskell-mode = self.melpaPackages.haskell-mode;
- ...
-};
-((emacsPackagesNgGen emacs).overrideScope' overrides).emacsWithPackages (p: with p; [
- # here both these package will use haskell-mode of our own choice
- ghc-mod
- dante
-])
-
-
-
-
-
- DLib
-
-
- DLib is a modern, C++-based toolkit which
- provides several machine learning algorithms.
-
-
-
- Compiling without AVX support
-
-
- Especially older CPUs don't support
- AVX
- (Advanced Vector Extensions) instructions that are used by DLib to
- optimize their algorithms.
-
-
-
- On the affected hardware errors like Illegal instruction will occur.
- In those cases AVX support needs to be disabled:
-self: super: {
- dlib = super.dlib.override { avxSupport = false; };
-}
-
-
-
-
-
- Unfree software
-
-
- All users of Nixpkgs are free software users, and many users (and
- developers) of Nixpkgs want to limit and tightly control their exposure to
- unfree software. At the same time, many users need (or want)
- to run some specific
- pieces of proprietary software. Nixpkgs includes some expressions for unfree
- software packages. By default unfree software cannot be installed and
- doesn’t show up in searches. To allow installing unfree software in a
- single Nix invocation one can export
- NIXPKGS_ALLOW_UNFREE=1. For a persistent solution, users
- can set allowUnfree in the Nixpkgs configuration.
-
-
-
- Fine-grained control is possible by defining
- allowUnfreePredicate function in config; it takes the
- mkDerivation parameter attrset and returns
- true for unfree packages that should be allowed.
-
-
-
-
- Steam
-
-
- Steam in Nix
-
-
- Steam is distributed as a .deb file, for now only as
- an i686 package (the amd64 package only has documentation). When unpacked,
- it has a script called steam that in Ubuntu (their
- target distro) would go to /usr/bin . When run for the
- first time, this script copies some files to the user's home, which include
- another script that is the ultimate responsible for launching the steam
- binary, which is also in $HOME.
-
-
-
- Nix problems and constraints:
-
-
-
- We don't have /bin/bash and many scripts point
- there. Similarly for /usr/bin/python .
-
-
-
-
- We don't have the dynamic loader in /lib .
-
-
-
-
- The steam.sh script in $HOME can not be patched, as
- it is checked and rewritten by steam.
-
-
-
-
- The steam binary cannot be patched, it's also checked.
-
-
-
-
-
-
- The current approach to deploy Steam in NixOS is composing a FHS-compatible
- chroot environment, as documented
- here.
- This allows us to have binaries in the expected paths without disrupting
- the system, and to avoid patching them to work in a non FHS environment.
-
-
-
-
- How to play
-
-
- For 64-bit systems it's important to have
-hardware.opengl.driSupport32Bit = true;
- in your /etc/nixos/configuration.nix. You'll also need
-hardware.pulseaudio.support32Bit = true;
- if you are using PulseAudio - this will enable 32bit ALSA apps integration.
- To use the Steam controller or other Steam supported controllers such as
- the DualShock 4 or Nintendo Switch Pro, you need to add
-hardware.steam-hardware.enable = true;
- to your configuration.
-
-
-
-
- Troubleshooting
-
-
-
-
-
- Steam fails to start. What do I do?
-
-
-
- Try to run
-strace steam
- to see what is causing steam to fail.
-
-
-
-
-
- Using the FOSS Radeon or nouveau (nvidia) drivers
-
-
-
-
-
- The newStdcpp parameter was removed since NixOS
- 17.09 and should not be needed anymore.
-
-
-
-
- Steam ships statically linked with a version of libcrypto that
- conflics with the one dynamically loaded by radeonsi_dri.so. If you
- get the error
-steam.sh: line 713: 7842 Segmentation fault (core dumped)
- have a look at
- this
- pull request.
-
-
-
-
-
-
-
- Java
-
-
-
-
-
- There is no java in steam chrootenv by default. If you get a message
- like
-/home/foo/.local/share/Steam/SteamApps/common/towns/towns.sh: line 1: java: command not found
- You need to add
- steam.override { withJava = true; };
- to your configuration.
-
-
-
-
-
-
-
-
-
-
- steam-run
-
-
- The FHS-compatible chroot used for steam can also be used to run other
- linux games that expect a FHS environment. To do it, add
-pkgs.(steam.override {
- nativeOnly = true;
- newStdcpp = true;
- }).run
- to your configuration, rebuild, and run the game with
-steam-run ./foo
-
-
-
-
-
- Citrix Receiver & Citrix Workspace App
-
-
-
-
- Please note that the citrix_receiver package has been deprecated since its
- development was discontinued by upstream
- and will be replaced by the citrix workspace app.
-
-
- Citrix Receiver and
- Citrix Workspace App
- are a remote desktop viewers which provide access to
- XenDesktop
- installations.
-
-
-
- Basic usage
-
-
- The tarball archive needs to be downloaded manually as the license
- agreements of the vendor for
- Citrix Receiver
- or Citrix Workspace
- need to be accepted first.
- Then run nix-prefetch-url file://$PWD/linuxx64-$version.tar.gz.
- With the archive available
- in the store the package can be built and installed with Nix.
-
-
-
- Caution with nix-shell installs
-
- It's recommended to install Citrix Receiver
- and/or Citrix Workspace using
- nix-env -i or globally to
- ensure that the .desktop files are installed properly
- into $XDG_CONFIG_DIRS. Otherwise it won't be possible to
- open .ica files automatically from the browser to start
- a Citrix connection.
-
-
-
-
-
- Custom certificates
-
-
- The Citrix Receiver and Citrix Workspace App
- in nixpkgs trust several certificates
- from the
- Mozilla database by default. However several companies using Citrix
- might require their own corporate certificate. On distros with imperative
- packaging these certs can be stored easily in
- $ICAROOT,
- however this directory is a store path in nixpkgs. In
- order to work around this issue the package provides a simple mechanism to
- add custom certificates without rebuilding the entire package using
- symlinkJoin:
-
- { config.allowUnfree = true; };
-let extraCerts = [ ./custom-cert-1.pem ./custom-cert-2.pem /* ... */ ]; in
-citrix_workspace.override { # the same applies for `citrix_receiver` if used.
- inherit extraCerts;
-}]]>
-
-
-
-
-
diff --git a/doc/packages/citrix.xml b/doc/packages/citrix.xml
new file mode 100644
index 000000000000..bc685f97932d
--- /dev/null
+++ b/doc/packages/citrix.xml
@@ -0,0 +1,44 @@
+
+ Citrix Workspace
+
+
+
+
+ Please note that the citrix_receiver package has been deprecated since its development was discontinued by upstream and has been replaced by the citrix workspace app.
+
+
+ Citrix Receiver and Citrix Workspace App are a remote desktop viewers which provide access to XenDesktop installations.
+
+
+
+ Basic usage
+
+
+ The tarball archive needs to be downloaded manually as the license agreements of the vendor for Citrix Receiver or Citrix Workspace need to be accepted first. Then run nix-prefetch-url file://$PWD/linuxx64-$version.tar.gz. With the archive available in the store the package can be built and installed with Nix.
+
+
+
+ Caution with nix-shell installs
+
+ It's recommended to install Citrix Receiver and/or Citrix Workspace using nix-env -i or globally to ensure that the .desktop files are installed properly into $XDG_CONFIG_DIRS. Otherwise it won't be possible to open .ica files automatically from the browser to start a Citrix connection.
+
+
+
+
+
+ Custom certificates
+
+
+ The Citrix Workspace App in nixpkgs trust several certificates from the Mozilla database by default. However several companies using Citrix might require their own corporate certificate. On distros with imperative packaging these certs can be stored easily in $ICAROOT, however this directory is a store path in nixpkgs. In order to work around this issue the package provides a simple mechanism to add custom certificates without rebuilding the entire package using symlinkJoin:
+
+ { config.allowUnfree = true; };
+let extraCerts = [ ./custom-cert-1.pem ./custom-cert-2.pem /* ... */ ]; in
+citrix_workspace.override {
+ inherit extraCerts;
+}]]>
+
+
+
+
\ No newline at end of file
diff --git a/doc/packages/dlib.xml b/doc/packages/dlib.xml
new file mode 100644
index 000000000000..98c211cf9df7
--- /dev/null
+++ b/doc/packages/dlib.xml
@@ -0,0 +1,24 @@
+
+ DLib
+
+
+ DLib is a modern, C++-based toolkit which provides several machine learning algorithms.
+
+
+
+ Compiling without AVX support
+
+
+ Especially older CPUs don't support AVX (Advanced Vector Extensions) instructions that are used by DLib to optimize their algorithms.
+
+
+
+ On the affected hardware errors like Illegal instruction will occur. In those cases AVX support needs to be disabled:
+self: super: {
+ dlib = super.dlib.override { avxSupport = false; };
+}
+
+
+
\ No newline at end of file
diff --git a/doc/packages/eclipse.xml b/doc/packages/eclipse.xml
new file mode 100644
index 000000000000..968c58d3b5bb
--- /dev/null
+++ b/doc/packages/eclipse.xml
@@ -0,0 +1,72 @@
+
+ Eclipse
+
+
+ The Nix expressions related to the Eclipse platform and IDE are in pkgs/applications/editors/eclipse.
+
+
+
+ Nixpkgs provides a number of packages that will install Eclipse in its various forms. These range from the bare-bones Eclipse Platform to the more fully featured Eclipse SDK or Scala-IDE packages and multiple version are often available. It is possible to list available Eclipse packages by issuing the command:
+
+$ nix-env -f '<nixpkgs>' -qaP -A eclipses --description
+
+ Once an Eclipse variant is installed it can be run using the eclipse command, as expected. From within Eclipse it is then possible to install plugins in the usual manner by either manually specifying an Eclipse update site or by installing the Marketplace Client plugin and using it to discover and install other plugins. This installation method provides an Eclipse installation that closely resemble a manually installed Eclipse.
+
+
+
+ If you prefer to install plugins in a more declarative manner then Nixpkgs also offer a number of Eclipse plugins that can be installed in an Eclipse environment. This type of environment is created using the function eclipseWithPlugins found inside the nixpkgs.eclipses attribute set. This function takes as argument { eclipse, plugins ? [], jvmArgs ? [] } where eclipse is a one of the Eclipse packages described above, plugins is a list of plugin derivations, and jvmArgs is a list of arguments given to the JVM running the Eclipse. For example, say you wish to install the latest Eclipse Platform with the popular Eclipse Color Theme plugin and also allow Eclipse to use more RAM. You could then add
+
+packageOverrides = pkgs: {
+ myEclipse = with pkgs.eclipses; eclipseWithPlugins {
+ eclipse = eclipse-platform;
+ jvmArgs = [ "-Xmx2048m" ];
+ plugins = [ plugins.color-theme ];
+ };
+}
+
+ to your Nixpkgs configuration (~/.config/nixpkgs/config.nix) and install it by running nix-env -f '<nixpkgs>' -iA myEclipse and afterward run Eclipse as usual. It is possible to find out which plugins are available for installation using eclipseWithPlugins by running
+
+$ nix-env -f '<nixpkgs>' -qaP -A eclipses.plugins --description
+
+
+
+
+ If there is a need to install plugins that are not available in Nixpkgs then it may be possible to define these plugins outside Nixpkgs using the buildEclipseUpdateSite and buildEclipsePlugin functions found in the nixpkgs.eclipses.plugins attribute set. Use the buildEclipseUpdateSite function to install a plugin distributed as an Eclipse update site. This function takes { name, src } as argument where src indicates the Eclipse update site archive. All Eclipse features and plugins within the downloaded update site will be installed. When an update site archive is not available then the buildEclipsePlugin function can be used to install a plugin that consists of a pair of feature and plugin JARs. This function takes an argument { name, srcFeature, srcPlugin } where srcFeature and srcPlugin are the feature and plugin JARs, respectively.
+
+
+
+ Expanding the previous example with two plugins using the above functions we have
+
+packageOverrides = pkgs: {
+ myEclipse = with pkgs.eclipses; eclipseWithPlugins {
+ eclipse = eclipse-platform;
+ jvmArgs = [ "-Xmx2048m" ];
+ plugins = [
+ plugins.color-theme
+ (plugins.buildEclipsePlugin {
+ name = "myplugin1-1.0";
+ srcFeature = fetchurl {
+ url = "http://…/features/myplugin1.jar";
+ sha256 = "123…";
+ };
+ srcPlugin = fetchurl {
+ url = "http://…/plugins/myplugin1.jar";
+ sha256 = "123…";
+ };
+ });
+ (plugins.buildEclipseUpdateSite {
+ name = "myplugin2-1.0";
+ src = fetchurl {
+ stripRoot = false;
+ url = "http://…/myplugin2.zip";
+ sha256 = "123…";
+ };
+ });
+ ];
+ };
+}
+
+
+
\ No newline at end of file
diff --git a/doc/packages/elm.xml b/doc/packages/elm.xml
new file mode 100644
index 000000000000..8ee052852654
--- /dev/null
+++ b/doc/packages/elm.xml
@@ -0,0 +1,17 @@
+
+ Elm
+
+
+ To start a development environment do nix-shell -p elmPackages.elm elmPackages.elm-format
+
+
+
+ To update Elm compiler, see nixpkgs/pkgs/development/compilers/elm/README.md.
+
+
+
+ To package Elm applications, read about elm2nix.
+
+
\ No newline at end of file
diff --git a/doc/packages/emacs.xml b/doc/packages/emacs.xml
new file mode 100644
index 000000000000..a9a26882c9cd
--- /dev/null
+++ b/doc/packages/emacs.xml
@@ -0,0 +1,131 @@
+
+ Emacs
+
+
+ Configuring Emacs
+
+
+ The Emacs package comes with some extra helpers to make it easier to configure. emacsWithPackages allows you to manage packages from ELPA. This means that you will not have to install that packages from within Emacs. For instance, if you wanted to use company, counsel, flycheck, ivy, magit, projectile, and use-package you could use this as a ~/.config/nixpkgs/config.nix override:
+
+
+
+{
+ packageOverrides = pkgs: with pkgs; {
+ myEmacs = emacsWithPackages (epkgs: (with epkgs.melpaStablePackages; [
+ company
+ counsel
+ flycheck
+ ivy
+ magit
+ projectile
+ use-package
+ ]));
+ }
+}
+
+
+
+ You can install it like any other packages via nix-env -iA myEmacs. However, this will only install those packages. It will not configure them for us. To do this, we need to provide a configuration file. Luckily, it is possible to do this from within Nix! By modifying the above example, we can make Emacs load a custom config file. The key is to create a package that provide a default.el file in /share/emacs/site-start/. Emacs knows to load this file automatically when it starts.
+
+
+
+{
+ packageOverrides = pkgs: with pkgs; rec {
+ myEmacsConfig = writeText "default.el" ''
+;; initialize package
+
+(require 'package)
+(package-initialize 'noactivate)
+(eval-when-compile
+ (require 'use-package))
+
+;; load some packages
+
+(use-package company
+ :bind ("<C-tab>" . company-complete)
+ :diminish company-mode
+ :commands (company-mode global-company-mode)
+ :defer 1
+ :config
+ (global-company-mode))
+
+(use-package counsel
+ :commands (counsel-descbinds)
+ :bind (([remap execute-extended-command] . counsel-M-x)
+ ("C-x C-f" . counsel-find-file)
+ ("C-c g" . counsel-git)
+ ("C-c j" . counsel-git-grep)
+ ("C-c k" . counsel-ag)
+ ("C-x l" . counsel-locate)
+ ("M-y" . counsel-yank-pop)))
+
+(use-package flycheck
+ :defer 2
+ :config (global-flycheck-mode))
+
+(use-package ivy
+ :defer 1
+ :bind (("C-c C-r" . ivy-resume)
+ ("C-x C-b" . ivy-switch-buffer)
+ :map ivy-minibuffer-map
+ ("C-j" . ivy-call))
+ :diminish ivy-mode
+ :commands ivy-mode
+ :config
+ (ivy-mode 1))
+
+(use-package magit
+ :defer
+ :if (executable-find "git")
+ :bind (("C-x g" . magit-status)
+ ("C-x G" . magit-dispatch-popup))
+ :init
+ (setq magit-completing-read-function 'ivy-completing-read))
+
+(use-package projectile
+ :commands projectile-mode
+ :bind-keymap ("C-c p" . projectile-command-map)
+ :defer 5
+ :config
+ (projectile-global-mode))
+ '';
+ myEmacs = emacsWithPackages (epkgs: (with epkgs.melpaStablePackages; [
+ (runCommand "default.el" {} ''
+mkdir -p $out/share/emacs/site-lisp
+cp ${myEmacsConfig} $out/share/emacs/site-lisp/default.el
+'')
+ company
+ counsel
+ flycheck
+ ivy
+ magit
+ projectile
+ use-package
+ ]));
+ };
+}
+
+
+
+ This provides a fairly full Emacs start file. It will load in addition to the user's presonal config. You can always disable it by passing -q to the Emacs command.
+
+
+
+ Sometimes emacsWithPackages 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 this priorities when some package is installed as a dependency. You can override it on 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'.
+
+
+
+overrides = self: super: rec {
+ haskell-mode = self.melpaPackages.haskell-mode;
+ ...
+};
+((emacsPackagesGen emacs).overrideScope' overrides).emacsWithPackages (p: with p; [
+ # here both these package will use haskell-mode of our own choice
+ ghc-mod
+ dante
+])
+
+
+
\ No newline at end of file
diff --git a/doc/packages/ibus.xml b/doc/packages/ibus.xml
new file mode 100644
index 000000000000..561d4d2eabdc
--- /dev/null
+++ b/doc/packages/ibus.xml
@@ -0,0 +1,57 @@
+
+ ibus-engines.typing-booster
+
+
+ This package is an ibus-based completion method to speed up typing.
+
+
+
+ Activating the engine
+
+
+ IBus needs to be configured accordingly to activate typing-booster. The configuration depends on the desktop manager in use. For detailed instructions, please refer to the upstream docs.
+
+
+
+ On NixOS you need to explicitly enable ibus with given engines before customizing your desktop to use typing-booster. This can be achieved using the ibus module:
+{ pkgs, ... }: {
+ i18n.inputMethod = {
+ enabled = "ibus";
+ ibus.engines = with pkgs.ibus-engines; [ typing-booster ];
+ };
+}
+
+
+
+
+ Using custom hunspell dictionaries
+
+
+ The IBus engine is based on hunspell to support completion in many languages. By default the dictionaries de-de, en-us, fr-modernees-es, it-it, sv-se and sv-fi are in use. To add another dictionary, the package can be overridden like this:
+ibus-engines.typing-booster.override {
+ langs = [ "de-at" "en-gb" ];
+}
+
+
+
+ Note: each language passed to langs must be an attribute name in pkgs.hunspellDicts.
+
+
+
+
+ Built-in emoji picker
+
+
+ The ibus-engines.typing-booster package contains a program named emoji-picker. To display all emojis correctly, a special font such as noto-fonts-emoji is needed:
+
+
+
+ On NixOS it can be installed using the following expression:
+{ pkgs, ... }: {
+ fonts.fonts = with pkgs; [ noto-fonts-emoji ];
+}
+
+
+
\ No newline at end of file
diff --git a/doc/packages/index.xml b/doc/packages/index.xml
new file mode 100644
index 000000000000..9f3f58a8d903
--- /dev/null
+++ b/doc/packages/index.xml
@@ -0,0 +1,23 @@
+
+ Packages
+
+ This chapter contains information about how to use and maintain the Nix expressions for a number of specific packages, such as the Linux kernel or X.org.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/doc/packages/kakoune.xml b/doc/packages/kakoune.xml
new file mode 100644
index 000000000000..fd40dad7ca87
--- /dev/null
+++ b/doc/packages/kakoune.xml
@@ -0,0 +1,14 @@
+
+ Kakoune
+
+
+ Kakoune can be built to autoload plugins:
+(kakoune.override {
+ configure = {
+ plugins = with pkgs.kakounePlugins; [ parinfer-rust ];
+ };
+})
+
+
\ No newline at end of file
diff --git a/doc/packages/linux.xml b/doc/packages/linux.xml
new file mode 100644
index 000000000000..3adfacb6e457
--- /dev/null
+++ b/doc/packages/linux.xml
@@ -0,0 +1,85 @@
+
+ Linux kernel
+
+
+ The Nix expressions to build the Linux kernel are in pkgs/os-specific/linux/kernel.
+
+
+
+ The function that builds the kernel has an argument kernelPatches which should be a list of {name, patch, extraConfig} attribute sets, where name is the name of the patch (which is included in the kernel’s meta.description attribute), patch is the patch itself (possibly compressed), and extraConfig (optional) is a string specifying extra options to be concatenated to the kernel configuration file (.config).
+
+
+
+ The kernel derivation exports an attribute features specifying whether optional functionality is or isn’t enabled. This is used in NixOS to implement kernel-specific behaviour. For instance, if the kernel has the iwlwifi feature (i.e. has built-in support for Intel wireless chipsets), then NixOS doesn’t have to build the external iwlwifi package:
+
+modulesTree = [kernel]
+ ++ pkgs.lib.optional (!kernel.features ? iwlwifi) kernelPackages.iwlwifi
+ ++ ...;
+
+
+
+
+ How to add a new (major) version of the Linux kernel to Nixpkgs:
+
+
+
+ Copy the old Nix expression (e.g. linux-2.6.21.nix) to the new one (e.g. linux-2.6.22.nix) and update it.
+
+
+
+
+ Add the new kernel to all-packages.nix (e.g., create an attribute kernel_2_6_22).
+
+
+
+
+ Now we’re going to update the kernel configuration. First unpack the kernel. Then for each supported platform (i686, x86_64, uml) do the following:
+
+
+
+ Make an copy from the old config (e.g. config-2.6.21-i686-smp) to the new one (e.g. config-2.6.22-i686-smp).
+
+
+
+
+ Copy the config file for this platform (e.g. config-2.6.22-i686-smp) to .config in the kernel source tree.
+
+
+
+
+ Run make oldconfig ARCH={i386,x86_64,um} and answer all questions. (For the uml configuration, also add SHELL=bash.) Make sure to keep the configuration consistent between platforms (i.e. don’t enable some feature on i686 and disable it on x86_64).
+
+
+
+
+ If needed you can also run make menuconfig:
+
+$ nix-env -i ncurses
+$ export NIX_CFLAGS_LINK=-lncurses
+$ make menuconfig ARCH=arch
+
+
+
+
+ Copy .config over the new config file (e.g. config-2.6.22-i686-smp).
+
+
+
+
+
+
+
+ Test building the kernel: nix-build -A kernel_2_6_22. If it compiles, ship it! For extra credit, try booting NixOS with it.
+
+
+
+
+ It may be that the new kernel requires updating the external kernel modules and kernel-dependent packages listed in the linuxPackagesFor function in all-packages.nix (such as the NVIDIA drivers, AUFS, etc.). If the updated packages aren’t backwards compatible with older kernels, you may need to keep the older versions around.
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/packages/locales.xml b/doc/packages/locales.xml
new file mode 100644
index 000000000000..15954495e217
--- /dev/null
+++ b/doc/packages/locales.xml
@@ -0,0 +1,13 @@
+
+ Locales
+
+
+ To allow simultaneous use of packages linked against different versions of glibc with different locale archive formats Nixpkgs patches glibc to rely on LOCALE_ARCHIVE environment variable.
+
+
+
+ On non-NixOS distributions this variable is obviously not set. This can cause regressions in language support or even crashes in some Nixpkgs-provided programs. The simplest way to mitigate this problem is exporting the LOCALE_ARCHIVE variable pointing to ${glibcLocales}/lib/locale/locale-archive. The drawback (and the reason this is not the default) is the relatively large (a hundred MiB) size of the full set of locales. It is possible to build a custom set of locales by overriding parameters allLocales and locales of the package.
+
+
\ No newline at end of file
diff --git a/doc/packages/nginx.xml b/doc/packages/nginx.xml
new file mode 100644
index 000000000000..921a6add2a0a
--- /dev/null
+++ b/doc/packages/nginx.xml
@@ -0,0 +1,25 @@
+
+ Nginx
+
+
+ Nginx is a reverse proxy and lightweight webserver.
+
+
+
+ ETags on static files served from the Nix store
+
+
+ HTTP has a couple different mechanisms for caching to prevent clients from having to download the same content repeatedly if a resource has not changed since the last time it was requested. When nginx is used as a server for static files, it implements the caching mechanism based on the Last-Modified response header automatically; unfortunately, it works by using filesystem timestamps to determine the value of the Last-Modified header. This doesn't give the desired behavior when the file is in the Nix store, because all file timestamps are set to 0 (for reasons related to build reproducibility).
+
+
+
+ Fortunately, HTTP supports an alternative (and more effective) caching mechanism: the ETag response header. The value of the ETag header specifies some identifier for the particular content that the server is sending (e.g. a hash). When a client makes a second request for the same resource, it sends that value back in an If-None-Match header. If the ETag value is unchanged, then the server does not need to resend the content.
+
+
+
+ As of NixOS 19.09, the nginx package in Nixpkgs is patched such that when nginx serves a file out of /nix/store, the hash in the store path is used as the ETag header in the HTTP response, thus providing proper caching functionality. This happens automatically; you do not need to do modify any configuration to get this behavior.
+
+
+
\ No newline at end of file
diff --git a/doc/packages/opengl.xml b/doc/packages/opengl.xml
new file mode 100644
index 000000000000..fcb624736b09
--- /dev/null
+++ b/doc/packages/opengl.xml
@@ -0,0 +1,9 @@
+
+ OpenGL
+
+
+ Packages that use OpenGL have NixOS desktop as their primary target. The current solution for loading the GPU-specific drivers is based on libglvnd and looks for the driver implementation in LD_LIBRARY_PATH. If you are using a non-NixOS GNU/Linux/X11 desktop with free software video drivers, consider launching OpenGL-dependent programs from Nixpkgs with Nixpkgs versions of libglvnd and mesa_drivers in LD_LIBRARY_PATH. For proprietary video drivers you might have luck with also adding the corresponding video driver package.
+
+
\ No newline at end of file
diff --git a/doc/packages/shell-helpers.xml b/doc/packages/shell-helpers.xml
new file mode 100644
index 000000000000..53416ce7e171
--- /dev/null
+++ b/doc/packages/shell-helpers.xml
@@ -0,0 +1,25 @@
+
+ Interactive shell helpers
+
+
+ Some packages provide the shell integration to be more useful. But unlike other systems, nix doesn't have a standard share directory location. This is why a bunch PACKAGE-share scripts are shipped that print the location of the corresponding shared folder. Current list of such packages is as following:
+
+
+
+ autojump: autojump-share
+
+
+
+
+ fzf: fzf-share
+
+
+
+ E.g. autojump can then used in the .bashrc like this:
+
+ source "$(autojump-share)/autojump.bash"
+
+
+
\ No newline at end of file
diff --git a/doc/packages/steam.xml b/doc/packages/steam.xml
new file mode 100644
index 000000000000..413247ee4685
--- /dev/null
+++ b/doc/packages/steam.xml
@@ -0,0 +1,131 @@
+
+ Steam
+
+
+ Steam in Nix
+
+
+ Steam is distributed as a .deb file, for now only as an i686 package (the amd64 package only has documentation). When unpacked, it has a script called steam that in Ubuntu (their target distro) would go to /usr/bin . When run for the first time, this script copies some files to the user's home, which include another script that is the ultimate responsible for launching the steam binary, which is also in $HOME.
+
+
+
+ Nix problems and constraints:
+
+
+
+ We don't have /bin/bash and many scripts point there. Similarly for /usr/bin/python .
+
+
+
+
+ We don't have the dynamic loader in /lib .
+
+
+
+
+ The steam.sh script in $HOME can not be patched, as it is checked and rewritten by steam.
+
+
+
+
+ The steam binary cannot be patched, it's also checked.
+
+
+
+
+
+
+ The current approach to deploy Steam in NixOS is composing a FHS-compatible chroot environment, as documented here. This allows us to have binaries in the expected paths without disrupting the system, and to avoid patching them to work in a non FHS environment.
+
+
+
+
+ How to play
+
+
+ For 64-bit systems it's important to have
+hardware.opengl.driSupport32Bit = true;
+ in your /etc/nixos/configuration.nix. You'll also need
+hardware.pulseaudio.support32Bit = true;
+ if you are using PulseAudio - this will enable 32bit ALSA apps integration. To use the Steam controller or other Steam supported controllers such as the DualShock 4 or Nintendo Switch Pro, you need to add
+hardware.steam-hardware.enable = true;
+ to your configuration.
+
+
+
+
+ Troubleshooting
+
+
+
+
+
+ Steam fails to start. What do I do?
+
+
+
+ Try to run
+strace steam
+ to see what is causing steam to fail.
+
+
+
+
+
+ Using the FOSS Radeon or nouveau (nvidia) drivers
+
+
+
+
+
+ The newStdcpp parameter was removed since NixOS 17.09 and should not be needed anymore.
+
+
+
+
+ Steam ships statically linked with a version of libcrypto that conflics with the one dynamically loaded by radeonsi_dri.so. If you get the error
+steam.sh: line 713: 7842 Segmentation fault (core dumped)
+ have a look at this pull request.
+
+
+
+
+
+
+
+ Java
+
+
+
+
+
+ There is no java in steam chrootenv by default. If you get a message like
+/home/foo/.local/share/Steam/SteamApps/common/towns/towns.sh: line 1: java: command not found
+ You need to add
+ steam.override { withJava = true; };
+ to your configuration.
+
+
+
+
+
+
+
+
+
+
+ steam-run
+
+
+ The FHS-compatible chroot used for steam can also be used to run other linux games that expect a FHS environment. To do it, add
+pkgs.(steam.override {
+ nativeOnly = true;
+ newStdcpp = true;
+ }).run
+ to your configuration, rebuild, and run the game with
+steam-run ./foo
+
+
+
\ No newline at end of file
diff --git a/doc/packages/unfree.xml b/doc/packages/unfree.xml
new file mode 100644
index 000000000000..b2d8402005e9
--- /dev/null
+++ b/doc/packages/unfree.xml
@@ -0,0 +1,13 @@
+
+ Unfree software
+
+
+ All users of Nixpkgs are free software users, and many users (and developers) of Nixpkgs want to limit and tightly control their exposure to unfree software. At the same time, many users need (or want) to run some specific pieces of proprietary software. Nixpkgs includes some expressions for unfree software packages. By default unfree software cannot be installed and doesn’t show up in searches. To allow installing unfree software in a single Nix invocation one can export NIXPKGS_ALLOW_UNFREE=1. For a persistent solution, users can set allowUnfree in the Nixpkgs configuration.
+
+
+
+ Fine-grained control is possible by defining allowUnfreePredicate function in config; it takes the mkDerivation parameter attrset and returns true for unfree packages that should be allowed.
+
+
\ No newline at end of file
diff --git a/doc/packages/weechat.xml b/doc/packages/weechat.xml
new file mode 100644
index 000000000000..aeb240d904b5
--- /dev/null
+++ b/doc/packages/weechat.xml
@@ -0,0 +1,85 @@
+
+ Weechat
+
+
+ Weechat can be configured to include your choice of plugins, reducing its closure size from the default configuration which includes all available plugins. To make use of this functionality, install an expression that overrides its configuration such as
+weechat.override {configure = {availablePlugins, ...}: {
+ plugins = with availablePlugins; [ python perl ];
+ }
+}
+ If the configure function returns an attrset without the plugins attribute, availablePlugins will be used automatically.
+
+
+
+ The plugins currently available are python, perl, ruby, guile, tcl and lua.
+
+
+
+ The python and perl plugins allows the addition of extra libraries. For instance, the inotify.py script in weechat-scripts requires D-Bus or libnotify, and the fish.py script requires pycrypto. To use these scripts, use the plugin's withPackages attribute:
+weechat.override { configure = {availablePlugins, ...}: {
+ plugins = with availablePlugins; [
+ (python.withPackages (ps: with ps; [ pycrypto python-dbus ]))
+ ];
+ };
+}
+
+
+
+
+ In order to also keep all default plugins installed, it is possible to use the following method:
+weechat.override { configure = { availablePlugins, ... }: {
+ plugins = builtins.attrValues (availablePlugins // {
+ python = availablePlugins.python.withPackages (ps: with ps; [ pycrypto python-dbus ]);
+ });
+}; }
+
+
+
+
+ WeeChat allows to set defaults on startup using the --run-command. The configure method can be used to pass commands to the program:
+weechat.override {
+ configure = { availablePlugins, ... }: {
+ init = ''
+ /set foo bar
+ /server add freenode chat.freenode.org
+ '';
+ };
+}
+ Further values can be added to the list of commands when running weechat --run-command "your-commands".
+
+
+
+ Additionally it's possible to specify scripts to be loaded when starting weechat. These will be loaded before the commands from init:
+weechat.override {
+ configure = { availablePlugins, ... }: {
+ scripts = with pkgs.weechatScripts; [
+ weechat-xmpp weechat-matrix-bridge wee-slack
+ ];
+ init = ''
+ /set plugins.var.python.jabber.key "val"
+ '':
+ };
+}
+
+
+
+ In nixpkgs there's a subpackage which contains derivations for WeeChat scripts. Such derivations expect a passthru.scripts attribute which contains a list of all scripts inside the store path. Furthermore all scripts have to live in $out/share. An exemplary derivation looks like this:
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation {
+ name = "exemplary-weechat-script";
+ src = fetchurl {
+ url = "https://scripts.tld/your-scripts.tar.gz";
+ sha256 = "...";
+ };
+ passthru.scripts = [ "foo.py" "bar.lua" ];
+ installPhase = ''
+ mkdir $out/share
+ cp foo.py $out/share
+ cp bar.lua $out/share
+ '';
+}
+
+
\ No newline at end of file
diff --git a/doc/packages/xorg.xml b/doc/packages/xorg.xml
new file mode 100644
index 000000000000..4526121687fc
--- /dev/null
+++ b/doc/packages/xorg.xml
@@ -0,0 +1,34 @@
+
+ X.org
+
+
+ The Nix expressions for the X.org packages reside in pkgs/servers/x11/xorg/default.nix. This file is automatically generated from lists of tarballs in an X.org release. As such it should not be modified directly; rather, you should modify the lists, the generator script or the file pkgs/servers/x11/xorg/overrides.nix, in which you can override or add to the derivations produced by the generator.
+
+
+
+ The generator is invoked as follows:
+
+$ cd pkgs/servers/x11/xorg
+$ cat tarballs-7.5.list extra.list old.list \
+ | perl ./generate-expr-from-tarballs.pl
+
+ For each of the tarballs in the .list files, the script downloads it, unpacks it, and searches its configure.ac and *.pc.in files for dependencies. This information is used to generate default.nix. The generator caches downloaded tarballs between runs. Pay close attention to the NOT FOUND: name messages at the end of the run, since they may indicate missing dependencies. (Some might be optional dependencies, however.)
+
+
+
+ A file like tarballs-7.5.list contains all tarballs in a X.org release. It can be generated like this:
+
+$ export i="mirror://xorg/X11R7.4/src/everything/"
+$ cat $(PRINT_PATH=1 nix-prefetch-url $i | tail -n 1) \
+ | perl -e 'while (<>) { if (/(href|HREF)="([^"]*.bz2)"/) { print "$ENV{'i'}$2\n"; }; }' \
+ | sort > tarballs-7.4.list
+
+ extra.list contains libraries that aren’t part of X.org proper, but are closely related to it, such as libxcb. old.list contains some packages that were removed from X.org, but are still needed by some people or by other packages (such as imake).
+
+
+
+ If the expression for a package requires derivation attributes that the generator cannot figure out automatically (say, patches or a postInstall hook), you should modify pkgs/servers/x11/xorg/overrides.nix.
+
+
\ No newline at end of file
diff --git a/doc/platform-notes.xml b/doc/platform-notes.xml
index 157d3fe2fcdd..5a266fdc0eea 100644
--- a/doc/platform-notes.xml
+++ b/doc/platform-notes.xml
@@ -1,6 +1,6 @@
+ xml:id="chap-platform-notes">
Platform NotesDarwin (macOS)
@@ -12,12 +12,7 @@
- The Darwin stdenv uses clang instead of gcc. When
- referring to the compiler $CC or cc
- will work in both cases. Some builds hardcode gcc/g++ in their build
- scripts, that can usually be fixed with using something like
- makeFlags = [ "CC=cc" ]; or by patching the build
- scripts.
+ The Darwin stdenv uses clang instead of gcc. When referring to the compiler $CC or cc will work in both cases. Some builds hardcode gcc/g++ in their build scripts, that can usually be fixed with using something like makeFlags = [ "CC=cc" ]; or by patching the build scripts.
stdenv.mkDerivation {
@@ -31,12 +26,7 @@ stdenv.mkDerivation {
- On Darwin, libraries are linked using absolute paths, libraries are
- resolved by their install_name at link time. Sometimes
- packages won't set this correctly causing the library lookups to fail at
- runtime. This can be fixed by adding extra linker flags or by running
- install_name_tool -id during the
- fixupPhase.
+ On Darwin, libraries are linked using absolute paths, libraries are resolved by their install_name at link time. Sometimes packages won't set this correctly causing the library lookups to fail at runtime. This can be fixed by adding extra linker flags or by running install_name_tool -id during the fixupPhase.
stdenv.mkDerivation {
@@ -48,16 +38,10 @@ stdenv.mkDerivation {
- Even if the libraries are linked using absolute paths and resolved via
- their install_name correctly, tests can sometimes fail
- to run binaries. This happens because the checkPhase
- runs before the libraries are installed.
+ Even if the libraries are linked using absolute paths and resolved via their install_name correctly, tests can sometimes fail to run binaries. This happens because the checkPhase runs before the libraries are installed.
- This can usually be solved by running the tests after the
- installPhase or alternatively by using
- DYLD_LIBRARY_PATH. More information about this variable
- can be found in the
+ This can usually be solved by running the tests after the installPhase or alternatively by using DYLD_LIBRARY_PATH. More information about this variable can be found in the dyld1 manpage.
@@ -78,11 +62,7 @@ stdenv.mkDerivation {
- Some packages assume xcode is available and use xcrun
- to resolve build tools like clang, etc. This causes
- errors like xcode-select: error: no developer tools were found at
- '/Applications/Xcode.app' while the build doesn't actually depend
- on xcode.
+ Some packages assume xcode is available and use xcrun to resolve build tools like clang, etc. This causes errors like xcode-select: error: no developer tools were found at '/Applications/Xcode.app' while the build doesn't actually depend on xcode.
stdenv.mkDerivation {
@@ -95,9 +75,7 @@ stdenv.mkDerivation {
}
- The package xcbuild can be used to build projects that
- really depend on Xcode. However, this replacement is not 100% compatible
- with Xcode and can occasionally cause issues.
+ The package xcbuild can be used to build projects that really depend on Xcode. However, this replacement is not 100% compatible with Xcode and can occasionally cause issues.
diff --git a/doc/quick-start.xml b/doc/quick-start.xml
index 4f0952896e45..80514cba4904 100644
--- a/doc/quick-start.xml
+++ b/doc/quick-start.xml
@@ -15,120 +15,75 @@
- 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 for some hints on the tree
- organisation. Create a directory for your package, e.g.
+ 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 for some hints on the tree organisation. Create a directory for your package, e.g.
$ mkdir pkgs/development/libraries/libfoo
- 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.
+ 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.
$ 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:
+ 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.
- Trivial package, which specifies some meta
- attributes which is good practice.
+ GNU Hello: 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.
- Also a simple package. The generic builder in stdenv
- does everything for you. It has no dependencies beyond
- stdenv.
+ GNU cpio: 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.
- Also done by the generic builder, but has a dependency on
- m4.
+ GNU Multiple Precision arithmetic library (GMP): 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.
- Has an optional dependency on gtkspell, which is
- only built if spellCheck is true.
+ Pan, a GTK-based newsreader: 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.
- A bunch of optional features, variable substitutions in the configure
- flags, a post-install hook, and miscellaneous hackery.
+ Apache HTTPD: 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.
- Thunderbird:
- pkgs/applications/networking/mailreaders/thunderbird/default.nix.
- Lots of dependencies.
+ Thunderbird: pkgs/applications/networking/mailreaders/thunderbird/default.nix. Lots of dependencies.
- JDiskReport, a Java utility:
- pkgs/tools/misc/jdiskreport/default.nix
- (and the
- builder).
- Nixpkgs doesn’t have a decent stdenv for Java yet
- so this is pretty ad-hoc.
+ JDiskReport, a Java utility: pkgs/tools/misc/jdiskreport/default.nix (and the builder). 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
- (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.
+ XML::Simple, a Perl module: 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.
- Shows how binary-only packages can be supported. In particular the
- builder
- uses patchelf to set the RUNPATH and ELF interpreter
- of the executables so that the right libraries are found at runtime.
+ Adobe Reader: pkgs/applications/misc/adobe-reader/default.nix. Shows how binary-only packages can be supported. In particular the builder uses patchelf to set the RUNPATH and ELF interpreter of the executables so that the right libraries are found at runtime.
@@ -138,67 +93,45 @@
- All meta attributes are
- optional, but it’s still a good idea to provide at least the
- description, homepage and
- meta attributes are optional, but it’s still a good idea to provide at least the description, homepage and 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.
+ You can use nix-prefetch-urlurl 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
- mirror:// URLs can be found in 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.
+ 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.
- Add a call to the function defined in the previous step to
- pkgs/top-level/all-packages.nix
- with some descriptive name for the variable, e.g.
- libfoo.
+ Add a call to the function defined in the previous step to pkgs/top-level/all-packages.nix with some descriptive name for the variable, e.g. libfoo.
$ 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.
+ 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.
- To test whether the package builds, run the following command from the
- root of the nixpkgs source tree:
+ To test whether the package builds, run the following command from the root of the nixpkgs source tree:
$ nix-build -A libfoo
- where libfoo should be the variable name defined in the
- previous step. You may want to add the flag 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.
+ where libfoo should be the variable name defined in the previous step. You may want to add the flag 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.
@@ -210,8 +143,9 @@
- Optionally commit the new package and open a pull request, or send a patch
- to https://groups.google.com/forum/#!forum/nix-devel.
+ Optionally commit the new package and open a pull request to nixpkgs, or use the Patches category on Discourse for sending a patch without a GitHub account.
diff --git a/doc/release-notes.xml b/doc/release-notes.xml
index 8d9b1813010a..b85f61da079c 100644
--- a/doc/release-notes.xml
+++ b/doc/release-notes.xml
@@ -6,15 +6,11 @@
Release 0.14 (June 4, 2012)
- In preparation for the switch from Subversion to Git, this release is mainly
- the prevent the Nixpkgs version number from going backwards. (This would
- happen because prerelease version numbers produced for the Git repository
- are lower than those for the Subversion repository.)
+ In preparation for the switch from Subversion to Git, this release is mainly the prevent the Nixpkgs version number from going backwards. (This would happen because prerelease version numbers produced for the Git repository are lower than those for the Subversion repository.)
- Since the last release, there have been thousands of changes and new
- packages by numerous contributors. For details, see the commit logs.
+ Since the last release, there have been thousands of changes and new packages by numerous contributors. For details, see the commit logs.
@@ -55,14 +51,11 @@
Release 0.12 (April 24, 2009)
- There are way too many additions to Nixpkgs since the last release to list
- here: for example, the number of packages on Linux has increased from 1002
- to 2159. However, some specific improvements are worth listing:
+ There are way too many additions to Nixpkgs since the last release to list here: for example, the number of packages on Linux has increased from 1002 to 2159. However, some specific improvements are worth listing:
- Nixpkgs now has a manual. In particular, it describes the standard build
- environment in detail.
+ Nixpkgs now has a manual. In particular, it describes the standard build environment in detail.
@@ -122,9 +115,7 @@
- Support for building derivations in a virtual machine, including RPM and
- Debian builds in automatically generated VM images. See
- pkgs/build-support/vm/default.nix for details.
+ Support for building derivations in a virtual machine, including RPM and Debian builds in automatically generated VM images. See pkgs/build-support/vm/default.nix for details.
@@ -136,13 +127,7 @@
- The following people contributed to this release: Andres Löh, Arie
- Middelkoop, Armijn Hemel, Eelco Dolstra, Lluís Batlle, Ludovic Courtès,
- Marc Weber, Mart Kolthof, Martin Bravenboer, Michael Raskin, Nicolas
- Pierron, Peter Simons, Pjotr Prins, Rob Vermaas, Sander van der Burg, Tobias
- Hammerschmidt, Valentin David, Wouter den Breejen and Yury G. Kudryashov. In
- addition, several people contributed patches on the
- nix-dev mailing list.
+ The following people contributed to this release: Andres Löh, Arie Middelkoop, Armijn Hemel, Eelco Dolstra, Lluís Batlle, Ludovic Courtès, Marc Weber, Mart Kolthof, Martin Bravenboer, Michael Raskin, Nicolas Pierron, Peter Simons, Pjotr Prins, Rob Vermaas, Sander van der Burg, Tobias Hammerschmidt, Valentin David, Wouter den Breejen and Yury G. Kudryashov. In addition, several people contributed patches on the nix-dev mailing list.
@@ -153,25 +138,12 @@
- The standard build environment (stdenv) is now pure on
- the x86_64-linux and powerpc-linux
- platforms, just as on i686-linux. (Purity means that
- building and using the standard environment has no dependencies outside
- of the Nix store. For instance, it doesn’t require an external C
- compiler such as /usr/bin/gcc.) Also, the statically
- linked binaries used in the bootstrap process are now automatically
- reproducible, making it easy to update the bootstrap tools and to add
- support for other Linux platforms. See
- pkgs/stdenv/linux/make-bootstrap-tools.nix for
- details.
+ The standard build environment (stdenv) is now pure on the x86_64-linux and powerpc-linux platforms, just as on i686-linux. (Purity means that building and using the standard environment has no dependencies outside of the Nix store. For instance, it doesn’t require an external C compiler such as /usr/bin/gcc.) Also, the statically linked binaries used in the bootstrap process are now automatically reproducible, making it easy to update the bootstrap tools and to add support for other Linux platforms. See pkgs/stdenv/linux/make-bootstrap-tools.nix for details.
- Hook variables in the generic builder are now executed using the
- eval shell command. This has a major advantage: you
- can write hooks directly in Nix expressions. For instance, rather than
- writing a builder like this:
+ Hook variables in the generic builder are now executed using the eval shell command. This has a major advantage: you can write hooks directly in Nix expressions. For instance, rather than writing a builder like this:
source $stdenv/setup
@@ -182,91 +154,57 @@ postInstall() {
}
genericBuild
- (the gzip builder), you can just add this attribute to
- the derivation:
+ (the gzip builder), you can just add this attribute to the derivation:
postInstall = "ln -sf gzip $out/bin/gunzip; ln -sf gzip $out/bin/zcat";
- and so a separate build script becomes unnecessary. This should allow us
- to get rid of most builders in Nixpkgs.
+ and so a separate build script becomes unnecessary. This should allow us to get rid of most builders in Nixpkgs.
- It is now possible to have the generic builder pass arguments to
- configure and make that contain
- whitespace. Previously, for example, you could say in a builder,
+ It is now possible to have the generic builder pass arguments to configure and make that contain whitespace. Previously, for example, you could say in a builder,
configureFlags="CFLAGS=-O0"
but not
configureFlags="CFLAGS=-O0 -g"
- since the -g would be interpreted as a separate
- argument to configure. Now you can say
+ since the -g would be interpreted as a separate argument to configure. Now you can say
configureFlagsArray=("CFLAGS=-O0 -g")
or similarly
configureFlagsArray=("CFLAGS=-O0 -g" "LDFLAGS=-L/foo -L/bar")
- which does the right thing. Idem for makeFlags,
- installFlags, checkFlags and
- distFlags.
+ which does the right thing. Idem for makeFlags, installFlags, checkFlags and distFlags.
- Unfortunately you can't pass arrays to Bash through the environment, so
- you can't put the array above in a Nix expression, e.g.,
+ Unfortunately you can't pass arrays to Bash through the environment, so you can't put the array above in a Nix expression, e.g.,
configureFlagsArray = ["CFLAGS=-O0 -g"];
- since it would just be flattened to a since string. However, you
- can use the inline hooks described above:
+ since it would just be flattened to a since string. However, you can use the inline hooks described above:
preConfigure = "configureFlagsArray=(\"CFLAGS=-O0 -g\")";
- The function fetchurl now has support for two
- different kinds of mirroring of files. First, it has support for
- content-addressable mirrors. For example, given the
- fetchurl call
+ The function fetchurl now has support for two different kinds of mirroring of files. First, it has support for content-addressable mirrors. For example, given the fetchurl call
fetchurl {
url = http://releases.mozilla.org/.../firefox-2.0.0.6-source.tar.bz2;
sha1 = "eb72f55e4a8bf08e8c6ef227c0ade3d068ba1082";
}
- fetchurl will first try to download this file from
- .
- If that file doesn’t exist, it will try the original URL. In general,
- the “content-addressed” location is
- mirror/hash-type/hash.
- There is currently only one content-addressable mirror
- (), but more can be
- specified in the hashedMirrors attribute in
- pkgs/build-support/fetchurl/mirrors.nix, or by
- setting the NIX_HASHED_MIRRORS environment variable to a
- whitespace-separated list of URLs.
+ fetchurl will first try to download this file from . If that file doesn’t exist, it will try the original URL. In general, the “content-addressed” location is mirror/hash-type/hash. There is currently only one content-addressable mirror (), but more can be specified in the hashedMirrors attribute in pkgs/build-support/fetchurl/mirrors.nix, or by setting the NIX_HASHED_MIRRORS environment variable to a whitespace-separated list of URLs.
- Second, fetchurl has support for widely-mirrored
- distribution sites such as SourceForge or the Linux kernel archives.
- Given a URL of the form
- mirror://site/path,
- it will try to download path from a
- configurable list of mirrors for site. (This
- idea was borrowed from Gentoo Linux.) Example:
+ Second, fetchurl has support for widely-mirrored distribution sites such as SourceForge or the Linux kernel archives. Given a URL of the form mirror://site/path, it will try to download path from a configurable list of mirrors for site. (This idea was borrowed from Gentoo Linux.) Example:
fetchurl {
url = mirror://gnu/gcc/gcc-4.2.0/gcc-core-4.2.0.tar.bz2;
sha256 = "0ykhzxhr8857dr97z0j9wyybfz1kjr71xk457cfapfw5fjas4ny1";
}
- Currently site can be
- sourceforge, gnu and
- kernel. The list of mirrors is defined in
- pkgs/build-support/fetchurl/mirrors.nix. You can
- override the list of mirrors for a particular site by setting the
- environment variable
- NIX_MIRRORS_site, e.g.
+ Currently site can be sourceforge, gnu and kernel. The list of mirrors is defined in pkgs/build-support/fetchurl/mirrors.nix. You can override the list of mirrors for a particular site by setting the environment variable NIX_MIRRORS_site, e.g.
export NIX_MIRRORS_sourceforge=http://osdn.dl.sourceforge.net/sourceforge/
@@ -339,9 +277,7 @@ export NIX_MIRRORS_sourceforge=http://osdn.dl.sourceforge.net/sourceforge/
- The following people contributed to this release: Andres Löh, Arie
- Middelkoop, Armijn Hemel, Eelco Dolstra, Marc Weber, Mart Kolthof, Martin
- Bravenboer, Michael Raskin, Wouter den Breejen and Yury G. Kudryashov.
+ The following people contributed to this release: Andres Löh, Arie Middelkoop, Armijn Hemel, Eelco Dolstra, Marc Weber, Mart Kolthof, Martin Bravenboer, Michael Raskin, Wouter den Breejen and Yury G. Kudryashov.
@@ -349,10 +285,8 @@ export NIX_MIRRORS_sourceforge=http://osdn.dl.sourceforge.net/sourceforge/
- This release of Nixpkgs requires
- Nix 0.10
- or higher.
+ This release of Nixpkgs requires Nix 0.10 or higher.
@@ -363,32 +297,15 @@ xlink:href='http://nixos.org/releases/nix/nix-0.10/'>Nix 0.10
- pkgs/system/all-packages-generic.nix is gone, we now
- just have pkgs/top-level/all-packages.nix that
- contains all available packages. This should cause much less confusion
- with users. all-packages.nix is a function that by
- default returns packages for the current platform, but you can override
- this by specifying a different system argument.
+ pkgs/system/all-packages-generic.nix is gone, we now just have pkgs/top-level/all-packages.nix that contains all available packages. This should cause much less confusion with users. all-packages.nix is a function that by default returns packages for the current platform, but you can override this by specifying a different system argument.
- Certain packages in Nixpkgs are now user-configurable through a
- configuration file, i.e., without having to edit the Nix expressions in
- Nixpkgs. For instance, the Firefox provided in the Nixpkgs channel is
- built without the RealPlayer plugin (for legal reasons). Previously, you
- could easily enable RealPlayer support by editing the call to the Firefox
- function in all-packages.nix, but such changes are
- not respected when Firefox is subsequently updated through the Nixpkgs
- channel.
+ Certain packages in Nixpkgs are now user-configurable through a configuration file, i.e., without having to edit the Nix expressions in Nixpkgs. For instance, the Firefox provided in the Nixpkgs channel is built without the RealPlayer plugin (for legal reasons). Previously, you could easily enable RealPlayer support by editing the call to the Firefox function in all-packages.nix, but such changes are not respected when Firefox is subsequently updated through the Nixpkgs channel.
- The Nixpkgs configuration file (found in
- ~/.nixpkgs/config.nix or through the
- NIXPKGS_CONFIG environment variable) is an attribute set
- that contains configuration options that
- all-packages.nix reads and uses for certain packages.
- For instance, the following configuration file:
+ The Nixpkgs configuration file (found in ~/.nixpkgs/config.nix or through the NIXPKGS_CONFIG environment variable) is an attribute set that contains configuration options that all-packages.nix reads and uses for certain packages. For instance, the following configuration file:
{
firefox = {
@@ -398,9 +315,7 @@ xlink:href='http://nixos.org/releases/nix/nix-0.10/'>Nix 0.10
persistently enables RealPlayer support in the Firefox build.
- (Actually, firefox.enableRealPlayer is the
- only configuration option currently available, but
- more are sure to be added.)
+ (Actually, firefox.enableRealPlayer is the only configuration option currently available, but more are sure to be added.)
@@ -409,17 +324,8 @@ xlink:href='http://nixos.org/releases/nix/nix-0.10/'>Nix 0.10
- i686-cygwin, i.e., Windows (using
- Cygwin). The standard
- environment on i686-cygwin by default builds
- binaries for the Cygwin environment (i.e., it uses Cygwin tools and
- produces executables that use the Cygwin library). However, there is
- also a standard environment that produces binaries that use
- MinGW. You can
- use it by calling all-package.nix with the
- stdenvType argument set to
- "i686-mingw".
+ i686-cygwin, i.e., Windows (using Cygwin). The standard environment on i686-cygwin by default builds binaries for the Cygwin environment (i.e., it uses Cygwin tools and produces executables that use the Cygwin library). However, there is also a standard environment that produces binaries that use MinGW. You can use it by calling all-package.nix with the stdenvType argument set to "i686-mingw".
@@ -434,9 +340,7 @@ xlink:href='http://nixos.org/releases/nix/nix-0.10/'>Nix 0.10
- x86_64-linux, i.e., Linux on 64-bit AMD/Intel CPUs.
- Unlike i686-linux, this platform doesn’t have a
- pure stdenv yet.
+ x86_64-linux, i.e., Linux on 64-bit AMD/Intel CPUs. Unlike i686-linux, this platform doesn’t have a pure stdenv yet.
@@ -472,21 +376,10 @@ xlink:href='http://nixos.org/releases/nix/nix-0.10/'>Nix 0.10
- It is now much easier to override the default C
- compiler and other tools in stdenv for specific
- packages. all-packages.nix provides two utility
- functions for this purpose: overrideGCC and
- overrideInStdenv. Both take a
- stdenv and return an augmented
- stdenv; the formed changes the C compiler, and the
- latter adds additional packages to the front of
- stdenv’s initial PATH, allowing tools
- to be overridden.
+ It is now much easier to override the default C compiler and other tools in stdenv for specific packages. all-packages.nix provides two utility functions for this purpose: overrideGCC and overrideInStdenv. Both take a stdenv and return an augmented stdenv; the formed changes the C compiler, and the latter adds additional packages to the front of stdenv’s initial PATH, allowing tools to be overridden.
- For instance, the package strategoxt doesn’t build
- with the GNU Make in stdenv (version 3.81), so we call
- it with an augmented stdenv that uses GNU Make 3.80:
+ For instance, the package strategoxt doesn’t build with the GNU Make in stdenv (version 3.81), so we call it with an augmented stdenv that uses GNU Make 3.80:
strategoxt = (import ../development/compilers/strategoxt) {
inherit fetchurl pkgconfig sdf aterm;
@@ -494,8 +387,7 @@ strategoxt = (import ../development/compilers/strategoxt) {
};
gnumake380 = ...;
- Likewise, there are many packages that don’t compile with the default
- GCC (4.1.1), but that’s easily fixed:
+ Likewise, there are many packages that don’t compile with the default GCC (4.1.1), but that’s easily fixed:
exult = import ../games/exult {
inherit fetchurl SDL SDL_mixer zlib libpng unzip;
@@ -505,13 +397,7 @@ exult = import ../games/exult {
- It has also become much easier to experiment with changes to the
- stdenv setup script (which notably contains the generic
- builder). Since edits to pkgs/stdenv/generic/setup.sh
- trigger a rebuild of everything, this was formerly
- quite painful. But now stdenv contains a function to
- “regenerate” stdenv with a different setup script,
- allowing the use of a different setup script for specific packages:
+ It has also become much easier to experiment with changes to the stdenv setup script (which notably contains the generic builder). Since edits to pkgs/stdenv/generic/setup.sh trigger a rebuild of everything, this was formerly quite painful. But now stdenv contains a function to “regenerate” stdenv with a different setup script, allowing the use of a different setup script for specific packages:
pkg = import ... {
stdenv = stdenv.regenerate ./my-setup.sh;
@@ -521,10 +407,7 @@ pkg = import ... {
- Packages can now have a human-readable description
- field. Package descriptions are shown by nix-env -qa
- --description. In addition, they’re shown on the Nixpkgs
- release page. A description can be added to a package as follows:
+ Packages can now have a human-readable description field. Package descriptions are shown by nix-env -qa --description. In addition, they’re shown on the Nixpkgs release page. A description can be added to a package as follows:
stdenv.mkDerivation {
name = "exult-1.2";
@@ -533,34 +416,26 @@ stdenv.mkDerivation {
description = "A reimplementation of the Ultima VII game engine";
};
}
- The meta attribute is not passed to the builder, so
- changes to the description do not trigger a rebuild. Additional
- meta attributes may be defined in the future (such as
- the URL of the package’s homepage, the license, etc.).
+ The meta attribute is not passed to the builder, so changes to the description do not trigger a rebuild. Additional meta attributes may be defined in the future (such as the URL of the package’s homepage, the license, etc.).
- The following people contributed to this release: Andres Löh, Armijn Hemel,
- Christof Douma, Eelco Dolstra, Eelco Visser, Mart Kolthof, Martin
- Bravenboer, Merijn de Jonge, Rob Vermaas and Roy van den Broek.
+ The following people contributed to this release: Andres Löh, Armijn Hemel, Christof Douma, Eelco Dolstra, Eelco Visser, Mart Kolthof, Martin Bravenboer, Merijn de Jonge, Rob Vermaas and Roy van den Broek.
Release 0.9 (January 31, 2006)
- There have been zillions of changes since the last release of Nixpkgs. Many
- packages have been added or updated. The following are some of the more
- notable changes:
+ There have been zillions of changes since the last release of Nixpkgs. Many packages have been added or updated. The following are some of the more notable changes:
- Distribution files have been moved to
- .
@@ -576,24 +451,17 @@ stdenv.mkDerivation {
- The old, unofficial Xlibs has been replaced by the official modularised
- X11 distribution from X.org, i.e., X11R7.0. X11R7.0 consists of 287 (!)
- packages, all of which are in Nixpkgs though not all have been tested. It
- is now possible to build a working X server (previously we only had X
- client libraries). We use a fully Nixified X server on NixOS.
+ The old, unofficial Xlibs has been replaced by the official modularised X11 distribution from X.org, i.e., X11R7.0. X11R7.0 consists of 287 (!) packages, all of which are in Nixpkgs though not all have been tested. It is now possible to build a working X server (previously we only had X client libraries). We use a fully Nixified X server on NixOS.
- The Sun JDK 5 has been purified, i.e., it doesn’t require any non-Nix
- components such as /lib/ld-linux.so.2. This means
- that Java applications such as Eclipse and Azureus can run on NixOS.
+ The Sun JDK 5 has been purified, i.e., it doesn’t require any non-Nix components such as /lib/ld-linux.so.2. This means that Java applications such as Eclipse and Azureus can run on NixOS.
- Hardware-accelerated OpenGL support, used by games like Quake 3 (which is
- now built from source).
+ Hardware-accelerated OpenGL support, used by games like Quake 3 (which is now built from source).
@@ -608,8 +476,7 @@ stdenv.mkDerivation {
- Some support for cross-compilation: cross-compiling builds of GCC and
- Binutils, and cross-compiled builds of the C library uClibc.
+ Some support for cross-compilation: cross-compiling builds of GCC and Binutils, and cross-compiled builds of the C library uClibc.
@@ -618,8 +485,7 @@ stdenv.mkDerivation {
- teTeX, including support for building LaTeX documents using Nix (with
- automatic dependency determination).
+ teTeX, including support for building LaTeX documents using Nix (with automatic dependency determination).
@@ -629,14 +495,12 @@ stdenv.mkDerivation {
- System-level packages to support NixOS, e.g. Grub, GNU
- parted and so on.
+ System-level packages to support NixOS, e.g. Grub, GNU parted and so on.
- ecj, the Eclipse Compiler for Java, so we finally
- have a freely distributable compiler that supports Java 5.0.
+ ecj, the Eclipse Compiler for Java, so we finally have a freely distributable compiler that supports Java 5.0.
@@ -661,8 +525,7 @@ stdenv.mkDerivation {
- kdelibs. This allows us to add KDE-based packages
- (such as kcachegrind).
+ kdelibs. This allows us to add KDE-based packages (such as kcachegrind).
@@ -671,17 +534,14 @@ stdenv.mkDerivation {
- The following people contributed to this release: Andres Löh, Armijn Hemel,
- Bogdan Dumitriu, Christof Douma, Eelco Dolstra, Eelco Visser, Mart Kolthof,
- Martin Bravenboer, Rob Vermaas and Roy van den Broek.
+ The following people contributed to this release: Andres Löh, Armijn Hemel, Bogdan Dumitriu, Christof Douma, Eelco Dolstra, Eelco Visser, Mart Kolthof, Martin Bravenboer, Rob Vermaas and Roy van den Broek.
Release 0.8 (April 11, 2005)
- This release is mostly to remain synchronised with the changed hashing
- scheme in Nix 0.8.
+ This release is mostly to remain synchronised with the changed hashing scheme in Nix 0.8.
@@ -706,16 +566,10 @@ stdenv.mkDerivation {
- The bootstrap process for the standard build environment on Linux
- (stdenv-linux) has been improved. It is no longer dependent in its initial
- bootstrap stages on the system Glibc, GCC, and other tools. Rather,
- Nixpkgs contains a statically linked bash and curl, and uses that to
- download other statically linked tools. These are then used to build a
- Glibc and dynamically linked versions of all other tools.
+ The bootstrap process for the standard build environment on Linux (stdenv-linux) has been improved. It is no longer dependent in its initial bootstrap stages on the system Glibc, GCC, and other tools. Rather, Nixpkgs contains a statically linked bash and curl, and uses that to download other statically linked tools. These are then used to build a Glibc and dynamically linked versions of all other tools.
- This change also makes the bootstrap process faster. For instance, GCC is
- built only once instead of three times.
+ This change also makes the bootstrap process faster. For instance, GCC is built only once instead of three times.
(Contributed by Armijn Hemel.)
@@ -723,17 +577,13 @@ stdenv.mkDerivation {
- Tarballs used by Nixpkgs are now obtained from the same server that hosts
- Nixpkgs (). This
- reduces the risk of packages being unbuildable due to moved or deleted
- files on various servers.
+ Tarballs used by Nixpkgs are now obtained from the same server that hosts Nixpkgs (). This reduces the risk of packages being unbuildable due to moved or deleted files on various servers.
- There now is a generic mechanism for building Perl modules. See the
- various Perl modules defined in pkgs/system/all-packages-generic.nix.
+ There now is a generic mechanism for building Perl modules. See the various Perl modules defined in pkgs/system/all-packages-generic.nix.
diff --git a/doc/reviewing-contributions.xml b/doc/reviewing-contributions.xml
index 5aa950625efa..ed8f379c460e 100644
--- a/doc/reviewing-contributions.xml
+++ b/doc/reviewing-contributions.xml
@@ -2,72 +2,44 @@
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
version="5.0"
- xml:id="sec-reviewing-contributions">
+ xml:id="chap-reviewing-contributions">
Reviewing contributions
- The following section is a draft, and the policy for reviewing is still
- being discussed in issues such as
- #11166
- and
- #20836
- .
+ The following section is a draft, and the policy for reviewing is still being discussed in issues such as #11166 and #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 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 and the
- least
- recently updated pull requests. We highly encourage looking at
-
- this list of ready to merge, unreviewed pull requests.
+ 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 and the least recently updated pull requests. We highly encourage looking at this list of ready to merge, unreviewed pull requests.
- 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.
+ 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.
+ 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.
+ 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.
+ 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
- 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.
+ 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.
+ It can happen that non-trivial updates include patches or more complex changes.
@@ -82,8 +54,7 @@
- 8.has: package (update) and any topic label that fit
- the updated package.
+ 8.has: package (update) and any topic label that fit the updated package.
@@ -105,9 +76,7 @@
- CODEOWNERS
- will make GitHub notify users based on the submitted changes, but it can
- happen that it misses some of the package maintainers.
+ CODEOWNERS will make GitHub notify users based on the submitted changes, but it can happen that it misses some of the package maintainers.
@@ -119,15 +88,12 @@
- License can change with version updates, so it should be checked to
- match the upstream license.
+ 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.
+ 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.
@@ -144,29 +110,17 @@
- 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.
+ 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.
+ 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.
-$ git remote add channels https://github.com/NixOS/nixpkgs-channels.git
-$ git fetch channels nixos-unstable
+$ git fetch origin nixos-unstable $ git fetch origin pull/PRNUMBER/head $ git rebase --onto nixos-unstable BASEBRANCH FETCH_HEAD
-
-
- This should be done only once to be able to fetch channel branches
- from the nixpkgs-channels repository.
-
-
Fetching the nixos-unstable branch.
@@ -174,9 +128,7 @@
- Fetching 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.
+ Fetching 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.
@@ -189,12 +141,7 @@
- The
- nix-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.
+ The nix-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.
$ nix-shell -p nix-review --run "nix-review pr PRNUMBER"
@@ -231,8 +178,7 @@
New packages
- New packages are a common type of pull requests. These pull requests
- consists in adding a new nix-expression for a package.
+ New packages are a common type of pull requests. These pull requests consists in adding a new nix-expression for a package.
@@ -247,8 +193,7 @@
- 8.has: package (new) and any topic label that fit the
- new package.
+ 8.has: package (new) and any topic label that fit the new package.
@@ -280,8 +225,7 @@
- A maintainer must be set. This can be the package submitter or a
- community member that accepts to take maintainership of the package.
+ A maintainer must be set. This can be the package submitter or a community member that accepts to take maintainership of the package.
@@ -303,8 +247,7 @@
- The most appropriate function should be used (e.g. packages from GitHub
- should use fetchFromGitHub).
+ The most appropriate function should be used (e.g. packages from GitHub should use fetchFromGitHub).
@@ -351,8 +294,7 @@
Module updates
- Module updates are submissions changing modules in some ways. These often
- contains changes to the options or introduce new options.
+ Module updates are submissions changing modules in some ways. These often contains changes to the options or introduce new options.
@@ -367,8 +309,7 @@
- 8.has: module (update) and any topic label that fit
- the module.
+ 8.has: module (update) and any topic label that fit the module.
@@ -380,9 +321,7 @@
- CODEOWNERS
- will make GitHub notify users based on the submitted changes, but it can
- happen that it misses some of the package maintainers.
+ CODEOWNERS will make GitHub notify users based on the submitted changes, but it can happen that it misses some of the package maintainers.
@@ -399,9 +338,7 @@
- Type should be appropriate (string related types differs in their
- merging capabilities, optionSet and
- string types are deprecated).
+ Type should be appropriate (string related types differs in their merging capabilities, optionSet and string types are deprecated).
@@ -418,23 +355,19 @@
- mkRenamedOptionModule and
- mkAliasOptionModule functions provide way to make
- option changes backward compatible.
+ mkRenamedOptionModule and mkAliasOptionModule functions provide way to make option changes backward compatible.
- Ensure that removed options are declared with
- mkRemovedOptionModule
+ Ensure that removed options are declared with mkRemovedOptionModule
- Ensure that changes that are not backward compatible are mentioned in
- release notes.
+ Ensure that changes that are not backward compatible are mentioned in release notes.
@@ -480,8 +413,7 @@
- 8.has: module (new) and any topic label that fit the
- module.
+ 8.has: module (new) and any topic label that fit the module.
@@ -498,9 +430,7 @@
- Type should be appropriate (string related types differs in their
- merging capabilities, optionSet and
- string types are deprecated).
+ Type should be appropriate (string related types differs in their merging capabilities, optionSet and string types are deprecated).
@@ -522,8 +452,7 @@
- Module documentation should be declared with
- meta.doc.
+ Module documentation should be declared with meta.doc.
@@ -535,8 +464,7 @@
- For example, enabling a module should not open firewall ports by
- default.
+ For example, enabling a module should not open firewall ports by default.
@@ -573,25 +501,18 @@
- 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.
+ 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.
+ Container system, boot system and library changes are some examples of the pull requests fitting this category.
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.
+ It is possible for community members that have enough knowledge and experience on a special topic to contribute by merging pull requests.
@@ -608,12 +529,8 @@ policy.
-->
- In a case a contributor definitively leaves the Nix community, they should
- create an issue or post on
- Discourse with
- references of packages and modules they maintain so the maintainership can
- be taken over by other contributors.
+ In a case a contributor definitively leaves the Nix community, they should create an issue or post on Discourse with references of packages and modules they maintain so the maintainership can be taken over by other contributors.
diff --git a/doc/stdenv.xml b/doc/stdenv.xml
index 42095c13e0a4..0b59f90eb490 100644
--- a/doc/stdenv.xml
+++ b/doc/stdenv.xml
@@ -3,22 +3,13 @@
xml:id="chap-stdenv">
The Standard Environment
- The standard build environment in the Nix Packages collection provides an
- environment for building Unix packages that does a lot of common build tasks
- automatically. In fact, for Unix packages that use the standard
- ./configure; make; make install build interface, you
- don’t need to write a build script at all; the standard environment does
- everything automatically. If stdenv doesn’t do what you
- need automatically, you can easily customise or override the various build
- phases.
+ The standard build environment in the Nix Packages collection provides an environment for building Unix packages that does a lot of common build tasks automatically. In fact, for Unix packages that use the standard ./configure; make; make install build interface, you don’t need to write a build script at all; the standard environment does everything automatically. If stdenv doesn’t do what you need automatically, you can easily customise or override the various build phases.
Using stdenv
- To build a package with the standard environment, you use the function
- stdenv.mkDerivation, instead of the primitive built-in
- function derivation, e.g.
+ To build a package with the standard environment, you use the function stdenv.mkDerivation, instead of the primitive built-in function derivation, e.g.
stdenv.mkDerivation {
name = "libfoo-1.2.3";
@@ -27,17 +18,7 @@ stdenv.mkDerivation {
sha256 = "0x2g1jqygyr5wiwg4ma1nd7w4ydpy82z9gkcv8vh2v8dn3y58v5m";
};
}
- (stdenv needs to be in scope, so if you write this in a
- separate Nix expression from pkgs/all-packages.nix, you
- need to pass it as a function argument.) Specifying a
- name and a src is the absolute minimum
- Nix requires. For convenience, you can also use pname and
- version attributes and mkDerivation
- will automatically set name to
- "${pname}-${version}" by default. Since
- RFC 0035,
- this is preferred for packages in Nixpkgs, as it allows us to reuse the
- version easily:
+ (stdenv needs to be in scope, so if you write this in a separate Nix expression from pkgs/all-packages.nix, you need to pass it as a function argument.) Specifying a name and a src is the absolute minimum Nix requires. For convenience, you can also use pname and version attributes and mkDerivation will automatically set name to "${pname}-${version}" by default. Since RFC 0035, this is preferred for packages in Nixpkgs, as it allows us to reuse the version easily:
stdenv.mkDerivation rec {
pname = "libfoo";
@@ -50,31 +31,18 @@ stdenv.mkDerivation rec {
- Many packages have dependencies that are not provided in the standard
- environment. It’s usually sufficient to specify those dependencies in the
- buildInputs attribute:
+ Many packages have dependencies that are not provided in the standard environment. It’s usually sufficient to specify those dependencies in the buildInputs attribute:
stdenv.mkDerivation {
name = "libfoo-1.2.3";
...
buildInputs = [libbar perl ncurses];
}
- This attribute ensures that the bin subdirectories of
- these packages appear in the PATH environment variable during
- the build, that their include subdirectories are
- searched by the C compiler, and so on. (See
- for details.)
+ This attribute ensures that the bin subdirectories of these packages appear in the PATH environment variable during the build, that their include subdirectories are searched by the C compiler, and so on. (See for details.)
- Often it is necessary to override or modify some aspect of the build. To
- make this easier, the standard environment breaks the package build into a
- number of phases, all of which can be overridden or
- modified individually: unpacking the sources, applying patches, configuring,
- building, and installing. (There are some others; see
- .) For instance, a package that doesn’t
- supply a makefile but instead has to be compiled “manually” could be
- handled like this:
+ Often it is necessary to override or modify some aspect of the build. To make this easier, the standard environment breaks the package build into a number of phases, all of which can be overridden or modified individually: unpacking the sources, applying patches, configuring, building, and installing. (There are some others; see .) For instance, a package that doesn’t supply a makefile but instead has to be compiled “manually” could be handled like this:
stdenv.mkDerivation {
name = "fnord-4.5";
@@ -87,20 +55,15 @@ stdenv.mkDerivation {
cp foo $out/bin
'';
}
- (Note the use of ''-style string literals, which are very
- convenient for large multi-line script fragments because they don’t need
- escaping of " and \, and because
- indentation is intelligently removed.)
+ (Note the use of ''-style string literals, which are very convenient for large multi-line script fragments because they don’t need escaping of " and \, and because indentation is intelligently removed.)
- There are many other attributes to customise the build. These are listed in
- .
+ There are many other attributes to customise the build. These are listed in .
- While the standard environment provides a generic builder, you can still
- supply your own build script:
+ While the standard environment provides a generic builder, you can still supply your own build script:
stdenv.mkDerivation {
name = "libfoo-1.2.3";
@@ -111,9 +74,7 @@ stdenv.mkDerivation {
source $stdenv/setup
- to let stdenv set up the environment (e.g., process the
- buildInputs). If you want, you can still use
- stdenv’s generic builder:
+ to let stdenv set up the environment (e.g., process the buildInputs). If you want, you can still use stdenv’s generic builder:
source $stdenv/setup
@@ -179,23 +140,17 @@ genericBuild
- gzip, bzip2 and
- xz.
+ gzip, bzip2 and xz.
- GNU Make. It has been patched to provide nested output
- that can be fed into the nix-log2xml command and
- log2html stylesheet to create a structured, readable
- output of the build steps performed by Make.
+ GNU Make. It has been patched to provide nested output that can be fed into the nix-log2xml command and log2html stylesheet to create a structured, readable output of the build steps performed by Make.
- Bash. This is the shell used for all builders in the Nix Packages
- collection. Not using /bin/sh removes a large source
- of portability problems.
+ Bash. This is the shell used for all builders in the Nix Packages collection. Not using /bin/sh removes a large source of portability problems.
@@ -207,108 +162,52 @@ genericBuild
- On Linux, stdenv also includes the
- patchelf utility.
+ On Linux, stdenv also includes the patchelf utility.
Specifying dependencies
- As described in the Nix manual, almost any *.drv store
- path in a derivation's attribute set will induce a dependency on that
- derivation. mkDerivation, however, takes a few attributes
- intended to, between them, include all the dependencies of a package. This
- is done both for structure and consistency, but also so that certain other
- setup can take place. For example, certain dependencies need their bin
- directories added to the PATH. That is built-in, but other
- setup is done via a pluggable mechanism that works in conjunction with these
- dependency attributes. See for details.
+ As described in the Nix manual, almost any *.drv store path in a derivation's attribute set will induce a dependency on that derivation. mkDerivation, however, takes a few attributes intended to, between them, include all the dependencies of a package. This is done both for structure and consistency, but also so that certain other setup can take place. For example, certain dependencies need their bin directories added to the PATH. That is built-in, but other setup is done via a pluggable mechanism that works in conjunction with these dependency attributes. See for details.
- Dependencies can be broken down along three axes: their host and target
- platforms relative to the new derivation's, and whether they are propagated.
- The platform distinctions are motivated by cross compilation; see
- for exactly what each platform means.
+ Dependencies can be broken down along three axes: their host and target platforms relative to the new derivation's, and whether they are propagated. The platform distinctions are motivated by cross compilation; see for exactly what each platform means.
- The build platform is ignored because it is a mere implementation detail
- of the package satisfying the dependency: As a general programming
- principle, dependencies are always specified as
- interfaces, not concrete implementation.
+ The build platform is ignored because it is a mere implementation detail of the package satisfying the dependency: As a general programming principle, dependencies are always specified as interfaces, not concrete implementation.
- But even if one is not cross compiling, the platforms imply whether or not
- the dependency is needed at run-time or build-time, a concept that makes
- perfect sense outside of cross compilation. By default, the
- run-time/build-time distinction is just a hint for mental clarity, but with
- strictDeps set it is mostly enforced even in the native
- case.
+ But even if one is not cross compiling, the platforms imply whether or not the dependency is needed at run-time or build-time, a concept that makes perfect sense outside of cross compilation. By default, the run-time/build-time distinction is just a hint for mental clarity, but with strictDeps set it is mostly enforced even in the native case.
- The extension of PATH with dependencies, alluded to above,
- proceeds according to the relative platforms alone. The process is carried
- out only for dependencies whose host platform matches the new derivation's
- build platform i.e. dependencies which run on the platform where the new
- derivation will be built.
+ The extension of PATH with dependencies, alluded to above, proceeds according to the relative platforms alone. The process is carried out only for dependencies whose host platform matches the new derivation's build platform i.e. dependencies which run on the platform where the new derivation will be built.
- Currently, this means for native builds all dependencies are put on the
- PATH. But in the future that may not be the case for sake
- of matching cross: the platforms would be assumed to be unique for native
- and cross builds alike, so only the depsBuild* and
- nativeBuildInputs would be added to the
- PATH.
+ Currently, this means for native builds all dependencies are put on the PATH. But in the future that may not be the case for sake of matching cross: the platforms would be assumed to be unique for native and cross builds alike, so only the depsBuild* and nativeBuildInputs would be added to the PATH.
- For each dependency dep of those dependencies,
- dep/bin, if present, is
- added to the PATH environment variable.
+ For each dependency dep of those dependencies, dep/bin, if present, is added to the PATH environment variable.
- The dependency is propagated when it forces some of its other-transitive
- (non-immediate) downstream dependencies to also take it on as an immediate
- dependency. Nix itself already takes a package's transitive dependencies
- into account, but this propagation ensures nixpkgs-specific infrastructure
- like setup hooks (mentioned above) also are run as if the propagated
- dependency.
+ The dependency is propagated when it forces some of its other-transitive (non-immediate) downstream dependencies to also take it on as an immediate dependency. Nix itself already takes a package's transitive dependencies into account, but this propagation ensures nixpkgs-specific infrastructure like setup hooks (mentioned above) also are run as if the propagated dependency.
- It is important to note that dependencies are not necessarily propagated as
- the same sort of dependency that they were before, but rather as the
- corresponding sort so that the platform rules still line up. The exact rules
- for dependency propagation can be given by assigning to each dependency two
- integers based one how its host and target platforms are offset from the
- depending derivation's platforms. Those offsets are given below in the
- descriptions of each dependency list attribute. Algorithmically, we traverse
- propagated inputs, accumulating every propagated dependency's propagated
- dependencies and adjusting them to account for the "shift in perspective"
- described by the current dependency's platform offsets. This results in sort
- a transitive closure of the dependency relation, with the offsets being
- approximately summed when two dependency links are combined. We also prune
- transitive dependencies whose combined offsets go out-of-bounds, which can
- be viewed as a filter over that transitive closure removing dependencies
- that are blatantly absurd.
+ It is important to note that dependencies are not necessarily propagated as the same sort of dependency that they were before, but rather as the corresponding sort so that the platform rules still line up. The exact rules for dependency propagation can be given by assigning to each dependency two integers based one how its host and target platforms are offset from the depending derivation's platforms. Those offsets are given below in the descriptions of each dependency list attribute. Algorithmically, we traverse propagated inputs, accumulating every propagated dependency's propagated dependencies and adjusting them to account for the "shift in perspective" described by the current dependency's platform offsets. This results in sort a transitive closure of the dependency relation, with the offsets being approximately summed when two dependency links are combined. We also prune transitive dependencies whose combined offsets go out-of-bounds, which can be viewed as a filter over that transitive closure removing dependencies that are blatantly absurd.
- We can define the process precisely with
- Natural
- Deduction using the inference rules. This probably seems a bit
- obtuse, but so is the bash code that actually implements it!
+ We can define the process precisely with Natural Deduction using the inference rules. This probably seems a bit obtuse, but so is the bash code that actually implements it!
- The findInputs function, currently residing in
- pkgs/stdenv/generic/setup.sh, implements the
- propagation logic.
+ The findInputs function, currently residing in pkgs/stdenv/generic/setup.sh, implements the propagation logic.
- They're confusing in very different ways so... hopefully if something
- doesn't make sense in one presentation, it will in the other!
+ They're confusing in very different ways so... hopefully if something doesn't make sense in one presentation, it will in the other!
let mapOffset(h, t, i) = i + (if i <= 0 then h else t - 1)
@@ -335,50 +234,22 @@ propagated-dep(mapOffset(h0, t0, h1),
propagated-dep(h, t, A, B)
----------------------------- Propagated dependencies count as dependencies
dep(h, t, A, B)
- Some explanation of this monstrosity is in order. In the common case, the
- target offset of a dependency is the successor to the target offset:
- t = h + 1. That means that:
+ Some explanation of this monstrosity is in order. In the common case, the target offset of a dependency is the successor to the target offset: t = h + 1. That means that:
let f(h, t, i) = i + (if i <= 0 then h else t - 1)
let f(h, h + 1, i) = i + (if i <= 0 then h else (h + 1) - 1)
let f(h, h + 1, i) = i + (if i <= 0 then h else h)
let f(h, h + 1, i) = i + h
- This is where "sum-like" comes in from above: We can just sum all of the
- host offsets to get the host offset of the transitive dependency. The target
- offset is the transitive dependency is simply the host offset + 1, just as
- it was with the dependencies composed to make this transitive one; it can be
- ignored as it doesn't add any new information.
+ This is where "sum-like" comes in from above: We can just sum all of the host offsets to get the host offset of the transitive dependency. The target offset is the transitive dependency is simply the host offset + 1, just as it was with the dependencies composed to make this transitive one; it can be ignored as it doesn't add any new information.
- Because of the bounds checks, the uncommon cases are h =
- t and h + 2 = t. In the former case, the
- motivation for mapOffset is that since its host and
- target platforms are the same, no transitive dependency of it should be able
- to "discover" an offset greater than its reduced target offsets.
- mapOffset effectively "squashes" all its transitive
- dependencies' offsets so that none will ever be greater than the target
- offset of the original h = t package. In the other case,
- h + 1 is skipped over between the host and target
- offsets. Instead of squashing the offsets, we need to "rip" them apart so no
- transitive dependencies' offset is that one.
+ Because of the bounds checks, the uncommon cases are h = t and h + 2 = t. In the former case, the motivation for mapOffset is that since its host and target platforms are the same, no transitive dependency of it should be able to "discover" an offset greater than its reduced target offsets. mapOffset effectively "squashes" all its transitive dependencies' offsets so that none will ever be greater than the target offset of the original h = t package. In the other case, h + 1 is skipped over between the host and target offsets. Instead of squashing the offsets, we need to "rip" them apart so no transitive dependencies' offset is that one.
- Overall, the unifying theme here is that propagation shouldn't be
- introducing transitive dependencies involving platforms the depending
- package is unaware of. [One can imagine the dependending package asking for
- dependencies with the platforms it knows about; other platforms it doesn't
- know how to ask for. The platform description in that scenario is a kind of
- unforagable capability.] The offset bounds checking and definition of
- mapOffset together ensure that this is the case.
- Discovering a new offset is discovering a new platform, and since those
- platforms weren't in the derivation "spec" of the needing package, they
- cannot be relevant. From a capability perspective, we can imagine that the
- host and target platforms of a package are the capabilities a package
- requires, and the depending package must provide the capability to the
- dependency.
+ Overall, the unifying theme here is that propagation shouldn't be introducing transitive dependencies involving platforms the depending package is unaware of. [One can imagine the dependending package asking for dependencies with the platforms it knows about; other platforms it doesn't know how to ask for. The platform description in that scenario is a kind of unforagable capability.] The offset bounds checking and definition of mapOffset together ensure that this is the case. Discovering a new offset is discovering a new platform, and since those platforms weren't in the derivation "spec" of the needing package, they cannot be relevant. From a capability perspective, we can imagine that the host and target platforms of a package are the capabilities a package requires, and the depending package must provide the capability to the dependency.
@@ -389,23 +260,10 @@ let f(h, h + 1, i) = i + h
- A list of dependencies whose host and target platforms are the new
- derivation's build platform. This means a -1 host and
- -1 target offset from the new derivation's platforms.
- These are programs and libraries used at build time that produce programs
- and libraries also used at build time. If the dependency doesn't care
- about the target platform (i.e. isn't a compiler or similar tool), put it
- in nativeBuildInputs instead. The most common use of
- this buildPackages.stdenv.cc, the default C compiler
- for this role. That example crops up more than one might think in old
- commonly used C libraries.
+ A list of dependencies whose host and target platforms are the new derivation's build platform. This means a -1 host and -1 target offset from the new derivation's platforms. These are programs and libraries used at build time that produce programs and libraries also used at build time. If the dependency doesn't care about the target platform (i.e. isn't a compiler or similar tool), put it in nativeBuildInputs instead. The most common use of this buildPackages.stdenv.cc, the default C compiler for this role. That example crops up more than one might think in old commonly used C libraries.
- Since these packages are able to be run at build-time, they are always
- added to the PATH, as described above. But since these
- packages are only guaranteed to be able to run then, they shouldn't
- persist as run-time dependencies. This isn't currently enforced, but
- could be in the future.
+ Since these packages are able to be run at build-time, they are always added to the PATH, as described above. But since these packages are only guaranteed to be able to run then, they shouldn't persist as run-time dependencies. This isn't currently enforced, but could be in the future.
@@ -415,24 +273,10 @@ let f(h, h + 1, i) = i + h
- A list of dependencies whose host platform is the new derivation's build
- platform, and target platform is the new derivation's host platform. This
- means a -1 host offset and 0 target
- offset from the new derivation's platforms. These are programs and
- libraries used at build-time that, if they are a compiler or similar
- tool, produce code to run at run-time—i.e. tools used to build the new
- derivation. If the dependency doesn't care about the target platform
- (i.e. isn't a compiler or similar tool), put it here, rather than in
- depsBuildBuild or depsBuildTarget.
- This could be called depsBuildHost but
- nativeBuildInputs is used for historical continuity.
+ A list of dependencies whose host platform is the new derivation's build platform, and target platform is the new derivation's host platform. This means a -1 host offset and 0 target offset from the new derivation's platforms. These are programs and libraries used at build-time that, if they are a compiler or similar tool, produce code to run at run-time—i.e. tools used to build the new derivation. If the dependency doesn't care about the target platform (i.e. isn't a compiler or similar tool), put it here, rather than in depsBuildBuild or depsBuildTarget. This could be called depsBuildHost but nativeBuildInputs is used for historical continuity.
- Since these packages are able to be run at build-time, they are added to
- the PATH, as described above. But since these packages are
- only guaranteed to be able to run then, they shouldn't persist as
- run-time dependencies. This isn't currently enforced, but could be in the
- future.
+ Since these packages are able to be run at build-time, they are added to the PATH, as described above. But since these packages are only guaranteed to be able to run then, they shouldn't persist as run-time dependencies. This isn't currently enforced, but could be in the future.
@@ -442,39 +286,13 @@ let f(h, h + 1, i) = i + h
- A list of dependencies whose host platform is the new derivation's build
- platform, and target platform is the new derivation's target platform.
- This means a -1 host offset and 1
- target offset from the new derivation's platforms. These are programs
- used at build time that produce code to run with code produced by the
- depending package. Most commonly, these are tools used to build the
- runtime or standard library that the currently-being-built compiler will
- inject into any code it compiles. In many cases, the
- currently-being-built-compiler is itself employed for that task, but when
- that compiler won't run (i.e. its build and host platform differ) this is
- not possible. Other times, the compiler relies on some other tool, like
- binutils, that is always built separately so that the dependency is
- unconditional.
+ A list of dependencies whose host platform is the new derivation's build platform, and target platform is the new derivation's target platform. This means a -1 host offset and 1 target offset from the new derivation's platforms. These are programs used at build time that produce code to run with code produced by the depending package. Most commonly, these are tools used to build the runtime or standard library that the currently-being-built compiler will inject into any code it compiles. In many cases, the currently-being-built-compiler is itself employed for that task, but when that compiler won't run (i.e. its build and host platform differ) this is not possible. Other times, the compiler relies on some other tool, like binutils, that is always built separately so that the dependency is unconditional.
- This is a somewhat confusing concept to wrap one’s head around, and for
- good reason. As the only dependency type where the platform offsets are
- not adjacent integers, it requires thinking of a bootstrapping stage
- two away from the current one. It and its use-case
- go hand in hand and are both considered poor form: try to not need this
- sort of dependency, and try to avoid building standard libraries and
- runtimes in the same derivation as the compiler produces code using them.
- Instead strive to build those like a normal library, using the
- newly-built compiler just as a normal library would. In short, do not use
- this attribute unless you are packaging a compiler and are sure it is
- needed.
+ This is a somewhat confusing concept to wrap one’s head around, and for good reason. As the only dependency type where the platform offsets are not adjacent integers, it requires thinking of a bootstrapping stage two away from the current one. It and its use-case go hand in hand and are both considered poor form: try to not need this sort of dependency, and try to avoid building standard libraries and runtimes in the same derivation as the compiler produces code using them. Instead strive to build those like a normal library, using the newly-built compiler just as a normal library would. In short, do not use this attribute unless you are packaging a compiler and are sure it is needed.
- Since these packages are able to run at build time, they are added to the
- PATH, as described above. But since these packages are
- only guaranteed to be able to run then, they shouldn't persist as
- run-time dependencies. This isn't currently enforced, but could be in the
- future.
+ Since these packages are able to run at build time, they are added to the PATH, as described above. But since these packages are only guaranteed to be able to run then, they shouldn't persist as run-time dependencies. This isn't currently enforced, but could be in the future.
@@ -484,16 +302,7 @@ let f(h, h + 1, i) = i + h
- A list of dependencies whose host and target platforms match the new
- derivation's host platform. This means a 0 host offset
- and 0 target offset from the new derivation's host
- platform. These are packages used at run-time to generate code also used
- at run-time. In practice, this would usually be tools used by compilers
- for macros or a metaprogramming system, or libraries used by the macros
- or metaprogramming code itself. It's always preferable to use a
- depsBuildBuild dependency in the derivation being
- built over a depsHostHost on the tool doing the
- building for this purpose.
+ A list of dependencies whose host and target platforms match the new derivation's host platform. This means a 0 host offset and 0 target offset from the new derivation's host platform. These are packages used at run-time to generate code also used at run-time. In practice, this would usually be tools used by compilers for macros or a metaprogramming system, or libraries used by the macros or metaprogramming code itself. It's always preferable to use a depsBuildBuild dependency in the derivation being built over a depsHostHost on the tool doing the building for this purpose.
@@ -503,21 +312,10 @@ let f(h, h + 1, i) = i + h
- A list of dependencies whose host platform and target platform match the
- new derivation's. This means a 0 host offset and a
- 1 target offset from the new derivation's host
- platform. This would be called depsHostTarget but for
- historical continuity. If the dependency doesn't care about the target
- platform (i.e. isn't a compiler or similar tool), put it here, rather
- than in depsBuildBuild.
+ A list of dependencies whose host platform and target platform match the new derivation's. This means a 0 host offset and a 1 target offset from the new derivation's host platform. This would be called depsHostTarget but for historical continuity. If the dependency doesn't care about the target platform (i.e. isn't a compiler or similar tool), put it here, rather than in depsBuildBuild.
- These are often programs and libraries used by the new derivation at
- run-time, but that isn't always the case. For
- example, the machine code in a statically-linked library is only used at
- run-time, but the derivation containing the library is only needed at
- build-time. Even in the dynamic case, the library may also be needed at
- build-time to appease the linker.
+ These are often programs and libraries used by the new derivation at run-time, but that isn't always the case. For example, the machine code in a statically-linked library is only used at run-time, but the derivation containing the library is only needed at build-time. Even in the dynamic case, the library may also be needed at build-time to appease the linker.
@@ -527,14 +325,7 @@ let f(h, h + 1, i) = i + h
- A list of dependencies whose host platform matches the new derivation's
- target platform. This means a 1 offset from the new
- derivation's platforms. These are packages that run on the target
- platform, e.g. the standard library or run-time deps of standard library
- that a compiler insists on knowing about. It's poor form in almost all
- cases for a package to depend on another from a future stage [future
- stage corresponding to positive offset]. Do not use this attribute unless
- you are packaging a compiler and are sure it is needed.
+ A list of dependencies whose host platform matches the new derivation's target platform. This means a 1 offset from the new derivation's platforms. These are packages that run on the target platform, e.g. the standard library or run-time deps of standard library that a compiler insists on knowing about. It's poor form in almost all cases for a package to depend on another from a future stage [future stage corresponding to positive offset]. Do not use this attribute unless you are packaging a compiler and are sure it is needed.
@@ -544,9 +335,7 @@ let f(h, h + 1, i) = i + h
- The propagated equivalent of depsBuildBuild. This
- perhaps never ought to be used, but it is included for consistency [see
- below for the others].
+ The propagated equivalent of depsBuildBuild. This perhaps never ought to be used, but it is included for consistency [see below for the others].
@@ -556,18 +345,7 @@ let f(h, h + 1, i) = i + h
- The propagated equivalent of nativeBuildInputs. This
- would be called depsBuildHostPropagated but for
- historical continuity. For example, if package Y has
- propagatedNativeBuildInputs = [X], and package
- Z has buildInputs = [Y], then
- package Z will be built as if it included package
- X in its nativeBuildInputs. If
- instead, package Z has nativeBuildInputs =
- [Y], then Z will be built as if it included
- X in the depsBuildBuild of package
- Z, because of the sum of the two -1
- host offsets.
+ The propagated equivalent of nativeBuildInputs. This would be called depsBuildHostPropagated but for historical continuity. For example, if package Y has propagatedNativeBuildInputs = [X], and package Z has buildInputs = [Y], then package Z will be built as if it included package X in its nativeBuildInputs. If instead, package Z has nativeBuildInputs = [Y], then Z will be built as if it included X in the depsBuildBuild of package Z, because of the sum of the two -1 host offsets.
@@ -577,8 +355,7 @@ let f(h, h + 1, i) = i + h
- The propagated equivalent of depsBuildTarget. This is
- prefixed for the same reason of alerting potential users.
+ The propagated equivalent of depsBuildTarget. This is prefixed for the same reason of alerting potential users.
@@ -598,9 +375,7 @@ let f(h, h + 1, i) = i + h
- The propagated equivalent of buildInputs. This would
- be called depsHostTargetPropagated but for historical
- continuity.
+ The propagated equivalent of buildInputs. This would be called depsHostTargetPropagated but for historical continuity.
@@ -610,8 +385,7 @@ let f(h, h + 1, i) = i + h
- The propagated equivalent of depsTargetTarget. This is
- prefixed for the same reason of alerting potential users.
+ The propagated equivalent of depsTargetTarget. This is prefixed for the same reason of alerting potential users.
@@ -628,15 +402,7 @@ let f(h, h + 1, i) = i + h
- A natural number indicating how much information to log. If set to 1 or
- higher, stdenv will print moderate debugging
- information during the build. In particular, the gcc
- and ld wrapper scripts will print out the complete
- command line passed to the wrapped tools. If set to 6 or higher, the
- stdenv setup script will be run with set
- -x tracing. If set to 7 or higher, the gcc
- and ld wrapper scripts will also be run with
- set -x tracing.
+ A natural number indicating how much information to log. If set to 1 or higher, stdenv will print moderate debugging information during the build. In particular, the gcc and ld wrapper scripts will print out the complete command line passed to the wrapped tools. If set to 6 or higher, the stdenv setup script will be run with set -x tracing. If set to 7 or higher, the gcc and ld wrapper scripts will also be run with set -x tracing.
@@ -650,15 +416,10 @@ let f(h, h + 1, i) = i + h
- If set to true, stdenv will pass
- specific flags to make and other build tools to enable
- parallel building with up to build-cores workers.
+ If set to true, stdenv will pass specific flags to make and other build tools to enable parallel building with up to build-cores workers.
- Unless set to false, some build systems with good
- support for parallel building including cmake,
- meson, and qmake will set it to
- true.
+ Unless set to false, some build systems with good support for parallel building including cmake, meson, and qmake will set it to true.
@@ -672,8 +433,7 @@ let f(h, h + 1, i) = i + h
- This is an attribute set which can be filled with arbitrary values. For
- example:
+ This is an attribute set which can be filled with arbitrary values. For example:
passthru = {
foo = "bar";
@@ -685,29 +445,17 @@ passthru = {
- Values inside it are not passed to the builder, so you can change them
- without triggering a rebuild. However, they can be accessed outside of a
- derivation directly, as if they were set inside a derivation itself, e.g.
- hello.baz.value1. We don't specify any usage or schema
- of passthru - it is meant for values that would be
- useful outside the derivation in other parts of a Nix expression (e.g. in
- other derivations). An example would be to convey some specific
- dependency of your derivation which contains a program with plugins
- support. Later, others who make derivations with plugins can use
- passed-through dependency to ensure that their plugin would be
- binary-compatible with built program.
+ Values inside it are not passed to the builder, so you can change them without triggering a rebuild. However, they can be accessed outside of a derivation directly, as if they were set inside a derivation itself, e.g. hello.baz.value1. We don't specify any usage or schema of passthru - it is meant for values that would be useful outside the derivation in other parts of a Nix expression (e.g. in other derivations). An example would be to convey some specific dependency of your derivation which contains a program with plugins support. Later, others who make derivations with plugins can use passed-through dependency to ensure that their plugin would be binary-compatible with built program.
-
+ passthru.updateScript
- A script to be run by maintainers/scripts/update.nix
- when the package is matched. It needs to be an executable file, either on
- the file system:
+ A script to be run by maintainers/scripts/update.nix when the package is matched. It needs to be an executable file, either on the file system:
passthru.updateScript = ./update.sh;
@@ -723,21 +471,16 @@ passthru.updateScript = writeScript "update-zoom-us" ''
update-source-version zoom-us "$version"
'';
- The attribute can also contain a list, a script followed by arguments to
- be passed to it:
+ The attribute can also contain a list, a script followed by arguments to be passed to it:
passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ];
- The script will be usually run from the root of the Nixpkgs repository
- but you should not rely on that. Also note that the update scripts will
- be run in parallel by default; you should avoid running git
- commit or any other commands that cannot handle that.
+ The script will be usually run from the root of the Nixpkgs repository but you should not rely on that. Also note that the update scripts will be run in parallel by default; you should avoid running git commit or any other commands that cannot handle that.
- For information about how to run the updates, execute
- nix-shell maintainers/scripts/update.nix.
+ For information about how to run the updates, execute nix-shell maintainers/scripts/update.nix.
@@ -747,32 +490,18 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
Phases
- The generic builder has a number of phases. Package
- builds are split into phases to make it easier to override specific parts of
- the build (e.g., unpacking the sources or installing the binaries).
- Furthermore, it allows a nicer presentation of build logs in the Nix build
- farm.
+ The generic builder has a number of phases. Package builds are split into phases to make it easier to override specific parts of the build (e.g., unpacking the sources or installing the binaries). Furthermore, it allows a nicer presentation of build logs in the Nix build farm.
- Each phase can be overridden in its entirety either by setting the
- environment variable namePhase
- to a string containing some shell commands to be executed, or by redefining
- the shell function namePhase.
- The former is convenient to override a phase from the derivation, while the
- latter is convenient from a build script. However, typically one only wants
- to add some commands to a phase, e.g. by defining
- postInstall or preFixup, as skipping
- some of the default actions may have unexpected consequences. The default
- script for each phase is defined in the file pkgs/stdenv/generic/setup.sh.
+ Each phase can be overridden in its entirety either by setting the environment variable namePhase to a string containing some shell commands to be executed, or by redefining the shell function namePhase. The former is convenient to override a phase from the derivation, while the latter is convenient from a build script. However, typically one only wants to add some commands to a phase, e.g. by defining postInstall or preFixup, as skipping some of the default actions may have unexpected consequences. The default script for each phase is defined in the file pkgs/stdenv/generic/setup.sh.
Controlling phases
- There are a number of variables that control what phases are executed and
- in what order:
+ There are a number of variables that control what phases are executed and in what order:
Variables affecting phase control
@@ -781,18 +510,10 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
- Specifies the phases. You can change the order in which phases are
- executed, or add new phases, by setting this variable. If it’s not
- set, the default value is used, which is $prePhases
- unpackPhase patchPhase $preConfigurePhases configurePhase
- $preBuildPhases buildPhase checkPhase $preInstallPhases installPhase
- fixupPhase installCheckPhase $preDistPhases distPhase $postPhases.
+ Specifies the phases. You can change the order in which phases are executed, or add new phases, by setting this variable. If it’s not set, the default value is used, which is $prePhases unpackPhase patchPhase $preConfigurePhases configurePhase $preBuildPhases buildPhase checkPhase $preInstallPhases installPhase fixupPhase installCheckPhase $preDistPhases distPhase $postPhases.
- Usually, if you just want to add a few phases, it’s more convenient
- to set one of the variables below (such as
- preInstallPhases), as you then don’t specify all
- the normal phases.
+ Usually, if you just want to add a few phases, it’s more convenient to set one of the variables below (such as preInstallPhases), as you then don’t specify all the normal phases.
@@ -874,11 +595,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
The unpack phase
- The unpack phase is responsible for unpacking the source code of the
- package. The default implementation of unpackPhase
- unpacks the source files listed in the src environment
- variable to the current directory. It supports the following files by
- default:
+ The unpack phase is responsible for unpacking the source code of the package. The default implementation of unpackPhase unpacks the source files listed in the src environment variable to the current directory. It supports the following files by default:
@@ -886,13 +603,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
- These can optionally be compressed using gzip
- (.tar.gz, .tgz or
- .tar.Z), bzip2
- (.tar.bz2, .tbz2 or
- .tbz) or xz
- (.tar.xz, .tar.lzma or
- .txz).
+ These can optionally be compressed using gzip (.tar.gz, .tgz or .tar.Z), bzip2 (.tar.bz2, .tbz2 or .tbz) or xz (.tar.xz, .tar.lzma or .txz).
@@ -902,9 +613,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
- Zip files are unpacked using unzip. However,
- unzip is not in the standard environment, so you
- should add it to nativeBuildInputs yourself.
+ Zip files are unpacked using unzip. However, unzip is not in the standard environment, so you should add it to nativeBuildInputs yourself.
@@ -914,16 +623,12 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
- These are simply copied to the current directory. The hash part of the
- file name is stripped, e.g.
- /nix/store/1wydxgby13cz...-my-sources would be
- copied to my-sources.
+ These are simply copied to the current directory. The hash part of the file name is stripped, e.g. /nix/store/1wydxgby13cz...-my-sources would be copied to my-sources.
- Additional file types can be supported by setting the
- unpackCmd variable (see below).
+ Additional file types can be supported by setting the unpackCmd variable (see below).
@@ -936,8 +641,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
- The list of source files or directories to be unpacked or copied. One of
- these must be set.
+ The list of source files or directories to be unpacked or copied. One of these must be set.
@@ -947,10 +651,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
- After running unpackPhase, the generic builder
- changes the current directory to the directory created by unpacking the
- sources. If there are multiple source directories, you should set
- sourceRoot to the name of the intended directory.
+ After running unpackPhase, the generic builder changes the current directory to the directory created by unpacking the sources. If there are multiple source directories, you should set sourceRoot to the name of the intended directory.
@@ -960,10 +661,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
- Alternatively to setting sourceRoot, you can set
- setSourceRoot to a shell command to be evaluated by
- the unpack phase after the sources have been unpacked. This command must
- set sourceRoot.
+ Alternatively to setting sourceRoot, you can set setSourceRoot to a shell command to be evaluated by the unpack phase after the sources have been unpacked. This command must set sourceRoot.
@@ -1003,10 +701,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
- If set to 1, the unpacked sources are
- not made writable. By default, they are made
- writable to prevent problems with read-only sources. For example, copied
- store directories would be read-only without this.
+ If set to 1, the unpacked sources are not made writable. By default, they are made writable to prevent problems with read-only sources. For example, copied store directories would be read-only without this.
@@ -1016,9 +711,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
- The unpack phase evaluates the string $unpackCmd for
- any unrecognised file. The path to the current source file is contained
- in the curSrc variable.
+ The unpack phase evaluates the string $unpackCmd for any unrecognised file. The path to the current source file is contained in the curSrc variable.
@@ -1029,8 +722,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
The patch phase
- The patch phase applies the list of patches defined in the
- patches variable.
+ The patch phase applies the list of patches defined in the patches variable.
@@ -1041,11 +733,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
- The list of patches. They must be in the format accepted by the
- patch command, and may optionally be compressed using
- gzip (.gz),
- bzip2 (.bz2) or
- xz (.xz).
+ The list of patches. They must be in the format accepted by the patch command, and may optionally be compressed using gzip (.gz), bzip2 (.bz2) or xz (.xz).
@@ -1055,9 +743,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
- Flags to be passed to patch. If not set, the argument
- is used, which causes the leading directory
- component to be stripped from the file names in each patch.
+ Flags to be passed to patch. If not set, the argument is used, which causes the leading directory component to be stripped from the file names in each patch.
@@ -1088,9 +774,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
The configure phase
- The configure phase prepares the source tree for building. The default
- configurePhase runs ./configure
- (typically an Autoconf-generated script) if it exists.
+ The configure phase prepares the source tree for building. The default configurePhase runs ./configure (typically an Autoconf-generated script) if it exists.
@@ -1101,10 +785,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
- The name of the configure script. It defaults to
- ./configure if it exists; otherwise, the configure
- phase is skipped. This can actually be a command (like perl
- ./Configure.pl).
+ The name of the configure script. It defaults to ./configure if it exists; otherwise, the configure phase is skipped. This can actually be a command (like perl ./Configure.pl).
@@ -1114,8 +795,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
- A list of strings passed as additional arguments to the configure
- script.
+ A list of strings passed as additional arguments to the configure script.
@@ -1135,9 +815,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
- A shell array containing additional arguments passed to the configure
- script. You must use this instead of configureFlags
- if the arguments contain spaces.
+ A shell array containing additional arguments passed to the configure script. You must use this instead of configureFlags if the arguments contain spaces.
@@ -1147,8 +825,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
- By default, the flag --prefix=$prefix is added to the
- configure flags. If this is undesirable, set this variable to true.
+ By default, the flag --prefix=$prefix is added to the configure flags. If this is undesirable, set this variable to true.
@@ -1158,9 +835,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
- The prefix under which the package must be installed, passed via the
- option to the configure script. It defaults to
- .
+ The prefix under which the package must be installed, passed via the option to the configure script. It defaults to .
@@ -1170,8 +845,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
- The key to use when specifying the prefix. By default, this is set to
- as that is used by the majority of packages.
+ The key to use when specifying the prefix. By default, this is set to as that is used by the majority of packages.
@@ -1181,9 +855,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
- By default, the flag --disable-dependency-tracking is
- added to the configure flags to speed up Automake-based builds. If this
- is undesirable, set this variable to true.
+ By default, the flag --disable-dependency-tracking is added to the configure flags to speed up Automake-based builds. If this is undesirable, set this variable to true.
@@ -1193,15 +865,10 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
- By default, the configure phase applies some special hackery to all
- files called ltmain.sh before running the configure
- script in order to improve the purity of Libtool-based packages
+ By default, the configure phase applies some special hackery to all files called ltmain.sh before running the configure script in order to improve the purity of Libtool-based packages
- It clears the
- sys_lib_*search_path
- variables in the Libtool script to prevent Libtool from using
- libraries in /usr/lib and such.
+ It clears the sys_lib_*search_path variables in the Libtool script to prevent Libtool from using libraries in /usr/lib and such.
. If this is undesirable, set this variable to true.
@@ -1214,9 +881,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
- By default, when the configure script has
- , the option
- is added to the configure flags.
+ By default, when the configure script has , the option is added to the configure flags.
If this is undesirable, set this variable to true.
@@ -1229,16 +894,10 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
- By default, when cross compiling, the configure script has
- and passed.
- Packages can instead pass [ "build" "host" "target" ]
- or a subset to control exactly which platform flags are passed.
- Compilers and other tools can use this to also pass the target platform.
+ By default, when cross compiling, the configure script has and passed. Packages can instead pass [ "build" "host" "target" ] or a subset to control exactly which platform flags are passed. Compilers and other tools can use this to also pass the target platform.
- Eventually these will be passed building natively as well, to improve
- determinism: build-time guessing, as is done today, is a risk of
- impurity.
+ Eventually these will be passed building natively as well, to improve determinism: build-time guessing, as is done today, is a risk of impurity.
@@ -1271,12 +930,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
The build phase
- The build phase is responsible for actually building the package (e.g.
- compiling it). The default buildPhase simply calls
- make if a file named Makefile,
- makefile or GNUmakefile exists in
- the current directory (or the makefile is explicitly
- set); otherwise it does nothing.
+ The build phase is responsible for actually building the package (e.g. compiling it). The default buildPhase simply calls make if a file named Makefile, makefile or GNUmakefile exists in the current directory (or the makefile is explicitly set); otherwise it does nothing.
@@ -1307,17 +961,13 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
- A list of strings passed as additional flags to make.
- These flags are also used by the default install and check phase. For
- setting make flags specific to the build phase, use
- buildFlags (see below).
+ A list of strings passed as additional flags to make. These flags are also used by the default install and check phase. For setting make flags specific to the build phase, use buildFlags (see below).
makeFlags = [ "PREFIX=$(out)" ];
- The flags are quoted in bash, but environment variables can be
- specified by using the make syntax.
+ The flags are quoted in bash, but environment variables can be specified by using the make syntax.
@@ -1329,18 +979,13 @@ makeFlags = [ "PREFIX=$(out)" ];
- A shell array containing additional arguments passed to
- make. You must use this instead of
- makeFlags if the arguments contain spaces, e.g.
+ A shell array containing additional arguments passed to make. You must use this instead of makeFlags if the arguments contain spaces, e.g.
preBuild = ''
makeFlagsArray+=(CFLAGS="-O0 -g" LDFLAGS="-lfoo -lbar")
'';
- Note that shell arrays cannot be passed through environment variables,
- so you cannot set makeFlagsArray in a derivation
- attribute (because those are passed through environment variables): you
- have to define them in shell code.
+ Note that shell arrays cannot be passed through environment variables, so you cannot set makeFlagsArray in a derivation attribute (because those are passed through environment variables): you have to define them in shell code.
@@ -1350,9 +995,7 @@ preBuild = ''
- A list of strings passed as additional flags to make.
- Like makeFlags and makeFlagsArray,
- but only used by the build phase.
+ A list of strings passed as additional flags to make. Like makeFlags and makeFlagsArray, but only used by the build phase.
@@ -1379,14 +1022,11 @@ preBuild = ''
- You can set flags for make through the
- makeFlags variable.
+ You can set flags for make through the makeFlags variable.
- Before and after running make, the hooks
- preBuild and postBuild are called,
- respectively.
+ Before and after running make, the hooks preBuild and postBuild are called, respectively.
@@ -1394,10 +1034,7 @@ preBuild = ''
The check phase
- The check phase checks whether the package was built correctly by running
- its test suite. The default checkPhase calls
- make check, but only if the doCheck
- variable is enabled.
+ The check phase checks whether the package was built correctly by running its test suite. The default checkPhase calls make check, but only if the doCheck variable is enabled.
@@ -1408,14 +1045,9 @@ preBuild = ''
- Controls whether the check phase is executed. By default it is skipped,
- but if doCheck is set to true, the check phase is
- usually executed. Thus you should set
+ Controls whether the check phase is executed. By default it is skipped, but if doCheck is set to true, the check phase is usually executed. Thus you should set
doCheck = true;
- in the derivation to enable checks. The exception is cross compilation.
- Cross compiled builds never run tests, no matter how
- doCheck is set, as the newly-built program won't run
- on the platform used to build it.
+ in the derivation to enable checks. The exception is cross compilation. Cross compiled builds never run tests, no matter how doCheck is set, as the newly-built program won't run on the platform used to build it.
@@ -1435,8 +1067,7 @@ preBuild = ''
- The make target that runs the tests. Defaults to
- check.
+ The make target that runs the tests. Defaults to check.
@@ -1446,9 +1077,7 @@ preBuild = ''
- A list of strings passed as additional flags to make.
- Like makeFlags and makeFlagsArray,
- but only used by the check phase.
+ A list of strings passed as additional flags to make. Like makeFlags and makeFlagsArray, but only used by the check phase.
@@ -1458,9 +1087,7 @@ preBuild = ''
- A list of dependencies used by the phase. This gets included in
- nativeBuildInputs when doCheck is
- set.
+ A list of dependencies used by the phase. This gets included in nativeBuildInputs when doCheck is set.
@@ -1491,10 +1118,7 @@ preBuild = ''
The install phase
- The install phase is responsible for installing the package in the Nix
- store under out. The default
- installPhase creates the directory
- $out and calls make install.
+ The install phase is responsible for installing the package in the Nix store under out. The default installPhase creates the directory $out and calls make install.
@@ -1515,8 +1139,7 @@ preBuild = ''
- The make targets that perform the installation. Defaults to
- install. Example:
+ The make targets that perform the installation. Defaults to install. Example:
installTargets = "install-bin install-doc";
@@ -1528,9 +1151,7 @@ installTargets = "install-bin install-doc";
- A list of strings passed as additional flags to make.
- Like makeFlags and makeFlagsArray,
- but only used by the install phase.
+ A list of strings passed as additional flags to make. Like makeFlags and makeFlagsArray, but only used by the install phase.
@@ -1561,15 +1182,11 @@ installTargets = "install-bin install-doc";
The fixup phase
- The fixup phase performs some (Nix-specific) post-processing actions on the
- files installed under $out by the install phase. The
- default fixupPhase does the following:
+ The fixup phase performs some (Nix-specific) post-processing actions on the files installed under $out by the install phase. The default fixupPhase does the following:
- It moves the man/, doc/ and
- info/ subdirectories of $out to
- share/.
+ It moves the man/, doc/ and info/ subdirectories of $out to share/.
@@ -1579,19 +1196,12 @@ installTargets = "install-bin install-doc";
- On Linux, it applies the patchelf command to ELF
- executables and libraries to remove unused directories from the
- RPATH in order to prevent unnecessary runtime
- dependencies.
+ On Linux, it applies the patchelf command to ELF executables and libraries to remove unused directories from the RPATH in order to prevent unnecessary runtime dependencies.
- It rewrites the interpreter paths of shell scripts to paths found in
- PATH. E.g., /usr/bin/perl will be
- rewritten to
- /nix/store/some-perl/bin/perl
- found in PATH.
+ It rewrites the interpreter paths of shell scripts to paths found in PATH. E.g., /usr/bin/perl will be rewritten to /nix/store/some-perl/bin/perl found in PATH.
@@ -1599,14 +1209,23 @@ installTargets = "install-bin install-doc";
Variables controlling the fixup phase
+
+
+ dontFixup
+
+
+
+ Set to true to skip the fixup phase.
+
+
+ dontStrip
- If set, libraries and executables are not stripped. By default, they
- are.
+ If set, libraries and executables are not stripped. By default, they are.
@@ -1616,10 +1235,7 @@ installTargets = "install-bin install-doc";
- Like dontStrip, but only affects the
- strip command targetting the package's host platform.
- Useful when supporting cross compilation, but otherwise feel free to
- ignore.
+ Like dontStrip, but only affects the strip command targetting the package's host platform. Useful when supporting cross compilation, but otherwise feel free to ignore.
@@ -1629,10 +1245,7 @@ installTargets = "install-bin install-doc";
- Like dontStrip, but only affects the
- strip command targetting the packages' target
- platform. Useful when supporting cross compilation, but otherwise feel
- free to ignore.
+ Like dontStrip, but only affects the strip command targetting the packages' target platform. Useful when supporting cross compilation, but otherwise feel free to ignore.
@@ -1642,8 +1255,7 @@ installTargets = "install-bin install-doc";
- If set, files in $out/sbin are not moved to
- $out/bin. By default, they are.
+ If set, files in $out/sbin are not moved to $out/bin. By default, they are.
@@ -1653,10 +1265,7 @@ installTargets = "install-bin install-doc";
- List of directories to search for libraries and executables from which
- all symbols should be stripped. By default, it’s
- empty. Stripping all symbols is risky, since it may remove not just
- debug symbols but also ELF information necessary for normal execution.
+ List of directories to search for libraries and executables from which all symbols should be stripped. By default, it’s empty. Stripping all symbols is risky, since it may remove not just debug symbols but also ELF information necessary for normal execution.
@@ -1666,9 +1275,7 @@ installTargets = "install-bin install-doc";
- Flags passed to the strip command applied to the
- files in the directories listed in stripAllList.
- Defaults to (i.e. ).
+ Flags passed to the strip command applied to the files in the directories listed in stripAllList. Defaults to (i.e. ).
@@ -1678,9 +1285,7 @@ installTargets = "install-bin install-doc";
- List of directories to search for libraries and executables from which
- only debugging-related symbols should be stripped. It defaults to
- lib bin sbin.
+ List of directories to search for libraries and executables from which only debugging-related symbols should be stripped. It defaults to lib bin sbin.
@@ -1690,9 +1295,7 @@ installTargets = "install-bin install-doc";
- Flags passed to the strip command applied to the
- files in the directories listed in stripDebugList.
- Defaults to (i.e. ).
+ Flags passed to the strip command applied to the files in the directories listed in stripDebugList. Defaults to (i.e. ).
@@ -1702,8 +1305,7 @@ installTargets = "install-bin install-doc";
- If set, the patchelf command is not used to remove
- unnecessary RPATH entries. Only applies to Linux.
+ If set, the patchelf command is not used to remove unnecessary RPATH entries. Only applies to Linux.
@@ -1713,8 +1315,7 @@ installTargets = "install-bin install-doc";
- If set, scripts starting with #! do not have their
- interpreter paths rewritten to paths in the Nix store.
+ If set, scripts starting with #! do not have their interpreter paths rewritten to paths in the Nix store.
@@ -1724,9 +1325,7 @@ installTargets = "install-bin install-doc";
- If set, libtool .la files associated with shared
- libraries won't have their dependency_libs field
- cleared.
+ If set, libtool .la files associated with shared libraries won't have their dependency_libs field cleared.
@@ -1736,9 +1335,7 @@ installTargets = "install-bin install-doc";
- The list of directories that must be moved from
- $out to $out/share. Defaults
- to man doc info.
+ The list of directories that must be moved from $out to $out/share. Defaults to man doc info.
@@ -1748,11 +1345,7 @@ installTargets = "install-bin install-doc";
- A package can export a setup
- hook by setting this variable. The setup hook, if defined, is
- copied to $out/nix-support/setup-hook. Environment
- variables are then substituted in it using
- setup hook by setting this variable. The setup hook, if defined, is copied to $out/nix-support/setup-hook. Environment variables are then substituted in it using substituteAll.
@@ -1783,25 +1376,14 @@ installTargets = "install-bin install-doc";
- If set to true, the standard environment will enable
- debug information in C/C++ builds. After installation, the debug
- information will be separated from the executables and stored in the
- output named debug. (This output is enabled
- automatically; you don’t need to set the outputs
- attribute explicitly.) To be precise, the debug information is stored in
- debug/lib/debug/.build-id/XX/YYYY…,
- where XXYYYY… is the build
- ID of the binary — a SHA-1 hash of the contents of the
- binary. Debuggers like GDB use the build ID to look up the separated
- debug information.
+ If set to true, the standard environment will enable debug information in C/C++ builds. After installation, the debug information will be separated from the executables and stored in the output named debug. (This output is enabled automatically; you don’t need to set the outputs attribute explicitly.) To be precise, the debug information is stored in debug/lib/debug/.build-id/XX/YYYY…, where XXYYYY… is the build ID of the binary — a SHA-1 hash of the contents of the binary. Debuggers like GDB use the build ID to look up the separated debug information.
For example, with GDB, you can add
set debug-file-directory ~/.nix-profile/lib/debug
- to ~/.gdbinit. GDB will then be able to find debug
- information installed via nix-env -i.
+ to ~/.gdbinit. GDB will then be able to find debug information installed via nix-env -i.
@@ -1812,10 +1394,7 @@ set debug-file-directory ~/.nix-profile/lib/debug
The installCheck phase
- The installCheck phase checks whether the package was installed correctly
- by running its test suite against the installed directories. The default
- installCheck calls make
- installcheck.
+ The installCheck phase checks whether the package was installed correctly by running its test suite against the installed directories. The default installCheck calls make installcheck.
@@ -1826,14 +1405,9 @@ set debug-file-directory ~/.nix-profile/lib/debug
- Controls whether the installCheck phase is executed. By default it is
- skipped, but if doInstallCheck is set to true, the
- installCheck phase is usually executed. Thus you should set
+ Controls whether the installCheck phase is executed. By default it is skipped, but if doInstallCheck is set to true, the installCheck phase is usually executed. Thus you should set
doInstallCheck = true;
- in the derivation to enable install checks. The exception is cross
- compilation. Cross compiled builds never run tests, no matter how
- doInstallCheck is set, as the newly-built program
- won't run on the platform used to build it.
+ in the derivation to enable install checks. The exception is cross compilation. Cross compiled builds never run tests, no matter how doInstallCheck is set, as the newly-built program won't run on the platform used to build it.
@@ -1843,8 +1417,7 @@ set debug-file-directory ~/.nix-profile/lib/debug
- The make target that runs the install tests. Defaults to
- installcheck.
+ The make target that runs the install tests. Defaults to installcheck.
@@ -1854,9 +1427,7 @@ set debug-file-directory ~/.nix-profile/lib/debug
- A list of strings passed as additional flags to make.
- Like makeFlags and makeFlagsArray,
- but only used by the installCheck phase.
+ A list of strings passed as additional flags to make. Like makeFlags and makeFlagsArray, but only used by the installCheck phase.
@@ -1866,9 +1437,7 @@ set debug-file-directory ~/.nix-profile/lib/debug
- A list of dependencies used by the phase. This gets included in
- nativeBuildInputs when
- doInstallCheck is set.
+ A list of dependencies used by the phase. This gets included in nativeBuildInputs when doInstallCheck is set.
@@ -1899,11 +1468,7 @@ set debug-file-directory ~/.nix-profile/lib/debug
The distribution phase
- The distribution phase is intended to produce a source distribution of the
- package. The default distPhase first calls
- make dist, then it copies the resulting source tarballs
- to $out/tarballs/. This phase is only executed if the
- attribute doDist is set.
+ The distribution phase is intended to produce a source distribution of the package. The default distPhase first calls make dist, then it copies the resulting source tarballs to $out/tarballs/. This phase is only executed if the attribute doDist is set.
@@ -1914,8 +1479,7 @@ set debug-file-directory ~/.nix-profile/lib/debug
- The make target that produces the distribution. Defaults to
- dist.
+ The make target that produces the distribution. Defaults to dist.
@@ -1935,9 +1499,7 @@ set debug-file-directory ~/.nix-profile/lib/debug
- The names of the source distribution files to be copied to
- $out/tarballs/. It can contain shell wildcards. The
- default is *.tar.gz.
+ The names of the source distribution files to be copied to $out/tarballs/. It can contain shell wildcards. The default is *.tar.gz.
@@ -1988,8 +1550,7 @@ set debug-file-directory ~/.nix-profile/lib/debug
- Constructs a wrapper for a program with various possible arguments. For
- example:
+ Constructs a wrapper for a program with various possible arguments. For example:
# adds `FOOBAR=baz` to `$out/bin/foo`’s environment
makeWrapper $out/bin/foo $wrapperfile --set FOOBAR baz
@@ -1999,12 +1560,10 @@ makeWrapper $out/bin/foo $wrapperfile --set FOOBAR baz
# (via string replacements or in `configurePhase`).
makeWrapper $out/bin/foo $wrapperfile --prefix PATH : ${lib.makeBinPath [ hello git ]}
- There’s many more kinds of arguments, they are documented in
- nixpkgs/pkgs/build-support/setup-hooks/make-wrapper.sh.
+ There’s many more kinds of arguments, they are documented in nixpkgs/pkgs/build-support/setup-hooks/make-wrapper.sh.
- wrapProgram is a convenience function you probably
- want to use most of the time.
+ wrapProgram is a convenience function you probably want to use most of the time.
@@ -2014,10 +1573,7 @@ makeWrapper $out/bin/foo $wrapperfile --prefix PATH : ${lib.makeBinPath [ hello
- Performs string substitution on the contents of
- infile, writing the result to
- outfile. The substitutions in
- subs are of the following form:
+ Performs string substitution on the contents of infile, writing the result to outfile. The substitutions in subs are of the following form:
@@ -2025,8 +1581,7 @@ makeWrapper $out/bin/foo $wrapperfile --prefix PATH : ${lib.makeBinPath [ hello
- Replace every occurrence of the string s1
- by s2.
+ Replace every occurrence of the string s1 by s2.
@@ -2036,13 +1591,7 @@ makeWrapper $out/bin/foo $wrapperfile --prefix PATH : ${lib.makeBinPath [ hello
- Replace every occurrence of
- @varName@ by the
- contents of the environment variable
- varName. This is useful for generating
- files from templates, using
- @...@ in the template
- as placeholders.
+ Replace every occurrence of @varName@ by the contents of the environment variable varName. This is useful for generating files from templates, using @...@ in the template as placeholders.
@@ -2052,9 +1601,7 @@ makeWrapper $out/bin/foo $wrapperfile --prefix PATH : ${lib.makeBinPath [ hello
- Replace every occurrence of
- @varName@ by the string
- s.
+ Replace every occurrence of @varName@ by the string s.
@@ -2070,14 +1617,8 @@ substitute ./foo.in ./foo.out \
- substitute is implemented using the
- replace
- command. Unlike with the sed command, you don’t have
- to worry about escaping special characters. It supports performing
- substitutions on binary files (such as executables), though there
- you’ll probably want to make sure that the replacement string is as
- long as the replaced string.
+ substitute is implemented using the replace command. Unlike with the sed command, you don’t have to worry about escaping special characters. It supports performing substitutions on binary files (such as executables), though there you’ll probably want to make sure that the replacement string is as long as the replaced string.
@@ -2087,8 +1628,7 @@ substitute ./foo.in ./foo.out \
- Like substitute, but performs the substitutions in
- place on the file file.
+ Like substitute, but performs the substitutions in place on the file file.
@@ -2098,22 +1638,13 @@ substitute ./foo.in ./foo.out \
- Replaces every occurrence of
- @varName@, where
- varName is any environment variable, in
- infile, writing the result to
- outfile. For instance, if
- infile has the contents
+ Replaces every occurrence of @varName@, where varName is any environment variable, in infile, writing the result to outfile. For instance, if infile has the contents
#! @bash@/bin/sh
PATH=@coreutils@/bin
echo @foo@
- and the environment contains
- bash=/nix/store/bmwp0q28cf21...-bash-3.2-p39 and
- coreutils=/nix/store/68afga4khv0w...-coreutils-6.12,
- but does not contain the variable foo, then the output
- will be
+ and the environment contains bash=/nix/store/bmwp0q28cf21...-bash-3.2-p39 and coreutils=/nix/store/68afga4khv0w...-coreutils-6.12, but does not contain the variable foo, then the output will be
#! /nix/store/bmwp0q28cf21...-bash-3.2-p39/bin/sh
PATH=/nix/store/68afga4khv0w...-coreutils-6.12/bin
@@ -2122,13 +1653,7 @@ echo @foo@
That is, no substitution is performed for undefined variables.
- Environment variables that start with an uppercase letter or an
- underscore are filtered out, to prevent global variables (like
- HOME) or private variables (like
- __ETC_PROFILE_DONE) from accidentally getting
- substituted. The variables also have to be valid bash “names”, as
- defined in the bash manpage (alphanumeric or _, must
- not start with a number).
+ Environment variables that start with an uppercase letter or an underscore are filtered out, to prevent global variables (like HOME) or private variables (like __ETC_PROFILE_DONE) from accidentally getting substituted. The variables also have to be valid bash “names”, as defined in the bash manpage (alphanumeric or _, must not start with a number).
@@ -2138,8 +1663,7 @@ echo @foo@
- Like substituteAll, but performs the substitutions
- in place on the file file.
+ Like substituteAll, but performs the substitutions in place on the file file.
@@ -2149,14 +1673,12 @@ echo @foo@
- Strips the directory and hash part of a store path, outputting the name
- part to stdout. For example:
+ Strips the directory and hash part of a store path, outputting the name part to stdout. For example:
# prints coreutils-8.24
stripHash "/nix/store/9s9r019176g7cvn2nvcw41gsp862y6b4-coreutils-8.24"
- If you wish to store the result in another variable, then the following
- idiom may be useful:
+ If you wish to store the result in another variable, then the following idiom may be useful:
name="/nix/store/9s9r019176g7cvn2nvcw41gsp862y6b4-coreutils-8.24"
someVar=$(stripHash $name)
@@ -2170,13 +1692,10 @@ someVar=$(stripHash $name)
- Convenience function for makeWrapper that
- automatically creates a sane wrapper file It takes all the same arguments
- as makeWrapper, except for --argv0.
+ Convenience function for makeWrapper that automatically creates a sane wrapper file. It takes all the same arguments as makeWrapper, except for --argv0.
- It cannot be applied multiple times, since it will overwrite the wrapper
- file.
+ It cannot be applied multiple times, since it will overwrite the wrapper file.
@@ -2186,85 +1705,34 @@ someVar=$(stripHash $name)
Package setup hooks
- Nix itself considers a build-time dependency as merely something that should
- previously be built and accessible at build time—packages themselves are
- on their own to perform any additional setup. In most cases, that is fine,
- and the downstream derivation can deal with its own dependencies. But for a
- few common tasks, that would result in almost every package doing the same
- sort of setup work—depending not on the package itself, but entirely on
- which dependencies were used.
+ Nix itself considers a build-time dependency as merely something that should previously be built and accessible at build time—packages themselves are on their own to perform any additional setup. In most cases, that is fine, and the downstream derivation can deal with its own dependencies. But for a few common tasks, that would result in almost every package doing the same sort of setup work—depending not on the package itself, but entirely on which dependencies were used.
- In order to alleviate this burden, the setup hook
- mechanism was written, where any package can include a shell script that [by
- convention rather than enforcement by Nix], any downstream
- reverse-dependency will source as part of its build process. That allows the
- downstream dependency to merely specify its dependencies, and lets those
- dependencies effectively initialize themselves. No boilerplate mirroring the
- list of dependencies is needed.
+ In order to alleviate this burden, the setup hook mechanism was written, where any package can include a shell script that [by convention rather than enforcement by Nix], any downstream reverse-dependency will source as part of its build process. That allows the downstream dependency to merely specify its dependencies, and lets those dependencies effectively initialize themselves. No boilerplate mirroring the list of dependencies is needed.
- The setup hook mechanism is a bit of a sledgehammer though: a powerful
- feature with a broad and indiscriminate area of effect. The combination of
- its power and implicit use may be expedient, but isn't without costs. Nix
- itself is unchanged, but the spirit of added dependencies being effect-free
- is violated even if the letter isn't. For example, if a derivation path is
- mentioned more than once, Nix itself doesn't care and simply makes sure the
- dependency derivation is already built just the same—depending is just
- needing something to exist, and needing is idempotent. However, a dependency
- specified twice will have its setup hook run twice, and that could easily
- change the build environment (though a well-written setup hook will
- therefore strive to be idempotent so this is in fact not observable). More
- broadly, setup hooks are anti-modular in that multiple dependencies, whether
- the same or different, should not interfere and yet their setup hooks may
- well do so.
+ The setup hook mechanism is a bit of a sledgehammer though: a powerful feature with a broad and indiscriminate area of effect. The combination of its power and implicit use may be expedient, but isn't without costs. Nix itself is unchanged, but the spirit of added dependencies being effect-free is violated even if the letter isn't. For example, if a derivation path is mentioned more than once, Nix itself doesn't care and simply makes sure the dependency derivation is already built just the same—depending is just needing something to exist, and needing is idempotent. However, a dependency specified twice will have its setup hook run twice, and that could easily change the build environment (though a well-written setup hook will therefore strive to be idempotent so this is in fact not observable). More broadly, setup hooks are anti-modular in that multiple dependencies, whether the same or different, should not interfere and yet their setup hooks may well do so.
- The most typical use of the setup hook is actually to add other hooks which
- are then run (i.e. after all the setup hooks) on each dependency. For
- example, the C compiler wrapper's setup hook feeds itself flags for each
- dependency that contains relevant libraries and headers. This is done by
- defining a bash function, and appending its name to one of
- envBuildBuildHooks`, envBuildHostHooks`,
- envBuildTargetHooks`, envHostHostHooks`,
- envHostTargetHooks`, or envTargetTargetHooks`.
- These 6 bash variables correspond to the 6 sorts of dependencies by platform
- (there's 12 total but we ignore the propagated/non-propagated axis).
+ The most typical use of the setup hook is actually to add other hooks which are then run (i.e. after all the setup hooks) on each dependency. For example, the C compiler wrapper's setup hook feeds itself flags for each dependency that contains relevant libraries and headers. This is done by defining a bash function, and appending its name to one of envBuildBuildHooks`, envBuildHostHooks`, envBuildTargetHooks`, envHostHostHooks`, envHostTargetHooks`, or envTargetTargetHooks`. These 6 bash variables correspond to the 6 sorts of dependencies by platform (there's 12 total but we ignore the propagated/non-propagated axis).
- Packages adding a hook should not hard code a specific hook, but rather
- choose a variable relative to how they are included.
- Returning to the C compiler wrapper example, if the wrapper itself is an
- n dependency, then it only wants to accumulate flags from
- n + 1 dependencies, as only those ones match the
- compiler's target platform. The hostOffset variable is
- defined with the current dependency's host offset
- targetOffset with its target offset, before its setup hook is
- sourced. Additionally, since most environment hooks don't care about the
- target platform, that means the setup hook can append to the right bash
- array by doing something like
+ Packages adding a hook should not hard code a specific hook, but rather choose a variable relative to how they are included. Returning to the C compiler wrapper example, if the wrapper itself is an n dependency, then it only wants to accumulate flags from n + 1 dependencies, as only those ones match the compiler's target platform. The hostOffset variable is defined with the current dependency's host offset targetOffset with its target offset, before its setup hook is sourced. Additionally, since most environment hooks don't care about the target platform, that means the setup hook can append to the right bash array by doing something like
addEnvHooks "$hostOffset" myBashFunction
- The existence of setups hooks has long been documented
- and packages inside Nixpkgs are free to use this mechanism. Other packages,
- however, should not rely on these mechanisms not changing between Nixpkgs
- versions. Because of the existing issues with this system, there's little
- benefit from mandating it be stable for any period of time.
+ The existence of setups hooks has long been documented and packages inside Nixpkgs are free to use this mechanism. Other packages, however, should not rely on these mechanisms not changing between Nixpkgs versions. Because of the existing issues with this system, there's little benefit from mandating it be stable for any period of time.
- First, let’s cover some setup hooks that are part of Nixpkgs default
- stdenv. This means that they are run for every package built using
- stdenv.mkDerivation. Some of these are platform
- specific, so they may run on Linux but not Darwin or vice-versa.
+ First, let’s cover some setup hooks that are part of Nixpkgs default stdenv. This means that they are run for every package built using stdenv.mkDerivation. Some of these are platform specific, so they may run on Linux but not Darwin or vice-versa.
@@ -2272,10 +1740,7 @@ addEnvHooks "$hostOffset" myBashFunction
- This setup hook moves any installed documentation to the
- /share subdirectory directory. This includes the man,
- doc and info directories. This is needed for legacy programs that do not
- know how to use the share subdirectory.
+ This setup hook moves any installed documentation to the /share subdirectory directory. This includes the man, doc and info directories. This is needed for legacy programs that do not know how to use the share subdirectory.
@@ -2285,9 +1750,7 @@ addEnvHooks "$hostOffset" myBashFunction
- This setup hook compresses any man pages that have been installed. The
- compression is done using the gzip program. This helps to reduce the
- installed size of packages.
+ This setup hook compresses any man pages that have been installed. The compression is done using the gzip program. This helps to reduce the installed size of packages.
@@ -2297,9 +1760,7 @@ addEnvHooks "$hostOffset" myBashFunction
- This runs the strip command on installed binaries and libraries. This
- removes unnecessary information like debug symbols when they are not
- needed. This also helps to reduce the installed size of packages.
+ This runs the strip command on installed binaries and libraries. This removes unnecessary information like debug symbols when they are not needed. This also helps to reduce the installed size of packages.
@@ -2309,12 +1770,7 @@ addEnvHooks "$hostOffset" myBashFunction
- This setup hook patches installed scripts to use the full path to the
- shebang interpreter. A shebang interpreter is the first commented line
- of a script telling the operating system which program will run the
- script (e.g #!/bin/bash). In Nix, we want an exact
- path to that interpreter to be used. This often replaces
- /bin/sh with a path in the Nix store.
+ This setup hook patches installed scripts to use the full path to the shebang interpreter. A shebang interpreter is the first commented line of a script telling the operating system which program will run the script (e.g #!/bin/bash). In Nix, we want an exact path to that interpreter to be used. This often replaces /bin/sh with a path in the Nix store.
@@ -2324,10 +1780,7 @@ addEnvHooks "$hostOffset" myBashFunction
- This verifies that no references are left from the install binaries to
- the directory used to build those binaries. This ensures that the
- binaries do not need things outside the Nix store. This is currently
- supported in Linux only.
+ This verifies that no references are left from the install binaries to the directory used to build those binaries. This ensures that the binaries do not need things outside the Nix store. This is currently supported in Linux only.
@@ -2337,12 +1790,7 @@ addEnvHooks "$hostOffset" myBashFunction
- This setup hook adds configure flags that tell packages to install files
- into any one of the proper outputs listed in outputs.
- This behavior can be turned off by setting
- setOutputFlags to false in the derivation
- environment. See for more
- information.
+ This setup hook adds configure flags that tell packages to install files into any one of the proper outputs listed in outputs. This behavior can be turned off by setting setOutputFlags to false in the derivation environment. See for more information.
@@ -2352,9 +1800,7 @@ addEnvHooks "$hostOffset" myBashFunction
- This setup hook moves any binaries installed in the sbin subdirectory
- into bin. In addition, a link is provided from sbin to bin for
- compatibility.
+ This setup hook moves any binaries installed in the sbin subdirectory into bin. In addition, a link is provided from sbin to bin for compatibility.
@@ -2364,9 +1810,7 @@ addEnvHooks "$hostOffset" myBashFunction
- This setup hook moves any libraries installed in the lib64 subdirectory
- into lib. In addition, a link is provided from lib64 to lib for
- compatibility.
+ This setup hook moves any libraries installed in the lib64 subdirectory into lib. In addition, a link is provided from lib64 to lib for compatibility.
@@ -2376,8 +1820,7 @@ addEnvHooks "$hostOffset" myBashFunction
- This sets SOURCE_DATE_EPOCH to the modification time
- of the most recent file.
+ This sets SOURCE_DATE_EPOCH to the modification time of the most recent file.
@@ -2387,70 +1830,22 @@ addEnvHooks "$hostOffset" myBashFunction
- The Bintools Wrapper wraps the binary utilities for a bunch of
- miscellaneous purposes. These are GNU Binutils when targetting Linux,
- and a mix of cctools and GNU binutils for Darwin. [The "Bintools" name
- is supposed to be a compromise between "Binutils" and "cctools" not
- denoting any specific implementation.] Specifically, the underlying
- bintools package, and a C standard library (glibc or Darwin's libSystem,
- just for the dynamic loader) are all fed in, and dependency finding,
- hardening (see below), and purity checks for each are handled by the
- Bintools Wrapper. Packages typically depend on CC Wrapper, which in turn
- (at run time) depends on the Bintools Wrapper.
+ The Bintools Wrapper wraps the binary utilities for a bunch of miscellaneous purposes. These are GNU Binutils when targetting Linux, and a mix of cctools and GNU binutils for Darwin. [The "Bintools" name is supposed to be a compromise between "Binutils" and "cctools" not denoting any specific implementation.] Specifically, the underlying bintools package, and a C standard library (glibc or Darwin's libSystem, just for the dynamic loader) are all fed in, and dependency finding, hardening (see below), and purity checks for each are handled by the Bintools Wrapper. Packages typically depend on CC Wrapper, which in turn (at run time) depends on the Bintools Wrapper.
- The Bintools Wrapper was only just recently split off from CC Wrapper,
- so the division of labor is still being worked out. For example, it
- shouldn't care about about the C standard library, but just take a
- derivation with the dynamic loader (which happens to be the glibc on
- linux). Dependency finding however is a task both wrappers will continue
- to need to share, and probably the most important to understand. It is
- currently accomplished by collecting directories of host-platform
- dependencies (i.e. buildInputs and
- nativeBuildInputs) in environment variables. The
- Bintools Wrapper's setup hook causes any lib and
- lib64 subdirectories to be added to
- NIX_LDFLAGS. Since the CC Wrapper and the Bintools
- Wrapper use the same strategy, most of the Bintools Wrapper code is
- sparsely commented and refers to the CC Wrapper. But the CC Wrapper's
- code, by contrast, has quite lengthy comments. The Bintools Wrapper
- merely cites those, rather than repeating them, to avoid falling out of
- sync.
+ The Bintools Wrapper was only just recently split off from CC Wrapper, so the division of labor is still being worked out. For example, it shouldn't care about the C standard library, but just take a derivation with the dynamic loader (which happens to be the glibc on linux). Dependency finding however is a task both wrappers will continue to need to share, and probably the most important to understand. It is currently accomplished by collecting directories of host-platform dependencies (i.e. buildInputs and nativeBuildInputs) in environment variables. The Bintools Wrapper's setup hook causes any lib and lib64 subdirectories to be added to NIX_LDFLAGS. Since the CC Wrapper and the Bintools Wrapper use the same strategy, most of the Bintools Wrapper code is sparsely commented and refers to the CC Wrapper. But the CC Wrapper's code, by contrast, has quite lengthy comments. The Bintools Wrapper merely cites those, rather than repeating them, to avoid falling out of sync.
- A final task of the setup hook is defining a number of standard
- environment variables to tell build systems which executables fulfill
- which purpose. They are defined to just be the base name of the tools,
- under the assumption that the Bintools Wrapper's binaries will be on the
- path. Firstly, this helps poorly-written packages, e.g. ones that look
- for just gcc when CC isn't defined yet
- clang is to be used. Secondly, this helps packages
- not get confused when cross-compiling, in which case multiple Bintools
- Wrappers may simultaneously be in use.
+ A final task of the setup hook is defining a number of standard environment variables to tell build systems which executables fulfill which purpose. They are defined to just be the base name of the tools, under the assumption that the Bintools Wrapper's binaries will be on the path. Firstly, this helps poorly-written packages, e.g. ones that look for just gcc when CC isn't defined yet clang is to be used. Secondly, this helps packages not get confused when cross-compiling, in which case multiple Bintools Wrappers may simultaneously be in use.
- Each wrapper targets a single platform, so if binaries for multiple
- platforms are needed, the underlying binaries must be wrapped multiple
- times. As this is a property of the wrapper itself, the multiple
- wrappings are needed whether or not the same underlying binaries can
- target multiple platforms.
+ Each wrapper targets a single platform, so if binaries for multiple platforms are needed, the underlying binaries must be wrapped multiple times. As this is a property of the wrapper itself, the multiple wrappings are needed whether or not the same underlying binaries can target multiple platforms.
- BUILD_- and TARGET_-prefixed versions of
- the normal environment variable are defined for additional Bintools
- Wrappers, properly disambiguating them.
+ BUILD_- and TARGET_-prefixed versions of the normal environment variable are defined for additional Bintools Wrappers, properly disambiguating them.
- A problem with this final task is that the Bintools Wrapper is honest
- and defines LD as ld. Most packages,
- however, firstly use the C compiler for linking, secondly use
- LD anyways, defining it as the C compiler, and thirdly,
- only so define LD when it is undefined as a fallback.
- This triple-threat means Bintools Wrapper will break those packages, as
- LD is already defined as the actual linker which the package won't
- override yet doesn't want to use. The workaround is to define, just for
- the problematic package, LD as the C compiler. A good way
- to do this would be preConfigure = "LD=$CC".
+ A problem with this final task is that the Bintools Wrapper is honest and defines LD as ld. Most packages, however, firstly use the C compiler for linking, secondly use LD anyways, defining it as the C compiler, and thirdly, only so define LD when it is undefined as a fallback. This triple-threat means Bintools Wrapper will break those packages, as LD is already defined as the actual linker which the package won't override yet doesn't want to use. The workaround is to define, just for the problematic package, LD as the C compiler. A good way to do this would be preConfigure = "LD=$CC".
@@ -2460,31 +1855,13 @@ addEnvHooks "$hostOffset" myBashFunction
- The CC Wrapper wraps a C toolchain for a bunch of miscellaneous
- purposes. Specifically, a C compiler (GCC or Clang), wrapped binary
- tools, and a C standard library (glibc or Darwin's libSystem, just for
- the dynamic loader) are all fed in, and dependency finding, hardening
- (see below), and purity checks for each are handled by the CC Wrapper.
- Packages typically depend on the CC Wrapper, which in turn (at run-time)
- depends on the Bintools Wrapper.
+ The CC Wrapper wraps a C toolchain for a bunch of miscellaneous purposes. Specifically, a C compiler (GCC or Clang), wrapped binary tools, and a C standard library (glibc or Darwin's libSystem, just for the dynamic loader) are all fed in, and dependency finding, hardening (see below), and purity checks for each are handled by the CC Wrapper. Packages typically depend on the CC Wrapper, which in turn (at run-time) depends on the Bintools Wrapper.
- Dependency finding is undoubtedly the main task of the CC Wrapper. This
- works just like the Bintools Wrapper, except that any
- include subdirectory of any relevant dependency is
- added to NIX_CFLAGS_COMPILE. The setup hook itself
- contains some lengthy comments describing the exact convoluted mechanism
- by which this is accomplished.
+ Dependency finding is undoubtedly the main task of the CC Wrapper. This works just like the Bintools Wrapper, except that any include subdirectory of any relevant dependency is added to NIX_CFLAGS_COMPILE. The setup hook itself contains some lengthy comments describing the exact convoluted mechanism by which this is accomplished.
- Similarly, the CC Wrapper follows the Bintools Wrapper in defining
- standard environment variables with the names of the tools it wraps, for
- the same reasons described above. Importantly, while it includes a
- cc symlink to the c compiler for portability, the
- CC will be defined using the compiler's "real name" (i.e.
- gcc or clang). This helps lousy
- build systems that inspect on the name of the compiler rather than run
- it.
+ Similarly, the CC Wrapper follows the Bintools Wrapper in defining standard environment variables with the names of the tools it wraps, for the same reasons described above. Importantly, while it includes a cc symlink to the c compiler for portability, the CC will be defined using the compiler's "real name" (i.e. gcc or clang). This helps lousy build systems that inspect on the name of the compiler rather than run it.
@@ -2492,9 +1869,7 @@ addEnvHooks "$hostOffset" myBashFunction
- Here are some more packages that provide a setup hook. Since the list of
- hooks is extensible, this is not an exhaustive list the mechanism is only to
- be used as a last resort, it might cover most uses.
+ Here are some more packages that provide a setup hook. Since the list of hooks is extensible, this is not an exhaustive list. The mechanism is only to be used as a last resort, so it might cover most uses.
@@ -2502,11 +1877,7 @@ addEnvHooks "$hostOffset" myBashFunction
- Adds the lib/site_perl subdirectory of each build
- input to the PERL5LIB environment variable. For instance,
- if buildInputs contains Perl, then the
- lib/site_perl subdirectory of each input is added
- to the PERL5LIB environment variable.
+ Adds the lib/site_perl subdirectory of each build input to the PERL5LIB environment variable. For instance, if buildInputs contains Perl, then the lib/site_perl subdirectory of each input is added to the PERL5LIB environment variable.
@@ -2516,9 +1887,7 @@ addEnvHooks "$hostOffset" myBashFunction
- Adds the lib/${python.libPrefix}/site-packages
- subdirectory of each build input to the PYTHONPATH
- environment variable.
+ Adds the lib/${python.libPrefix}/site-packages subdirectory of each build input to the PYTHONPATH environment variable.
@@ -2528,9 +1897,7 @@ addEnvHooks "$hostOffset" myBashFunction
- Adds the lib/pkgconfig and
- share/pkgconfig subdirectories of each build input
- to the PKG_CONFIG_PATH environment variable.
+ Adds the lib/pkgconfig and share/pkgconfig subdirectories of each build input to the PKG_CONFIG_PATH environment variable.
@@ -2540,8 +1907,7 @@ addEnvHooks "$hostOffset" myBashFunction
- Adds the share/aclocal subdirectory of each build
- input to the ACLOCAL_PATH environment variable.
+ Adds the share/aclocal subdirectory of each build input to the ACLOCAL_PATH environment variable.
@@ -2551,12 +1917,7 @@ addEnvHooks "$hostOffset" myBashFunction
- The autoreconfHook derivation adds
- autoreconfPhase, which runs autoreconf, libtoolize
- and automake, essentially preparing the configure script in
- autotools-based builds. Most autotools-based packages come with the
- configure script pre-generated, but this hook is necessary for a few
- packages and when you need to patch the package’s configure scripts.
+ The autoreconfHook derivation adds autoreconfPhase, which runs autoreconf, libtoolize and automake, essentially preparing the configure script in autotools-based builds. Most autotools-based packages come with the configure script pre-generated, but this hook is necessary for a few packages and when you need to patch the package’s configure scripts.
@@ -2566,10 +1927,7 @@ addEnvHooks "$hostOffset" myBashFunction
- Adds every file named catalog.xml found under the
- xml/dtd and xml/xsl
- subdirectories of each build input to the
- XML_CATALOG_FILES environment variable.
+ Adds every file named catalog.xml found under the xml/dtd and xml/xsl subdirectories of each build input to the XML_CATALOG_FILES environment variable.
@@ -2579,8 +1937,7 @@ addEnvHooks "$hostOffset" myBashFunction
- Adds the share/texmf-nix subdirectory of each build
- input to the TEXINPUTS environment variable.
+ Adds the share/texmf-nix subdirectory of each build input to the TEXINPUTS environment variable.
@@ -2600,9 +1957,7 @@ addEnvHooks "$hostOffset" myBashFunction
- Exports GDK_PIXBUF_MODULE_FILE environment variable to
- the builder. Add librsvg package to buildInputs to
- get svg support.
+ Exports GDK_PIXBUF_MODULE_FILE environment variable to the builder. Add librsvg package to buildInputs to get svg support.
@@ -2612,20 +1967,17 @@ addEnvHooks "$hostOffset" myBashFunction
- Creates a temporary package database and registers every Haskell build
- input in it (TODO: how?).
+ Creates a temporary package database and registers every Haskell build input in it (TODO: how?).
- GStreamer
+ GNOME platform
- Adds the GStreamer plugins subdirectory of each build input to the
- GST_PLUGIN_SYSTEM_PATH_1_0 or
- GST_PLUGIN_SYSTEM_PATH environment variable.
+ Hooks related to GNOME platform and related libraries like GLib, GTK and GStreamer are described in .
@@ -2635,15 +1987,10 @@ addEnvHooks "$hostOffset" myBashFunction
- This is a special setup hook which helps in packaging proprietary
- software in that it automatically tries to find missing shared library
- dependencies of ELF files based on the given
- buildInputs and nativeBuildInputs.
+ This is a special setup hook which helps in packaging proprietary software in that it automatically tries to find missing shared library dependencies of ELF files based on the given buildInputs and nativeBuildInputs.
- You can also specify a runtimeDependencies environment
- variable which lists dependencies that are unconditionally added to all
- executables.
+ You can also specify a runtimeDependencies environment variable which lists dependencies that are unconditionally added to all executables.
This is useful for programs that use
@@ -2651,16 +1998,10 @@ addEnvHooks "$hostOffset" myBashFunction
3 to load libraries at runtime.
- In certain situations you may want to run the main command
- (autoPatchelf) of the setup hook on a file or a set
- of directories instead of unconditionally patching all outputs. This can
- be done by setting the dontAutoPatchelf environment
- variable to a non-empty value.
+ In certain situations you may want to run the main command (autoPatchelf) of the setup hook on a file or a set of directories instead of unconditionally patching all outputs. This can be done by setting the dontAutoPatchelf environment variable to a non-empty value.
- The autoPatchelf command also recognizes a
- --no-recurse command line flag,
- which prevents it from recursing into subdirectories.
+ The autoPatchelf command also recognizes a --no-recurse command line flag, which prevents it from recursing into subdirectories.
@@ -2670,53 +2011,55 @@ addEnvHooks "$hostOffset" myBashFunction
- This hook will make a build pause instead of stopping when a failure
- happens. It prevents nix from cleaning up the build environment
- immediately and allows the user to attach to a build environment using
- the cntr command. Upon build error it will print
- instructions on how to use cntr, which can be used to
- enter the environment for debugging. Installing cntr and running the
- command will provide shell access to the build sandbox of failed build.
- At /var/lib/cntr the sandboxed filesystem is
- mounted. All commands and files of the system are still accessible
- within the shell. To execute commands from the sandbox use the cntr exec
- subcommand. cntr is only supported
- on Linux-based platforms. To use it first add cntr to
- your environment.systemPackages on NixOS or
- alternatively to the root user on non-NixOS systems. Then in the package
- that is supposed to be inspected, add breakpointHook
- to nativeBuildInputs.
+ This hook will make a build pause instead of stopping when a failure happens. It prevents nix from cleaning up the build environment immediately and allows the user to attach to a build environment using the cntr command. Upon build error it will print instructions on how to use cntr, which can be used to enter the environment for debugging. Installing cntr and running the command will provide shell access to the build sandbox of failed build. At /var/lib/cntr the sandboxed filesystem is mounted. All commands and files of the system are still accessible within the shell. To execute commands from the sandbox use the cntr exec subcommand. cntr is only supported on Linux-based platforms. To use it first add cntr to your environment.systemPackages on NixOS or alternatively to the root user on non-NixOS systems. Then in the package that is supposed to be inspected, add breakpointHook to nativeBuildInputs.
nativeBuildInputs = [ breakpointHook ];
- When a build failure happens there will be an instruction printed that
- shows how to attach with cntr to the build sandbox.
+ When a build failure happens there will be an instruction printed that shows how to attach with cntr to the build sandbox.
Caution with remote builds
- This won't work with remote builds as the build environment is on
- a different machine and can't be accessed by cntr.
- Remote builds can be turned off by setting --option builders ''
- for nix-build or --builders '' for
- nix build.
+ This won't work with remote builds as the build environment is on a different machine and can't be accessed by cntr. Remote builds can be turned off by setting --option builders '' for nix-build or --builders '' for nix build.
+
+
+ installShellFiles
+
+
+
+ This hook helps with installing manpages and shell completion files. It exposes 2 shell functions installManPage and installShellCompletion that can be used from your postInstall hook.
+
+
+ The installManPage function takes one or more paths to manpages to install. The manpages must have a section suffix, and may optionally be compressed (with .gz suffix). This function will place them into the correct directory.
+
+
+ The installShellCompletion function takes one or more paths to shell completion files. By default it will autodetect the shell type from the completion file extension, but you may also specify it by passing one of --bash, --fish, or --zsh. These flags apply to all paths listed after them (up until another shell flag is given). Each path may also have a custom installation name provided by providing a flag --name NAME before the path. If this flag is not provided, zsh completions will be renamed automatically such that foobar.zsh becomes _foobar.
+
+nativeBuildInputs = [ installShellFiles ];
+postInstall = ''
+ installManPage doc/foobar.1 doc/barfoo.3
+ # explicit behavior
+ installShellCompletion --bash --name foobar.bash share/completions.bash
+ installShellCompletion --fish --name foobar.fish share/completions.fish
+ installShellCompletion --zsh --name _foobar share/completions.zsh
+ # implicit behavior
+ installShellCompletion share/completions/foobar.{bash,fish,zsh}
+'';
+
+
+
+
libiconv, libintl
- A few libraries automatically add to NIX_LDFLAGS
- their library, making their symbols automatically available to the
- linker. This includes libiconv and libintl (gettext). This is done to
- provide compatibility between GNU Linux, where libiconv and libintl are
- bundled in, and other systems where that might not be the case.
- Sometimes, this behavior is not desired. To disable this behavior, set
- dontAddExtraLibs.
+ A few libraries automatically add to NIX_LDFLAGS their library, making their symbols automatically available to the linker. This includes libiconv and libintl (gettext). This is done to provide compatibility between GNU Linux, where libiconv and libintl are bundled in, and other systems where that might not be the case. Sometimes, this behavior is not desired. To disable this behavior, set dontAddExtraLibs.
@@ -2726,16 +2069,7 @@ nativeBuildInputs = [ breakpointHook ];
- Overrides the default configure phase to run the CMake command. By
- default, we use the Make generator of CMake. In addition, dependencies
- are added automatically to CMAKE_PREFIX_PATH so that packages are
- correctly detected by CMake. Some additional flags are passed in to give
- similar behavior to configure-based packages. You can disable this
- hook’s behavior by setting configurePhase to a custom value, or by
- setting dontUseCmakeConfigure. cmakeFlags controls flags passed only to
- CMake. By default, parallel building is enabled as CMake supports
- parallel building almost everywhere. When Ninja is also in use, CMake
- will detect that and use the ninja generator.
+ Overrides the default configure phase to run the CMake command. By default, we use the Make generator of CMake. In addition, dependencies are added automatically to CMAKE_PREFIX_PATH so that packages are correctly detected by CMake. Some additional flags are passed in to give similar behavior to configure-based packages. You can disable this hook’s behavior by setting configurePhase to a custom value, or by setting dontUseCmakeConfigure. cmakeFlags controls flags passed only to CMake. By default, parallel building is enabled as CMake supports parallel building almost everywhere. When Ninja is also in use, CMake will detect that and use the ninja generator.
@@ -2745,27 +2079,74 @@ nativeBuildInputs = [ breakpointHook ];
- Overrides the build and install phases to run the “xcbuild” command.
- This hook is needed when a project only comes with build files for the
- XCode build system. You can disable this behavior by setting buildPhase
- and configurePhase to a custom value. xcbuildFlags controls flags passed
- only to xcbuild.
+ Overrides the build and install phases to run the “xcbuild” command. This hook is needed when a project only comes with build files for the XCode build system. You can disable this behavior by setting buildPhase and configurePhase to a custom value. xcbuildFlags controls flags passed only to xcbuild.
- meson
+ Meson
- Overrides the configure phase to run meson to generate Ninja files. You
- can disable this behavior by setting configurePhase to a custom value,
- or by setting dontUseMesonConfigure. To run these files, you should
- accompany meson with ninja. mesonFlags controls only the flags passed to
- meson. By default, parallel building is enabled as Meson supports
- parallel building almost everywhere.
+ Overrides the configure phase to run meson to generate Ninja files. To run these files, you should accompany Meson with ninja. By default, enableParallelBuilding is enabled as Meson supports parallel building almost everywhere.
+
+ Variables controlling Meson
+
+
+ mesonFlags
+
+
+
+ Controls the flags passed to meson.
+
+
+
+
+
+ mesonBuildType
+
+
+
+ Which --buildtype to pass to Meson. We default to plain.
+
+
+
+
+
+ mesonAutoFeatures
+
+
+
+ What value to set -Dauto_features= to. We default to enabled.
+
+
+
+
+
+ mesonWrapMode
+
+
+
+ What value to set -Dwrap_mode= to. We default to nodownload as we disallow network access.
+
+
+
+
+
+ dontUseMesonConfigure
+
+
+
+ Disables using Meson's configurePhase.
+
+
+
+
@@ -2774,10 +2155,7 @@ nativeBuildInputs = [ breakpointHook ];
- Overrides the build, install, and check phase to run ninja instead of
- make. You can disable this behavior with the dontUseNinjaBuild,
- dontUseNinjaInstall, and dontUseNinjaCheck, respectively. Parallel
- building is enabled by default in Ninja.
+ Overrides the build, install, and check phase to run ninja instead of make. You can disable this behavior with the dontUseNinjaBuild, dontUseNinjaInstall, and dontUseNinjaCheck, respectively. Parallel building is enabled by default in Ninja.
@@ -2787,8 +2165,7 @@ nativeBuildInputs = [ breakpointHook ];
- This setup hook will allow you to unzip .zip files specified in $src.
- There are many similar packages like unrar, undmg, etc.
+ This setup hook will allow you to unzip .zip files specified in $src. There are many similar packages like unrar, undmg, etc.
@@ -2798,10 +2175,7 @@ nativeBuildInputs = [ breakpointHook ];
- Overrides the configure, build, and install phases. This will run the
- "waf" script used by many projects. If wafPath (default ./waf) doesn’t
- exist, it will copy the version of waf available in Nixpkgs. wafFlags can
- be used to pass flags to the waf script.
+ Overrides the configure, build, and install phases. This will run the "waf" script used by many projects. If wafPath (default ./waf) doesn’t exist, it will copy the version of waf available in Nixpkgs. wafFlags can be used to pass flags to the waf script.
@@ -2811,9 +2185,7 @@ nativeBuildInputs = [ breakpointHook ];
- Overrides the build, install, and check phases. This uses the scons
- build system as a replacement for make. scons does not provide a
- configure phase, so everything is managed at build and install time.
+ Overrides the build, install, and check phases. This uses the scons build system as a replacement for make. scons does not provide a configure phase, so everything is managed at build and install time.
@@ -2824,40 +2196,26 @@ nativeBuildInputs = [ breakpointHook ];
Purity in Nixpkgs
- [measures taken to prevent dependencies on packages outside the store, and
- what you can do to prevent them]
+ [measures taken to prevent dependencies on packages outside the store, and what you can do to prevent them]
- GCC doesn't search in locations such as /usr/include.
- In fact, attempts to add such directories through the
- flag are filtered out. Likewise, the linker (from GNU binutils) doesn't
- search in standard locations such as /usr/lib. Programs
- built on Linux are linked against a GNU C Library that likewise doesn't
- search in the default system locations.
+ GCC doesn't search in locations such as /usr/include. In fact, attempts to add such directories through the flag are filtered out. Likewise, the linker (from GNU binutils) doesn't search in standard locations such as /usr/lib. Programs built on Linux are linked against a GNU C Library that likewise doesn't search in the default system locations.
Hardening in Nixpkgs
- There are flags available to harden packages at compile or link-time. These
- can be toggled using the stdenv.mkDerivation parameters
- hardeningDisable and hardeningEnable.
+ There are flags available to harden packages at compile or link-time. These can be toggled using the stdenv.mkDerivation parameters hardeningDisable and hardeningEnable.
- Both parameters take a list of flags as strings. The special
- "all" flag can be passed to
- hardeningDisable to turn off all hardening. These flags
- can also be used as environment variables for testing or development
- purposes.
+ Both parameters take a list of flags as strings. The special "all" flag can be passed to hardeningDisable to turn off all hardening. These flags can also be used as environment variables for testing or development purposes.
- The following flags are enabled by default and might require disabling with
- hardeningDisable if the program to package is
- incompatible.
+ The following flags are enabled by default and might require disabling with hardeningDisable if the program to package is incompatible.
@@ -2867,13 +2225,7 @@ nativeBuildInputs = [ breakpointHook ];
- Adds the compiler options. At present, this warns
- about calls to printf and scanf
- functions where the format string is not a string literal and there are
- no format arguments, as in printf(foo);. This may be a
- security hole if the format string came from untrusted input and contains
- %n.
+ Adds the compiler options. At present, this warns about calls to printf and scanf functions where the format string is not a string literal and there are no format arguments, as in printf(foo);. This may be a security hole if the format string came from untrusted input and contains %n.
This needs to be turned off or fixed for errors similar to:
@@ -2892,12 +2244,7 @@ cc1plus: some warnings being treated as errors
- Adds the compiler options. This adds safety checks
- against stack overwrites rendering many potential code injection attacks
- into aborting situations. In the best case this turns code injection
- vulnerabilities into denial of service or into non-issues (depending on
- the application).
+ Adds the compiler options. This adds safety checks against stack overwrites rendering many potential code injection attacks into aborting situations. In the best case this turns code injection vulnerabilities into denial of service or into non-issues (depending on the application).
This needs to be turned off or fixed for errors similar to:
@@ -2914,19 +2261,10 @@ bin/blib.a(bios_console.o): In function `bios_handle_cup':
- Adds the compiler options.
- During code generation the compiler knows a great deal of information
- about buffer sizes (where possible), and attempts to replace insecure
- unlimited length buffer function calls with length-limited ones. This is
- especially useful for old, crufty code. Additionally, format strings in
- writable memory that contain '%n' are blocked. If an application depends
- on such a format string, it will need to be worked around.
+ Adds the compiler options. During code generation the compiler knows a great deal of information about buffer sizes (where possible), and attempts to replace insecure unlimited length buffer function calls with length-limited ones. This is especially useful for old, crufty code. Additionally, format strings in writable memory that contain '%n' are blocked. If an application depends on such a format string, it will need to be worked around.
- Additionally, some warnings are enabled which might trigger build
- failures if compiler warnings are treated as errors in the package build.
- In this case, set to
- .
+ Additionally, some warnings are enabled which might trigger build failures if compiler warnings are treated as errors in the package build. In this case, set to .
This needs to be turned off or fixed for errors similar to:
@@ -2955,15 +2293,10 @@ fcntl2.h:50:4: error: call to '__open_missing_mode' declared with attribute erro
- Adds the compiler options. This options adds
- support for position independent code in shared libraries and thus making
- ASLR possible.
+ Adds the compiler options. This options adds support for position independent code in shared libraries and thus making ASLR possible.
- Most notably, the Linux kernel, kernel modules and other code not running
- in an operating system environment like boot loaders won't build with PIC
- enabled. The compiler will is most cases complain that PIC is not
- supported for a specific build.
+ Most notably, the Linux kernel, kernel modules and other code not running in an operating system environment like boot loaders won't build with PIC enabled. The compiler will is most cases complain that PIC is not supported for a specific build.
This needs to be turned off or fixed for assembler errors similar to:
@@ -2980,13 +2313,7 @@ ccbLfRgg.s:33: Error: missing or invalid displacement expression `private_key_le
- Signed integer overflow is undefined behaviour according to the C
- standard. If it happens, it is an error in the program as it should check
- for overflow before it can happen, not afterwards. GCC provides built-in
- functions to perform arithmetic with overflow checking, which are correct
- and faster than any custom implementation. As a workaround, the option
- makes gcc behave as if signed
- integer overflows were defined.
+ Signed integer overflow is undefined behaviour according to the C standard. If it happens, it is an error in the program as it should check for overflow before it can happen, not afterwards. GCC provides built-in functions to perform arithmetic with overflow checking, which are correct and faster than any custom implementation. As a workaround, the option makes gcc behave as if signed integer overflows were defined.
This flag should not trigger any build or runtime errors.
@@ -2999,18 +2326,10 @@ ccbLfRgg.s:33: Error: missing or invalid displacement expression `private_key_le
- Adds the linker option. During program load,
- several ELF memory sections need to be written to by the linker, but can
- be turned read-only before turning over control to the program. This
- prevents some GOT (and .dtors) overwrite attacks, but at least the part
- of the GOT used by the dynamic linker (.got.plt) is still vulnerable.
+ Adds the linker option. During program load, several ELF memory sections need to be written to by the linker, but can be turned read-only before turning over control to the program. This prevents some GOT (and .dtors) overwrite attacks, but at least the part of the GOT used by the dynamic linker (.got.plt) is still vulnerable.
- This flag can break dynamic shared object loading. For instance, the
- module systems of Xorg and OpenCV are incompatible with this flag. In
- almost all cases the bindnow flag must also be
- disabled and incompatible programs typically fail with similar errors at
- runtime.
+ This flag can break dynamic shared object loading. For instance, the module systems of Xorg and OpenCV are incompatible with this flag. In almost all cases the bindnow flag must also be disabled and incompatible programs typically fail with similar errors at runtime.
@@ -3020,18 +2339,10 @@ ccbLfRgg.s:33: Error: missing or invalid displacement expression `private_key_le
- Adds the linker option. During program load,
- all dynamic symbols are resolved, allowing for the complete GOT to be
- marked read-only (due to relro). This prevents GOT
- overwrite attacks. For very large applications, this can incur some
- performance loss during initial load while symbols are resolved, but this
- shouldn't be an issue for daemons.
+ Adds the linker option. During program load, all dynamic symbols are resolved, allowing for the complete GOT to be marked read-only (due to relro). This prevents GOT overwrite attacks. For very large applications, this can incur some performance loss during initial load while symbols are resolved, but this shouldn't be an issue for daemons.
- This flag can break dynamic shared object loading. For instance, the
- module systems of Xorg and PHP are incompatible with this flag. Programs
- incompatible with this flag often fail at runtime due to missing symbols,
- like:
+ This flag can break dynamic shared object loading. For instance, the module systems of Xorg and PHP are incompatible with this flag. Programs incompatible with this flag often fail at runtime due to missing symbols, like:
intel_drv.so: undefined symbol: vgaHWFreeHWRec
@@ -3041,9 +2352,7 @@ intel_drv.so: undefined symbol: vgaHWFreeHWRec
- The following flags are disabled by default and should be enabled with
- hardeningEnable for packages that take untrusted input
- like network services.
+ The following flags are disabled by default and should be enabled with hardeningEnable for packages that take untrusted input like network services.
@@ -3053,31 +2362,14 @@ intel_drv.so: undefined symbol: vgaHWFreeHWRec
- Adds the compiler and linker
- options. Position Independent Executables are needed to take advantage of
- Address Space Layout Randomization, supported by modern kernel versions.
- While ASLR can already be enforced for data areas in the stack and heap
- (brk and mmap), the code areas must be compiled as position-independent.
- Shared libraries already do this with the pic flag, so
- they gain ASLR automatically, but binary .text regions need to be build
- with pie to gain ASLR. When this happens, ROP attacks
- are much harder since there are no static locations to bounce off of
- during a memory corruption attack.
+ Adds the compiler and linker options. Position Independent Executables are needed to take advantage of Address Space Layout Randomization, supported by modern kernel versions. While ASLR can already be enforced for data areas in the stack and heap (brk and mmap), the code areas must be compiled as position-independent. Shared libraries already do this with the pic flag, so they gain ASLR automatically, but binary .text regions need to be build with pie to gain ASLR. When this happens, ROP attacks are much harder since there are no static locations to bounce off of during a memory corruption attack.
- For more in-depth information on these hardening flags and hardening in
- general, refer to the
- Debian Wiki,
- Ubuntu
- Wiki,
- Gentoo
- Wiki, and the
-
- Arch Wiki.
+ For more in-depth information on these hardening flags and hardening in general, refer to the Debian Wiki, Ubuntu Wiki, Gentoo Wiki, and the Arch Wiki.
diff --git a/doc/submitting-changes.xml b/doc/submitting-changes.xml
index a04ec08b0484..2c7defb81749 100644
--- a/doc/submitting-changes.xml
+++ b/doc/submitting-changes.xml
@@ -8,8 +8,7 @@
- Read Manual (How to
- write packages for Nix).
+ Read Manual (How to write packages for Nix).
@@ -23,15 +22,11 @@
- 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.
+ 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: nixos-version returns
- 15.05.git.0998212 (Dingo). So you can do:
+ For example: nixos-version returns 15.05.git.0998212 (Dingo). So you can do:
@@ -55,9 +50,7 @@
- If you removed pkgs, made some major NixOS changes etc., write about
- them in
- nixos/doc/manual/release-notes/rl-unstable.xml.
+ If you removed pkgs, made some major NixOS changes etc., write about them in nixos/doc/manual/release-notes/rl-unstable.xml.
@@ -65,8 +58,7 @@
- Check for unnecessary whitespace with git diff --check
- before committing.
+ Check for unnecessary whitespace with git diff --check before committing.
@@ -121,8 +113,7 @@ Additional information.
- nix-env -i pkg-name -f <path to your local nixpkgs
- folder>
+ nix-env -i pkg-name -f <path to your local nixpkgs folder>
@@ -134,14 +125,12 @@ Additional information.
- Make sure it's in
- pkgs/top-level/all-packages.nix
+ Make sure it's in pkgs/top-level/all-packages.nix
- nix-env -i pkg-name -f <path to your local nixpkgs
- folder>
+ nix-env -i pkg-name -f <path to your local nixpkgs folder>
@@ -149,15 +138,11 @@ Additional information.
- If you don't want to install pkg in you
- profile.
+ If you don't want to install pkg in you profile.
- nix-build -A pkg-attribute-name <path to your local
- nixpkgs folder>/default.nix and check results in the
- folder result. It will appear in the same
- directory where you did nix-build.
+ nix-build -A pkg-attribute-name <path to your local nixpkgs folder>/default.nix and check results in the folder result. It will appear in the same directory where you did nix-build.
@@ -165,9 +150,7 @@ Additional information.
- If you did nix-env -i pkg-name you can do
- nix-env -e pkg-name to uninstall it from your
- system.
+ If you did nix-env -i pkg-name you can do nix-env -e pkg-name to uninstall it from your system.
@@ -179,10 +162,7 @@ Additional information.
- 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.
+ 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.
@@ -193,9 +173,7 @@ Additional information.
- If you have commits pkg-name: oh, forgot to insert
- whitespace: squash commits in this case. Use git rebase
- -i.
+ If you have commits pkg-name: oh, forgot to insert whitespace: squash commits in this case. Use git rebase -i.
@@ -220,8 +198,7 @@ Additional information.
- Write the title in format (pkg-name | nixos/<module>):
- improvement.
+ Write the title in format (pkg-name | nixos/<module>): improvement.
@@ -233,8 +210,7 @@ Additional information.
- Write in comment if you have tested your patch. Do not rely much on
- TravisCI.
+ Write in comment if you have tested your patch. Do not rely much on TravisCI.
@@ -244,8 +220,7 @@ Additional information.
- Notify maintainers of the package. For example add to the message:
- cc @jagajaga @domenkozar.
+ Notify maintainers of the package. For example add to the message: cc @jagajaga @domenkozar.
@@ -257,65 +232,40 @@ Additional information.
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.
+ 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:
+ 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
- build-use-sandbox
- in Nix manual for details.
+ 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 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
- people are asked to test builds with sandboxing enabled (see
- Tested using sandboxing in the pull request template)
- because
- inhttps://nixos.org/hydra/
- sandboxing is also used.
+ Sandboxing is not enabled by default in Nix due to a small performance hit on each build. In pull requests for nixpkgs people are asked to test builds with sandboxing enabled (see Tested using sandboxing in the pull request template) because inhttps://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:
+ 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
+ Globally enable sandboxing on NixOS: add the following to configuration.nixnix.useSandbox = true;
- Globally enable sandboxing on non-NixOS
- platforms: add the following to:
- /etc/nix/nix.conf
-build-use-sandbox = true
+ Globally enable sandboxing on non-NixOS platforms: add the following to: /etc/nix/nix.conf
+sandbox = true
@@ -326,11 +276,7 @@ Additional information.
Built on platform(s)
- 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.
+ 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.
@@ -338,15 +284,8 @@ Additional information.
Tested via one or more NixOS test(s) if existing and applicable for the change (look inside 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 only apply to packages with NixOS modules defined and can only
- be run on Linux. For more details on writing and running tests, see the
- section
- in the NixOS manual.
+ 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 only apply to packages with NixOS modules defined and can only be run on Linux. For more details on writing and running tests, see the section in the NixOS manual.
@@ -354,11 +293,7 @@ Additional information.
Tested compilation of all pkgs that depend on this change using nix-review
- If you are updating a package's version, you can use nix-review to make
- sure all packages that depend on the updated package still compile
- correctly. The nix-review utility can look for and build
- all dependencies either based on uncommited changes with the
- wip option or specifying a github pull request number.
+ If you are updating a package's version, you can use nix-review to make sure all packages that depend on the updated package still compile correctly. The nix-review utility can look for and build all dependencies either based on uncommited changes with the wip option or specifying a github pull request number.
@@ -376,13 +311,7 @@ Additional information.
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.
+ 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.
@@ -390,14 +319,8 @@ Additional information.
Meets Nixpkgs contribution standards
- The last checkbox is fits
- 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.
+ The last checkbox is fits 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.
@@ -435,22 +358,17 @@ Additional information.
- Commits must be sufficiently tested before being merged, both for the
- master and staging branches.
+ Commits must be sufficiently tested before being merged, both for the master and staging branches.
- 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.
+ 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.
+ 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.
@@ -473,20 +391,12 @@ Additional information.
- It's only for non-breaking mass-rebuild commits. That means it's not to
- be used for testing, and changes must have been well tested already.
- Read
- policy here.
+ It's only for non-breaking mass-rebuild commits. That means it's not to be used for testing, and changes must have been well tested already. Read policy here.
- If the branch is already in a broken state, please refrain from adding
- extra new breakages. Stabilize it for a few days, merge into master, then
- resume development on staging.
- Keep
- an eye on the staging evaluations here. If any fixes for staging
- happen to be already in master, then master can be merged into staging.
+ If the branch is already in a broken state, please refrain from adding extra new breakages. Stabilize it for a few days, merge into master, then resume development on staging. Keep an eye on the staging evaluations here. If any fixes for staging happen to be already in master, then master can be merged into staging.
@@ -498,10 +408,7 @@ Additional information.
- If you're cherry-picking a commit to a stable release branch, always use
- git cherry-pick -xe and ensure the message contains a
- clear description about why this needs to be included in the stable
- branch.
+ If you're cherry-picking a commit to a stable release branch, always use git cherry-pick -xe and ensure the message contains a clear description about why this needs to be included in the stable branch.
An example of a cherry-picked commit would look like this:
diff --git a/lib/attrsets.nix b/lib/attrsets.nix
index d374d229f597..086c3d746fc1 100644
--- a/lib/attrsets.nix
+++ b/lib/attrsets.nix
@@ -354,7 +354,7 @@ rec {
=> { a = ["x" "y"]; b = ["z"] }
*/
zipAttrsWith = f: sets: zipAttrsWithNames (concatMap attrNames sets) f sets;
- /* Like `zipAttrsWith' with `(name: values: value)' as the function.
+ /* Like `zipAttrsWith' with `(name: values: values)' as the function.
Example:
zipAttrs [{a = "x";} {a = "y"; b = "z";}]
diff --git a/lib/customisation.nix b/lib/customisation.nix
index 1f5eb0d11e8b..ac234e3b8c6f 100644
--- a/lib/customisation.nix
+++ b/lib/customisation.nix
@@ -47,7 +47,7 @@ rec {
/* `makeOverridable` takes a function from attribute set to attribute set and
- injects `override` attibute which can be used to override arguments of
+ injects `override` attribute which can be used to override arguments of
the function.
nix-repl> x = {a, b}: { result = a + b; }
@@ -66,22 +66,31 @@ rec {
*/
makeOverridable = f: origArgs:
let
- ff = f origArgs;
+ result = f origArgs;
+
+ # Creates a functor with the same arguments as f
+ copyArgs = g: lib.setFunctionArgs g (lib.functionArgs f);
+ # Changes the original arguments with (potentially a function that returns) a set of new attributes
overrideWith = newArgs: origArgs // (if lib.isFunction newArgs then newArgs origArgs else newArgs);
+
+ # Re-call the function but with different arguments
+ overrideArgs = copyArgs (newArgs: makeOverridable f (overrideWith newArgs));
+ # Change the result of the function call by applying g to it
+ overrideResult = g: makeOverridable (copyArgs (args: g (f args))) origArgs;
in
- if builtins.isAttrs ff then (ff // {
- override = newArgs: makeOverridable f (overrideWith newArgs);
- overrideDerivation = fdrv:
- makeOverridable (args: overrideDerivation (f args) fdrv) origArgs;
- ${if ff ? overrideAttrs then "overrideAttrs" else null} = fdrv:
- makeOverridable (args: (f args).overrideAttrs fdrv) origArgs;
- })
- else if lib.isFunction ff then {
- override = newArgs: makeOverridable f (overrideWith newArgs);
- __functor = self: ff;
- overrideDerivation = throw "overrideDerivation not yet supported for functors";
- }
- else ff;
+ if builtins.isAttrs result then
+ result // {
+ override = overrideArgs;
+ overrideDerivation = fdrv: overrideResult (x: overrideDerivation x fdrv);
+ ${if result ? overrideAttrs then "overrideAttrs" else null} = fdrv:
+ overrideResult (x: x.overrideAttrs fdrv);
+ }
+ else if lib.isFunction result then
+ # Transform the result into a functor while propagating its arguments
+ lib.setFunctionArgs result (lib.functionArgs result) // {
+ override = overrideArgs;
+ }
+ else result;
/* Call the package function in the file `fn' with the required
diff --git a/lib/default.nix b/lib/default.nix
index 3efaaf0f8f9e..74d508ec1d6e 100644
--- a/lib/default.nix
+++ b/lib/default.nix
@@ -57,8 +57,8 @@ let
hasAttr head isAttrs isBool isInt isList isString length
lessThan listToAttrs pathExists readFile replaceStrings seq
stringLength sub substring tail;
- inherit (trivial) id const concat or and bitAnd bitOr bitXor bitNot
- boolToString mergeAttrs flip mapNullable inNixShell min max
+ inherit (trivial) id const pipe concat or and bitAnd bitOr bitXor
+ bitNot boolToString mergeAttrs flip mapNullable inNixShell min max
importJSON warn info showWarnings nixpkgsVersion version mod compare
splitByAndCompare functionArgs setFunctionArgs isFunction;
inherit (fixedPoints) fix fix' converge extends composeExtensions
@@ -71,7 +71,7 @@ let
zipAttrsWithNames zipAttrsWith zipAttrs recursiveUpdateUntil
recursiveUpdate matchAttrs overrideExisting getOutput getBin
getLib getDev chooseDevOutputs zipWithNames zip;
- inherit (lists) singleton foldr fold foldl foldl' imap0 imap1
+ inherit (lists) singleton forEach foldr fold foldl foldl' imap0 imap1
concatMap flatten remove findSingle findFirst any all count
optional optionals toList range partition zipListsWith zipLists
reverseList listDfs toposort sort naturalSort compareLists take
@@ -134,5 +134,7 @@ let
mergeAttrsByFuncDefaultsClean mergeAttrBy
fakeSha256 fakeSha512
nixType imap;
+ inherit (versions)
+ splitVersion;
});
in lib
diff --git a/lib/deprecated.nix b/lib/deprecated.nix
index 15de50456612..155d6f0c3611 100644
--- a/lib/deprecated.nix
+++ b/lib/deprecated.nix
@@ -24,7 +24,7 @@ rec {
let arg = (merger init (defaultMergeArg init x));
# now add the function with composed args already applied to the final attrs
base = (setAttrMerge "passthru" {} (f arg)
- ( z: z // rec {
+ ( z: z // {
function = foldArgs merger f arg;
args = (lib.attrByPath ["passthru" "args"] {} z) // x;
} ));
diff --git a/lib/kernel.nix b/lib/kernel.nix
index 5923011774b1..36ea30838289 100644
--- a/lib/kernel.nix
+++ b/lib/kernel.nix
@@ -1,7 +1,7 @@
{ lib, version }:
with lib;
-rec {
+{
# Common patterns/legacy
whenAtLeast = ver: mkIf (versionAtLeast version ver);
whenOlder = ver: mkIf (versionOlder version ver);
diff --git a/lib/licenses.nix b/lib/licenses.nix
index c964060d2a5c..986b7fa1fdd9 100644
--- a/lib/licenses.nix
+++ b/lib/licenses.nix
@@ -7,7 +7,7 @@ let
in
-lib.mapAttrs (n: v: v // { shortName = n; }) rec {
+lib.mapAttrs (n: v: v // { shortName = n; }) {
/* License identifiers from spdx.org where possible.
* If you cannot find your license here, then look for a similar license or
* add it to this list. The URL mentioned above is a good source for inspiration.
@@ -218,9 +218,9 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec {
fullName = "Common Public License 1.0";
};
- curl = {
- fullName = "MIT/X11 derivate";
- url = "https://curl.haxx.se/docs/copyright.html";
+ curl = spdx {
+ spdxId = "curl";
+ fullName = "curl License";
};
doc = spdx {
@@ -613,6 +613,11 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec {
url = https://enterprise.dejacode.com/licenses/public/purdue-bsd;
};
+ qhull = spdx {
+ spdxId = "Qhull";
+ fullName = "Qhull License";
+ };
+
qpl = spdx {
spdxId = "QPL-1.0";
fullName = "Q Public License 1.0";
diff --git a/lib/lists.nix b/lib/lists.nix
index 30d87ece6641..f9f30412770a 100644
--- a/lib/lists.nix
+++ b/lib/lists.nix
@@ -21,6 +21,19 @@ rec {
*/
singleton = x: [x];
+ /* Apply the function to each element in the list. Same as `map`, but arguments
+ flipped.
+
+ Type: forEach :: [a] -> (a -> b) -> [b]
+
+ Example:
+ forEach [ 1 2 ] (x:
+ toString x
+ )
+ => [ "1" "2" ]
+ */
+ forEach = xs: f: map f xs;
+
/* “right fold” a binary function `op` between successive elements of
`list` with `nul' as the starting value, i.e.,
`foldr op nul [x_1 x_2 ... x_n] == op x_1 (op x_2 ... (op x_n nul))`.
@@ -75,7 +88,7 @@ rec {
/* Strict version of `foldl`.
The difference is that evaluation is forced upon access. Usually used
- with small whole results (in contract with lazily-generated list or large
+ with small whole results (in contrast with lazily-generated list or large
lists where only a part is consumed.)
Type: foldl' :: (b -> a -> b) -> b -> [a] -> b
@@ -446,11 +459,11 @@ rec {
if length list < 2
then # finish
{ result = list; }
- else if dfsthis ? "cycle"
+ else if dfsthis ? cycle
then # there's a cycle, starting from the current vertex, return it
{ cycle = reverseList ([ dfsthis.cycle ] ++ dfsthis.visited);
inherit (dfsthis) loops; }
- else if toporest ? "cycle"
+ else if toporest ? cycle
then # there's a cycle somewhere else in the graph, return it
toporest
# Slow, but short. Can be made a bit faster with an explicit stack.
diff --git a/lib/modules.nix b/lib/modules.nix
index 0869eae1982b..71672c7d112b 100644
--- a/lib/modules.nix
+++ b/lib/modules.nix
@@ -323,16 +323,14 @@ rec {
else
mergeDefinitions loc opt.type defs';
- # Check whether the option is defined, and apply the ‘apply’
- # function to the merged value. This allows options to yield a
- # value computed from the definitions.
- value =
- if !res.isDefined then
- throw "The option `${showOption loc}' is used but not defined."
- else if opt ? apply then
- opt.apply res.mergedValue
- else
- res.mergedValue;
+
+ # The value with a check that it is defined
+ valueDefined = if res.isDefined then res.mergedValue else
+ throw "The option `${showOption loc}' is used but not defined.";
+
+ # Apply the 'apply' function to the merged value. This allows options to
+ # yield a value computed from the definitions
+ value = if opt ? apply then opt.apply valueDefined else valueDefined;
in opt //
{ value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
@@ -593,12 +591,16 @@ rec {
{ options, ... }:
{ options = setAttrByPath optionName (mkOption {
visible = false;
+ apply = x: throw "The option `${showOption optionName}' can no longer be used since it's been removed. ${replacementInstructions}";
});
- config.warnings =
- let opt = getAttrFromPath optionName options; in
- optional opt.isDefined ''
+ config.assertions =
+ let opt = getAttrFromPath optionName options; in [{
+ assertion = !opt.isDefined;
+ message = ''
The option definition `${showOption optionName}' in ${showFiles opt.files} no longer has any effect; please remove it.
- ${replacementInstructions}'';
+ ${replacementInstructions}
+ '';
+ }];
};
/* Return a module that causes a warning to be shown if the
diff --git a/lib/options.nix b/lib/options.nix
index d2eae3ae3a98..e5c0631a5437 100644
--- a/lib/options.nix
+++ b/lib/options.nix
@@ -36,7 +36,7 @@ rec {
example ? null,
# String describing the option.
description ? null,
- # Related packages used in the manual (see `genRelatedPackages` in ../nixos/doc/manual/default.nix).
+ # Related packages used in the manual (see `genRelatedPackages` in ../nixos/lib/make-options-doc/default.nix).
relatedPackages ? null,
# Option type, providing type-checking and value merging.
type ? null,
diff --git a/lib/sources.nix b/lib/sources.nix
index c4680087b245..51bcf5559e32 100644
--- a/lib/sources.nix
+++ b/lib/sources.nix
@@ -36,18 +36,47 @@ rec {
# allowing you to chain multiple calls together without any
# intermediate copies being put in the nix store.
#
- # lib.cleanSourceWith f (lib.cleanSourceWith g ./.) # Succeeds!
- # builtins.filterSource f (builtins.filterSource g ./.) # Fails!
- cleanSourceWith = { filter, src }:
+ # lib.cleanSourceWith {
+ # filter = f;
+ # src = lib.cleanSourceWith {
+ # filter = g;
+ # src = ./.;
+ # };
+ # }
+ # # Succeeds!
+ #
+ # builtins.filterSource f (builtins.filterSource g ./.)
+ # # Fails!
+ #
+ # Parameters:
+ #
+ # src: A path or cleanSourceWith result to filter and/or rename.
+ #
+ # filter: A function (path -> type -> bool)
+ # Optional with default value: constant true (include everything)
+ # The function will be combined with the && operator such
+ # that src.filter is called lazily.
+ # For implementing a filter, see
+ # https://nixos.org/nix/manual/#builtin-filterSource
+ #
+ # name: Optional name to use as part of the store path.
+ # This defaults `src.name` or otherwise `baseNameOf src`.
+ # We recommend setting `name` whenever `src` is syntactically `./.`.
+ # Otherwise, you depend on `./.`'s name in the parent directory,
+ # which can cause inconsistent names, defeating caching.
+ #
+ cleanSourceWith = { filter ? _path: _type: true, src, name ? null }:
let
isFiltered = src ? _isLibCleanSourceWith;
origSrc = if isFiltered then src.origSrc else src;
filter' = if isFiltered then name: type: filter name type && src.filter name type else filter;
+ name' = if name != null then name else if isFiltered then src.name else baseNameOf src;
in {
inherit origSrc;
filter = filter';
- outPath = builtins.filterSource filter' origSrc;
+ outPath = builtins.path { filter = filter'; path = origSrc; name = name'; };
_isLibCleanSourceWith = true;
+ name = name';
};
# Filter sources by a list of regular expressions.
diff --git a/lib/systems/default.nix b/lib/systems/default.nix
index 8aa413f53817..0c0cdf1f11b1 100644
--- a/lib/systems/default.nix
+++ b/lib/systems/default.nix
@@ -58,13 +58,13 @@ rec {
uname = {
# uname -s
system = {
- "linux" = "Linux";
- "windows" = "Windows";
- "darwin" = "Darwin";
- "netbsd" = "NetBSD";
- "freebsd" = "FreeBSD";
- "openbsd" = "OpenBSD";
- "wasi" = "Wasi";
+ linux = "Linux";
+ windows = "Windows";
+ darwin = "Darwin";
+ netbsd = "NetBSD";
+ freebsd = "FreeBSD";
+ openbsd = "OpenBSD";
+ wasi = "Wasi";
}.${final.parsed.kernel.name} or null;
# uname -p
@@ -86,10 +86,10 @@ rec {
else if final.isx86_64 then "x86_64"
else if final.isx86 then "i386"
else {
- "powerpc" = "ppc";
- "powerpcle" = "ppc";
- "powerpc64" = "ppc64";
- "powerpc64le" = "ppc64le";
+ powerpc = "ppc";
+ powerpcle = "ppc";
+ powerpc64 = "ppc64";
+ powerpc64le = "ppc64le";
}.${final.parsed.cpu.name} or final.parsed.cpu.name;
emulator = pkgs: let
diff --git a/lib/systems/doubles.nix b/lib/systems/doubles.nix
index 823f6a915d6e..58cff18e6488 100644
--- a/lib/systems/doubles.nix
+++ b/lib/systems/doubles.nix
@@ -7,7 +7,7 @@ let
all = [
"aarch64-linux"
- "armv5tel-linux" "armv6l-linux" "armv7l-linux"
+ "armv5tel-linux" "armv6l-linux" "armv7a-linux" "armv7l-linux"
"mipsel-linux"
@@ -33,7 +33,7 @@ let
filterDoubles = f: map parse.doubleFromSystem (lists.filter f allParsed);
-in rec {
+in {
inherit all;
none = [];
diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix
index aa55438de082..511ae1979485 100644
--- a/lib/systems/examples.nix
+++ b/lib/systems/examples.nix
@@ -24,27 +24,27 @@ rec {
platform = platforms.powernv;
};
- sheevaplug = rec {
+ sheevaplug = {
config = "armv5tel-unknown-linux-gnueabi";
platform = platforms.sheevaplug;
};
- raspberryPi = rec {
+ raspberryPi = {
config = "armv6l-unknown-linux-gnueabihf";
platform = platforms.raspberrypi;
};
- armv7l-hf-multiplatform = rec {
+ armv7l-hf-multiplatform = {
config = "armv7l-unknown-linux-gnueabihf";
platform = platforms.armv7l-hf-multiplatform;
};
- aarch64-multiplatform = rec {
+ aarch64-multiplatform = {
config = "aarch64-unknown-linux-gnu";
platform = platforms.aarch64-multiplatform;
};
- armv7a-android-prebuilt = rec {
+ armv7a-android-prebuilt = {
config = "armv7a-unknown-linux-androideabi";
sdkVer = "24";
ndkVer = "18b";
@@ -52,7 +52,7 @@ rec {
useAndroidPrebuilt = true;
};
- aarch64-android-prebuilt = rec {
+ aarch64-android-prebuilt = {
config = "aarch64-unknown-linux-android";
sdkVer = "24";
ndkVer = "18b";
@@ -65,17 +65,17 @@ rec {
inherit (platform.gcc) fpu;
};
- pogoplug4 = rec {
+ pogoplug4 = {
config = "armv5tel-unknown-linux-gnueabi";
platform = platforms.pogoplug4;
};
- ben-nanonote = rec {
+ ben-nanonote = {
config = "mipsel-unknown-linux-uclibc";
platform = platforms.ben_nanonote;
};
- fuloongminipc = rec {
+ fuloongminipc = {
config = "mipsel-unknown-linux-gnu";
platform = platforms.fuloong2f_n32;
};
@@ -236,4 +236,9 @@ rec {
useLLVM = true;
};
+ # Ghcjs
+ ghcjs = {
+ config = "js-unknown-ghcjs";
+ platform = {};
+ };
}
diff --git a/lib/systems/inspect.nix b/lib/systems/inspect.nix
index 9a12e3c3926d..8a983b3d3637 100644
--- a/lib/systems/inspect.nix
+++ b/lib/systems/inspect.nix
@@ -12,7 +12,7 @@ rec {
isx86_32 = { cpu = { family = "x86"; bits = 32; }; };
isx86_64 = { cpu = { family = "x86"; bits = 64; }; };
isPowerPC = { cpu = cpuTypes.powerpc; };
- isPower = { cpu = { family = "power"; }; };
+ isPower = { cpu = { family = "power"; }; };
isx86 = { cpu = { family = "x86"; }; };
isAarch32 = { cpu = { family = "arm"; bits = 32; }; };
isAarch64 = { cpu = { family = "arm"; bits = 64; }; };
@@ -23,6 +23,7 @@ rec {
isMsp430 = { cpu = { family = "msp430"; }; };
isAvr = { cpu = { family = "avr"; }; };
isAlpha = { cpu = { family = "alpha"; }; };
+ isJavaScript = { cpu = cpuTypes.js; };
is32bit = { cpu = { bits = 32; }; };
is64bit = { cpu = { bits = 64; }; };
@@ -44,6 +45,7 @@ rec {
isCygwin = { kernel = kernels.windows; abi = abis.cygnus; };
isMinGW = { kernel = kernels.windows; abi = abis.gnu; };
isWasi = { kernel = kernels.wasi; };
+ isGhcjs = { kernel = kernels.ghcjs; };
isNone = { kernel = kernels.none; };
isAndroid = [ { abi = abis.android; } { abi = abis.androideabi; } ];
diff --git a/lib/systems/parse.nix b/lib/systems/parse.nix
index b088cd342f12..5e12df32ffdd 100644
--- a/lib/systems/parse.nix
+++ b/lib/systems/parse.nix
@@ -106,11 +106,13 @@ rec {
wasm32 = { bits = 32; significantByte = littleEndian; family = "wasm"; };
wasm64 = { bits = 64; significantByte = littleEndian; family = "wasm"; };
-
+
alpha = { bits = 64; significantByte = littleEndian; family = "alpha"; };
msp430 = { bits = 16; significantByte = littleEndian; family = "msp430"; };
avr = { bits = 8; family = "avr"; };
+
+ js = { bits = 32; significantByte = littleEndian; family = "js"; };
};
# Determine where two CPUs are compatible with each other. That is,
@@ -271,6 +273,7 @@ rec {
solaris = { execFormat = elf; families = { }; };
wasi = { execFormat = wasm; families = { }; };
windows = { execFormat = pe; families = { }; };
+ ghcjs = { execFormat = unknown; families = { }; };
} // { # aliases
# 'darwin' is the kernel for all of them. We choose macOS by default.
darwin = kernels.macos;
@@ -384,6 +387,8 @@ rec {
then { cpu = elemAt l 0; vendor = elemAt l 1; kernel = elemAt l 2; }
else if (elem (elemAt l 2) ["eabi" "eabihf" "elf"])
then { cpu = elemAt l 0; vendor = "unknown"; kernel = elemAt l 1; abi = elemAt l 2; }
+ else if (elemAt l 2 == "ghcjs")
+ then { cpu = elemAt l 0; vendor = "unknown"; kernel = elemAt l 2; }
else throw "Target specification with 3 components is ambiguous";
"4" = { cpu = elemAt l 0; vendor = elemAt l 1; kernel = elemAt l 2; abi = elemAt l 3; };
}.${toString (length l)}
@@ -403,7 +408,7 @@ rec {
getKernel = name: kernels.${name} or (throw "Unknown kernel: ${name}");
getAbi = name: abis.${name} or (throw "Unknown ABI: ${name}");
- parsed = rec {
+ parsed = {
cpu = getCpu args.cpu;
vendor =
/**/ if args ? vendor then getVendor args.vendor
diff --git a/lib/systems/platforms.nix b/lib/systems/platforms.nix
index a2b43c970a41..ab3cf1d54301 100644
--- a/lib/systems/platforms.nix
+++ b/lib/systems/platforms.nix
@@ -456,16 +456,16 @@ rec {
};
selectBySystem = system: {
- "i486-linux" = pc32;
- "i586-linux" = pc32;
- "i686-linux" = pc32;
- "x86_64-linux" = pc64;
- "armv5tel-linux" = sheevaplug;
- "armv6l-linux" = raspberrypi;
- "armv7a-linux" = armv7l-hf-multiplatform;
- "armv7l-linux" = armv7l-hf-multiplatform;
- "aarch64-linux" = aarch64-multiplatform;
- "mipsel-linux" = fuloong2f_n32;
- "powerpc64le-linux" = powernv;
+ i486-linux = pc32;
+ i586-linux = pc32;
+ i686-linux = pc32;
+ x86_64-linux = pc64;
+ armv5tel-linux = sheevaplug;
+ armv6l-linux = raspberrypi;
+ armv7a-linux = armv7l-hf-multiplatform;
+ armv7l-linux = armv7l-hf-multiplatform;
+ aarch64-linux = aarch64-multiplatform;
+ mipsel-linux = fuloong2f_n32;
+ powerpc64le-linux = powernv;
}.${system} or pcBase;
}
diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix
index d8f412d3fc49..b064faa1e1ba 100644
--- a/lib/tests/misc.nix
+++ b/lib/tests/misc.nix
@@ -18,6 +18,31 @@ runTests {
expected = 2;
};
+ testPipe = {
+ expr = pipe 2 [
+ (x: x + 2) # 2 + 2 = 4
+ (x: x * 2) # 4 * 2 = 8
+ ];
+ expected = 8;
+ };
+
+ testPipeEmpty = {
+ expr = pipe 2 [];
+ expected = 2;
+ };
+
+ testPipeStrings = {
+ expr = pipe [ 3 4 ] [
+ (map toString)
+ (map (s: s + "\n"))
+ concatStrings
+ ];
+ expected = ''
+ 3
+ 4
+ '';
+ };
+
/*
testOr = {
expr = or true false;
@@ -102,6 +127,21 @@ runTests {
expected = [ "2001" "db8" "0" "0042" "" "8a2e" "370" "" ];
};
+ testSplitVersionSingle = {
+ expr = versions.splitVersion "1";
+ expected = [ "1" ];
+ };
+
+ testSplitVersionDouble = {
+ expr = versions.splitVersion "1.2";
+ expected = [ "1" "2" ];
+ };
+
+ testSplitVersionTriple = {
+ expr = versions.splitVersion "1.2.3";
+ expected = [ "1" "2" "3" ];
+ };
+
testIsStorePath = {
expr =
let goodPath =
diff --git a/lib/tests/modules.sh b/lib/tests/modules.sh
index eadaa0521b35..cf344122cf4e 100755
--- a/lib/tests/modules.sh
+++ b/lib/tests/modules.sh
@@ -71,6 +71,15 @@ checkConfigError 'The option value .* in .* is not of type.*positive integer.*'
checkConfigOutput "42" config.value ./declare-int-between-value.nix ./define-value-int-positive.nix
checkConfigError 'The option value .* in .* is not of type.*between.*-21 and 43.*inclusive.*' config.value ./declare-int-between-value.nix ./define-value-int-negative.nix
+# Check either types
+# types.either
+checkConfigOutput "42" config.value ./declare-either.nix ./define-value-int-positive.nix
+checkConfigOutput "\"24\"" config.value ./declare-either.nix ./define-value-string.nix
+# types.oneOf
+checkConfigOutput "42" config.value ./declare-oneOf.nix ./define-value-int-positive.nix
+checkConfigOutput "[ ]" config.value ./declare-oneOf.nix ./define-value-list.nix
+checkConfigOutput "\"24\"" config.value ./declare-oneOf.nix ./define-value-string.nix
+
# Check mkForce without submodules.
set -- config.enable ./declare-enable.nix ./define-enable.nix
checkConfigOutput "true" "$@"
diff --git a/lib/tests/modules/declare-either.nix b/lib/tests/modules/declare-either.nix
new file mode 100644
index 000000000000..5a0fa978a138
--- /dev/null
+++ b/lib/tests/modules/declare-either.nix
@@ -0,0 +1,5 @@
+{ lib, ... }: {
+ options.value = lib.mkOption {
+ type = lib.types.either lib.types.int lib.types.str;
+ };
+}
diff --git a/lib/tests/modules/declare-oneOf.nix b/lib/tests/modules/declare-oneOf.nix
new file mode 100644
index 000000000000..df092a14f81e
--- /dev/null
+++ b/lib/tests/modules/declare-oneOf.nix
@@ -0,0 +1,9 @@
+{ lib, ... }: {
+ options.value = lib.mkOption {
+ type = lib.types.oneOf [
+ lib.types.int
+ (lib.types.listOf lib.types.int)
+ lib.types.str
+ ];
+ };
+}
diff --git a/lib/tests/systems.nix b/lib/tests/systems.nix
index 5748c09b564d..818749442f9f 100644
--- a/lib/tests/systems.nix
+++ b/lib/tests/systems.nix
@@ -14,7 +14,7 @@ let
in with lib.systems.doubles; lib.runTests {
testall = mseteq all (linux ++ darwin ++ freebsd ++ openbsd ++ netbsd ++ illumos ++ wasi ++ windows ++ embedded);
- testarm = mseteq arm [ "armv5tel-linux" "armv6l-linux" "armv7l-linux" "arm-none" "armv7a-darwin" ];
+ testarm = mseteq arm [ "armv5tel-linux" "armv6l-linux" "armv7a-linux" "armv7l-linux" "arm-none" "armv7a-darwin" ];
testi686 = mseteq i686 [ "i686-linux" "i686-freebsd" "i686-netbsd" "i686-openbsd" "i686-cygwin" "i686-windows" "i686-none" "i686-darwin" ];
testmips = mseteq mips [ "mipsel-linux" ];
testx86_64 = mseteq x86_64 [ "x86_64-linux" "x86_64-darwin" "x86_64-freebsd" "x86_64-openbsd" "x86_64-netbsd" "x86_64-cygwin" "x86_64-solaris" "x86_64-windows" "x86_64-none" ];
@@ -24,7 +24,7 @@ in with lib.systems.doubles; lib.runTests {
testfreebsd = mseteq freebsd [ "i686-freebsd" "x86_64-freebsd" ];
testgnu = mseteq gnu (linux /* ++ kfreebsd ++ ... */);
testillumos = mseteq illumos [ "x86_64-solaris" ];
- testlinux = mseteq linux [ "aarch64-linux" "armv5tel-linux" "armv6l-linux" "armv7l-linux" "i686-linux" "mipsel-linux" "riscv32-linux" "riscv64-linux" "x86_64-linux" "powerpc64le-linux" ];
+ testlinux = mseteq linux [ "aarch64-linux" "armv5tel-linux" "armv6l-linux" "armv7a-linux" "armv7l-linux" "i686-linux" "mipsel-linux" "riscv32-linux" "riscv64-linux" "x86_64-linux" "powerpc64le-linux" ];
testnetbsd = mseteq netbsd [ "i686-netbsd" "x86_64-netbsd" ];
testopenbsd = mseteq openbsd [ "i686-openbsd" "x86_64-openbsd" ];
testwindows = mseteq windows [ "i686-cygwin" "x86_64-cygwin" "i686-windows" "x86_64-windows" ];
diff --git a/lib/trivial.nix b/lib/trivial.nix
index f2710a6f0338..3a25e31fb052 100644
--- a/lib/trivial.nix
+++ b/lib/trivial.nix
@@ -29,6 +29,43 @@ rec {
# Value to ignore
y: x;
+ /* Pipes a value through a list of functions, left to right.
+
+ Type: pipe :: a -> [] ->
+ Example:
+ pipe 2 [
+ (x: x + 2) # 2 + 2 = 4
+ (x: x * 2) # 4 * 2 = 8
+ ]
+ => 8
+
+ # ideal to do text transformations
+ pipe [ "a/b" "a/c" ] [
+
+ # create the cp command
+ (map (file: ''cp "${src}/${file}" $out\n''))
+
+ # concatenate all commands into one string
+ lib.concatStrings
+
+ # make that string into a nix derivation
+ (pkgs.runCommand "copy-to-out" {})
+
+ ]
+ =>
+
+ The output type of each function has to be the input type
+ of the next function, and the last function returns the
+ final value.
+ */
+ pipe = val: functions:
+ let reverseApply = x: f: f x;
+ in builtins.foldl' reverseApply val functions;
+ /* note please don’t add a function like `compose = flip pipe`.
+ This would confuse users, because the order of the functions
+ in the list is not clear. With pipe, it’s obvious that it
+ goes first-to-last. With `compose`, not so much.
+ */
## Named versions corresponding to some builtin operators.
@@ -134,7 +171,7 @@ rec {
On each release the first letter is bumped and a new animal is chosen
starting with that new letter.
*/
- codeName = "Loris";
+ codeName = "Markhor";
/* Returns the current nixpkgs version suffix as string. */
versionSuffix =
diff --git a/lib/types.nix b/lib/types.nix
index e22bcd326c86..5e9a28ac4f0a 100644
--- a/lib/types.nix
+++ b/lib/types.nix
@@ -42,7 +42,7 @@ rec {
# Default type functor
defaultFunctor = name: {
inherit name;
- type = types."${name}" or null;
+ type = types.${name} or null;
wrapped = null;
payload = null;
binOp = a: b: null;
@@ -107,7 +107,7 @@ rec {
merge = mergeEqualOption;
};
- int = mkOptionType rec {
+ int = mkOptionType {
name = "int";
description = "signed integer";
check = isInt;
@@ -136,7 +136,7 @@ rec {
sign = bit: range: ign (0 - (range / 2)) (range / 2 - 1)
"signedInt${toString bit}" "${toString bit} bit signed integer";
- in rec {
+ in {
/* An int with a fixed range.
*
* Example:
@@ -172,7 +172,7 @@ rec {
# Alias of u16 for a port number
port = ints.u16;
- float = mkOptionType rec {
+ float = mkOptionType {
name = "float";
description = "floating point number";
check = isFloat;
@@ -217,7 +217,8 @@ rec {
# Deprecated; should not be used because it quietly concatenates
# strings, which is usually not what you want.
- string = separatedString "";
+ string = warn "types.string is deprecated because it quietly concatenates strings"
+ (separatedString "");
attrs = mkOptionType {
name = "attrs";
@@ -443,6 +444,13 @@ rec {
functor = (defaultFunctor name) // { wrapped = [ t1 t2 ]; };
};
+ # Any of the types in the given list
+ oneOf = ts:
+ let
+ head' = if ts == [] then throw "types.oneOf needs to get at least one type in its argument" else head ts;
+ tail' = tail ts;
+ in foldl' either head' tail';
+
# Either value of type `finalType` or `coercedType`, the latter is
# converted to `finalType` using `coerceFunc`.
coercedTo = coercedType: coerceFunc: finalType:
diff --git a/lib/versions.nix b/lib/versions.nix
index 8f7f98ff5e1e..0e9d81ac78b1 100644
--- a/lib/versions.nix
+++ b/lib/versions.nix
@@ -1,14 +1,16 @@
/* Version string functions. */
{ lib }:
-let
-
- splitVersion = builtins.splitVersion or (lib.splitString ".");
-
-in
-
rec {
+ /* Break a version string into its component parts.
+
+ Example:
+ splitVersion "1.2.3"
+ => ["1" "2" "3"]
+ */
+ splitVersion = builtins.splitVersion or (lib.splitString ".");
+
/* Get the major version string from a string.
Example:
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix
index 23168ff16e9e..829053e5a22e 100644
--- a/maintainers/maintainer-list.nix
+++ b/maintainers/maintainer-list.nix
@@ -7,6 +7,7 @@
# Optional
github = "GithubUsername";
+ githubId = your-github-id;
keys = [{
longkeyid = "rsa2048/0x0123456789ABCDEF";
fingerprint = "AAAA BBBB CCCC DDDD EEEE FFFF 0000 1111 2222 3333";
@@ -19,6 +20,7 @@
- `name` is your, preferably real, name,
- `email` is your maintainer email address, and
- `github` is your GitHub handle (as it appears in the URL of your profile page, `https://github.com/`),
+ - `githubId` is your GitHub user ID, which can be found at `https://api.github.com/users/`,
- `keys` is a list of your PGP/GPG key IDs and fingerprints.
`handle == github` is strongly preferred whenever `github` is an acceptable attribute name and is short and convenient.
@@ -38,10 +40,17 @@
See `./scripts/check-maintainer-github-handles.sh` for an example on how to work with this data.
*/
{
+ "00-matt" = {
+ name = "Matt Smith";
+ email = "matt@offtopica.uk";
+ github = "00-matt";
+ githubId = 48835712;
+ };
"0x4A6F" = {
email = "0x4A6F@shackspace.de";
name = "Joachim Ernst";
github = "0x4A6F";
+ githubId = 9675338;
keys = [{
longkeyid = "rsa8192/0x87027528B006D66D";
fingerprint = "F466 A548 AD3F C1F1 8C88 4576 8702 7528 B006 D66D";
@@ -50,41 +59,49 @@
"1000101" = {
email = "jan.hrnko@satoshilabs.com";
github = "1000101";
+ githubId = 791309;
name = "Jan Hrnko";
};
a1russell = {
email = "adamlr6+pub@gmail.com";
github = "a1russell";
+ githubId = 241628;
name = "Adam Russell";
};
aanderse = {
email = "aaron@fosslib.net";
github = "aanderse";
+ githubId = 7755101;
name = "Aaron Andersen";
};
aaronjanse = {
email = "aaron@ajanse.me";
github = "aaronjanse";
+ githubId = 16829510;
name = "Aaron Janse";
- keys = [
- { longkeyid = "rsa2048/0x651BD4B37D75E234"; # Email only
- fingerprint = "490F 5009 34E7 20BD 4C53 96C2 651B D4B3 7D75 E234";
- }
- { longkeyid = "rsa4096/0xBE6C92145BFF4A34"; # Git, etc
- fingerprint = "CED9 6DF4 63D7 B86A 1C4B 1322 BE6C 9214 5BFF 4A34";
- }
- ];
};
aaronschif = {
email = "aaronschif@gmail.com";
github = "aaronschif";
+ githubId = 2258953;
name = "Aaron Schif";
};
abaldeau = {
email = "andreas@baldeau.net";
github = "baldo";
+ githubId = 178750;
name = "Andreas Baldeau";
};
+ abbe = {
+ email = "ashish.is@lostca.se";
+ github = "wahjava";
+ githubId = 2255192;
+ name = "Ashish SHUKLA";
+ keys = [{
+ longkeyid = "rsa4096/0xC746CFA9E74FA4B0";
+ fingerprint = "F682 CDCC 39DC 0FEA E116 20B6 C746 CFA9 E74F A4B0";
+ }];
+ };
abbradar = {
email = "ab@fmap.me";
github = "abbradar";
@@ -93,31 +110,42 @@
abhi18av = {
email = "abhi18av@gmail.com";
github = "abhi18av";
+ githubId = 12799326;
name = "Abhinav Sharma";
};
abigailbuccaneer = {
email = "abigailbuccaneer@gmail.com";
github = "abigailbuccaneer";
+ githubId = 908758;
name = "Abigail Bunyan";
};
aborsu = {
email = "a.borsu@gmail.com";
github = "aborsu";
+ githubId = 5033617;
name = "Augustin Borsu";
};
aboseley = {
email = "adam.boseley@gmail.com";
github = "aboseley";
+ githubId = 13504599;
name = "Adam Boseley";
};
abuibrahim = {
email = "ruslan@babayev.com";
github = "abuibrahim";
+ githubId = 2321000;
name = "Ruslan Babayev";
};
+ acairncross = {
+ email = "acairncross@gmail.com";
+ github = "acairncross";
+ name = "Aiken Cairncross";
+ };
acowley = {
email = "acowley@gmail.com";
github = "acowley";
+ githubId = 124545;
name = "Anthony Cowley";
};
adamt = {
@@ -128,61 +156,73 @@
adelbertc = {
email = "adelbertc@gmail.com";
github = "adelbertc";
+ githubId = 1332980;
name = "Adelbert Chang";
};
adev = {
email = "adev@adev.name";
github = "adevress";
+ githubId = 1773511;
name = "Adrien Devresse";
};
adisbladis = {
email = "adis@blad.is";
github = "adisbladis";
+ githubId = 63286;
name = "Adam Hose";
};
Adjective-Object = {
email = "mhuan13@gmail.com";
github = "Adjective-Object";
+ githubId = 1174858;
name = "Maxwell Huang-Hobbs";
};
adnelson = {
email = "ithinkican@gmail.com";
github = "adnelson";
+ githubId = 5091511;
name = "Allen Nelson";
};
adolfogc = {
email = "adolfo.garcia.cr@gmail.com";
github = "adolfogc";
+ githubId = 1250775;
name = "Adolfo E. García Castro";
};
aepsil0n = {
email = "eduard.bopp@aepsil0n.de";
github = "aepsil0n";
+ githubId = 3098430;
name = "Eduard Bopp";
};
aerialx = {
email = "aaron+nixos@aaronlindsay.com";
github = "AerialX";
+ githubId = 117295;
name = "Aaron Lindsay";
};
aespinosa = {
email = "allan.espinosa@outlook.com";
github = "aespinosa";
+ githubId = 58771;
name = "Allan Espinosa";
};
aethelz = {
email = "aethelz@protonmail.com";
github = "aethelz";
+ githubId = 10677343;
name = "Eugene";
};
aflatter = {
email = "flatter@fastmail.fm";
github = "aflatter";
+ githubId = 168;
name = "Alexander Flatter";
};
afldcr = {
email = "alex@fldcr.com";
github = "afldcr";
+ githubId = 335271;
name = "James Alexander Feldman-Crough";
};
aforemny = {
@@ -193,36 +233,43 @@
afranchuk = {
email = "alex.franchuk@gmail.com";
github = "afranchuk";
+ githubId = 4296804;
name = "Alex Franchuk";
};
aherrmann = {
email = "andreash87@gmx.ch";
github = "aherrmann";
+ githubId = 732652;
name = "Andreas Herrmann";
};
ahmedtd = {
email = "ahmed.taahir@gmail.com";
github = "ahmedtd";
+ githubId = 1017202;
name = "Taahir Ahmed";
};
ahuzik = {
email = "ales.guzik@gmail.com";
github = "alesguzik";
+ githubId = 209175;
name = "Ales Huzik";
};
aij = {
email = "aij+git@mrph.org";
github = "aij";
+ githubId = 4732885;
name = "Ivan Jager";
};
ajs124 = {
email = "nix@ajs124.de";
github = "ajs124";
+ githubId = 1229027;
name = "Andreas Schrägle";
};
ajgrf = {
email = "a@ajgrf.com";
github = "ajgrf";
+ githubId = 10733175;
name = "Alex Griffin";
};
ak = {
@@ -233,41 +280,54 @@
akavel = {
email = "czapkofan@gmail.com";
github = "akavel";
+ githubId = 273837;
name = "Mateusz Czapliński";
};
akaWolf = {
email = "akawolf0@gmail.com";
github = "akaWolf";
+ githubId = 5836586;
name = "Artjom Vejsel";
};
akc = {
email = "akc@akc.is";
github = "akc";
+ githubId = 1318982;
name = "Anders Claesson";
};
akru = {
email = "mail@akru.me";
github = "akru";
+ githubId = 786394;
name = "Alexander Krupenkin ";
};
alexarice = {
email = "alexrice999@hotmail.co.uk";
github = "alexarice";
+ githubId = 17208985;
name = "Alex Rice";
};
+ alexbakker = {
+ email = "ab@alexbakker.me";
+ github = "alexbakker";
+ name = "Alexander Bakker";
+ };
alexchapman = {
email = "alex@farfromthere.net";
github = "AJChapman";
+ githubId = 8316672;
name = "Alex Chapman";
};
alexfmpe = {
email = "alexandre.fmp.esteves@gmail.com";
github = "alexfmpe";
+ githubId = 2335822;
name = "Alexandre Esteves";
};
alexvorobiev = {
email = "alexander.vorobiev@gmail.com";
github = "alexvorobiev";
+ githubId = 782180;
name = "Alex Vorobiev";
};
algorith = {
@@ -277,8 +337,15 @@
alibabzo = {
email = "alistair.bill@gmail.com";
github = "alibabzo";
+ githubId = 2822871;
name = "Alistair Bill";
};
+ alkeryn = {
+ email = "plbraundev@gmail.com";
+ github = "Alkeryn";
+ githubId = 11599075;
+ name = "Pierre-Louis Braun";
+ };
all = {
email = "nix-commits@lists.science.uu.nl";
name = "Nix Committers";
@@ -286,6 +353,7 @@
allonsy = {
email = "linuxbash8@gmail.com";
github = "allonsy";
+ githubId = 5892756;
name = "Alec Snyder";
};
alunduil = {
@@ -293,9 +361,20 @@
github = "alunduil";
name = "Alex Brandt";
};
+ alva = {
+ email = "alva@skogen.is";
+ github = "fjallarefur";
+ githubId = 42881386;
+ name = "Alva";
+ keys = [{
+ longkeyid = "ed25519/0xF53E323342F7A6D3";
+ fingerprint = "B422 CFB1 C9EF 73F7 E1E2 698D F53E 3233 42F7 A6D3A";
+ }];
+ };
amar1729 = {
email = "amar.paul16@gmail.com";
github = "amar1729";
+ githubId = 15623522;
name = "Amar Paul";
};
ambrop72 = {
@@ -306,11 +385,13 @@
amiddelk = {
email = "amiddelk@gmail.com";
github = "amiddelk";
+ githubId = 1358320;
name = "Arie Middelkoop";
};
amiloradovsky = {
email = "miloradovsky@gmail.com";
github = "amiloradovsky";
+ githubId = 20530052;
name = "Andrew Miloradovsky";
};
aminb = {
@@ -321,36 +402,43 @@
aminechikhaoui = {
email = "amine.chikhaoui91@gmail.com";
github = "AmineChikhaoui";
+ githubId = 5149377;
name = "Amine Chikhaoui";
};
amorsillo = {
email = "andrew.morsillo@gmail.com";
github = "AndrewMorsillo";
+ githubId = 858965;
name = "Andrew Morsillo";
};
andersk = {
email = "andersk@mit.edu";
github = "andersk";
+ githubId = 26471;
name = "Anders Kaseorg";
};
anderslundstedt = {
email = "git@anderslundstedt.se";
github = "anderslundstedt";
+ githubId = 4514101;
name = "Anders Lundstedt";
};
AndersonTorres = {
email = "torres.anderson.85@protonmail.com";
github = "AndersonTorres";
+ githubId = 5954806;
name = "Anderson Torres";
};
anderspapitto = {
email = "anderspapitto@gmail.com";
github = "anderspapitto";
+ githubId = 1388690;
name = "Anders Papitto";
};
andir = {
email = "andreas@rammhold.de";
github = "andir";
+ githubId = 638836;
name = "Andreas Rammhold";
};
andreabedini = {
@@ -366,21 +454,25 @@
andrestylianos = {
email = "andre.stylianos@gmail.com";
github = "andrestylianos";
+ githubId = 7112447;
name = "Andre S. Ramos";
};
andrew-d = {
email = "andrew@du.nham.ca";
github = "andrew-d";
+ githubId = 1079173;
name = "Andrew Dunham";
};
andrewchambers = {
email = "ac@acha.ninja";
github = "andrewchambers";
+ githubId = 962885;
name = "Andrew Chambers";
};
andrewrk = {
email = "superjoe30@gmail.com";
github = "andrewrk";
+ githubId = 106511;
name = "Andrew Kelley";
};
andsild = {
@@ -391,31 +483,37 @@
aneeshusa = {
email = "aneeshusa@gmail.com";
github = "aneeshusa";
+ githubId = 2085567;
name = "Aneesh Agrawal";
};
angristan = {
email = "angristan@pm.me";
github = "angristan";
+ githubId = 11699655;
name = "Stanislas Lange";
};
ankhers = {
- email = "justin.k.wood@gmail.com";
+ email = "me@ankhers.dev";
github = "ankhers";
+ githubId = 750786;
name = "Justin Wood";
};
anpryl = {
email = "anpryl@gmail.com";
github = "anpryl";
+ githubId = 5327697;
name = "Anatolii Prylutskyi";
};
anton-dessiatov = {
email = "anton.dessiatov@gmail.com";
github = "anton-dessiatov";
+ githubId = 2873280;
name = "Anton Desyatov";
};
Anton-Latukha = {
email = "anton.latuka+nixpkgs@gmail.com";
github = "Anton-Latukha";
+ githubId = 20933385;
name = "Anton Latukha";
};
antono = {
@@ -426,110 +524,149 @@
antonxy = {
email = "anton.schirg@posteo.de";
github = "antonxy";
+ githubId = 4194320;
name = "Anton Schirg";
};
apeschar = {
email = "albert@peschar.net";
github = "apeschar";
+ githubId = 122977;
name = "Albert Peschar";
};
apeyroux = {
email = "alex@px.io";
github = "apeyroux";
+ githubId = 1078530;
name = "Alexandre Peyroux";
};
ar1a = {
email = "aria@ar1as.space";
github = "ar1a";
+ githubId = 8436007;
name = "Aria Edmonds";
};
arcadio = {
email = "arc@well.ox.ac.uk";
github = "arcadio";
+ githubId = 56009;
name = "Arcadio Rubio García";
};
+ arcnmx = {
+ email = "arcnmx@users.noreply.github.com";
+ github = "arcnmx";
+ githubId = 13426784;
+ name = "arcnmx";
+ };
ardumont = {
email = "eniotna.t@gmail.com";
github = "ardumont";
+ githubId = 718812;
name = "Antoine R. Dumont";
};
aristid = {
email = "aristidb@gmail.com";
github = "aristidb";
+ githubId = 30712;
name = "Aristid Breitkreuz";
};
ariutta = {
email = "anders.riutta@gmail.com";
github = "ariutta";
+ githubId = 1296771;
name = "Anders Riutta";
};
arobyn = {
email = "shados@shados.net";
github = "shados";
+ githubId = 338268;
name = "Alexei Robyn";
};
artemist = {
email = "me@artem.ist";
github = "artemist";
+ githubId = 1226638;
name = "Artemis Tosini";
keys = [{
longkeyid = "rsa4096/0x4FDC96F161E7BA8A";
fingerprint = "3D2B B230 F9FA F0C5 1832 46DD 4FDC 96F1 61E7 BA8A";
}];
};
+ arthur = {
+ email = "me@arthur.li";
+ github = "arthurl";
+ githubId = 3965744;
+ name = "Arthur Lee";
+ };
artuuge = {
email = "artuuge@gmail.com";
github = "artuuge";
+ githubId = 10285250;
name = "Artur E. Ruuge";
};
ashalkhakov = {
email = "artyom.shalkhakov@gmail.com";
github = "ashalkhakov";
+ githubId = 1270502;
name = "Artyom Shalkhakov";
};
ashgillman = {
email = "gillmanash@gmail.com";
github = "ashgillman";
+ githubId = 816777;
name = "Ashley Gillman";
};
+ ashkitten = {
+ email = "ashlea@protonmail.com";
+ github = "ashkitten";
+ githubId = 9281956;
+ name = "ash lea";
+ };
aske = {
email = "aske@fmap.me";
github = "aske";
+ githubId = 869771;
name = "Kirill Boltaev";
};
asppsa = {
email = "asppsa@gmail.com";
github = "asppsa";
+ githubId = 453170;
name = "Alastair Pharo";
};
astro = {
email = "astro@spaceboyz.net";
github = "astro";
+ githubId = 12923;
name = "Astro";
};
astsmtl = {
email = "astsmtl@yandex.ru";
github = "astsmtl";
+ githubId = 2093941;
name = "Alexander Tsamutali";
};
asymmetric = {
email = "lorenzo@mailbox.org";
github = "asymmetric";
+ githubId = 101816;
name = "Lorenzo Manacorda";
};
aszlig = {
email = "aszlig@nix.build";
github = "aszlig";
+ githubId = 192147;
name = "aszlig";
};
athas = {
email = "athas@sigkill.dk";
github = "athas";
+ githubId = 55833;
name = "Troels Henriksen";
};
atnnn = {
email = "etienne@atnnn.com";
github = "atnnn";
+ githubId = 706854;
name = "Etienne Laurin";
};
auntie = {
@@ -540,11 +677,13 @@
avaq = {
email = "avaq+nixos@xs4all.nl";
github = "avaq";
+ githubId = 1217745;
name = "Aldwin Vlasblom";
};
avery = {
email = "averyl+nixos@protonmail.com";
github = "AveryLychee";
+ githubId = 9147625;
name = "Avery Lychee";
};
averelld = {
@@ -555,6 +694,7 @@
avitex = {
email = "theavitex@gmail.com";
github = "avitex";
+ githubId = 5110816;
name = "avitex";
keys = [{
longkeyid = "rsa4096/0x8B366C443CABE942";
@@ -564,26 +704,31 @@
avnik = {
email = "avn@avnik.info";
github = "avnik";
+ githubId = 153538;
name = "Alexander V. Nikolaev";
};
aw = {
email = "aw-nixos@meterriblecrew.net";
github = "herrwiese";
+ githubId = 206242;
name = "Andreas Wiese";
};
aycanirican = {
email = "iricanaycan@gmail.com";
github = "aycanirican";
+ githubId = 135230;
name = "Aycan iRiCAN";
};
babariviere = {
- email = "babariviere@protonmail.com";
+ email = "babathriviere@gmail.com";
github = "babariviere";
+ githubId = 12128029;
name = "babariviere";
};
bachp = {
email = "pascal.bach@nextrem.ch";
github = "bachp";
+ githubId = 333807;
name = "Pascal Bach";
};
backuitist = {
@@ -603,96 +748,115 @@
balsoft = {
email = "balsoft75@gmail.com";
github = "balsoft";
+ githubId = 18467667;
name = "Alexander Bantyev";
};
bandresen = {
email = "bandresen@gmail.com";
github = "bandresen";
+ githubId = 80325;
name = "Benjamin Andresen";
};
baracoder = {
email = "baracoder@googlemail.com";
github = "baracoder";
+ githubId = 127523;
name = "Herman Fries";
};
barrucadu = {
email = "mike@barrucadu.co.uk";
github = "barrucadu";
+ githubId = 75235;
name = "Michael Walker";
};
basvandijk = {
email = "v.dijk.bas@gmail.com";
github = "basvandijk";
+ githubId = 576355;
name = "Bas van Dijk";
};
Baughn = {
email = "sveina@gmail.com";
github = "Baughn";
+ githubId = 45811;
name = "Svein Ove Aas";
};
bb010g = {
email = "me@bb010g.com";
github = "bb010g";
+ githubId = 340132;
name = "Brayden Banks";
};
bbarker = {
email = "brandon.barker@gmail.com";
github = "bbarker";
+ githubId = 916366;
name = "Brandon Elam Barker";
};
bbigras = {
email = "bigras.bruno@gmail.com";
github = "bbigras";
+ githubId = 24027;
name = "Bruno Bigras";
};
bcarrell = {
email = "brandoncarrell@gmail.com";
github = "bcarrell";
+ githubId = 1015044;
name = "Brandon Carrell";
};
bcdarwin = {
email = "bcdarwin@gmail.com";
github = "bcdarwin";
+ githubId = 164148;
name = "Ben Darwin";
};
bdesham = {
email = "benjamin@esham.io";
github = "bdesham";
+ githubId = 354230;
name = "Benjamin Esham";
};
bdimcheff = {
email = "brandon@dimcheff.com";
github = "bdimcheff";
+ githubId = 14111;
name = "Brandon Dimcheff";
};
bendlas = {
email = "herwig@bendlas.net";
github = "bendlas";
+ githubId = 214787;
name = "Herwig Hochleitner";
};
benley = {
email = "benley@gmail.com";
github = "benley";
+ githubId = 1432730;
name = "Benjamin Staffin";
};
bennofs = {
email = "benno.fuenfstueck@gmail.com";
github = "bennofs";
+ githubId = 3192959;
name = "Benno Fünfstück";
};
benpye = {
email = "ben@curlybracket.co.uk";
github = "benpye";
+ githubId = 442623;
name = "Ben Pye";
};
benwbooth = {
email = "benwbooth@gmail.com";
github = "benwbooth";
+ githubId = 75972;
name = "Ben Booth";
};
berce = {
email = "bert.moens@gmail.com";
github = "berce";
+ githubId = 10439709;
name = "Bert Moens";
};
berdario = {
@@ -703,36 +867,43 @@
bergey = {
email = "bergey@teallabs.org";
github = "bergey";
+ githubId = 251106;
name = "Daniel Bergey";
};
betaboon = {
email = "betaboon@0x80.ninja";
github = "betaboon";
+ githubId = 7346933;
name = "betaboon";
};
bfortz = {
email = "bernard.fortz@gmail.com";
github = "bfortz";
+ githubId = 16426882;
name = "Bernard Fortz";
};
bgamari = {
email = "ben@smart-cactus.org";
github = "bgamari";
+ githubId = 1010174;
name = "Ben Gamari";
};
bhall = {
email = "brendan.j.hall@bath.edu";
github = "brendan-hall";
+ githubId = 34919100;
name = "Brendan Hall";
};
bhipple = {
email = "bhipple@protonmail.com";
github = "bhipple";
+ githubId = 2071583;
name = "Benjamin Hipple";
};
binarin = {
email = "binarin@binarin.ru";
github = "binarin";
+ githubId = 185443;
name = "Alexey Lebedeff";
};
bjg = {
@@ -742,11 +913,13 @@
bjornfor = {
email = "bjorn.forsman@gmail.com";
github = "bjornfor";
+ githubId = 133602;
name = "Bjørn Forsman";
};
bkchr = {
email = "nixos@kchr.de";
github = "bkchr";
+ githubId = 5718007;
name = "Bastian Köcher";
};
bluescreen303 = {
@@ -757,21 +930,25 @@
bobakker = {
email = "bobakk3r@gmail.com";
github = "bobakker";
+ githubId = 10221570;
name = "Bo Bakker";
};
bobvanderlinden = {
email = "bobvanderlinden@gmail.com";
github = "bobvanderlinden";
+ githubId = 6375609;
name = "Bob van der Linden";
};
bodil = {
email = "nix@bodil.org";
github = "bodil";
+ githubId = 17880;
name = "Bodil Stokke";
};
boj = {
email = "brian@uncannyworks.com";
github = "boj";
+ githubId = 50839;
name = "Brian Jones";
};
boothead = {
@@ -782,181 +959,211 @@
borisbabic = {
email = "boris.ivan.babic@gmail.com";
github = "borisbabic";
+ githubId = 1743184;
name = "Boris Babić";
};
bosu = {
email = "boriss@gmail.com";
github = "bosu";
+ githubId = 3465841;
name = "Boris Sukholitko";
};
bradediger = {
email = "brad@bradediger.com";
github = "bradediger";
+ githubId = 4621;
name = "Brad Ediger";
};
brainrape = {
email = "martonboros@gmail.com";
github = "brainrape";
+ githubId = 302429;
name = "Marton Boros";
};
bramd = {
email = "bram@bramd.nl";
github = "bramd";
+ githubId = 86652;
name = "Bram Duvigneau";
};
braydenjw = {
email = "nixpkgs@willenborg.ca";
github = "braydenjw";
+ githubId = 2506621;
name = "Brayden Willenborg";
};
brian-dawn = {
email = "brian.t.dawn@gmail.com";
github = "brian-dawn";
+ githubId = 1274409;
name = "Brian Dawn";
};
brianhicks = {
email = "brian@brianthicks.com";
github = "BrianHicks";
+ githubId = 355401;
name = "Brian Hicks";
};
bricewge = {
email = "bricewge@gmail.com";
github = "bricewge";
+ githubId = 5525646;
name = "Brice Waegeneire";
};
bstrik = {
email = "dutchman55@gmx.com";
github = "bstrik";
+ githubId = 7716744;
name = "Berno Strik";
};
buffet = {
email = "niclas@countingsort.com";
github = "buffet";
+ githubId = 33751841;
name = "Niclas Meyer";
};
bugworm = {
email = "bugworm@zoho.com";
github = "bugworm";
+ githubId = 7214361;
name = "Roman Gerasimenko";
};
bzizou = {
email = "Bruno@bzizou.net";
github = "bzizou";
+ githubId = 2647566;
name = "Bruno Bzeznik";
};
c0bw3b = {
email = "c0bw3b@gmail.com";
github = "c0bw3b";
+ githubId = 24417923;
name = "Renaud";
};
c0deaddict = {
email = "josvanbakel@protonmail.com";
github = "c0deaddict";
+ githubId = 510553;
name = "Jos van Bakel";
};
calbrecht = {
email = "christian.albrecht@mayflower.de";
github = "calbrecht";
+ githubId = 1516457;
name = "Christian Albrecht";
};
callahad = {
email = "dan.callahan@gmail.com";
github = "callahad";
+ githubId = 24193;
name = "Dan Callahan";
};
calvertvl = {
email = "calvertvl@gmail.com";
github = "calvertvl";
+ githubId = 7435854;
name = "Victor Calvert";
};
campadrenalin = {
email = "campadrenalin@gmail.com";
github = "campadrenalin";
+ githubId = 289492;
name = "Philip Horger";
};
candeira = {
email = "javier@candeira.com";
github = "candeira";
+ githubId = 91694;
name = "Javier Candeira";
};
canndrew = {
email = "shum@canndrew.org";
github = "canndrew";
+ githubId = 5555066;
name = "Andrew Cann";
};
carlosdagos = {
email = "m@cdagostino.io";
github = "carlosdagos";
+ githubId = 686190;
name = "Carlos D'Agostino";
};
carlsverre = {
email = "accounts@carlsverre.com";
github = "carlsverre";
+ githubId = 82591;
name = "Carl Sverre";
};
cartr = {
email = "carter.sande@duodecima.technology";
github = "cartr";
+ githubId = 5241813;
name = "Carter Sande";
};
casey = {
email = "casey@rodarmor.net";
github = "casey";
+ githubId = 1945;
name = "Casey Rodarmor";
};
catern = {
email = "sbaugh@catern.com";
github = "catern";
+ githubId = 5394722;
name = "Spencer Baugh";
};
caugner = {
email = "nixos@caugner.de";
github = "caugner";
+ githubId = 495429;
name = "Claas Augner";
};
cbley = {
email = "claudio.bley@gmail.com";
github = "avdv";
+ githubId = 3471749;
name = "Claudio Bley";
};
cdepillabout = {
email = "cdep.illabout@gmail.com";
github = "cdepillabout";
+ githubId = 64804;
name = "Dennis Gosnell";
};
ceedubs = {
email = "ceedubs@gmail.com";
github = "ceedubs";
+ githubId = 977929;
name = "Cody Allen";
};
- cf6b88f = {
- email = "elmo.todurov@eesti.ee";
- github = "cf6b88f";
- name = "Elmo Todurov";
- };
cfouche = {
email = "chaddai.fouche@gmail.com";
github = "Chaddai";
+ githubId = 5771456;
name = "Chaddaï Fouché";
};
chaduffy = {
email = "charles@dyfis.net";
github = "charles-dyfis-net";
+ githubId = 22370;
name = "Charles Duffy";
};
changlinli = {
email = "mail@changlinli.com";
github = "changlinli";
+ githubId = 1762540;
name = "Changlin Li";
};
CharlesHD = {
email = "charleshdespointes@gmail.com";
github = "CharlesHD";
+ githubId = 6608071;
name = "Charles Huyghues-Despointes";
};
chaoflow = {
email = "flo@chaoflow.net";
github = "chaoflow";
+ githubId = 89596;
name = "Florian Friesdorf";
};
chattered = {
@@ -966,106 +1173,137 @@
ChengCat = {
email = "yu@cheng.cat";
github = "ChengCat";
+ githubId = 33503784;
name = "Yucheng Zhang";
};
chessai = {
email = "chessai1996@gmail.com";
github = "chessai";
+ githubId = 18648043;
name = "Daniel Cartwright";
};
chiiruno = {
email = "okinan@protonmail.com";
github = "chiiruno";
+ githubId = 30435868;
name = "Okina Matara";
};
choochootrain = {
email = "hurshal@imap.cc";
github = "choochootrain";
+ githubId = 803961;
name = "Hurshal Patel";
};
chpatrick = {
email = "chpatrick@gmail.com";
github = "chpatrick";
+ githubId = 832719;
name = "Patrick Chilton";
};
chreekat = {
email = "b@chreekat.net";
github = "chreekat";
+ githubId = 538538;
name = "Bryan Richter";
};
chris-martin = {
email = "ch.martin@gmail.com";
github = "chris-martin";
+ githubId = 399718;
name = "Chris Martin";
};
chrisaw = {
email = "home@chrisaw.com";
github = "cawilliamson";
+ githubId = 1141769;
name = "Christopher A. Williamson";
};
chrisjefferson = {
email = "chris@bubblescope.net";
github = "chrisjefferson";
+ githubId = 811527;
name = "Christopher Jefferson";
};
chrisrosset = {
email = "chris@rosset.org.uk";
github = "chrisrosset";
+ githubId = 1103294;
name = "Christopher Rosset";
};
christopherpoole = {
email = "mail@christopherpoole.net";
github = "christopherpoole";
+ githubId = 2245737;
name = "Christopher Mark Poole";
};
ciil = {
email = "simon@lackerbauer.com";
github = "ciil";
+ githubId = 3956062;
name = "Simon Lackerbauer";
};
+ cizra = {
+ email = "todurov+nix@gmail.com";
+ github = "cizra";
+ githubId = 2131991;
+ name = "Elmo Todurov";
+ };
ck3d = {
email = "ck3d@gmx.de";
github = "ck3d";
+ githubId = 25088352;
name = "Christian Kögler";
};
- ckampka = {
+ kampka = {
email = "christian@kampka.net";
github = "kampka";
+ githubId = 422412;
name = "Christian Kampka";
+ keys = [{
+ longkeyid = "ed25519/0x1CBE9645DD68E915";
+ fingerprint = "F7FA 0BD0 8775 337C F6AB 4A14 1CBE 9645 DD68 E915";
+ }];
};
ckauhaus = {
email = "kc@flyingcircus.io";
github = "ckauhaus";
+ githubId = 1448923;
name = "Christian Kauhaus";
};
cko = {
email = "christine.koppelt@gmail.com";
github = "cko";
+ githubId = 68239;
name = "Christine Koppelt";
};
clacke = {
email = "claes.wallin@greatsinodevelopment.com";
github = "clacke";
+ githubId = 199180;
name = "Claes Wallin";
};
cleverca22 = {
email = "cleverca22@gmail.com";
github = "cleverca22";
+ githubId = 848609;
name = "Michael Bishop";
};
cmcdragonkai = {
email = "roger.qiu@matrix.ai";
github = "cmcdragonkai";
+ githubId = 640797;
name = "Roger Qiu";
};
cmfwyp = {
email = "cmfwyp@riseup.net";
github = "cmfwyp";
+ githubId = 20808761;
name = "cmfwyp";
};
cobbal = {
email = "andrew.cobb@gmail.com";
github = "cobbal";
+ githubId = 180339;
name = "Andrew Cobb";
};
coconnor = {
@@ -1076,51 +1314,67 @@
codsl = {
email = "codsl@riseup.net";
github = "codsl";
+ githubId = 6402559;
name = "codsl";
};
codyopel = {
email = "codyopel@gmail.com";
github = "codyopel";
+ githubId = 5561189;
name = "Cody Opel";
};
+ cohencyril = {
+ email = "cyril.cohen@inria.fr";
+ github = "CohenCyril";
+ githubId = 298705;
+ name = "Cyril Cohen";
+ };
colemickens = {
email = "cole.mickens@gmail.com";
github = "colemickens";
+ githubId = 327028;
name = "Cole Mickens";
};
colescott = {
email = "colescottsf@gmail.com";
github = "colescott";
+ githubId = 5684605;
name = "Cole Scott";
};
copumpkin = {
email = "pumpkingod@gmail.com";
github = "copumpkin";
+ githubId = 2623;
name = "Dan Peebles";
};
corngood = {
email = "corngood@gmail.com";
github = "corngood";
+ githubId = 3077118;
name = "David McFarland";
};
coroa = {
email = "jonas@chaoflow.net";
github = "coroa";
+ githubId = 2552981;
name = "Jonas Hörsch";
};
costrouc = {
email = "chris.ostrouchov@gmail.com";
github = "costrouc";
+ githubId = 1740337;
name = "Chris Ostrouchov";
};
couchemar = {
email = "couchemar@yandex.ru";
github = "couchemar";
+ githubId = 1573344;
name = "Andrey Pavlov";
};
cpages = {
email = "page@ruiec.cat";
github = "cpages";
+ githubId = 411324;
name = "Carles Pagès";
};
cransom = {
@@ -1131,36 +1385,43 @@
CrazedProgrammer = {
email = "crazedprogrammer@gmail.com";
github = "CrazedProgrammer";
+ githubId = 12202789;
name = "CrazedProgrammer";
};
cryptix = {
email = "cryptix@riseup.net";
github = "cryptix";
+ githubId = 111202;
name = "Henry Bubert";
};
CrystalGamma = {
email = "nixos@crystalgamma.de";
github = "CrystalGamma";
+ githubId = 6297001;
name = "Jona Stubbe";
};
csingley = {
email = "csingley@gmail.com";
github = "csingley";
+ githubId = 398996;
name = "Christopher Singley";
};
cstrahan = {
email = "charles@cstrahan.com";
github = "cstrahan";
+ githubId = 143982;
name = "Charles Strahan";
};
cwoac = {
email = "oliver@codersoffortune.net";
github = "cwoac";
+ githubId = 1382175;
name = "Oliver Matthews";
};
cypherpunk2140 = {
email = "stefan.mihaila@pm.me";
github = "cypherpunk2140";
+ githubId = 2217136;
name = "Ștefan D. Mihăilă";
keys = [
{ longkeyid = "rsa4096/6E68A39BF16A3ECB";
@@ -1171,49 +1432,74 @@
}
];
};
+ dadada = {
+ name = "dadada";
+ email = "dadada@dadada.li";
+ github = "dadada";
+ githubId = 7216772;
+ keys = [{
+ longkeyid = "ed25519/0xEEB8D1CE62C4DFEA";
+ fingerprint = "D68C 8469 5C08 7E0F 733A 28D0 EEB8 D1CE 62C4 DFEA";
+ }];
+ };
dalance = {
email = "dalance@gmail.com";
github = "dalance";
+ githubId = 4331004;
name = "Naoya Hatta";
};
DamienCassou = {
email = "damien@cassou.me";
github = "DamienCassou";
+ githubId = 217543;
name = "Damien Cassou";
};
danbst = {
email = "abcz2.uprola@gmail.com";
github = "danbst";
+ githubId = 743057;
name = "Danylo Hlynskyi";
};
dancek = {
email = "hannu.hartikainen@gmail.com";
github = "dancek";
+ githubId = 245394;
name = "Hannu Hartikainen";
};
+ danderson = {
+ email = "dave@natulte.net";
+ github = "danderson";
+ githubId = 1918;
+ name = "David Anderson";
+ };
danharaj = {
email = "dan@obsidian.systems";
github = "danharaj";
+ githubId = 23366017;
name = "Dan Haraj";
};
danieldk = {
email = "me@danieldk.eu";
github = "danieldk";
+ githubId = 49398;
name = "Daniël de Kok";
};
danielfullmer = {
email = "danielrf12@gmail.com";
github = "danielfullmer";
+ githubId = 1298344;
name = "Daniel Fullmer";
};
das-g = {
email = "nixpkgs@raphael.dasgupta.ch";
github = "das-g";
+ githubId = 97746;
name = "Raphael Das Gupta";
};
das_j = {
email = "janne@hess.ooo";
github = "dasJ";
+ githubId = 4971975;
name = "Janne Heß";
};
dasuxullebt = {
@@ -1223,11 +1509,13 @@
david50407 = {
email = "me@davy.tw";
github = "david50407";
+ githubId = 841969;
name = "David Kuo";
};
davidak = {
email = "post@davidak.de";
github = "davidak";
+ githubId = 91113;
name = "David Kleuker";
};
davidrusu = {
@@ -1235,64 +1523,86 @@
github = "davidrusu";
name = "David Rusu";
};
+ davidtwco = {
+ email = "nix@david.davidtw.co";
+ github = "davidtwco";
+ githubId = 1295100;
+ name = "David Wood";
+ keys = [{
+ longkeyid = "rsa4096/0x01760B4F9F53F154";
+ fingerprint = "5B08 313C 6853 E5BF FA91 A817 0176 0B4F 9F53 F154";
+ }];
+ };
davorb = {
email = "davor@davor.se";
github = "davorb";
+ githubId = 798427;
name = "Davor Babic";
};
dawidsowa = {
email = "dawid_sowa@posteo.net";
github = "dawidsowa";
+ githubId = 49904992;
name = "Dawid Sowa";
};
dbohdan = {
email = "dbohdan@dbohdan.com";
github = "dbohdan";
+ githubId = 3179832;
name = "D. Bohdan";
};
dbrock = {
email = "daniel@brockman.se";
github = "dbrock";
+ githubId = 14032;
name = "Daniel Brockman";
};
deepfire = {
email = "_deepfire@feelingofgreen.ru";
github = "deepfire";
+ githubId = 452652;
name = "Kosyrev Serge";
};
delan = {
name = "Delan Azabani";
email = "delan@azabani.com";
github = "delan";
+ githubId = 465303;
};
delroth = {
email = "delroth@gmail.com";
github = "delroth";
+ githubId = 202798;
name = "Pierre Bourdon";
};
deltaevo = {
email = "deltaduartedavid@gmail.com";
github = "DeltaEvo";
+ githubId = 8864716;
name = "Duarte David";
};
demin-dmitriy = {
email = "demindf@gmail.com";
github = "demin-dmitriy";
+ githubId = 5503422;
name = "Dmitriy Demin";
};
demize = {
email = "johannes@kyriasis.com";
github = "kyrias";
+ githubId = 2285387;
name = "Johannes Löthberg";
};
demyanrogozhin = {
email = "demyan.rogozhin@gmail.com";
github = "demyanrogozhin";
+ githubId = 62989;
name = "Demyan Rogozhin";
};
derchris = {
email = "derchris@me.com";
github = "derchrisuk";
+ githubId = 706758;
name = "Christian Gerbrandt";
};
DerGuteMoritz = {
@@ -1303,11 +1613,13 @@
dermetfan = {
email = "serverkorken@gmail.com";
github = "dermetfan";
+ githubId = 4956158;
name = "Robin Stumm";
};
DerTim1 = {
email = "tim.digel@active-group.de";
github = "DerTim1";
+ githubId = 21953890;
name = "Tim Digel";
};
desiderius = {
@@ -1318,21 +1630,25 @@
devhell = {
email = "\"^\"@regexmail.net";
github = "devhell";
+ githubId = 896182;
name = "devhell";
};
dezgeg = {
email = "tuomas.tynkkynen@iki.fi";
github = "dezgeg";
+ githubId = 579369;
name = "Tuomas Tynkkynen";
};
dfordivam = {
email = "dfordivam+nixpkgs@gmail.com";
github = "dfordivam";
+ githubId = 681060;
name = "Divam";
};
dfoxfranke = {
email = "dfoxfranke@gmail.com";
github = "dfoxfranke";
+ githubId = 4708206;
name = "Daniel Fox Franke";
};
dgonyeo = {
@@ -1343,71 +1659,97 @@
dhkl = {
email = "david@davidslab.com";
github = "dhl";
+ githubId = 265220;
name = "David Leung";
};
dipinhora = {
email = "dipinhora+github@gmail.com";
github = "dipinhora";
+ githubId = 11946442;
name = "Dipin Hora";
};
disassembler = {
email = "disasm@gmail.com";
github = "disassembler";
+ githubId = 651205;
name = "Samuel Leathers";
};
disserman = {
email = "disserman@gmail.com";
github = "divi255";
+ githubId = 40633781;
name = "Sergei S.";
};
dizfer = {
email = "david@izquierdofernandez.com";
github = "dizfer";
+ githubId = 8852888;
name = "David Izquierdo";
};
Dje4321 = {
email = "dje4321@gmail.com";
github = "dje4321";
+ githubId = 10913120;
name = "Dje4321";
};
+ dkabot = {
+ email = "dkabot@dkabot.com";
+ github = "dkabot";
+ githubId = 1316469;
+ name = "Naomi Morse";
+ };
+ dkudriavtsev = {
+ email = "dkudriavtsev@gmail.com";
+ github = "dkudriavtsev";
+ githubId = 9790772;
+ name = "Dmitry Kudriavtsev";
+ };
dmalikov = {
email = "malikov.d.y@gmail.com";
github = "dmalikov";
+ githubId = 997543;
name = "Dmitry Malikov";
};
DmitryTsygankov = {
email = "dmitry.tsygankov@gmail.com";
github = "DmitryTsygankov";
+ githubId = 425354;
name = "Dmitry Tsygankov";
};
dmjio = {
email = "djohnson.m@gmail.com";
github = "dmjio";
+ githubId = 875324;
name = "David Johnson";
};
dmvianna = {
email = "dmlvianna@gmail.com";
github = "dmvianna";
+ githubId = 1708810;
name = "Daniel Vianna";
};
dochang = {
email = "dochang@gmail.com";
github = "dochang";
+ githubId = 129093;
name = "Desmond O. Chang";
};
domenkozar = {
email = "domen@dev.si";
github = "domenkozar";
+ githubId = 126339;
name = "Domen Kozar";
};
doronbehar = {
email = "me@doronbehar.com";
github = "doronbehar";
+ githubId = 10998835;
name = "Doron Behar";
};
dotlambda = {
email = "rschuetz17@gmail.com";
github = "dotlambda";
+ githubId = 6806011;
name = "Robert Schütz";
};
doublec = {
@@ -1418,16 +1760,19 @@
dpaetzel = {
email = "david.a.paetzel@gmail.com";
github = "dpaetzel";
+ githubId = 974130;
name = "David Pätzel";
};
dpflug = {
email = "david@pflug.email";
github = "dpflug";
+ githubId = 108501;
name = "David Pflug";
};
drets = {
email = "dmitryrets@gmail.com";
github = "drets";
+ githubId = 6199462;
name = "Dmytro Rets";
};
drewkett = {
@@ -1437,17 +1782,29 @@
dsferruzza = {
email = "david.sferruzza@gmail.com";
github = "dsferruzza";
+ githubId = 1931963;
name = "David Sferruzza";
};
dtzWill = {
email = "w@wdtz.org";
github = "dtzWill";
+ githubId = 817330;
name = "Will Dietz";
keys = [{
longkeyid = "rsa4096/0xFD42C7D0D41494C8";
fingerprint = "389A 78CB CD88 5E0C 4701 DEB9 FD42 C7D0 D414 94C8";
}];
};
+ dump_stack = {
+ email = "root@dumpstack.io";
+ github = "jollheef";
+ githubId = 1749762;
+ name = "Mikhail Klementev";
+ keys = [{
+ longkeyid = "rsa4096/0x1525585D1B43C62A";
+ fingerprint = "5DD7 C6F6 0630 F08E DAE7 4711 1525 585D 1B43 C62A";
+ }];
+ };
dxf = {
email = "dingxiangfei2009@gmail.com";
github = "dingxiangfei2009";
@@ -1456,46 +1813,61 @@
dysinger = {
email = "tim@dysinger.net";
github = "dysinger";
+ githubId = 447;
name = "Tim Dysinger";
};
dywedir = {
email = "dywedir@gra.red";
github = "dywedir";
+ githubId = 399312;
name = "Vladyslav M.";
};
dzabraev = {
email = "dzabraew@gmail.com";
github = "dzabraev";
+ githubId = 15128988;
name = "Maksim Dzabraev";
};
e-user = {
email = "nixos@sodosopa.io";
github = "e-user";
+ githubId = 93086;
name = "Alexander Kahl";
};
eadwu = {
email = "edmund.wu@protonmail.com";
github = "eadwu";
+ githubId = 22758444;
name = "Edmund Wu";
};
+ ealasu = {
+ email = "emanuel.alasu@gmail.com";
+ github = "ealasu";
+ githubId = 1362096;
+ name = "Emanuel Alasu";
+ };
eamsden = {
email = "edward@blackriversoft.com";
github = "eamsden";
+ githubId = 54573;
name = "Edward Amsden";
};
earldouglas = {
email = "james@earldouglas.com";
github = "earldouglas";
+ githubId = 424946;
name = "James Earl Douglas";
};
earvstedt = {
email = "erik.arvstedt@gmail.com";
github = "erikarvstedt";
+ githubId = 36110478;
name = "Erik Arvstedt";
};
ebzzry = {
email = "ebzzry@ebzzry.io";
github = "ebzzry";
+ githubId = 7875;
name = "Rommel Martinez";
};
edanaher = {
@@ -1506,41 +1878,61 @@
edef = {
email = "edef@edef.eu";
github = "edef1c";
+ githubId = 50854;
name = "edef";
};
embr = {
email = "hi@liclac.eu";
github = "liclac";
+ githubId = 428026;
name = "embr";
};
+ emily = {
+ email = "nixpkgs@emily.moe";
+ github = "emilazy";
+ githubId = 18535642;
+ name = "Emily";
+ };
+ endocrimes = {
+ email = "dani@builds.terrible.systems";
+ github = "endocrimes";
+ githubId = 1330683;
+ name = "Danielle Lancashire";
+ };
ederoyd46 = {
email = "matt@ederoyd.co.uk";
github = "ederoyd46";
+ githubId = 119483;
name = "Matthew Brown";
};
eduarrrd = {
email = "e.bachmakov@gmail.com";
github = "eduarrrd";
+ githubId = 1181393;
name = "Eduard Bachmakov";
};
edude03 = {
email = "michael@melenion.com";
github = "edude03";
+ githubId = 494483;
name = "Michael Francis";
};
edwtjo = {
email = "ed@cflags.cc";
github = "edwtjo";
+ githubId = 54799;
name = "Edward Tjörnhammar";
};
eelco = {
email = "eelco.dolstra@logicblox.com";
github = "edolstra";
+ githubId = 1148549;
name = "Eelco Dolstra";
};
ehegnes = {
email = "eric.hegnes@gmail.com";
github = "ehegnes";
+ githubId = 884970;
name = "Eric Hegnes";
};
ehmry = {
@@ -1550,56 +1942,67 @@
eikek = {
email = "eike.kettner@posteo.de";
github = "eikek";
+ githubId = 701128;
name = "Eike Kettner";
};
ekleog = {
email = "leo@gaspard.io";
github = "ekleog";
+ githubId = 411447;
name = "Leo Gaspard";
};
elasticdog = {
email = "aaron@elasticdog.com";
github = "elasticdog";
+ githubId = 4742;
name = "Aaron Bull Schaefer";
};
eleanor = {
email = "dejan@proteansec.com";
github = "proteansec";
+ githubId = 1753498;
name = "Dejan Lukan";
};
eliasp = {
email = "mail@eliasprobst.eu";
github = "eliasp";
+ githubId = 48491;
name = "Elias Probst";
};
elijahcaine = {
email = "elijahcainemv@gmail.com";
github = "pop";
+ githubId = 1897147;
name = "Elijah Caine";
};
elitak = {
email = "elitak@gmail.com";
github = "elitak";
+ githubId = 769073;
name = "Eric Litak";
};
ellis = {
email = "nixos@ellisw.net";
github = "ellis";
+ githubId = 97852;
name = "Ellis Whitehead";
};
elohmeier = {
email = "elo-nixos@nerdworks.de";
github = "elohmeier";
+ githubId = 2536303;
name = "Enno Lohmeier";
};
elseym = {
email = "elseym@me.com";
github = "elseym";
+ githubId = 907478;
name = "Simon Waibl";
};
elvishjerricco = {
email = "elvishjerricco@gmail.com";
github = "ElvishJerricco";
+ githubId = 1365692;
name = "Will Fancher";
};
emmanuelrosa = {
@@ -1610,21 +2013,25 @@
endgame = {
email = "jack@jackkelly.name";
github = "endgame";
+ githubId = 231483;
name = "Jack Kelly";
};
enorris = {
name = "Eric Norris";
email = "erictnorris@gmail.com";
github = "ericnorris";
+ githubId = 1906605;
};
enzime = {
email = "enzime@users.noreply.github.com";
github = "enzime";
+ githubId = 10492681;
name = "Michael Hoang";
};
eperuffo = {
email = "info@emanueleperuffo.com";
github = "emanueleperuffo";
+ githubId = 5085029;
name = "Emanuele Peruffo";
};
epitrochoid = {
@@ -1634,18 +2041,26 @@
eqyiel = {
email = "ruben@maher.fyi";
github = "eqyiel";
+ githubId = 3422442;
name = "Ruben Maher";
};
eraserhd = {
email = "jason.m.felice@gmail.com";
github = "eraserhd";
+ githubId = 147284;
name = "Jason Felice";
};
ericbmerritt = {
email = "eric@afiniate.com";
github = "ericbmerritt";
+ githubId = 4828;
name = "Eric Merritt";
};
+ ericdallo = {
+ email = "ercdll1337@gmail.com";
+ github = "ericdallo";
+ name = "Eric Dallo";
+ };
ericsagnes = {
email = "eric.sagnes@gmail.com";
github = "ericsagnes";
@@ -1654,11 +2069,13 @@
ericson2314 = {
email = "John.Ericson@Obsidian.Systems";
github = "ericson2314";
+ githubId = 1055245;
name = "John Ericson";
};
erictapen = {
email = "justin.humm@posteo.de";
github = "erictapen";
+ githubId = 11532355;
name = "Justin Humm";
keys = [{
longkeyid = "rsa4096/0x438871E000AA178E";
@@ -1668,11 +2085,13 @@
erikryb = {
email = "erik.rybakken@math.ntnu.no";
github = "erikryb";
+ githubId = 3787281;
name = "Erik Rybakken";
};
erosennin = {
email = "ag@sologoc.com";
github = "erosennin";
+ githubId = 1583484;
name = "Andrey Golovizin";
};
ertes = {
@@ -1680,6 +2099,12 @@
github = "ertes";
name = "Ertugrul Söylemez";
};
+ esclear = {
+ email = "esclear@users.noreply.github.com";
+ github = "esclear";
+ githubId = 7432848;
+ name = "Daniel Albert";
+ };
Esteth = {
email = "adam.copp@gmail.com";
name = "Adam Copp";
@@ -1687,65 +2112,83 @@
ethercrow = {
email = "ethercrow@gmail.com";
github = "ethercrow";
+ githubId = 222467;
name = "Dmitry Ivanov";
};
etu = {
email = "elis@hirwing.se";
github = "etu";
+ githubId = 461970;
name = "Elis Hirwing";
keys = [{
longkeyid = "rsa4096/0xD57EFA625C9A925F";
fingerprint = "67FE 98F2 8C44 CF22 1828 E12F D57E FA62 5C9A 925F";
}];
};
+ evanjs = {
+ email = "evanjsx@gmail.com";
+ github = "evanjs";
+ githubId = 1847524;
+ name = "Evan Stoll";
+ };
evck = {
email = "eric@evenchick.com";
github = "ericevenchick";
+ githubId = 195032;
name = "Eric Evenchick";
};
+ evenbrenden = {
+ email = "evenbrenden@gmail.com";
+ github = "evenbrenden";
+ githubId = 2512008;
+ name = "Even Brenden";
+ };
exfalso = {
email = "0slemi0@gmail.com";
github = "exfalso";
+ githubId = 1042674;
name = "Andras Slemmer";
};
exi = {
email = "nixos@reckling.org";
github = "exi";
+ githubId = 449463;
name = "Reno Reckling";
};
exlevan = {
email = "exlevan@gmail.com";
github = "exlevan";
+ githubId = 873530;
name = "Alexey Levan";
};
expipiplus1 = {
email = "nix@monoid.al";
github = "expipiplus1";
+ githubId = 857308;
name = "Joe Hermaszewski";
};
eyjhb = {
email = "eyjhbb@gmail.com";
github = "eyJhb";
+ githubId = 25955146;
name = "eyJhb";
};
f--t = {
email = "git@f-t.me";
github = "f--t";
+ githubId = 2817965;
name = "f--t";
};
- f-breidenstein = {
- email = "mail@felixbreidenstein.de";
- github = "f-breidenstein";
- name = "Felix Breidenstein";
- };
fadenb = {
email = "tristan.helmich+nixos@gmail.com";
github = "fadenb";
+ githubId = 878822;
name = "Tristan Helmich";
};
falsifian = {
email = "james.cook@utoronto.ca";
github = "falsifian";
+ githubId = 225893;
name = "James Cook";
};
fare = {
@@ -1753,6 +2196,12 @@
github = "fare";
name = "Francois-Rene Rideau";
};
+ farlion = {
+ email = "florian.peter@gmx.at";
+ github = "workflow";
+ githubId = 1276854;
+ name = "Florian Peter";
+ };
fdns = {
email = "fdns02@gmail.com";
github = "fdns";
@@ -1761,66 +2210,79 @@
ffinkdevs = {
email = "fink@h0st.space";
github = "ffinkdevs";
+ githubId = 45924649;
name = "Fabian Fink";
};
fgaz = {
email = "fgaz@fgaz.me";
github = "fgaz";
+ githubId = 8182846;
name = "Francesco Gazzetta";
};
FireyFly = {
email = "nix@firefly.nu";
github = "FireyFly";
+ githubId = 415760;
name = "Jonas Höglund";
};
flexw = {
email = "felix.weilbach@t-online.de";
github = "FlexW";
+ githubId = 19961516;
name = "Felix Weilbach";
};
flokli = {
email = "flokli@flokli.de";
github = "flokli";
+ githubId = 183879;
name = "Florian Klink";
};
FlorianFranzen = {
email = "Florian.Franzen@gmail.com";
github = "FlorianFranzen";
+ githubId = 781077;
name = "Florian Franzen";
};
florianjacob = {
email = "projects+nixos@florianjacob.de";
github = "florianjacob";
+ githubId = 1109959;
name = "Florian Jacob";
};
flosse = {
email = "mail@markus-kohlhase.de";
github = "flosse";
+ githubId = 276043;
name = "Markus Kohlhase";
};
fluffynukeit = {
email = "dan@fluffynukeit.com";
github = "fluffynukeit";
+ githubId = 844574;
name = "Daniel Austin";
};
fmthoma = {
email = "f.m.thoma@googlemail.com";
github = "fmthoma";
+ githubId = 5918766;
name = "Franz Thoma";
};
forkk = {
email = "forkk@forkk.net";
github = "forkk";
+ githubId = 1300078;
name = "Andrew Okin";
};
fornever = {
email = "friedrich@fornever.me";
github = "fornever";
+ githubId = 92793;
name = "Friedrich von Never";
};
fpletz = {
email = "fpletz@fnordicwalking.de";
github = "fpletz";
+ githubId = 114159;
name = "Franz Pletz";
keys = [{
longkeyid = "rsa4096/0x846FDED7792617B4";
@@ -1830,6 +2292,7 @@
fps = {
email = "mista.tapas@gmx.net";
github = "fps";
+ githubId = 84968;
name = "Florian Paul Schmidt";
};
@@ -1842,11 +2305,13 @@
fredeb = {
email = "im@fredeb.dev";
github = "fredeeb";
+ githubId = 7551358;
name = "Frede Emil";
};
freepotion = {
- email = "free.potion@yandex.ru";
+ email = "42352817+freepotion@users.noreply.github.com";
github = "freepotion";
+ githubId = 42352817;
name = "Free Potion";
};
freezeboy = {
@@ -1862,31 +2327,37 @@
fridh = {
email = "fridh@fridh.nl";
github = "fridh";
+ githubId = 2129135;
name = "Frederik Rietdijk";
};
frlan = {
email = "frank@frank.uvena.de";
github = "frlan";
+ githubId = 1010248;
name = "Frank Lanitz";
};
fro_ozen = {
email = "fro_ozen@gmx.de";
github = "froozen";
+ githubId = 1943632;
name = "fro_ozen";
};
frontsideair = {
email = "photonia@gmail.com";
github = "frontsideair";
+ githubId = 868283;
name = "Fatih Altinok";
};
ftrvxmtrx = {
email = "ftrvxmtrx@gmail.com";
github = "ftrvxmtrx";
+ githubId = 248148;
name = "Siarhei Zirukin";
};
fuerbringer = {
email = "severin@fuerbringer.info";
github = "fuerbringer";
+ githubId = 10528737;
name = "Severin Fürbringer";
};
funfunctor = {
@@ -1896,16 +2367,19 @@
fusion809 = {
email = "brentonhorne77@gmail.com";
github = "fusion809";
+ githubId = 4717341;
name = "Brenton Horne";
};
fuuzetsu = {
email = "fuuzetsu@fuuzetsu.co.uk";
github = "fuuzetsu";
+ githubId = 893115;
name = "Mateusz Kowalczyk";
};
fuwa = {
email = "echowss@gmail.com";
github = "fuwa0529";
+ githubId = 40521440;
name = "Haruka Akiyama";
};
fuzzy-id = {
@@ -1915,16 +2389,19 @@
fxfactorial = {
email = "edgar.factorial@gmail.com";
github = "fxfactorial";
+ githubId = 3036816;
name = "Edgar Aroutiounian";
};
gabesoft = {
email = "gabesoft@gmail.com";
github = "gabesoft";
+ githubId = 606000;
name = "Gabriel Adomnicai";
};
gal_bolle = {
email = "florent.becker@ens-lyon.org";
github = "FlorentBecker";
+ githubId = 7047019;
name = "Florent Becker";
};
garbas = {
@@ -1935,6 +2412,7 @@
garrison = {
email = "jim@garrison.cc";
github = "garrison";
+ githubId = 91987;
name = "Jim Garrison";
};
gavin = {
@@ -1945,91 +2423,109 @@
gebner = {
email = "gebner@gebner.org";
github = "gebner";
+ githubId = 313929;
name = "Gabriel Ebner";
};
geistesk = {
email = "post@0x21.biz";
github = "geistesk";
+ githubId = 8402811;
name = "Alvar Penning";
};
genesis = {
email = "ronan@aimao.org";
github = "bignaux";
+ githubId = 149484;
name = "Ronan Bignaux";
};
georgewhewell = {
email = "georgerw@gmail.com";
github = "georgewhewell";
+ githubId = 1176131;
name = "George Whewell";
};
gerschtli = {
email = "tobias.happ@gmx.de";
github = "Gerschtli";
+ githubId = 10353047;
name = "Tobias Happ";
};
ggpeti = {
email = "ggpeti@gmail.com";
github = "ggpeti";
+ githubId = 3217744;
name = "Peter Ferenczy";
};
gilligan = {
email = "tobias.pflug@gmail.com";
github = "gilligan";
+ githubId = 27668;
name = "Tobias Pflug";
};
giogadi = {
email = "lgtorres42@gmail.com";
github = "giogadi";
+ githubId = 1713676;
name = "Luis G. Torres";
};
gleber = {
email = "gleber.p@gmail.com";
github = "gleber";
+ githubId = 33185;
name = "Gleb Peregud";
};
glenns = {
email = "glenn.searby@gmail.com";
github = "glenns";
+ githubId = 615606;
name = "Glenn Searby";
};
gloaming = {
email = "ch9871@gmail.com";
github = "gloaming";
+ githubId = 10156748;
name = "Craig Hall";
};
globin = {
email = "mail@glob.in";
github = "globin";
+ githubId = 1447245;
name = "Robin Gloster";
};
gnidorah = {
email = "gnidorah@yandex.com";
github = "gnidorah";
+ githubId = 12064730;
name = "Alex Ivanov";
};
goibhniu = {
email = "cillian.deroiste@gmail.com";
github = "cillianderoiste";
+ githubId = 643494;
name = "Cillian de Róiste";
};
Gonzih = {
email = "gonzih@gmail.com";
github = "Gonzih";
+ githubId = 266275;
name = "Max Gonzih";
};
goodrone = {
email = "goodrone@gmail.com";
github = "goodrone";
+ githubId = 1621335;
name = "Andrew Trachenko";
};
gpyh = {
email = "yacine.hmito@gmail.com";
github = "yacinehmito";
+ githubId = 6893840;
name = "Yacine Hmito";
};
grahamc = {
email = "graham@grahamc.com";
github = "grahamc";
+ githubId = 76716;
name = "Graham Christensen";
};
grburst = {
@@ -2040,6 +2536,7 @@
greydot = {
email = "lanablack@amok.cc";
github = "greydot";
+ githubId = 7385287;
name = "Lana Black";
};
gridaphobe = {
@@ -2050,210 +2547,265 @@
guibert = {
email = "david.guibert@gmail.com";
github = "dguibert";
+ githubId = 1178864;
name = "David Guibert";
};
groodt = {
email = "groodt@gmail.com";
github = "groodt";
+ githubId = 343415;
name = "Greg Roodt";
};
guibou = {
email = "guillaum.bouchard@gmail.com";
github = "guibou";
+ githubId = 9705357;
name = "Guillaume Bouchard";
};
guillaumekoenig = {
email = "guillaume.edward.koenig@gmail.com";
github = "guillaumekoenig";
+ githubId = 10654650;
name = "Guillaume Koenig";
};
guyonvarch = {
email = "joris@guyonvarch.me";
github = "guyonvarch";
+ githubId = 6768842;
name = "Joris Guyonvarch";
};
hakuch = {
email = "hakuch@gmail.com";
github = "hakuch";
+ githubId = 1498782;
name = "Jesse Haber-Kucharsky";
};
hamhut1066 = {
email = "github@hamhut1066.com";
- github = "hamhut1066";
+ github = "moredhel";
+ githubId = 1742172;
name = "Hamish Hutchings";
};
hansjoergschurr = {
email = "commits@schurr.at";
github = "hansjoergschurr";
+ githubId = 9850776;
name = "Hans-Jörg Schurr";
};
HaoZeke = {
email = "r95g10@gmail.com";
github = "haozeke";
+ githubId = 4336207;
name = "Rohit Goswami";
};
haslersn = {
email = "haslersn@fius.informatik.uni-stuttgart.de";
github = "haslersn";
+ githubId = 33969028;
name = "Sebastian Hasler";
};
havvy = {
email = "ryan.havvy@gmail.com";
github = "havvy";
+ githubId = 731722;
name = "Ryan Scheel";
};
hax404 = {
email = "hax404foogit@hax404.de";
github = "hax404";
+ githubId = 1379411;
name = "Georg Haas";
};
hbunke = {
email = "bunke.hendrik@gmail.com";
github = "hbunke";
+ githubId = 1768793;
name = "Hendrik Bunke";
};
hce = {
email = "hc@hcesperer.org";
github = "hce";
+ githubId = 147689;
name = "Hans-Christian Esperer";
};
hectorj = {
email = "hector.jusforgues+nixos@gmail.com";
github = "hectorj";
+ githubId = 2427959;
name = "Hector Jusforgues";
};
hedning = {
email = "torhedinbronner@gmail.com";
github = "hedning";
+ githubId = 71978;
name = "Tor Hedin Brønner";
};
heel = {
email = "parizhskiy@gmail.com";
github = "heel";
+ githubId = 287769;
name = "Sergii Paryzhskyi";
};
helkafen = {
email = "arnaudpourseb@gmail.com";
github = "Helkafen";
+ githubId = 2405974;
name = "Sébastian Méric de Bellefon";
};
henrytill = {
email = "henrytill@gmail.com";
github = "henrytill";
+ githubId = 6430643;
name = "Henry Till";
};
herberteuler = {
email = "herberteuler@gmail.com";
github = "herberteuler";
+ githubId = 1401179;
name = "Guanpeng Xu";
};
+ hexa = {
+ github = "mweinelt";
+ githubId = 131599;
+ name = "Martin Weinelt";
+ };
hhm = {
email = "heehooman+nixpkgs@gmail.com";
github = "hhm0";
+ githubId = 3656888;
name = "hhm";
};
hinton = {
email = "t@larkery.com";
name = "Tom Hinton";
};
+ hkjn = {
+ email = "me@hkjn.me";
+ name = "Henrik Jonsson";
+ github = "hkjn";
+ keys = [{
+ longkeyid = "rsa4096/0x03EFBF839A5FDC15";
+ fingerprint = "D618 7A03 A40A 3D56 62F5 4B46 03EF BF83 9A5F DC15";
+ }];
+ };
hlolli = {
email = "hlolli@gmail.com";
github = "hlolli";
+ githubId = 6074754;
name = "Hlodver Sigurdsson";
};
hugoreeves = {
email = "hugolreeves@gmail.com";
github = "hugoreeves";
+ githubId = 20039091;
name = "Hugo Reeves";
};
hodapp = {
email = "hodapp87@gmail.com";
github = "Hodapp87";
+ githubId = 896431;
name = "Chris Hodapp";
};
hrdinka = {
email = "c.nix@hrdinka.at";
github = "hrdinka";
+ githubId = 1436960;
name = "Christoph Hrdinka";
};
hschaeidt = {
email = "he.schaeidt@gmail.com";
github = "hschaeidt";
+ githubId = 1614615;
name = "Hendrik Schaeidt";
};
htr = {
email = "hugo@linux.com";
github = "htr";
+ githubId = 39689;
name = "Hugo Tavares Reis";
};
hyphon81 = {
email = "zero812n@gmail.com";
github = "hyphon81";
+ githubId = 12491746;
name = "Masato Yonekawa";
};
iand675 = {
email = "ian@iankduncan.com";
github = "iand675";
+ githubId = 69209;
name = "Ian Duncan";
};
ianwookim = {
email = "ianwookim@gmail.com";
github = "wavewave";
+ githubId = 1031119;
name = "Ian-Woo Kim";
};
iblech = {
email = "iblech@speicherleck.de";
github = "iblech";
+ githubId = 3661115;
name = "Ingo Blechschmidt";
};
idontgetoutmuch = {
email = "dominic@steinitz.org";
github = "idontgetoutmuch";
+ githubId = 1550265;
name = "Dominic Steinitz";
};
igsha = {
email = "igor.sharonov@gmail.com";
github = "igsha";
+ githubId = 5345170;
name = "Igor Sharonov";
};
iimog = {
email = "iimog@iimog.org";
github = "iimog";
+ githubId = 7403236;
name = "Markus J. Ankenbrand";
};
ikervagyok = {
email = "ikervagyok@gmail.com";
github = "ikervagyok";
+ githubId = 7481521;
name = "Balázs Lengyel";
};
ilikeavocadoes = {
email = "ilikeavocadoes@hush.com";
github = "ilikeavocadoes";
+ githubId = 36193715;
name = "Lassi Haasio";
};
illegalprime = {
email = "themichaeleden@gmail.com";
github = "illegalprime";
+ githubId = 4401220;
name = "Michael Eden";
};
ilya-kolpakov = {
email = "ilya.kolpakov@gmail.com";
github = "ilya-kolpakov";
+ githubId = 592849;
name = "Ilya Kolpakov";
};
imalison = {
email = "IvanMalison@gmail.com";
github = "IvanMalison";
+ githubId = 1246619;
name = "Ivan Malison";
};
imalsogreg = {
email = "imalsogreg@gmail.com";
github = "imalsogreg";
+ githubId = 993484;
name = "Greg Hale";
};
imuli = {
email = "i@imu.li";
github = "imuli";
+ githubId = 4085046;
name = "Imuli";
};
infinisil = {
@@ -2264,16 +2816,19 @@
ingenieroariel = {
email = "ariel@nunez.co";
github = "ingenieroariel";
+ githubId = 54999;
name = "Ariel Nunez";
};
ironpinguin = {
email = "michele@catalano.de";
github = "ironpinguin";
+ githubId = 137306;
name = "Michele Catalano";
};
ivan = {
email = "ivan@ludios.org";
github = "ivan";
+ githubId = 4458;
name = "Ivan Kozik";
};
ivan-tkatchev = {
@@ -2283,6 +2838,7 @@
ivanbrennan = {
email = "ivan.brennan@gmail.com";
github = "ivanbrennan";
+ githubId = 1672874;
name = "Ivan Brennan";
keys = [{
longkeyid = "rsa4096/0x79C3C47DC652EA54";
@@ -2292,6 +2848,7 @@
ivegotasthma = {
email = "ivegotasthma@protonmail.com";
github = "ivegotasthma";
+ githubId = 2437675;
name = "John Doe";
keys = [{
longkeyid = "rsa4096/09AC52AEA87817A4";
@@ -2301,21 +2858,35 @@
ixmatus = {
email = "parnell@digitalmentat.com";
github = "ixmatus";
+ githubId = 30714;
name = "Parnell Springmeyer";
};
ixxie = {
email = "matan@fluxcraft.net";
github = "ixxie";
+ githubId = 20320695;
name = "Matan Bendix Shenhav";
};
izorkin = {
email = "Izorkin@gmail.com";
github = "izorkin";
+ githubId = 26877687;
name = "Yurii Izorkin";
};
+ jacg = {
+ name = "Jacek Generowicz";
+ email = "jacg@my-post-office.net";
+ githubId = "2570854";
+ };
+ jasoncarr = {
+ email = "jcarr250@gmail.com";
+ github = "jasoncarr0";
+ name = "Jason Carr";
+ };
j-keck = {
email = "jhyphenkeck@gmail.com";
github = "j-keck";
+ githubId = 3081095;
name = "Jürgen Keck";
};
j03 = {
@@ -2326,51 +2897,67 @@
jagajaga = {
email = "ars.seroka@gmail.com";
github = "jagajaga";
+ githubId = 2179419;
name = "Arseniy Seroka";
};
jakelogemann = {
email = "jake.logemann@gmail.com";
github = "jakelogemann";
+ githubId = 820715;
name = "Jake Logemann";
};
+ jakestanger = {
+ email = "mail@jstanger.dev";
+ github = "JakeStanger";
+ githubId = 5057870;
+ name = "Jake Stanger";
+ };
jakewaksbaum = {
email = "jake.waksbaum@gmail.com";
github = "jbaum98";
+ githubId = 5283991;
name = "Jake Waksbaum";
};
jammerful = {
email = "jammerful@gmail.com";
github = "jammerful";
+ githubId = 20176306;
name = "jammerful";
};
jansol = {
email = "jan.solanti@paivola.fi";
github = "jansol";
+ githubId = 2588851;
name = "Jan Solanti";
};
javaguirre = {
email = "contacto@javaguirre.net";
github = "javaguirre";
+ githubId = 488556;
name = "Javier Aguirre";
};
jb55 = {
email = "jb55@jb55.com";
github = "jb55";
+ githubId = 45598;
name = "William Casarin";
};
jbedo = {
email = "cu@cua0.org";
github = "jbedo";
+ githubId = 372912;
name = "Justin Bedő";
};
jbgi = {
email = "jb@giraudeau.info";
github = "jbgi";
+ githubId = 221929;
name = "Jean-Baptiste Giraudeau";
};
jchw = {
email = "johnwchadwick@gmail.com";
github = "jchv";
+ githubId = 938744;
name = "John Chadwick";
};
jcumming = {
@@ -2380,31 +2967,46 @@
jD91mZM2 = {
email = "me@krake.one";
github = "jD91mZM2";
+ githubId = 12830969;
name = "jD91mZM2";
};
jdagilliland = {
email = "jdagilliland@gmail.com";
github = "jdagilliland";
+ githubId = 1383440;
name = "Jason Gilliland";
};
+ jdanek = {
+ email = "jdanek@redhat.com";
+ github = "jdanekrh";
+ keys = [{
+ longkeyid = "ed25519/0x69275CADF15D872E";
+ fingerprint = "D4A6 F051 AD58 2E7C BCED 5439 6927 5CAD F15D 872E";
+ }];
+ name = "Jiri Daněk";
+ };
jdehaas = {
email = "qqlq@nullptr.club";
github = "jeroendehaas";
+ githubId = 117874;
name = "Jeroen de Haas";
};
jefdaj = {
email = "jefdaj@gmail.com";
github = "jefdaj";
+ githubId = 1198065;
name = "Jeffrey David Johnson";
};
jensbin = {
email = "jensbin+git@pm.me";
github = "jensbin";
+ githubId = 1608697;
name = "Jens Binkert";
};
jerith666 = {
email = "github@matt.mchenryfamily.org";
github = "jerith666";
+ githubId = 854319;
name = "Matt McHenry";
};
jeschli = {
@@ -2415,6 +3017,7 @@
jethro = {
email = "jethrokuan95@gmail.com";
github = "jethrokuan";
+ githubId = 1667473;
name = "Jethro Kuan";
};
jfb = {
@@ -2425,71 +3028,85 @@
jflanglois = {
email = "yourstruly@julienlanglois.me";
github = "jflanglois";
+ githubId = 18501;
name = "Julien Langlois";
};
jfrankenau = {
email = "johannes@frankenau.net";
github = "jfrankenau";
+ githubId = 2736480;
name = "Johannes Frankenau";
};
jgeerds = {
email = "jascha@geerds.org";
github = "jgeerds";
+ githubId = 1473909;
name = "Jascha Geerds";
};
jgertm = {
email = "jger.tm@gmail.com";
github = "jgertm";
+ githubId = 6616642;
name = "Tim Jaeger";
};
jgillich = {
email = "jakob@gillich.me";
github = "jgillich";
+ githubId = 347965;
name = "Jakob Gillich";
};
jglukasik = {
email = "joseph@jgl.me";
github = "jglukasik";
+ githubId = 6445082;
name = "Joseph Lukasik";
};
jhhuh = {
email = "jhhuh.note@gmail.com";
github = "jhhuh";
+ githubId = 5843245;
name = "Ji-Haeng Huh";
};
jhillyerd = {
email = "james+nixos@hillyerd.com";
github = "jhillyerd";
+ githubId = 2502736;
name = "James Hillyerd";
};
jirkamarsik = {
email = "jiri.marsik89@gmail.com";
github = "jirkamarsik";
+ githubId = 184898;
name = "Jirka Marsik";
};
jlesquembre = {
email = "jl@lafuente.me";
github = "jlesquembre";
+ githubId = 1058504;
name = "José Luis Lafuente";
};
jluttine = {
email = "jaakko.luttinen@iki.fi";
github = "jluttine";
+ githubId = 2195834;
name = "Jaakko Luttinen";
};
jmagnusj = {
email = "jmagnusj@gmail.com";
github = "magnusjonsson";
+ githubId = 8900;
name = "Johan Magnus Jonsson";
};
jmettes = {
email = "jonathan@jmettes.com";
github = "jmettes";
+ githubId = 587870;
name = "Jonathan Mettes";
};
joachifm = {
email = "joachifm@fastmail.fm";
github = "joachifm";
+ githubId = 41977;
name = "Joachim Fasting";
};
joamaki = {
@@ -2500,11 +3117,13 @@
joelburget = {
email = "joelburget@gmail.com";
github = "joelburget";
+ githubId = 310981;
name = "Joel Burget";
};
joelmo = {
email = "joel.moberg@gmail.com";
github = "joelmo";
+ githubId = 336631;
name = "Joel Moberg";
};
joelteon = {
@@ -2516,39 +3135,61 @@
name = "Sven Slootweg";
github = "joepie91";
};
+ joesalisbury = {
+ email = "salisbury.joseph@gmail.com";
+ github = "JosephSalisbury";
+ name = "Joe Salisbury";
+ };
johanot = {
email = "write@ownrisk.dk";
github = "johanot";
+ githubId = 998763;
name = "Johan Thomsen";
};
johbo = {
email = "johannes@bornhold.name";
github = "johbo";
+ githubId = 117805;
name = "Johannes Bornhold";
};
johnazoidberg = {
email = "git@danielschaefer.me";
github = "johnazoidberg";
+ githubId = 5307138;
name = "Daniel Schäfer";
};
johnchildren = {
email = "john.a.children@gmail.com";
github = "johnchildren";
+ githubId = 32305209;
name = "John Children";
};
johnmh = {
email = "johnmh@openblox.org";
github = "johnmh";
+ githubId = 2576152;
name = "John M. Harris, Jr.";
};
johnramsden = {
email = "johnramsden@riseup.net";
github = "johnramsden";
+ githubId = 8735102;
name = "John Ramsden";
};
+ jojosch = {
+ name = "Johannes Schleifenbaum";
+ email = "johannes@js-webcoding.de";
+ github = "jojosch";
+ githubId = 327488;
+ keys = [{
+ longkeyid = "ed25519/059093B1A278BCD0";
+ fingerprint = "7249 70E6 A661 D84E 8B47 678A 0590 93B1 A278 BCD0";
+ }];
+ };
joko = {
email = "ioannis.koutras@gmail.com";
github = "jokogr";
+ githubId = 1252547;
keys = [{
# compare with https://keybase.io/joko
longkeyid = "rsa2048/0x85EAE7D9DF56C5CA";
@@ -2559,71 +3200,90 @@
jonafato = {
email = "jon@jonafato.com";
github = "jonafato";
+ githubId = 392720;
name = "Jon Banafato";
};
+ jonathanmarler = {
+ email = "johnnymarler@gmail.com";
+ github = "marler8997";
+ name = "Jonathan Marler";
+ };
jonathanreeve = {
email = "jon.reeve@gmail.com";
github = "JonathanReeve";
+ githubId = 1843676;
name = "Jonathan Reeve";
};
joncojonathan = {
email = "joncojonathan@gmail.com";
github = "joncojonathan";
+ githubId = 11414454;
name = "Jonathan Haddock";
};
jonringer = {
email = "jonringer117@gmail.com";
github = "jonringer";
+ githubId = 7673602;
name = "Jonathan Ringer";
};
jorise = {
email = "info@jorisengbers.nl";
github = "JorisE";
+ githubId = 1767283;
name = "Joris Engbers";
};
jorsn = {
name = "Johannes Rosenberger";
email = "johannes@jorsn.eu";
github = "jorsn";
+ githubId = 4646725;
};
jpdoyle = {
email = "joethedoyle@gmail.com";
github = "jpdoyle";
+ githubId = 1918771;
name = "Joe Doyle";
};
jpierre03 = {
email = "nix@prunetwork.fr";
github = "jpierre03";
+ githubId = 954536;
name = "Jean-Pierre PRUNARET";
};
jpotier = {
email = "jpo.contributes.to.nixos@marvid.fr";
github = "jpotier";
+ githubId = 752510;
name = "Martin Potier";
};
jqueiroz = {
email = "nixos@johnjq.com";
github = "jqueiroz";
+ githubId = 4968215;
name = "Jonathan Queiroz";
};
jraygauthier = {
email = "jraygauthier@gmail.com";
github = "jraygauthier";
+ githubId = 4611077;
name = "Raymond Gauthier";
};
jtobin = {
email = "jared@jtobin.io";
github = "jtobin";
+ githubId = 1414434;
name = "Jared Tobin";
};
jtojnar = {
email = "jtojnar@gmail.com";
github = "jtojnar";
+ githubId = 705123;
name = "Jan Tojnar";
};
juaningan = {
email = "juaningan@gmail.com";
github = "juaningan";
+ githubId = 810075;
name = "Juan Rodal";
};
juliendehos = {
@@ -2634,13 +3294,21 @@
justinwoo = {
email = "moomoowoo@gmail.com";
github = "justinwoo";
+ githubId = 2396926;
name = "Justin Woo";
};
jwiegley = {
email = "johnw@newartisans.com";
github = "jwiegley";
+ githubId = 8460;
name = "John Wiegley";
};
+ jwijenbergh = {
+ email = "jeroenwijenbergh@protonmail.com";
+ github = "jwijenbergh";
+ githubId = 46386452;
+ name = "Jeroen Wijenbergh";
+ };
jwilberding = {
email = "jwilberding@afiniate.com";
name = "Jordan Wilberding";
@@ -2653,21 +3321,25 @@
jzellner = {
email = "jeffz@eml.cc";
github = "sofuture";
+ githubId = 66669;
name = "Jeff Zellner";
};
kaiha = {
email = "kai.harries@gmail.com";
github = "kaiha";
+ githubId = 6544084;
name = "Kai Harries";
};
kalbasit = {
email = "wael.nasreddine@gmail.com";
github = "kalbasit";
+ githubId = 87115;
name = "Wael Nasreddine";
};
kamilchm = {
email = "kamil.chm@gmail.com";
github = "kamilchm";
+ githubId = 1621930;
name = "Kamil Chmielewski";
};
kampfschlaefer = {
@@ -2679,69 +3351,104 @@
email = "info+nix@chmist.com";
name = "karolchmist";
};
+ kayhide = {
+ email = "kayhide@gmail.com";
+ github = "kayhide";
+ githubId = 1730718;
+ name = "Hideaki Kawai";
+ };
kazcw = {
email = "kaz@lambdaverse.org";
github = "kazcw";
+ githubId = 1047859;
name = "Kaz Wesley";
};
+ kcalvinalvin = {
+ email = "calvin@kcalvinalvin.info";
+ github = "kcalvinalvin";
+ githubId = 37185887;
+ name = "Calvin Kim";
+ };
kentjames = {
email = "jameschristopherkent@gmail.com";
github = "kentjames";
+ githubId = 2029444;
name = "James Kent";
};
kevincox = {
email = "kevincox@kevincox.ca";
github = "kevincox";
+ githubId = 494012;
name = "Kevin Cox";
};
khumba = {
email = "bog@khumba.net";
github = "khumba";
+ githubId = 788813;
name = "Bryan Gardiner";
};
KibaFox = {
email = "kiba.fox@foxypossibilities.com";
github = "KibaFox";
+ githubId = 16481032;
name = "Kiba Fox";
};
kierdavis = {
email = "kierdavis@gmail.com";
github = "kierdavis";
+ githubId = 845652;
name = "Kier Davis";
};
killercup = {
email = "killercup@gmail.com";
github = "killercup";
+ githubId = 20063;
name = "Pascal Hertleif";
};
kiloreux = {
email = "kiloreux@gmail.com";
github = "kiloreux";
+ githubId = 6282557;
name = "Kiloreux Emperex";
};
+ kim0 = {
+ email = "email.ahmedkamal@googlemail.com";
+ github = "kim0";
+ name = "Ahmed Kamal";
+ };
kimburgess = {
email = "kim@acaprojects.com";
github = "kimburgess";
+ githubId = 843652;
name = "Kim Burgess";
};
kini = {
email = "keshav.kini@gmail.com";
github = "kini";
+ githubId = 691290;
name = "Keshav Kini";
};
kirelagin = {
email = "kirelagin@gmail.com";
github = "kirelagin";
+ githubId = 451835;
name = "Kirill Elagin";
};
+ kirikaza = {
+ email = "k@kirikaza.ru";
+ github = "kirikaza";
+ name = "Kirill Kazakov";
+ };
kisonecat = {
email = "kisonecat@gmail.com";
github = "kisonecat";
+ githubId = 148352;
name = "Jim Fowler";
};
kiwi = {
email = "envy1988@gmail.com";
github = "Kiwi";
+ githubId = 35715;
name = "Robert Djubek";
keys = [{
longkeyid = "rsa4096/0x156C88A5B0A04B2A";
@@ -2751,6 +3458,7 @@
kjuvi = {
email = "quentin.vaucher@pm.me";
github = "kjuvi";
+ githubId = 17534323;
name = "Quentin Vaucher";
};
kkallio = {
@@ -2761,37 +3469,48 @@
email = "klntsky@gmail.com";
name = "Vladimir Kalnitsky";
github = "klntsky";
+ githubId = 18447310;
};
kmeakin = {
email = "karlwfmeakin@gmail.com";
name = "Karl Meakin";
github = "Kmeakin";
+ githubId = 19665139;
};
kmein = {
email = "kieran.meinhardt@gmail.com";
name = "Kierán Meinhardt";
github = "kmein";
+ githubId = 10352507;
+ };
+ knairda = {
+ email = "adrian@kummerlaender.eu";
+ name = "Adrian Kummerlaender";
+ github = "KnairdA";
};
-
knedlsepp = {
email = "josef.kemetmueller@gmail.com";
github = "knedlsepp";
+ githubId = 3287933;
name = "Josef Kemetmüller";
};
knl = {
email = "nikola@knezevic.co";
github = "knl";
+ githubId = 361496;
name = "Nikola Knežević";
};
kolaente = {
email = "k@knt.li";
github = "kolaente";
+ githubId = 13721712;
name = "Konrad Langenberg";
};
konimex = {
email = "herdiansyah@netc.eu";
github = "konimex";
+ githubId = 15692230;
name = "Muhammad Herdiansyah";
};
koral = {
@@ -2802,61 +3521,83 @@
kovirobi = {
email = "kovirobi@gmail.com";
github = "kovirobi";
+ githubId = 1903418;
name = "Kovacsics Robert";
};
kquick = {
email = "quick@sparq.org";
github = "kquick";
+ githubId = 787421;
name = "Kevin Quick";
};
kragniz = {
email = "louis@kragniz.eu";
github = "kragniz";
+ githubId = 735008;
name = "Louis Taylor";
};
krav = {
email = "kristoffer@microdisko.no";
github = "krav";
+ githubId = 4032;
name = "Kristoffer Thømt Ravneberg";
};
kroell = {
email = "nixosmainter@makroell.de";
github = "rokk4";
+ githubId = 17659803;
name = "Matthias Axel Kröll";
};
kristoff3r = {
email = "k.soeholm@gmail.com";
github = "kristoff3r";
+ githubId = 160317;
name = "Kristoffer Søholm";
};
ktf = {
email = "giulio.eulisse@cern.ch";
github = "ktf";
+ githubId = 10544;
name = "Giuluo Eulisse";
};
+ ktor = {
+ email = "kruszewsky@gmail.com";
+ github = "ktor";
+ name = "Pawel Kruszewski";
+ };
ktosiek = {
email = "tomasz.kontusz@gmail.com";
github = "ktosiek";
+ githubId = 278013;
name = "Tomasz Kontusz";
};
kuznero = {
email = "roman@kuznero.com";
github = "kuznero";
+ githubId = 449813;
name = "Roman Kuznetsov";
};
kylewlacy = {
email = "kylelacy+nix@pm.me";
github = "kylewlacy";
+ githubId = 1362179;
name = "Kyle Lacy";
};
+ laikq = {
+ email = "gwen@quasebarth.de";
+ github = "laikq";
+ name = "Gwendolyn Quasebarth";
+ };
lasandell = {
email = "lasandell@gmail.com";
github = "lasandell";
+ githubId = 2034420;
name = "Luke Sandell";
};
lambda-11235 = {
email = "taranlynn0@gmail.com";
github = "lambda-11235";
+ githubId = 16354815;
name = "Taran Lynn";
};
lassulus = {
@@ -2864,29 +3605,40 @@
github = "Lassulus";
name = "Lassulus";
};
+ lattfein = {
+ email = "lattfein@gmail.com";
+ github = "lattfein";
+ githubId = 53550838;
+ name = "Koki Yasuno";
+ };
layus = {
email = "layus.on@gmail.com";
github = "layus";
+ githubId = 632767;
name = "Guillaume Maudoux";
};
lblasc = {
email = "lblasc@znode.net";
github = "lblasc";
+ githubId = 32152;
name = "Luka Blaskovic";
};
ldesgoui = {
email = "ldesgoui@gmail.com";
github = "ldesgoui";
+ githubId = 2472678;
name = "Lucas Desgouilles";
};
league = {
email = "league@contrapunctus.net";
github = "league";
+ githubId = 50286;
name = "Christopher League";
};
leahneukirchen = {
email = "leah@vuxu.org";
github = "leahneukirchen";
+ githubId = 139;
name = "Leah Neukirchen";
};
lebastr = {
@@ -2897,26 +3649,31 @@
ledif = {
email = "refuse@gmail.com";
github = "ledif";
+ githubId = 307744;
name = "Adam Fidel";
};
leemachin = {
email = "me@mrl.ee";
github = "leemachin";
+ githubId = 736291;
name = "Lee Machin";
};
leenaars = {
email = "ml.software@leenaa.rs";
github = "leenaars";
+ githubId = 4158274;
name = "Michiel Leenaars";
};
lejonet = {
email = "daniel@kuehn.se";
github = "lejonet";
+ githubId = 567634;
name = "Daniel Kuehn";
};
leo60228 = {
email = "iakornfeld@gmail.com";
github = "leo60228";
+ githubId = 8355305;
name = "leo60228";
};
leonardoce = {
@@ -2927,66 +3684,90 @@
lethalman = {
email = "lucabru@src.gnome.org";
github = "lethalman";
+ githubId = 480920;
name = "Luca Bruno";
};
lewo = {
email = "lewo@abesis.fr";
github = "nlewo";
+ githubId = 3425311;
name = "Antoine Eiche";
};
lheckemann = {
email = "git@sphalerite.org";
github = "lheckemann";
+ githubId = 341954;
name = "Linus Heckemann";
};
lhvwb = {
email = "nathaniel.baxter@gmail.com";
github = "nathanielbaxter";
+ githubId = 307589;
name = "Nathaniel Baxter";
};
+ liff = {
+ email = "liff@iki.fi";
+ github = "liff";
+ githubId = 124475;
+ name = "Olli Helenius";
+ };
+ lightbulbjim = {
+ email = "chris@killred.net";
+ github = "lightbulbjim";
+ name = "Chris Rendle-Short";
+ };
lightdiscord = {
email = "root@arnaud.sh";
github = "lightdiscord";
+ githubId = 24509182;
name = "Arnaud Pascal";
};
lihop = {
email = "nixos@leroy.geek.nz";
github = "lihop";
+ githubId = 3696783;
name = "Leroy Hopson";
};
lilyball = {
email = "lily@sb.org";
github = "lilyball";
+ githubId = 714;
name = "Lily Ballard";
};
limeytexan = {
email = "limeytexan@gmail.com";
github = "limeytexan";
+ githubId = 36448130;
name = "Michael Brantley";
};
linarcx = {
email = "linarcx@gmail.com";
github = "linarcx";
+ githubId = 10884422;
name = "Kaveh Ahangar";
};
linc01n = {
email = "git@lincoln.hk";
github = "linc01n";
+ githubId = 667272;
name = "Lincoln Lee";
};
linquize = {
email = "linquize@yahoo.com.hk";
github = "linquize";
+ githubId = 791115;
name = "Linquize";
};
linus = {
email = "linusarver@gmail.com";
github = "listx";
+ githubId = 725613;
name = "Linus Arver";
};
livnev = {
email = "lev@liv.nev.org.uk";
github = "livnev";
+ githubId = 3964494;
name = "Lev Livnev";
keys = [{
longkeyid = "rsa2048/0x68FF81E6A7850F49";
@@ -2996,41 +3777,49 @@
luis = {
email = "luis.nixos@gmail.com";
github = "Luis-Hebendanz";
+ githubId = 22085373;
name = "Luis Hebendanz";
};
lionello = {
email = "lio@lunesu.com";
github = "lionello";
+ githubId = 591860;
name = "Lionello Lunesu";
};
lluchs = {
email = "lukas.werling@gmail.com";
github = "lluchs";
+ githubId = 516527;
name = "Lukas Werling";
};
lnl7 = {
email = "daiderd@gmail.com";
github = "lnl7";
+ githubId = 689294;
name = "Daiderd Jordan";
};
lo1tuma = {
email = "schreck.mathias@gmail.com";
github = "lo1tuma";
+ githubId = 169170;
name = "Mathias Schreck";
};
loewenheim = {
email = "loewenheim@mailbox.org";
github = "loewenheim";
+ githubId = 7622248;
name = "Sebastian Zivota";
};
lopsided98 = {
email = "benwolsieffer@gmail.com";
github = "lopsided98";
+ githubId = 5624721;
name = "Ben Wolsieffer";
};
loskutov = {
email = "ignat.loskutov@gmail.com";
github = "loskutov";
+ githubId = 1202012;
name = "Ignat Loskutov";
};
lovek323 = {
@@ -3041,16 +3830,19 @@
lowfatcomputing = {
email = "andreas.wagner@lowfatcomputing.org";
github = "lowfatcomputing";
+ githubId = 10626;
name = "Andreas Wagner";
};
lschuermann = {
email = "leon.git@is.currently.online";
github = "lschuermann";
+ githubId = 5341193;
name = "Leon Schuermann";
};
lsix = {
email = "lsix@lancelotsix.com";
github = "lsix";
+ githubId = 724339;
name = "Lancelot SIX";
};
ltavard = {
@@ -3061,51 +3853,61 @@
lucas8 = {
email = "luc.linux@mailoo.org";
github = "lucas8";
+ githubId = 2025623;
name = "Luc Chabassier";
};
lucus16 = {
email = "lars.jellema@gmail.com";
github = "Lucus16";
+ githubId = 2487922;
name = "Lars Jellema";
};
ludo = {
email = "ludo@gnu.org";
github = "civodul";
+ githubId = 1168435;
name = "Ludovic Courtès";
};
lufia = {
email = "lufia@lufia.org";
github = "lufia";
+ githubId = 1784379;
name = "Kyohei Kadota";
};
luispedro = {
email = "luis@luispedro.org";
github = "luispedro";
+ githubId = 79334;
name = "Luis Pedro Coelho";
};
lukeadams = {
email = "luke.adams@belljar.io";
github = "lukeadams";
+ githubId = 3508077;
name = "Luke Adams";
};
lukebfox = {
email = "lbentley-fox1@sheffield.ac.uk";
github = "lukebfox";
+ githubId = 34683288;
name = "Luke Bentley-Fox";
};
lukego = {
email = "luke@snabb.co";
github = "lukego";
+ githubId = 13791;
name = "Luke Gorrie";
};
luz = {
email = "luz666@daum.net";
github = "Luz";
+ githubId = 208297;
name = "Luz";
};
lw = {
email = "lw@fmap.me";
github = "lolwat97";
+ githubId = 2057309;
name = "Sergey Sofeychuk";
};
lyt = {
@@ -3119,71 +3921,85 @@
ma27 = {
email = "maximilian@mbosch.me";
github = "ma27";
+ githubId = 6025220;
name = "Maximilian Bosch";
};
ma9e = {
email = "sean@lfo.team";
- github = "ma9e";
+ github = "furrycatherder";
+ githubId = 36235154;
name = "Sean Haugh";
};
madjar = {
email = "georges.dubus@compiletoi.net";
github = "madjar";
+ githubId = 109141;
name = "Georges Dubus";
};
mafo = {
email = "Marc.Fontaine@gmx.de";
github = "MarcFontaine";
+ githubId = 1433367;
name = "Marc Fontaine";
};
magenbluten = {
email = "magenbluten@codemonkey.cc";
github = "magenbluten";
+ githubId = 1140462;
name = "magenbluten";
};
magnetophon = {
email = "bart@magnetophon.nl";
github = "magnetophon";
+ githubId = 7645711;
name = "Bart Brouns";
};
mahe = {
email = "matthias.mh.herrmann@gmail.com";
github = "2chilled";
+ githubId = 1238350;
name = "Matthias Herrmann";
};
makefu = {
email = "makefu@syntax-fehler.de";
github = "makefu";
+ githubId = 115218;
name = "Felix Richter";
};
malyn = {
email = "malyn@strangeGizmo.com";
github = "malyn";
+ githubId = 346094;
name = "Michael Alyn Miller";
};
manveru = {
email = "m.fellinger@gmail.com";
github = "manveru";
+ githubId = 3507;
name = "Michael Fellinger";
};
marcweber = {
email = "marco-oweber@gmx.de";
github = "marcweber";
+ githubId = 34086;
name = "Marc Weber";
};
marenz = {
email = "marenz@arkom.men";
github = "marenz2569";
+ githubId = 12773269;
name = "Markus Schmidl";
};
markus1189 = {
email = "markus1189@gmail.com";
github = "markus1189";
+ githubId = 591567;
name = "Markus Hauck";
};
markuskowa = {
email = "markus.kowalewski@gmail.com";
github = "markuskowa";
+ githubId = 26470037;
name = "Markus Kowalewski";
};
markWot = {
@@ -3194,25 +4010,30 @@
email = "mariusdavid@laposte.net";
name = "Marius David";
github = "marius851000";
+ githubId = 22586596;
};
marsam = {
email = "marsam@users.noreply.github.com";
github = "marsam";
+ githubId = 65531;
name = "Mario Rodas";
};
martijnvermaat = {
email = "martijn@vermaat.name";
github = "martijnvermaat";
+ githubId = 623509;
name = "Martijn Vermaat";
};
martingms = {
email = "martin@mg.am";
github = "martingms";
+ githubId = 458783;
name = "Martin Gammelsæter";
};
marzipankaiser = {
email = "nixos@gaisseml.de";
github = "marzipankaiser";
+ githubId = 2551444;
name = "Marcial Gaißert";
keys = [{
longkeyid = "rsa2048/0xB629036BE399EEE9";
@@ -3222,16 +4043,19 @@
matejc = {
email = "cotman.matej@gmail.com";
github = "matejc";
+ githubId = 854770;
name = "Matej Cotman";
};
mathnerd314 = {
email = "mathnerd314.gph+hs@gmail.com";
github = "mathnerd314";
+ githubId = 322214;
name = "Mathnerd314";
};
matklad = {
email = "aleksey.kladov@gmail.com";
github = "matklad";
+ githubId = 1711539;
name = "matklad";
};
matthewbauer = {
@@ -3242,6 +4066,7 @@
matthiasbeyer = {
email = "mail@beyermatthias.de";
github = "matthiasbeyer";
+ githubId = 427866;
name = "Matthias Beyer";
};
matti-kariluoma = {
@@ -3252,76 +4077,91 @@
maurer = {
email = "matthew.r.maurer+nix@gmail.com";
github = "maurer";
+ githubId = 136037;
name = "Matthew Maurer";
};
mbakke = {
email = "mbakke@fastmail.com";
github = "mbakke";
+ githubId = 1269099;
name = "Marius Bakke";
};
mbbx6spp = {
email = "me@susanpotter.net";
github = "mbbx6spp";
+ githubId = 564;
name = "Susan Potter";
};
mbe = {
email = "brandonedens@gmail.com";
github = "brandonedens";
+ githubId = 396449;
name = "Brandon Edens";
};
mbode = {
email = "maxbode@gmail.com";
github = "mbode";
+ githubId = 9051309;
name = "Maximilian Bode";
};
mboes = {
email = "mboes@tweag.net";
github = "mboes";
+ githubId = 51356;
name = "Mathieu Boespflug";
};
mbrgm = {
email = "marius@yeai.de";
github = "mbrgm";
+ githubId = 2971615;
name = "Marius Bergmann";
};
mcmtroffaes = {
email = "matthias.troffaes@gmail.com";
github = "mcmtroffaes";
+ githubId = 158568;
name = "Matthias C. M. Troffaes";
};
mdaiter = {
email = "mdaiter8121@gmail.com";
github = "mdaiter";
+ githubId = 1377571;
name = "Matthew S. Daiter";
};
mdevlamynck = {
email = "matthias.devlamynck@mailoo.org";
github = "mdevlamynck";
+ githubId = 4378377;
name = "Matthias Devlamynck";
};
meditans = {
email = "meditans@gmail.com";
github = "meditans";
+ githubId = 4641445;
name = "Carlo Nucera";
};
megheaiulian = {
email = "iulian.meghea@gmail.com";
github = "megheaiulian";
+ githubId = 1788114;
name = "Meghea Iulian";
};
mehandes = {
email = "niewskici@gmail.com";
github = "mehandes";
+ githubId = 32581276;
name = "Matt Deming";
};
meisternu = {
email = "meister@krutt.org";
github = "meisternu";
+ githubId = 8263431;
name = "Matt Miemiec";
};
melchips = {
email = "truphemus.francois@gmail.com";
github = "melchips";
+ githubId = 365721;
name = "Francois Truphemus";
};
melsigl = {
@@ -3332,6 +4172,7 @@
melkor333 = {
email = "samuel@ton-kunst.ch";
github = "melkor333";
+ githubId = 6412377;
name = "Samuel Ruprecht";
};
metabar = {
@@ -3342,40 +4183,48 @@
email = "kira.bruneau@gmail.com";
name = "Kira Bruneau";
github = "metadark";
+ githubId = 382041;
};
mfossen = {
email = "msfossen@gmail.com";
github = "mfossen";
+ githubId = 3300322;
name = "Mitchell Fossen";
};
mgdelacroix = {
email = "mgdelacroix@gmail.com";
github = "mgdelacroix";
+ githubId = 223323;
name = "Miguel de la Cruz";
};
mgregoire = {
email = "gregoire@martinache.net";
github = "M-Gregoire";
+ githubId = 9469313;
name = "Gregoire Martinache";
};
mgttlinger = {
email = "megoettlinger@gmail.com";
github = "mgttlinger";
+ githubId = 5120487;
name = "Merlin Göttlinger";
};
mguentner = {
email = "code@klandest.in";
github = "mguentner";
+ githubId = 668926;
name = "Maximilian Güntner";
};
mhaselsteiner = {
email = "magdalena.haselsteiner@gmx.at";
github = "mhaselsteiner";
+ githubId = 20536514;
name = "Magdalena Haselsteiner";
};
mic92 = {
email = "joerg@thalheim.io";
github = "mic92";
+ githubId = 96200;
name = "Jörg Thalheim";
keys = [{
# compare with https://keybase.io/Mic92
@@ -3391,6 +4240,7 @@
michalrus = {
email = "m@michalrus.com";
github = "michalrus";
+ githubId = 4366292;
name = "Michal Rus";
};
michelk = {
@@ -3401,36 +4251,42 @@
michojel = {
email = "mic.liamg@gmail.com";
github = "michojel";
+ githubId = 21156022;
name = "Michal Minář";
};
mickours = {
email = "mickours@gmail.com<";
github = "mickours";
+ githubId = 837312;
name = "Michael Mercier";
};
midchildan = {
email = "midchildan+nix@gmail.com";
github = "midchildan";
+ githubId = 7343721;
name = "midchildan";
};
mikefaille = {
email = "michael@faille.io";
github = "mikefaille";
+ githubId = 978196;
name = "Michaël Faille";
};
mikoim = {
email = "ek@esh.ink";
github = "mikoim";
+ githubId = 3958340;
name = "Eshin Kunishima";
};
miltador = {
email = "miltador@yandex.ua";
name = "Vasiliy Solovey";
};
- mimadrid = {
- email = "mimadrid@ucm.es";
- github = "mimadrid";
- name = "Miguel Madrid";
+ mimame = {
+ email = "miguel.madrid.mencia@gmail.com";
+ github = "mimame";
+ githubId = 3269878;
+ name = "Miguel Madrid Mencía";
};
minijackson = {
email = "minijackson@riseup.net";
@@ -3445,38 +4301,60 @@
mirrexagon = {
email = "mirrexagon@mirrexagon.com";
github = "mirrexagon";
+ githubId = 1776903;
name = "Andrew Abbott";
};
mjanczyk = {
email = "m@dragonvr.pl";
github = "mjanczyk";
+ githubId = 1001112;
name = "Marcin Janczyk";
};
mjp = {
email = "mike@mythik.co.uk";
github = "MikePlayle";
+ githubId = 16974598;
name = "Mike Playle";
};
mkazulak = {
email = "kazulakm@gmail.com";
github = "mulderr";
+ githubId = 5698461;
name = "Maciej Kazulak";
};
+ mkf = {
+ email = "m@mikf.pl";
+ github = "mkf";
+ name = "Michał Krzysztof Feiler";
+ keys = [{
+ longkeyid = "rsa4096/0xE35C2D7C2C6AC724";
+ fingerprint = "1E36 9940 CC7E 01C4 CFE8 F20A E35C 2D7C 2C6A C724";
+ }];
+ };
mkg = {
email = "mkg@vt.edu";
github = "mkgvt";
+ githubId = 22477669;
name = "Mark K Gardner";
};
mlieberman85 = {
email = "mlieberman85@gmail.com";
github = "mlieberman85";
+ githubId = 622577;
name = "Michael Lieberman";
};
mmahut = {
email = "marek.mahut@gmail.com";
github = "mmahut";
+ githubId = 104795;
name = "Marek Mahut";
};
+ mmai = {
+ email = "henri.bourcereau@gmail.com";
+ github = "mmai";
+ githubId = 117842;
+ name = "Henri Bourcereau";
+ };
mmlb = {
email = "me.mmlb@mmlb.me";
github = "mmlb";
@@ -3485,21 +4363,25 @@
mnacamura = {
email = "m.nacamura@gmail.com";
github = "mnacamura";
+ githubId = 45770;
name = "Mitsuhiro Nakamura";
};
moaxcp = {
email = "moaxcp@gmail.com";
github = "moaxcp";
+ githubId = 7831184;
name = "John Mercier";
};
modulistic = {
email = "modulistic@gmail.com";
github = "modulistic";
+ githubId = 1902456;
name = "Pablo Costa";
};
mog = {
email = "mog-lists@rldn.net";
github = "mogorman";
+ githubId = 64710;
name = "Matthew O'Gorman";
};
Mogria = {
@@ -3510,36 +4392,43 @@
monsieurp = {
email = "monsieurp@gentoo.org";
github = "monsieurp";
+ githubId = 350116;
name = "Patrice Clement";
};
montag451 = {
email = "montag451@laposte.net";
github = "montag451";
+ githubId = 249317;
name = "montag451";
};
moosingin3space = {
email = "moosingin3space@gmail.com";
github = "moosingin3space";
+ githubId = 830082;
name = "Nathan Moos";
};
moredread = {
email = "code@apb.name";
github = "moredread";
+ githubId = 100848;
name = "André-Patrick Bubel";
};
moretea = {
email = "maarten@moretea.nl";
github = "moretea";
+ githubId = 99988;
name = "Maarten Hoogendoorn";
};
MostAwesomeDude = {
email = "cds@corbinsimpson.com";
github = "MostAwesomeDude";
+ githubId = 118035;
name = "Corbin Simpson";
};
mounium = {
email = "muoniurn@gmail.com";
github = "mounium";
+ githubId = 20026143;
name = "Katona László";
};
MP2E = {
@@ -3550,16 +4439,19 @@
mpcsh = {
email = "m@mpc.sh";
github = "mpcsh";
+ githubId = 2894019;
name = "Mark Cohen";
};
mpickering = {
email = "matthewtpickering@gmail.com";
github = "mpickering";
+ githubId = 1216657;
name = "Matthew Pickering";
};
mpoquet = {
email = "millian.poquet@gmail.com";
github = "mpoquet";
+ githubId = 3502831;
name = "Millian Poquet";
};
mpscholten = {
@@ -3570,6 +4462,7 @@
mpsyco = {
email = "fr.st-amour@gmail.com";
github = "fstamour";
+ githubId = 2881922;
name = "Francis St-Amour";
};
mredaelli = {
@@ -3580,16 +4473,19 @@
mrkkrp = {
email = "markkarpov92@gmail.com";
github = "mrkkrp";
+ githubId = 8165792;
name = "Mark Karpov";
};
mrmebelman = {
email = "burzakovskij@protonmail.com";
github = "MrMebelMan";
+ githubId = 15896005;
name = "Vladyslav Burzakovskyy";
};
mrVanDalo = {
email = "contact@ingolf-wagner.de";
github = "mrVanDalo";
+ githubId = 839693;
name = "Ingolf Wanger";
};
msackman = {
@@ -3603,26 +4499,31 @@
mschristiansen = {
email = "mikkel@rheosystems.com";
github = "mschristiansen";
+ githubId = 437005;
name = "Mikkel Christiansen";
};
msiedlarek = {
email = "mikolaj@siedlarek.pl";
github = "msiedlarek";
+ githubId = 133448;
name = "Mikołaj Siedlarek";
};
mstarzyk = {
email = "mstarzyk@gmail.com";
github = "mstarzyk";
+ githubId = 111304;
name = "Maciek Starzyk";
};
msteen = {
email = "emailmatthijs@gmail.com";
github = "msteen";
+ githubId = 788953;
name = "Matthijs Steen";
};
mt-caret = {
email = "mtakeda.enigsol@gmail.com";
github = "mt-caret";
+ githubId = 4996739;
name = "Masayuki Takeda";
};
MtP = {
@@ -3633,46 +4534,55 @@
mtreskin = {
email = "zerthurd@gmail.com";
github = "Zert";
+ githubId = 39034;
name = "Max Treskin";
};
mudri = {
email = "lamudri@gmail.com";
github = "laMudri";
+ githubId = 5139265;
name = "James Wood";
};
muflax = {
email = "mail@muflax.com";
github = "muflax";
+ githubId = 69918;
name = "Stefan Dorn";
};
mvnetbiz = {
email = "mvnetbiz@gmail.com";
github = "mvnetbiz";
+ githubId = 6455574;
name = "Matt Votava";
};
mwilsoninsight = {
email = "max.wilson@insight.com";
github = "mwilsoninsight";
+ githubId = 47782621;
name = "Max Wilson";
};
myrl = {
email = "myrl.0xf@gmail.com";
github = "myrl";
+ githubId = 9636071;
name = "Myrl Hex";
};
nadrieril = {
email = "nadrieril@gmail.com";
github = "nadrieril";
+ githubId = 6783654;
name = "Nadrieril Feneanar";
};
nalbyuites = {
email = "ashijit007@gmail.com";
github = "nalbyuites";
+ githubId = 1009523;
name = "Ashijit Pramanik";
};
namore = {
email = "namor@hemio.de";
github = "namore";
+ githubId = 1222539;
name = "Roman Naumann";
};
nand0p = {
@@ -3687,146 +4597,179 @@
nathan-gs = {
email = "nathan@nathan.gs";
github = "nathan-gs";
+ githubId = 330943;
name = "Nathan Bijnens";
};
nathyong = {
email = "nathyong@noreply.github.com";
github = "nathyong";
+ githubId = 818502;
name = "Nathan Yong";
};
nckx = {
email = "github@tobias.gr";
github = "nckx";
+ githubId = 364510;
name = "Tobias Geerinckx-Rice";
};
ndowens = {
email = "ndowens04@gmail.com";
github = "ndowens";
+ githubId = 117743;
name = "Nathan Owens";
};
neeasade = {
email = "nathanisom27@gmail.com";
github = "neeasade";
+ githubId = 3747396;
name = "Nathan Isom";
};
neonfuz = {
email = "neonfuz@gmail.com";
github = "neonfuz";
+ githubId = 2590830;
name = "Sage Raflik";
};
nequissimus = {
email = "tim@nequissimus.com";
github = "nequissimus";
+ githubId = 628342;
name = "Tim Steinbach";
};
netixx = {
email = "dev.espinetfrancois@gmail.com";
github = "netixx";
+ githubId = 1488603;
name = "François Espinet";
};
nikitavoloboev = {
email = "nikita.voloboev@gmail.com";
github = "nikitavoloboev";
+ githubId = 6391776;
name = "Nikita Voloboev";
};
nfjinjing = {
email = "nfjinjing@gmail.com";
- github = "nfjinjing";
name = "Jinjing Wang";
};
nh2 = {
email = "mail@nh2.me";
github = "nh2";
+ githubId = 399535;
name = "Niklas Hambüchen";
};
nhooyr = {
email = "anmol@aubble.com";
github = "nhooyr";
+ githubId = 10180857;
name = "Anmol Sethi";
};
nickhu = {
email = "me@nickhu.co.uk";
github = "nickhu";
+ githubId = 450276;
name = "Nick Hu";
};
nicknovitski = {
email = "nixpkgs@nicknovitski.com";
github = "nicknovitski";
+ githubId = 151337;
name = "Nick Novitski";
};
nico202 = {
email = "anothersms@gmail.com";
github = "nico202";
+ githubId = 8214542;
name = "Nicolò Balzarotti";
};
NikolaMandic = {
email = "nikola@mandic.email";
github = "NikolaMandic";
+ githubId = 4368690;
name = "Ratko Mladic";
};
ninjatrappeur = {
email = "felix@alternativebit.fr";
github = "ninjatrappeur";
+ githubId = 1219785;
name = "Félix Baylac-Jacqué";
};
nioncode = {
email = "nioncode+github@gmail.com";
github = "nioncode";
+ githubId = 3159451;
name = "Nicolas Schneider";
};
nipav = {
email = "niko.pavlinek@gmail.com";
github = "nipav";
+ githubId = 16385648;
name = "Niko Pavlinek";
};
nixy = {
email = "nixy@nixy.moe";
github = "nixy";
+ githubId = 7588406;
name = "Andrew R. M.";
};
nmattia = {
email = "nicolas@nmattia.com";
github = "nmattia";
+ githubId = 6930756;
name = "Nicolas Mattia";
};
nocent = {
email = "nocent@protonmail.ch";
github = "nocent";
+ githubId = 25505957;
name = "nocent";
};
nocoolnametom = {
email = "nocoolnametom@gmail.com";
github = "nocoolnametom";
+ githubId = 810877;
name = "Tom Doggett";
};
nomeata = {
email = "mail@joachim-breitner.de";
github = "nomeata";
+ githubId = 148037;
name = "Joachim Breitner";
};
noneucat = {
email = "andy@lolc.at";
github = "noneucat";
+ githubId = 40049608;
name = "Andy Chun";
};
notthemessiah = {
email = "brian.cohen.88@gmail.com";
github = "notthemessiah";
+ githubId = 2946283;
name = "Brian Cohen";
};
np = {
email = "np.nix@nicolaspouillard.fr";
github = "np";
+ githubId = 5548;
name = "Nicolas Pouillard";
};
nphilou = {
email = "nphilou@gmail.com";
github = "nphilou";
+ githubId = 9939720;
name = "Philippe Nguyen";
};
+ nrdxp = {
+ email = "tim.deh@pm.me";
+ github = "nrdxp";
+ githubId = 34083928;
+ name = "Tim DeHerrera";
+ };
nshalman = {
email = "nahamu@gmail.com";
github = "nshalman";
+ githubId = 20391;
name = "Nahum Shalman";
};
nslqqq = {
@@ -3836,51 +4779,61 @@
nthorne = {
email = "notrupertthorne@gmail.com";
github = "nthorne";
+ githubId = 1839979;
name = "Niklas Thörne";
};
numinit = {
email = "me@numin.it";
github = "numinit";
+ githubId = 369111;
name = "Morgan Jones";
};
nyanloutre = {
email = "paul@nyanlout.re";
github = "nyanloutre";
+ githubId = 7677321;
name = "Paul Trehiou";
};
nyarly = {
email = "nyarly@gmail.com";
github = "nyarly";
+ githubId = 127548;
name = "Judson Lester";
};
nzhang-zh = {
email = "n.zhang.hp.au@gmail.com";
github = "nzhang-zh";
+ githubId = 30825096;
name = "Ning Zhang";
};
obadz = {
email = "obadz-nixos@obadz.com";
github = "obadz";
+ githubId = 3359345;
name = "obadz";
};
ocharles = {
email = "ollie@ocharles.org.uk";
github = "ocharles";
+ githubId = 20878;
name = "Oliver Charles";
};
odi = {
email = "oliver.dunkl@gmail.com";
github = "odi";
+ githubId = 158758;
name = "Oliver Dunkl";
};
offline = {
email = "jaka@x-truder.net";
github = "offlinehacker";
+ githubId = 585547;
name = "Jaka Hudoklin";
};
oida = {
email = "oida@posteo.de";
github = "oida";
+ githubId = 7249506;
name = "oida";
};
okasu = {
@@ -3890,11 +4843,13 @@
olcai = {
email = "dev@timan.info";
github = "olcai";
+ githubId = 20923;
name = "Erik Timan";
};
olejorgenb = {
email = "olejorgenb@yahoo.no";
github = "olejorgenb";
+ githubId = 72201;
name = "Ole Jørgen Brønner";
};
olynch = {
@@ -3905,16 +4860,19 @@
omnipotententity = {
email = "omnipotententity@gmail.com";
github = "omnipotententity";
+ githubId = 1538622;
name = "Michael Reilly";
};
OPNA2608 = {
email = "christoph.neidahl@gmail.com";
github = "OPNA2608";
+ githubId = 23431373;
name = "Christoph Neidahl";
};
orbekk = {
email = "kjetil.orbekk@gmail.com";
github = "orbekk";
+ githubId = 19862;
name = "KJ Ørbekk";
};
orbitz = {
@@ -3925,21 +4883,25 @@
orivej = {
email = "orivej@gmx.fr";
github = "orivej";
+ githubId = 101514;
name = "Orivej Desh";
};
osener = {
email = "ozan@ozansener.com";
github = "osener";
+ githubId = 111265;
name = "Ozan Sener";
};
otwieracz = {
email = "slawek@otwiera.cz";
github = "otwieracz";
+ githubId = 108072;
name = "Slawomir Gonet";
};
oxij = {
email = "oxij@oxij.org";
github = "oxij";
+ githubId = 391919;
name = "Jan Malakhovski";
keys = [{
longkeyid = "rsa2048/0x0E6CA66E5C557AA8";
@@ -3949,66 +4911,85 @@
oyren = {
email = "m.scheuren@oyra.eu";
github = "oyren";
+ githubId = 15930073;
name = "Moritz Scheuren";
};
pacien = {
email = "b4gx3q.nixpkgs@pacien.net";
github = "pacien";
+ githubId = 1449319;
name = "Pacien Tran-Girard";
};
paddygord = {
email = "pgpatrickgordon@gmail.com";
github = "paddygord";
+ githubId = 10776658;
name = "Patrick Gordon";
};
paholg = {
email = "paho@paholg.com";
github = "paholg";
+ githubId = 4908217;
name = "Paho Lurie-Gregg";
};
pakhfn = {
email = "pakhfn@gmail.com";
github = "pakhfn";
+ githubId = 11016164;
name = "Fedor Pakhomov";
};
+ pamplemousse = {
+ email = "xav.maso@gmail.com";
+ github = "Pamplemousse";
+ githubId = 2647236;
+ name = "Xavier Maso";
+ };
panaeon = {
email = "vitalii.voloshyn@gmail.com";
github = "panaeon";
+ githubId = 686076;
name = "Vitalii Voloshyn";
};
pandaman = {
email = "kointosudesuyo@infoseek.jp";
github = "pandaman64";
+ githubId = 1788628;
name = "pandaman";
};
paperdigits = {
email = "mica@silentumbrella.com";
github = "paperdigits";
+ githubId = 71795;
name = "Mica Semrick";
};
paraseba = {
email = "paraseba@gmail.com";
github = "paraseba";
+ githubId = 20792;
name = "Sebastian Galkin";
};
pashev = {
email = "pashev.igor@gmail.com";
github = "ip1981";
+ githubId = 131844;
name = "Igor Pashev";
};
patternspandemic = {
email = "patternspandemic@live.com";
github = "patternspandemic";
+ githubId = 15645854;
name = "Brad Christensen";
};
pawelpacana = {
email = "pawel.pacana@gmail.com";
github = "pawelpacana";
+ githubId = 116740;
name = "Paweł Pacana";
};
pbogdan = {
email = "ppbogdan@gmail.com";
github = "pbogdan";
+ githubId = 157610;
name = "Piotr Bogdan";
};
pcarrier = {
@@ -4019,81 +5000,97 @@
periklis = {
email = "theopompos@gmail.com";
github = "periklis";
+ githubId = 152312;
name = "Periklis Tsirakidis";
};
pesterhazy = {
email = "pesterhazy@gmail.com";
github = "pesterhazy";
+ githubId = 106328;
name = "Paulus Esterhazy";
};
petabyteboy = {
email = "me@pbb.lc";
github = "petabyteboy";
+ githubId = 3250809;
name = "Milan Pässler";
};
peterhoeg = {
email = "peter@hoeg.com";
github = "peterhoeg";
+ githubId = 722550;
name = "Peter Hoeg";
};
peterromfeldhk = {
email = "peter.romfeld.hk@gmail.com";
github = "peterromfeldhk";
+ githubId = 5515707;
name = "Peter Romfeld";
};
peti = {
email = "simons@cryp.to";
github = "peti";
+ githubId = 28323;
name = "Peter Simons";
};
philandstuff = {
email = "philip.g.potter@gmail.com";
github = "philandstuff";
+ githubId = 581269;
name = "Philip Potter";
};
phile314 = {
email = "nix@314.ch";
github = "phile314";
+ githubId = 1640697;
name = "Philipp Hausmann";
};
Phlogistique = {
email = "noe.rubinstein@gmail.com";
github = "Phlogistique";
+ githubId = 421510;
name = "Noé Rubinstein";
};
phreedom = {
email = "phreedom@yandex.ru";
github = "phreedom";
+ githubId = 62577;
name = "Evgeny Egorochkin";
};
phryneas = {
email = "mail@lenzw.de";
github = "phryneas";
+ githubId = 4282439;
name = "Lenz Weber";
};
phunehehe = {
email = "phunehehe@gmail.com";
github = "phunehehe";
+ githubId = 627831;
name = "Hoang Xuan Phu";
};
pierrechevalier83 = {
email = "pierrechevalier83@gmail.com";
github = "pierrechevalier83";
+ githubId = 5790907;
name = "Pierre Chevalier";
};
pierreis = {
email = "pierre@pierre.is";
github = "pierreis";
+ githubId = 203973;
name = "Pierre Matri";
};
pierrer = {
email = "pierrer@pi3r.be";
github = "pierrer";
+ githubId = 93115;
name = "Pierre Radermecker";
};
pierron = {
email = "nixos@nbp.name";
github = "nbp";
+ githubId = 1179566;
name = "Nicolas B. Pierron";
};
piotr = {
@@ -4103,16 +5100,19 @@
pjbarnoy = {
email = "pjbarnoy@gmail.com";
github = "pjbarnoy";
+ githubId = 119460;
name = "Perry Barnoy";
};
pjones = {
email = "pjones@devalot.com";
github = "pjones";
+ githubId = 3737;
name = "Peter Jones";
};
pkmx = {
email = "pkmx.tw@gmail.com";
github = "pkmx";
+ githubId = 610615;
name = "Chih-Mao Chen";
};
plchldr = {
@@ -4123,16 +5123,19 @@
plcplc = {
email = "plcplc@gmail.com";
github = "plcplc";
+ githubId = 358550;
name = "Philip Lykke Carlsen";
};
plumps = {
email = "maks.bronsky@web.de";
github = "plumps";
+ githubId = 13000278;
name = "Maksim Bronsky";
};
pmahoney = {
email = "pat@polycrystal.org";
github = "pmahoney";
+ githubId = 103822;
name = "Patrick Mahoney";
};
pmeunier = {
@@ -4143,21 +5146,25 @@
pmiddend = {
email = "pmidden@secure.mailbox.org";
github = "pmiddend";
+ githubId = 178496;
name = "Philipp Middendorf";
};
pmyjavec = {
email = "pauly@myjavec.com";
github = "pmyjavec";
+ githubId = 315096;
name = "Pauly Myjavec";
};
pnelson = {
email = "me@pnelson.ca";
github = "pnelson";
+ githubId = 579773;
name = "Philip Nelson";
};
pneumaticat = {
email = "kevin@potatofrom.space";
github = "pneumaticat";
+ githubId = 11365056;
name = "Kevin Liu";
};
polyrod = {
@@ -4168,16 +5175,19 @@
pombeirp = {
email = "nix@endgr.33mail.com";
github = "PombeirP";
+ githubId = 138074;
name = "Pedro Pombeiro";
};
pradeepchhetri = {
email = "pradeep.chhetri89@gmail.com";
github = "pradeepchhetri";
+ githubId = 2232667;
name = "Pradeep Chhetri";
};
pradyuman = {
email = "me@pradyuman.co";
github = "pradyuman";
+ githubId = 9904569;
name = "Pradyuman Vig";
keys = [
{ longkeyid = "rsa4096/4F74D5361C4CA31E";
@@ -4188,11 +5198,13 @@
prikhi = {
email = "pavan.rikhi@gmail.com";
github = "prikhi";
+ githubId = 1304102;
name = "Pavan Rikhi";
};
primeos = {
email = "dev.primeos@gmail.com";
github = "primeos";
+ githubId = 7537109;
name = "Michael Weiss";
keys = [
{ longkeyid = "ed25519/0x130826A6C2A389FD"; # Git only
@@ -4206,21 +5218,25 @@
Profpatsch = {
email = "mail@profpatsch.de";
github = "Profpatsch";
+ githubId = 3153638;
name = "Profpatsch";
};
proglodyte = {
email = "proglodyte23@gmail.com";
github = "proglodyte";
+ githubId = 18549627;
name = "Proglodyte";
};
protoben = {
email = "protob3n@gmail.com";
github = "protoben";
+ githubId = 4633847;
name = "Ben Hamlin";
};
prusnak = {
email = "pavol@rusnak.io";
github = "prusnak";
+ githubId = 42201;
name = "Pavol Rusnak";
keys = [{
longkeyid = "rsa4096/0x91F3B339B9A02A3D";
@@ -4230,11 +5246,13 @@
pshendry = {
email = "paul@pshendry.com";
github = "pshendry";
+ githubId = 1829032;
name = "Paul Hendry";
};
psibi = {
email = "sibi@psibi.in";
github = "psibi";
+ githubId = 737477;
name = "Sibi";
};
pstn = {
@@ -4244,26 +5262,37 @@
pSub = {
email = "mail@pascal-wittmann.de";
github = "pSub";
+ githubId = 83842;
name = "Pascal Wittmann";
};
psyanticy = {
email = "iuns@outlook.fr";
github = "PsyanticY";
+ githubId = 20524473;
name = "Psyanticy";
};
ptival = {
email = "valentin.robert.42@gmail.com";
github = "Ptival";
+ githubId = 478606;
name = "Valentin Robert";
};
ptrhlm = {
email = "ptrhlm0@gmail.com";
github = "ptrhlm";
+ githubId = 9568176;
name = "Piotr Halama";
};
+ puckipedia = {
+ email = "puck@puckipedia.com";
+ github = "puckipedia";
+ githubId = 488734;
+ name = "Puck Meerburg";
+ };
puffnfresh = {
email = "brian@brianmckenna.org";
github = "puffnfresh";
+ githubId = 37715;
name = "Brian McKenna";
};
pxc = {
@@ -4273,26 +5302,31 @@
pyrolagus = {
email = "pyrolagus@gmail.com";
github = "PyroLagus";
+ githubId = 4579165;
name = "Danny Bautista";
};
q3k = {
email = "q3k@q3k.org";
github = "q3k";
+ githubId = 315234;
name = "Serge Bazanski";
};
qknight = {
email = "js@lastlog.de";
github = "qknight";
+ githubId = 137406;
name = "Joachim Schiele";
};
qoelet = {
email = "kenny@machinesung.com";
github = "qoelet";
+ githubId = 115877;
name = "Kenny Shen";
};
qyliss = {
email = "hi@alyssa.is";
github = "alyssais";
+ githubId = 2768870;
name = "Alyssa Ross";
keys = [{
longkeyid = "rsa4096/736CCDF9EF51BD97";
@@ -4307,36 +5341,43 @@
raquelgb = {
email = "raquel.garcia.bautista@gmail.com";
github = "raquelgb";
+ githubId = 1246959;
name = "Raquel García";
};
ragge = {
email = "r.dahlen@gmail.com";
github = "ragnard";
+ githubId = 882;
name = "Ragnar Dahlen";
};
ralith = {
email = "ben.e.saunders@gmail.com";
github = "ralith";
+ githubId = 104558;
name = "Benjamin Saunders";
};
ramkromberg = {
email = "ramkromberg@mail.com";
github = "ramkromberg";
+ githubId = 14829269;
name = "Ram Kromberg";
};
rardiol = {
email = "ricardo.ardissone@gmail.com";
github = "rardiol";
+ githubId = 11351304;
name = "Ricardo Ardissone";
};
rasendubi = {
email = "rasen.dubi@gmail.com";
github = "rasendubi";
+ githubId = 1366419;
name = "Alexey Shmalko";
};
raskin = {
email = "7c6f434c@mail.ru";
github = "7c6f434c";
+ githubId = 1891350;
name = "Michael Raskin";
};
ravloony = {
@@ -4346,101 +5387,121 @@
rawkode = {
email = "david.andrew.mckay@gmail.com";
github = "rawkode";
+ githubId = 145816;
name = "David McKay";
};
razvan = {
email = "razvan.panda@gmail.com";
github = "razvan-panda";
+ githubId = 1758708;
name = "Răzvan Flavius Panda";
};
rbasso = {
email = "rbasso@sharpgeeks.net";
github = "rbasso";
+ githubId = 16487165;
name = "Rafael Basso";
};
rbrewer = {
email = "rwb123@gmail.com";
github = "rbrewer123";
+ githubId = 743058;
name = "Rob Brewer";
};
rdnetto = {
email = "rdnetto@gmail.com";
github = "rdnetto";
+ githubId = 1973389;
name = "Reuben D'Netto";
};
redbaron = {
email = "ivanov.maxim@gmail.com";
github = "redbaron";
+ githubId = 16624;
name = "Maxim Ivanov";
};
redfish64 = {
email = "engler@gmail.com";
github = "redfish64";
+ githubId = 1922770;
name = "Tim Engler";
};
redvers = {
email = "red@infect.me";
github = "redvers";
+ githubId = 816465;
name = "Redvers Davies";
};
refnil = {
email = "broemartino@gmail.com";
github = "refnil";
+ githubId = 1142322;
name = "Martin Lavoie";
};
regnat = {
email = "regnat@regnat.ovh";
github = "regnat";
+ githubId = 7226587;
name = "Théophane Hufschmitt";
};
relrod = {
email = "ricky@elrod.me";
github = "relrod";
+ githubId = 43930;
name = "Ricky Elrod";
};
rembo10 = {
email = "rembo10@users.noreply.github.com";
github = "rembo10";
+ githubId = 801525;
name = "rembo10";
};
renatoGarcia = {
email = "fgarcia.renato@gmail.com";
github = "renatoGarcia";
+ githubId = 220211;
name = "Renato Garcia";
};
rencire = {
email = "546296+rencire@users.noreply.github.com";
github = "rencire";
+ githubId = 546296;
name = "Eric Ren";
};
renzo = {
email = "renzocarbonara@gmail.com";
github = "k0001";
+ githubId = 3302;
name = "Renzo Carbonara";
};
retrry = {
email = "retrry@gmail.com";
github = "retrry";
+ githubId = 500703;
name = "Tadas Barzdžius";
};
rexim = {
email = "reximkut@gmail.com";
github = "rexim";
+ githubId = 165283;
name = "Alexey Kutepov";
};
rht = {
email = "rhtbot@protonmail.com";
github = "rht";
+ githubId = 395821;
name = "rht";
};
richardipsum = {
email = "richardipsum@fastmail.co.uk";
github = "richardipsum";
+ githubId = 10631029;
name = "Richard Ipsum";
};
rick68 = {
email = "rick68@gmail.com";
github = "rick68";
+ githubId = 42619;
name = "Wei-Ming Yang";
};
rickynils = {
@@ -4448,35 +5509,53 @@
github = "rickynils";
name = "Rickard Nilsson";
};
+ rileyinman = {
+ email = "rileyminman@gmail.com";
+ github = "rileyinman";
+ githubId = 37246692;
+ name = "Riley Inman";
+ };
ris = {
email = "code@humanleg.org.uk";
github = "risicle";
+ githubId = 807447;
name = "Robert Scott";
};
rittelle = {
email = "rittelle@posteo.de";
github = "rittelle";
+ githubId = 33598633;
name = "Lennart Rittel";
};
rixed = {
email = "rixed-github@happyleptic.org";
github = "rixed";
+ githubId = 449990;
name = "Cedric Cellier";
};
rkoe = {
email = "rk@simple-is-better.org";
github = "rkoe";
+ githubId = 2507744;
name = "Roland Koebler";
};
rlupton20 = {
email = "richard.lupton@gmail.com";
github = "rlupton20";
+ githubId = 13752145;
name = "Richard Lupton";
};
rnhmjoj = {
- email = "micheleguerinirocco@me.com";
+ email = "rnhmjoj@inventati.org";
github = "rnhmjoj";
+ githubId = 2817565;
name = "Michele Guerini Rocco";
+ keys =
+ [
+ { longkeyid = "ed25519/0xBFBAF4C975F76450";
+ fingerprint = "92B2 904F D293 C94D C4C9 3E6B BFBA F4C9 75F7 6450";
+ }
+ ];
};
rob = {
email = "rob.vermaas@gmail.com";
@@ -4491,91 +5570,115 @@
robbinch = {
email = "robbinch33@gmail.com";
github = "robbinch";
+ githubId = 12312980;
name = "Robbin C.";
};
roberth = {
email = "nixpkgs@roberthensing.nl";
github = "roberth";
+ githubId = 496447;
name = "Robert Hensing";
};
robertodr = {
email = "roberto.diremigio@gmail.com";
github = "robertodr";
+ githubId = 3708689;
name = "Roberto Di Remigio";
};
robgssp = {
email = "robgssp@gmail.com";
github = "robgssp";
+ githubId = 521306;
name = "Rob Glossop";
};
roblabla = {
email = "robinlambertz+dev@gmail.com";
github = "roblabla";
+ githubId = 1069318;
name = "Robin Lambertz";
};
roconnor = {
email = "roconnor@theorem.ca";
github = "roconnor";
+ githubId = 852967;
name = "Russell O'Connor";
};
+ roelvandijk = {
+ email = "roel@lambdacube.nl";
+ github = "roelvandijk";
+ githubId = 710906;
+ name = "Roel van Dijk";
+ };
romildo = {
email = "malaquias@gmail.com";
github = "romildo";
+ githubId = 1217934;
name = "José Romildo Malaquias";
};
rongcuid = {
email = "rongcuid@outlook.com";
github = "rongcuid";
+ githubId = 1312525;
name = "Rongcui Dong";
};
roosemberth = {
email = "roosembert.palacios+nixpkgs@gmail.com";
github = "roosemberth";
+ githubId = 3621083;
name = "Roosembert (Roosemberth) Palacios";
};
royneary = {
email = "christian@ulrich.earth";
github = "royneary";
+ githubId = 1942810;
name = "Christian Ulrich";
};
rprospero = {
email = "rprospero+nix@gmail.com";
github = "rprospero";
+ githubId = 1728853;
name = "Adam Washington";
};
rps = {
email = "robbpseaton@gmail.com";
github = "robertseaton";
+ githubId = 221121;
name = "Robert P. Seaton";
};
rszibele = {
email = "richard@szibele.com";
github = "rszibele";
+ githubId = 1387224;
name = "Richard Szibele";
};
rtreffer = {
email = "treffer+nixos@measite.de";
github = "rtreffer";
+ githubId = 61306;
name = "Rene Treffer";
};
rushmorem = {
email = "rushmore@webenchanter.com";
github = "rushmorem";
+ githubId = 4958190;
name = "Rushmore Mushambi";
};
ruuda = {
email = "dev+nix@veniogames.com";
github = "ruuda";
+ githubId = 506953;
name = "Ruud van Asseldonk";
};
rvl = {
email = "dev+nix@rodney.id.au";
github = "rvl";
+ githubId = 1019641;
name = "Rodney Lorrimar";
};
rvlander = {
email = "rvlander@gaetanandre.eu";
github = "rvlander";
+ githubId = 5236428;
name = "Gaëtan André";
};
rvolosatovs = {
@@ -4586,6 +5689,7 @@
ryanartecona = {
email = "ryanartecona@gmail.com";
github = "ryanartecona";
+ githubId = 889991;
name = "Ryan Artecona";
};
ryansydnor = {
@@ -4596,21 +5700,25 @@
ryantm = {
email = "ryan@ryantm.com";
github = "ryantm";
+ githubId = 4804;
name = "Ryan Mulligan";
};
ryantrinkle = {
email = "ryan.trinkle@gmail.com";
github = "ryantrinkle";
+ githubId = 1156448;
name = "Ryan Trinkle";
};
rybern = {
email = "ryan.bernstein@columbia.edu";
github = "rybern";
+ githubId = 4982341;
name = "Ryan Bernstein";
};
rycee = {
email = "robert@rycee.net";
github = "rycee";
+ githubId = 798147;
name = "Robert Helgesson";
keys = [{
longkeyid = "rsa4096/0x3573356C25C424D4";
@@ -4620,31 +5728,37 @@
ryneeverett = {
email = "ryneeverett@gmail.com";
github = "ryneeverett";
+ githubId = 3280280;
name = "Ryne Everett";
};
rzetterberg = {
email = "richard.zetterberg@gmail.com";
github = "rzetterberg";
+ githubId = 766350;
name = "Richard Zetterberg";
};
samdroid-apps = {
email = "sam@sam.today";
github = "samdroid-apps";
+ githubId = 6022042;
name = "Sam Parkinson";
};
samrose = {
email = "samuel.rose@gmail.com";
github = "samrose";
+ githubId = 115821;
name = "Sam Rose";
};
samueldr = {
email = "samuel@dionne-riel.com";
github = "samueldr";
+ githubId = 132835;
name = "Samuel Dionne-Riel";
};
samuelrivas = {
email = "samuelrivas@gmail.com";
github = "samuelrivas";
+ githubId = 107703;
name = "Samuel Rivas";
};
sander = {
@@ -4655,26 +5769,31 @@
sargon = {
email = "danielehlers@mindeye.net";
github = "sargon";
+ githubId = 178904;
name = "Daniel Ehlers";
};
saschagrunert = {
email = "mail@saschagrunert.de";
github = "saschagrunert";
+ githubId = 695473;
name = "Sascha Grunert";
};
sauyon = {
email = "s@uyon.co";
github = "sauyon";
+ githubId = 2347889;
name = "Sauyon Lee";
};
sb0 = {
email = "sb@m-labs.hk";
github = "sbourdeauducq";
+ githubId = 720864;
name = "Sébastien Bourdeauducq";
};
sboosali = {
email = "SamBoosalis@gmail.com";
github = "sboosali";
+ githubId = 2320433;
name = "Sam Boosalis";
};
scalavision = {
@@ -4685,6 +5804,7 @@
schmitthenner = {
email = "development@schmitthenner.eu";
github = "fkz";
+ githubId = 354463;
name = "Fabian Schmitthenner";
};
schmittlauch = {
@@ -4694,6 +5814,7 @@
schneefux = {
email = "schneefux+nixos_pkg@schneefux.xyz";
github = "schneefux";
+ githubId = 15379000;
name = "schneefux";
};
schristo = {
@@ -4703,21 +5824,25 @@
scode = {
email = "peter.schuller@infidyne.com";
github = "scode";
+ githubId = 59476;
name = "Peter Schuller";
};
scolobb = {
email = "sivanov@colimite.fr";
github = "scolobb";
+ githubId = 11320;
name = "Sergiu Ivanov";
};
screendriver = {
email = "nix@echooff.de";
github = "screendriver";
+ githubId = 149248;
name = "Christian Rackerseder";
};
Scriptkiddi = {
email = "nixos@scriptkiddi.de";
github = "scriptkiddi";
+ githubId = 3598650;
name = "Fritz Otlinghaus";
};
scubed2 = {
@@ -4728,61 +5853,85 @@
sdll = {
email = "sasha.delly@gmail.com";
github = "sdll";
+ githubId = 17913919;
name = "Sasha Illarionov";
};
SeanZicari = {
email = "sean.zicari@gmail.com";
github = "SeanZicari";
+ githubId = 2343853;
name = "Sean Zicari";
};
sellout = {
email = "greg@technomadic.org";
github = "sellout";
+ githubId = 33031;
name = "Greg Pfeil";
};
sengaya = {
email = "tlo@sengaya.de";
github = "sengaya";
+ githubId = 1286668;
name = "Thilo Uttendorfer";
};
sephalon = {
email = "me@sephalon.net";
github = "sephalon";
+ githubId = 893474;
name = "Stefan Wiehler";
};
sepi = {
email = "raffael@mancini.lu";
github = "sepi";
+ githubId = 529649;
name = "Raffael Mancini";
};
seppeljordan = {
email = "sebastian.jordan.mail@googlemail.com";
github = "seppeljordan";
+ githubId = 4805746;
name = "Sebastian Jordan";
};
seqizz = {
email = "seqizz@gmail.com";
github = "seqizz";
+ githubId = 307899;
name = "Gurkan Gur";
};
sfrijters = {
email = "sfrijters@gmail.com";
github = "sfrijters";
+ githubId = 918365;
name = "Stefan Frijters";
};
+ sgo = {
+ email = "stig@stig.io";
+ github = "stigtsp";
+ githubId = 75371;
+ name = "Stig Palmquist";
+ };
sgraf = {
email = "sgraf1337@gmail.com";
github = "sgraf812";
+ githubId = 1151264;
name = "Sebastian Graf";
};
+ shahrukh330 = {
+ email = "shahrukh330@gmail.com";
+ github = "shahrukh330";
+ githubId = 1588288;
+ name = "Shahrukh Khan";
+ };
shanemikel = {
email = "shanemikel1@gmail.com";
github = "shanemikel";
+ githubId = 6720672;
name = "Shane Pearlman";
};
shawndellysse = {
email = "sdellysse@gmail.com";
github = "shawndellysse";
+ githubId = 293035;
name = "Shawn Dellysse";
};
shazow = {
@@ -4793,16 +5942,19 @@
sheenobu = {
email = "sheena.artrip@gmail.com";
github = "sheenobu";
+ githubId = 1443459;
name = "Sheena Artrip";
};
sheganinans = {
email = "sheganinans@gmail.com";
github = "sheganinans";
+ githubId = 2146203;
name = "Aistis Raulinaitis";
};
shell = {
email = "cam.turn@gmail.com";
github = "VShell";
+ githubId = 251028;
name = "Shell Turner";
};
shlevy = {
@@ -4818,51 +5970,77 @@
shou = {
email = "x+g@shou.io";
github = "Shou";
+ githubId = 819413;
name = "Benedict Aas";
};
+ shyim = {
+ email = "s.sayakci@gmail.com";
+ github = "shyim";
+ githubId = 6224096;
+ name = "Soner Sayakci";
+ };
siddharthist = {
email = "langston.barrett@gmail.com";
- github = "siddharthist";
+ github = "langston-barrett";
+ githubId = 4294323;
name = "Langston Barrett";
};
siers = {
email = "veinbahs+nixpkgs@gmail.com";
github = "siers";
+ githubId = 235147;
name = "Raitis Veinbahs";
};
sifmelcara = {
email = "ming@culpring.com";
github = "sifmelcara";
+ githubId = 10496191;
name = "Ming Chuan";
};
sigma = {
email = "yann.hodique@gmail.com";
github = "sigma";
+ githubId = 16090;
name = "Yann Hodique";
};
sikmir = {
email = "sikmir@gmail.com";
github = "sikmir";
+ githubId = 688044;
name = "Nikolay Korotkiy";
+ keys = [{
+ longkeyid = "rsa2048/0xD1DE6D7F693663A5";
+ fingerprint = "ADF4 C13D 0E36 1240 BD01 9B51 D1DE 6D7F 6936 63A5";
+ }];
+ };
+ simonchatts = {
+ email = "code@chatts.net";
+ github = "simonchatts";
+ githubId = 11135311;
+ name = "Simon Chatterjee";
};
simonvandel = {
email = "simon.vandel@gmail.com";
github = "simonvandel";
+ githubId = 2770647;
name = "Simon Vandel Sillesen";
};
sivteck = {
email = "sivaram1992@gmail.com";
github = "sivteck";
+ githubId = 8017899;
name = "Sivaram Balakrishnan";
};
sjagoe = {
email = "simon@simonjagoe.com";
github = "sjagoe";
+ githubId = 80012;
name = "Simon Jagoe";
};
sjau = {
email = "nixos@sjau.ch";
github = "sjau";
+ githubId = 848812;
name = "Stephan Jau";
};
sjmackenzie = {
@@ -4877,6 +6055,7 @@
skeidel = {
email = "svenkeidel@gmail.com";
github = "svenkeidel";
+ githubId = 266500;
name = "Sven Keidel";
};
skrzyp = {
@@ -4886,11 +6065,13 @@
sleexyz = {
email = "freshdried@gmail.com";
github = "sleexyz";
+ githubId = 1505617;
name = "Sean Lee";
};
smakarov = {
email = "setser200018@gmail.com";
github = "setser";
+ githubId = 12733495;
name = "Sergey Makarov";
keys = [{
longkeyid = "rsa2048/6AA23A1193B7064B";
@@ -4900,6 +6081,7 @@
smaret = {
email = "sebastien.maret@icloud.com";
github = "smaret";
+ githubId = 95471;
name = "Sébastien Maret";
keys = [{
longkeyid = "rsa4096/0x86E30E5A0F5FC59C";
@@ -4909,31 +6091,37 @@
smironov = {
email = "grrwlf@gmail.com";
github = "grwlf";
+ githubId = 4477729;
name = "Sergey Mironov";
};
sna = {
email = "abouzahra.9@wright.edu";
github = "s-na";
+ githubId = 20214715;
name = "S. Nordin Abouzahra";
};
snaar = {
email = "snaar@snaar.net";
github = "snaar";
+ githubId = 602439;
name = "Serguei Narojnyi";
};
snyh = {
email = "snyh@snyh.org";
github = "snyh";
+ githubId = 1437166;
name = "Xia Bin";
};
solson = {
email = "scott@solson.me";
github = "solson";
+ githubId = 26806;
name = "Scott Olson";
};
sondr3 = {
email = "nilsen.sondre@gmail.com";
github = "sondr3";
+ githubId = 2280539;
name = "Sondre Nilsen";
keys = [{
longkeyid = "ed25519/0x25676BCBFFAD76B1";
@@ -4943,31 +6131,37 @@
sorki = {
email = "srk@48.io";
github = "sorki";
+ githubId = 115308;
name = "Richard Marko";
};
sorpaas = {
email = "hi@that.world";
github = "sorpaas";
+ githubId = 6277322;
name = "Wei Tang";
};
spacefrogg = {
email = "spacefrogg-nixos@meterriblecrew.net";
github = "spacefrogg";
+ githubId = 167881;
name = "Michael Raitza";
};
spacekookie = {
email = "kookie@spacekookie.de";
github = "spacekookie";
+ githubId = 7669898;
name = "Katharina Fey";
};
spencerjanssen = {
email = "spencerjanssen@gmail.com";
github = "spencerjanssen";
+ githubId = 2600039;
name = "Spencer Janssen";
};
spinus = {
email = "tomasz.czyz@gmail.com";
github = "spinus";
+ githubId = 950799;
name = "Tomasz Czyż";
};
sprock = {
@@ -4978,6 +6172,7 @@
spwhitt = {
email = "sw@swhitt.me";
github = "spwhitt";
+ githubId = 1414088;
name = "Spencer Whitt";
};
srghma = {
@@ -4988,37 +6183,50 @@
srgom = {
email = "srgom@users.noreply.github.com";
github = "srgom";
+ githubId = 8103619;
name = "SRGOM";
};
srhb = {
email = "sbrofeldt@gmail.com";
github = "srhb";
+ githubId = 219362;
name = "Sarah Brofeldt";
};
SShrike = {
email = "severen@shrike.me";
github = "severen";
+ githubId = 4061736;
name = "Severen Redwood";
};
steell = {
email = "steve@steellworks.com";
github = "Steell";
+ githubId = 1699155;
name = "Steve Elliott";
};
stephenmw = {
email = "stephen@q5comm.com";
github = "stephenmw";
+ githubId = 231788;
name = "Stephen Weinberg";
};
+ sterfield = {
+ email = "sterfield@gmail.com";
+ github = "sterfield";
+ githubId = 5747061;
+ name = "Guillaume Loetscher";
+ };
sternenseemann = {
email = "post@lukasepple.de";
github = "sternenseemann";
+ githubId = 3154475;
name = "Lukas Epple";
};
steshaw = {
name = "Steven Shaw";
email = "steven@steshaw.org";
github = "steshaw";
+ githubId = 45735;
keys = [{
longkeyid = "rsa4096/0x1D9A17DFD23DCB91";
fingerprint = "0AFE 77F7 474D 1596 EE55 7A29 1D9A 17DF D23D CB91";
@@ -5027,111 +6235,133 @@
stesie = {
email = "stesie@brokenpipe.de";
github = "stesie";
+ githubId = 113068;
name = "Stefan Siegl";
};
steve-chavez = {
email = "stevechavezast@gmail.com";
github = "steve-chavez";
+ githubId = 1829294;
name = "Steve Chávez";
};
steveej = {
email = "mail@stefanjunker.de";
github = "steveej";
+ githubId = 1181362;
name = "Stefan Junker";
};
StijnDW = {
email = "stekke@airmail.cc";
github = "StijnDW";
+ githubId = 1751956;
name = "Stijn DW";
};
StillerHarpo = {
email = "florianengel39@gmail.com";
github = "StillerHarpo";
+ githubId = 25526706;
name = "Florian Engel";
};
stites = {
email = "sam@stites.io";
github = "stites";
+ githubId = 1694705;
name = "Sam Stites";
};
stumoss = {
email = "samoss@gmail.com";
github = "stumoss";
+ githubId = 638763;
name = "Stuart Moss";
};
suhr = {
email = "suhr@i2pmail.org";
github = "suhr";
+ githubId = 65870;
name = "Сухарик";
};
SuprDewd = {
email = "suprdewd@gmail.com";
github = "SuprDewd";
+ githubId = 187109;
name = "Bjarki Ágúst Guðmundsson";
};
suvash = {
email = "suvash+nixpkgs@gmail.com";
github = "suvash";
+ githubId = 144952;
name = "Suvash Thapaliya";
};
sveitser = {
email = "sveitser@gmail.com";
github = "sveitser";
+ githubId = 1040871;
name = "Mathis Antony";
};
svsdep = {
email = "svsdep@gmail.com";
github = "svsdep";
+ githubId = 36695359;
name = "Vasyl Solovei";
};
swarren83 = {
email = "shawn.w.warren@gmail.com";
github = "swarren83";
+ githubId = 4572854;
name = "Shawn Warren";
};
swdunlop = {
email = "swdunlop@gmail.com";
github = "swdunlop";
+ githubId = 120188;
name = "Scott W. Dunlop";
};
swflint = {
email = "swflint@flintfam.org";
github = "swflint";
+ githubId = 1771109;
name = "Samuel W. Flint";
};
swistak35 = {
email = "me@swistak35.com";
github = "swistak35";
+ githubId = 332289;
name = "Rafał Łasocha";
};
symphorien = {
email = "symphorien_nixpkgs@xlumurb.eu";
github = "symphorien";
+ githubId = 12595971;
name = "Guillaume Girol";
};
synthetica = {
email = "nix@hilhorst.be";
github = "Synthetica9";
+ githubId = 7075751;
name = "Patrick Hilhorst";
};
szczyp = {
email = "qb@szczyp.com";
github = "szczyp";
+ githubId = 203195;
name = "Szczyp";
};
sztupi = {
email = "attila.sztupak@gmail.com";
github = "sztupi";
+ githubId = 143103;
name = "Attila Sztupak";
};
t184256 = {
email = "monk@unboiled.info";
github = "t184256";
+ githubId = 5991987;
name = "Alexander Sosedkin";
};
tadeokondrak = {
email = "me@tadeo.ca";
github = "tadeokondrak";
+ githubId = 4098453;
name = "Tadeo Kondrak";
keys = [{
longkeyid = "ed25519/0xFBE607FCC49516D3";
@@ -5141,11 +6371,13 @@
tadfisher = {
email = "tadfisher@gmail.com";
github = "tadfisher";
+ githubId = 129148;
name = "Tad Fisher";
};
taeer = {
email = "taeer@necsi.edu";
github = "Radvendii";
+ githubId = 1239929;
name = "Taeer Bar-Yam";
};
taha = {
@@ -5156,76 +6388,91 @@
tailhook = {
email = "paul@colomiets.name";
github = "tailhook";
+ githubId = 321799;
name = "Paul Colomiets";
};
taketwo = {
email = "alexandrov88@gmail.com";
github = "taketwo";
+ githubId = 1241736;
name = "Sergey Alexandrov";
};
takikawa = {
email = "asumu@igalia.com";
github = "takikawa";
+ githubId = 64192;
name = "Asumu Takikawa";
};
taktoa = {
email = "taktoa@gmail.com";
github = "taktoa";
+ githubId = 553443;
name = "Remy Goldschmidt";
};
taku0 = {
email = "mxxouy6x3m_github@tatapa.org";
github = "taku0";
+ githubId = 870673;
name = "Takuo Yonezawa";
};
talyz = {
email = "kim.lindberger@gmail.com";
github = "talyz";
+ githubId = 63433;
name = "Kim Lindberger";
};
taneb = {
email = "nvd1234@gmail.com";
github = "Taneb";
+ githubId = 1901799;
name = "Nathan van Doorn";
};
tari = {
email = "peter@taricorp.net";
github = "tari";
+ githubId = 506181;
name = "Peter Marheine";
};
tavyc = {
email = "octavian.cerna@gmail.com";
github = "tavyc";
+ githubId = 3650609;
name = "Octavian Cerna";
};
tazjin = {
email = "mail@tazj.in";
github = "tazjin";
+ githubId = 1552853;
name = "Vincent Ambo";
};
tbenst = {
email = "nix@tylerbenster.com";
github = "tbenst";
+ githubId = 863327;
name = "Tyler Benster";
};
teh = {
email = "tehunger@gmail.com";
github = "teh";
+ githubId = 139251;
name = "Tom Hunger";
};
telotortium = {
email = "rirelan@gmail.com";
github = "telotortium";
+ githubId = 1755789;
name = "Robert Irelan";
};
teozkr = {
email = "teo@nullable.se";
github = "teozkr";
+ githubId = 649832;
name = "Teo Klestrup Röijezon";
};
terlar = {
email = "terlar@gmail.com";
github = "terlar";
+ githubId = 280235;
name = "Terje Larsen";
};
tesq0 = {
@@ -5241,26 +6488,31 @@
tex = {
email = "milan.svoboda@centrum.cz";
github = "tex";
+ githubId = 27386;
name = "Milan Svoboda";
};
tg-x = {
email = "*@tg-x.net";
github = "tg-x";
+ githubId = 378734;
name = "TG ⊗ Θ";
};
thall = {
email = "niclas.thall@gmail.com";
github = "thall";
+ githubId = 102452;
name = "Niclas Thall";
};
thammers = {
email = "jawr@gmx.de";
github = "tobias-hammerschmidt";
+ githubId = 2543259;
name = "Tobias Hammerschmidt";
};
thanegill = {
email = "me@thanegill.com";
github = "thanegill";
+ githubId = 1141680;
name = "Thane Gill";
};
the-kenny = {
@@ -5271,16 +6523,19 @@
thedavidmeister = {
email = "thedavidmeister@gmail.com";
github = "thedavidmeister";
+ githubId = 629710;
name = "David Meister";
};
thefloweringash = {
email = "lorne@cons.org.nz";
github = "thefloweringash";
+ githubId = 42933;
name = "Andrew Childs";
};
thesola10 = {
email = "thesola10@bobile.fr";
github = "thesola10";
+ githubId = 7287268;
keys = [{
longkeyid = "rsa4096/0x89245619BEBB95BA";
fingerprint = "1D05 13A6 1AC4 0D8D C6D6 5F2C 8924 5619 BEBB 95BA";
@@ -5290,31 +6545,43 @@
theuni = {
email = "ct@flyingcircus.io";
github = "ctheune";
+ githubId = 1220572;
name = "Christian Theune";
};
thiagokokada = {
email = "thiagokokada@gmail.com";
github = "thiagokokada";
+ githubId = 844343;
name = "Thiago K. Okada";
};
ThomasMader = {
email = "thomas.mader@gmail.com";
github = "ThomasMader";
+ githubId = 678511;
name = "Thomas Mader";
};
thoughtpolice = {
email = "aseipp@pobox.com";
github = "thoughtpolice";
+ githubId = 3416;
name = "Austin Seipp";
};
thpham = {
email = "thomas.pham@ithings.ch";
github = "thpham";
+ githubId = 224674;
name = "Thomas Pham";
};
+ Thra11 = {
+ email = "tahall256@protonmail.ch";
+ github = "Thra11";
+ githubId = 1391883;
+ name = "Tom Hall";
+ };
tilpner = {
email = "till@hoeppner.ws";
github = "tilpner";
+ githubId = 4322055;
name = "Till Höppner";
};
timbertson = {
@@ -5325,31 +6592,37 @@
timokau = {
email = "timokau@zoho.com";
github = "timokau";
+ githubId = 3799330;
name = "Timo Kaufmann";
};
timor = {
email = "timor.dd@googlemail.com";
github = "timor";
+ githubId = 174156;
name = "timor";
};
timput = {
email = "tim@timput.com";
github = "TimPut";
+ githubId = 2845239;
name = "Tim Put";
};
tiramiseb = {
email = "sebastien@maccagnoni.eu";
github = "tiramiseb";
+ githubId = 1292007;
name = "Sébastien Maccagnoni";
};
titanous = {
email = "jonathan@titanous.com";
github = "titanous";
+ githubId = 13026;
name = "Jonathan Rudenberg";
};
tmplt = {
email = "tmplt@dragons.rocks";
github = "tmplt";
+ githubId = 6118602;
name = "Viktor";
};
tnias = {
@@ -5359,67 +6632,80 @@
};
tobim = {
email = "nix@tobim.fastmail.fm";
- github = "tobimpub";
+ github = "tobim";
+ githubId = 858790;
name = "Tobias Mayer";
};
tobiasBora = {
email = "tobias.bora.list@gmail.com";
github = "tobiasBora";
+ githubId = 2164118;
name = "Tobias Bora";
};
tohl = {
email = "tom@logand.com";
github = "tohl";
+ githubId = 12159013;
name = "Tomas Hlavaty";
};
tokudan = {
email = "git@danielfrank.net";
github = "tokudan";
+ githubId = 692610;
name = "Daniel Frank";
};
tomahna = {
email = "kevin.rauscher@tomahna.fr";
github = "Tomahna";
+ githubId = 8577941;
name = "Kevin Rauscher";
};
tomberek = {
email = "tomberek@gmail.com";
github = "tomberek";
+ githubId = 178444;
name = "Thomas Bereknyei";
};
tomsmeets = {
email = "tom.tsmeets@gmail.com";
github = "tomsmeets";
+ githubId = 6740669;
name = "Tom Smeets";
};
toonn = {
email = "nnoot@toonn.io";
github = "toonn";
+ githubId = 1486805;
name = "Toon Nolten";
};
travisbhartwell = {
email = "nafai@travishartwell.net";
github = "travisbhartwell";
+ githubId = 10110;
name = "Travis B. Hartwell";
};
treemo = {
email = "matthieu.chevrier@treemo.fr";
github = "treemo";
+ githubId = 207457;
name = "Matthieu Chevrier";
};
trevorj = {
email = "nix@trevor.joynson.io";
github = "akatrevorjay";
+ githubId = 1312290;
name = "Trevor Joynson";
};
trino = {
email = "muehlhans.hubert@ekodia.de";
github = "hmuehlhans";
+ githubId = 9870613;
name = "Hubert Mühlhans";
};
troydm = {
email = "d.geurkov@gmail.com";
github = "troydm";
+ githubId = 483735;
name = "Dmitry Geurkov";
};
tstrobel = {
@@ -5429,11 +6715,13 @@
ttuegel = {
email = "ttuegel@mailbox.org";
github = "ttuegel";
+ githubId = 563054;
name = "Thomas Tuegel";
};
tv = {
email = "tv@krebsco.de";
github = "4z3";
+ githubId = 427872;
name = "Tomislav Viljetić";
};
tvestelind = {
@@ -5444,6 +6732,7 @@
tvorog = {
email = "marszaripov@gmail.com";
github = "tvorog";
+ githubId = 1325161;
name = "Marsel Zaripov";
};
tweber = {
@@ -5460,6 +6749,7 @@
name = "Tyson Whitehead";
email = "twhitehead@gmail.com";
github = "twhitehead";
+ githubId = 787843;
keys = [{
longkeyid = "rsa2048/0x594258F0389D2802";
fingerprint = "E631 8869 586F 99B4 F6E6 D785 5942 58F0 389D 2802";
@@ -5468,41 +6758,49 @@
typetetris = {
email = "ericwolf42@mail.com";
github = "typetetris";
+ githubId = 1983821;
name = "Eric Wolf";
};
udono = {
email = "udono@virtual-things.biz";
github = "udono";
+ githubId = 347983;
name = "Udo Spallek";
};
unode = {
email = "alves.rjc@gmail.com";
github = "unode";
+ githubId = 122319;
name = "Renato Alves";
};
uralbash = {
email = "root@uralbash.ru";
github = "uralbash";
+ githubId = 619015;
name = "Svintsov Dmitry";
};
uri-canva = {
email = "uri@canva.com";
github = "uri-canva";
+ githubId = 33242106;
name = "Uri Baghin";
};
uskudnik = {
email = "urban.skudnik@gmail.com";
github = "uskudnik";
+ githubId = 120451;
name = "Urban Skudnik";
};
utdemir = {
email = "me@utdemir.com";
github = "utdemir";
+ githubId = 928084;
name = "Utku Demir";
};
uvnikita = {
email = "uv.nikita@gmail.com";
github = "uvNikita";
+ githubId = 1084748;
name = "Nikita Uvarov";
};
uwap = {
@@ -5513,13 +6811,21 @@
va1entin = {
email = "github@valentinsblog.com";
github = "va1entin";
+ githubId = 31535155;
name = "Valentin Heidelberger";
};
vaibhavsagar = {
email = "vaibhavsagar@gmail.com";
github = "vaibhavsagar";
+ githubId = 1525767;
name = "Vaibhav Sagar";
};
+ valebes = {
+ email = "valebes@gmail.com";
+ github = "valebes";
+ githubid = 10956211;
+ name = "Valerio Besozzi";
+ };
valeriangalliat = {
email = "val@codejam.info";
github = "valeriangalliat";
@@ -5528,37 +6834,44 @@
vandenoever = {
email = "jos@vandenoever.info";
github = "vandenoever";
+ githubId = 608417;
name = "Jos van den Oever";
};
vanschelven = {
email = "klaas@vanschelven.com";
github = "vanschelven";
+ githubId = 223833;
name = "Klaas van Schelven";
};
vanzef = {
email = "vanzef@gmail.com";
github = "vanzef";
+ githubId = 12428837;
name = "Ivan Solyankin";
};
varunpatro = {
email = "varun.kumar.patro@gmail.com";
github = "varunpatro";
+ githubId = 6943308;
name = "Varun Patro";
};
vbgl = {
email = "Vincent.Laporte@gmail.com";
github = "vbgl";
+ githubId = 2612464;
name = "Vincent Laporte";
};
vbmithr = {
email = "vb@luminar.eu.org";
github = "vbmithr";
+ githubId = 797581;
name = "Vincent Bernardoff";
};
vcunat = {
name = "Vladimír Čunát";
email = "v@cunat.cz"; # vcunat@gmail.com predominated in commits before 2019/03
github = "vcunat";
+ githubId = 1785925;
keys = [{
longkeyid = "rsa4096/0xE747DF1F9575A3AA";
fingerprint = "B600 6460 B60A 80E7 8206 2449 E747 DF1F 9575 A3AA";
@@ -5567,31 +6880,47 @@
vdemeester = {
email = "vincent@sbr.pm";
github = "vdemeester";
+ githubId = 6508;
name = "Vincent Demeester";
};
velovix = {
email = "xaviosx@gmail.com";
github = "velovix";
+ githubId = 2856634;
name = "Tyler Compton";
};
veprbl = {
email = "veprbl@gmail.com";
github = "veprbl";
+ githubId = 245573;
name = "Dmitry Kalinkin";
};
vidbina = {
email = "vid@bina.me";
github = "vidbina";
+ githubId = 335406;
name = "David Asabina";
};
vifino = {
email = "vifino@tty.sh";
github = "vifino";
+ githubId = 5837359;
name = "Adrian Pistol";
};
+ vika_nezrimaya = {
+ email = "vika@fireburn.ru";
+ github = "kisik21";
+ githubId = 7953163;
+ name = "Vika Shleina";
+ keys = [{
+ longkeyid = "rsa4096/0x5402B9B5497BACDB";
+ fingerprint = "A03C D09C 36CF D9F6 1ADF AF11 5402 B9B5 497B ACDB";
+ }];
+ };
vinymeuh = {
email = "vinymeuh@gmail.com";
github = "vinymeuh";
+ githubId = 118959;
name = "VinyMeuh";
};
viric = {
@@ -5599,6 +6928,12 @@
github = "viric";
name = "Lluís Batlle i Rossell";
};
+ virusdave = {
+ email = "dave.nicponski@gmail.com";
+ github = "virusdave";
+ githubId = 6148271;
+ name = "Dave Nicponski";
+ };
vizanto = {
email = "danny@prime.vc";
github = "vizanto";
@@ -5607,21 +6942,25 @@
vklquevs = {
email = "vklquevs@gmail.com";
github = "vklquevs";
+ githubId = 1771234;
name = "vklquevs";
};
vlaci = {
email = "laszlo.vasko@outlook.com";
github = "vlaci";
+ githubId = 1771332;
name = "László Vaskó";
};
vlstill = {
email = "xstill@fi.muni.cz";
github = "vlstill";
+ githubId = 4070422;
name = "Vladimír Štill";
};
vmandela = {
email = "venkat.mandela@gmail.com";
github = "vmandela";
+ githubId = 849772;
name = "Venkateswara Rao Mandela";
};
vmchale = {
@@ -5632,11 +6971,13 @@
volhovm = {
email = "volhovm.cs@gmail.com";
github = "volhovm";
+ githubId = 5604643;
name = "Mikhail Volkhov";
};
volth = {
email = "jaroslavas@volth.com";
github = "volth";
+ githubId = 508305;
name = "Jaroslavas Pocepko";
};
vozz = {
@@ -5646,31 +6987,37 @@
vrthra = {
email = "rahul@gopinath.org";
github = "vrthra";
+ githubId = 70410;
name = "Rahul Gopinath";
};
vskilet = {
email = "victor@sene.ovh";
github = "vskilet";
+ githubId = 7677567;
name = "Victor SENE";
};
vyorkin = {
email = "vasiliy.yorkin@gmail.com";
github = "vyorkin";
+ githubId = 988849;
name = "Vasiliy Yorkin";
};
vyp = {
email = "elisp.vim@gmail.com";
github = "vyp";
+ githubId = 3889405;
name = "vyp";
};
waynr = {
name = "Wayne Warren";
email = "wayne.warren.s@gmail.com";
github = "waynr";
+ githubId = 1441126;
};
wchresta = {
email = "wchresta.nix@chrummibei.ch";
github = "wchresta";
+ githubId = 34962284;
name = "wchresta";
};
wedens = {
@@ -5680,6 +7027,7 @@
willibutz = {
email = "willibutz@posteo.de";
github = "willibutz";
+ githubId = 20464732;
name = "Willi Butz";
};
willtim = {
@@ -5693,36 +7041,43 @@
winpat = {
email = "patrickwinter@posteo.ch";
github = "winpat";
+ githubId = 6016963;
name = "Patrick Winter";
};
wizeman = {
email = "rcorreia@wizy.org";
github = "wizeman";
+ githubId = 168610;
name = "Ricardo M. Correia";
};
wjlroe = {
email = "willroe@gmail.com";
github = "wjlroe";
+ githubId = 43315;
name = "William Roe";
};
wmertens = {
email = "Wout.Mertens@gmail.com";
github = "wmertens";
+ githubId = 54934;
name = "Wout Mertens";
};
woffs = {
email = "github@woffs.de";
github = "woffs";
+ githubId = 895853;
name = "Frank Doepper";
};
womfoo = {
email = "kranium@gikos.net";
github = "womfoo";
+ githubId = 1595132;
name = "Kranium Gikos Mendoza";
};
worldofpeace = {
email = "worldofpeace@protonmail.ch";
github = "worldofpeace";
+ githubId = 28888242;
name = "Worldofpeace";
};
wscott = {
@@ -5733,33 +7088,45 @@
wucke13 = {
email = "info@wucke13.de";
github = "wucke13";
+ githubId = 20400405;
name = "Wucke";
};
wykurz = {
email = "wykurz@gmail.com";
github = "wykurz";
+ githubId = 483465;
name = "Mateusz Wykurz";
};
wyvie = {
email = "elijahrum@gmail.com";
github = "wyvie";
+ githubId = 3992240;
name = "Elijah Rum";
};
xaverdh = {
email = "hoe.dom@gmx.de";
github = "xaverdh";
+ githubId = 11050617;
name = "Dominik Xaver Hörl";
};
xbreak = {
email = "xbreak@alphaware.se";
github = "xbreak";
+ githubId = 13489144;
name = "Calle Rosenquist";
};
xeji = {
email = "xeji@cat3.de";
github = "xeji";
+ githubId = 36407913;
name = "Uli Baum";
};
+ xfix = {
+ email = "konrad@borowski.pw";
+ github = "xfix";
+ githubId = 1297598;
+ name = "Konrad Borowski";
+ };
xnaveira = {
email = "xnaveira@gmail.com";
github = "xnaveira";
@@ -5768,31 +7135,37 @@
xnwdd = {
email = "nwdd+nixos@no.team";
github = "xnwdd";
+ githubId = 3028542;
name = "Guillermo NWDD";
};
xrelkd = {
email = "46590321+xrelkd@users.noreply.github.com";
github = "xrelkd";
+ githubId = 46590321;
name = "xrelkd";
};
xurei = {
email = "olivier.bourdoux@gmail.com";
github = "xurei";
+ githubId = 621695;
name = "Olivier Bourdoux";
};
xvapx = {
email = "marti.serra.coscollano@gmail.com";
github = "xvapx";
+ githubId = 11824817;
name = "Marti Serra";
};
xwvvvvwx = {
email = "davidterry@posteo.de";
github = "xwvvvvwx";
+ githubId = 6689924;
name = "David Terry";
};
xzfc = {
email = "xzfcpw@gmail.com";
github = "xzfc";
+ githubId = 5121426;
name = "Albert Safin";
};
y0no = {
@@ -5803,71 +7176,91 @@
yarny = {
email = "41838844+Yarny0@users.noreply.github.com";
github = "Yarny0";
+ githubId = 41838844;
name = "Yarny";
};
yarr = {
email = "savraz@gmail.com";
github = "Eternity-Yarr";
+ githubId = 3705333;
name = "Dmitry V.";
};
yegortimoshenko = {
email = "yegortimoshenko@riseup.net";
github = "yegortimoshenko";
+ githubId = 1643293;
name = "Yegor Timoshenko";
};
yesbox = {
email = "jesper.geertsen.jonsson@gmail.com";
github = "yesbox";
+ githubId = 4113027;
name = "Jesper Geertsen Jonsson";
};
ylwghst = {
email = "ylwghst@onionmail.info";
github = "ylwghst";
+ githubId = 26011724;
name = "Burim Augustin Berisa";
};
yochai = {
email = "yochai@titat.info";
github = "yochai";
+ githubId = 1322201;
name = "Yochai";
};
yorickvp = {
email = "yorickvanpelt@gmail.com";
github = "yorickvp";
+ githubId = 647076;
name = "Yorick van Pelt";
};
yrashk = {
email = "yrashk@gmail.com";
github = "yrashk";
+ githubId = 452;
name = "Yurii Rashkovskii";
};
ysndr = {
email = "me@ysndr.de";
github = "ysndr";
+ githubId = 7040031;
name = "Yannik Sander";
};
yuriaisaka = {
email = "yuri.aisaka+nix@gmail.com";
github = "yuriaisaka";
+ githubId = 687198;
name = "Yuri Aisaka";
};
yurrriq = {
email = "eric@ericb.me";
github = "yurrriq";
+ githubId = 1866448;
name = "Eric Bailey";
};
+ yvt = {
+ email = "i@yvt.jp";
+ github = "yvt";
+ githubId = 5253988;
+ name = "yvt";
+ };
z77z = {
email = "maggesi@math.unifi.it";
github = "maggesi";
+ githubId = 1809783;
name = "Marco Maggesi";
};
zachcoyle = {
email = "zach.coyle@gmail.com";
github = "zachcoyle";
+ githubId = 908716;
name = "Zach Coyle";
};
zagy = {
email = "cz@flyingcircus.io";
github = "zagy";
+ githubId = 568532;
name = "Christian Zagrodnick";
};
zalakain = {
@@ -5878,16 +7271,19 @@
zaninime = {
email = "francesco@zanini.me";
github = "zaninime";
+ githubId = 450885;
name = "Francesco Zanini";
};
zarelit = {
email = "david@zarel.net";
github = "zarelit";
+ githubId = 3449926;
name = "David Costa";
};
zauberpony = {
email = "elmar@athmer.org";
github = "zauberpony";
+ githubId = 250877;
name = "Elmar Athmer";
};
zef = {
@@ -5897,61 +7293,73 @@
zgrannan = {
email = "zgrannan@gmail.com";
github = "zgrannan";
+ githubId = 1141948;
name = "Zack Grannan";
};
zimbatm = {
email = "zimbatm@zimbatm.com";
github = "zimbatm";
+ githubId = 3248;
name = "zimbatm";
};
Zimmi48 = {
email = "theo.zimmermann@univ-paris-diderot.fr";
github = "Zimmi48";
+ githubId = 1108325;
name = "Théo Zimmermann";
};
zohl = {
email = "zohl@fmap.me";
github = "zohl";
+ githubId = 6067895;
name = "Al Zohali";
};
zookatron = {
email = "tim@zookatron.com";
github = "zookatron";
+ githubId = 1772064;
name = "Tim Zook";
};
zoomulator = {
email = "zoomulator@gmail.com";
github = "zoomulator";
+ githubId = 1069303;
name = "Kim Simmons";
};
zraexy = {
email = "zraexy@gmail.com";
github = "zraexy";
+ githubId = 8100652;
name = "David Mell";
};
zx2c4 = {
email = "Jason@zx2c4.com";
github = "zx2c4";
+ githubId = 10643;
name = "Jason A. Donenfeld";
};
zzamboni = {
email = "diego@zzamboni.org";
github = "zzamboni";
+ githubId = 32876;
name = "Diego Zamboni";
};
turbomack = {
email = "marek.faj@gmail.com";
github = "turboMaCk";
+ githubId = 2130305;
name = "Marek Fajkus";
};
melling = {
email = "mattmelling@fastmail.com";
github = "mattmelling";
+ githubId = 1215331;
name = "Matt Melling";
};
wd15 = {
email = "daniel.wheeler2@gmail.com";
github = "wd15";
+ githubId = 1986844;
name = "Daniel Wheeler";
};
}
diff --git a/maintainers/scripts/hydra-eval-failures.py b/maintainers/scripts/hydra-eval-failures.py
index 23669502e46d..6e7ec2dbc002 100755
--- a/maintainers/scripts/hydra-eval-failures.py
+++ b/maintainers/scripts/hydra-eval-failures.py
@@ -11,13 +11,15 @@ import click
import requests
from pyquery import PyQuery as pq
+def map_dict (f, d):
+ for k,v in d.items():
+ d[k] = f(v)
maintainers_json = subprocess.check_output([
- 'nix-instantiate', '-E', 'import ./maintainers/maintainer-list.nix {}', '--eval', '--json'
+ 'nix-instantiate', '-A', 'lib.maintainers', '--eval', '--strict', '--json'
])
maintainers = json.loads(maintainers_json)
-MAINTAINERS = {v: k for k, v in maintainers.items()}
-
+MAINTAINERS = map_dict(lambda v: v.get('github', None), maintainers)
def get_response_text(url):
return pq(requests.get(url).text) # IO
@@ -38,30 +40,39 @@ def get_maintainers(attr_name):
'-A',
'.'.join(nixname[1:]) + '.meta',
EVAL_FILE[nixname[0]],
+ '--arg',
+ 'nixpkgs',
+ './.',
'--json'])
meta = json.loads(meta_json)
- if meta.get('maintainers'):
- return [MAINTAINERS[name] for name in meta['maintainers'] if MAINTAINERS.get(name)]
+ return meta.get('maintainers', [])
except:
return []
+def filter_github_users(maintainers):
+ github_only = []
+ for i in maintainers:
+ if i.get('github'):
+ github_only.append(i)
+ return github_only
+
def print_build(table_row):
a = pq(table_row)('a')[1]
print("- [ ] [{}]({})".format(a.text, a.get('href')), flush=True)
-
- maintainers = get_maintainers(a.text)
- if maintainers:
- print(" - maintainers: {}".format(", ".join(map(lambda u: '@' + u, maintainers))))
+
+ job_maintainers = filter_github_users(get_maintainers(a.text))
+ if job_maintainers:
+ print(" - maintainers: {}".format(" ".join(map(lambda u: '@' + u.get('github'), job_maintainers))))
# TODO: print last three persons that touched this file
# TODO: pinpoint the diff that broke this build, or maybe it's transient or maybe it never worked?
-
+
sys.stdout.flush()
@click.command()
@click.option(
'--jobset',
- default="nixos/release-17.09",
- help='Hydra project like nixos/release-17.09')
+ default="nixos/release-19.09",
+ help='Hydra project like nixos/release-19.09')
def cli(jobset):
"""
Given a Hydra project, inspect latest evaluation
@@ -93,6 +104,7 @@ def cli(jobset):
print_build(tr)
+
if __name__ == "__main__":
try:
cli()
diff --git a/maintainers/scripts/luarocks-config.lua b/maintainers/scripts/luarocks-config.lua
new file mode 100644
index 000000000000..89e74c00ea8e
--- /dev/null
+++ b/maintainers/scripts/luarocks-config.lua
@@ -0,0 +1,4 @@
+rocks_servers = {
+ "https://luarocks.org"
+}
+version_check_on_fail = false
diff --git a/maintainers/scripts/luarocks-packages.csv b/maintainers/scripts/luarocks-packages.csv
index 2039af5165a0..1b9dafa25df9 100644
--- a/maintainers/scripts/luarocks-packages.csv
+++ b/maintainers/scripts/luarocks-packages.csv
@@ -1,4 +1,5 @@
# nix name, luarocks name, server, version,luaversion,maintainers
+alt-getopt,,,,,arobyn
ansicolors,,,,,
argparse,,,,,
basexx,,,,,
@@ -17,6 +18,7 @@ http,,,,,vcunat
inspect,,,,,
ldoc,,,,,
lgi,,,,,
+ljsyscall,,,,lua5_1,lblasc
lpeg,,,,,vyp
lpeg_patterns,,,,,
lpeglabel,,,,,
@@ -35,6 +37,7 @@ lua-zlib,,,,,koral
lua_cliargs,,,,,
luabitop,,,,,
luacheck,,,,,
+luacov,,,,,
luadbi,,,,,
luadbi-mysql,,,,,
luadbi-postgresql,,,,,
@@ -50,12 +53,15 @@ luasocket,,,,,
luasql-sqlite3,,,,,vyp
luassert,,,,,
luasystem,,,,,
+luautf8,,,,,pstn
luazip,,,,,
+lua-yajl,,,,,pstn
luuid,,,,,
luv,,,,,
markdown,,,,,
mediator_lua,,,,,
mpack,,,,,
+moonscript,,,,,arobyn
nvim-client,,,,,
penlight,,,,,
rapidjson,,,,,
@@ -63,3 +69,4 @@ say,,,,,
std__debug,std._debug,,,,
std_normalize,std.normalize,,,,
stdlib,,,,,vyp
+pulseaudio,,,,,doronbehar
diff --git a/maintainers/scripts/nix-generate-from-cpan.pl b/maintainers/scripts/nix-generate-from-cpan.pl
index 2dda39fd12e1..e04d3713e9a1 100755
--- a/maintainers/scripts/nix-generate-from-cpan.pl
+++ b/maintainers/scripts/nix-generate-from-cpan.pl
@@ -226,7 +226,7 @@ sub pkg_to_attr {
sub get_pkg_name {
my ($module) = @_;
- return $module->package_name . '-' . $module->package_version;
+ return ( $module->package_name, $module->package_version =~ s/^v(\d)/$1/r );
}
sub read_meta {
@@ -375,13 +375,13 @@ die "module $module_name not found\n" if scalar @modules == 0;
die "multiple packages that match module $module_name\n" if scalar @modules > 1;
my $module = $modules[0];
-my $pkg_name = get_pkg_name $module;
+my ($pkg_name, $pkg_version) = get_pkg_name $module;
my $attr_name = pkg_to_attr $module;
INFO( "attribute name: ", $attr_name );
INFO( "module: ", $module->module );
INFO( "version: ", $module->version );
-INFO( "package: ", $module->package, " (", $pkg_name, ", ", $attr_name, ")" );
+INFO( "package: ", $module->package, " (", "$pkg_name-$pkg_version", ", ", $attr_name, ")" );
INFO( "path: ", $module->path );
my $tar_path = $module->fetch();
@@ -436,10 +436,11 @@ my $build_fun = -e "$pkg_path/Build.PL"
print STDERR "===\n";
print <${1:?usage: $0 }
cat <
Apart from high-level options, it’s possible to tweak a package in almost
arbitrary ways, such as changing or disabling dependencies of a package. For
- instance, the Emacs package in Nixpkgs by default has a dependency on GTK+ 2.
- If you want to build it against GTK+ 3, you can specify that as follows:
+ instance, the Emacs package in Nixpkgs by default has a dependency on GTK 2.
+ If you want to build it against GTK 3, you can specify that as follows:
= [ (pkgs.emacs.override { gtk = pkgs.gtk3; }) ];
@@ -33,7 +33,7 @@
function that produces Emacs, with the original arguments amended by the set
of arguments specified by you. So here the function argument
gtk gets the value pkgs.gtk3, causing
- Emacs to depend on GTK+ 3. (The parentheses are necessary because in Nix,
+ Emacs to depend on GTK 3. (The parentheses are necessary because in Nix,
function application binds more weakly than list construction, so without
them, would be a list with
two elements.)
diff --git a/nixos/doc/manual/configuration/profiles/clone-config.xml b/nixos/doc/manual/configuration/profiles/clone-config.xml
index 234835845e2d..04fa1643d0fd 100644
--- a/nixos/doc/manual/configuration/profiles/clone-config.xml
+++ b/nixos/doc/manual/configuration/profiles/clone-config.xml
@@ -11,4 +11,11 @@
creating the image in the first place. As a result it allows users to edit
and rebuild the live-system.
+
+
+ On images where the installation media also becomes an installation target,
+ copying over configuration.nix should be disabled by
+ setting installer.cloneConfig to false.
+ For example, this is done in sd-image-aarch64.nix.
+
diff --git a/nixos/doc/manual/configuration/profiles/installation-device.xml b/nixos/doc/manual/configuration/profiles/installation-device.xml
index 3dcdf403d89d..192ae955b689 100644
--- a/nixos/doc/manual/configuration/profiles/installation-device.xml
+++ b/nixos/doc/manual/configuration/profiles/installation-device.xml
@@ -6,33 +6,31 @@
Installation Device
- Provides a basic configuration for installation devices like CDs. This means
- enabling hardware scans, using the
- Clone Config profile to guarantee
- /etc/nixos/configuration.nix exists (for
- nixos-rebuild to work), a copy of the Nixpkgs channel
- snapshot used to create the install media.
+ Provides a basic configuration for installation devices like CDs.
+ This enables redistributable firmware, includes the
+ Clone Config profile
+ and a copy of the Nixpkgs channel, so nixos-install
+ works out of the box.
-
- Additionally, documentation for
- Nixpkgs and NixOS
- are forcefully enabled (to override the
+ Documentation for Nixpkgs
+ and NixOS are
+ forcefully enabled (to override the
Minimal profile preference); the
- NixOS manual is shown automatically on TTY 8, sudo and udisks are disabled.
- Autologin is enabled as root.
+ NixOS manual is shown automatically on TTY 8, udisks is disabled.
+ Autologin is enabled as nixos user, while passwordless
+ login as both root and nixos is possible.
+ Passwordless sudo is enabled too.
+ wpa_supplicant is
+ enabled, but configured to not autostart.
+
+
+ It is explained how to login, start the ssh server, and if available,
+ how to start the display manager.
- A message is shown to the user to start a display manager if needed, ssh with
- are enabled (but
- doesn't autostart). WPA Supplicant is also enabled without autostart.
-
-
-
- Finally, vim is installed, root is set to not have a password, the kernel is
- made more silent for remote public IP installs, and several settings are
- tweaked so that the installer has a better chance of succeeding under
- low-memory environments.
+ Several settings are tweaked so that the installer has a better chance of
+ succeeding under low-memory environments.
diff --git a/nixos/doc/manual/configuration/wireless.xml b/nixos/doc/manual/configuration/wireless.xml
index 9c0e3a8d7aa4..247d29d58314 100644
--- a/nixos/doc/manual/configuration/wireless.xml
+++ b/nixos/doc/manual/configuration/wireless.xml
@@ -19,10 +19,17 @@
NixOS lets you specify networks for wpa_supplicant declaratively:
= {
- echelon = {
+ echelon = { # SSID with no spaces or special characters
psk = "abcdefgh";
};
- "free.wifi" = {};
+ "echelon's AP" = { # SSID with spaces and/or special characters
+ psk = "ijklmnop";
+ };
+ echelon = { # Hidden SSID
+ hidden = true;
+ psk = "qrstuvwx";
+ };
+ free.wifi = {}; # Public wireless network
};
Be aware that keys will be written to the nix store in plaintext! When no
diff --git a/nixos/doc/manual/configuration/x-windows.xml b/nixos/doc/manual/configuration/x-windows.xml
index 7cdc5196e0d2..f6f659b02afa 100644
--- a/nixos/doc/manual/configuration/x-windows.xml
+++ b/nixos/doc/manual/configuration/x-windows.xml
@@ -279,6 +279,12 @@ xkb_symbols "media"
= "setxkbmap -keycodes media";
+
+ If you are manually starting the X server, you should set the argument
+ -xkbdir /etc/X11/xkb, otherwise X won't find your layout files.
+ For example with xinit run
+ $ xinit -- -xkbdir /etc/X11/xkb
+
To learn how to write layouts take a look at the XKB
diff --git a/nixos/doc/manual/default.nix b/nixos/doc/manual/default.nix
index 7fc0ad702f84..f9de2db1a084 100644
--- a/nixos/doc/manual/default.nix
+++ b/nixos/doc/manual/default.nix
@@ -5,55 +5,6 @@ with pkgs;
let
lib = pkgs.lib;
- # Remove invisible and internal options.
- optionsListVisible = lib.filter (opt: opt.visible && !opt.internal) (lib.optionAttrSetToDocList options);
-
- # Replace functions by the string
- substFunction = x:
- if builtins.isAttrs x then lib.mapAttrs (name: substFunction) x
- else if builtins.isList x then map substFunction x
- else if lib.isFunction x then ""
- else x;
-
- # Generate DocBook documentation for a list of packages. This is
- # what `relatedPackages` option of `mkOption` from
- # ../../../lib/options.nix influences.
- #
- # Each element of `relatedPackages` can be either
- # - a string: that will be interpreted as an attribute name from `pkgs`,
- # - a list: that will be interpreted as an attribute path from `pkgs`,
- # - an attrset: that can specify `name`, `path`, `package`, `comment`
- # (either of `name`, `path` is required, the rest are optional).
- genRelatedPackages = packages:
- let
- unpack = p: if lib.isString p then { name = p; }
- else if lib.isList p then { path = p; }
- else p;
- describe = args:
- let
- title = args.title or null;
- name = args.name or (lib.concatStringsSep "." args.path);
- path = args.path or [ args.name ];
- package = args.package or (lib.attrByPath path (throw "Invalid package attribute path `${toString path}'") pkgs);
- in ""
- + "${lib.optionalString (title != null) "${title} aka "}pkgs.${name} (${package.meta.name})"
- + lib.optionalString (!package.meta.available) " [UNAVAILABLE]"
- + ": ${package.meta.description or "???"}."
- + lib.optionalString (args ? comment) "\n${args.comment}"
- # Lots of `longDescription's break DocBook, so we just wrap them into
- + lib.optionalString (package.meta ? longDescription) "\n${package.meta.longDescription}"
- + "";
- in "${lib.concatStringsSep "\n" (map (p: describe (unpack p)) packages)}";
-
- optionsListDesc = lib.flip map optionsListVisible (opt: opt // {
- # Clean up declaration sites to not refer to the NixOS source tree.
- declarations = map stripAnyPrefixes opt.declarations;
- }
- // lib.optionalAttrs (opt ? example) { example = substFunction opt.example; }
- // lib.optionalAttrs (opt ? default) { default = substFunction opt.default; }
- // lib.optionalAttrs (opt ? type) { type = substFunction opt.type; }
- // lib.optionalAttrs (opt ? relatedPackages && opt.relatedPackages != []) { relatedPackages = genRelatedPackages opt.relatedPackages; });
-
# We need to strip references to /nix/store/* from options,
# including any `extraSources` if some modules came from elsewhere,
# or else the build will fail.
@@ -63,37 +14,13 @@ let
prefixesToStrip = map (p: "${toString p}/") ([ ../../.. ] ++ extraSources);
stripAnyPrefixes = lib.flip (lib.fold lib.removePrefix) prefixesToStrip;
- # Custom "less" that pushes up all the things ending in ".enable*"
- # and ".package*"
- optionLess = a: b:
- let
- ise = lib.hasPrefix "enable";
- isp = lib.hasPrefix "package";
- cmp = lib.splitByAndCompare ise lib.compare
- (lib.splitByAndCompare isp lib.compare lib.compare);
- in lib.compareLists cmp a.loc b.loc < 0;
-
- # Customly sort option list for the man page.
- optionsList = lib.sort optionLess optionsListDesc;
-
- # Convert the list of options into an XML file.
- optionsXML = builtins.toFile "options.xml" (builtins.toXML optionsList);
-
- optionsDocBook = runCommand "options-db.xml" {} ''
- optionsXML=${optionsXML}
- if grep /nixpkgs/nixos/modules $optionsXML; then
- echo "The manual appears to depend on the location of Nixpkgs, which is bad"
- echo "since this prevents sharing via the NixOS channel. This is typically"
- echo "caused by an option default that refers to a relative path (see above"
- echo "for hints about the offending path)."
- exit 1
- fi
- ${buildPackages.libxslt.bin}/bin/xsltproc \
- --stringparam revision '${revision}' \
- -o intermediate.xml ${./options-to-docbook.xsl} $optionsXML
- ${buildPackages.libxslt.bin}/bin/xsltproc \
- -o "$out" ${./postprocess-option-descriptions.xsl} intermediate.xml
- '';
+ optionsDoc = buildPackages.nixosOptionsDoc {
+ inherit options revision;
+ transformOptions = opt: opt // {
+ # Clean up declaration sites to not refer to the NixOS source tree.
+ declarations = map stripAnyPrefixes opt.declarations;
+ };
+ };
sources = lib.sourceFilesBySuffices ./. [".xml"];
@@ -108,7 +35,7 @@ let
generatedSources = runCommand "generated-docbook" {} ''
mkdir $out
ln -s ${modulesDoc} $out/modules.xml
- ln -s ${optionsDocBook} $out/options-db.xml
+ ln -s ${optionsDoc.optionsDocBook} $out/options-db.xml
printf "%s" "${version}" > $out/version
'';
@@ -234,22 +161,7 @@ let
in rec {
inherit generatedSources;
- # The NixOS options in JSON format.
- optionsJSON = runCommand "options-json"
- { meta.description = "List of NixOS options in JSON format";
- }
- ''
- # Export list of options in different format.
- dst=$out/share/doc/nixos
- mkdir -p $dst
-
- cp ${builtins.toFile "options.json" (builtins.unsafeDiscardStringContext (builtins.toJSON
- (builtins.listToAttrs (map (o: { name = o.name; value = removeAttrs o ["name" "visible" "internal"]; }) optionsList))))
- } $dst/options.json
-
- mkdir -p $out/nix-support
- echo "file json $dst/options.json" >> $out/nix-support/hydra-build-products
- ''; # */
+ inherit (optionsDoc) optionsJSON optionsXML optionsDocBook;
# Generate the NixOS manual.
manualHTML = runCommand "nixos-manual-html"
diff --git a/nixos/doc/manual/development/option-types.xml b/nixos/doc/manual/development/option-types.xml
index 069cc36573d8..8fcbb627342b 100644
--- a/nixos/doc/manual/development/option-types.xml
+++ b/nixos/doc/manual/development/option-types.xml
@@ -346,6 +346,18 @@
+
+
+ types.oneOf [ t1t2 ... ]
+
+
+
+ Type t1 or type t2 and so forth,
+ e.g. with types; oneOf [ int str bool ]. Multiple definitions
+ cannot be merged.
+
+
+ types.coercedTofromfto
diff --git a/nixos/doc/manual/development/releases.xml b/nixos/doc/manual/development/releases.xml
index f45fecd16c35..1cdec64f69b0 100755
--- a/nixos/doc/manual/development/releases.xml
+++ b/nixos/doc/manual/development/releases.xml
@@ -98,6 +98,16 @@
stableBranch set to false.
+
+
+ Remove attributes that we know we will not be able to support,
+ especially if there is a stable alternative. E.g. Check that our
+ Linux kernels'
+
+ projected end-of-life are after our release projected
+ end-of-life
+
+
Edit changelog at
@@ -210,6 +220,30 @@
+
+ Release Management Team
+
+ For each release there are two release managers. After each release the
+ release manager having managed two releases steps down and the release
+ management team of the last release appoints a new release manager.
+
+
+ This makes sure a release management team always consists of one release
+ manager who already has managed one release and one release manager being
+ introduced to their role, making it easier to pass on knowledge and
+ experience.
+
+
+ A release manager's role and responsibilities are:
+
+
+ manage the release process
+ start discussions about features and changes for a given release
+ create a roadmap
+ release in cooperation with Eelco Dolstra
+ decide which bug fixes, features, etc... get backported after a release
+
+ Release schedule
diff --git a/nixos/doc/manual/development/sources.xml b/nixos/doc/manual/development/sources.xml
index 3c30c782746d..b333ccabb420 100644
--- a/nixos/doc/manual/development/sources.xml
+++ b/nixos/doc/manual/development/sources.xml
@@ -13,17 +13,16 @@
$ git clone https://github.com/NixOS/nixpkgs
$ cd nixpkgs
-$ git remote add channels https://github.com/NixOS/nixpkgs-channels
-$ git remote update channels
+$ git remote update origin
This will check out the latest Nixpkgs sources to
./nixpkgs the NixOS sources to
./nixpkgs/nixos. (The NixOS source tree lives in a
- subdirectory of the Nixpkgs repository.) The remote
- channels refers to a read-only repository that tracks the
- Nixpkgs/NixOS channels (see for more
+ subdirectory of the Nixpkgs repository.) The
+ nixpkgs repository has branches that correspond
+ to each Nixpkgs/NixOS channel (see for more
information about channels). Thus, the Git branch
- channels/nixos-17.03 will contain the latest built and
+ origin/nixos-17.03 will contain the latest built and
tested version available in the nixos-17.03 channel.
@@ -40,15 +39,15 @@
Or, to base your local branch on the latest version available in a NixOS
channel:
-$ git remote update channels
-$ git checkout -b local channels/nixos-17.03
+$ git remote update origin
+$ git checkout -b local origin/nixos-17.03
(Replace nixos-17.03 with the name of the channel you want
to use.) You can use git merge or git
rebase to keep your local branch in sync with the channel, e.g.
-$ git remote update channels
-$ git merge channels/nixos-17.03
+$ git remote update origin
+$ git merge origin/nixos-17.03
You can use git cherry-pick to copy commits from your
local branch to the upstream branch.
diff --git a/nixos/doc/manual/installation/changing-config.xml b/nixos/doc/manual/installation/changing-config.xml
index b77d71389a9d..48193d986ab7 100644
--- a/nixos/doc/manual/installation/changing-config.xml
+++ b/nixos/doc/manual/installation/changing-config.xml
@@ -14,6 +14,13 @@
to build the new configuration, make it the default configuration for
booting, and try to realise the configuration in the running system (e.g., by
restarting system services).
+
+
+ This command doesn't start/stop user
+ services automatically. nixos-rebuild only runs a
+ daemon-reload for each user with running user services.
+
+
diff --git a/nixos/doc/manual/installation/installing.xml b/nixos/doc/manual/installation/installing.xml
index 742376378dea..8ff920eb5a88 100644
--- a/nixos/doc/manual/installation/installing.xml
+++ b/nixos/doc/manual/installation/installing.xml
@@ -29,13 +29,14 @@
- You are logged-in automatically as root. (The
- root user account has an empty password.)
+ You are logged-in automatically as nixos.
+ The nixos user account has an empty password so you
+ can use sudo without a password.
If you downloaded the graphical ISO image, you can run systemctl
- start display-manager to start KDE. If you want to continue on the
+ start display-manager to start the desktop environment. If you want to continue on the
terminal, you can use loadkeys to switch to your
preferred keyboard layout. (We even provide neo2 via loadkeys de
neo!)
@@ -65,9 +66,9 @@
If you would like to continue the installation from a different machine you
- need to activate the SSH daemon via systemctl start
- sshd. In order to be able to login you also need to set a
- password for root using passwd.
+ need to activate the SSH daemon via systemctl start
+ sshd. You then must set a password for either root or
+ nixos with passwd to be able to login.
@@ -334,7 +335,7 @@
If you’re using the graphical ISO image, other editors may be available
(such as vim). If you have network access, you can also
install other editors — for instance, you can install Emacs by running
- nix-env -i emacs.
+ nix-env -f '<nixpkgs>' -iA emacs.
@@ -391,7 +392,11 @@
hardware-configuration.nix is included from
configuration.nix and will be overwritten by future
invocations of nixos-generate-config; thus, you
- generally should not modify it.)
+ generally should not modify it.) Additionally, you may want to look at
+ Hardware
+ configuration for known-hardware at this point or after
+ installation.
+
@@ -466,10 +471,10 @@ Retype new UNIX password: ***
You may also want to install some software. For instance,
-$ nix-env -qa \*
+$ nix-env -qaP \*
shows what packages are available, and
-$ nix-env -i w3m
+$ nix-env -f '<nixpkgs>' -iA w3m
install the w3m browser.
diff --git a/nixos/doc/manual/installation/upgrading.xml b/nixos/doc/manual/installation/upgrading.xml
index 35b4d266e12e..8d3f35b7c26f 100644
--- a/nixos/doc/manual/installation/upgrading.xml
+++ b/nixos/doc/manual/installation/upgrading.xml
@@ -14,7 +14,7 @@
Stable channels, such as
nixos-19.03.
+ xlink:href="https://nixos.org/channels/nixos-19.09">nixos-19.09.
These only get conservative bug fixes and package upgrades. For instance,
a channel update may cause the Linux kernel on your system to be upgraded
from 4.19.34 to 4.19.38 (a minor bug fix), but not from
@@ -38,7 +38,7 @@
Small channels, such as
nixos-19.03-small
+ xlink:href="https://nixos.org/channels/nixos-19.09-small">nixos-19.09-small
or
nixos-unstable-small.
@@ -63,8 +63,8 @@
When you first install NixOS, you’re automatically subscribed to the NixOS
channel that corresponds to your installation source. For instance, if you
- installed from a 19.03 ISO, you will be subscribed to the
- nixos-19.03 channel. To see which NixOS channel you’re
+ installed from a 19.09 ISO, you will be subscribed to the
+ nixos-19.09 channel. To see which NixOS channel you’re
subscribed to, run the following as root:
# nix-channel --list | grep nixos
@@ -75,13 +75,13 @@ nixos https://nixos.org/channels/nixos-unstable
# nix-channel --add https://nixos.org/channels/channel-name nixos
(Be sure to include the nixos parameter at the end.) For
- instance, to use the NixOS 19.03 stable channel:
+ instance, to use the NixOS 19.09 stable channel:
-# nix-channel --add https://nixos.org/channels/nixos-19.03 nixos
+# nix-channel --add https://nixos.org/channels/nixos-19.09 nixos
If you have a server, you may want to use the “small” channel instead:
-# nix-channel --add https://nixos.org/channels/nixos-19.03-small nixos
+# nix-channel --add https://nixos.org/channels/nixos-19.09-small nixos
And if you want to live on the bleeding edge:
@@ -127,7 +127,7 @@ nixos https://nixos.org/channels/nixos-unstable
current channel. (To see when the service runs, see systemctl
list-timers.) You can also specify a channel explicitly, e.g.
- = https://nixos.org/channels/nixos-19.03;
+ = https://nixos.org/channels/nixos-19.09;
diff --git a/nixos/doc/manual/man-configuration.xml b/nixos/doc/manual/man-configuration.xml
index 9f30b7925101..ddb1408fdcf5 100644
--- a/nixos/doc/manual/man-configuration.xml
+++ b/nixos/doc/manual/man-configuration.xml
@@ -8,8 +8,8 @@
- configuration.nix
- NixOS system configuration specification
+ configuration.nix
+ NixOS system configuration specificationDescription
diff --git a/nixos/doc/manual/man-nixos-build-vms.xml b/nixos/doc/manual/man-nixos-build-vms.xml
index 7d6e04e0dd90..d114261f53be 100644
--- a/nixos/doc/manual/man-nixos-build-vms.xml
+++ b/nixos/doc/manual/man-nixos-build-vms.xml
@@ -8,8 +8,8 @@
- nixos-build-vms
- build a network of virtual machines from a network of NixOS configurations
+ nixos-build-vms
+ build a network of virtual machines from a network of NixOS configurations
diff --git a/nixos/doc/manual/man-nixos-enter.xml b/nixos/doc/manual/man-nixos-enter.xml
index 42edaa1ae5b6..fe560d3efdd8 100644
--- a/nixos/doc/manual/man-nixos-enter.xml
+++ b/nixos/doc/manual/man-nixos-enter.xml
@@ -8,8 +8,8 @@
- nixos-enter
- run a command in a NixOS chroot environment
+ nixos-enter
+ run a command in a NixOS chroot environment
@@ -34,6 +34,12 @@
shell-command
+
+
+
+
+
+
@@ -100,6 +106,16 @@
+
+
+
+
+
+
+ Suppresses all output from the activation script of the target system.
+
+
+
diff --git a/nixos/doc/manual/man-nixos-generate-config.xml b/nixos/doc/manual/man-nixos-generate-config.xml
index 61531a8f01ca..9ac3b918ff69 100644
--- a/nixos/doc/manual/man-nixos-generate-config.xml
+++ b/nixos/doc/manual/man-nixos-generate-config.xml
@@ -8,8 +8,8 @@
- nixos-generate-config
- generate NixOS configuration modules
+ nixos-generate-config
+ generate NixOS configuration modules
diff --git a/nixos/doc/manual/man-nixos-install.xml b/nixos/doc/manual/man-nixos-install.xml
index 4fb94ee7494c..45bbd5d81ff0 100644
--- a/nixos/doc/manual/man-nixos-install.xml
+++ b/nixos/doc/manual/man-nixos-install.xml
@@ -8,8 +8,8 @@
- nixos-install
- install bootloader and NixOS
+ nixos-install
+ install bootloader and NixOS
diff --git a/nixos/doc/manual/man-nixos-option.xml b/nixos/doc/manual/man-nixos-option.xml
index 3e316e10d4eb..81e3739b3be5 100644
--- a/nixos/doc/manual/man-nixos-option.xml
+++ b/nixos/doc/manual/man-nixos-option.xml
@@ -8,8 +8,8 @@
- nixos-option
- inspect a NixOS configuration
+ nixos-option
+ inspect a NixOS configuration
diff --git a/nixos/doc/manual/man-nixos-rebuild.xml b/nixos/doc/manual/man-nixos-rebuild.xml
index 9cec83f1e28b..c697b7ee0472 100644
--- a/nixos/doc/manual/man-nixos-rebuild.xml
+++ b/nixos/doc/manual/man-nixos-rebuild.xml
@@ -7,10 +7,12 @@
NixOS
+
- nixos-rebuild
- reconfigure a NixOS machine
+ nixos-rebuild
+ reconfigure a NixOS machine
+
nixos-rebuild
@@ -74,6 +76,7 @@
builder-spec
+
@@ -90,10 +93,41 @@
+
+
+ path
+
+
+
+
+
+
+
+
+
+
+
+
+ number
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Description
+
This command updates the system so that it corresponds to the configuration
specified in /etc/nixos/configuration.nix. Thus, every
@@ -101,11 +135,14 @@
NixOS module, you must run nixos-rebuild to make the
changes take effect. It builds the new system in
/nix/store, runs its activation script, and stop and
- (re)starts any system services if needed.
+ (re)starts any system services if needed. Please note that user services need
+ to be started manually as they aren't detected by the activation script at the moment.
+
This command has one required argument, which specifies the desired
operation. It must be one of the following:
+
@@ -122,6 +159,7 @@
+
@@ -135,6 +173,7 @@
+
@@ -149,6 +188,7 @@
+
@@ -167,6 +207,7 @@
+
@@ -178,6 +219,7 @@
+
@@ -192,6 +234,7 @@
+
@@ -202,6 +245,7 @@
+
@@ -219,12 +263,14 @@
$ ./result/bin/run-*-vm
+
The VM is implemented using the qemu package. For
best performance, you should load the kvm-intel or
kvm-amd kernel modules to get hardware
virtualisation.
+
The VM mounts the Nix store of the host through the 9P file system. The
host Nix store is read-only, so Nix commands that modify the Nix store
@@ -232,6 +278,7 @@
nixos-rebuild; to change the VM’s configuration,
you must halt the VM and re-run the commands above.
+
The VM has its own ext3 root file system, which is
automatically created when the VM is first started, and is persistent
@@ -242,6 +289,7 @@
+
@@ -264,11 +312,13 @@
+
Options
This command accepts the following options:
+
@@ -280,6 +330,7 @@
+
@@ -291,6 +342,7 @@
+
@@ -306,6 +358,7 @@
+
@@ -319,6 +372,7 @@
+
@@ -333,6 +387,7 @@
+
builder-spec
@@ -352,6 +407,7 @@
+
@@ -382,6 +438,7 @@
+
@@ -407,6 +464,7 @@
+
@@ -419,6 +477,7 @@
be accessible over ssh, and for the commands ,
and you need root access.
+
If is not explicitly specified,
will implicitly be set to the same value as
@@ -427,6 +486,7 @@
place remotely (and no build artifacts will be copied to the local
machine).
+
You can include a remote user name in the host name
(user@host). You can also set ssh options by
@@ -435,6 +495,7 @@
+
In addition, nixos-rebuild accepts various Nix-related
flags, including / ,
@@ -443,8 +504,10 @@
. See the Nix manual for details.
+
Environment
+
@@ -457,6 +520,7 @@
+
NIX_SSHOPTS
@@ -470,9 +534,12 @@
+
Files
+
+
/run/current-system
@@ -483,6 +550,7 @@
+
/nix/var/nix/profiles/system
@@ -494,8 +562,10 @@
+
+
Bugs
diff --git a/nixos/doc/manual/man-nixos-version.xml b/nixos/doc/manual/man-nixos-version.xml
index 931c4a5ad029..e9ad8bddcace 100644
--- a/nixos/doc/manual/man-nixos-version.xml
+++ b/nixos/doc/manual/man-nixos-version.xml
@@ -7,8 +7,8 @@
NixOS
- nixos-version
- show the NixOS version
+ nixos-version
+ show the NixOS version
diff --git a/nixos/doc/manual/release-notes/release-notes.xml b/nixos/doc/manual/release-notes/release-notes.xml
index 02b591477214..444862c5739b 100644
--- a/nixos/doc/manual/release-notes/release-notes.xml
+++ b/nixos/doc/manual/release-notes/release-notes.xml
@@ -8,6 +8,7 @@
This section lists the release notes for each stable version of NixOS and
current unstable revision.
+
diff --git a/nixos/doc/manual/release-notes/rl-1703.xml b/nixos/doc/manual/release-notes/rl-1703.xml
index 86f4a1ccfb78..14b31b232e90 100644
--- a/nixos/doc/manual/release-notes/rl-1703.xml
+++ b/nixos/doc/manual/release-notes/rl-1703.xml
@@ -730,7 +730,7 @@ in
- jre now defaults to GTK+ UI by default. This improves
+ jre now defaults to GTK UI by default. This improves
visual consistency and makes Java follow system font style, improving the
situation on HighDPI displays. This has a cost of increased closure size;
for server and other headless workloads it's recommended to use
diff --git a/nixos/doc/manual/release-notes/rl-1909.xml b/nixos/doc/manual/release-notes/rl-1909.xml
index 6f049005ab69..8bd353a34304 100644
--- a/nixos/doc/manual/release-notes/rl-1909.xml
+++ b/nixos/doc/manual/release-notes/rl-1909.xml
@@ -3,7 +3,7 @@
xmlns:xi="http://www.w3.org/2001/XInclude"
version="5.0"
xml:id="sec-release-19.09">
- Release 19.09 (“Loris”, 2019/09/??)
+ Release 19.09 (“Loris”, 2019/10/09)
+
+
+ Nix has been updated to 2.3; see its
+ release
+ notes.
+
+
+
+ Core version changes:
+ systemd: 239 -> 243
+ gcc: 7 -> 8
+ glibc: 2.27 (unchanged)
+ linux: 4.19 LTS (unchanged)
+ openssl: 1.0 -> 1.1
+
+
+ Desktop version changes:
+ plasma5: 5.14 -> 5.16
+ gnome3: 3.30 -> 3.32
+
PHP now defaults to PHP 7.3, updated from 7.2.
@@ -33,6 +53,88 @@
PHP 7.1 is no longer supported due to upstream not supporting this version for the entire lifecycle of the 19.09 release.
+
+
+ The binfmt module is now easier to use. Additional systems can
+ be added through .
+ For instance, boot.binfmt.emulatedSystems = [
+ "wasm32-wasi" "x86_64-windows" "aarch64-linux" ]; will
+ set up binfmt interpreters for each of those listed systems.
+
+
+
+
+ The installer now uses a less privileged nixos user whereas before we logged in as root.
+ To gain root privileges use sudo -i without a password.
+
+
+
+
+ We've updated to Xfce 4.14, which brings a new module .
+ If you'd like to upgrade, please switch from the module as it
+ will be deprecated in a future release. They're incompatibilities with the current Xfce module; it doesn't support
+ and it isn't recommended to use
+ and simultaneously or to downgrade from Xfce 4.14 after upgrading.
+
+
+
+
+ The GNOME 3 desktop manager module sports an interface to enable/disable core services, applications, and optional GNOME packages
+ like games.
+
+ This can be achieved with the following options which the desktop manager default enables, excluding games.
+
+
+
+
+
+ With these options we hope to give users finer grained control over their systems. Prior to this change you'd either have to manually
+ disable options or use which only excluded the optional applications.
+ is now unguarded, it can exclude any package installed with
+ in the GNOME 3 module.
+
+
+
+
+ Orthogonal to the previous changes to the GNOME 3 desktop manager module, we've updated all default services and applications
+ to match as close as possible to a default reference GNOME 3 experience.
+
+
+ The following changes were enacted in
+
+
+ Applications removed from defaults:
+ accerciser
+ dconf-editor
+ evolution
+ gnome-documents
+ gnome-nettool
+ gnome-power-manager
+ gnome-todo
+ gnome-tweaks
+ gnome-usage
+ gucharmap
+ nautilus-sendto
+ vinagre
+
+
+ Applications added to defaults:
+ cheese
+ geary
+
+
+ The following changes were enacted in
+
+
+ Applications added to defaults:
+ gnome-color-manager
+ orca
+
+
+ Services enabled:
+
+
+
@@ -47,6 +149,56 @@
The following new services were added since the last release:
+
+
+
+ ./programs/dwm-status.nix
+
+
+
+
+ The new hardware.printers module allows to declaratively configure CUPS printers
+ via the ensurePrinters and
+ ensureDefaultPrinter options.
+ ensurePrinters will never delete existing printers,
+ but will make sure that the given printers are configured as declared.
+
+
+
+
+ There is a new and module
+ for the program of the same name. If you previously had system-config-printer enabled through some other
+ means you should migrate to using one of these modules.
+
+
+ If you're a user of the following desktopManager modules no action is needed:
+
+
+
+
+
+
+
+
+
+
+
+
+ Note Mate uses programs.system-config-printer as it doesn't
+ use it as a service, but its graphical interface directly.
+
+
+
+
+
+
+ has been added.
+ If you previously had blueman installed via please
+ migrate to using the NixOS module, as this would result in an insufficiently configured blueman.
+
+
+
+
+
+
+ PostgreSQL 9.4 is scheduled EOL during the 19.09 life cycle and has been removed.
+
+
The options and
@@ -215,6 +372,12 @@
+
+ The shibboleth-sp package has been updated to version 3.
+ It is largely backward compatible, for further information refer to the
+ release notes
+ and upgrade guide.
+
Nodejs 8 is scheduled EOL under the lifetime of 19.09 and has been dropped.
@@ -226,6 +389,208 @@
Only some exporters are affected by the latter, namely the exporters dovecot, node, postfix and varnish.
+
+
+ The ibus-qt package is not installed by default anymore when is set to ibus.
+ If IBus support in Qt 4.x applications is required, add the ibus-qt package to your manually.
+
+
+
+
+ The CUPS Printing service now uses socket-based activation by
+ default, only starting when needed. The previous behavior can
+ be restored by setting
+ to
+ false.
+
+
+
+
+ The module has been removed from nixpkgs due to lack of maintainer.
+
+
+
+
+ The module has been removed from nixpkgs due to lack of maintainer.
+
+
+
+
+ Squid 3 has been removed and the derivation now refers to Squid 4.
+
+
+
+
+ The option has been replaced by
+ . The new option allows setting extra
+ configuration while being better type-checked and mergeable.
+
+
+
+
+ No service depends on keys.target anymore which is a systemd
+ target that indicates if all NixOps keys were successfully uploaded.
+ Instead, <key-name>-key.service should be used to define
+ a dependency of a key in a service. The full issue behind the keys.target
+ dependency is described at NixOS/nixpkgs#67265.
+
+
+ The following services are affected by this:
+
+ services.dovecot2
+ services.nsd
+ services.softether
+ services.strongswan
+ services.strongswan-swanctl
+ services.httpd
+
+
+
+
+
+ The option has been replaced by a read-only option for each certificate you define. This will be
+ a subdirectory of /var/lib/acme. You can use this read-only option to figure out where the certificates are stored for a specific certificate. For example,
+ the option will use this directory option to find the certs for the virtual host.
+
+
+ and options have been removed. To execute a service before certificates
+ are provisioned or renewed add a RequiredBy=acme-${cert}.service to any service.
+
+
+ Furthermore, the acme module will not automatically add a dependency on lighttpd.service anymore. If you are using certficates provided by letsencrypt
+ for lighttpd, then you should depend on the certificate service acme-${cert}.service> manually.
+
+
+ For nginx, the dependencies are still automatically managed when is enabled just like before. What changed is that nginx now directly depends on the specific certificates that it needs,
+ instead of depending on the catch-all acme-certificates.target. This target unit was also removed from the codebase.
+ This will mean nginx will no longer depend on certificates it isn't explicitly managing and fixes a bug with certificate renewal
+ ordering racing with nginx restarting which could lead to nginx getting in a broken state as described at
+ NixOS/nixpkgs#60180.
+
+
+
+
+ The old deprecated emacs package sets have been dropped.
+ What used to be called emacsPackagesNg is now simply called emacsPackages.
+
+
+
+
+ is now disabled by default if stateVersion is 19.09 or higher.
+ Previously the xterm desktopManager was enabled when xserver was enabled, but it isn't useful for all people so it didn't make sense to
+ have any desktopManager enabled default.
+
+
+
+
+ The WeeChat plugin pkgs.weechatScripts.weechat-xmpp has been removed as it doesn't receive
+ any updates from upstream and depends on outdated Python2-based modules.
+
+
+
+
+ Old unsupported versions (logstash5,
+ kibana5,
+ filebeat5,
+ heartbeat5,
+ metricbeat5,
+ packetbeat5) of the ELK-stack and Elastic beats have been removed.
+
+
+
+
+ For NixOS 19.03, both Prometheus 1 and 2 were available to allow for
+ a seamless transition from version 1 to 2 with existing setups.
+ Because Prometheus 1 is no longer developed, it was removed.
+ Prometheus 2 is now configured with services.prometheus.
+
+
+
+
+ Citrix Receiver (citrix_receiver) has been dropped in favor of Citrix Workspace
+ (citrix_workspace).
+
+
+
+
+ The services.gitlab module has had its literal secret options (,
+ ,
+ ,
+ ,
+ ,
+ and
+ ) replaced by file-based versions (,
+ ,
+ ,
+ ,
+ ,
+ and
+ ). This was done so that secrets aren't stored
+ in the world-readable nix store, but means that for each option you'll have to create a file with
+ the same exact string, add "File" to the end of the option name, and change the definition to a
+ string pointing to the corresponding file; e.g. services.gitlab.databasePassword = "supersecurepassword"
+ becomes services.gitlab.databasePasswordFile = "/path/to/secret_file" where the
+ file secret_file contains the string supersecurepassword.
+
+
+ The state path () now has the following restriction:
+ no parent directory can be owned by any other user than root or the user
+ specified in ; i.e. if
+ is set to /var/lib/gitlab/state, gitlab and all parent directories
+ must be owned by either root or the user specified in .
+
+
+
+
+ The option is unsupported in combination with
+ in anticipation of defaulting to it by default.
+ It has to be set to false and enabled per
+ interface with
+
+
+
+
+ The Twitter client corebird has been dropped as it is discontinued and does not work against the new Twitter API.
+ Please use the fork cawbird instead which has been adapted to the API changes and is still maintained.
+
+
+
+
+ The nodejs-11_x package has been removed as it's EOLed by upstream.
+
+
+
+
+ Because of the systemd upgrade,
+ systemd-timesyncd will no longer work if
+ is not set correctly. When
+ upgrading from NixOS 19.03, please make sure that
+ is set to
+ "19.03", or lower if the installation dates back to an
+ earlier version of NixOS.
+
+
+
+
+ Due to the short lifetime of non-LTS kernel releases package attributes like linux_5_1,
+ linux_5_2 and linux_5_3 have been removed to discourage dependence
+ on specific non-LTS kernel versions in stable NixOS releases.
+
+ Going forward, versioned attributes like linux_4_9 will exist for LTS versions only.
+ Please use linux_latest or linux_testing if you depend on non-LTS
+ releases. Keep in mind that linux_latest and linux_testing will
+ change versions under the hood during the lifetime of a stable release and might include breaking changes.
+
+
+
+
+ Because of the systemd upgrade,
+ some network interfaces might change their name. For details see
+
+ upstream docs or
+ our ticket.
+
+
@@ -387,6 +752,151 @@
installer after creating /var/lib/nextcloud.
+
+
+ There exists now lib.forEach, which is like map, but with
+ arguments flipped. When mapping function body spans many lines (or has nested
+ maps), it is often hard to follow which list is modified.
+
+
+ Previous solution to this problem was either to use lib.flip map
+ idiom or extract that anonymous mapping function to a named one. Both can still be used
+ but lib.forEach is preferred over lib.flip map.
+
+
+ The /etc/sysctl.d/nixos.conf file containing all the options set via
+ boot.kernel.sysctl was moved to
+ /etc/sysctl.d/60-nixos.conf, as
+ sysctl.d5
+ recommends prefixing all filenames in /etc/sysctl.d with a
+ two-digit number and a dash to simplify the ordering of the files.
+
+
+
+
+ We now install the sysctl snippets shipped with systemd.
+
+ This enables:
+
+ Loose reverse path filtering
+
+
+ Source route filtering
+
+
+
+ fq_codel as a packet scheduler (this helps to fight bufferbloat)
+
+
+
+ This also configures the kernel to pass core dumps to systemd-coredump,
+ and restricts the SysRq key combinations to the sync command only.
+ These sysctl snippets can be found in /etc/sysctl.d/50-*.conf,
+ and overridden via boot.kernel.sysctl
+ (which will place the parameters in /etc/sysctl.d/60-nixos.conf).
+
+
+
+
+ Core dumps are now processed by systemd-coredump
+ by default. systemd-coredump behaviour can
+ still be modified via
+ . To stick to the
+ old behaviour (having the kernel dump to a file called
+ core in the working directory), without piping
+ it through systemd-coredump, set
+ to
+ false.
+
+
+
+
+ systemd.packages option now also supports generators and
+ shutdown scripts. Old systemd.generator-packages option has
+ been removed.
+
+
+
+
+ The rmilter package was removed with associated module and options due deprecation by upstream developer.
+ Use rspamd in proxy mode instead.
+
+
+
+
+ systemd cgroup accounting via the
+ systemd.enableCgroupAccounting
+ option is now enabled by default. It now also enables the more recent Block IO and IP accounting
+ features.
+
+
+
+
+ We no longer enable custom font rendering settings with by default.
+ The defaults from fontconfig are sufficient.
+
+
+
+
+ The crashplan package and the
+ crashplan service have been removed from nixpkgs due to
+ crashplan shutting down the service, while the crashplansb
+ package and crashplan-small-business service have been
+ removed from nixpkgs due to lack of maintainer.
+
+
+ The redis module was hardcoded to use the redis user,
+ /run/redis as runtime directory and
+ /var/lib/redis as state directory.
+ Note that the NixOS module for Redis now disables kernel support for Transparent Huge Pages (THP),
+ because this features causes major performance problems for Redis,
+ e.g. (https://redis.io/topics/latency).
+
+
+
+
+ Using adds a default emoji font noto-fonts-emoji.
+
+ Users of the following options will have this enabled by default:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The altcoins categorization of packages has
+ been removed. You now access these packages at the top level,
+ ie. nix-shell -p dogecoin instead of
+ nix-shell -p altcoins.dogecoin, etc.
+
+
+
+
+ Ceph has been upgraded to v14.2.1.
+ See the release notes for details.
+ The mgr dashboard as well as osds backed by loop-devices is no longer explicitly supported by the package and module.
+ Note: There's been some issues with python-cherrypy, which is used by the dashboard
+ and prometheus mgr modules (and possibly others), hence 0000-dont-check-cherrypy-version.patch.
+
+
+
+
+ pkgs.weechat is now compiled against pkgs.python3.
+ Weechat also recommends to use Python3
+ in their docs.
+
+
diff --git a/nixos/doc/manual/release-notes/rl-2003.xml b/nixos/doc/manual/release-notes/rl-2003.xml
new file mode 100644
index 000000000000..aa7601f84c43
--- /dev/null
+++ b/nixos/doc/manual/release-notes/rl-2003.xml
@@ -0,0 +1,136 @@
+
+ Release 20.03 (“Markhor”, 2020.03/??)
+
+
+ Highlights
+
+
+ In addition to numerous new and upgraded packages, this release has the
+ following highlights:
+
+
+
+
+
+ Support is planned until the end of October 2020, handing over to 20.09.
+
+
+
+
+ Postgresql for NixOS service now defaults to v11.
+
+
+
+
+ The graphical installer image starts the graphical session automatically.
+ Before you'd be greeted by a tty and asked to enter systemctl start display-manager.
+ It is now possible to disable the display-manager from running by selecting the Disable display-manager
+ quirk in the boot menu.
+
+
+
+
+ By default zfs pools will now be trimmed on a weekly basis.
+ Trimming is only done on supported devices (i.e. NVME or SSDs)
+ and should improve throughput and lifetime of these devices.
+ It is controlled by the services.zfs.trim.enable varname.
+ The zfs scrub service (services.zfs.autoScrub.enable)
+ and the zfs autosnapshot service (services.zfs.autoSnapshot.enable)
+ are now only enabled if zfs is set in config.boot.initrd.supportedFilesystems or
+ config.boot.supportedFilesystems. These lists will automatically contain
+ zfs as soon as any zfs mountpoint is configured in fileSystems.
+
+
+
+
+
+
+ New Services
+
+
+ The following new services were added since the last release:
+
+
+
+
+
+
+
+
+
+
+
+ Backward Incompatibilities
+
+
+ When upgrading from a previous release, please be aware of the following
+ incompatible changes:
+
+
+
+
+
+ GnuPG is now built without support for a graphical passphrase entry
+ by default. Please enable the gpg-agent user service
+ via the NixOS option programs.gnupg.agent.enable.
+ Note that upstream recommends using gpg-agent and
+ will spawn a gpg-agent on the first invocation of
+ GnuPG anyway.
+
+
+
+
+ The dynamicHosts option has been removed from the
+ networkd
+ module. Allowing (multiple) regular users to override host entries
+ affecting the whole system opens up a huge attack vector.
+ There seem to be very rare cases where this might be useful.
+ Consider setting system-wide host entries using
+ networking.hosts, provide
+ them via the DNS server in your network, or use
+ environment.etc
+ to add a file into /etc/NetworkManager/dnsmasq.d
+ reconfiguring hostsdir.
+
+
+
+
+
+
+ Other Notable Changes
+
+
+
+ SD images are now compressed by default using bzip2.
+
+
+
+ OpenSSH has been upgraded from 7.9 to 8.1, improving security and adding features
+ but with potential incompatibilities. Consult the
+
+ release announcement for more information.
+
+
+
+
+
diff --git a/nixos/doc/xmlformat.conf b/nixos/doc/xmlformat.conf
index 4a565c8465bc..c3f39c7fd81b 100644
--- a/nixos/doc/xmlformat.conf
+++ b/nixos/doc/xmlformat.conf
@@ -37,7 +37,6 @@ para abstract
entry-break 1
exit-break 1
normalize yes
- wrap-length 79
title
format block
diff --git a/nixos/lib/build-vms.nix b/nixos/lib/build-vms.nix
index 6c92aa1ffa2f..1bad63b9194c 100644
--- a/nixos/lib/build-vms.nix
+++ b/nixos/lib/build-vms.nix
@@ -54,11 +54,11 @@ rec {
machinesNumbered = zipLists machines (range 1 254);
- nodes_ = flip map machinesNumbered (m: nameValuePair m.fst
+ nodes_ = forEach machinesNumbered (m: nameValuePair m.fst
[ ( { config, nodes, ... }:
let
interfacesNumbered = zipLists config.virtualisation.vlans (range 1 255);
- interfaces = flip map interfacesNumbered ({ fst, snd }:
+ interfaces = forEach interfacesNumbered ({ fst, snd }:
nameValuePair "eth${toString snd}" { ipv4.addresses =
[ { address = "192.168.${toString fst}.${toString m.snd}";
prefixLength = 24;
@@ -67,7 +67,7 @@ rec {
in
{ key = "ip-address";
config =
- { networking.hostName = m.fst;
+ { networking.hostName = mkDefault m.fst;
networking.interfaces = listToAttrs interfaces;
@@ -88,7 +88,7 @@ rec {
"${config.networking.hostName}\n"));
virtualisation.qemu.options =
- flip map interfacesNumbered
+ forEach interfacesNumbered
({ fst, snd }: qemuNICFlags snd fst m.snd);
};
}
diff --git a/nixos/lib/make-iso9660-image.nix b/nixos/lib/make-iso9660-image.nix
index 8cd19b6e1874..0f3f2b5b5234 100644
--- a/nixos/lib/make-iso9660-image.nix
+++ b/nixos/lib/make-iso9660-image.nix
@@ -10,9 +10,9 @@
contents
, # In addition to `contents', the closure of the store paths listed
- # in `packages' are also placed in the Nix store of the CD. This is
- # a list of attribute sets {object, symlink} where `object' if a
- # store path whose closure will be copied, and `symlink' is a
+ # in `storeContents' are also placed in the Nix store of the CD.
+ # This is a list of attribute sets {object, symlink} where `object'
+ # is a store path whose closure will be copied, and `symlink' is a
# symlink to `object' that will be added to the CD.
storeContents ? []
diff --git a/nixos/lib/make-options-doc/default.nix b/nixos/lib/make-options-doc/default.nix
new file mode 100644
index 000000000000..35c8b543dece
--- /dev/null
+++ b/nixos/lib/make-options-doc/default.nix
@@ -0,0 +1,164 @@
+/* Generate JSON, XML and DocBook documentation for given NixOS options.
+
+ Minimal example:
+
+ { pkgs, }:
+
+ let
+ eval = import (pkgs.path + "/nixos/lib/eval-config.nix") {
+ baseModules = [
+ ../module.nix
+ ];
+ modules = [];
+ };
+ in pkgs.nixosOptionsDoc {
+ options = eval.options;
+ }
+
+*/
+{ pkgs
+, lib
+, options
+, transformOptions ? lib.id # function for additional tranformations of the options
+, revision ? "" # Specify revision for the options
+}:
+
+let
+ # Replace functions by the string
+ substFunction = x:
+ if builtins.isAttrs x then lib.mapAttrs (name: substFunction) x
+ else if builtins.isList x then map substFunction x
+ else if lib.isFunction x then ""
+ else x;
+
+ optionsListDesc = lib.flip map optionsListVisible
+ (opt: transformOptions opt
+ // lib.optionalAttrs (opt ? example) { example = substFunction opt.example; }
+ // lib.optionalAttrs (opt ? default) { default = substFunction opt.default; }
+ // lib.optionalAttrs (opt ? type) { type = substFunction opt.type; }
+ // lib.optionalAttrs (opt ? relatedPackages && opt.relatedPackages != []) { relatedPackages = genRelatedPackages opt.relatedPackages; }
+ );
+
+ # Generate DocBook documentation for a list of packages. This is
+ # what `relatedPackages` option of `mkOption` from
+ # ../../../lib/options.nix influences.
+ #
+ # Each element of `relatedPackages` can be either
+ # - a string: that will be interpreted as an attribute name from `pkgs`,
+ # - a list: that will be interpreted as an attribute path from `pkgs`,
+ # - an attrset: that can specify `name`, `path`, `package`, `comment`
+ # (either of `name`, `path` is required, the rest are optional).
+ genRelatedPackages = packages:
+ let
+ unpack = p: if lib.isString p then { name = p; }
+ else if lib.isList p then { path = p; }
+ else p;
+ describe = args:
+ let
+ title = args.title or null;
+ name = args.name or (lib.concatStringsSep "." args.path);
+ path = args.path or [ args.name ];
+ package = args.package or (lib.attrByPath path (throw "Invalid package attribute path `${toString path}'") pkgs);
+ in ""
+ + "${lib.optionalString (title != null) "${title} aka "}pkgs.${name} (${package.meta.name})"
+ + lib.optionalString (!package.meta.available) " [UNAVAILABLE]"
+ + ": ${package.meta.description or "???"}."
+ + lib.optionalString (args ? comment) "\n${args.comment}"
+ # Lots of `longDescription's break DocBook, so we just wrap them into
+ + lib.optionalString (package.meta ? longDescription) "\n${package.meta.longDescription}"
+ + "";
+ in "${lib.concatStringsSep "\n" (map (p: describe (unpack p)) packages)}";
+
+ # Custom "less" that pushes up all the things ending in ".enable*"
+ # and ".package*"
+ optionLess = a: b:
+ let
+ ise = lib.hasPrefix "enable";
+ isp = lib.hasPrefix "package";
+ cmp = lib.splitByAndCompare ise lib.compare
+ (lib.splitByAndCompare isp lib.compare lib.compare);
+ in lib.compareLists cmp a.loc b.loc < 0;
+
+ # Remove invisible and internal options.
+ optionsListVisible = lib.filter (opt: opt.visible && !opt.internal) (lib.optionAttrSetToDocList options);
+
+ # Customly sort option list for the man page.
+ optionsList = lib.sort optionLess optionsListDesc;
+
+ # Convert the list of options into an XML file.
+ optionsXML = builtins.toFile "options.xml" (builtins.toXML optionsList);
+
+ optionsNix = builtins.listToAttrs (map (o: { name = o.name; value = removeAttrs o ["name" "visible" "internal"]; }) optionsList);
+
+ # TODO: declarations: link to github
+ singleAsciiDoc = name: value: ''
+ == ${name}
+
+ ${value.description}
+
+ [discrete]
+ === details
+
+ Type:: ${value.type}
+ ${ if lib.hasAttr "default" value
+ then ''
+ Default::
+ +
+ ----
+ ${builtins.toJSON value.default}
+ ----
+ ''
+ else "No Default:: {blank}"
+ }
+ ${ if value.readOnly
+ then "Read Only:: {blank}"
+ else ""
+ }
+ ${ if lib.hasAttr "example" value
+ then ''
+ Example::
+ +
+ ----
+ ${builtins.toJSON value.example}
+ ----
+ ''
+ else "No Example:: {blank}"
+ }
+ '';
+
+in {
+ inherit optionsNix;
+
+ optionsAsciiDoc = lib.concatStringsSep "\n" (lib.mapAttrsToList singleAsciiDoc optionsNix);
+
+ optionsJSON = pkgs.runCommand "options.json"
+ { meta.description = "List of NixOS options in JSON format";
+ }
+ ''
+ # Export list of options in different format.
+ dst=$out/share/doc/nixos
+ mkdir -p $dst
+
+ cp ${builtins.toFile "options.json" (builtins.unsafeDiscardStringContext (builtins.toJSON optionsNix))} $dst/options.json
+
+ mkdir -p $out/nix-support
+ echo "file json $dst/options.json" >> $out/nix-support/hydra-build-products
+ ''; # */
+
+ optionsDocBook = pkgs.runCommand "options-docbook.xml" {} ''
+ optionsXML=${optionsXML}
+ if grep /nixpkgs/nixos/modules $optionsXML; then
+ echo "The manual appears to depend on the location of Nixpkgs, which is bad"
+ echo "since this prevents sharing via the NixOS channel. This is typically"
+ echo "caused by an option default that refers to a relative path (see above"
+ echo "for hints about the offending path)."
+ exit 1
+ fi
+
+ ${pkgs.libxslt.bin}/bin/xsltproc \
+ --stringparam revision '${revision}' \
+ -o intermediate.xml ${./options-to-docbook.xsl} $optionsXML
+ ${pkgs.libxslt.bin}/bin/xsltproc \
+ -o "$out" ${./postprocess-option-descriptions.xsl} intermediate.xml
+ '';
+}
diff --git a/nixos/doc/manual/options-to-docbook.xsl b/nixos/lib/make-options-doc/options-to-docbook.xsl
similarity index 100%
rename from nixos/doc/manual/options-to-docbook.xsl
rename to nixos/lib/make-options-doc/options-to-docbook.xsl
diff --git a/nixos/doc/manual/postprocess-option-descriptions.xsl b/nixos/lib/make-options-doc/postprocess-option-descriptions.xsl
similarity index 100%
rename from nixos/doc/manual/postprocess-option-descriptions.xsl
rename to nixos/lib/make-options-doc/postprocess-option-descriptions.xsl
diff --git a/nixos/lib/qemu-flags.nix b/nixos/lib/qemu-flags.nix
index 779f0377a512..774f66b4804e 100644
--- a/nixos/lib/qemu-flags.nix
+++ b/nixos/lib/qemu-flags.nix
@@ -17,9 +17,9 @@ in
else throw "Unknown QEMU serial device for system '${pkgs.stdenv.hostPlatform.system}'";
qemuBinary = qemuPkg: {
- "x86_64-linux" = "${qemuPkg}/bin/qemu-kvm -cpu kvm64";
- "armv7l-linux" = "${qemuPkg}/bin/qemu-system-arm -enable-kvm -machine virt -cpu host";
- "aarch64-linux" = "${qemuPkg}/bin/qemu-system-aarch64 -enable-kvm -machine virt,gic-version=host -cpu host";
- "x86_64-darwin" = "${qemuPkg}/bin/qemu-kvm -cpu kvm64";
+ x86_64-linux = "${qemuPkg}/bin/qemu-kvm -cpu kvm64";
+ armv7l-linux = "${qemuPkg}/bin/qemu-system-arm -enable-kvm -machine virt -cpu host";
+ aarch64-linux = "${qemuPkg}/bin/qemu-system-aarch64 -enable-kvm -machine virt,gic-version=host -cpu host";
+ x86_64-darwin = "${qemuPkg}/bin/qemu-kvm -cpu kvm64";
}.${pkgs.stdenv.hostPlatform.system} or "${qemuPkg}/bin/qemu-kvm";
}
diff --git a/nixos/lib/utils.nix b/nixos/lib/utils.nix
index b68e55a40b90..a522834e4294 100644
--- a/nixos/lib/utils.nix
+++ b/nixos/lib/utils.nix
@@ -24,4 +24,116 @@ rec {
throw "${shell} is not a shell package"
else
shell;
+
+ /* Recurse into a list or an attrset, searching for attrs named like
+ the value of the "attr" parameter, and return an attrset where the
+ names are the corresponding jq path where the attrs were found and
+ the values are the values of the attrs.
+
+ Example:
+ recursiveGetAttrWithJqPrefix {
+ example = [
+ {
+ irrelevant = "not interesting";
+ }
+ {
+ ignored = "ignored attr";
+ relevant = {
+ secret = {
+ _secret = "/path/to/secret";
+ };
+ };
+ }
+ ];
+ } "_secret" -> { ".example[1].relevant.secret" = "/path/to/secret"; }
+ */
+ recursiveGetAttrWithJqPrefix = item: attr:
+ let
+ recurse = prefix: item:
+ if item ? ${attr} then
+ nameValuePair prefix item.${attr}
+ else if isAttrs item then
+ map (name: recurse (prefix + "." + name) item.${name}) (attrNames item)
+ else if isList item then
+ imap0 (index: item: recurse (prefix + "[${toString index}]") item) item
+ else
+ [];
+ in listToAttrs (flatten (recurse "" item));
+
+ /* Takes an attrset and a file path and generates a bash snippet that
+ outputs a JSON file at the file path with all instances of
+
+ { _secret = "/path/to/secret" }
+
+ in the attrset replaced with the contents of the file
+ "/path/to/secret" in the output JSON.
+
+ When a configuration option accepts an attrset that is finally
+ converted to JSON, this makes it possible to let the user define
+ arbitrary secret values.
+
+ Example:
+ If the file "/path/to/secret" contains the string
+ "topsecretpassword1234",
+
+ genJqSecretsReplacementSnippet {
+ example = [
+ {
+ irrelevant = "not interesting";
+ }
+ {
+ ignored = "ignored attr";
+ relevant = {
+ secret = {
+ _secret = "/path/to/secret";
+ };
+ };
+ }
+ ];
+ } "/path/to/output.json"
+
+ would generate a snippet that, when run, outputs the following
+ JSON file at "/path/to/output.json":
+
+ {
+ "example": [
+ {
+ "irrelevant": "not interesting"
+ },
+ {
+ "ignored": "ignored attr",
+ "relevant": {
+ "secret": "topsecretpassword1234"
+ }
+ }
+ ]
+ }
+ */
+ genJqSecretsReplacementSnippet = genJqSecretsReplacementSnippet' "_secret";
+
+ # Like genJqSecretsReplacementSnippet, but allows the name of the
+ # attr which identifies the secret to be changed.
+ genJqSecretsReplacementSnippet' = attr: set: output:
+ let
+ secrets = recursiveGetAttrWithJqPrefix set attr;
+ in ''
+ if [[ -h '${output}' ]]; then
+ rm '${output}'
+ fi
+ ''
+ + concatStringsSep
+ "\n"
+ (imap1 (index: name: "export secret${toString index}=$(<'${secrets.${name}}')")
+ (attrNames secrets))
+ + "\n"
+ + "${pkgs.jq}/bin/jq >'${output}' '"
+ + concatStringsSep
+ " | "
+ (imap1 (index: name: ''${name} = $ENV.secret${toString index}'')
+ (attrNames secrets))
+ + ''
+ ' <<'EOF'
+ ${builtins.toJSON set}
+ EOF
+ '';
}
diff --git a/nixos/maintainers/option-usages.nix b/nixos/maintainers/option-usages.nix
index a67a0ab960e5..11247666ecda 100644
--- a/nixos/maintainers/option-usages.nix
+++ b/nixos/maintainers/option-usages.nix
@@ -102,7 +102,7 @@ let
# builtins multiply by 4 the memory usage and the time used to compute
# each options.
tryCollectOptions = moduleResult:
- flip map (excludeOptions (collect isOption moduleResult)) (opt:
+ forEach (excludeOptions (collect isOption moduleResult)) (opt:
{ name = showOption opt.loc; } // builtins.tryEval (strict opt.value));
in
keepNames (
diff --git a/nixos/maintainers/scripts/ec2/amazon-image.nix b/nixos/maintainers/scripts/ec2/amazon-image.nix
index 88d95e675447..31e15537179a 100644
--- a/nixos/maintainers/scripts/ec2/amazon-image.nix
+++ b/nixos/maintainers/scripts/ec2/amazon-image.nix
@@ -17,7 +17,7 @@ in {
name = mkOption {
type = types.str;
description = "The name of the generated derivation";
- default = "nixos-disk-image";
+ default = "nixos-amazon-image-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}";
};
contents = mkOption {
@@ -42,7 +42,7 @@ in {
format = mkOption {
type = types.enum [ "raw" "qcow2" "vpc" ];
- default = "qcow2";
+ default = "vpc";
description = "The image format to output";
};
};
@@ -51,7 +51,9 @@ in {
inherit lib config;
inherit (cfg) contents format name;
pkgs = import ../../../.. { inherit (pkgs) system; }; # ensure we use the regular qemu-kvm package
- partitionTableType = if config.ec2.hvm then "legacy" else "none";
+ partitionTableType = if config.ec2.efi then "efi"
+ else if config.ec2.hvm then "legacy"
+ else "none";
diskSize = cfg.sizeMB;
fsType = "ext4";
configFile = pkgs.writeText "configuration.nix"
@@ -61,7 +63,27 @@ in {
${optionalString config.ec2.hvm ''
ec2.hvm = true;
''}
+ ${optionalString config.ec2.efi ''
+ ec2.efi = true;
+ ''}
}
'';
+ postVM = ''
+ extension=''${diskImage##*.}
+ friendlyName=$out/${cfg.name}.$extension
+ mv "$diskImage" "$friendlyName"
+ diskImage=$friendlyName
+
+ mkdir -p $out/nix-support
+ echo "file ${cfg.format} $diskImage" >> $out/nix-support/hydra-build-products
+
+ ${pkgs.jq}/bin/jq -n \
+ --arg label ${lib.escapeShellArg config.system.nixos.label} \
+ --arg system ${lib.escapeShellArg pkgs.stdenv.hostPlatform.system} \
+ --arg logical_bytes "$(${pkgs.qemu}/bin/qemu-img info --output json "$diskImage" | ${pkgs.jq}/bin/jq '."virtual-size"')" \
+ --arg file "$diskImage" \
+ '$ARGS.named' \
+ > $out/nix-support/image-info.json
+ '';
};
}
diff --git a/nixos/maintainers/scripts/ec2/create-amis.sh b/nixos/maintainers/scripts/ec2/create-amis.sh
index 790cc6cbc531..c4149e3e8ffe 100755
--- a/nixos/maintainers/scripts/ec2/create-amis.sh
+++ b/nixos/maintainers/scripts/ec2/create-amis.sh
@@ -1,279 +1,296 @@
#!/usr/bin/env nix-shell
-#! nix-shell -i bash -p qemu ec2_ami_tools jq ec2_api_tools awscli
+#!nix-shell -p awscli -p jq -p qemu -i bash
-# To start with do: nix-shell -p awscli --run "aws configure"
+# Uploads and registers NixOS images built from the
+# amazonImage attribute. Images are uploaded and
+# registered via a home region, and then copied to other regions.
-set -e
-set -o pipefail
+# The home region requires an s3 bucket, and a "vmimport" IAM role
+# with access to the S3 bucket. Configuration of the vmimport role is
+# documented in
+# https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html
-version=$(nix-instantiate --eval --strict '' -A lib.version | sed s/'"'//g)
-major=${version:0:5}
-echo "NixOS version is $version ($major)"
+# set -x
+set -euo pipefail
-stateDir=/home/deploy/amis/ec2-image-$version
-echo "keeping state in $stateDir"
-mkdir -p $stateDir
+# configuration
+state_dir=/home/deploy/amis/ec2-images
+home_region=eu-west-1
+bucket=nixos-amis
-rm -f ec2-amis.nix
+regions=(eu-west-1 eu-west-2 eu-west-3 eu-central-1
+ us-east-1 us-east-2 us-west-1 us-west-2
+ ca-central-1
+ ap-southeast-1 ap-southeast-2 ap-northeast-1 ap-northeast-2
+ ap-south-1 ap-east-1
+ sa-east-1)
-types="hvm"
-stores="ebs"
-regions="eu-west-1 eu-west-2 eu-west-3 eu-central-1 us-east-1 us-east-2 us-west-1 us-west-2 ca-central-1 ap-southeast-1 ap-southeast-2 ap-northeast-1 ap-northeast-2 sa-east-1 ap-south-1"
+log() {
+ echo "$@" >&2
+}
-for type in $types; do
- link=$stateDir/$type
- imageFile=$link/nixos.qcow2
- system=x86_64-linux
- arch=x86_64
+if [ -z "$1" ]; then
+ log "Usage: ./upload-amazon-image.sh IMAGE_OUTPUT"
+ exit 1
+fi
- # Build the image.
- if ! [ -L $link ]; then
- if [ $type = pv ]; then hvmFlag=false; else hvmFlag=true; fi
+# result of the amazon-image from nixos/release.nix
+store_path=$1
- echo "building image type '$type'..."
- nix-build -o $link \
- '' \
- -A config.system.build.amazonImage \
- --arg configuration "{ imports = [ ]; ec2.hvm = $hvmFlag; }"
+if [ ! -e "$store_path" ]; then
+ log "Store path: $store_path does not exist, fetching..."
+ nix-store --realise "$store_path"
+fi
+
+if [ ! -d "$store_path" ]; then
+ log "store_path: $store_path is not a directory. aborting"
+ exit 1
+fi
+
+read_image_info() {
+ if [ ! -e "$store_path/nix-support/image-info.json" ]; then
+ log "Image missing metadata"
+ exit 1
+ fi
+ jq -r "$1" "$store_path/nix-support/image-info.json"
+}
+
+# We handle a single image per invocation, store all attributes in
+# globals for convenience.
+image_label=$(read_image_info .label)
+image_system=$(read_image_info .system)
+image_file=$(read_image_info .file)
+image_logical_bytes=$(read_image_info .logical_bytes)
+
+# Derived attributes
+
+image_logical_gigabytes=$((($image_logical_bytes-1)/1024/1024/1024+1)) # Round to the next GB
+
+case "$image_system" in
+ aarch64-linux)
+ amazon_arch=arm64
+ ;;
+ x86_64-linux)
+ amazon_arch=x86_64
+ ;;
+ *)
+ log "Unknown system: $image_system"
+ exit 1
+esac
+
+image_name="NixOS-${image_label}-${image_system}"
+image_description="NixOS ${image_label} ${image_system}"
+
+log "Image Details:"
+log " Name: $image_name"
+log " Description: $image_description"
+log " Size (gigabytes): $image_logical_gigabytes"
+log " System: $image_system"
+log " Amazon Arch: $amazon_arch"
+
+read_state() {
+ local state_key=$1
+ local type=$2
+
+ cat "$state_dir/$state_key.$type" 2>/dev/null || true
+}
+
+write_state() {
+ local state_key=$1
+ local type=$2
+ local val=$3
+
+ mkdir -p $state_dir
+ echo "$val" > "$state_dir/$state_key.$type"
+}
+
+wait_for_import() {
+ local region=$1
+ local task_id=$2
+ local state snapshot_id
+ log "Waiting for import task $task_id to be completed"
+ while true; do
+ read state progress snapshot_id < <(
+ aws ec2 describe-import-snapshot-tasks --region $region --import-task-ids "$task_id" | \
+ jq -r '.ImportSnapshotTasks[].SnapshotTaskDetail | "\(.Status) \(.Progress) \(.SnapshotId)"'
+ )
+ log " ... state=$state progress=$progress snapshot_id=$snapshot_id"
+ case "$state" in
+ active)
+ sleep 10
+ ;;
+ completed)
+ echo "$snapshot_id"
+ return
+ ;;
+ *)
+ log "Unexpected snapshot import state: '${state}'"
+ exit 1
+ ;;
+ esac
+ done
+}
+
+wait_for_image() {
+ local region=$1
+ local ami_id=$2
+ local state
+ log "Waiting for image $ami_id to be available"
+
+ while true; do
+ read state < <(
+ aws ec2 describe-images --image-ids "$ami_id" --region $region | \
+ jq -r ".Images[].State"
+ )
+ log " ... state=$state"
+ case "$state" in
+ pending)
+ sleep 10
+ ;;
+ available)
+ return
+ ;;
+ *)
+ log "Unexpected AMI state: '${state}'"
+ exit 1
+ ;;
+ esac
+ done
+}
+
+
+make_image_public() {
+ local region=$1
+ local ami_id=$2
+
+ wait_for_image $region "$ami_id"
+
+ log "Making image $ami_id public"
+
+ aws ec2 modify-image-attribute \
+ --image-id "$ami_id" --region "$region" --launch-permission 'Add={Group=all}' >&2
+}
+
+upload_image() {
+ local region=$1
+
+ local aws_path=${image_file#/}
+
+ local state_key="$region.$image_label.$image_system"
+ local task_id=$(read_state "$state_key" task_id)
+ local snapshot_id=$(read_state "$state_key" snapshot_id)
+ local ami_id=$(read_state "$state_key" ami_id)
+
+ if [ -z "$task_id" ]; then
+ log "Checking for image on S3"
+ if ! aws s3 ls --region "$region" "s3://${bucket}/${aws_path}" >&2; then
+ log "Image missing from aws, uploading"
+ aws s3 cp --region $region "$image_file" "s3://${bucket}/${aws_path}" >&2
+ fi
+
+ log "Importing image from S3 path s3://$bucket/$aws_path"
+
+ task_id=$(aws ec2 import-snapshot --disk-container "{
+ \"Description\": \"nixos-image-${image_label}-${image_system}\",
+ \"Format\": \"vhd\",
+ \"UserBucket\": {
+ \"S3Bucket\": \"$bucket\",
+ \"S3Key\": \"$aws_path\"
+ }
+ }" --region $region | jq -r '.ImportTaskId')
+
+ write_state "$state_key" task_id "$task_id"
fi
- for store in $stores; do
+ if [ -z "$snapshot_id" ]; then
+ snapshot_id=$(wait_for_import "$region" "$task_id")
+ write_state "$state_key" snapshot_id "$snapshot_id"
+ fi
- bucket=nixos-amis
- bucketDir="$version-$type-$store"
+ if [ -z "$ami_id" ]; then
+ log "Registering snapshot $snapshot_id as AMI"
- prevAmi=
- prevRegion=
+ local block_device_mappings=(
+ "DeviceName=/dev/sda1,Ebs={SnapshotId=$snapshot_id,VolumeSize=$image_logical_gigabytes,DeleteOnTermination=true,VolumeType=gp2}"
+ )
- for region in $regions; do
+ local extra_flags=(
+ --root-device-name /dev/sda1
+ --sriov-net-support simple
+ --ena-support
+ --virtualization-type hvm
+ )
- name=nixos-$version-$arch-$type-$store
- description="NixOS $system $version ($type-$store)"
+ block_device_mappings+=(DeviceName=/dev/sdb,VirtualName=ephemeral0)
+ block_device_mappings+=(DeviceName=/dev/sdc,VirtualName=ephemeral1)
+ block_device_mappings+=(DeviceName=/dev/sdd,VirtualName=ephemeral2)
+ block_device_mappings+=(DeviceName=/dev/sde,VirtualName=ephemeral3)
- amiFile=$stateDir/$region.$type.$store.ami-id
+ ami_id=$(
+ aws ec2 register-image \
+ --name "$image_name" \
+ --description "$image_description" \
+ --region $region \
+ --architecture $amazon_arch \
+ --block-device-mappings "${block_device_mappings[@]}" \
+ "${extra_flags[@]}" \
+ | jq -r '.ImageId'
+ )
- if ! [ -e $amiFile ]; then
+ write_state "$state_key" ami_id "$ami_id"
+ fi
- echo "doing $name in $region..."
+ make_image_public $region "$ami_id"
- if [ -n "$prevAmi" ]; then
- ami=$(aws ec2 copy-image \
- --region "$region" \
- --source-region "$prevRegion" --source-image-id "$prevAmi" \
- --name "$name" --description "$description" | jq -r '.ImageId')
- if [ "$ami" = null ]; then break; fi
- else
+ echo "$ami_id"
+}
- if [ $store = s3 ]; then
+copy_to_region() {
+ local region=$1
+ local from_region=$2
+ local from_ami_id=$3
- # Bundle the image.
- imageDir=$stateDir/$type-bundled
+ state_key="$region.$image_label.$image_system"
+ ami_id=$(read_state "$state_key" ami_id)
- # Convert the image to raw format.
- rawFile=$stateDir/$type.raw
- if ! [ -e $rawFile ]; then
- qemu-img convert -f qcow2 -O raw $imageFile $rawFile.tmp
- mv $rawFile.tmp $rawFile
- fi
+ if [ -z "$ami_id" ]; then
+ log "Copying $from_ami_id to $region"
+ ami_id=$(
+ aws ec2 copy-image \
+ --region "$region" \
+ --source-region "$from_region" \
+ --source-image-id "$from_ami_id" \
+ --name "$image_name" \
+ --description "$image_description" \
+ | jq -r '.ImageId'
+ )
- if ! [ -d $imageDir ]; then
- rm -rf $imageDir.tmp
- mkdir -p $imageDir.tmp
- ec2-bundle-image \
- -d $imageDir.tmp \
- -i $rawFile --arch $arch \
- --user "$AWS_ACCOUNT" -c "$EC2_CERT" -k "$EC2_PRIVATE_KEY"
- mv $imageDir.tmp $imageDir
- fi
+ write_state "$state_key" ami_id "$ami_id"
+ fi
- # Upload the bundle to S3.
- if ! [ -e $imageDir/uploaded ]; then
- echo "uploading bundle to S3..."
- ec2-upload-bundle \
- -m $imageDir/$type.raw.manifest.xml \
- -b "$bucket/$bucketDir" \
- -a "$AWS_ACCESS_KEY_ID" -s "$AWS_SECRET_ACCESS_KEY" \
- --location EU
- touch $imageDir/uploaded
- fi
+ make_image_public $region "$ami_id"
- extraFlags="--image-location $bucket/$bucketDir/$type.raw.manifest.xml"
+ echo "$ami_id"
+}
- else
+upload_all() {
+ home_image_id=$(upload_image "$home_region")
+ jq -n \
+ --arg key "$home_region.$image_system" \
+ --arg value "$home_image_id" \
+ '$ARGS.named'
- # Convert the image to vhd format so we don't have
- # to upload a huge raw image.
- vhdFile=$stateDir/$type.vhd
- if ! [ -e $vhdFile ]; then
- qemu-img convert -f qcow2 -O vpc $imageFile $vhdFile.tmp
- mv $vhdFile.tmp $vhdFile
- fi
-
- vhdFileLogicalBytes="$(qemu-img info "$vhdFile" | grep ^virtual\ size: | cut -f 2 -d \( | cut -f 1 -d \ )"
- vhdFileLogicalGigaBytes=$(((vhdFileLogicalBytes-1)/1024/1024/1024+1)) # Round to the next GB
-
- echo "Disk size is $vhdFileLogicalBytes bytes. Will be registered as $vhdFileLogicalGigaBytes GB."
-
- taskId=$(cat $stateDir/$region.$type.task-id 2> /dev/null || true)
- volId=$(cat $stateDir/$region.$type.vol-id 2> /dev/null || true)
- snapId=$(cat $stateDir/$region.$type.snap-id 2> /dev/null || true)
-
- # Import the VHD file.
- if [ -z "$snapId" -a -z "$volId" -a -z "$taskId" ]; then
- echo "importing $vhdFile..."
- taskId=$(ec2-import-volume $vhdFile --no-upload -f vhd \
- -O "$AWS_ACCESS_KEY_ID" -W "$AWS_SECRET_ACCESS_KEY" \
- -o "$AWS_ACCESS_KEY_ID" -w "$AWS_SECRET_ACCESS_KEY" \
- --region "$region" -z "${region}a" \
- --bucket "$bucket" --prefix "$bucketDir/" \
- | tee /dev/stderr \
- | sed 's/.*\(import-vol-[0-9a-z]\+\).*/\1/ ; t ; d')
- echo -n "$taskId" > $stateDir/$region.$type.task-id
- fi
-
- if [ -z "$snapId" -a -z "$volId" ]; then
- ec2-resume-import $vhdFile -t "$taskId" --region "$region" \
- -O "$AWS_ACCESS_KEY_ID" -W "$AWS_SECRET_ACCESS_KEY" \
- -o "$AWS_ACCESS_KEY_ID" -w "$AWS_SECRET_ACCESS_KEY"
- fi
-
- # Wait for the volume creation to finish.
- if [ -z "$snapId" -a -z "$volId" ]; then
- echo "waiting for import to finish..."
- while true; do
- volId=$(aws ec2 describe-conversion-tasks --conversion-task-ids "$taskId" --region "$region" | jq -r .ConversionTasks[0].ImportVolume.Volume.Id)
- if [ "$volId" != null ]; then break; fi
- sleep 10
- done
-
- echo -n "$volId" > $stateDir/$region.$type.vol-id
- fi
-
- # Delete the import task.
- if [ -n "$volId" -a -n "$taskId" ]; then
- echo "removing import task..."
- ec2-delete-disk-image -t "$taskId" --region "$region" \
- -O "$AWS_ACCESS_KEY_ID" -W "$AWS_SECRET_ACCESS_KEY" \
- -o "$AWS_ACCESS_KEY_ID" -w "$AWS_SECRET_ACCESS_KEY" || true
- rm -f $stateDir/$region.$type.task-id
- fi
-
- # Create a snapshot.
- if [ -z "$snapId" ]; then
- echo "creating snapshot..."
- # FIXME: this can fail with InvalidVolume.NotFound. Eventual consistency yay.
- snapId=$(aws ec2 create-snapshot --volume-id "$volId" --region "$region" --description "$description" | jq -r .SnapshotId)
- if [ "$snapId" = null ]; then exit 1; fi
- echo -n "$snapId" > $stateDir/$region.$type.snap-id
- fi
-
- # Wait for the snapshot to finish.
- echo "waiting for snapshot to finish..."
- while true; do
- status=$(aws ec2 describe-snapshots --snapshot-ids "$snapId" --region "$region" | jq -r .Snapshots[0].State)
- if [ "$status" = completed ]; then break; fi
- sleep 10
- done
-
- # Delete the volume.
- if [ -n "$volId" ]; then
- echo "deleting volume..."
- aws ec2 delete-volume --volume-id "$volId" --region "$region" || true
- rm -f $stateDir/$region.$type.vol-id
- fi
-
- blockDeviceMappings="DeviceName=/dev/sda1,Ebs={SnapshotId=$snapId,VolumeSize=$vhdFileLogicalGigaBytes,DeleteOnTermination=true,VolumeType=gp2}"
- extraFlags=""
-
- if [ $type = pv ]; then
- extraFlags+=" --root-device-name /dev/sda1"
- else
- extraFlags+=" --root-device-name /dev/sda1"
- extraFlags+=" --sriov-net-support simple"
- extraFlags+=" --ena-support"
- fi
-
- blockDeviceMappings+=" DeviceName=/dev/sdb,VirtualName=ephemeral0"
- blockDeviceMappings+=" DeviceName=/dev/sdc,VirtualName=ephemeral1"
- blockDeviceMappings+=" DeviceName=/dev/sdd,VirtualName=ephemeral2"
- blockDeviceMappings+=" DeviceName=/dev/sde,VirtualName=ephemeral3"
- fi
-
- if [ $type = hvm ]; then
- extraFlags+=" --sriov-net-support simple"
- extraFlags+=" --ena-support"
- fi
-
- # Register the AMI.
- if [ $type = pv ]; then
- kernel=$(aws ec2 describe-images --owner amazon --filters "Name=name,Values=pv-grub-hd0_1.05-$arch.gz" | jq -r .Images[0].ImageId)
- if [ "$kernel" = null ]; then break; fi
- echo "using PV-GRUB kernel $kernel"
- extraFlags+=" --virtualization-type paravirtual --kernel $kernel"
- else
- extraFlags+=" --virtualization-type hvm"
- fi
-
- ami=$(aws ec2 register-image \
- --name "$name" \
- --description "$description" \
- --region "$region" \
- --architecture "$arch" \
- --block-device-mappings $blockDeviceMappings \
- $extraFlags | jq -r .ImageId)
- if [ "$ami" = null ]; then break; fi
- fi
-
- echo -n "$ami" > $amiFile
- echo "created AMI $ami of type '$type' in $region..."
-
- else
- ami=$(cat $amiFile)
- fi
-
- echo "region = $region, type = $type, store = $store, ami = $ami"
-
- if [ -z "$prevAmi" ]; then
- prevAmi="$ami"
- prevRegion="$region"
- fi
- done
+ for region in "${regions[@]}"; do
+ if [ "$region" = "$home_region" ]; then
+ continue
+ fi
+ copied_image_id=$(copy_to_region "$region" "$home_region" "$home_image_id")
+ jq -n \
+ --arg key "$region.$image_system" \
+ --arg value "$copied_image_id" \
+ '$ARGS.named'
done
+}
-done
-
-for type in $types; do
- link=$stateDir/$type
- system=x86_64-linux
- arch=x86_64
-
- for store in $stores; do
-
- for region in $regions; do
-
- name=nixos-$version-$arch-$type-$store
- amiFile=$stateDir/$region.$type.$store.ami-id
- ami=$(cat $amiFile)
-
- echo "region = $region, type = $type, store = $store, ami = $ami"
-
- echo -n "waiting for AMI..."
- while true; do
- status=$(aws ec2 describe-images --image-ids "$ami" --region "$region" | jq -r .Images[0].State)
- if [ "$status" = available ]; then break; fi
- sleep 10
- echo -n '.'
- done
- echo
-
- # Make the image public.
- aws ec2 modify-image-attribute \
- --image-id "$ami" --region "$region" --launch-permission 'Add={Group=all}'
-
- echo " \"$major\".$region.$type-$store = \"$ami\";" >> ec2-amis.nix
- done
-
- done
-
-done
+upload_all | jq --slurp from_entries
diff --git a/nixos/modules/config/fonts/fontconfig-penultimate.nix b/nixos/modules/config/fonts/fontconfig-penultimate.nix
index 04fa8b9559a9..7e311a21acf6 100644
--- a/nixos/modules/config/fonts/fontconfig-penultimate.nix
+++ b/nixos/modules/config/fonts/fontconfig-penultimate.nix
@@ -35,8 +35,8 @@ let
then "fontconfig"
else "fontconfig_${version}";
makeCache = fontconfig: pkgs.makeFontsCache { inherit fontconfig; fontDirectories = config.fonts.fonts; };
- cache = makeCache pkgs."${fcPackage}";
- cache32 = makeCache pkgs.pkgsi686Linux."${fcPackage}";
+ cache = makeCache pkgs.${fcPackage};
+ cache32 = makeCache pkgs.pkgsi686Linux.${fcPackage};
in
pkgs.writeText "fc-00-nixos-cache.conf" ''
@@ -52,85 +52,11 @@ let
'';
+ # local configuration file
localConf = pkgs.writeText "fc-local.conf" cfg.localConf;
- # The configuration to be included in /etc/font/
- penultimateConf = pkgs.runCommand "font-penultimate-conf" {
- preferLocalBuild = true;
- } ''
- support_folder=$out/etc/fonts/conf.d
- latest_folder=$out/etc/fonts/${latestVersion}/conf.d
-
- mkdir -p $support_folder
- mkdir -p $latest_folder
-
- ln -s ${supportFontsConf} $support_folder/../fonts.conf
- ln -s ${latestPkg.out}/etc/fonts/fonts.conf \
- $latest_folder/../fonts.conf
-
- # fontconfig-penultimate various configuration files
- ln -s ${pkgs.fontconfig-penultimate}/etc/fonts/conf.d/*.conf \
- $support_folder
- ln -s ${pkgs.fontconfig-penultimate}/etc/fonts/conf.d/*.conf \
- $latest_folder
-
- ln -s ${cacheConfSupport} $support_folder/00-nixos-cache.conf
- ln -s ${cacheConfLatest} $latest_folder/00-nixos-cache.conf
-
- rm $support_folder/10-antialias.conf $latest_folder/10-antialias.conf
- ln -s ${antialiasConf} $support_folder/10-antialias.conf
- ln -s ${antialiasConf} $latest_folder/10-antialias.conf
-
- rm $support_folder/10-hinting.conf $latest_folder/10-hinting.conf
- ln -s ${hintingConf} $support_folder/10-hinting.conf
- ln -s ${hintingConf} $latest_folder/10-hinting.conf
-
- ${optionalString cfg.useEmbeddedBitmaps ''
- rm $support_folder/10-no-embedded-bitmaps.conf
- rm $latest_folder/10-no-embedded-bitmaps.conf
- ''}
-
- rm $support_folder/10-subpixel.conf $latest_folder/10-subpixel.conf
- ln -s ${subpixelConf} $support_folder/10-subpixel.conf
- ln -s ${subpixelConf} $latest_folder/10-subpixel.conf
-
- ${optionalString (cfg.dpi != 0) ''
- ln -s ${dpiConf} $support_folder/11-dpi.conf
- ln -s ${dpiConf} $latest_folder/11-dpi.conf
- ''}
-
- ${optionalString (!cfg.includeUserConf) ''
- rm $support_folder/50-user.conf
- rm $latest_folder/50-user.conf
- ''}
-
- # 51-local.conf
- rm $latest_folder/51-local.conf
- substitute \
- ${pkgs.fontconfig-penultimate}/etc/fonts/conf.d/51-local.conf \
- $latest_folder/51-local.conf \
- --replace local.conf /etc/fonts/${latestVersion}/local.conf
-
- # local.conf (indirect priority 51)
- ${optionalString (cfg.localConf != "") ''
- ln -s ${localConf} $out/etc/fonts/local.conf
- ln -s ${localConf} $out/etc/fonts/${latestVersion}/local.conf
- ''}
-
- ln -s ${defaultFontsConf} $support_folder/52-default-fonts.conf
- ln -s ${defaultFontsConf} $latest_folder/52-default-fonts.conf
-
- ${optionalString cfg.allowBitmaps ''
- rm $support_folder/53-no-bitmaps.conf
- rm $latest_folder/53-no-bitmaps.conf
- ''}
-
- ${optionalString (!cfg.allowType1) ''
- ln -s ${rejectType1} $support_folder/53-no-type1.conf
- ln -s ${rejectType1} $latest_folder/53-no-type1.conf
- ''}
- '';
-
+ # rendering settings configuration files
+ # priority 10
hintingConf = pkgs.writeText "fc-10-hinting.conf" ''
@@ -199,6 +125,8 @@ let
'';
+ # default fonts configuration file
+ # priority 52
defaultFontsConf =
let genDefault = fonts: name:
optionalString (fonts != []) ''
@@ -228,7 +156,9 @@ let
'';
- rejectType1 = pkgs.writeText "fc-53-no-type1.conf" ''
+ # reject Type 1 fonts
+ # priority 53
+ rejectType1 = pkgs.writeText "fc-53-nixos-reject-type1.conf" ''
@@ -245,6 +175,88 @@ let
'';
+ # The configuration to be included in /etc/font/
+ penultimateConf = pkgs.runCommand "fontconfig-penultimate-conf" {
+ preferLocalBuild = true;
+ } ''
+ support_folder=$out/etc/fonts/conf.d
+ latest_folder=$out/etc/fonts/${latestVersion}/conf.d
+
+ mkdir -p $support_folder
+ mkdir -p $latest_folder
+
+ # fonts.conf
+ ln -s ${supportFontsConf} $support_folder/../fonts.conf
+ ln -s ${latestPkg.out}/etc/fonts/fonts.conf \
+ $latest_folder/../fonts.conf
+
+ # fontconfig-penultimate various configuration files
+ ln -s ${pkgs.fontconfig-penultimate}/etc/fonts/conf.d/*.conf \
+ $support_folder
+ ln -s ${pkgs.fontconfig-penultimate}/etc/fonts/conf.d/*.conf \
+ $latest_folder
+
+ ln -s ${cacheConfSupport} $support_folder/00-nixos-cache.conf
+ ln -s ${cacheConfLatest} $latest_folder/00-nixos-cache.conf
+
+ rm $support_folder/10-antialias.conf $latest_folder/10-antialias.conf
+ ln -s ${antialiasConf} $support_folder/10-antialias.conf
+ ln -s ${antialiasConf} $latest_folder/10-antialias.conf
+
+ rm $support_folder/10-hinting.conf $latest_folder/10-hinting.conf
+ ln -s ${hintingConf} $support_folder/10-hinting.conf
+ ln -s ${hintingConf} $latest_folder/10-hinting.conf
+
+ ${optionalString cfg.useEmbeddedBitmaps ''
+ rm $support_folder/10-no-embedded-bitmaps.conf
+ rm $latest_folder/10-no-embedded-bitmaps.conf
+ ''}
+
+ rm $support_folder/10-subpixel.conf $latest_folder/10-subpixel.conf
+ ln -s ${subpixelConf} $support_folder/10-subpixel.conf
+ ln -s ${subpixelConf} $latest_folder/10-subpixel.conf
+
+ ${optionalString (cfg.dpi != 0) ''
+ ln -s ${dpiConf} $support_folder/11-dpi.conf
+ ln -s ${dpiConf} $latest_folder/11-dpi.conf
+ ''}
+
+ # 50-user.conf
+ ${optionalString (!cfg.includeUserConf) ''
+ rm $support_folder/50-user.conf
+ rm $latest_folder/50-user.conf
+ ''}
+
+ # 51-local.conf
+ rm $latest_folder/51-local.conf
+ substitute \
+ ${pkgs.fontconfig-penultimate}/etc/fonts/conf.d/51-local.conf \
+ $latest_folder/51-local.conf \
+ --replace local.conf /etc/fonts/${latestVersion}/local.conf
+
+ # local.conf (indirect priority 51)
+ ${optionalString (cfg.localConf != "") ''
+ ln -s ${localConf} $support_folder/../local.conf
+ ln -s ${localConf} $latest_folder/../local.conf
+ ''}
+
+ # 52-nixos-default-fonts.conf
+ ln -s ${defaultFontsConf} $support_folder/52-nixos-default-fonts.conf
+ ln -s ${defaultFontsConf} $latest_folder/52-nixos-default-fonts.conf
+
+ # 53-no-bitmaps.conf
+ ${optionalString cfg.allowBitmaps ''
+ rm $support_folder/53-no-bitmaps.conf
+ rm $latest_folder/53-no-bitmaps.conf
+ ''}
+
+ ${optionalString (!cfg.allowType1) ''
+ # 53-nixos-reject-type1.conf
+ ln -s ${rejectType1} $support_folder/53-nixos-reject-type1.conf
+ ln -s ${rejectType1} $latest_folder/53-nixos-reject-type1.conf
+ ''}
+ '';
+
in
{
@@ -257,7 +269,7 @@ in
penultimate = {
enable = mkOption {
type = types.bool;
- default = true;
+ default = false;
description = ''
Enable fontconfig-penultimate settings to supplement the
NixOS defaults by providing per-font rendering defaults and
diff --git a/nixos/modules/config/fonts/fontconfig-ultimate.nix b/nixos/modules/config/fonts/fontconfig-ultimate.nix
index 45328f3eaf13..84d90899dfff 100644
--- a/nixos/modules/config/fonts/fontconfig-ultimate.nix
+++ b/nixos/modules/config/fonts/fontconfig-ultimate.nix
@@ -79,7 +79,7 @@ in
config = mkIf (config.fonts.fontconfig.enable && cfg.enable) {
fonts.fontconfig.confPackages = [ confPkg ];
- environment.variables."INFINALITY_FT" = cfg.preset;
+ environment.variables.INFINALITY_FT = cfg.preset;
};
diff --git a/nixos/modules/config/fonts/fontconfig.nix b/nixos/modules/config/fonts/fontconfig.nix
index 724158f73821..8f227c423266 100644
--- a/nixos/modules/config/fonts/fontconfig.nix
+++ b/nixos/modules/config/fonts/fontconfig.nix
@@ -14,250 +14,254 @@ Low number means high priority.
*/
-{ config, lib, pkgs, ... }:
+{ config, pkgs, lib, ... }:
with lib;
-let cfg = config.fonts.fontconfig;
+let
+ cfg = config.fonts.fontconfig;
- fcBool = x: "" + (boolToString x) + "";
+ fcBool = x: "" + (boolToString x) + "";
- # back-supported fontconfig version and package
- # version is used for font cache generation
- supportVersion = "210";
- supportPkg = pkgs."fontconfig_${supportVersion}";
+ # back-supported fontconfig version and package
+ # version is used for font cache generation
+ supportVersion = "210";
+ supportPkg = pkgs."fontconfig_${supportVersion}";
- # latest fontconfig version and package
- # version is used for configuration folder name, /etc/fonts/VERSION/
- # note: format differs from supportVersion and can not be used with makeCacheConf
- latestVersion = pkgs.fontconfig.configVersion;
- latestPkg = pkgs.fontconfig;
+ # latest fontconfig version and package
+ # version is used for configuration folder name, /etc/fonts/VERSION/
+ # note: format differs from supportVersion and can not be used with makeCacheConf
+ latestVersion = pkgs.fontconfig.configVersion;
+ latestPkg = pkgs.fontconfig;
- # supported version fonts.conf
- supportFontsConf = pkgs.makeFontsConf { fontconfig = supportPkg; fontDirectories = config.fonts.fonts; };
+ # supported version fonts.conf
+ supportFontsConf = pkgs.makeFontsConf { fontconfig = supportPkg; fontDirectories = config.fonts.fonts; };
- # configuration file to read fontconfig cache
- # version dependent
- # priority 0
- cacheConfSupport = makeCacheConf { version = supportVersion; };
- cacheConfLatest = makeCacheConf {};
+ # configuration file to read fontconfig cache
+ # version dependent
+ # priority 0
+ cacheConfSupport = makeCacheConf { version = supportVersion; };
+ cacheConfLatest = makeCacheConf {};
- # generate the font cache setting file for a fontconfig version
- # use latest when no version is passed
- makeCacheConf = { version ? null }:
- let
- fcPackage = if version == null
- then "fontconfig"
- else "fontconfig_${version}";
- makeCache = fontconfig: pkgs.makeFontsCache { inherit fontconfig; fontDirectories = config.fonts.fonts; };
- cache = makeCache pkgs."${fcPackage}";
- cache32 = makeCache pkgs.pkgsi686Linux."${fcPackage}";
- in
- pkgs.writeText "fc-00-nixos-cache.conf" ''
-
-
-
-
- ${concatStringsSep "\n" (map (font: "${font}") config.fonts.fonts)}
-
- ${cache}
- ${optionalString (pkgs.stdenv.isx86_64 && cfg.cache32Bit) ''
- ${cache32}
- ''}
-
- '';
-
- # rendering settings configuration file
- # priority 10
- renderConf = pkgs.writeText "fc-10-nixos-rendering.conf" ''
+ # generate the font cache setting file for a fontconfig version
+ # use latest when no version is passed
+ makeCacheConf = { version ? null }:
+ let
+ fcPackage = if version == null
+ then "fontconfig"
+ else "fontconfig_${version}";
+ makeCache = fontconfig: pkgs.makeFontsCache { inherit fontconfig; fontDirectories = config.fonts.fonts; };
+ cache = makeCache pkgs.${fcPackage};
+ cache32 = makeCache pkgs.pkgsi686Linux.${fcPackage};
+ in
+ pkgs.writeText "fc-00-nixos-cache.conf" ''
-
-
-
-
- ${fcBool cfg.hinting.enable}
-
-
- ${fcBool cfg.hinting.autohint}
-
-
- hintslight
-
-
- ${fcBool cfg.antialias}
-
-
- ${cfg.subpixel.rgba}
-
-
- lcd${cfg.subpixel.lcdfilter}
-
-
-
- ${optionalString (cfg.dpi != 0) ''
-
-
- ${toString cfg.dpi}
-
-
+
+ ${concatStringsSep "\n" (map (font: "${font}") config.fonts.fonts)}
+
+ ${cache}
+ ${optionalString (pkgs.stdenv.isx86_64 && cfg.cache32Bit) ''
+ ${cache32}
''}
-
'';
- # local configuration file
- # priority 51
- localConf = pkgs.writeText "fc-local.conf" cfg.localConf;
+ # rendering settings configuration file
+ # priority 10
+ renderConf = pkgs.writeText "fc-10-nixos-rendering.conf" ''
+
+
+
- # default fonts configuration file
- # priority 52
- defaultFontsConf =
- let genDefault = fonts: name:
- optionalString (fonts != []) ''
-
- ${name}
-
- ${concatStringsSep ""
- (map (font: ''
- ${font}
- '') fonts)}
-
-
- '';
- in
- pkgs.writeText "fc-52-nixos-default-fonts.conf" ''
-
-
-
-
-
- ${genDefault cfg.defaultFonts.sansSerif "sans-serif"}
-
- ${genDefault cfg.defaultFonts.serif "serif"}
-
- ${genDefault cfg.defaultFonts.monospace "monospace"}
-
-
- '';
-
- # bitmap font options
- # priority 53
- rejectBitmaps = pkgs.writeText "fc-53-nixos-bitmaps.conf" ''
-
-
-
-
- ${optionalString (!cfg.allowBitmaps) ''
-
-
-
-
- false
-
-
-
- ''}
-
-
-
-
- ${fcBool cfg.useEmbeddedBitmaps}
+
+
+
+ ${fcBool cfg.hinting.enable}
+
+
+ ${fcBool cfg.hinting.autohint}
+
+
+ hintslight
+
+
+ ${fcBool cfg.antialias}
+
+
+ ${cfg.subpixel.rgba}
+
+
+ lcd${cfg.subpixel.lcdfilter}
-
- '';
-
- # reject Type 1 fonts
- # priority 53
- rejectType1 = pkgs.writeText "fc-53-nixos-reject-type1.conf" ''
-
-
-
-
-
-
-
-
- Type 1
-
-
-
-
-
- '';
-
- # fontconfig configuration package
- confPkg = pkgs.runCommand "fontconfig-conf" { preferLocalBuild = true; } ''
- support_folder=$out/etc/fonts
- latest_folder=$out/etc/fonts/${latestVersion}
-
- mkdir -p $support_folder/conf.d
- mkdir -p $latest_folder/conf.d
-
- # fonts.conf
- ln -s ${supportFontsConf} $support_folder/fonts.conf
- ln -s ${latestPkg.out}/etc/fonts/fonts.conf \
- $latest_folder/fonts.conf
-
- # fontconfig default config files
- ln -s ${supportPkg.out}/etc/fonts/conf.d/*.conf \
- $support_folder/conf.d/
- ln -s ${latestPkg.out}/etc/fonts/conf.d/*.conf \
- $latest_folder/conf.d/
-
- # update latest 51-local.conf path to look at the latest local.conf
- rm $latest_folder/conf.d/51-local.conf
-
- substitute ${latestPkg.out}/etc/fonts/conf.d/51-local.conf \
- $latest_folder/conf.d/51-local.conf \
- --replace local.conf /etc/fonts/${latestVersion}/local.conf
-
- # 00-nixos-cache.conf
- ln -s ${cacheConfSupport} \
- $support_folder/conf.d/00-nixos-cache.conf
- ln -s ${cacheConfLatest} $latest_folder/conf.d/00-nixos-cache.conf
-
- # 10-nixos-rendering.conf
- ln -s ${renderConf} $support_folder/conf.d/10-nixos-rendering.conf
- ln -s ${renderConf} $latest_folder/conf.d/10-nixos-rendering.conf
-
- # 50-user.conf
- ${optionalString (! cfg.includeUserConf) ''
- rm $support_folder/conf.d/50-user.conf
- rm $latest_folder/conf.d/50-user.conf
+ ${optionalString (cfg.dpi != 0) ''
+
+
+ ${toString cfg.dpi}
+
+
''}
- # local.conf (indirect priority 51)
- ${optionalString (cfg.localConf != "") ''
- ln -s ${localConf} $support_folder/local.conf
- ln -s ${localConf} $latest_folder/local.conf
- ''}
+
+ '';
- # 52-nixos-default-fonts.conf
- ln -s ${defaultFontsConf} $support_folder/conf.d/52-nixos-default-fonts.conf
- ln -s ${defaultFontsConf} $latest_folder/conf.d/52-nixos-default-fonts.conf
+ # local configuration file
+ localConf = pkgs.writeText "fc-local.conf" cfg.localConf;
- # 53-nixos-bitmaps.conf
- ln -s ${rejectBitmaps} $support_folder/conf.d/53-nixos-bitmaps.conf
- ln -s ${rejectBitmaps} $latest_folder/conf.d/53-nixos-bitmaps.conf
+ # default fonts configuration file
+ # priority 52
+ defaultFontsConf =
+ let genDefault = fonts: name:
+ optionalString (fonts != []) ''
+
+ ${name}
+
+ ${concatStringsSep ""
+ (map (font: ''
+ ${font}
+ '') fonts)}
+
+
+ '';
+ in
+ pkgs.writeText "fc-52-nixos-default-fonts.conf" ''
+
+
+
- ${optionalString (! cfg.allowType1) ''
- # 53-nixos-reject-type1.conf
- ln -s ${rejectType1} $support_folder/conf.d/53-nixos-reject-type1.conf
- ln -s ${rejectType1} $latest_folder/conf.d/53-nixos-reject-type1.conf
- ''}
- '';
+
+ ${genDefault cfg.defaultFonts.sansSerif "sans-serif"}
- # Package with configuration files
- # this merge all the packages in the fonts.fontconfig.confPackages list
- fontconfigEtc = pkgs.buildEnv {
- name = "fontconfig-etc";
- paths = cfg.confPackages;
- ignoreCollisions = true;
- };
+ ${genDefault cfg.defaultFonts.serif "serif"}
+
+ ${genDefault cfg.defaultFonts.monospace "monospace"}
+
+ ${genDefault cfg.defaultFonts.emoji "emoji"}
+
+
+ '';
+
+ # bitmap font options
+ # priority 53
+ rejectBitmaps = pkgs.writeText "fc-53-no-bitmaps.conf" ''
+
+
+
+
+ ${optionalString (!cfg.allowBitmaps) ''
+
+
+
+
+ false
+
+
+
+ ''}
+
+
+
+
+ ${fcBool cfg.useEmbeddedBitmaps}
+
+
+
+
+ '';
+
+ # reject Type 1 fonts
+ # priority 53
+ rejectType1 = pkgs.writeText "fc-53-nixos-reject-type1.conf" ''
+
+
+
+
+
+
+
+
+ Type 1
+
+
+
+
+
+ '';
+
+ # fontconfig configuration package
+ confPkg = pkgs.runCommand "fontconfig-conf" {
+ preferLocalBuild = true;
+ } ''
+ support_folder=$out/etc/fonts/conf.d
+ latest_folder=$out/etc/fonts/${latestVersion}/conf.d
+
+ mkdir -p $support_folder
+ mkdir -p $latest_folder
+
+ # fonts.conf
+ ln -s ${supportFontsConf} $support_folder/../fonts.conf
+ ln -s ${latestPkg.out}/etc/fonts/fonts.conf \
+ $latest_folder/../fonts.conf
+
+ # fontconfig default config files
+ ln -s ${supportPkg.out}/etc/fonts/conf.d/*.conf \
+ $support_folder/
+ ln -s ${latestPkg.out}/etc/fonts/conf.d/*.conf \
+ $latest_folder/
+
+ # update latest 51-local.conf path to look at the latest local.conf
+ rm $latest_folder/51-local.conf
+
+ substitute ${latestPkg.out}/etc/fonts/conf.d/51-local.conf \
+ $latest_folder/51-local.conf \
+ --replace local.conf /etc/fonts/${latestVersion}/local.conf
+
+ # 00-nixos-cache.conf
+ ln -s ${cacheConfSupport} \
+ $support_folder/00-nixos-cache.conf
+ ln -s ${cacheConfLatest} $latest_folder/00-nixos-cache.conf
+
+ # 10-nixos-rendering.conf
+ ln -s ${renderConf} $support_folder/10-nixos-rendering.conf
+ ln -s ${renderConf} $latest_folder/10-nixos-rendering.conf
+
+ # 50-user.conf
+ ${optionalString (!cfg.includeUserConf) ''
+ rm $support_folder/50-user.conf
+ rm $latest_folder/50-user.conf
+ ''}
+
+ # local.conf (indirect priority 51)
+ ${optionalString (cfg.localConf != "") ''
+ ln -s ${localConf} $support_folder/../local.conf
+ ln -s ${localConf} $latest_folder/../local.conf
+ ''}
+
+ # 52-nixos-default-fonts.conf
+ ln -s ${defaultFontsConf} $support_folder/52-nixos-default-fonts.conf
+ ln -s ${defaultFontsConf} $latest_folder/52-nixos-default-fonts.conf
+
+ # 53-no-bitmaps.conf
+ ln -s ${rejectBitmaps} $support_folder/53-no-bitmaps.conf
+ ln -s ${rejectBitmaps} $latest_folder/53-no-bitmaps.conf
+
+ ${optionalString (!cfg.allowType1) ''
+ # 53-nixos-reject-type1.conf
+ ln -s ${rejectType1} $support_folder/53-nixos-reject-type1.conf
+ ln -s ${rejectType1} $latest_folder/53-nixos-reject-type1.conf
+ ''}
+ '';
+
+ # Package with configuration files
+ # this merge all the packages in the fonts.fontconfig.confPackages list
+ fontconfigEtc = pkgs.buildEnv {
+ name = "fontconfig-etc";
+ paths = cfg.confPackages;
+ ignoreCollisions = true;
+ };
in
{
@@ -342,6 +346,21 @@ in
in case multiple languages must be supported.
'';
};
+
+ emoji = mkOption {
+ type = types.listOf types.str;
+ default = ["Noto Color Emoji"];
+ description = ''
+ System-wide default emoji font(s). Multiple fonts may be listed
+ in case a font does not support all emoji.
+
+ Note that fontconfig matches color emoji fonts preferentially,
+ so if you want to use a black and white font while having
+ a color font installed (eg. Noto Color Emoji installed alongside
+ Noto Emoji), fontconfig will still choose the color font even
+ when it is later in the list.
+ '';
+ };
};
hinting = {
diff --git a/nixos/modules/config/fonts/fonts.nix b/nixos/modules/config/fonts/fonts.nix
index 0dd01df9da74..abb806b601a7 100644
--- a/nixos/modules/config/fonts/fonts.nix
+++ b/nixos/modules/config/fonts/fonts.nix
@@ -43,6 +43,7 @@ with lib;
pkgs.xorg.fontmiscmisc
pkgs.xorg.fontcursormisc
pkgs.unifont
+ pkgs.noto-fonts-emoji
];
};
diff --git a/nixos/modules/config/gtk/gtk-icon-cache.nix b/nixos/modules/config/gtk/gtk-icon-cache.nix
index 9c5d993b9c59..86a6bfb5af41 100644
--- a/nixos/modules/config/gtk/gtk-icon-cache.nix
+++ b/nixos/modules/config/gtk/gtk-icon-cache.nix
@@ -7,7 +7,7 @@ with lib;
type = types.bool;
default = config.services.xserver.enable;
description = ''
- Whether to build icon theme caches for GTK+ applications.
+ Whether to build icon theme caches for GTK applications.
'';
};
};
diff --git a/nixos/modules/config/krb5/default.nix b/nixos/modules/config/krb5/default.nix
index 87021a27d34f..ff16ffcf9c65 100644
--- a/nixos/modules/config/krb5/default.nix
+++ b/nixos/modules/config/krb5/default.nix
@@ -15,7 +15,7 @@ let
realms = optionalAttrs (lib.all (value: value != null) [
cfg.defaultRealm cfg.kdc cfg.kerberosAdminServer
]) {
- "${cfg.defaultRealm}" = {
+ ${cfg.defaultRealm} = {
kdc = cfg.kdc;
admin_server = cfg.kerberosAdminServer;
};
@@ -25,7 +25,7 @@ let
cfg.domainRealm cfg.defaultRealm
]) {
".${cfg.domainRealm}" = cfg.defaultRealm;
- "${cfg.domainRealm}" = cfg.defaultRealm;
+ ${cfg.domainRealm} = cfg.defaultRealm;
};
};
diff --git a/nixos/modules/config/timezone.nix b/nixos/modules/config/locale.nix
similarity index 62%
rename from nixos/modules/config/timezone.nix
rename to nixos/modules/config/locale.nix
index b15948f6e2e5..6f0565881877 100644
--- a/nixos/modules/config/timezone.nix
+++ b/nixos/modules/config/locale.nix
@@ -9,6 +9,8 @@ let
timezone = types.nullOr (types.addCheck types.str nospace)
// { description = "null or string without spaces"; };
+ lcfg = config.location;
+
in
{
@@ -37,12 +39,45 @@ in
};
};
+
+ location = {
+
+ latitude = mkOption {
+ type = types.float;
+ description = ''
+ Your current latitude, between
+ -90.0 and 90.0. Must be provided
+ along with longitude.
+ '';
+ };
+
+ longitude = mkOption {
+ type = types.float;
+ description = ''
+ Your current longitude, between
+ between -180.0 and 180.0. Must be
+ provided along with latitude.
+ '';
+ };
+
+ provider = mkOption {
+ type = types.enum [ "manual" "geoclue2" ];
+ default = "manual";
+ description = ''
+ The location provider to use for determining your location. If set to
+ manual you must also provide latitude/longitude.
+ '';
+ };
+
+ };
};
config = {
environment.sessionVariables.TZDIR = "/etc/zoneinfo";
+ services.geoclue2.enable = mkIf (lcfg.provider == "geoclue2") true;
+
# This way services are restarted when tzdata changes.
systemd.globalEnvironment.TZDIR = tzdir;
diff --git a/nixos/modules/config/malloc.nix b/nixos/modules/config/malloc.nix
index 65130454735c..31a659ee83fe 100644
--- a/nixos/modules/config/malloc.nix
+++ b/nixos/modules/config/malloc.nix
@@ -6,7 +6,7 @@ let
# The set of alternative malloc(3) providers.
providers = {
- "graphene-hardened" = rec {
+ graphene-hardened = {
libPath = "${pkgs.graphene-hardened-malloc}/lib/libhardened_malloc.so";
description = ''
An allocator designed to mitigate memory corruption attacks, such as
@@ -14,7 +14,7 @@ let
'';
};
- "jemalloc" = {
+ jemalloc = {
libPath = "${pkgs.jemalloc}/lib/libjemalloc.so";
description = ''
A general purpose allocator that emphasizes fragmentation avoidance
@@ -22,7 +22,7 @@ let
'';
};
- "scudo" = {
+ scudo = {
libPath = "${pkgs.llvmPackages.compiler-rt}/lib/linux/libclang_rt.scudo-x86_64.so";
description = ''
A user-mode allocator based on LLVM Sanitizer’s CombinedAllocator,
@@ -32,7 +32,7 @@ let
};
};
- providerConf = providers."${cfg.provider}";
+ providerConf = providers.${cfg.provider};
# An output that contains only the shared library, to avoid
# needlessly bloating the system closure
diff --git a/nixos/modules/config/networking.nix b/nixos/modules/config/networking.nix
index 4b9086022ed5..a89667ea221c 100644
--- a/nixos/modules/config/networking.nix
+++ b/nixos/modules/config/networking.nix
@@ -171,13 +171,13 @@ in
environment.etc =
{ # /etc/services: TCP/UDP port assignments.
- "services".source = pkgs.iana-etc + "/etc/services";
+ services.source = pkgs.iana-etc + "/etc/services";
# /etc/protocols: IP protocol numbers.
- "protocols".source = pkgs.iana-etc + "/etc/protocols";
+ protocols.source = pkgs.iana-etc + "/etc/protocols";
# /etc/hosts: Hostname-to-IP mappings.
- "hosts".text = let
+ hosts.text = let
oneToString = set: ip: ip + " " + concatStringsSep " " set.${ip};
allToString = set: concatMapStringsSep "\n" (oneToString set) (attrNames set);
in ''
@@ -190,7 +190,7 @@ in
} // optionalAttrs (pkgs.stdenv.hostPlatform.libc == "glibc") {
# /etc/rpc: RPC program numbers.
- "rpc".source = pkgs.glibc.out + "/etc/rpc";
+ rpc.source = pkgs.glibc.out + "/etc/rpc";
};
networking.proxy.envVars =
diff --git a/nixos/modules/config/no-x-libs.nix b/nixos/modules/config/no-x-libs.nix
index 74cf74d74181..873b8073fed9 100644
--- a/nixos/modules/config/no-x-libs.nix
+++ b/nixos/modules/config/no-x-libs.nix
@@ -34,7 +34,6 @@ with lib;
networkmanager-openvpn = super.networkmanager-openvpn.override { withGnome = false; };
networkmanager-vpnc = super.networkmanager-vpnc.override { withGnome = false; };
networkmanager-iodine = super.networkmanager-iodine.override { withGnome = false; };
- pinentry = super.pinentry.override { gtk2 = null; gcr = null; qt4 = null; qt5 = null; };
gobject-introspection = super.gobject-introspection.override { x11Support = false; };
}));
};
diff --git a/nixos/modules/config/power-management.nix b/nixos/modules/config/power-management.nix
index 0277f1ad11e9..64cdf50f1413 100644
--- a/nixos/modules/config/power-management.nix
+++ b/nixos/modules/config/power-management.nix
@@ -78,7 +78,7 @@ in
};
# Service executed before suspending/hibernating.
- systemd.services."pre-sleep" =
+ systemd.services.pre-sleep =
{ description = "Pre-Sleep Actions";
wantedBy = [ "sleep.target" ];
before = [ "sleep.target" ];
@@ -89,7 +89,7 @@ in
serviceConfig.Type = "oneshot";
};
- systemd.services."post-resume" =
+ systemd.services.post-resume =
{ description = "Post-Resume Actions";
after = [ "suspend.target" "hibernate.target" "hybrid-sleep.target" ];
script =
diff --git a/nixos/modules/config/pulseaudio.nix b/nixos/modules/config/pulseaudio.nix
index 5c3e39302583..b3bc4a451aa0 100644
--- a/nixos/modules/config/pulseaudio.nix
+++ b/nixos/modules/config/pulseaudio.nix
@@ -51,8 +51,7 @@ let
# that we can disable the autospawn feature in programs that
# are built with PulseAudio support (like KDE).
clientConf = writeText "client.conf" ''
- autospawn=${if nonSystemWide then "yes" else "no"}
- ${optionalString nonSystemWide "daemon-binary=${binary}"}
+ autospawn=no
${cfg.extraClientConf}
'';
diff --git a/nixos/modules/config/qt5.nix b/nixos/modules/config/qt5.nix
new file mode 100644
index 000000000000..7de1c0f5d557
--- /dev/null
+++ b/nixos/modules/config/qt5.nix
@@ -0,0 +1,102 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+
+ cfg = config.qt5;
+
+ isQGnome = cfg.platformTheme == "gnome" && cfg.style == "adwaita";
+ isQtStyle = cfg.platformTheme == "gtk2" && cfg.style != "adwaita";
+
+ packages = if isQGnome then [ pkgs.qgnomeplatform pkgs.adwaita-qt ]
+ else if isQtStyle then [ pkgs.qtstyleplugins ]
+ else throw "`qt5.platformTheme` ${cfg.platformTheme} and `qt5.style` ${cfg.style} are not compatible.";
+
+in
+
+{
+
+ options = {
+ qt5 = {
+
+ enable = mkEnableOption "Qt5 theming configuration";
+
+ platformTheme = mkOption {
+ type = types.enum [
+ "gtk2"
+ "gnome"
+ ];
+ example = "gnome";
+ relatedPackages = [
+ "qgnomeplatform"
+ ["libsForQt5" "qtstyleplugins"]
+ ];
+ description = ''
+ Selects the platform theme to use for Qt5 applications.
+ The options are
+
+
+ gtk
+ Use GTK theme with
+ qtstyleplugins
+
+
+
+ gnome
+ Use GNOME theme with
+ qgnomeplatform
+
+
+
+ '';
+ };
+
+ style = mkOption {
+ type = types.enum [
+ "adwaita"
+ "cleanlooks"
+ "gtk2"
+ "motif"
+ "plastique"
+ ];
+ example = "adwaita";
+ relatedPackages = [
+ "adwaita-qt"
+ ["libsForQt5" "qtstyleplugins"]
+ ];
+ description = ''
+ Selects the style to use for Qt5 applications.
+ The options are
+
+
+ adwaita
+ Use Adwaita Qt style with
+ adwaita
+
+
+
+ cleanlooks
+ gtk2
+ motif
+ plastique
+ Use styles from
+ qtstyleplugins
+
+
+
+ '';
+ };
+ };
+ };
+
+ config = mkIf cfg.enable {
+
+ environment.variables.QT_QPA_PLATFORMTHEME = cfg.platformTheme;
+
+ environment.variables.QT_STYLE_OVERRIDE = cfg.style;
+
+ environment.systemPackages = packages;
+
+ };
+}
diff --git a/nixos/modules/config/shells-environment.nix b/nixos/modules/config/shells-environment.nix
index 6379b52870ea..d939cbb393ee 100644
--- a/nixos/modules/config/shells-environment.nix
+++ b/nixos/modules/config/shells-environment.nix
@@ -157,13 +157,15 @@ in
# terminal instead of logging out of X11).
environment.variables = config.environment.sessionVariables;
+ environment.profileRelativeEnvVars = config.environment.profileRelativeSessionVariables;
+
environment.shellAliases = mapAttrs (name: mkDefault) {
ls = "ls --color=tty";
ll = "ls -l";
l = "ls -alh";
};
- environment.etc."shells".text =
+ environment.etc.shells.text =
''
${concatStringsSep "\n" (map utils.toShellPath cfg.shells)}
/bin/sh
@@ -171,7 +173,7 @@ in
# For resetting environment with `. /etc/set-environment` when needed
# and discoverability (see motivation of #30418).
- environment.etc."set-environment".source = config.system.build.setEnvironment;
+ environment.etc.set-environment.source = config.system.build.setEnvironment;
system.build.setEnvironment = pkgs.writeText "set-environment"
''
diff --git a/nixos/modules/config/sysctl.nix b/nixos/modules/config/sysctl.nix
index 0c6a7e2431aa..e59c7a32c287 100644
--- a/nixos/modules/config/sysctl.nix
+++ b/nixos/modules/config/sysctl.nix
@@ -42,25 +42,19 @@ in
config = {
- environment.etc."sysctl.d/nixos.conf".text =
+ environment.etc."sysctl.d/60-nixos.conf".text =
concatStrings (mapAttrsToList (n: v:
optionalString (v != null) "${n}=${if v == false then "0" else toString v}\n"
) config.boot.kernel.sysctl);
systemd.services.systemd-sysctl =
{ wantedBy = [ "multi-user.target" ];
- restartTriggers = [ config.environment.etc."sysctl.d/nixos.conf".source ];
+ restartTriggers = [ config.environment.etc."sysctl.d/60-nixos.conf".source ];
};
- # Enable hardlink and symlink restrictions. See
- # https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=800179c9b8a1e796e441674776d11cd4c05d61d7
- # for details.
- boot.kernel.sysctl."fs.protected_hardlinks" = true;
- boot.kernel.sysctl."fs.protected_symlinks" = true;
-
# Hide kernel pointers (e.g. in /proc/modules) for unprivileged
# users as these make it easier to exploit kernel vulnerabilities.
- boot.kernel.sysctl."kernel.kptr_restrict" = 1;
+ boot.kernel.sysctl."kernel.kptr_restrict" = mkDefault 1;
# Disable YAMA by default to allow easy debugging.
boot.kernel.sysctl."kernel.yama.ptrace_scope" = mkDefault 0;
diff --git a/nixos/modules/config/system-environment.nix b/nixos/modules/config/system-environment.nix
index 6011e354ece4..4888740ba3d5 100644
--- a/nixos/modules/config/system-environment.nix
+++ b/nixos/modules/config/system-environment.nix
@@ -18,25 +18,88 @@ in
default = {};
description = ''
A set of environment variables used in the global environment.
- These variables will be set by PAM.
- The value of each variable can be either a string or a list of
- strings. The latter is concatenated, interspersed with colon
- characters.
+ These variables will be set by PAM early in the login process.
+
+ The value of each session variable can be either a string or a
+ list of strings. The latter is concatenated, interspersed with
+ colon characters.
+
+ Note, due to limitations in the PAM format values may not
+ contain the " character.
+
+ Also, these variables are merged into
+ and it is
+ therefore not possible to use PAM style variables such as
+ @{HOME}.
'';
type = with types; attrsOf (either str (listOf str));
apply = mapAttrs (n: v: if isList v then concatStringsSep ":" v else v);
};
+ environment.profileRelativeSessionVariables = mkOption {
+ type = types.attrsOf (types.listOf types.str);
+ example = { PATH = [ "/bin" ]; MANPATH = [ "/man" "/share/man" ]; };
+ description = ''
+ Attribute set of environment variable used in the global
+ environment. These variables will be set by PAM early in the
+ login process.
+
+ Variable substitution is available as described in
+
+ pam_env.conf
+ 5
+ .
+
+ Each attribute maps to a list of relative paths. Each relative
+ path is appended to the each profile of
+ to form the content of
+ the corresponding environment variable.
+
+ Also, these variables are merged into
+ and it is
+ therefore not possible to use PAM style variables such as
+ @{HOME}.
+ '';
+ };
+
};
config = {
- system.build.pamEnvironment = pkgs.writeText "pam-environment"
- ''
- ${concatStringsSep "\n" (
- (mapAttrsToList (n: v: ''${n}="${concatStringsSep ":" v}"'')
- (zipAttrsWith (const concatLists) ([ (mapAttrs (n: v: [ v ]) cfg.sessionVariables) ]))))}
- '';
+ system.build.pamEnvironment =
+ let
+ suffixedVariables =
+ flip mapAttrs cfg.profileRelativeSessionVariables (envVar: suffixes:
+ flip concatMap cfg.profiles (profile:
+ map (suffix: "${profile}${suffix}") suffixes
+ )
+ );
+
+ # We're trying to use the same syntax for PAM variables and env variables.
+ # That means we need to map the env variables that people might use to their
+ # equivalent PAM variable.
+ replaceEnvVars = replaceStrings ["$HOME" "$USER"] ["@{HOME}" "@{PAM_USER}"];
+
+ pamVariable = n: v:
+ ''${n} DEFAULT="${concatStringsSep ":" (map replaceEnvVars (toList v))}"'';
+
+ pamVariables =
+ concatStringsSep "\n"
+ (mapAttrsToList pamVariable
+ (zipAttrsWith (n: concatLists)
+ [
+ # Make sure security wrappers are prioritized without polluting
+ # shell environments with an extra entry. Sessions which depend on
+ # pam for its environment will otherwise have eg. broken sudo. In
+ # particular Gnome Shell sometimes fails to source a proper
+ # environment from a shell.
+ { PATH = [ config.security.wrapperDir ]; }
+
+ (mapAttrs (n: toList) cfg.sessionVariables)
+ suffixedVariables
+ ]));
+ in
+ pkgs.writeText "pam-environment" "${pamVariables}\n";
};
diff --git a/nixos/modules/config/system-path.nix b/nixos/modules/config/system-path.nix
index fae2fc740082..aba9bc0945b1 100644
--- a/nixos/modules/config/system-path.nix
+++ b/nixos/modules/config/system-path.nix
@@ -135,6 +135,9 @@ in
# outputs TODO: note that the tools will often not be linked by default
postBuild =
''
+ # Remove wrapped binaries, they shouldn't be accessible via PATH.
+ find $out/bin -maxdepth 1 -name ".*-wrapped" -type l -delete
+
if [ -x $out/bin/glib-compile-schemas -a -w $out/share/glib-2.0/schemas ]; then
$out/bin/glib-compile-schemas $out/share/glib-2.0/schemas
fi
diff --git a/nixos/modules/config/terminfo.nix b/nixos/modules/config/terminfo.nix
index 4fd6ba5ea605..1396640af672 100644
--- a/nixos/modules/config/terminfo.nix
+++ b/nixos/modules/config/terminfo.nix
@@ -8,11 +8,11 @@
"/share/terminfo"
];
- environment.etc."terminfo" = {
+ environment.etc.terminfo = {
source = "${config.system.path}/share/terminfo";
};
- environment.profileRelativeEnvVars = {
+ environment.profileRelativeSessionVariables = {
TERMINFO_DIRS = [ "/share/terminfo" ];
};
diff --git a/nixos/modules/config/unix-odbc-drivers.nix b/nixos/modules/config/unix-odbc-drivers.nix
index 8dd811727389..abc12a627d6f 100644
--- a/nixos/modules/config/unix-odbc-drivers.nix
+++ b/nixos/modules/config/unix-odbc-drivers.nix
@@ -24,7 +24,7 @@ in {
Specifies Unix ODBC drivers to be registered in
/etc/odbcinst.ini. You may also want to
add pkgs.unixODBC to the system path to get
- a command line client to connnect to ODBC databases.
+ a command line client to connect to ODBC databases.
'';
};
};
diff --git a/nixos/modules/config/update-users-groups.pl b/nixos/modules/config/update-users-groups.pl
index ef5e6346f02e..59cea51c611b 100644
--- a/nixos/modules/config/update-users-groups.pl
+++ b/nixos/modules/config/update-users-groups.pl
@@ -267,6 +267,7 @@ foreach my $line (-f "/etc/shadow" ? read_file("/etc/shadow") : ()) {
next if !defined $u;
$hashedPassword = "!" if !$spec->{mutableUsers};
$hashedPassword = $u->{hashedPassword} if defined $u->{hashedPassword} && !$spec->{mutableUsers}; # FIXME
+ chomp $hashedPassword;
push @shadowNew, join(":", $name, $hashedPassword, @rest) . "\n";
$shadowSeen{$name} = 1;
}
diff --git a/nixos/modules/config/users-groups.nix b/nixos/modules/config/users-groups.nix
index c3f228c9bcc4..ba79bd3d6ecc 100644
--- a/nixos/modules/config/users-groups.nix
+++ b/nixos/modules/config/users-groups.nix
@@ -181,7 +181,7 @@ let
};
hashedPassword = mkOption {
- type = with types; uniq (nullOr str);
+ type = with types; nullOr str;
default = null;
description = ''
Specifies the hashed password for the user.
@@ -191,7 +191,7 @@ let
};
password = mkOption {
- type = with types; uniq (nullOr str);
+ type = with types; nullOr str;
default = null;
description = ''
Specifies the (clear text) password for the user.
@@ -203,7 +203,7 @@ let
};
passwordFile = mkOption {
- type = with types; uniq (nullOr string);
+ type = with types; nullOr str;
default = null;
description = ''
The full path to a file that contains the user's password. The password
@@ -215,7 +215,7 @@ let
};
initialHashedPassword = mkOption {
- type = with types; uniq (nullOr str);
+ type = with types; nullOr str;
default = null;
description = ''
Specifies the initial hashed password for the user, i.e. the
@@ -230,7 +230,7 @@ let
};
initialPassword = mkOption {
- type = with types; uniq (nullOr str);
+ type = with types; nullOr str;
default = null;
description = ''
Specifies the initial password for the user, i.e. the
@@ -304,7 +304,7 @@ let
};
members = mkOption {
- type = with types; listOf string;
+ type = with types; listOf str;
default = [];
description = ''
The user names of the group members, added to the
@@ -546,11 +546,11 @@ in {
environment.systemPackages = systemShells;
environment.etc = {
- "subuid" = {
+ subuid = {
text = subuidFile;
mode = "0644";
};
- "subgid" = {
+ subgid = {
text = subgidFile;
mode = "0644";
};
@@ -564,7 +564,10 @@ in {
};
}) (filterAttrs (_: u: u.packages != []) cfg.users));
- environment.profiles = [ "/etc/profiles/per-user/$USER" ];
+ environment.profiles = [
+ "$HOME/.nix-profile"
+ "/etc/profiles/per-user/$USER"
+ ];
assertions = [
{ assertion = !cfg.enforceIdUniqueness || (uidsAreUnique && gidsAreUnique);
diff --git a/nixos/modules/config/vte.nix b/nixos/modules/config/vte.nix
new file mode 100644
index 000000000000..d4a8c926fef2
--- /dev/null
+++ b/nixos/modules/config/vte.nix
@@ -0,0 +1,52 @@
+# VTE
+
+{ config, pkgs, lib, ... }:
+
+with lib;
+
+let
+
+ vteInitSnippet = ''
+ # Show current working directory in VTE terminals window title.
+ # Supports both bash and zsh, requires interactive shell.
+ . ${pkgs.vte}/etc/profile.d/vte.sh
+ '';
+
+in
+
+{
+
+ options = {
+
+ programs.bash.vteIntegration = mkOption {
+ default = false;
+ type = types.bool;
+ description = ''
+ Whether to enable Bash integration for VTE terminals.
+ This allows it to preserve the current directory of the shell
+ across terminals.
+ '';
+ };
+
+ programs.zsh.vteIntegration = mkOption {
+ default = false;
+ type = types.bool;
+ description = ''
+ Whether to enable Zsh integration for VTE terminals.
+ This allows it to preserve the current directory of the shell
+ across terminals.
+ '';
+ };
+
+ };
+
+ config = mkMerge [
+ (mkIf config.programs.bash.vteIntegration {
+ programs.bash.interactiveShellInit = mkBefore vteInitSnippet;
+ })
+
+ (mkIf config.programs.zsh.vteIntegration {
+ programs.zsh.interactiveShellInit = vteInitSnippet;
+ })
+ ];
+}
diff --git a/nixos/modules/config/xdg/icons.nix b/nixos/modules/config/xdg/icons.nix
index 8268a3771a0e..4677ce090b0b 100644
--- a/nixos/modules/config/xdg/icons.nix
+++ b/nixos/modules/config/xdg/icons.nix
@@ -7,21 +7,32 @@ with lib;
type = types.bool;
default = true;
description = ''
- Whether to install files to support the
+ Whether to install files to support the
XDG Icon Theme specification.
'';
};
};
config = mkIf config.xdg.icons.enable {
- environment.pathsToLink = [
- "/share/icons"
- "/share/pixmaps"
+ environment.pathsToLink = [
+ "/share/icons"
+ "/share/pixmaps"
+ ];
+
+ # libXcursor looks for cursors in XCURSOR_PATH
+ # it mostly follows the spec for icons
+ # See: https://www.x.org/releases/current/doc/man/man3/Xcursor.3.xhtml Themes
+
+ # These are preferred so they come first in the list
+ environment.sessionVariables.XCURSOR_PATH = [
+ "$HOME/.icons"
+ "$HOME/.local/share/icons"
+ ];
+
+ environment.profileRelativeSessionVariables.XCURSOR_PATH = [
+ "/share/icons"
+ "/share/pixmaps"
];
-
- environment.profileRelativeEnvVars = {
- XCURSOR_PATH = [ "/share/icons" ];
- };
};
}
diff --git a/nixos/modules/hardware/brightnessctl.nix b/nixos/modules/hardware/brightnessctl.nix
index 341e4b791c23..2d54398d10df 100644
--- a/nixos/modules/hardware/brightnessctl.nix
+++ b/nixos/modules/hardware/brightnessctl.nix
@@ -25,6 +25,7 @@ in
config = mkIf cfg.enable {
services.udev.packages = with pkgs; [ brightnessctl ];
+ environment.systemPackages = with pkgs; [ brightnessctl ];
};
}
diff --git a/nixos/modules/hardware/device-tree.nix b/nixos/modules/hardware/device-tree.nix
new file mode 100644
index 000000000000..f57502d4c83e
--- /dev/null
+++ b/nixos/modules/hardware/device-tree.nix
@@ -0,0 +1,56 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+ cfg = config.hardware.deviceTree;
+in {
+ options = {
+ hardware.deviceTree = {
+ enable = mkOption {
+ default = pkgs.stdenv.hostPlatform.platform.kernelDTB or false;
+ type = types.bool;
+ description = ''
+ Build device tree files. These are used to describe the
+ non-discoverable hardware of a system.
+ '';
+ };
+
+ base = mkOption {
+ default = "${config.boot.kernelPackages.kernel}/dtbs";
+ defaultText = "\${config.boot.kernelPackages.kernel}/dtbs";
+ example = literalExample "pkgs.deviceTree_rpi";
+ type = types.path;
+ description = ''
+ The package containing the base device-tree (.dtb) to boot. Contains
+ device trees bundled with the Linux kernel by default.
+ '';
+ };
+
+ overlays = mkOption {
+ default = [];
+ example = literalExample
+ "[\"\${pkgs.deviceTree_rpi.overlays}/w1-gpio.dtbo\"]";
+ type = types.listOf types.path;
+ description = ''
+ A path containing device tree overlays (.dtbo) to be applied to all
+ base device-trees.
+ '';
+ };
+
+ package = mkOption {
+ default = null;
+ type = types.nullOr types.path;
+ internal = true;
+ description = ''
+ A path containing the result of applying `overlays` to `base`.
+ '';
+ };
+ };
+ };
+
+ config = mkIf (cfg.enable) {
+ hardware.deviceTree.package = if (cfg.overlays != [])
+ then pkgs.deviceTree.applyOverlays cfg.base cfg.overlays else cfg.base;
+ };
+}
diff --git a/nixos/modules/hardware/nitrokey.nix b/nixos/modules/hardware/nitrokey.nix
index 60fc95a75828..02e4c3f46f8d 100644
--- a/nixos/modules/hardware/nitrokey.nix
+++ b/nixos/modules/hardware/nitrokey.nix
@@ -36,6 +36,6 @@ in
{ inherit (cfg) group; }
))
];
- users.groups."${cfg.group}" = {};
+ users.groups.${cfg.group} = {};
};
}
diff --git a/nixos/modules/hardware/openrazer.nix b/nixos/modules/hardware/openrazer.nix
new file mode 100644
index 000000000000..883db7f2f4f1
--- /dev/null
+++ b/nixos/modules/hardware/openrazer.nix
@@ -0,0 +1,133 @@
+{ config, pkgs, lib, ... }:
+
+with lib;
+
+let
+ cfg = config.hardware.openrazer;
+ kernelPackages = config.boot.kernelPackages;
+
+ toPyBoolStr = b: if b then "True" else "False";
+
+ daemonExe = "${pkgs.openrazer-daemon}/bin/openrazer-daemon --config ${daemonConfFile}";
+
+ daemonConfFile = pkgs.writeTextFile {
+ name = "razer.conf";
+ text = ''
+ [General]
+ verbose_logging = ${toPyBoolStr cfg.verboseLogging}
+
+ [Startup]
+ sync_effects_enabled = ${toPyBoolStr cfg.syncEffectsEnabled}
+ devices_off_on_screensaver = ${toPyBoolStr cfg.devicesOffOnScreensaver}
+ mouse_battery_notifier = ${toPyBoolStr cfg.mouseBatteryNotifier}
+
+ [Statistics]
+ key_statistics = ${toPyBoolStr cfg.keyStatistics}
+ '';
+ };
+
+ dbusServiceFile = pkgs.writeTextFile rec {
+ name = "org.razer.service";
+ destination = "/share/dbus-1/services/${name}";
+ text = ''
+ [D-BUS Service]
+ Name=org.razer
+ Exec=${daemonExe}
+ SystemdService=openrazer-daemon.service
+ '';
+ };
+
+ drivers = [
+ "razerkbd"
+ "razermouse"
+ "razerfirefly"
+ "razerkraken"
+ "razermug"
+ "razercore"
+ ];
+in
+{
+ options = {
+ hardware.openrazer = {
+ enable = mkEnableOption "OpenRazer drivers and userspace daemon.";
+
+ verboseLogging = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Whether to enable verbose logging. Logs debug messages.
+ '';
+ };
+
+ syncEffectsEnabled = mkOption {
+ type = types.bool;
+ default = true;
+ description = ''
+ Set the sync effects flag to true so any assignment of
+ effects will work across devices.
+ '';
+ };
+
+ devicesOffOnScreensaver = mkOption {
+ type = types.bool;
+ default = true;
+ description = ''
+ Turn off the devices when the systems screensaver kicks in.
+ '';
+ };
+
+ mouseBatteryNotifier = mkOption {
+ type = types.bool;
+ default = true;
+ description = ''
+ Mouse battery notifier.
+ '';
+ };
+
+ keyStatistics = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Collects number of keypresses per hour per key used to
+ generate a heatmap.
+ '';
+ };
+ };
+ };
+
+ config = mkIf cfg.enable {
+ boot.extraModulePackages = [ kernelPackages.openrazer ];
+ boot.kernelModules = drivers;
+
+ # Makes the man pages available so you can succesfully run
+ # > systemctl --user help openrazer-daemon
+ environment.systemPackages = [ pkgs.python3Packages.openrazer-daemon.man ];
+
+ services.udev.packages = [ kernelPackages.openrazer ];
+ services.dbus.packages = [ dbusServiceFile ];
+
+ # A user must be a member of the plugdev group in order to start
+ # the openrazer-daemon. Therefore we make sure that the plugdev
+ # group exists.
+ users.groups.plugdev = {};
+
+ systemd.user.services.openrazer-daemon = {
+ description = "Daemon to manage razer devices in userspace";
+ unitConfig.Documentation = "man:openrazer-daemon(8)";
+ # Requires a graphical session so the daemon knows when the screensaver
+ # starts. See the 'devicesOffOnScreensaver' option.
+ wantedBy = [ "graphical-session.target" ];
+ partOf = [ "graphical-session.target" ];
+ serviceConfig = {
+ Type = "dbus";
+ BusName = "org.razer";
+ ExecStart = "${daemonExe} --foreground";
+ Restart = "always";
+ };
+ };
+ };
+
+ meta = {
+ maintainers = with lib.maintainers; [ roelvandijk ];
+ };
+}
diff --git a/nixos/modules/hardware/printers.nix b/nixos/modules/hardware/printers.nix
new file mode 100644
index 000000000000..56b91933477d
--- /dev/null
+++ b/nixos/modules/hardware/printers.nix
@@ -0,0 +1,135 @@
+{ config, lib, pkgs, ... }:
+with lib;
+let
+ cfg = config.hardware.printers;
+ ppdOptionsString = options: optionalString (options != {})
+ (concatStringsSep " "
+ (mapAttrsToList (name: value: "-o '${name}'='${value}'") options)
+ );
+ ensurePrinter = p: ''
+ ${pkgs.cups}/bin/lpadmin -p '${p.name}' -E \
+ ${optionalString (p.location != null) "-L '${p.location}'"} \
+ ${optionalString (p.description != null) "-D '${p.description}'"} \
+ -v '${p.deviceUri}' \
+ -m '${p.model}' \
+ ${ppdOptionsString p.ppdOptions}
+ '';
+ ensureDefaultPrinter = name: ''
+ ${pkgs.cups}/bin/lpoptions -d '${name}'
+ '';
+
+ # "graph but not # or /" can't be implemented as regex alone due to missing lookahead support
+ noInvalidChars = str: all (c: c != "#" && c != "/") (stringToCharacters str);
+ printerName = (types.addCheck (types.strMatching "[[:graph:]]+") noInvalidChars)
+ // { description = "printable string without spaces, # and /"; };
+
+
+in {
+ options = {
+ hardware.printers = {
+ ensureDefaultPrinter = mkOption {
+ type = types.nullOr printerName;
+ default = null;
+ description = ''
+ Ensures the named printer is the default CUPS printer / printer queue.
+ '';
+ };
+ ensurePrinters = mkOption {
+ description = ''
+ Will regularly ensure that the given CUPS printers are configured as declared here.
+ If a printer's options are manually changed afterwards, they will be overwritten eventually.
+ This option will never delete any printer, even if removed from this list.
+ You can check existing printers with lpstat -s
+ and remove printers with lpadmin -x <printer-name>.
+ Printers not listed here can still be manually configured.
+ '';
+ default = [];
+ type = types.listOf (types.submodule {
+ options = {
+ name = mkOption {
+ type = printerName;
+ example = "BrotherHL_Workroom";
+ description = ''
+ Name of the printer / printer queue.
+ May contain any printable characters except "/", "#", and space.
+ '';
+ };
+ location = mkOption {
+ type = types.nullOr types.str;
+ default = null;
+ example = "Workroom";
+ description = ''
+ Optional human-readable location.
+ '';
+ };
+ description = mkOption {
+ type = types.nullOr types.str;
+ default = null;
+ example = "Brother HL-5140";
+ description = ''
+ Optional human-readable description.
+ '';
+ };
+ deviceUri = mkOption {
+ type = types.str;
+ example = [
+ "ipp://printserver.local/printers/BrotherHL_Workroom"
+ "usb://HP/DESKJET%20940C?serial=CN16E6C364BH"
+ ];
+ description = ''
+ How to reach the printer.
+ lpinfo -v shows a list of supported device URIs and schemes.
+ '';
+ };
+ model = mkOption {
+ type = types.str;
+ example = literalExample ''
+ gutenprint.''${lib.version.majorMinor (lib.getVersion pkgs.cups)}://brother-hl-5140/expert
+ '';
+ description = ''
+ Location of the ppd driver file for the printer.
+ lpinfo -m shows a list of supported models.
+ '';
+ };
+ ppdOptions = mkOption {
+ type = types.attrsOf types.str;
+ example = {
+ PageSize = "A4";
+ Duplex = "DuplexNoTumble";
+ };
+ default = {};
+ description = ''
+ Sets PPD options for the printer.
+ lpoptions [-p printername] -l shows suported PPD options for the given printer.
+ '';
+ };
+ };
+ });
+ };
+ };
+ };
+
+ config = mkIf (cfg.ensurePrinters != [] && config.services.printing.enable) {
+ systemd.services.ensure-printers = let
+ cupsUnit = if config.services.printing.startWhenNeeded then "cups.socket" else "cups.service";
+ in {
+ description = "Ensure NixOS-configured CUPS printers";
+ wantedBy = [ "multi-user.target" ];
+ requires = [ cupsUnit ];
+ # in contrast to cups.socket, for cups.service, this is actually not enough,
+ # as the cups service reports its activation before clients can actually interact with it.
+ # Because of this, commands like `lpinfo -v` will report a bad file descriptor
+ # due to the missing UNIX socket without sufficient sleep time.
+ after = [ cupsUnit ];
+
+ serviceConfig = {
+ Type = "oneshot";
+ };
+
+ # sleep 10 is required to wait until cups.service is actually initialized and has created its UNIX socket file
+ script = (optionalString (!config.services.printing.startWhenNeeded) "sleep 10\n")
+ + (concatMapStringsSep "\n" ensurePrinter cfg.ensurePrinters)
+ + optionalString (cfg.ensureDefaultPrinter != null) (ensureDefaultPrinter cfg.ensureDefaultPrinter);
+ };
+ };
+}
diff --git a/nixos/modules/hardware/raid/hpsa.nix b/nixos/modules/hardware/raid/hpsa.nix
index 3a65cb800a98..4d7af138292c 100644
--- a/nixos/modules/hardware/raid/hpsa.nix
+++ b/nixos/modules/hardware/raid/hpsa.nix
@@ -4,11 +4,11 @@ with lib;
let
hpssacli = pkgs.stdenv.mkDerivation rec {
- name = "hpssacli-${version}";
+ pname = "hpssacli";
version = "2.40-13.0";
src = pkgs.fetchurl {
- url = "https://downloads.linux.hpe.com/SDR/downloads/MCP/Ubuntu/pool/non-free/${name}_amd64.deb";
+ url = "https://downloads.linux.hpe.com/SDR/downloads/MCP/Ubuntu/pool/non-free/${pname}-${version}_amd64.deb";
sha256 = "11w7fwk93lmfw0yya4jpjwdmgjimqxx6412sqa166g1pz4jil4sw";
};
diff --git a/nixos/modules/hardware/steam-hardware.nix b/nixos/modules/hardware/steam-hardware.nix
index 378aeffe71b5..6218c9ffbb9b 100644
--- a/nixos/modules/hardware/steam-hardware.nix
+++ b/nixos/modules/hardware/steam-hardware.nix
@@ -21,5 +21,12 @@ in
services.udev.packages = [
pkgs.steamPackages.steam
];
+
+ # The uinput module needs to be loaded in order to trigger the udev rules
+ # defined in the steam package for setting permissions on /dev/uinput.
+ #
+ # If the udev rules are not triggered, some controllers won't work with
+ # steam.
+ boot.kernelModules = [ "uinput" ];
};
}
diff --git a/nixos/modules/hardware/video/ati.nix b/nixos/modules/hardware/video/ati.nix
index f867bba80630..0aab7bd6b92c 100644
--- a/nixos/modules/hardware/video/ati.nix
+++ b/nixos/modules/hardware/video/ati.nix
@@ -33,7 +33,7 @@ in
boot.blacklistedKernelModules = [ "radeon" ];
- environment.etc."ati".source = "${ati_x11}/etc/ati";
+ environment.etc.ati.source = "${ati_x11}/etc/ati";
};
diff --git a/nixos/modules/hardware/video/nvidia.nix b/nixos/modules/hardware/video/nvidia.nix
index da3c8ee5a9fa..3ab2afc97407 100644
--- a/nixos/modules/hardware/video/nvidia.nix
+++ b/nixos/modules/hardware/video/nvidia.nix
@@ -88,7 +88,7 @@ in
};
hardware.nvidia.optimus_prime.nvidiaBusId = lib.mkOption {
- type = lib.types.string;
+ type = lib.types.str;
default = "";
example = "PCI:1:0:0";
description = ''
@@ -98,7 +98,7 @@ in
};
hardware.nvidia.optimus_prime.intelBusId = lib.mkOption {
- type = lib.types.string;
+ type = lib.types.str;
default = "";
example = "PCI:0:2:0";
description = ''
diff --git a/nixos/modules/i18n/input-method/ibus.nix b/nixos/modules/i18n/input-method/ibus.nix
index f8e021f551e8..8109ef76c402 100644
--- a/nixos/modules/i18n/input-method/ibus.nix
+++ b/nixos/modules/i18n/input-method/ibus.nix
@@ -55,7 +55,7 @@ in
# Without dconf enabled it is impossible to use IBus
environment.systemPackages = with pkgs; [
- ibus-qt gnome3.dconf ibusAutostart
+ gnome3.dconf ibusAutostart
];
environment.variables = {
diff --git a/nixos/modules/installer/cd-dvd/installation-cd-graphical-base.nix b/nixos/modules/installer/cd-dvd/installation-cd-graphical-base.nix
index f65239a5bc0a..719ba5ffb127 100644
--- a/nixos/modules/installer/cd-dvd/installation-cd-graphical-base.nix
+++ b/nixos/modules/installer/cd-dvd/installation-cd-graphical-base.nix
@@ -8,16 +8,27 @@ with lib;
{
imports = [ ./installation-cd-base.nix ];
+ # Whitelist wheel users to do anything
+ # This is useful for things like pkexec
+ #
+ # WARNING: this is dangerous for systems
+ # outside the installation-cd and shouldn't
+ # be used anywhere else.
+ security.polkit.extraConfig = ''
+ polkit.addRule(function(action, subject) {
+ if (subject.isInGroup("wheel")) {
+ return polkit.Result.YES;
+ }
+ });
+ '';
+
services.xserver = {
enable = true;
- # Don't start the X server by default.
- autorun = mkForce false;
-
- # Automatically login as root.
+ # Automatically login as nixos.
displayManager.slim = {
enable = true;
- defaultUser = "root";
+ defaultUser = "nixos";
autoLogin = true;
};
@@ -33,7 +44,6 @@ with lib;
# Enable sound in graphical iso's.
hardware.pulseaudio.enable = true;
- hardware.pulseaudio.systemWide = true; # Needed since we run plasma as root.
environment.systemPackages = [
# Include gparted for partitioning disks.
diff --git a/nixos/modules/installer/cd-dvd/installation-cd-graphical-kde.nix b/nixos/modules/installer/cd-dvd/installation-cd-graphical-kde.nix
index 1c3c9cb30b41..1dc7920ff640 100644
--- a/nixos/modules/installer/cd-dvd/installation-cd-graphical-kde.nix
+++ b/nixos/modules/installer/cd-dvd/installation-cd-graphical-kde.nix
@@ -1,5 +1,5 @@
# This module defines a NixOS installation CD that contains X11 and
-# Plasma5.
+# Plasma 5.
{ config, lib, pkgs, ... }:
@@ -13,9 +13,6 @@ with lib;
enable = true;
enableQt4Support = false;
};
-
- # Enable touchpad support for many laptops.
- synaptics.enable = true;
};
environment.systemPackages = with pkgs; [
@@ -25,20 +22,19 @@ with lib;
system.activationScripts.installerDesktop = let
- manualDesktopFile = pkgs.writeScript "nixos-manual.desktop" ''
- [Desktop Entry]
- Version=1.0
- Type=Application
- Name=NixOS Manual
- Exec=firefox ${config.system.build.manual.manualHTMLIndex}
- Icon=text-html
- '';
+ # Comes from documentation.nix when xserver and nixos.enable are true.
+ manualDesktopFile = "/run/current-system/sw/share/applications/nixos-manual.desktop";
+
+ homeDir = "/home/nixos/";
+ desktopDir = homeDir + "Desktop/";
in ''
- mkdir -p /root/Desktop
- ln -sfT ${manualDesktopFile} /root/Desktop/nixos-manual.desktop
- ln -sfT ${pkgs.konsole}/share/applications/org.kde.konsole.desktop /root/Desktop/org.kde.konsole.desktop
- ln -sfT ${pkgs.gparted}/share/applications/gparted.desktop /root/Desktop/gparted.desktop
+ mkdir -p ${desktopDir}
+ chown nixos ${homeDir} ${desktopDir}
+
+ ln -sfT ${manualDesktopFile} ${desktopDir + "nixos-manual.desktop"}
+ ln -sfT ${pkgs.gparted}/share/applications/gparted.desktop ${desktopDir + "gparted.desktop"}
+ ln -sfT ${pkgs.konsole}/share/applications/org.kde.konsole.desktop ${desktopDir + "org.kde.konsole.desktop"}
'';
}
diff --git a/nixos/modules/installer/cd-dvd/iso-image.nix b/nixos/modules/installer/cd-dvd/iso-image.nix
index d5c92cfc1d9e..009f1e2c543a 100644
--- a/nixos/modules/installer/cd-dvd/iso-image.nix
+++ b/nixos/modules/installer/cd-dvd/iso-image.nix
@@ -24,7 +24,7 @@ let
# Name appended to menuentry defaults to params if no specific name given.
option.name or (if option ? params then "(${option.params})" else "")
}' ${if option ? class then " --class ${option.class}" else ""} {
- linux ${defaults.image} ${defaults.params} ${
+ linux ${defaults.image} \''${isoboot} ${defaults.params} ${
option.params or ""
}
initrd ${defaults.initrd}
@@ -165,8 +165,8 @@ let
else
"# No refind for ${targetArch}"
;
-
- grubPkgs = if config.boot.loader.grub.forcei686 then pkgs.pkgsi686Linux else pkgs;
+
+ grubPkgs = if config.boot.loader.grub.forcei686 then pkgs.pkgsi686Linux else pkgs;
grubMenuCfg = ''
#
@@ -268,6 +268,12 @@ let
set timeout=10
${grubMenuCfg}
+ # If the parameter iso_path is set, append the findiso parameter to the kernel
+ # line. We need this to allow the nixos iso to be booted from grub directly.
+ if [ \''${iso_path} ] ; then
+ set isoboot="findiso=\''${iso_path}"
+ fi
+
#
# Menu entries
#
@@ -284,6 +290,14 @@ let
${buildMenuAdditionalParamsGrub2 config "video=1920x1080@60"}
}
+ # If we boot into a graphical environment where X is autoran
+ # and always crashes, it makes the media unusable. Allow the user
+ # to disable this.
+ submenu "Disable display-manager" --class quirk-disable-displaymanager {
+ ${grubMenuCfg}
+ ${buildMenuAdditionalParamsGrub2 config "systemd.mask=display-manager.service"}
+ }
+
# Some laptop and convertibles have the panel installed in an
# inconvenient way, rotated away from the keyboard.
# Those entries makes it easier to use the installer.
@@ -562,8 +576,6 @@ in
boot.initrd.availableKernelModules = [ "squashfs" "iso9660" "uas" ];
- boot.blacklistedKernelModules = [ "nouveau" ];
-
boot.initrd.kernelModules = [ "loop" ];
# Closures to be copied to the Nix store on the CD, namely the init
@@ -618,6 +630,9 @@ in
{ source = "${efiDir}/EFI";
target = "/EFI";
}
+ { source = pkgs.writeText "loopback.cfg" "source /EFI/boot/grub.cfg";
+ target = "/boot/grub/loopback.cfg";
+ }
] ++ optionals (config.boot.loader.grub.memtest86.enable && canx86BiosBoot) [
{ source = "${pkgs.memtest86plus}/memtest.bin";
target = "/boot/memtest.bin";
diff --git a/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix b/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix
index a9241870fa71..2d34406a0320 100644
--- a/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix
+++ b/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix
@@ -59,4 +59,8 @@ in
${extlinux-conf-builder} -t 3 -c ${config.system.build.toplevel} -d ./files/boot
'';
};
+
+ # the installation media is also the installation target,
+ # so we don't want to provide the installation configuration.nix.
+ installer.cloneConfig = false;
}
diff --git a/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix b/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix
index dab092415316..651d1a36dc11 100644
--- a/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix
+++ b/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix
@@ -56,4 +56,8 @@ in
${extlinux-conf-builder} -t 3 -c ${config.system.build.toplevel} -d ./files/boot
'';
};
+
+ # the installation media is also the installation target,
+ # so we don't want to provide the installation configuration.nix.
+ installer.cloneConfig = false;
}
diff --git a/nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix b/nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix
index 8c9090471dcd..ba4127eaa0e8 100644
--- a/nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix
+++ b/nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix
@@ -19,7 +19,7 @@ in
boot.loader.generic-extlinux-compatible.enable = true;
boot.consoleLogLevel = lib.mkDefault 7;
- boot.kernelPackages = pkgs.linuxPackages_rpi;
+ boot.kernelPackages = pkgs.linuxPackages_rpi1;
sdImage = {
populateFirmwareCommands = let
@@ -45,4 +45,8 @@ in
${extlinux-conf-builder} -t 3 -c ${config.system.build.toplevel} -d ./files/boot
'';
};
+
+ # the installation media is also the installation target,
+ # so we don't want to provide the installation configuration.nix.
+ installer.cloneConfig = false;
}
diff --git a/nixos/modules/installer/cd-dvd/sd-image-raspberrypi4.nix b/nixos/modules/installer/cd-dvd/sd-image-raspberrypi4.nix
new file mode 100644
index 000000000000..c545a1e7e242
--- /dev/null
+++ b/nixos/modules/installer/cd-dvd/sd-image-raspberrypi4.nix
@@ -0,0 +1,31 @@
+# To build, use:
+# nix-build nixos -I nixos-config=nixos/modules/installer/cd-dvd/sd-image-raspberrypi4.nix -A config.system.build.sdImage
+{ config, lib, pkgs, ... }:
+
+{
+ imports = [
+ ../../profiles/base.nix
+ ../../profiles/installation-device.nix
+ ./sd-image.nix
+ ];
+
+ boot.loader.grub.enable = false;
+ boot.loader.raspberryPi.enable = true;
+ boot.loader.raspberryPi.version = 4;
+ boot.kernelPackages = pkgs.linuxPackages_rpi4;
+
+ boot.consoleLogLevel = lib.mkDefault 7;
+
+ sdImage = {
+ firmwareSize = 128;
+ # This is a hack to avoid replicating config.txt from boot.loader.raspberryPi
+ populateFirmwareCommands =
+ "${config.system.build.installBootLoader} ${config.system.build.toplevel} -d ./firmware";
+ # As the boot process is done entirely in the firmware partition.
+ populateRootCommands = "";
+ };
+
+ # the installation media is also the installation target,
+ # so we don't want to provide the installation configuration.nix.
+ installer.cloneConfig = false;
+}
diff --git a/nixos/modules/installer/cd-dvd/sd-image.nix b/nixos/modules/installer/cd-dvd/sd-image.nix
index 0c407b199367..d510f3b2daf2 100644
--- a/nixos/modules/installer/cd-dvd/sd-image.nix
+++ b/nixos/modules/installer/cd-dvd/sd-image.nix
@@ -54,7 +54,7 @@ in
};
firmwarePartitionID = mkOption {
- type = types.string;
+ type = types.str;
default = "0x2178694e";
description = ''
Volume ID for the /boot/firmware partition on the SD card. This value
@@ -63,7 +63,7 @@ in
};
rootPartitionUUID = mkOption {
- type = types.nullOr types.string;
+ type = types.nullOr types.str;
default = null;
example = "14e19a7b-0ae0-484d-9d54-43bd6fdc20c7";
description = ''
@@ -73,8 +73,8 @@ in
firmwareSize = mkOption {
type = types.int;
- # As of 2019-05-31 the Raspberry pi firmware + u-bot takes ~13MiB
- default = 20;
+ # As of 2019-08-18 the Raspberry pi firmware + u-boot takes ~18MiB
+ default = 30;
description = ''
Size of the /boot/firmware partition, in megabytes.
'';
@@ -98,6 +98,16 @@ in
populate the ./files/boot (/boot) directory.
'';
};
+
+ compressImage = mkOption {
+ type = types.bool;
+ default = true;
+ description = ''
+ Whether the SD image should be compressed using
+ bzip2.
+ '';
+ };
+
};
config = {
@@ -118,10 +128,12 @@ in
sdImage.storePaths = [ config.system.build.toplevel ];
- system.build.sdImage = pkgs.callPackage ({ stdenv, dosfstools, e2fsprogs, mtools, libfaketime, utillinux }: stdenv.mkDerivation {
+ system.build.sdImage = pkgs.callPackage ({ stdenv, dosfstools, e2fsprogs, mtools, libfaketime, utillinux, bzip2 }: stdenv.mkDerivation {
name = config.sdImage.imageName;
- nativeBuildInputs = [ dosfstools e2fsprogs mtools libfaketime utillinux ];
+ nativeBuildInputs = [ dosfstools e2fsprogs mtools libfaketime utillinux bzip2 ];
+
+ inherit (config.sdImage) compressImage;
buildCommand = ''
mkdir -p $out/nix-support $out/sd-image
@@ -168,14 +180,19 @@ in
# Verify the FAT partition before copying it.
fsck.vfat -vn firmware_part.img
dd conv=notrunc if=firmware_part.img of=$img seek=$START count=$SECTORS
+ if test -n "$compressImage"; then
+ bzip2 $img
+ fi
'';
}) {};
boot.postBootCommands = ''
# On the first boot do some maintenance tasks
if [ -f /nix-path-registration ]; then
+ set -euo pipefail
+ set -x
# Figure out device names for the boot device and root filesystem.
- rootPart=$(readlink -f /dev/disk/by-label/NIXOS_SD)
+ rootPart=$(${pkgs.utillinux}/bin/findmnt -n -o SOURCE /)
bootDevice=$(lsblk -npo PKNAME $rootPart)
# Resize the root partition and the filesystem to fit the disk
diff --git a/nixos/modules/installer/cd-dvd/system-tarball-pc.nix b/nixos/modules/installer/cd-dvd/system-tarball-pc.nix
index 5da5df81ede1..bf8b7deb59eb 100644
--- a/nixos/modules/installer/cd-dvd/system-tarball-pc.nix
+++ b/nixos/modules/installer/cd-dvd/system-tarball-pc.nix
@@ -129,7 +129,7 @@ in
];
nixpkgs.config = {
- packageOverrides = p: rec {
+ packageOverrides = p: {
linux_3_4 = p.linux_3_4.override {
extraConfig = ''
# Enable drivers in kernel for most NICs.
diff --git a/nixos/modules/installer/netboot/netboot.nix b/nixos/modules/installer/netboot/netboot.nix
index f9b8d95c684d..5146858cccf5 100644
--- a/nixos/modules/installer/netboot/netboot.nix
+++ b/nixos/modules/installer/netboot/netboot.nix
@@ -18,7 +18,7 @@ with lib;
};
- config = rec {
+ config = {
# Don't build the GRUB menu builder script, since we don't need it
# here and it causes a cyclic dependency.
boot.loader.grub.enable = false;
diff --git a/nixos/modules/installer/tools/nix-fallback-paths.nix b/nixos/modules/installer/tools/nix-fallback-paths.nix
index b9ab2053c41f..d7149b35d4c0 100644
--- a/nixos/modules/installer/tools/nix-fallback-paths.nix
+++ b/nixos/modules/installer/tools/nix-fallback-paths.nix
@@ -1,6 +1,6 @@
{
- x86_64-linux = "/nix/store/hbhdjn5ik3byg642d1m11k3k3s0kn3py-nix-2.2.2";
- i686-linux = "/nix/store/fz5cikwvj3n0a6zl44h6l2z3cin64mda-nix-2.2.2";
- aarch64-linux = "/nix/store/2gba4cyl4wvxzfbhmli90jy4n5aj0kjj-nix-2.2.2";
- x86_64-darwin = "/nix/store/87i4fp46jfw9yl8c7i9gx75m5yph7irl-nix-2.2.2";
+ x86_64-linux = "/nix/store/6chjfy4j6hjwj5f8zcbbdg02i21x1qsi-nix-2.3.1";
+ i686-linux = "/nix/store/xa8z7fwszjjm4kiwrxfc8xv9c1pzzm7a-nix-2.3.1";
+ aarch64-linux = "/nix/store/8cac1ivcnchlpzmdjby2f71l1fwpnymr-nix-2.3.1";
+ x86_64-darwin = "/nix/store/6639l9815ggdnb4aka22qcjy7p8w4hb9-nix-2.3.1";
}
diff --git a/nixos/modules/installer/tools/nixos-enter.sh b/nixos/modules/installer/tools/nixos-enter.sh
index 518dbbbf21e3..4680cd8ae95a 100644
--- a/nixos/modules/installer/tools/nixos-enter.sh
+++ b/nixos/modules/installer/tools/nixos-enter.sh
@@ -16,7 +16,8 @@ fi
mountPoint=/mnt
system=/nix/var/nix/profiles/system
-command=($system/sw/bin/bash "--login")
+command=("$system/sw/bin/bash" "--login")
+silent=0
while [ "$#" -gt 0 ]; do
i="$1"; shift 1
@@ -32,9 +33,12 @@ while [ "$#" -gt 0 ]; do
exit 1
;;
--command|-c)
- command=($system/sw/bin/bash "-c" "$1")
+ command=("$system/sw/bin/bash" "-c" "$1")
shift 1
;;
+ --silent)
+ silent=1
+ ;;
--)
command=("$@")
break
@@ -51,11 +55,20 @@ if [[ ! -e $mountPoint/etc/NIXOS ]]; then
exit 126
fi
-mkdir -m 0755 -p "$mountPoint/dev" "$mountPoint/sys"
+mkdir -p "$mountPoint/dev" "$mountPoint/sys"
+chmod 0755 "$mountPoint/dev" "$mountPoint/sys"
mount --rbind /dev "$mountPoint/dev"
mount --rbind /sys "$mountPoint/sys"
+# If silent, write both stdout and stderr of activation script to /dev/null
+# otherwise, write both streams to stderr of this process
+if [ "$silent" -eq 0 ]; then
+ PIPE_TARGET="/dev/stderr"
+else
+ PIPE_TARGET="/dev/null"
+fi
+
# Run the activation script. Set $LOCALE_ARCHIVE to supress some Perl locale warnings.
-LOCALE_ARCHIVE=$system/sw/lib/locale/locale-archive chroot "$mountPoint" "$system/activate" >&2 || true
+LOCALE_ARCHIVE="$system/sw/lib/locale/locale-archive" chroot "$mountPoint" "$system/activate" >>$PIPE_TARGET 2>&1 || true
exec chroot "$mountPoint" "${command[@]}"
diff --git a/nixos/modules/installer/tools/nixos-generate-config.pl b/nixos/modules/installer/tools/nixos-generate-config.pl
index c09def1fceae..f2ffe61c42cb 100644
--- a/nixos/modules/installer/tools/nixos-generate-config.pl
+++ b/nixos/modules/installer/tools/nixos-generate-config.pl
@@ -563,6 +563,24 @@ $fsAndSwap
${\join "", (map { " $_\n" } (uniq @attrs))}}
EOF
+sub generateNetworkingDhcpConfig {
+ my $config = <nixos-generate-config
+ saves to /etc/nixos/configuration.nix.
+
+ This is an internal option. No backward compatibility is guaranteed.
+ Use at your own risk!
+
+ Note that this string gets spliced into a Perl script. The perl
+ variable $bootLoaderConfig can be used to
+ splice in the boot loader configuration.
+ '';
+ };
+
config = {
+ system.nixos-generate-config.configuration = mkDefault ''
+ # Edit this configuration file to define what should be installed on
+ # your system. Help is available in the configuration.nix(5) man page
+ # and in the NixOS manual (accessible by running ‘nixos-help’).
+
+ { config, pkgs, ... }:
+
+ {
+ imports =
+ [ # Include the results of the hardware scan.
+ ./hardware-configuration.nix
+ ];
+
+ $bootLoaderConfig
+ # networking.hostName = "nixos"; # Define your hostname.
+ # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
+
+ $networkingDhcpConfig
+ # Configure network proxy if necessary
+ # networking.proxy.default = "http://user:password\@proxy:port/";
+ # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
+
+ # Select internationalisation properties.
+ # i18n = {
+ # consoleFont = "Lat2-Terminus16";
+ # consoleKeyMap = "us";
+ # defaultLocale = "en_US.UTF-8";
+ # };
+
+ # Set your time zone.
+ # time.timeZone = "Europe/Amsterdam";
+
+ # List packages installed in system profile. To search, run:
+ # \$ nix search wget
+ # environment.systemPackages = with pkgs; [
+ # wget vim
+ # ];
+
+ # Some programs need SUID wrappers, can be configured further or are
+ # started in user sessions.
+ # programs.mtr.enable = true;
+ # programs.gnupg.agent = {
+ # enable = true;
+ # enableSSHSupport = true;
+ # flavour = "gnome3";
+ # };
+
+ # List services that you want to enable:
+
+ # Enable the OpenSSH daemon.
+ # services.openssh.enable = true;
+
+ # Open ports in the firewall.
+ # networking.firewall.allowedTCPPorts = [ ... ];
+ # networking.firewall.allowedUDPPorts = [ ... ];
+ # Or disable the firewall altogether.
+ # networking.firewall.enable = false;
+
+ # Enable CUPS to print documents.
+ # services.printing.enable = true;
+
+ # Enable sound.
+ # sound.enable = true;
+ # hardware.pulseaudio.enable = true;
+
+ # Enable the X11 windowing system.
+ # services.xserver.enable = true;
+ # services.xserver.layout = "us";
+ # services.xserver.xkbOptions = "eurosign:e";
+
+ # Enable touchpad support.
+ # services.xserver.libinput.enable = true;
+
+ # Enable the KDE Desktop Environment.
+ # services.xserver.displayManager.sddm.enable = true;
+ # services.xserver.desktopManager.plasma5.enable = true;
+
+ # Define a user account. Don't forget to set a password with ‘passwd’.
+ # users.users.jane = {
+ # isNormalUser = true;
+ # extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
+ # };
+
+ # This value determines the NixOS release with which your system is to be
+ # compatible, in order to avoid breaking some software such as database
+ # servers. You should change this only after NixOS release notes say you
+ # should.
+ system.stateVersion = "${config.system.nixos.release}"; # Did you read the comment?
+
+ }
+ '';
+
environment.systemPackages =
[ nixos-build-vms
nixos-install
diff --git a/nixos/modules/misc/crashdump.nix b/nixos/modules/misc/crashdump.nix
index 6e0b49fa9af0..3c47e79d0512 100644
--- a/nixos/modules/misc/crashdump.nix
+++ b/nixos/modules/misc/crashdump.nix
@@ -58,7 +58,6 @@ in
"crashkernel=${crashdump.reservedMemory}"
"nmi_watchdog=panic"
"softlockup_panic=1"
- "idle=poll"
];
kernelPatches = [ {
name = "crashdump-config";
diff --git a/nixos/modules/misc/ids.nix b/nixos/modules/misc/ids.nix
index 1047df95cdf5..3e8a5b07a5ed 100644
--- a/nixos/modules/misc/ids.nix
+++ b/nixos/modules/misc/ids.nix
@@ -251,7 +251,7 @@
gale = 223;
matrix-synapse = 224;
rspamd = 225;
- rmilter = 226;
+ # rmilter = 226; # unused, removed 2019-08-22
cfdyndns = 227;
gammu-smsd = 228;
pdnsd = 229;
@@ -328,7 +328,7 @@
qemu-libvirtd = 301;
# kvm = 302; # unused
# render = 303; # unused
- zeronet = 304;
+ # zeronet = 304; # removed 2019-01-03
lirc = 305;
lidarr = 306;
slurm = 307;
@@ -340,6 +340,7 @@
cockroachdb = 313;
zoneminder = 314;
paperless = 315;
+ #mailman = 316; # removed 2019-08-30
# When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!
@@ -559,7 +560,7 @@
gale = 223;
matrix-synapse = 224;
rspamd = 225;
- rmilter = 226;
+ # rmilter = 226; # unused, removed 2019-08-22
cfdyndns = 227;
pdnsd = 229;
octoprint = 230;
@@ -628,7 +629,7 @@
qemu-libvirtd = 301;
kvm = 302; # default udev rules from systemd requires these
render = 303; # default udev rules from systemd requires these
- zeronet = 304;
+ # zeronet = 304; # removed 2019-01-03
lirc = 305;
lidarr = 306;
slurm = 307;
@@ -640,6 +641,7 @@
cockroachdb = 313;
zoneminder = 314;
paperless = 315;
+ #mailman = 316; # removed 2019-08-30
# When adding a gid, make sure it doesn't match an existing
# uid. Users and groups with the same name should have equal
diff --git a/nixos/modules/misc/locate.nix b/nixos/modules/misc/locate.nix
index 449149e4bb65..737ed5c0a3f6 100644
--- a/nixos/modules/misc/locate.nix
+++ b/nixos/modules/misc/locate.nix
@@ -128,7 +128,10 @@ in {
# directory creation needs to be separated from main service
# because ReadWritePaths fails when the directory doesn't already exist
- systemd.tmpfiles.rules = [ "d ${dirOf cfg.output} 0755 root root -" ];
+ systemd.tmpfiles.rules =
+ let dir = dirOf cfg.output; in
+ mkIf (dir != "/var/cache")
+ [ "d ${dir} 0755 root root -" ];
systemd.services.update-locatedb =
{ description = "Update Locate Database";
diff --git a/nixos/modules/misc/nixpkgs.nix b/nixos/modules/misc/nixpkgs.nix
index e0c192246c0c..afb74581e239 100644
--- a/nixos/modules/misc/nixpkgs.nix
+++ b/nixos/modules/misc/nixpkgs.nix
@@ -19,7 +19,7 @@ let
lhs = optCall lhs_ { inherit pkgs; };
rhs = optCall rhs_ { inherit pkgs; };
in
- lhs // rhs //
+ recursiveUpdate lhs rhs //
optionalAttrs (lhs ? packageOverrides) {
packageOverrides = pkgs:
optCall lhs.packageOverrides pkgs //
diff --git a/nixos/modules/misc/version.nix b/nixos/modules/misc/version.nix
index 3ae60cb79160..773724ffbd5e 100644
--- a/nixos/modules/misc/version.nix
+++ b/nixos/modules/misc/version.nix
@@ -85,7 +85,7 @@ in
# Generate /etc/os-release. See
# https://www.freedesktop.org/software/systemd/man/os-release.html for the
# format.
- environment.etc."os-release".text =
+ environment.etc.os-release.text =
''
NAME=NixOS
ID=nixos
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index 15990177d741..5214126ff7ed 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -20,12 +20,14 @@
./config/iproute2.nix
./config/krb5/default.nix
./config/ldap.nix
+ ./config/locale.nix
./config/malloc.nix
./config/networking.nix
./config/no-x-libs.nix
./config/nsswitch.nix
./config/power-management.nix
./config/pulseaudio.nix
+ ./config/qt5.nix
./config/resolvconf.nix
./config/shells-environment.nix
./config/swap.nix
@@ -33,10 +35,10 @@
./config/system-environment.nix
./config/system-path.nix
./config/terminfo.nix
- ./config/timezone.nix
./config/unix-odbc-drivers.nix
./config/users-groups.nix
./config/vpnc.nix
+ ./config/vte.nix
./config/zram.nix
./hardware/acpilight.nix
./hardware/all-firmware.nix
@@ -46,6 +48,7 @@
./hardware/cpu/amd-microcode.nix
./hardware/cpu/intel-microcode.nix
./hardware/digitalbitbox.nix
+ ./hardware/device-tree.nix
./hardware/sensor/iio.nix
./hardware/ksm.nix
./hardware/ledger.nix
@@ -55,7 +58,9 @@
./hardware/network/intel-2200bg.nix
./hardware/nitrokey.nix
./hardware/opengl.nix
+ ./hardware/openrazer.nix
./hardware/pcmcia.nix
+ ./hardware/printers.nix
./hardware/raid/hpsa.nix
./hardware/steam-hardware.nix
./hardware/usb-wwan.nix
@@ -93,7 +98,6 @@
./programs/autojump.nix
./programs/bash/bash.nix
./programs/bcc.nix
- ./programs/blcr.nix
./programs/browserpass.nix
./programs/captive-browser.nix
./programs/ccache.nix
@@ -106,9 +110,16 @@
./programs/digitalbitbox/default.nix
./programs/dmrconfig.nix
./programs/environment.nix
+ ./programs/evince.nix
+ ./programs/file-roller.nix
./programs/firejail.nix
./programs/fish.nix
./programs/freetds.nix
+ ./programs/fuse.nix
+ ./programs/gnome-disks.nix
+ ./programs/gnome-documents.nix
+ ./programs/gnome-terminal.nix
+ ./programs/gpaste.nix
./programs/gnupg.nix
./programs/gphoto2.nix
./programs/iftop.nix
@@ -128,9 +139,9 @@
./programs/qt5ct.nix
./programs/screen.nix
./programs/sedutil.nix
+ ./programs/seahorse.nix
./programs/slock.nix
./programs/shadow.nix
- ./programs/shell.nix
./programs/spacefm.nix
./programs/singularity.nix
./programs/ssh.nix
@@ -138,16 +149,19 @@
./programs/sysdig.nix
./programs/systemtap.nix
./programs/sway.nix
+ ./programs/system-config-printer.nix
./programs/thefuck.nix
./programs/tmux.nix
./programs/tsm-client.nix
./programs/udevil.nix
+ ./programs/usbtop.nix
./programs/venus.nix
./programs/vim.nix
./programs/wavemon.nix
./programs/way-cooler.nix
./programs/waybar.nix
./programs/wireshark.nix
+ ./programs/x2goserver.nix
./programs/xfs_quota.nix
./programs/xonsh.nix
./programs/xss-lock.nix
@@ -204,11 +218,10 @@
./services/backup/bacula.nix
./services/backup/borgbackup.nix
./services/backup/duplicati.nix
- ./services/backup/crashplan.nix
- ./services/backup/crashplan-small-business.nix
./services/backup/duplicity.nix
./services/backup/mysql-backup.nix
./services/backup/postgresql-backup.nix
+ ./services/backup/postgresql-wal-receiver.nix
./services/backup/restic.nix
./services/backup/restic-rest-server.nix
./services/backup/rsnapshot.nix
@@ -269,6 +282,7 @@
./services/databases/virtuoso.nix
./services/desktops/accountsservice.nix
./services/desktops/bamf.nix
+ ./services/desktops/blueman.nix
./services/desktops/deepin/deepin.nix
./services/desktops/dleyna-renderer.nix
./services/desktops/dleyna-server.nix
@@ -277,30 +291,25 @@
./services/desktops/flatpak.nix
./services/desktops/geoclue2.nix
./services/desktops/gsignond.nix
+ ./services/desktops/gvfs.nix
./services/desktops/pipewire.nix
./services/desktops/gnome3/at-spi2-core.nix
./services/desktops/gnome3/chrome-gnome-shell.nix
- ./services/desktops/gnome3/evince.nix
./services/desktops/gnome3/evolution-data-server.nix
- ./services/desktops/gnome3/file-roller.nix
./services/desktops/gnome3/glib-networking.nix
- ./services/desktops/gnome3/gnome-disks.nix
- ./services/desktops/gnome3/gnome-documents.nix
+ ./services/desktops/gnome3/gnome-initial-setup.nix
./services/desktops/gnome3/gnome-keyring.nix
./services/desktops/gnome3/gnome-online-accounts.nix
- ./services/desktops/gnome3/gnome-remote-desktop.nix
./services/desktops/gnome3/gnome-online-miners.nix
+ ./services/desktops/gnome3/gnome-remote-desktop.nix
./services/desktops/gnome3/gnome-settings-daemon.nix
- ./services/desktops/gnome3/gnome-terminal-server.nix
./services/desktops/gnome3/gnome-user-share.nix
- ./services/desktops/gnome3/gpaste.nix
- ./services/desktops/gnome3/gvfs.nix
./services/desktops/gnome3/rygel.nix
- ./services/desktops/gnome3/seahorse.nix
./services/desktops/gnome3/sushi.nix
./services/desktops/gnome3/tracker.nix
./services/desktops/gnome3/tracker-miners.nix
./services/desktops/profile-sync-daemon.nix
+ ./services/desktops/system-config-printer.nix
./services/desktops/telepathy.nix
./services/desktops/tumbler.nix
./services/desktops/zeitgeist.nix
@@ -318,6 +327,7 @@
./services/hardware/bluetooth.nix
./services/hardware/bolt.nix
./services/hardware/brltty.nix
+ ./services/hardware/fancontrol.nix
./services/hardware/freefall.nix
./services/hardware/fwupd.nix
./services/hardware/illum.nix
@@ -371,6 +381,7 @@
./services/mail/mail.nix
./services/mail/mailcatcher.nix
./services/mail/mailhog.nix
+ ./services/mail/mailman.nix
./services/mail/mlmmj.nix
./services/mail/offlineimap.nix
./services/mail/opendkim.nix
@@ -382,7 +393,6 @@
./services/mail/spamassassin.nix
./services/mail/rspamd.nix
./services/mail/rss2email.nix
- ./services/mail/rmilter.nix
./services/mail/roundcube.nix
./services/mail/nullmailer.nix
./services/misc/airsonic.nix
@@ -402,6 +412,7 @@
./services/misc/couchpotato.nix
./services/misc/devmon.nix
./services/misc/dictd.nix
+ ./services/misc/dwm-status.nix
./services/misc/dysnomia.nix
./services/misc/disnix.nix
./services/misc/docker-registry.nix
@@ -432,13 +443,13 @@
./services/misc/logkeys.nix
./services/misc/leaps.nix
./services/misc/lidarr.nix
- ./services/misc/mantisbt.nix
./services/misc/mathics.nix
./services/misc/matrix-synapse.nix
./services/misc/mbpfan.nix
./services/misc/mediatomb.nix
./services/misc/mesos-master.nix
./services/misc/mesos-slave.nix
+ ./services/misc/metabase.nix
./services/misc/mwlib.nix
./services/misc/nix-daemon.nix
./services/misc/nix-gc.nix
@@ -491,6 +502,7 @@
./services/monitoring/das_watchdog.nix
./services/monitoring/datadog-agent.nix
./services/monitoring/dd-agent/dd-agent.nix
+ ./services/monitoring/do-agent.nix
./services/monitoring/fusion-inventory.nix
./services/monitoring/grafana.nix
./services/monitoring/grafana-reporter.nix
@@ -516,7 +528,6 @@
./services/monitoring/scollector.nix
./services/monitoring/smartd.nix
./services/monitoring/sysstat.nix
- ./services/monitoring/systemhealth.nix
./services/monitoring/teamviewer.nix
./services/monitoring/telegraf.nix
./services/monitoring/thanos.nix
@@ -557,7 +568,6 @@
./services/networking/bird.nix
./services/networking/bitlbee.nix
./services/networking/charybdis.nix
- ./services/networking/chrony.nix
./services/networking/cjdns.nix
./services/networking/cntlm.nix
./services/networking/connman.nix
@@ -604,6 +614,7 @@
./services/networking/iodine.nix
./services/networking/iperf3.nix
./services/networking/ircd-hybrid/default.nix
+ ./services/networking/jormungandr.nix
./services/networking/iwd.nix
./services/networking/keepalived/default.nix
./services/networking/keybase.nix
@@ -639,13 +650,15 @@
./services/networking/nntp-proxy.nix
./services/networking/nsd.nix
./services/networking/ntopng.nix
- ./services/networking/ntpd.nix
+ ./services/networking/ntp/chrony.nix
+ ./services/networking/ntp/ntpd.nix
+ ./services/networking/ntp/openntpd.nix
./services/networking/nullidentdmod.nix
./services/networking/nylon.nix
./services/networking/ocserv.nix
+ ./services/networking/ofono.nix
./services/networking/oidentd.nix
./services/networking/openfire.nix
- ./services/networking/openntpd.nix
./services/networking/openvpn.nix
./services/networking/ostinato.nix
./services/networking/owamp.nix
@@ -653,6 +666,7 @@
./services/networking/polipo.nix
./services/networking/powerdns.nix
./services/networking/pdns-recursor.nix
+ ./services/networking/pppd.nix
./services/networking/pptpd.nix
./services/networking/prayer.nix
./services/networking/privoxy.nix
@@ -691,6 +705,7 @@
./services/networking/supybot.nix
./services/networking/syncthing.nix
./services/networking/syncthing-relay.nix
+ ./services/networking/syncplay.nix
./services/networking/tcpcrypt.nix
./services/networking/teamspeak3.nix
./services/networking/tedicross.nix
@@ -764,6 +779,7 @@
./services/system/uptimed.nix
./services/torrent/deluge.nix
./services/torrent/flexget.nix
+ ./services/torrent/magnetico.nix
./services/torrent/opentracker.nix
./services/torrent/peerflix.nix
./services/torrent/transmission.nix
@@ -783,6 +799,7 @@
./services/web-apps/mattermost.nix
./services/web-apps/mediawiki.nix
./services/web-apps/miniflux.nix
+ ./services/web-apps/moodle.nix
./services/web-apps/nextcloud.nix
./services/web-apps/nexus.nix
./services/web-apps/pgpkeyserver-lite.nix
@@ -790,12 +807,14 @@
./services/web-apps/restya-board.nix
./services/web-apps/tt-rss.nix
./services/web-apps/selfoss.nix
+ ./services/web-apps/shiori.nix
./services/web-apps/virtlyst.nix
./services/web-apps/wordpress.nix
./services/web-apps/youtrack.nix
./services/web-apps/zabbix.nix
./services/web-servers/apache-httpd/default.nix
./services/web-servers/caddy.nix
+ ./services/web-servers/darkhttpd.nix
./services/web-servers/fcgiwrap.nix
./services/web-servers/hitch/default.nix
./services/web-servers/hydron.nix
@@ -818,6 +837,7 @@
./services/web-servers/varnish/default.nix
./services/web-servers/zope2.nix
./services/x11/extra-layouts.nix
+ ./services/x11/clight.nix
./services/x11/colord.nix
./services/x11/compton.nix
./services/x11/unclutter.nix
@@ -836,6 +856,7 @@
./services/x11/hardware/multitouch.nix
./services/x11/hardware/synaptics.nix
./services/x11/hardware/wacom.nix
+ ./services/x11/hardware/cmt.nix
./services/x11/gdk-pixbuf.nix
./services/x11/redshift.nix
./services/x11/urxvtd.nix
@@ -857,7 +878,6 @@
./system/activation/activation-script.nix
./system/activation/top-level.nix
./system/boot/binfmt.nix
- ./system/boot/coredump.nix
./system/boot/emergency-mode.nix
./system/boot/grow-partition.nix
./system/boot/initrd-network.nix
@@ -921,6 +941,7 @@
./virtualisation/anbox.nix
./virtualisation/container-config.nix
./virtualisation/containers.nix
+ ./virtualisation/cri-o.nix
./virtualisation/docker.nix
./virtualisation/docker-containers.nix
./virtualisation/ecs-agent.nix
@@ -934,6 +955,7 @@
./virtualisation/openvswitch.nix
./virtualisation/parallels-guest.nix
./virtualisation/qemu-guest-agent.nix
+ ./virtualisation/railcar.nix
./virtualisation/rkt.nix
./virtualisation/virtualbox-guest.nix
./virtualisation/virtualbox-host.nix
diff --git a/nixos/modules/profiles/hardened.nix b/nixos/modules/profiles/hardened.nix
index 9e9ddd4f3788..f7b2f5c7fc1e 100644
--- a/nixos/modules/profiles/hardened.nix
+++ b/nixos/modules/profiles/hardened.nix
@@ -14,8 +14,6 @@ with lib;
nix.allowedUsers = mkDefault [ "@users" ];
- environment.memoryAllocator.provider = mkDefault "graphene-hardened";
-
security.hideProcessInformation = mkDefault true;
security.lockKernelModules = mkDefault true;
@@ -44,6 +42,9 @@ with lib;
# Disable legacy virtual syscalls
"vsyscall=none"
+
+ # Enable page allocator randomization
+ "page_alloc.shuffle=1"
];
boot.blacklistedKernelModules = [
@@ -51,6 +52,27 @@ with lib;
"ax25"
"netrom"
"rose"
+
+ # Old or rare or insufficiently audited filesystems
+ "adfs"
+ "affs"
+ "bfs"
+ "befs"
+ "cramfs"
+ "efs"
+ "erofs"
+ "exofs"
+ "freevxfs"
+ "f2fs"
+ "hfs"
+ "hpfs"
+ "jfs"
+ "minix"
+ "nilfs2"
+ "qnx4"
+ "qnx6"
+ "sysv"
+ "ufs"
];
# Restrict ptrace() usage to processes with a pre-defined relationship
@@ -92,23 +114,17 @@ with lib;
# Disable ftrace debugging
boot.kernel.sysctl."kernel.ftrace_enabled" = mkDefault false;
- # Enable reverse path filtering (that is, do not attempt to route packets
- # that "obviously" do not belong to the iface's network; dropped packets are
- # logged as martians).
+ # Enable strict reverse path filtering (that is, do not attempt to route
+ # packets that "obviously" do not belong to the iface's network; dropped
+ # packets are logged as martians).
boot.kernel.sysctl."net.ipv4.conf.all.log_martians" = mkDefault true;
- boot.kernel.sysctl."net.ipv4.conf.all.rp_filter" = mkDefault true;
+ boot.kernel.sysctl."net.ipv4.conf.all.rp_filter" = mkDefault "1";
boot.kernel.sysctl."net.ipv4.conf.default.log_martians" = mkDefault true;
- boot.kernel.sysctl."net.ipv4.conf.default.rp_filter" = mkDefault true;
+ boot.kernel.sysctl."net.ipv4.conf.default.rp_filter" = mkDefault "1";
# Ignore broadcast ICMP (mitigate SMURF)
boot.kernel.sysctl."net.ipv4.icmp_echo_ignore_broadcasts" = mkDefault true;
- # Ignore route information from sender
- boot.kernel.sysctl."net.ipv4.conf.all.accept_source_route" = mkDefault false;
- boot.kernel.sysctl."net.ipv4.conf.default.accept_source_route" = mkDefault false;
- boot.kernel.sysctl."net.ipv6.conf.all.accept_source_route" = mkDefault false;
- boot.kernel.sysctl."net.ipv6.conf.default.accept_source_route" = mkDefault false;
-
# Ignore incoming ICMP redirects (note: default is needed to ensure that the
# setting is applied to interfaces added after the sysctls are set)
boot.kernel.sysctl."net.ipv4.conf.all.accept_redirects" = mkDefault false;
@@ -121,4 +137,7 @@ with lib;
# Ignore outgoing ICMP redirects (this is ipv4 only)
boot.kernel.sysctl."net.ipv4.conf.all.send_redirects" = mkDefault false;
boot.kernel.sysctl."net.ipv4.conf.default.send_redirects" = mkDefault false;
+
+ # Restrict userfaultfd syscalls to processes with the SYS_PTRACE capability
+ boot.kernel.sysctl."vm.unprivileged_userfaultfd" = mkDefault false;
}
diff --git a/nixos/modules/profiles/installation-device.nix b/nixos/modules/profiles/installation-device.nix
index 580ea4a58e5b..4596e163404c 100644
--- a/nixos/modules/profiles/installation-device.nix
+++ b/nixos/modules/profiles/installation-device.nix
@@ -31,21 +31,37 @@ with lib;
# Let the user play Rogue on TTY 8 during the installation.
#services.rogue.enable = true;
- # Disable some other stuff we don't need.
- security.sudo.enable = mkDefault false;
- services.udisks2.enable = mkDefault false;
+ # Use less privileged nixos user
+ users.users.nixos = {
+ isNormalUser = true;
+ extraGroups = [ "wheel" "networkmanager" "video" ];
+ # Allow the graphical user to login without password
+ initialHashedPassword = "";
+ };
+
+ # Allow the user to log in as root without a password.
+ users.users.root.initialHashedPassword = "";
+
+ # Allow passwordless sudo from nixos user
+ security.sudo = {
+ enable = mkDefault true;
+ wheelNeedsPassword = mkForce false;
+ };
# Automatically log in at the virtual consoles.
- services.mingetty.autologinUser = "root";
+ services.mingetty.autologinUser = "nixos";
# Some more help text.
- services.mingetty.helpLine =
- ''
+ services.mingetty.helpLine = ''
+ The "nixos" and "root" accounts have empty passwords.
- The "root" account has an empty password. ${
- optionalString config.services.xserver.enable
- "Type `systemctl start display-manager' to\nstart the graphical user interface."}
- '';
+ Type `sudo systemctl start sshd` to start the SSH daemon.
+ You then must set a password for either "root" or "nixos"
+ with `passwd` to be able to login.
+ '' + optionalString config.services.xserver.enable ''
+ Type `sudo systemctl start display-manager' to
+ start the graphical user interface.
+ '';
# Allow sshd to be started manually through "systemctl start sshd".
services.openssh = {
@@ -86,8 +102,5 @@ with lib;
# because we have the firewall enabled. This makes installs from the
# console less cumbersome if the machine has a public IP.
networking.firewall.logRefusedConnections = mkDefault false;
-
- # Allow the user to log in as root without a password.
- users.users.root.initialHashedPassword = "";
};
}
diff --git a/nixos/modules/profiles/qemu-guest.nix b/nixos/modules/profiles/qemu-guest.nix
index 315d04093b13..0ea70107f717 100644
--- a/nixos/modules/profiles/qemu-guest.nix
+++ b/nixos/modules/profiles/qemu-guest.nix
@@ -1,7 +1,7 @@
# Common configuration for virtual machines running under QEMU (using
# virtio).
-{ ... }:
+{ lib, ... }:
{
boot.initrd.availableKernelModules = [ "virtio_net" "virtio_pci" "virtio_mmio" "virtio_blk" "virtio_scsi" "9p" "9pnet_virtio" ];
@@ -15,5 +15,5 @@
hwclock -s
'';
- security.rngd.enable = false;
+ security.rngd.enable = lib.mkDefault false;
}
diff --git a/nixos/modules/programs/atop.nix b/nixos/modules/programs/atop.nix
index 4651cdb76e0b..7ef8d687ca17 100644
--- a/nixos/modules/programs/atop.nix
+++ b/nixos/modules/programs/atop.nix
@@ -30,7 +30,7 @@ in
};
config = mkIf (cfg.settings != {}) {
- environment.etc."atoprc".text =
+ environment.etc.atoprc.text =
concatStrings (mapAttrsToList (n: v: "${n} ${toString v}\n") cfg.settings);
};
}
diff --git a/nixos/modules/programs/bash/bash.nix b/nixos/modules/programs/bash/bash.nix
index a7e57b8608d7..548babac38ca 100644
--- a/nixos/modules/programs/bash/bash.nix
+++ b/nixos/modules/programs/bash/bash.nix
@@ -98,7 +98,7 @@ in
if [ "$TERM" != "dumb" -o -n "$INSIDE_EMACS" ]; then
PROMPT_COLOR="1;31m"
let $UID && PROMPT_COLOR="1;32m"
- if [ -n "$INSIDE_EMACS" ]; then
+ if [ -n "$INSIDE_EMACS" -o "$TERM" == "eterm" -o "$TERM" == "eterm-color" ]; then
# Emacs term mode doesn't support xterm title escape sequence (\e]0;)
PS1="\n\[\033[$PROMPT_COLOR\][\u@\h:\w]\\$\[\033[0m\] "
else
@@ -159,7 +159,7 @@ in
};
- environment.etc."profile".text =
+ environment.etc.profile.text =
''
# /etc/profile: DO NOT EDIT -- this file has been generated automatically.
# This file is read for login shells.
@@ -184,7 +184,7 @@ in
fi
'';
- environment.etc."bashrc".text =
+ environment.etc.bashrc.text =
''
# /etc/bashrc: DO NOT EDIT -- this file has been generated automatically.
@@ -212,7 +212,7 @@ in
# Configuration for readline in bash. We use "option default"
# priority to allow user override using both .text and .source.
- environment.etc."inputrc".source = mkOptionDefault ./inputrc;
+ environment.etc.inputrc.source = mkOptionDefault ./inputrc;
users.defaultUserShell = mkDefault pkgs.bashInteractive;
diff --git a/nixos/modules/programs/blcr.nix b/nixos/modules/programs/blcr.nix
deleted file mode 100644
index 804e1d01f12b..000000000000
--- a/nixos/modules/programs/blcr.nix
+++ /dev/null
@@ -1,27 +0,0 @@
-{ config, lib, ... }:
-
-let
- inherit (lib) mkOption mkIf;
- cfg = config.environment.blcr;
- blcrPkg = config.boot.kernelPackages.blcr;
-in
-
-{
- ###### interface
-
- options = {
- environment.blcr.enable = mkOption {
- default = false;
- description =
- "Whether to enable support for the BLCR checkpointing tool.";
- };
- };
-
- ###### implementation
-
- config = mkIf cfg.enable {
- boot.kernelModules = [ "blcr" "blcr_imports" ];
- boot.extraModulePackages = [ blcrPkg ];
- environment.systemPackages = [ blcrPkg ];
- };
-}
diff --git a/nixos/modules/programs/dconf.nix b/nixos/modules/programs/dconf.nix
index b7bfb8504b6f..eeebc3558bdf 100644
--- a/nixos/modules/programs/dconf.nix
+++ b/nixos/modules/programs/dconf.nix
@@ -34,11 +34,11 @@ in
services.dbus.packages = [ pkgs.gnome3.dconf ];
- environment.variables.GIO_EXTRA_MODULES = optional cfg.enable
- "${pkgs.gnome3.dconf.lib}/lib/gio/modules";
- # https://github.com/NixOS/nixpkgs/pull/31891
- #environment.variables.XDG_DATA_DIRS = optional cfg.enable
- # "$(echo ${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/gsettings-desktop-schemas-*)";
+ # For dconf executable
+ environment.systemPackages = [ pkgs.gnome3.dconf ];
+
+ # Needed for unwrapped applications
+ environment.variables.GIO_EXTRA_MODULES = mkIf cfg.enable [ "${pkgs.gnome3.dconf.lib}/lib/gio/modules" ];
};
}
diff --git a/nixos/modules/programs/environment.nix b/nixos/modules/programs/environment.nix
index 3c6d356ef998..38bdabb4fa81 100644
--- a/nixos/modules/programs/environment.nix
+++ b/nixos/modules/programs/environment.nix
@@ -20,17 +20,16 @@ in
{ NIXPKGS_CONFIG = "/etc/nix/nixpkgs-config.nix";
PAGER = mkDefault "less -R";
EDITOR = mkDefault "nano";
- XCURSOR_PATH = [ "$HOME/.icons" ];
+ XDG_CONFIG_DIRS = [ "/etc/xdg" ]; # needs to be before profile-relative paths to allow changes through environment.etc
};
- environment.profiles =
- [ "$HOME/.nix-profile"
- "/nix/var/nix/profiles/default"
+ environment.profiles = mkAfter
+ [ "/nix/var/nix/profiles/default"
"/run/current-system/sw"
];
# TODO: move most of these elsewhere
- environment.profileRelativeEnvVars =
+ environment.profileRelativeSessionVariables =
{ PATH = [ "/bin" ];
INFOPATH = [ "/info" "/share/info" ];
KDEDIRS = [ "" ];
diff --git a/nixos/modules/services/desktops/gnome3/evince.nix b/nixos/modules/programs/evince.nix
similarity index 53%
rename from nixos/modules/services/desktops/gnome3/evince.nix
rename to nixos/modules/programs/evince.nix
index 5f040a16f067..473fddb09d02 100644
--- a/nixos/modules/services/desktops/gnome3/evince.nix
+++ b/nixos/modules/programs/evince.nix
@@ -6,14 +6,21 @@ with lib;
{
+ # Added 2019-08-09
+ imports = [
+ (mkRenamedOptionModule
+ [ "services" "gnome3" "evince" "enable" ]
+ [ "programs" "evince" "enable" ])
+ ];
+
###### interface
options = {
- services.gnome3.evince = {
+ programs.evince = {
enable = mkEnableOption
- "systemd and dbus services for Evince, the GNOME document viewer";
+ "Evince, the GNOME document viewer";
};
@@ -22,7 +29,7 @@ with lib;
###### implementation
- config = mkIf config.services.gnome3.evince.enable {
+ config = mkIf config.programs.evince.enable {
environment.systemPackages = [ pkgs.evince ];
diff --git a/nixos/modules/services/desktops/gnome3/file-roller.nix b/nixos/modules/programs/file-roller.nix
similarity index 57%
rename from nixos/modules/services/desktops/gnome3/file-roller.nix
rename to nixos/modules/programs/file-roller.nix
index 7fb558a98953..64f6a94e7641 100644
--- a/nixos/modules/services/desktops/gnome3/file-roller.nix
+++ b/nixos/modules/programs/file-roller.nix
@@ -6,11 +6,18 @@ with lib;
{
+ # Added 2019-08-09
+ imports = [
+ (mkRenamedOptionModule
+ [ "services" "gnome3" "file-roller" "enable" ]
+ [ "programs" "file-roller" "enable" ])
+ ];
+
###### interface
options = {
- services.gnome3.file-roller = {
+ programs.file-roller = {
enable = mkEnableOption "File Roller, an archive manager for GNOME";
@@ -21,7 +28,7 @@ with lib;
###### implementation
- config = mkIf config.services.gnome3.file-roller.enable {
+ config = mkIf config.programs.file-roller.enable {
environment.systemPackages = [ pkgs.gnome3.file-roller ];
diff --git a/nixos/modules/programs/firejail.nix b/nixos/modules/programs/firejail.nix
index 46ee4bc0f7a0..74c3e4425a7c 100644
--- a/nixos/modules/programs/firejail.nix
+++ b/nixos/modules/programs/firejail.nix
@@ -5,7 +5,7 @@ with lib;
let
cfg = config.programs.firejail;
- wrappedBins = pkgs.stdenv.mkDerivation rec {
+ wrappedBins = pkgs.stdenv.mkDerivation {
name = "firejail-wrapped-binaries";
nativeBuildInputs = with pkgs; [ makeWrapper ];
buildCommand = ''
diff --git a/nixos/modules/programs/fuse.nix b/nixos/modules/programs/fuse.nix
new file mode 100644
index 000000000000..c15896efbb51
--- /dev/null
+++ b/nixos/modules/programs/fuse.nix
@@ -0,0 +1,37 @@
+{ config, lib, ... }:
+
+with lib;
+
+let
+ cfg = config.programs.fuse;
+in {
+ meta.maintainers = with maintainers; [ primeos ];
+
+ options.programs.fuse = {
+ mountMax = mkOption {
+ # In the C code it's an "int" (i.e. signed and at least 16 bit), but
+ # negative numbers obviously make no sense:
+ type = types.ints.between 0 32767; # 2^15 - 1
+ default = 1000;
+ description = ''
+ Set the maximum number of FUSE mounts allowed to non-root users.
+ '';
+ };
+
+ userAllowOther = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Allow non-root users to specify the allow_other or allow_root mount
+ options, see mount.fuse3(8).
+ '';
+ };
+ };
+
+ config = {
+ environment.etc."fuse.conf".text = ''
+ ${optionalString (!cfg.userAllowOther) "#"}user_allow_other
+ mount_max = ${toString cfg.mountMax}
+ '';
+ };
+}
diff --git a/nixos/modules/services/desktops/gnome3/gnome-disks.nix b/nixos/modules/programs/gnome-disks.nix
similarity index 57%
rename from nixos/modules/services/desktops/gnome3/gnome-disks.nix
rename to nixos/modules/programs/gnome-disks.nix
index 139534cdb892..1cf839a6ddb0 100644
--- a/nixos/modules/services/desktops/gnome3/gnome-disks.nix
+++ b/nixos/modules/programs/gnome-disks.nix
@@ -1,4 +1,4 @@
-# GNOME Disks daemon.
+# GNOME Disks.
{ config, pkgs, lib, ... }:
@@ -6,17 +6,24 @@ with lib;
{
+ # Added 2019-08-09
+ imports = [
+ (mkRenamedOptionModule
+ [ "services" "gnome3" "gnome-disks" "enable" ]
+ [ "programs" "gnome-disks" "enable" ])
+ ];
+
###### interface
options = {
- services.gnome3.gnome-disks = {
+ programs.gnome-disks = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
- Whether to enable GNOME Disks daemon, a service designed to
+ Whether to enable GNOME Disks daemon, a program designed to
be a UDisks2 graphical front-end.
'';
};
@@ -28,7 +35,7 @@ with lib;
###### implementation
- config = mkIf config.services.gnome3.gnome-disks.enable {
+ config = mkIf config.programs.gnome-disks.enable {
environment.systemPackages = [ pkgs.gnome3.gnome-disk-utility ];
diff --git a/nixos/modules/services/desktops/gnome3/gnome-documents.nix b/nixos/modules/programs/gnome-documents.nix
similarity index 61%
rename from nixos/modules/services/desktops/gnome3/gnome-documents.nix
rename to nixos/modules/programs/gnome-documents.nix
index f6efb6684240..bfa3d409ee30 100644
--- a/nixos/modules/services/desktops/gnome3/gnome-documents.nix
+++ b/nixos/modules/programs/gnome-documents.nix
@@ -1,4 +1,4 @@
-# GNOME Documents daemon.
+# GNOME Documents.
{ config, pkgs, lib, ... }:
@@ -6,17 +6,24 @@ with lib;
{
+ # Added 2019-08-09
+ imports = [
+ (mkRenamedOptionModule
+ [ "services" "gnome3" "gnome-documents" "enable" ]
+ [ "programs" "gnome-documents" "enable" ])
+ ];
+
###### interface
options = {
- services.gnome3.gnome-documents = {
+ programs.gnome-documents = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
- Whether to enable GNOME Documents services, a document
+ Whether to enable GNOME Documents, a document
manager application for GNOME.
'';
};
@@ -28,7 +35,7 @@ with lib;
###### implementation
- config = mkIf config.services.gnome3.gnome-documents.enable {
+ config = mkIf config.programs.gnome-documents.enable {
environment.systemPackages = [ pkgs.gnome3.gnome-documents ];
diff --git a/nixos/modules/programs/gnome-terminal.nix b/nixos/modules/programs/gnome-terminal.nix
new file mode 100644
index 000000000000..0036677a1576
--- /dev/null
+++ b/nixos/modules/programs/gnome-terminal.nix
@@ -0,0 +1,36 @@
+# GNOME Terminal.
+
+{ config, pkgs, lib, ... }:
+
+with lib;
+
+let
+
+ cfg = config.programs.gnome-terminal;
+
+in
+
+{
+
+ # Added 2019-08-19
+ imports = [
+ (mkRenamedOptionModule
+ [ "services" "gnome3" "gnome-terminal-server" "enable" ]
+ [ "programs" "gnome-terminal" "enable" ])
+ ];
+
+ options = {
+
+ programs.gnome-terminal.enable = mkEnableOption "GNOME Terminal";
+
+ };
+
+ config = mkIf cfg.enable {
+ environment.systemPackages = [ pkgs.gnome3.gnome-terminal ];
+ services.dbus.packages = [ pkgs.gnome3.gnome-terminal ];
+ systemd.packages = [ pkgs.gnome3.gnome-terminal ];
+
+ programs.bash.vteIntegration = true;
+ programs.zsh.vteIntegration = true;
+ };
+}
diff --git a/nixos/modules/programs/gnupg.nix b/nixos/modules/programs/gnupg.nix
index 9618d61a1f5b..4fb7c43c8b2e 100644
--- a/nixos/modules/programs/gnupg.nix
+++ b/nixos/modules/programs/gnupg.nix
@@ -6,6 +6,19 @@ let
cfg = config.programs.gnupg;
+ xserverCfg = config.services.xserver;
+
+ defaultPinentryFlavor =
+ if xserverCfg.desktopManager.lxqt.enable
+ || xserverCfg.desktopManager.plasma5.enable then
+ "qt"
+ else if xserverCfg.desktopManager.xfce.enable then
+ "gtk2"
+ else if xserverCfg.enable then
+ "gnome3"
+ else
+ null;
+
in
{
@@ -54,6 +67,20 @@ in
'';
};
+ agent.pinentryFlavor = mkOption {
+ type = types.nullOr (types.enum pkgs.pinentry.flavors);
+ example = "gnome3";
+ description = ''
+ Which pinentry interface to use. If not null, the path to the
+ pinentry binary will be passed to gpg-agent via commandline and
+ thus overrides the pinentry option in gpg-agent.conf in the user's
+ home directory.
+ If not set at all, it'll pick an appropriate flavor depending on the
+ system configuration (qt flavor for lxqt and plasma5, gtk2 for xfce
+ 4.12, gnome3 on all other systems with X enabled, ncurses otherwise).
+ '';
+ };
+
dirmngr.enable = mkOption {
type = types.bool;
default = false;
@@ -64,6 +91,16 @@ in
};
config = mkIf cfg.agent.enable {
+ programs.gnupg.agent.pinentryFlavor = mkDefault defaultPinentryFlavor;
+
+ # This overrides the systemd user unit shipped with the gnupg package
+ systemd.user.services.gpg-agent = mkIf (cfg.agent.pinentryFlavor != null) {
+ serviceConfig.ExecStart = [ "" ''
+ ${pkgs.gnupg}/bin/gpg-agent --supervised \
+ --pinentry-program ${pkgs.pinentry.${cfg.agent.pinentryFlavor}}/bin/pinentry
+ '' ];
+ };
+
systemd.user.sockets.gpg-agent = {
wantedBy = [ "sockets.target" ];
};
@@ -84,6 +121,7 @@ in
wantedBy = [ "sockets.target" ];
};
+ environment.systemPackages = with pkgs; [ cfg.package ];
systemd.packages = [ cfg.package ];
environment.interactiveShellInit = ''
diff --git a/nixos/modules/services/desktops/gnome3/gpaste.nix b/nixos/modules/programs/gpaste.nix
similarity index 65%
rename from nixos/modules/services/desktops/gnome3/gpaste.nix
rename to nixos/modules/programs/gpaste.nix
index 5a8258775e0a..4f6deb77e5eb 100644
--- a/nixos/modules/services/desktops/gnome3/gpaste.nix
+++ b/nixos/modules/programs/gpaste.nix
@@ -1,12 +1,20 @@
-# GPaste daemon.
+# GPaste.
{ config, lib, pkgs, ... }:
with lib;
{
+
+ # Added 2019-08-09
+ imports = [
+ (mkRenamedOptionModule
+ [ "services" "gnome3" "gpaste" "enable" ]
+ [ "programs" "gpaste" "enable" ])
+ ];
+
###### interface
options = {
- services.gnome3.gpaste = {
+ programs.gpaste = {
enable = mkOption {
type = types.bool;
default = false;
@@ -18,10 +26,9 @@ with lib;
};
###### implementation
- config = mkIf config.services.gnome3.gpaste.enable {
+ config = mkIf config.programs.gpaste.enable {
environment.systemPackages = [ pkgs.gnome3.gpaste ];
services.dbus.packages = [ pkgs.gnome3.gpaste ];
- services.xserver.desktopManager.gnome3.sessionPath = [ pkgs.gnome3.gpaste ];
systemd.packages = [ pkgs.gnome3.gpaste ];
};
}
diff --git a/nixos/modules/programs/less.nix b/nixos/modules/programs/less.nix
index 9fdf99e9c694..75b3e707d576 100644
--- a/nixos/modules/programs/less.nix
+++ b/nixos/modules/programs/less.nix
@@ -54,8 +54,8 @@ in
type = types.attrsOf types.str;
default = {};
example = {
- "h" = "noaction 5\e(";
- "l" = "noaction 5\e)";
+ h = "noaction 5\\e(";
+ l = "noaction 5\\e)";
};
description = "Defines new command keys.";
};
@@ -74,7 +74,7 @@ in
type = types.attrsOf types.str;
default = {};
example = {
- "\e" = "abort";
+ e = "abort";
};
description = "Defines new line-editing keys.";
};
@@ -111,11 +111,11 @@ in
environment.systemPackages = [ pkgs.less ];
environment.variables = {
- "LESSKEY_SYSTEM" = toString lessKey;
+ LESSKEY_SYSTEM = toString lessKey;
} // optionalAttrs (cfg.lessopen != null) {
- "LESSOPEN" = cfg.lessopen;
+ LESSOPEN = cfg.lessopen;
} // optionalAttrs (cfg.lessclose != null) {
- "LESSCLOSE" = cfg.lessclose;
+ LESSCLOSE = cfg.lessclose;
};
warnings = optional (
diff --git a/nixos/modules/programs/mtr.nix b/nixos/modules/programs/mtr.nix
index 1fdec4c04f68..75b710c1584f 100644
--- a/nixos/modules/programs/mtr.nix
+++ b/nixos/modules/programs/mtr.nix
@@ -4,6 +4,7 @@ with lib;
let
cfg = config.programs.mtr;
+
in {
options = {
programs.mtr = {
@@ -15,13 +16,22 @@ in {
setcap wrapper for it.
'';
};
+
+ package = mkOption {
+ type = types.package;
+ default = pkgs.mtr;
+ description = ''
+ The package to use.
+ '';
+ };
};
};
config = mkIf cfg.enable {
- environment.systemPackages = with pkgs; [ mtr ];
+ environment.systemPackages = with pkgs; [ cfg.package ];
+
security.wrappers.mtr-packet = {
- source = "${pkgs.mtr}/bin/mtr-packet";
+ source = "${cfg.package}/bin/mtr-packet";
capabilities = "cap_net_raw+p";
};
};
diff --git a/nixos/modules/programs/nano.nix b/nixos/modules/programs/nano.nix
index 6a4d46338e19..5837dd46d7cd 100644
--- a/nixos/modules/programs/nano.nix
+++ b/nixos/modules/programs/nano.nix
@@ -35,7 +35,7 @@ in
###### implementation
config = lib.mkIf (cfg.nanorc != "" || cfg.syntaxHighlight) {
- environment.etc."nanorc".text = lib.concatStrings [ cfg.nanorc
+ environment.etc.nanorc.text = lib.concatStrings [ cfg.nanorc
(lib.optionalString cfg.syntaxHighlight ''${LF}include "${pkgs.nano}/share/nano/*.nanorc"'') ];
};
diff --git a/nixos/modules/programs/npm.nix b/nixos/modules/programs/npm.nix
index 5fdd4fa841a1..b351d80c7acf 100644
--- a/nixos/modules/programs/npm.nix
+++ b/nixos/modules/programs/npm.nix
@@ -36,7 +36,7 @@ in
###### implementation
config = lib.mkIf cfg.enable {
- environment.etc."npmrc".text = cfg.npmrc;
+ environment.etc.npmrc.text = cfg.npmrc;
environment.variables.NPM_CONFIG_GLOBALCONFIG = "/etc/npmrc";
diff --git a/nixos/modules/programs/nylas-mail.nix b/nixos/modules/programs/nylas-mail.nix
deleted file mode 100644
index 08a6cd0a6049..000000000000
--- a/nixos/modules/programs/nylas-mail.nix
+++ /dev/null
@@ -1,36 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-with lib;
-
-let
- cfg = config.services.nylas-mail;
-in {
- ###### interface
- options = {
- services.nylas-mail = {
-
- enable = mkEnableOption ''
- nylas-mail - Open-source mail client built on the modern web with Electron, React, and Flux
- '';
-
- gnome3-keyring = mkOption {
- type = types.bool;
- default = true;
- description = "Enable gnome3 keyring for nylas-mail.";
- };
- };
- };
-
-
- ###### implementation
-
- config = mkIf cfg.enable {
-
- environment.systemPackages = [ pkgs.nylas-mail-bin ];
-
- services.gnome3.gnome-keyring = mkIf cfg.gnome3-keyring {
- enable = true;
- };
-
- };
-}
diff --git a/nixos/modules/programs/plotinus.nix b/nixos/modules/programs/plotinus.nix
index 065e72d6c374..e3549c79588b 100644
--- a/nixos/modules/programs/plotinus.nix
+++ b/nixos/modules/programs/plotinus.nix
@@ -18,7 +18,7 @@ in
enable = mkOption {
default = false;
description = ''
- Whether to enable the Plotinus GTK+3 plugin. Plotinus provides a
+ Whether to enable the Plotinus GTK 3 plugin. Plotinus provides a
popup (triggered by Ctrl-Shift-P) to search the menus of a
compatible application.
'';
diff --git a/nixos/modules/programs/plotinus.xml b/nixos/modules/programs/plotinus.xml
index 902cd89e0c49..8fc8c22c6d76 100644
--- a/nixos/modules/programs/plotinus.xml
+++ b/nixos/modules/programs/plotinus.xml
@@ -13,10 +13,10 @@
- Plotinus is a searchable command palette in every modern GTK+ application.
+ Plotinus is a searchable command palette in every modern GTK application.
- When in a GTK+3 application and Plotinus is enabled, you can press
+ When in a GTK 3 application and Plotinus is enabled, you can press
Ctrl+Shift+P to open the command palette. The command
palette provides a searchable list of of all menu items in the application.
diff --git a/nixos/modules/programs/screen.nix b/nixos/modules/programs/screen.nix
index c1daaa58f16f..4fd800dbae79 100644
--- a/nixos/modules/programs/screen.nix
+++ b/nixos/modules/programs/screen.nix
@@ -24,7 +24,7 @@ in
###### implementation
config = mkIf (cfg.screenrc != "") {
- environment.etc."screenrc".text = cfg.screenrc;
+ environment.etc.screenrc.text = cfg.screenrc;
environment.systemPackages = [ pkgs.screen ];
};
diff --git a/nixos/modules/programs/seahorse.nix b/nixos/modules/programs/seahorse.nix
new file mode 100644
index 000000000000..b229d2a2c0db
--- /dev/null
+++ b/nixos/modules/programs/seahorse.nix
@@ -0,0 +1,46 @@
+# Seahorse.
+
+{ config, pkgs, lib, ... }:
+
+with lib;
+
+{
+
+ # Added 2019-08-27
+ imports = [
+ (mkRenamedOptionModule
+ [ "services" "gnome3" "seahorse" "enable" ]
+ [ "programs" "seahorse" "enable" ])
+ ];
+
+
+ ###### interface
+
+ options = {
+
+ programs.seahorse = {
+
+ enable = mkEnableOption "Seahorse, a GNOME application for managing encryption keys and passwords in the GNOME Keyring";
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.programs.seahorse.enable {
+
+ programs.ssh.askPassword = mkDefault "${pkgs.gnome3.seahorse}/libexec/seahorse/ssh-askpass";
+
+ environment.systemPackages = [
+ pkgs.gnome3.seahorse
+ ];
+
+ services.dbus.packages = [
+ pkgs.gnome3.seahorse
+ ];
+
+ };
+
+}
diff --git a/nixos/modules/programs/shell.nix b/nixos/modules/programs/shell.nix
deleted file mode 100644
index b7f7b91b5fbe..000000000000
--- a/nixos/modules/programs/shell.nix
+++ /dev/null
@@ -1,54 +0,0 @@
-# This module defines a standard configuration for NixOS shells.
-
-{ config, lib, ... }:
-
-with lib;
-
-{
-
- config = {
-
- environment.shellInit =
- ''
- # Set up the per-user profile.
- mkdir -m 0755 -p "$NIX_USER_PROFILE_DIR"
- if [ "$(stat -c '%u' "$NIX_USER_PROFILE_DIR")" != "$(id -u)" ]; then
- echo "WARNING: the per-user profile dir $NIX_USER_PROFILE_DIR should belong to user id $(id -u)" >&2
- fi
-
- if [ -w "$HOME" ]; then
- if ! [ -L "$HOME/.nix-profile" ]; then
- if [ "$USER" != root ]; then
- ln -s "$NIX_USER_PROFILE_DIR/profile" "$HOME/.nix-profile"
- else
- # Root installs in the system-wide profile by default.
- ln -s /nix/var/nix/profiles/default "$HOME/.nix-profile"
- fi
- fi
-
- # Subscribe the root user to the NixOS channel by default.
- if [ "$USER" = root -a ! -e "$HOME/.nix-channels" ]; then
- echo "${config.system.defaultChannel} nixos" > "$HOME/.nix-channels"
- fi
-
- # Create the per-user garbage collector roots directory.
- NIX_USER_GCROOTS_DIR="/nix/var/nix/gcroots/per-user/$USER"
- mkdir -m 0755 -p "$NIX_USER_GCROOTS_DIR"
- if [ "$(stat -c '%u' "$NIX_USER_GCROOTS_DIR")" != "$(id -u)" ]; then
- echo "WARNING: the per-user gcroots dir $NIX_USER_GCROOTS_DIR should belong to user id $(id -u)" >&2
- fi
-
- # Set up a default Nix expression from which to install stuff.
- if [ ! -e "$HOME/.nix-defexpr" -o -L "$HOME/.nix-defexpr" ]; then
- rm -f "$HOME/.nix-defexpr"
- mkdir -p "$HOME/.nix-defexpr"
- if [ "$USER" != root ]; then
- ln -s /nix/var/nix/profiles/per-user/root/channels "$HOME/.nix-defexpr/channels_root"
- fi
- fi
- fi
- '';
-
- };
-
-}
diff --git a/nixos/modules/programs/sway.nix b/nixos/modules/programs/sway.nix
index b4f03151cdc1..f92d09a7ef44 100644
--- a/nixos/modules/programs/sway.nix
+++ b/nixos/modules/programs/sway.nix
@@ -55,7 +55,7 @@ in {
extraPackages = mkOption {
type = with types; listOf package;
default = with pkgs; [
- swaylock swayidle
+ swaylock swayidle swaybg
xwayland rxvt_unicode dmenu
];
defaultText = literalExample ''
diff --git a/nixos/modules/programs/system-config-printer.nix b/nixos/modules/programs/system-config-printer.nix
new file mode 100644
index 000000000000..34592dd7064b
--- /dev/null
+++ b/nixos/modules/programs/system-config-printer.nix
@@ -0,0 +1,32 @@
+{ config, pkgs, lib, ... }:
+
+with lib;
+
+{
+
+ ###### interface
+
+ options = {
+
+ programs.system-config-printer = {
+
+ enable = mkEnableOption "system-config-printer, a Graphical user interface for CUPS administration";
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.programs.system-config-printer.enable {
+
+ environment.systemPackages = [
+ pkgs.system-config-printer
+ ];
+
+ services.system-config-printer.enable = true;
+
+ };
+
+}
diff --git a/nixos/modules/programs/thefuck.nix b/nixos/modules/programs/thefuck.nix
index 21ed6603c1bd..b909916158d3 100644
--- a/nixos/modules/programs/thefuck.nix
+++ b/nixos/modules/programs/thefuck.nix
@@ -17,7 +17,7 @@ in
alias = mkOption {
default = "fuck";
- type = types.string;
+ type = types.str;
description = ''
`thefuck` needs an alias to be configured.
diff --git a/nixos/modules/programs/usbtop.nix b/nixos/modules/programs/usbtop.nix
new file mode 100644
index 000000000000..c1b6ee38caa1
--- /dev/null
+++ b/nixos/modules/programs/usbtop.nix
@@ -0,0 +1,21 @@
+{ config, pkgs, lib, ... }:
+
+with lib;
+
+let
+ cfg = config.programs.usbtop;
+in {
+ options = {
+ programs.usbtop.enable = mkEnableOption "usbtop and required kernel module";
+ };
+
+ config = mkIf cfg.enable {
+ environment.systemPackages = with pkgs; [
+ usbtop
+ ];
+
+ boot.kernelModules = [
+ "usbmon"
+ ];
+ };
+}
diff --git a/nixos/modules/programs/x2goserver.nix b/nixos/modules/programs/x2goserver.nix
new file mode 100644
index 000000000000..77a1a0da7993
--- /dev/null
+++ b/nixos/modules/programs/x2goserver.nix
@@ -0,0 +1,148 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+ cfg = config.programs.x2goserver;
+
+ defaults = {
+ superenicer = { enable = cfg.superenicer.enable; };
+ };
+ confText = generators.toINI {} (recursiveUpdate defaults cfg.settings);
+ x2goServerConf = pkgs.writeText "x2goserver.conf" confText;
+
+ x2goAgentOptions = pkgs.writeText "x2goagent.options" ''
+ X2GO_NXOPTIONS=""
+ X2GO_NXAGENT_DEFAULT_OPTIONS="${concatStringsSep " " cfg.nxagentDefaultOptions}"
+ '';
+
+in {
+ options.programs.x2goserver = {
+ enable = mkEnableOption "x2goserver" // {
+ description = ''
+ Enables the x2goserver module.
+ NOTE: This will create a good amount of symlinks in `/usr/local/bin`
+ '';
+ };
+
+ superenicer = {
+ enable = mkEnableOption "superenicer" // {
+ description = ''
+ Enables the SupeReNicer code in x2gocleansessions, this will renice
+ suspended sessions to nice level 19 and renice them to level 0 if the
+ session becomes marked as running again
+ '';
+ };
+ };
+
+ nxagentDefaultOptions = mkOption {
+ type = types.listOf types.str;
+ default = [ "-extension GLX" "-nolisten tcp" ];
+ example = [ "-extension GLX" "-nolisten tcp" ];
+ description = ''
+ List of default nx agent options.
+ '';
+ };
+
+ settings = mkOption {
+ type = types.attrsOf types.attrs;
+ default = {};
+ description = ''
+ x2goserver.conf ini configuration as nix attributes. See
+ `x2goserver.conf(5)` for details
+ '';
+ example = literalExample ''
+ superenicer = {
+ "enable" = "yes";
+ "idle-nice-level" = 19;
+ };
+ telekinesis = { "enable" = "no"; };
+ '';
+ };
+ };
+
+ config = mkIf cfg.enable {
+
+ environment.systemPackages = [ pkgs.x2goserver ];
+
+ users.groups.x2go = {};
+ users.users.x2go = {
+ home = "/var/lib/x2go/db";
+ group = "x2go";
+ };
+
+ security.wrappers.x2gosqliteWrapper = {
+ source = "${pkgs.x2goserver}/lib/x2go/libx2go-server-db-sqlite3-wrapper.pl";
+ owner = "x2go";
+ group = "x2go";
+ setgid = true;
+ };
+ security.wrappers.x2goprintWrapper = {
+ source = "${pkgs.x2goserver}/bin/x2goprint";
+ owner = "x2go";
+ group = "x2go";
+ setgid = true;
+ };
+
+ systemd.tmpfiles.rules = with pkgs; [
+ "d /var/lib/x2go/ - x2go x2go - -"
+ "d /var/lib/x2go/db - x2go x2go - -"
+ "d /var/lib/x2go/conf - x2go x2go - -"
+ "d /run/x2go 0755 x2go x2go - -"
+ ] ++
+ # x2goclient sends SSH commands with preset PATH set to
+ # "/usr/local/bin;/usr/bin;/bin". Since we cannot filter arbitrary ssh
+ # commands, we have to make the following executables available.
+ map (f: "L+ /usr/local/bin/${f} - - - - ${x2goserver}/bin/${f}") [
+ "x2goagent" "x2gobasepath" "x2gocleansessions" "x2gocmdexitmessage"
+ "x2godbadmin" "x2gofeature" "x2gofeaturelist" "x2gofm" "x2gogetapps"
+ "x2gogetservers" "x2golistdesktops" "x2golistmounts" "x2golistsessions"
+ "x2golistsessions_root" "x2golistshadowsessions" "x2gomountdirs"
+ "x2gopath" "x2goprint" "x2goresume-desktopsharing" "x2goresume-session"
+ "x2goruncommand" "x2goserver-run-extensions" "x2gosessionlimit"
+ "x2gosetkeyboard" "x2goshowblocks" "x2gostartagent"
+ "x2gosuspend-desktopsharing" "x2gosuspend-session"
+ "x2goterminate-desktopsharing" "x2goterminate-session"
+ "x2goumount-session" "x2goversion"
+ ] ++ [
+ "L+ /usr/local/bin/awk - - - - ${gawk}/bin/awk"
+ "L+ /usr/local/bin/chmod - - - - ${coreutils}/bin/chmod"
+ "L+ /usr/local/bin/cp - - - - ${coreutils}/bin/cp"
+ "L+ /usr/local/bin/sed - - - - ${gnused}/bin/sed"
+ "L+ /usr/local/bin/setsid - - - - ${utillinux}/bin/setsid"
+ "L+ /usr/local/bin/xrandr - - - - ${xorg.xrandr}/bin/xrandr"
+ "L+ /usr/local/bin/xmodmap - - - - ${xorg.xmodmap}/bin/xmodmap"
+ ];
+
+ systemd.services.x2goserver = {
+ description = "X2Go Server Daemon";
+ wantedBy = [ "multi-user.target" ];
+ unitConfig.Documentation = "man:x2goserver.conf(5)";
+ serviceConfig = {
+ Type = "forking";
+ ExecStart = "${pkgs.x2goserver}/bin/x2gocleansessions";
+ PIDFile = "/run/x2go/x2goserver.pid";
+ User = "x2go";
+ Group = "x2go";
+ RuntimeDirectory = "x2go";
+ StateDirectory = "x2go";
+ };
+ preStart = ''
+ if [ ! -e /var/lib/x2go/setup_ran ]
+ then
+ mkdir -p /var/lib/x2go/conf
+ cp -r ${pkgs.x2goserver}/etc/x2go/* /var/lib/x2go/conf/
+ ln -sf ${x2goServerConf} /var/lib/x2go/conf/x2goserver.conf
+ ln -sf ${x2goAgentOptions} /var/lib/x2go/conf/x2goagent.options
+ ${pkgs.x2goserver}/bin/x2godbadmin --createdb
+ touch /var/lib/x2go/setup_ran
+ fi
+ '';
+ };
+
+ # https://bugs.x2go.org/cgi-bin/bugreport.cgi?bug=276
+ security.sudo.extraConfig = ''
+ Defaults env_keep+=QT_GRAPHICSSYSTEM
+ '';
+ };
+}
diff --git a/nixos/modules/programs/xfs_quota.nix b/nixos/modules/programs/xfs_quota.nix
index 648fd9a8a94f..c03e59a5b4ab 100644
--- a/nixos/modules/programs/xfs_quota.nix
+++ b/nixos/modules/programs/xfs_quota.nix
@@ -61,7 +61,7 @@ in
description = "Setup of xfs_quota projects. Make sure the filesystem is mounted with the pquota option.";
example = {
- "projname" = {
+ projname = {
id = 50;
path = "/xfsprojects/projname";
sizeHardLimit = "50g";
diff --git a/nixos/modules/programs/xonsh.nix b/nixos/modules/programs/xonsh.nix
index 5cd2a49f8073..1590020f7b64 100644
--- a/nixos/modules/programs/xonsh.nix
+++ b/nixos/modules/programs/xonsh.nix
@@ -45,7 +45,7 @@ in
config = mkIf cfg.enable {
- environment.etc."xonshrc".text = cfg.config;
+ environment.etc.xonshrc.text = cfg.config;
environment.systemPackages = [ cfg.package ];
diff --git a/nixos/modules/programs/xss-lock.nix b/nixos/modules/programs/xss-lock.nix
index 070463311db5..a7ad9b89db4d 100644
--- a/nixos/modules/programs/xss-lock.nix
+++ b/nixos/modules/programs/xss-lock.nix
@@ -12,7 +12,7 @@ in
lockerCommand = mkOption {
default = "${pkgs.i3lock}/bin/i3lock";
example = literalExample ''''${pkgs.i3lock-fancy}/bin/i3lock-fancy'';
- type = types.string;
+ type = types.separatedString " ";
description = "Locker to be used with xsslock";
};
diff --git a/nixos/modules/programs/yabar.nix b/nixos/modules/programs/yabar.nix
index db085211366e..5de9331ac520 100644
--- a/nixos/modules/programs/yabar.nix
+++ b/nixos/modules/programs/yabar.nix
@@ -76,7 +76,7 @@ in
font = mkOption {
default = "sans bold 9";
example = "Droid Sans, FontAwesome Bold 9";
- type = types.string;
+ type = types.str;
description = ''
The font that will be used to draw the status bar.
@@ -95,7 +95,7 @@ in
extra = mkOption {
default = {};
- type = types.attrsOf types.string;
+ type = types.attrsOf types.str;
description = ''
An attribute set which contains further attributes of a bar.
@@ -107,7 +107,7 @@ in
type = types.attrsOf(types.submodule {
options.exec = mkOption {
example = "YABAR_DATE";
- type = types.string;
+ type = types.str;
description = ''
The type of the indicator to be executed.
'';
@@ -125,7 +125,7 @@ in
options.extra = mkOption {
default = {};
- type = types.attrsOf (types.either types.string types.int);
+ type = types.attrsOf (types.either types.str types.int);
description = ''
An attribute set which contains further attributes of a indicator.
diff --git a/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix b/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix
index 89087a229eb7..7184e5d9b9a8 100644
--- a/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix
+++ b/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix
@@ -33,7 +33,7 @@ in
patterns = mkOption {
default = {};
- type = types.attrsOf types.string;
+ type = types.attrsOf types.str;
example = literalExample ''
{
@@ -50,7 +50,7 @@ in
};
styles = mkOption {
default = {};
- type = types.attrsOf types.string;
+ type = types.attrsOf types.str;
example = literalExample ''
{
diff --git a/nixos/modules/programs/zsh/zsh.nix b/nixos/modules/programs/zsh/zsh.nix
index bd1a77680663..c66c29ed45fb 100644
--- a/nixos/modules/programs/zsh/zsh.nix
+++ b/nixos/modules/programs/zsh/zsh.nix
@@ -69,9 +69,7 @@ in
promptInit = mkOption {
default = ''
- if [ "$TERM" != dumb ]; then
- autoload -U promptinit && promptinit && prompt walters
- fi
+ autoload -U promptinit && promptinit && prompt walters && setopt prompt_sp
'';
description = ''
Shell script code used to initialise the zsh prompt.
@@ -135,7 +133,7 @@ in
programs.zsh.shellAliases = mapAttrs (name: mkDefault) cfge.shellAliases;
- environment.etc."zshenv".text =
+ environment.etc.zshenv.text =
''
# /etc/zshenv: DO NOT EDIT -- this file has been generated automatically.
# This file is read for all shells.
@@ -159,7 +157,7 @@ in
fi
'';
- environment.etc."zprofile".text =
+ environment.etc.zprofile.text =
''
# /etc/zprofile: DO NOT EDIT -- this file has been generated automatically.
# This file is read for login shells.
@@ -178,7 +176,7 @@ in
fi
'';
- environment.etc."zshrc".text =
+ environment.etc.zshrc.text =
''
# /etc/zshrc: DO NOT EDIT -- this file has been generated automatically.
# This file is read for interactive shells.
@@ -213,13 +211,21 @@ in
${cfg.promptInit}
+ # Need to disable features to support TRAMP
+ if [ "$TERM" = dumb ]; then
+ unsetopt zle prompt_cr prompt_subst
+ unset RPS1 RPROMPT
+ PS1='$ '
+ PROMPT='$ '
+ fi
+
# Read system-wide modifications.
if test -f /etc/zshrc.local; then
. /etc/zshrc.local
fi
'';
- environment.etc."zinputrc".source = ./zinputrc;
+ environment.etc.zinputrc.source = ./zinputrc;
environment.systemPackages = [ pkgs.zsh ]
++ optional cfg.enableCompletion pkgs.nix-zsh-completions;
diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix
index 4ae642222740..df8ebe505846 100644
--- a/nixos/modules/rename.nix
+++ b/nixos/modules/rename.nix
@@ -34,6 +34,7 @@ with lib;
(mkRenamedOptionModule [ "services" "kubernetes" "etcd" "caFile" ] [ "services" "kubernetes" "apiserver" "etcd" "caFile" ])
(mkRemovedOptionModule [ "services" "kubernetes" "kubelet" "applyManifests" ] "")
(mkRemovedOptionModule [ "services" "kubernetes" "kubelet" "cadvisorPort" ] "")
+ (mkRemovedOptionModule [ "services" "kubernetes" "kubelet" "allowPrivileged" ] "")
(mkRenamedOptionModule [ "services" "kubernetes" "proxy" "address" ] ["services" "kubernetes" "proxy" "bindAddress"])
(mkRemovedOptionModule [ "services" "kubernetes" "verbose" ] "")
(mkRenamedOptionModule [ "services" "logstash" "address" ] [ "services" "logstash" "listenAddress" ])
@@ -51,6 +52,11 @@ with lib;
(mkRemovedOptionModule [ "services" "misc" "nzbget" "openFirewall" ] "The port used by nzbget is managed through the web interface so you should adjust your firewall rules accordingly.")
(mkRemovedOptionModule [ "services" "prometheus" "alertmanager" "user" ] "The alertmanager service is now using systemd's DynamicUser mechanism which obviates a user setting.")
(mkRemovedOptionModule [ "services" "prometheus" "alertmanager" "group" ] "The alertmanager service is now using systemd's DynamicUser mechanism which obviates a group setting.")
+ (mkRemovedOptionModule [ "services" "prometheus" "alertmanagerURL" ] ''
+ Due to incompatibility, the alertmanagerURL option has been removed,
+ please use 'services.prometheus2.alertmanagers' instead.
+ '')
+ (mkRenamedOptionModule [ "services" "prometheus2" ] [ "services" "prometheus" ])
(mkRenamedOptionModule [ "services" "tor" "relay" "portSpec" ] [ "services" "tor" "relay" "port" ])
(mkRenamedOptionModule [ "services" "vmwareGuest" ] [ "virtualisation" "vmware" "guest" ])
(mkRenamedOptionModule [ "jobs" ] [ "systemd" "services" ])
@@ -60,6 +66,8 @@ with lib;
(mkRenamedOptionModule [ "services" "clamav" "updater" "config" ] [ "services" "clamav" "updater" "extraConfig" ])
+ (mkRemovedOptionModule [ "services" "pykms" "verbose" ] "Use services.pykms.logLevel instead")
+
(mkRemovedOptionModule [ "security" "setuidOwners" ] "Use security.wrappers instead")
(mkRemovedOptionModule [ "security" "setuidPrograms" ] "Use security.wrappers instead")
@@ -68,8 +76,8 @@ with lib;
# PAM
(mkRenamedOptionModule [ "security" "pam" "enableU2F" ] [ "security" "pam" "u2f" "enable" ])
- (mkRemovedOptionModule [ "services" "rmilter" "bindInetSockets" ] "Use services.rmilter.bindSocket.* instead")
- (mkRemovedOptionModule [ "services" "rmilter" "bindUnixSockets" ] "Use services.rmilter.bindSocket.* instead")
+ # rmilter/rspamd
+ (mkRemovedOptionModule [ "services" "rmilter" ] "Use services.rspamd.* instead to set up milter service")
# Xsession script
(mkRenamedOptionModule [ "services" "xserver" "displayManager" "job" "logsXsession" ] [ "services" "xserver" "displayManager" "job" "logToFile" ])
@@ -174,6 +182,9 @@ with lib;
The starting time can be configured via services.postgresqlBackup.startAt.
'')
+ # phpfpm
+ (mkRemovedOptionModule [ "services" "phpfpm" "poolConfigs" ] "Use services.phpfpm.pools instead.")
+
# zabbixServer
(mkRenamedOptionModule [ "services" "zabbixServer" "dbServer" ] [ "services" "zabbixServer" "database" "host" ])
@@ -221,6 +232,7 @@ with lib;
(mkRemovedOptionModule [ "services" "mysql" "pidDir" ] "Don't wait for pidfiles, describe dependencies through systemd")
(mkRemovedOptionModule [ "services" "mysql" "rootPassword" ] "Use socket authentication or set the password outside of the nix store.")
(mkRemovedOptionModule [ "services" "zabbixServer" "dbPassword" ] "Use services.zabbixServer.database.passwordFile instead.")
+ (mkRemovedOptionModule [ "systemd" "generator-packages" ] "Use systemd.packages instead.")
# ZSH
(mkRenamedOptionModule [ "programs" "zsh" "enableSyntaxHighlighting" ] [ "programs" "zsh" "syntaxHighlighting" "enable" ])
@@ -248,6 +260,11 @@ with lib;
# binfmt
(mkRenamedOptionModule [ "boot" "binfmtMiscRegistrations" ] [ "boot" "binfmt" "registrations" ])
+ # ACME
+ (mkRemovedOptionModule [ "security" "acme" "directory"] "ACME Directory is now hardcoded to /var/lib/acme and its permisisons are managed by systemd. See https://github.com/NixOS/nixpkgs/issues/53852 for more info.")
+ (mkRemovedOptionModule [ "security" "acme" "preDelay"] "This option has been removed. If you want to make sure that something executes before certificates are provisioned, add a RequiredBy=acme-\${cert}.service to the service you want to execute before the cert renewal")
+ (mkRemovedOptionModule [ "security" "acme" "activationDelay"] "This option has been removed. If you want to make sure that something executes before certificates are provisioned, add a RequiredBy=acme-\${cert}.service to the service you want to execute before the cert renewal")
+
# KSM
(mkRenamedOptionModule [ "hardware" "enableKSM" ] [ "hardware" "ksm" "enable" ])
@@ -257,7 +274,17 @@ with lib;
(mkRenamedOptionModule [ "networking" "extraResolvconfConf" ] [ "networking" "resolvconf" "extraConfig" ])
(mkRenamedOptionModule [ "networking" "resolvconfOptions" ] [ "networking" "resolvconf" "extraOptions" ])
- ] ++ (flip map [ "blackboxExporter" "collectdExporter" "fritzboxExporter"
+ # BLCR
+ (mkRemovedOptionModule [ "environment.blcr.enable" ] "The BLCR module has been removed")
+
+ # Redis
+ (mkRemovedOptionModule [ "services" "redis" "user" ] "The redis module now is hardcoded to the redis user.")
+ (mkRemovedOptionModule [ "services" "redis" "dbpath" ] "The redis module now uses /var/lib/redis as data directory.")
+ (mkRemovedOptionModule [ "services" "redis" "dbFilename" ] "The redis module now uses /var/lib/redis/dump.rdb as database dump location.")
+ (mkRemovedOptionModule [ "services" "redis" "appendOnlyFilename" ] "This option was never used.")
+ (mkRemovedOptionModule [ "services" "redis" "pidFile" ] "This option was removed.")
+
+ ] ++ (forEach [ "blackboxExporter" "collectdExporter" "fritzboxExporter"
"jsonExporter" "minioExporter" "nginxExporter" "nodeExporter"
"snmpExporter" "unifiExporter" "varnishExporter" ]
(opt: mkRemovedOptionModule [ "services" "prometheus" "${opt}" ] ''
diff --git a/nixos/modules/security/acme.nix b/nixos/modules/security/acme.nix
index 092704c6fc3f..b321c04e574c 100644
--- a/nixos/modules/security/acme.nix
+++ b/nixos/modules/security/acme.nix
@@ -80,25 +80,11 @@ let
'';
};
- activationDelay = mkOption {
- type = types.nullOr types.str;
- default = null;
- description = ''
- Systemd time span expression to delay copying new certificates to main
- state directory. See systemd.time
- 7.
- '';
- };
-
- preDelay = mkOption {
- type = types.lines;
- default = "";
- description = ''
- Commands to run after certificates are re-issued but before they are
- activated. Typically the new certificate is published to DNS.
-
- Executed in the same directory with the new certificate.
- '';
+ directory = mkOption {
+ type = types.str;
+ readOnly = true;
+ default = "/var/lib/acme/${name}";
+ description = "Directory where certificate and other state is stored.";
};
extraDomains = mkOption {
@@ -126,13 +112,6 @@ in
options = {
security.acme = {
- directory = mkOption {
- default = "/var/lib/acme";
- type = types.str;
- description = ''
- Directory where certs and other state will be stored by default.
- '';
- };
validMin = mkOption {
type = types.int;
@@ -181,7 +160,11 @@ in
default = { };
type = with types; attrsOf (submodule certOpts);
description = ''
- Attribute set of certificates to get signed and renewed.
+ Attribute set of certificates to get signed and renewed. Creates
+ acme-''${cert}.{service,timer} systemd units for
+ each certificate defined here. Other services can add dependencies
+ to those units if they rely on the certificates being present,
+ or trigger restarts of the service if certificates get renewed.
'';
example = literalExample ''
{
@@ -209,8 +192,7 @@ in
servicesLists = mapAttrsToList certToServices cfg.certs;
certToServices = cert: data:
let
- cpath = lpath + optionalString (data.activationDelay != null) ".staging";
- lpath = "${cfg.directory}/${cert}";
+ lpath = "acme/${cert}";
rights = if data.allowKeysForGroup then "750" else "700";
cmdline = [ "-v" "-d" data.domain "--default_root" data.webroot "--valid_min" cfg.validMin ]
++ optionals (data.email != null) [ "--email" data.email ]
@@ -224,79 +206,27 @@ in
serviceConfig = {
Type = "oneshot";
SuccessExitStatus = [ "0" "1" ];
- PermissionsStartOnly = true;
User = data.user;
Group = data.group;
PrivateTmp = true;
+ StateDirectory = lpath;
+ StateDirectoryMode = rights;
+ WorkingDirectory = "/var/lib/${lpath}";
+ ExecStart = "${pkgs.simp_le}/bin/simp_le ${escapeShellArgs cmdline}";
+ ExecStopPost =
+ let
+ script = pkgs.writeScript "acme-post-stop" ''
+ #!${pkgs.runtimeShell} -e
+ ${data.postRun}
+ '';
+ in
+ "+${script}";
};
- path = with pkgs; [ simp_le systemd ];
- preStart = ''
- mkdir -p '${cfg.directory}'
- chown 'root:root' '${cfg.directory}'
- chmod 755 '${cfg.directory}'
- if [ ! -d '${cpath}' ]; then
- mkdir '${cpath}'
- fi
- chmod ${rights} '${cpath}'
- chown -R '${data.user}:${data.group}' '${cpath}'
- mkdir -p '${data.webroot}/.well-known/acme-challenge'
- chown -R '${data.user}:${data.group}' '${data.webroot}/.well-known/acme-challenge'
- '';
- script = ''
- cd '${cpath}'
- set +e
- simp_le ${escapeShellArgs cmdline}
- EXITCODE=$?
- set -e
- echo "$EXITCODE" > /tmp/lastExitCode
- exit "$EXITCODE"
- '';
- postStop = ''
- cd '${cpath}'
- if [ -e /tmp/lastExitCode ] && [ "$(cat /tmp/lastExitCode)" = "0" ]; then
- ${if data.activationDelay != null then ''
-
- ${data.preDelay}
-
- if [ -d '${lpath}' ]; then
- systemd-run --no-block --on-active='${data.activationDelay}' --unit acme-setlive-${cert}.service
- else
- systemctl --wait start acme-setlive-${cert}.service
- fi
- '' else data.postRun}
-
- # noop ensuring that the "if" block is non-empty even if
- # activationDelay == null and postRun == ""
- true
- fi
- '';
-
- before = [ "acme-certificates.target" ];
- wantedBy = [ "acme-certificates.target" ];
- };
- delayService = {
- description = "Set certificate for ${cert} live";
- path = with pkgs; [ rsync ];
- serviceConfig = {
- Type = "oneshot";
- };
- script = ''
- rsync -a --delete-after '${cpath}/' '${lpath}'
- '';
- postStop = data.postRun;
};
selfsignedService = {
description = "Create preliminary self-signed certificate for ${cert}";
path = [ pkgs.openssl ];
- preStart = ''
- if [ ! -d '${cpath}' ]
- then
- mkdir -p '${cpath}'
- chmod ${rights} '${cpath}'
- chown '${data.user}:${data.group}' '${cpath}'
- fi
- '';
script =
''
workdir="$(mktemp -d)"
@@ -318,50 +248,41 @@ in
-out $workdir/server.crt
# Copy key to destination
- cp $workdir/server.key ${cpath}/key.pem
+ cp $workdir/server.key /var/lib/${lpath}/key.pem
# Create fullchain.pem (same format as "simp_le ... -f fullchain.pem" creates)
- cat $workdir/{server.crt,ca.crt} > "${cpath}/fullchain.pem"
+ cat $workdir/{server.crt,ca.crt} > "/var/lib/${lpath}/fullchain.pem"
# Create full.pem for e.g. lighttpd
- cat $workdir/{server.key,server.crt,ca.crt} > "${cpath}/full.pem"
+ cat $workdir/{server.key,server.crt,ca.crt} > "/var/lib/${lpath}/full.pem"
# Give key acme permissions
- chown '${data.user}:${data.group}' "${cpath}/"{key,fullchain,full}.pem
- chmod ${rights} "${cpath}/"{key,fullchain,full}.pem
+ chown '${data.user}:${data.group}' "/var/lib/${lpath}/"{key,fullchain,full}.pem
+ chmod ${rights} "/var/lib/${lpath}/"{key,fullchain,full}.pem
'';
serviceConfig = {
Type = "oneshot";
- PermissionsStartOnly = true;
PrivateTmp = true;
+ StateDirectory = lpath;
User = data.user;
Group = data.group;
};
unitConfig = {
# Do not create self-signed key when key already exists
- ConditionPathExists = "!${cpath}/key.pem";
+ ConditionPathExists = "!/var/lib/${lpath}/key.pem";
};
- before = [
- "acme-selfsigned-certificates.target"
- ];
- wantedBy = [
- "acme-selfsigned-certificates.target"
- ];
};
in (
[ { name = "acme-${cert}"; value = acmeService; } ]
++ optional cfg.preliminarySelfsigned { name = "acme-selfsigned-${cert}"; value = selfsignedService; }
- ++ optional (data.activationDelay != null) { name = "acme-setlive-${cert}"; value = delayService; }
);
servicesAttr = listToAttrs services;
- injectServiceDep = {
- after = [ "acme-selfsigned-certificates.target" ];
- wants = [ "acme-selfsigned-certificates.target" "acme-certificates.target" ];
- };
in
- servicesAttr //
- (if config.services.nginx.enable then { nginx = injectServiceDep; } else {}) //
- (if config.services.lighttpd.enable then { lighttpd = injectServiceDep; } else {});
+ servicesAttr;
+
+ systemd.tmpfiles.rules =
+ flip mapAttrsToList cfg.certs
+ (cert: data: "d ${data.webroot}/.well-known/acme-challenge - ${data.user} ${data.group}");
systemd.timers = flip mapAttrs' cfg.certs (cert: data: nameValuePair
("acme-${cert}")
@@ -378,8 +299,8 @@ in
})
);
- systemd.targets."acme-selfsigned-certificates" = mkIf cfg.preliminarySelfsigned {};
- systemd.targets."acme-certificates" = {};
+ systemd.targets.acme-selfsigned-certificates = mkIf cfg.preliminarySelfsigned {};
+ systemd.targets.acme-certificates = {};
})
];
diff --git a/nixos/modules/security/acme.xml b/nixos/modules/security/acme.xml
index ef71fe53d0c7..9d0a1995e0ff 100644
--- a/nixos/modules/security/acme.xml
+++ b/nixos/modules/security/acme.xml
@@ -59,10 +59,8 @@ http {
The private key key.pem and certificate
fullchain.pem will be put into
- /var/lib/acme/foo.example.com. The target directory can
- be configured with the option .
+ /var/lib/acme/foo.example.com.
-
Refer to for all available configuration
options for the security.acme
diff --git a/nixos/modules/security/auditd.nix b/nixos/modules/security/auditd.nix
index 6abac244dac2..9d26cfbcfb10 100644
--- a/nixos/modules/security/auditd.nix
+++ b/nixos/modules/security/auditd.nix
@@ -6,6 +6,10 @@ with lib;
options.security.auditd.enable = mkEnableOption "the Linux Audit daemon";
config = mkIf config.security.auditd.enable {
+ boot.kernelParams = [ "audit=1" ];
+
+ environment.systemPackages = [ pkgs.audit ];
+
systemd.services.auditd = {
description = "Linux Audit daemon";
wantedBy = [ "basic.target" ];
diff --git a/nixos/modules/security/chromium-suid-sandbox.nix b/nixos/modules/security/chromium-suid-sandbox.nix
index be6acb3f1f53..2255477f26e4 100644
--- a/nixos/modules/security/chromium-suid-sandbox.nix
+++ b/nixos/modules/security/chromium-suid-sandbox.nix
@@ -24,6 +24,6 @@ in
config = mkIf cfg.enable {
environment.systemPackages = [ sandbox ];
- security.wrappers."${sandbox.passthru.sandboxExecutableName}".source = "${sandbox}/bin/${sandbox.passthru.sandboxExecutableName}";
+ security.wrappers.${sandbox.passthru.sandboxExecutableName}.source = "${sandbox}/bin/${sandbox.passthru.sandboxExecutableName}";
};
}
diff --git a/nixos/modules/security/pam.nix b/nixos/modules/security/pam.nix
index 89e71c5136e4..11227354ad3b 100644
--- a/nixos/modules/security/pam.nix
+++ b/nixos/modules/security/pam.nix
@@ -351,7 +351,7 @@ let
${let oath = config.security.pam.oath; in optionalString cfg.oathAuth
"auth requisite ${pkgs.oathToolkit}/lib/security/pam_oath.so window=${toString oath.window} usersfile=${toString oath.usersFile} digits=${toString oath.digits}"}
${let yubi = config.security.pam.yubico; in optionalString cfg.yubicoAuth
- "auth ${yubi.control} ${pkgs.yubico-pam}/lib/security/pam_yubico.so id=${toString yubi.id} ${optionalString yubi.debug "debug"}"}
+ "auth ${yubi.control} ${pkgs.yubico-pam}/lib/security/pam_yubico.so mode=${toString yubi.mode} ${optionalString (yubi.mode == "client") "id=${toString yubi.id}"} ${optionalString yubi.debug "debug"}"}
'' +
# Modules in this block require having the password set in PAM_AUTHTOK.
# pam_unix is marked as 'sufficient' on NixOS which means nothing will run
@@ -415,7 +415,7 @@ let
# Session management.
${optionalString cfg.setEnvironment ''
- session required pam_env.so envfile=${config.system.build.pamEnvironment}
+ session required pam_env.so conffile=${config.system.build.pamEnvironment} readenv=0
''}
session required pam_unix.so
${optionalString cfg.setLoginUid
@@ -685,7 +685,7 @@ in
};
id = mkOption {
example = "42";
- type = types.string;
+ type = types.str;
description = "client id";
};
@@ -696,6 +696,23 @@ in
Debug output to stderr.
'';
};
+ mode = mkOption {
+ default = "client";
+ type = types.enum [ "client" "challenge-response" ];
+ description = ''
+ Mode of operation.
+
+ Use "client" for online validation with a YubiKey validation service such as
+ the YubiCloud.
+
+ Use "challenge-response" for offline validation using YubiKeys with HMAC-SHA-1
+ Challenge-Response configurations. See the man-page ykpamcfg(1) for further
+ details on how to configure offline Challenge-Response validation.
+
+ More information can be found here.
+ '';
+ };
};
security.pam.enableEcryptfs = mkOption {
@@ -742,13 +759,6 @@ in
environment.etc =
mapAttrsToList (n: v: makePAMService v) config.security.pam.services;
- systemd.tmpfiles.rules = optionals
- (any (s: s.updateWtmp) (attrValues config.security.pam.services))
- [
- "f /var/log/wtmp"
- "f /var/log/lastlog"
- ];
-
security.pam.services =
{ other.text =
''
diff --git a/nixos/modules/security/polkit.nix b/nixos/modules/security/polkit.nix
index 7f1de81d5b70..f2b2df4004cb 100644
--- a/nixos/modules/security/polkit.nix
+++ b/nixos/modules/security/polkit.nix
@@ -85,7 +85,7 @@ in
security.wrappers = {
pkexec.source = "${pkgs.polkit.bin}/bin/pkexec";
- "polkit-agent-helper-1".source = "${pkgs.polkit.out}/lib/polkit-1/polkit-agent-helper-1";
+ polkit-agent-helper-1.source = "${pkgs.polkit.out}/lib/polkit-1/polkit-agent-helper-1";
};
systemd.tmpfiles.rules = [
diff --git a/nixos/modules/security/prey.nix b/nixos/modules/security/prey.nix
index 1c643f2e1a57..b899ccb6c3e2 100644
--- a/nixos/modules/security/prey.nix
+++ b/nixos/modules/security/prey.nix
@@ -4,7 +4,7 @@ with lib;
let
cfg = config.services.prey;
- myPrey = pkgs."prey-bash-client".override {
+ myPrey = pkgs.prey-bash-client.override {
apiKey = cfg.apiKey;
deviceKey = cfg.deviceKey;
};
diff --git a/nixos/modules/security/sudo.nix b/nixos/modules/security/sudo.nix
index 573588aaeecc..10ee036be84e 100644
--- a/nixos/modules/security/sudo.nix
+++ b/nixos/modules/security/sudo.nix
@@ -91,7 +91,7 @@ in
type = with types; listOf (submodule {
options = {
users = mkOption {
- type = with types; listOf (either string int);
+ type = with types; listOf (either str int);
description = ''
The usernames / UIDs this rule should apply for.
'';
@@ -99,7 +99,7 @@ in
};
groups = mkOption {
- type = with types; listOf (either string int);
+ type = with types; listOf (either str int);
description = ''
The groups / GIDs this rule should apply for.
'';
@@ -107,7 +107,7 @@ in
};
host = mkOption {
- type = types.string;
+ type = types.str;
default = "ALL";
description = ''
For what host this rule should apply.
@@ -115,7 +115,7 @@ in
};
runAs = mkOption {
- type = with types; string;
+ type = with types; str;
default = "ALL:ALL";
description = ''
Under which user/group the specified command is allowed to run.
@@ -130,11 +130,11 @@ in
description = ''
The commands for which the rule should apply.
'';
- type = with types; listOf (either string (submodule {
+ type = with types; listOf (either str (submodule {
options = {
command = mkOption {
- type = with types; string;
+ type = with types; str;
description = ''
A command being either just a path to a binary to allow any arguments,
the full command with arguments pre-set or with "" used as the argument,
diff --git a/nixos/modules/security/wrappers/default.nix b/nixos/modules/security/wrappers/default.nix
index dcb9c8d4ed5f..47738e7962ea 100644
--- a/nixos/modules/security/wrappers/default.nix
+++ b/nixos/modules/security/wrappers/default.nix
@@ -7,7 +7,7 @@ let
programs =
(lib.mapAttrsToList
- (n: v: (if v ? "program" then v else v // {program=n;}))
+ (n: v: (if v ? program then v else v // {program=n;}))
wrappers);
securityWrapper = pkgs.stdenv.mkDerivation {
@@ -74,15 +74,15 @@ let
mkWrappedPrograms =
builtins.map
- (s: if (s ? "capabilities")
+ (s: if (s ? capabilities)
then mkSetcapProgram
({ owner = "root";
group = "root";
} // s)
else if
- (s ? "setuid" && s.setuid) ||
- (s ? "setgid" && s.setgid) ||
- (s ? "permissions")
+ (s ? setuid && s.setuid) ||
+ (s ? setgid && s.setgid) ||
+ (s ? permissions)
then mkSetuidProgram s
else mkSetuidProgram
({ owner = "root";
diff --git a/nixos/modules/services/admin/oxidized.nix b/nixos/modules/services/admin/oxidized.nix
index 687cdfb5ba57..39112c3970d5 100644
--- a/nixos/modules/services/admin/oxidized.nix
+++ b/nixos/modules/services/admin/oxidized.nix
@@ -97,8 +97,8 @@ in
preStart = ''
mkdir -p ${cfg.dataDir}/.config/oxidized
- cp -v ${cfg.routerDB} ${cfg.dataDir}/.config/oxidized/router.db
- cp -v ${cfg.configFile} ${cfg.dataDir}/.config/oxidized/config
+ ln -f -s ${cfg.routerDB} ${cfg.dataDir}/.config/oxidized/router.db
+ ln -f -s ${cfg.configFile} ${cfg.dataDir}/.config/oxidized/config
'';
serviceConfig = {
diff --git a/nixos/modules/services/amqp/activemq/default.nix b/nixos/modules/services/amqp/activemq/default.nix
index 27bfd91cd2d5..7729da27304b 100644
--- a/nixos/modules/services/amqp/activemq/default.nix
+++ b/nixos/modules/services/amqp/activemq/default.nix
@@ -40,7 +40,7 @@ in {
'';
};
configurationURI = mkOption {
- type = types.string;
+ type = types.str;
default = "xbean:activemq.xml";
description = ''
The URI that is passed along to the BrokerFactory to
@@ -51,7 +51,7 @@ in {
'';
};
baseDir = mkOption {
- type = types.string;
+ type = types.str;
default = "/var/activemq";
description = ''
The base directory where ActiveMQ stores its persistent data and logs.
@@ -81,7 +81,7 @@ in {
'';
};
extraJavaOptions = mkOption {
- type = types.string;
+ type = types.separatedString " ";
default = "";
example = "-Xmx2G -Xms2G -XX:MaxPermSize=512M";
description = ''
diff --git a/nixos/modules/services/amqp/rabbitmq.nix b/nixos/modules/services/amqp/rabbitmq.nix
index 302b94de1965..697732426ccf 100644
--- a/nixos/modules/services/amqp/rabbitmq.nix
+++ b/nixos/modules/services/amqp/rabbitmq.nix
@@ -80,7 +80,7 @@ in {
configItems = mkOption {
default = {};
type = types.attrsOf types.str;
- example = ''
+ example = literalExample ''
{
"auth_backends.1.authn" = "rabbit_auth_backend_ldap";
"auth_backends.1.authz" = "rabbit_auth_backend_internal";
diff --git a/nixos/modules/services/audio/alsa.nix b/nixos/modules/services/audio/alsa.nix
index 376aad66e236..f632644af09e 100644
--- a/nixos/modules/services/audio/alsa.nix
+++ b/nixos/modules/services/audio/alsa.nix
@@ -64,7 +64,7 @@ in
};
volumeStep = mkOption {
- type = types.string;
+ type = types.str;
default = "1";
example = "1%";
description = ''
@@ -99,7 +99,7 @@ in
boot.kernelModules = optional config.sound.enableOSSEmulation "snd_pcm_oss";
- systemd.services."alsa-store" =
+ systemd.services.alsa-store =
{ description = "Store Sound Card State";
wantedBy = [ "multi-user.target" ];
unitConfig.RequiresMountsFor = "/var/lib/alsa";
diff --git a/nixos/modules/services/audio/roon-server.nix b/nixos/modules/services/audio/roon-server.nix
index 9562ad1b164e..4eda3c5708da 100644
--- a/nixos/modules/services/audio/roon-server.nix
+++ b/nixos/modules/services/audio/roon-server.nix
@@ -19,6 +19,20 @@ in {
TCP: 9100 - 9200
'';
};
+ user = mkOption {
+ type = types.str;
+ default = "roon-server";
+ description = ''
+ User to run the Roon Server as.
+ '';
+ };
+ group = mkOption {
+ type = types.str;
+ default = "roon-server";
+ description = ''
+ Group to run the Roon Server as.
+ '';
+ };
};
};
@@ -33,8 +47,8 @@ in {
serviceConfig = {
ExecStart = "${pkgs.roon-server}/opt/start.sh";
LimitNOFILE = 8192;
- DynamicUser = true;
- SupplementaryGroups = "audio";
+ User = cfg.user;
+ Group = cfg.group;
StateDirectory = name;
};
};
@@ -45,5 +59,15 @@ in {
];
allowedUDPPorts = [ 9003 ];
};
+
+
+ users.groups.${cfg.group} = {};
+ users.users.${cfg.user} =
+ if cfg.user == "roon-server" then {
+ isSystemUser = true;
+ description = "Roon Server user";
+ groups = [ cfg.group "audio" ];
+ }
+ else {};
};
}
diff --git a/nixos/modules/services/audio/spotifyd.nix b/nixos/modules/services/audio/spotifyd.nix
index e3556b2559c2..4b74e7532795 100644
--- a/nixos/modules/services/audio/spotifyd.nix
+++ b/nixos/modules/services/audio/spotifyd.nix
@@ -28,7 +28,7 @@ in
after = [ "network-online.target" "sound.target" ];
description = "spotifyd, a Spotify playing daemon";
serviceConfig = {
- ExecStart = "${pkgs.spotifyd}/bin/spotifyd --no-daemon --cache_path /var/cache/spotifyd --config ${spotifydConf}";
+ ExecStart = "${pkgs.spotifyd}/bin/spotifyd --no-daemon --cache-path /var/cache/spotifyd --config-path ${spotifydConf}";
Restart = "always";
RestartSec = 12;
DynamicUser = true;
diff --git a/nixos/modules/services/audio/ympd.nix b/nixos/modules/services/audio/ympd.nix
index 919b76622510..551bd941fe68 100644
--- a/nixos/modules/services/audio/ympd.nix
+++ b/nixos/modules/services/audio/ympd.nix
@@ -23,7 +23,7 @@ in {
mpd = {
host = mkOption {
- type = types.string;
+ type = types.str;
default = "localhost";
description = "The host where MPD is listening.";
example = "localhost";
diff --git a/nixos/modules/services/backup/automysqlbackup.nix b/nixos/modules/services/backup/automysqlbackup.nix
index b845f370fb70..1884f3536a97 100644
--- a/nixos/modules/services/backup/automysqlbackup.nix
+++ b/nixos/modules/services/backup/automysqlbackup.nix
@@ -41,7 +41,7 @@ in
};
config = mkOption {
- type = with types; attrsOf (either (either str (either int bool)) (listOf str));
+ type = with types; attrsOf (oneOf [ str int bool (listOf str) ]);
default = {};
description = ''
automysqlbackup configuration. Refer to
diff --git a/nixos/modules/services/backup/borgbackup.nix b/nixos/modules/services/backup/borgbackup.nix
index 2ad116a7872a..10d42325a6b1 100644
--- a/nixos/modules/services/backup/borgbackup.nix
+++ b/nixos/modules/services/backup/borgbackup.nix
@@ -8,7 +8,7 @@ let
builtins.substring 0 1 x == "/" # absolute path
|| builtins.substring 0 1 x == "." # relative path
|| builtins.match "[.*:.*]" == null; # not machine:path
-
+
mkExcludeFile = cfg:
# Write each exclude pattern to a new line
pkgs.writeText "excludefile" (concatStringsSep "\n" cfg.exclude);
@@ -104,12 +104,12 @@ let
install = "install -o ${cfg.user} -g ${cfg.group}";
in
nameValuePair "borgbackup-job-${name}" (stringAfter [ "users" ] (''
- # Eensure that the home directory already exists
+ # Ensure that the home directory already exists
# We can't assert createHome == true because that's not the case for root
- cd "${config.users.users.${cfg.user}.home}"
+ cd "${config.users.users.${cfg.user}.home}"
${install} -d .config/borg
${install} -d .cache/borg
- '' + optionalString (isLocalPath cfg.repo) ''
+ '' + optionalString (isLocalPath cfg.repo && !cfg.removableDevice) ''
${install} -d ${escapeShellArg cfg.repo}
''));
@@ -163,6 +163,13 @@ let
+ " without at least one public key";
};
+ mkRemovableDeviceAssertions = name: cfg: {
+ assertion = !(isLocalPath cfg.repo) -> !cfg.removableDevice;
+ message = ''
+ borgbackup.repos.${name}: repo isn't a local path, thus it can't be a removable device!
+ '';
+ };
+
in {
meta.maintainers = with maintainers; [ dotlambda ];
@@ -202,6 +209,12 @@ in {
example = "user@machine:/path/to/repo";
};
+ removableDevice = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Whether the repo (which must be local) is a removable device.";
+ };
+
archiveBaseName = mkOption {
type = types.strMatching "[^/{}]+";
default = "${globalConfig.networking.hostName}-${name}";
@@ -511,7 +524,6 @@ in {
type = types.attrsOf (types.submodule (
{ ... }: {
options = {
-
path = mkOption {
type = types.path;
description = ''
@@ -598,7 +610,8 @@ in {
(with config.services.borgbackup; {
assertions =
mapAttrsToList mkPassAssertion jobs
- ++ mapAttrsToList mkKeysAssertion repos;
+ ++ mapAttrsToList mkKeysAssertion repos
+ ++ mapAttrsToList mkRemovableDeviceAssertions jobs;
system.activationScripts = mapAttrs' mkActivationScript jobs;
diff --git a/nixos/modules/services/backup/crashplan-small-business.nix b/nixos/modules/services/backup/crashplan-small-business.nix
deleted file mode 100644
index 790dafefe66f..000000000000
--- a/nixos/modules/services/backup/crashplan-small-business.nix
+++ /dev/null
@@ -1,73 +0,0 @@
-{ config, pkgs, lib, ... }:
-
-let
- cfg = config.services.crashplansb;
- crashplansb = pkgs.crashplansb.override { maxRam = cfg.maxRam; };
-in
-
-with lib;
-
-{
- options = {
- services.crashplansb = {
- enable = mkOption {
- default = false;
- type = types.bool;
- description = ''
- Starts crashplan for small business background service.
- '';
- };
- maxRam = mkOption {
- default = "1024m";
- example = "2G";
- type = types.str;
- description = ''
- Maximum amount of ram that the crashplan engine should use.
- '';
- };
- openPorts = mkOption {
- description = "Open ports in the firewall for crashplan.";
- default = true;
- type = types.bool;
- };
- ports = mkOption {
- # https://support.code42.com/Administrator/6/Planning_and_installing/TCP_and_UDP_ports_used_by_the_Code42_platform
- # used ports can also be checked in the desktop app console using the command connection.info
- description = "which ports to open.";
- default = [ 4242 4243 4244 4247 ];
- type = types.listOf types.int;
- };
- };
- };
-
- config = mkIf cfg.enable {
- environment.systemPackages = [ crashplansb ];
- networking.firewall.allowedTCPPorts = mkIf cfg.openPorts cfg.ports;
-
- systemd.services.crashplansb = {
- description = "CrashPlan Backup Engine";
-
- wantedBy = [ "multi-user.target" ];
- after = [ "network.target" "local-fs.target" ];
-
- preStart = ''
- install -d -m 755 ${crashplansb.vardir}
- install -d -m 700 ${crashplansb.vardir}/conf
- install -d -m 700 ${crashplansb.manifestdir}
- install -d -m 700 ${crashplansb.vardir}/cache
- install -d -m 700 ${crashplansb.vardir}/backupArchives
- install -d -m 777 ${crashplansb.vardir}/log
- cp -avn ${crashplansb}/conf.template/* ${crashplansb.vardir}/conf
- '';
-
- serviceConfig = {
- Type = "forking";
- EnvironmentFile = "${crashplansb}/bin/run.conf";
- ExecStart = "${crashplansb}/bin/CrashPlanEngine start";
- ExecStop = "${crashplansb}/bin/CrashPlanEngine stop";
- PIDFile = "${crashplansb.vardir}/CrashPlanEngine.pid";
- WorkingDirectory = crashplansb;
- };
- };
- };
-}
diff --git a/nixos/modules/services/backup/crashplan.nix b/nixos/modules/services/backup/crashplan.nix
deleted file mode 100644
index c540cc6e2aee..000000000000
--- a/nixos/modules/services/backup/crashplan.nix
+++ /dev/null
@@ -1,67 +0,0 @@
-{ config, pkgs, lib, ... }:
-
-let
- cfg = config.services.crashplan;
- crashplan = pkgs.crashplan;
-in
-
-with lib;
-
-{
- options = {
- services.crashplan = {
- enable = mkOption {
- default = false;
- type = types.bool;
- description = ''
- Starts crashplan background service.
- '';
- };
- };
- };
-
- config = mkIf cfg.enable {
- environment.systemPackages = [ crashplan ];
-
- systemd.services.crashplan = {
- description = "CrashPlan Backup Engine";
-
- wantedBy = [ "multi-user.target" ];
- after = [ "network.target" "local-fs.target" ];
-
- preStart = ''
- ensureDir() {
- dir=$1
- mode=$2
-
- if ! test -e $dir; then
- ${pkgs.coreutils}/bin/mkdir -m $mode -p $dir
- elif [ "$(${pkgs.coreutils}/bin/stat -c %a $dir)" != "$mode" ]; then
- ${pkgs.coreutils}/bin/chmod $mode $dir
- fi
- }
-
- ensureDir ${crashplan.vardir} 755
- ensureDir ${crashplan.vardir}/conf 700
- ensureDir ${crashplan.manifestdir} 700
- ensureDir ${crashplan.vardir}/cache 700
- ensureDir ${crashplan.vardir}/backupArchives 700
- ensureDir ${crashplan.vardir}/log 777
- cp -avn ${crashplan}/conf.template/* ${crashplan.vardir}/conf
- for x in app.asar bin install.vars lang lib libc42archive64.so libc52archive.so libjniwrap64.so libjniwrap.so libjtux64.so libjtux.so libleveldb64.so libleveldb.so libmd564.so libmd5.so share skin upgrade; do
- rm -f ${crashplan.vardir}/$x;
- ln -sf ${crashplan}/$x ${crashplan.vardir}/$x;
- done
- '';
-
- serviceConfig = {
- Type = "forking";
- EnvironmentFile = "${crashplan}/bin/run.conf";
- ExecStart = "${crashplan}/bin/CrashPlanEngine start";
- ExecStop = "${crashplan}/bin/CrashPlanEngine stop";
- PIDFile = "${crashplan.vardir}/CrashPlanEngine.pid";
- WorkingDirectory = crashplan;
- };
- };
- };
-}
diff --git a/nixos/modules/services/backup/mysql-backup.nix b/nixos/modules/services/backup/mysql-backup.nix
index ba6e154f6b3d..dbd5605143f6 100644
--- a/nixos/modules/services/backup/mysql-backup.nix
+++ b/nixos/modules/services/backup/mysql-backup.nix
@@ -103,7 +103,7 @@ in
}];
systemd = {
- timers."mysql-backup" = {
+ timers.mysql-backup = {
description = "Mysql backup timer";
wantedBy = [ "timers.target" ];
timerConfig = {
@@ -112,7 +112,7 @@ in
Unit = "mysql-backup.service";
};
};
- services."mysql-backup" = {
+ services.mysql-backup = {
description = "Mysql backup service";
enable = true;
serviceConfig = {
diff --git a/nixos/modules/services/backup/postgresql-backup.nix b/nixos/modules/services/backup/postgresql-backup.nix
index 17b410a97f3e..13a36ae32ac0 100644
--- a/nixos/modules/services/backup/postgresql-backup.nix
+++ b/nixos/modules/services/backup/postgresql-backup.nix
@@ -81,7 +81,7 @@ in {
};
pgdumpOptions = mkOption {
- type = types.string;
+ type = types.separatedString " ";
default = "-Cbo";
description = ''
Command line options for pg_dump. This options is not used
diff --git a/nixos/modules/services/backup/postgresql-wal-receiver.nix b/nixos/modules/services/backup/postgresql-wal-receiver.nix
new file mode 100644
index 000000000000..3d9869d53431
--- /dev/null
+++ b/nixos/modules/services/backup/postgresql-wal-receiver.nix
@@ -0,0 +1,204 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+ receiverSubmodule = {
+ options = {
+ postgresqlPackage = mkOption {
+ type = types.package;
+ example = literalExample "pkgs.postgresql_11";
+ description = ''
+ PostgreSQL package to use.
+ '';
+ };
+
+ directory = mkOption {
+ type = types.path;
+ example = literalExample "/mnt/pg_wal/main/";
+ description = ''
+ Directory to write the output to.
+ '';
+ };
+
+ statusInterval = mkOption {
+ type = types.int;
+ default = 10;
+ description = ''
+ Specifies the number of seconds between status packets sent back to the server.
+ This allows for easier monitoring of the progress from server.
+ A value of zero disables the periodic status updates completely,
+ although an update will still be sent when requested by the server, to avoid timeout disconnect.
+ '';
+ };
+
+ slot = mkOption {
+ type = types.str;
+ default = "";
+ example = "some_slot_name";
+ description = ''
+ Require pg_receivewal to use an existing replication slot (see
+ Section 26.2.6 of the PostgreSQL manual).
+ When this option is used, pg_receivewal will report a flush position to the server,
+ indicating when each segment has been synchronized to disk so that the server can remove that segment if it is not otherwise needed.
+
+ When the replication client of pg_receivewal is configured on the server as a synchronous standby,
+ then using a replication slot will report the flush position to the server, but only when a WAL file is closed.
+ Therefore, that configuration will cause transactions on the primary to wait for a long time and effectively not work satisfactorily.
+ The option must be specified in addition to make this work correctly.
+ '';
+ };
+
+ synchronous = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Flush the WAL data to disk immediately after it has been received.
+ Also send a status packet back to the server immediately after flushing, regardless of .
+
+ This option should be specified if the replication client of pg_receivewal is configured on the server as a synchronous standby,
+ to ensure that timely feedback is sent to the server.
+ '';
+ };
+
+ compress = mkOption {
+ type = types.ints.between 0 9;
+ default = 0;
+ description = ''
+ Enables gzip compression of write-ahead logs, and specifies the compression level
+ (0 through 9, 0 being no compression and 9 being best compression).
+ The suffix .gz will automatically be added to all filenames.
+
+ This option requires PostgreSQL >= 10.
+ '';
+ };
+
+ connection = mkOption {
+ type = types.str;
+ example = "postgresql://user@somehost";
+ description = ''
+ Specifies parameters used to connect to the server, as a connection string.
+ See Section 34.1.1 of the PostgreSQL manual for more information.
+
+ Because pg_receivewal doesn't connect to any particular database in the cluster,
+ database name in the connection string will be ignored.
+ '';
+ };
+
+ extraArgs = mkOption {
+ type = with types; listOf str;
+ default = [ ];
+ example = literalExample ''
+ [
+ "--no-sync"
+ ]
+ '';
+ description = ''
+ A list of extra arguments to pass to the pg_receivewal command.
+ '';
+ };
+
+ environment = mkOption {
+ type = with types; attrsOf str;
+ default = { };
+ example = literalExample ''
+ {
+ PGPASSFILE = "/private/passfile";
+ PGSSLMODE = "require";
+ }
+ '';
+ description = ''
+ Environment variables passed to the service.
+ Usable parameters are listed in Section 34.14 of the PostgreSQL manual.
+ '';
+ };
+ };
+ };
+
+in {
+ options = {
+ services.postgresqlWalReceiver = {
+ receivers = mkOption {
+ type = with types; attrsOf (submodule receiverSubmodule);
+ default = { };
+ example = literalExample ''
+ {
+ main = {
+ postgresqlPackage = pkgs.postgresql_11;
+ directory = /mnt/pg_wal/main/;
+ slot = "main_wal_receiver";
+ connection = "postgresql://user@somehost";
+ };
+ }
+ '';
+ description = ''
+ PostgreSQL WAL receivers.
+ Stream write-ahead logs from a PostgreSQL server using pg_receivewal (formerly pg_receivexlog).
+ See the man page for more information.
+ '';
+ };
+ };
+ };
+
+ config = let
+ receivers = config.services.postgresqlWalReceiver.receivers;
+ in mkIf (receivers != { }) {
+ users = {
+ users.postgres = {
+ uid = config.ids.uids.postgres;
+ group = "postgres";
+ description = "PostgreSQL server user";
+ };
+
+ groups.postgres = {
+ gid = config.ids.gids.postgres;
+ };
+ };
+
+ assertions = concatLists (attrsets.mapAttrsToList (name: config: [
+ {
+ assertion = config.compress > 0 -> versionAtLeast config.postgresqlPackage.version "10";
+ message = "Invalid configuration for WAL receiver \"${name}\": compress requires PostgreSQL version >= 10.";
+ }
+ ]) receivers);
+
+ systemd.tmpfiles.rules = mapAttrsToList (name: config: ''
+ d ${escapeShellArg config.directory} 0750 postgres postgres - -
+ '') receivers;
+
+ systemd.services = with attrsets; mapAttrs' (name: config: nameValuePair "postgresql-wal-receiver-${name}" {
+ description = "PostgreSQL WAL receiver (${name})";
+ wantedBy = [ "multi-user.target" ];
+ startLimitIntervalSec = 0; # retry forever, useful in case of network disruption
+
+ serviceConfig = {
+ User = "postgres";
+ Group = "postgres";
+ KillSignal = "SIGINT";
+ Restart = "always";
+ RestartSec = 60;
+ };
+
+ inherit (config) environment;
+
+ script = let
+ receiverCommand = postgresqlPackage:
+ if (versionAtLeast postgresqlPackage.version "10")
+ then "${postgresqlPackage}/bin/pg_receivewal"
+ else "${postgresqlPackage}/bin/pg_receivexlog";
+ in ''
+ ${receiverCommand config.postgresqlPackage} \
+ --no-password \
+ --directory=${escapeShellArg config.directory} \
+ --status-interval=${toString config.statusInterval} \
+ --dbname=${escapeShellArg config.connection} \
+ ${optionalString (config.compress > 0) "--compress=${toString config.compress}"} \
+ ${optionalString (config.slot != "") "--slot=${escapeShellArg config.slot}"} \
+ ${optionalString config.synchronous "--synchronous"} \
+ ${concatStringsSep " " config.extraArgs}
+ '';
+ }) receivers;
+ };
+
+ meta.maintainers = with maintainers; [ pacien ];
+}
diff --git a/nixos/modules/services/backup/rsnapshot.nix b/nixos/modules/services/backup/rsnapshot.nix
index bb5dcab1dcf2..6635a51ec2c6 100644
--- a/nixos/modules/services/backup/rsnapshot.nix
+++ b/nixos/modules/services/backup/rsnapshot.nix
@@ -2,7 +2,7 @@
with lib;
-let
+let
cfg = config.services.rsnapshot;
cfgfile = pkgs.writeText "rsnapshot.conf" ''
config_version 1.2
@@ -52,7 +52,7 @@ in
cronIntervals = mkOption {
default = {};
example = { hourly = "0 * * * *"; daily = "50 21 * * *"; };
- type = types.attrsOf types.string;
+ type = types.attrsOf types.str;
description = ''
Periodicity at which intervals should be run by cron.
Note that the intervals also have to exist in configuration
diff --git a/nixos/modules/services/backup/tsm.nix b/nixos/modules/services/backup/tsm.nix
index 3b2bb37491b5..6c238745797e 100644
--- a/nixos/modules/services/backup/tsm.nix
+++ b/nixos/modules/services/backup/tsm.nix
@@ -78,7 +78,7 @@ in
config = mkIf cfg.enable {
inherit assertions;
programs.tsmClient.enable = true;
- programs.tsmClient.servers."${cfg.servername}".passwdDir =
+ programs.tsmClient.servers.${cfg.servername}.passwdDir =
mkDefault "/var/lib/tsm-backup/password";
systemd.services.tsm-backup = {
description = "IBM Spectrum Protect (Tivoli Storage Manager) Backup";
diff --git a/nixos/modules/services/backup/zfs-replication.nix b/nixos/modules/services/backup/zfs-replication.nix
new file mode 100644
index 000000000000..5a64304275d5
--- /dev/null
+++ b/nixos/modules/services/backup/zfs-replication.nix
@@ -0,0 +1,90 @@
+{ lib, pkgs, config, ... }:
+
+with lib;
+
+let
+ cfg = config.services.zfs.autoReplication;
+ recursive = optionalString cfg.recursive " --recursive";
+ followDelete = optionalString cfg.followDelete " --follow-delete";
+in {
+ options = {
+ services.zfs.autoReplication = {
+ enable = mkEnableOption "ZFS snapshot replication.";
+
+ followDelete = mkOption {
+ description = "Remove remote snapshots that don't have a local correspondant.";
+ default = true;
+ type = types.bool;
+ };
+
+ host = mkOption {
+ description = "Remote host where snapshots should be sent.";
+ example = "example.com";
+ type = types.str;
+ };
+
+ identityFilePath = mkOption {
+ description = "Path to SSH key used to login to host.";
+ example = "/home/username/.ssh/id_rsa";
+ type = types.path;
+ };
+
+ localFilesystem = mkOption {
+ description = "Local ZFS fileystem from which snapshots should be sent. Defaults to the attribute name.";
+ example = "pool/file/path";
+ type = types.str;
+ };
+
+ remoteFilesystem = mkOption {
+ description = "Remote ZFS filesystem where snapshots should be sent.";
+ example = "pool/file/path";
+ type = types.str;
+ };
+
+ recursive = mkOption {
+ description = "Recursively discover snapshots to send.";
+ default = true;
+ type = types.bool;
+ };
+
+ username = mkOption {
+ description = "Username used by SSH to login to remote host.";
+ example = "username";
+ type = types.str;
+ };
+ };
+ };
+
+ config = lib.mkIf cfg.enable {
+ environment.systemPackages = [
+ pkgs.lz4
+ ];
+
+ systemd.services.zfs-replication = {
+ after = [
+ "zfs-snapshot-daily.service"
+ "zfs-snapshot-frequent.service"
+ "zfs-snapshot-hourly.service"
+ "zfs-snapshot-monthly.service"
+ "zfs-snapshot-weekly.service"
+ ];
+ description = "ZFS Snapshot Replication";
+ documentation = [
+ "https://github.com/alunduil/zfs-replicate"
+ ];
+ restartIfChanged = false;
+ serviceConfig.ExecStart = "${pkgs.zfs-replicate}/bin/zfs-replicate${recursive} -l ${escapeShellArg cfg.username} -i ${escapeShellArg cfg.identityFilePath}${followDelete} ${escapeShellArg cfg.host} ${escapeShellArg cfg.remoteFilesystem} ${escapeShellArg cfg.localFilesystem}";
+ wantedBy = [
+ "zfs-snapshot-daily.service"
+ "zfs-snapshot-frequent.service"
+ "zfs-snapshot-hourly.service"
+ "zfs-snapshot-monthly.service"
+ "zfs-snapshot-weekly.service"
+ ];
+ };
+ };
+
+ meta = {
+ maintainers = with lib.maintainers; [ alunduil ];
+ };
+}
diff --git a/nixos/modules/services/backup/znapzend.nix b/nixos/modules/services/backup/znapzend.nix
index 9c7f84655727..f317078ddda2 100644
--- a/nixos/modules/services/backup/znapzend.nix
+++ b/nixos/modules/services/backup/znapzend.nix
@@ -361,7 +361,7 @@ in
environment.systemPackages = [ pkgs.znapzend ];
systemd.services = {
- "znapzend" = {
+ znapzend = {
description = "ZnapZend - ZFS Backup System";
wantedBy = [ "zfs.target" ];
after = [ "zfs.target" ];
diff --git a/nixos/modules/services/cluster/hadoop/hdfs.nix b/nixos/modules/services/cluster/hadoop/hdfs.nix
index a38b6a78d3a5..4f4b0a92108f 100644
--- a/nixos/modules/services/cluster/hadoop/hdfs.nix
+++ b/nixos/modules/services/cluster/hadoop/hdfs.nix
@@ -24,7 +24,7 @@ with lib;
config = mkMerge [
(mkIf cfg.hdfs.namenode.enabled {
- systemd.services."hdfs-namenode" = {
+ systemd.services.hdfs-namenode = {
description = "Hadoop HDFS NameNode";
wantedBy = [ "multi-user.target" ];
@@ -44,7 +44,7 @@ with lib;
};
})
(mkIf cfg.hdfs.datanode.enabled {
- systemd.services."hdfs-datanode" = {
+ systemd.services.hdfs-datanode = {
description = "Hadoop HDFS DataNode";
wantedBy = [ "multi-user.target" ];
diff --git a/nixos/modules/services/cluster/hadoop/yarn.nix b/nixos/modules/services/cluster/hadoop/yarn.nix
index 5345a2732d7e..c92020637e47 100644
--- a/nixos/modules/services/cluster/hadoop/yarn.nix
+++ b/nixos/modules/services/cluster/hadoop/yarn.nix
@@ -35,7 +35,7 @@ with lib;
})
(mkIf cfg.yarn.resourcemanager.enabled {
- systemd.services."yarn-resourcemanager" = {
+ systemd.services.yarn-resourcemanager = {
description = "Hadoop YARN ResourceManager";
wantedBy = [ "multi-user.target" ];
@@ -53,7 +53,7 @@ with lib;
})
(mkIf cfg.yarn.nodemanager.enabled {
- systemd.services."yarn-nodemanager" = {
+ systemd.services.yarn-nodemanager = {
description = "Hadoop YARN NodeManager";
wantedBy = [ "multi-user.target" ];
diff --git a/nixos/modules/services/cluster/kubernetes/addon-manager.nix b/nixos/modules/services/cluster/kubernetes/addon-manager.nix
index ad7d17c9c283..17f2dde31a71 100644
--- a/nixos/modules/services/cluster/kubernetes/addon-manager.nix
+++ b/nixos/modules/services/cluster/kubernetes/addon-manager.nix
@@ -62,50 +62,19 @@ in
'';
};
- enable = mkEnableOption "Kubernetes addon manager";
-
- kubeconfig = top.lib.mkKubeConfigOptions "Kubernetes addon manager";
- bootstrapAddonsKubeconfig = top.lib.mkKubeConfigOptions "Kubernetes addon manager bootstrap";
+ enable = mkEnableOption "Whether to enable Kubernetes addon manager.";
};
###### implementation
- config = let
-
- addonManagerPaths = filter (a: a != null) [
- cfg.kubeconfig.caFile
- cfg.kubeconfig.certFile
- cfg.kubeconfig.keyFile
- ];
- bootstrapAddonsPaths = filter (a: a != null) [
- cfg.bootstrapAddonsKubeconfig.caFile
- cfg.bootstrapAddonsKubeconfig.certFile
- cfg.bootstrapAddonsKubeconfig.keyFile
- ];
-
- in mkIf cfg.enable {
+ config = mkIf cfg.enable {
environment.etc."kubernetes/addons".source = "${addons}/";
- #TODO: Get rid of kube-addon-manager in the future for the following reasons
- # - it is basically just a shell script wrapped around kubectl
- # - it assumes that it is clusterAdmin or can gain clusterAdmin rights through serviceAccount
- # - it is designed to be used with k8s system components only
- # - it would be better with a more Nix-oriented way of managing addons
systemd.services.kube-addon-manager = {
description = "Kubernetes addon manager";
wantedBy = [ "kubernetes.target" ];
- after = [ "kube-node-online.target" ];
- before = [ "kubernetes.target" ];
- environment = {
- ADDON_PATH = "/etc/kubernetes/addons/";
- KUBECONFIG = top.lib.mkKubeConfig "kube-addon-manager" cfg.kubeconfig;
- };
- path = with pkgs; [ gawk kubectl ];
- preStart = ''
- until kubectl -n kube-system get serviceaccounts/default 2>/dev/null; do
- echo kubectl -n kube-system get serviceaccounts/default: exit status $?
- sleep 2
- done
- '';
+ after = [ "kube-apiserver.service" ];
+ environment.ADDON_PATH = "/etc/kubernetes/addons/";
+ path = [ pkgs.gawk ];
serviceConfig = {
Slice = "kubernetes.slice";
ExecStart = "${top.package}/bin/kube-addons";
@@ -115,52 +84,8 @@ in
Restart = "on-failure";
RestartSec = 10;
};
- unitConfig.ConditionPathExists = addonManagerPaths;
};
- systemd.paths.kube-addon-manager = {
- wantedBy = [ "kube-addon-manager.service" ];
- pathConfig = {
- PathExists = addonManagerPaths;
- PathChanged = addonManagerPaths;
- };
- };
-
- services.kubernetes.addonManager.kubeconfig.server = mkDefault top.apiserverAddress;
-
- systemd.services.kube-addon-manager-bootstrap = mkIf (top.apiserver.enable && top.addonManager.bootstrapAddons != {}) {
- wantedBy = [ "kube-control-plane-online.target" ];
- after = [ "kube-apiserver.service" ];
- before = [ "kube-control-plane-online.target" ];
- path = [ pkgs.kubectl ];
- environment = {
- KUBECONFIG = top.lib.mkKubeConfig "kube-addon-manager-bootstrap" cfg.bootstrapAddonsKubeconfig;
- };
- preStart = with pkgs; let
- files = mapAttrsToList (n: v: writeText "${n}.json" (builtins.toJSON v))
- cfg.bootstrapAddons;
- in ''
- until kubectl auth can-i '*' '*' -q 2>/dev/null; do
- echo kubectl auth can-i '*' '*': exit status $?
- sleep 2
- done
-
- kubectl apply -f ${concatStringsSep " \\\n -f " files}
- '';
- script = "echo Ok";
- unitConfig.ConditionPathExists = bootstrapAddonsPaths;
- };
-
- systemd.paths.kube-addon-manager-bootstrap = {
- wantedBy = [ "kube-addon-manager-bootstrap.service" ];
- pathConfig = {
- PathExists = bootstrapAddonsPaths;
- PathChanged = bootstrapAddonsPaths;
- };
- };
-
- services.kubernetes.addonManager.bootstrapAddonsKubeconfig.server = mkDefault top.apiserverAddress;
-
services.kubernetes.addonManager.bootstrapAddons = mkIf isRBACEnabled
(let
name = system:kube-addon-manager;
diff --git a/nixos/modules/services/cluster/kubernetes/addons/dashboard.nix b/nixos/modules/services/cluster/kubernetes/addons/dashboard.nix
index 2295694ffc74..70f96d75a461 100644
--- a/nixos/modules/services/cluster/kubernetes/addons/dashboard.nix
+++ b/nixos/modules/services/cluster/kubernetes/addons/dashboard.nix
@@ -74,7 +74,7 @@ in {
spec = {
replicas = 1;
revisionHistoryLimit = 10;
- selector.matchLabels."k8s-app" = "kubernetes-dashboard";
+ selector.matchLabels.k8s-app = "kubernetes-dashboard";
template = {
metadata = {
labels = {
@@ -169,23 +169,6 @@ in {
};
};
- kubernetes-dashboard-cm = {
- apiVersion = "v1";
- kind = "ConfigMap";
- metadata = {
- labels = {
- k8s-app = "kubernetes-dashboard";
- # Allows editing resource and makes sure it is created first.
- "addonmanager.kubernetes.io/mode" = "EnsureExists";
- };
- name = "kubernetes-dashboard-settings";
- namespace = "kube-system";
- };
- };
- };
-
- services.kubernetes.addonManager.bootstrapAddons = mkMerge [{
-
kubernetes-dashboard-sa = {
apiVersion = "v1";
kind = "ServiceAccount";
@@ -227,9 +210,20 @@ in {
};
type = "Opaque";
};
- }
-
- (optionalAttrs cfg.rbac.enable
+ kubernetes-dashboard-cm = {
+ apiVersion = "v1";
+ kind = "ConfigMap";
+ metadata = {
+ labels = {
+ k8s-app = "kubernetes-dashboard";
+ # Allows editing resource and makes sure it is created first.
+ "addonmanager.kubernetes.io/mode" = "EnsureExists";
+ };
+ name = "kubernetes-dashboard-settings";
+ namespace = "kube-system";
+ };
+ };
+ } // (optionalAttrs cfg.rbac.enable
(let
subjects = [{
kind = "ServiceAccount";
@@ -329,6 +323,6 @@ in {
inherit subjects;
};
})
- ))];
+ ));
};
}
diff --git a/nixos/modules/services/cluster/kubernetes/addons/dns.nix b/nixos/modules/services/cluster/kubernetes/addons/dns.nix
index ee0ac632ecf0..47e588de3c93 100644
--- a/nixos/modules/services/cluster/kubernetes/addons/dns.nix
+++ b/nixos/modules/services/cluster/kubernetes/addons/dns.nix
@@ -73,7 +73,7 @@ in {
metadata = {
labels = {
"addonmanager.kubernetes.io/mode" = "Reconcile";
- "k8s-app" = "kube-dns";
+ k8s-app = "kube-dns";
"kubernetes.io/cluster-service" = "true";
"kubernetes.io/bootstrapping" = "rbac-defaults";
};
@@ -102,7 +102,7 @@ in {
};
labels = {
"addonmanager.kubernetes.io/mode" = "Reconcile";
- "k8s-app" = "kube-dns";
+ k8s-app = "kube-dns";
"kubernetes.io/cluster-service" = "true";
"kubernetes.io/bootstrapping" = "rbac-defaults";
};
@@ -130,7 +130,7 @@ in {
metadata = {
labels = {
"addonmanager.kubernetes.io/mode" = "Reconcile";
- "k8s-app" = "kube-dns";
+ k8s-app = "kube-dns";
"kubernetes.io/cluster-service" = "true";
};
name = "coredns";
@@ -144,7 +144,7 @@ in {
metadata = {
labels = {
"addonmanager.kubernetes.io/mode" = cfg.reconcileMode;
- "k8s-app" = "kube-dns";
+ k8s-app = "kube-dns";
"kubernetes.io/cluster-service" = "true";
};
name = "coredns";
@@ -175,7 +175,7 @@ in {
metadata = {
labels = {
"addonmanager.kubernetes.io/mode" = cfg.reconcileMode;
- "k8s-app" = "kube-dns";
+ k8s-app = "kube-dns";
"kubernetes.io/cluster-service" = "true";
"kubernetes.io/name" = "CoreDNS";
};
@@ -301,7 +301,7 @@ in {
};
labels = {
"addonmanager.kubernetes.io/mode" = "Reconcile";
- "k8s-app" = "kube-dns";
+ k8s-app = "kube-dns";
"kubernetes.io/cluster-service" = "true";
"kubernetes.io/name" = "CoreDNS";
};
diff --git a/nixos/modules/services/cluster/kubernetes/apiserver.nix b/nixos/modules/services/cluster/kubernetes/apiserver.nix
index f293dd79f42a..33796bf2e080 100644
--- a/nixos/modules/services/cluster/kubernetes/apiserver.nix
+++ b/nixos/modules/services/cluster/kubernetes/apiserver.nix
@@ -290,32 +290,11 @@ in
###### implementation
config = mkMerge [
- (let
-
- apiserverPaths = filter (a: a != null) [
- cfg.clientCaFile
- cfg.etcd.caFile
- cfg.etcd.certFile
- cfg.etcd.keyFile
- cfg.kubeletClientCaFile
- cfg.kubeletClientCertFile
- cfg.kubeletClientKeyFile
- cfg.serviceAccountKeyFile
- cfg.tlsCertFile
- cfg.tlsKeyFile
- ];
- etcdPaths = filter (a: a != null) [
- config.services.etcd.trustedCaFile
- config.services.etcd.certFile
- config.services.etcd.keyFile
- ];
-
- in mkIf cfg.enable {
+ (mkIf cfg.enable {
systemd.services.kube-apiserver = {
description = "Kubernetes APIServer Service";
- wantedBy = [ "kube-control-plane-online.target" ];
- after = [ "certmgr.service" ];
- before = [ "kube-control-plane-online.target" ];
+ wantedBy = [ "kubernetes.target" ];
+ after = [ "network.target" ];
serviceConfig = {
Slice = "kubernetes.slice";
ExecStart = ''${top.package}/bin/kube-apiserver \
@@ -386,15 +365,6 @@ in
Restart = "on-failure";
RestartSec = 5;
};
- unitConfig.ConditionPathExists = apiserverPaths;
- };
-
- systemd.paths.kube-apiserver = mkIf top.apiserver.enable {
- wantedBy = [ "kube-apiserver.service" ];
- pathConfig = {
- PathExists = apiserverPaths;
- PathChanged = apiserverPaths;
- };
};
services.etcd = {
@@ -408,18 +378,6 @@ in
initialAdvertisePeerUrls = mkDefault ["https://${top.masterAddress}:2380"];
};
- systemd.services.etcd = {
- unitConfig.ConditionPathExists = etcdPaths;
- };
-
- systemd.paths.etcd = {
- wantedBy = [ "etcd.service" ];
- pathConfig = {
- PathExists = etcdPaths;
- PathChanged = etcdPaths;
- };
- };
-
services.kubernetes.addonManager.bootstrapAddons = mkIf isRBACEnabled {
apiserver-kubelet-api-admin-crb = {
diff --git a/nixos/modules/services/cluster/kubernetes/controller-manager.nix b/nixos/modules/services/cluster/kubernetes/controller-manager.nix
index b94e8bd86d4c..0b73d090f241 100644
--- a/nixos/modules/services/cluster/kubernetes/controller-manager.nix
+++ b/nixos/modules/services/cluster/kubernetes/controller-manager.nix
@@ -104,31 +104,11 @@ in
};
###### implementation
- config = let
-
- controllerManagerPaths = filter (a: a != null) [
- cfg.kubeconfig.caFile
- cfg.kubeconfig.certFile
- cfg.kubeconfig.keyFile
- cfg.rootCaFile
- cfg.serviceAccountKeyFile
- cfg.tlsCertFile
- cfg.tlsKeyFile
- ];
-
- in mkIf cfg.enable {
- systemd.services.kube-controller-manager = rec {
+ config = mkIf cfg.enable {
+ systemd.services.kube-controller-manager = {
description = "Kubernetes Controller Manager Service";
- wantedBy = [ "kube-control-plane-online.target" ];
+ wantedBy = [ "kubernetes.target" ];
after = [ "kube-apiserver.service" ];
- before = [ "kube-control-plane-online.target" ];
- environment.KUBECONFIG = top.lib.mkKubeConfig "kube-controller-manager" cfg.kubeconfig;
- preStart = ''
- until kubectl auth can-i get /api -q 2>/dev/null; do
- echo kubectl auth can-i get /api: exit status $?
- sleep 2
- done
- '';
serviceConfig = {
RestartSec = "30s";
Restart = "on-failure";
@@ -140,7 +120,7 @@ in
"--cluster-cidr=${cfg.clusterCidr}"} \
${optionalString (cfg.featureGates != [])
"--feature-gates=${concatMapStringsSep "," (feature: "${feature}=true") cfg.featureGates}"} \
- --kubeconfig=${environment.KUBECONFIG} \
+ --kubeconfig=${top.lib.mkKubeConfig "kube-controller-manager" cfg.kubeconfig} \
--leader-elect=${boolToString cfg.leaderElect} \
${optionalString (cfg.rootCaFile!=null)
"--root-ca-file=${cfg.rootCaFile}"} \
@@ -161,16 +141,7 @@ in
User = "kubernetes";
Group = "kubernetes";
};
- path = top.path ++ [ pkgs.kubectl ];
- unitConfig.ConditionPathExists = controllerManagerPaths;
- };
-
- systemd.paths.kube-controller-manager = {
- wantedBy = [ "kube-controller-manager.service" ];
- pathConfig = {
- PathExists = controllerManagerPaths;
- PathChanged = controllerManagerPaths;
- };
+ path = top.path;
};
services.kubernetes.pki.certs = with top.lib; {
diff --git a/nixos/modules/services/cluster/kubernetes/default.nix b/nixos/modules/services/cluster/kubernetes/default.nix
index 143b41f57f6a..3790ac9b6918 100644
--- a/nixos/modules/services/cluster/kubernetes/default.nix
+++ b/nixos/modules/services/cluster/kubernetes/default.nix
@@ -256,29 +256,6 @@ in {
wantedBy = [ "multi-user.target" ];
};
- systemd.targets.kube-control-plane-online = {
- wantedBy = [ "kubernetes.target" ];
- before = [ "kubernetes.target" ];
- };
-
- systemd.services.kube-control-plane-online = rec {
- description = "Kubernetes control plane is online";
- wantedBy = [ "kube-control-plane-online.target" ];
- after = [ "kube-scheduler.service" "kube-controller-manager.service" ];
- before = [ "kube-control-plane-online.target" ];
- path = [ pkgs.curl ];
- preStart = ''
- until curl -Ssf ${cfg.apiserverAddress}/healthz do
- echo curl -Ssf ${cfg.apiserverAddress}/healthz: exit status $?
- sleep 3
- done
- '';
- script = "echo Ok";
- serviceConfig = {
- TimeoutSec = "500";
- };
- };
-
systemd.tmpfiles.rules = [
"d /opt/cni/bin 0755 root root -"
"d /run/kubernetes 0755 kubernetes kubernetes -"
@@ -302,8 +279,6 @@ in {
services.kubernetes.apiserverAddress = mkDefault ("https://${if cfg.apiserver.advertiseAddress != null
then cfg.apiserver.advertiseAddress
else "${cfg.masterAddress}:${toString cfg.apiserver.securePort}"}");
-
- services.kubernetes.kubeconfig.server = mkDefault cfg.apiserverAddress;
})
];
}
diff --git a/nixos/modules/services/cluster/kubernetes/flannel.nix b/nixos/modules/services/cluster/kubernetes/flannel.nix
index d9437427d6d1..d799e638fc94 100644
--- a/nixos/modules/services/cluster/kubernetes/flannel.nix
+++ b/nixos/modules/services/cluster/kubernetes/flannel.nix
@@ -14,36 +14,25 @@ let
buildInputs = [ pkgs.makeWrapper ];
} ''
mkdir -p $out
- cp ${pkgs.kubernetes.src}/cluster/centos/node/bin/mk-docker-opts.sh $out/mk-docker-opts.sh
# bashInteractive needed for `compgen`
- makeWrapper ${pkgs.bashInteractive}/bin/bash $out/mk-docker-opts --add-flags "$out/mk-docker-opts.sh"
+ makeWrapper ${pkgs.bashInteractive}/bin/bash $out/mk-docker-opts --add-flags "${pkgs.kubernetes}/bin/mk-docker-opts.sh"
'';
in
{
###### interface
options.services.kubernetes.flannel = {
- enable = mkEnableOption "flannel networking";
- kubeconfig = top.lib.mkKubeConfigOptions "Kubernetes flannel";
+ enable = mkEnableOption "enable flannel networking";
};
###### implementation
- config = let
-
- flannelPaths = filter (a: a != null) [
- cfg.kubeconfig.caFile
- cfg.kubeconfig.certFile
- cfg.kubeconfig.keyFile
- ];
- kubeconfig = top.lib.mkKubeConfig "flannel" cfg.kubeconfig;
-
- in mkIf cfg.enable {
+ config = mkIf cfg.enable {
services.flannel = {
enable = mkDefault true;
network = mkDefault top.clusterCidr;
- inherit storageBackend kubeconfig;
- nodeName = top.kubelet.hostname;
+ inherit storageBackend;
+ nodeName = config.services.kubernetes.kubelet.hostname;
};
services.kubernetes.kubelet = {
@@ -60,64 +49,22 @@ in
systemd.services.mk-docker-opts = {
description = "Pre-Docker Actions";
- wantedBy = [ "flannel.target" ];
- before = [ "flannel.target" ];
path = with pkgs; [ gawk gnugrep ];
script = ''
${mkDockerOpts}/mk-docker-opts -d /run/flannel/docker
systemctl restart docker
'';
- unitConfig.ConditionPathExists = [ "/run/flannel/subnet.env" ];
serviceConfig.Type = "oneshot";
};
systemd.paths.flannel-subnet-env = {
- wantedBy = [ "mk-docker-opts.service" ];
+ wantedBy = [ "flannel.service" ];
pathConfig = {
- PathExists = [ "/run/flannel/subnet.env" ];
- PathChanged = [ "/run/flannel/subnet.env" ];
+ PathModified = "/run/flannel/subnet.env";
Unit = "mk-docker-opts.service";
};
};
- systemd.targets.flannel = {
- wantedBy = [ "kube-node-online.target" ];
- before = [ "kube-node-online.target" ];
- };
-
- systemd.services.flannel = {
- wantedBy = [ "flannel.target" ];
- after = [ "kubelet.target" ];
- before = [ "flannel.target" ];
- path = with pkgs; [ iptables kubectl ];
- environment.KUBECONFIG = kubeconfig;
- preStart = let
- args = [
- "--selector=kubernetes.io/hostname=${top.kubelet.hostname}"
- # flannel exits if node is not registered yet, before that there is no podCIDR
- "--output=jsonpath={.items[0].spec.podCIDR}"
- # if jsonpath cannot be resolved exit with status 1
- "--allow-missing-template-keys=false"
- ];
- in ''
- until kubectl get nodes ${concatStringsSep " " args} 2>/dev/null; do
- echo Waiting for ${top.kubelet.hostname} to be RegisteredNode
- sleep 1
- done
- '';
- unitConfig.ConditionPathExists = flannelPaths;
- };
-
- systemd.paths.flannel = {
- wantedBy = [ "flannel.service" ];
- pathConfig = {
- PathExists = flannelPaths;
- PathChanged = flannelPaths;
- };
- };
-
- services.kubernetes.flannel.kubeconfig.server = mkDefault top.apiserverAddress;
-
systemd.services.docker = {
environment.DOCKER_OPTS = "-b none";
serviceConfig.EnvironmentFile = "-/run/flannel/docker";
@@ -144,6 +91,7 @@ in
# give flannel som kubernetes rbac permissions if applicable
services.kubernetes.addonManager.bootstrapAddons = mkIf ((storageBackend == "kubernetes") && (elem "RBAC" top.apiserver.authorizationMode)) {
+
flannel-cr = {
apiVersion = "rbac.authorization.k8s.io/v1beta1";
kind = "ClusterRole";
@@ -179,6 +127,7 @@ in
name = "flannel-client";
}];
};
+
};
};
}
diff --git a/nixos/modules/services/cluster/kubernetes/kubelet.nix b/nixos/modules/services/cluster/kubernetes/kubelet.nix
index 4c5df96bcc6a..250da4c807ec 100644
--- a/nixos/modules/services/cluster/kubernetes/kubelet.nix
+++ b/nixos/modules/services/cluster/kubernetes/kubelet.nix
@@ -61,12 +61,6 @@ in
type = str;
};
- allowPrivileged = mkOption {
- description = "Whether to allow Kubernetes containers to request privileged mode.";
- default = false;
- type = bool;
- };
-
clusterDns = mkOption {
description = "Use alternative DNS.";
default = "10.1.0.1";
@@ -234,28 +228,21 @@ in
###### implementation
config = mkMerge [
- (let
-
- kubeletPaths = filter (a: a != null) [
- cfg.kubeconfig.caFile
- cfg.kubeconfig.certFile
- cfg.kubeconfig.keyFile
- cfg.clientCaFile
- cfg.tlsCertFile
- cfg.tlsKeyFile
- ];
-
- in mkIf cfg.enable {
+ (mkIf cfg.enable {
services.kubernetes.kubelet.seedDockerImages = [infraContainer];
systemd.services.kubelet = {
description = "Kubernetes Kubelet Service";
- wantedBy = [ "kubelet.target" ];
- after = [ "kube-control-plane-online.target" ];
- before = [ "kubelet.target" ];
+ wantedBy = [ "kubernetes.target" ];
+ after = [ "network.target" "docker.service" "kube-apiserver.service" ];
path = with pkgs; [ gitMinimal openssh docker utillinux iproute ethtool thin-provisioning-tools iptables socat ] ++ top.path;
preStart = ''
- rm -f /opt/cni/bin/* || true
+ ${concatMapStrings (img: ''
+ echo "Seeding docker image: ${img}"
+ docker load <${img}
+ '') cfg.seedDockerImages}
+
+ rm /opt/cni/bin/* || true
${concatMapStrings (package: ''
echo "Linking cni package: ${package}"
ln -fs ${package}/bin/* /opt/cni/bin
@@ -269,7 +256,6 @@ in
RestartSec = "1000ms";
ExecStart = ''${top.package}/bin/kubelet \
--address=${cfg.address} \
- --allow-privileged=${boolToString cfg.allowPrivileged} \
--authentication-token-webhook \
--authentication-token-webhook-cache-ttl="10s" \
--authorization-mode=Webhook \
@@ -308,56 +294,6 @@ in
'';
WorkingDirectory = top.dataDir;
};
- unitConfig.ConditionPathExists = kubeletPaths;
- };
-
- systemd.paths.kubelet = {
- wantedBy = [ "kubelet.service" ];
- pathConfig = {
- PathExists = kubeletPaths;
- PathChanged = kubeletPaths;
- };
- };
-
- systemd.services.docker.before = [ "kubelet.service" ];
-
- systemd.services.docker-seed-images = {
- wantedBy = [ "docker.service" ];
- after = [ "docker.service" ];
- before = [ "kubelet.service" ];
- path = with pkgs; [ docker ];
- preStart = ''
- ${concatMapStrings (img: ''
- echo "Seeding docker image: ${img}"
- docker load <${img}
- '') cfg.seedDockerImages}
- '';
- script = "echo Ok";
- serviceConfig.Type = "oneshot";
- serviceConfig.RemainAfterExit = true;
- serviceConfig.Slice = "kubernetes.slice";
- };
-
- systemd.services.kubelet-online = {
- wantedBy = [ "kube-node-online.target" ];
- after = [ "flannel.target" "kubelet.target" ];
- before = [ "kube-node-online.target" ];
- # it is complicated. flannel needs kubelet to run the pause container before
- # it discusses the node CIDR with apiserver and afterwards configures and restarts
- # dockerd. Until then prevent creating any pods because they have to be recreated anyway
- # because the network of docker0 has been changed by flannel.
- script = let
- docker-env = "/run/flannel/docker";
- flannel-date = "stat --print=%Y ${docker-env}";
- docker-date = "systemctl show --property=ActiveEnterTimestamp --value docker";
- in ''
- until test -f ${docker-env} ; do sleep 1 ; done
- while test `${flannel-date}` -gt `date +%s --date="$(${docker-date})"` ; do
- sleep 1
- done
- '';
- serviceConfig.Type = "oneshot";
- serviceConfig.Slice = "kubernetes.slice";
};
# Allways include cni plugins
@@ -404,16 +340,5 @@ in
};
})
- {
- systemd.targets.kubelet = {
- wantedBy = [ "kube-node-online.target" ];
- before = [ "kube-node-online.target" ];
- };
-
- systemd.targets.kube-node-online = {
- wantedBy = [ "kubernetes.target" ];
- before = [ "kubernetes.target" ];
- };
- }
];
}
diff --git a/nixos/modules/services/cluster/kubernetes/pki.nix b/nixos/modules/services/cluster/kubernetes/pki.nix
index 47384ae50a07..733479e24c97 100644
--- a/nixos/modules/services/cluster/kubernetes/pki.nix
+++ b/nixos/modules/services/cluster/kubernetes/pki.nix
@@ -27,11 +27,12 @@ let
certmgrAPITokenPath = "${top.secretsPath}/${cfsslAPITokenBaseName}";
cfsslAPITokenLength = 32;
- clusterAdminKubeconfig = with cfg.certs.clusterAdmin; {
- server = top.apiserverAddress;
- certFile = cert;
- keyFile = key;
- };
+ clusterAdminKubeconfig = with cfg.certs.clusterAdmin;
+ top.lib.mkKubeConfig "cluster-admin" {
+ server = top.apiserverAddress;
+ certFile = cert;
+ keyFile = key;
+ };
remote = with config.services; "https://${kubernetes.masterAddress}:${toString cfssl.port}";
in
@@ -118,11 +119,6 @@ in
cfsslCertPathPrefix = "${config.services.cfssl.dataDir}/cfssl";
cfsslCert = "${cfsslCertPathPrefix}.pem";
cfsslKey = "${cfsslCertPathPrefix}-key.pem";
-
- certmgrPaths = [
- top.caFile
- certmgrAPITokenPath
- ];
in
{
@@ -172,40 +168,13 @@ in
chown cfssl "${cfsslAPITokenPath}" && chmod 400 "${cfsslAPITokenPath}"
'')]);
- systemd.targets.cfssl-online = {
- wantedBy = [ "network-online.target" ];
- after = [ "cfssl.service" "network-online.target" "cfssl-online.service" ];
- };
-
- systemd.services.cfssl-online = {
- description = "Wait for ${remote} to be reachable.";
- wantedBy = [ "cfssl-online.target" ];
- before = [ "cfssl-online.target" ];
- path = [ pkgs.curl ];
- preStart = ''
- until curl --fail-early -fskd '{}' ${remote}/api/v1/cfssl/info -o /dev/null; do
- echo curl ${remote}/api/v1/cfssl/info: exit status $?
- sleep 2
- done
- '';
- script = "echo Ok";
- serviceConfig = {
- TimeoutSec = "300";
- };
- };
-
systemd.services.kube-certmgr-bootstrap = {
description = "Kubernetes certmgr bootstrapper";
- wantedBy = [ "cfssl-online.target" ];
- after = [ "cfssl-online.target" ];
- before = [ "certmgr.service" ];
- path = with pkgs; [ curl cfssl ];
+ wantedBy = [ "certmgr.service" ];
+ after = [ "cfssl.target" ];
script = concatStringsSep "\n" [''
set -e
- mkdir -p $(dirname ${certmgrAPITokenPath})
- mkdir -p $(dirname ${top.caFile})
-
# If there's a cfssl (cert issuer) running locally, then don't rely on user to
# manually paste it in place. Just symlink.
# otherwise, create the target file, ready for users to insert the token
@@ -217,18 +186,15 @@ in
fi
''
(optionalString (cfg.pkiTrustOnBootstrap) ''
- if [ ! -s "${top.caFile}" ]; then
- until test -s ${top.caFile}.json; do
- sleep 2
- curl --fail-early -fskd '{}' ${remote}/api/v1/cfssl/info -o ${top.caFile}.json
- done
- cfssljson -f ${top.caFile}.json -stdout >${top.caFile}
- rm ${top.caFile}.json
+ if [ ! -f "${top.caFile}" ] || [ $(cat "${top.caFile}" | wc -c) -lt 1 ]; then
+ ${pkgs.curl}/bin/curl --fail-early -f -kd '{}' ${remote}/api/v1/cfssl/info | \
+ ${pkgs.cfssl}/bin/cfssljson -stdout >${top.caFile}
fi
'')
];
serviceConfig = {
- TimeoutSec = "500";
+ RestartSec = "10s";
+ Restart = "on-failure";
};
};
@@ -264,28 +230,35 @@ in
mapAttrs mkSpec cfg.certs;
};
- systemd.services.certmgr = {
- wantedBy = [ "cfssl-online.target" ];
- after = [ "cfssl-online.target" "kube-certmgr-bootstrap.service" ];
- preStart = ''
- while ! test -s ${certmgrAPITokenPath} ; do
- sleep 1
- echo Waiting for ${certmgrAPITokenPath}
- done
- '';
- unitConfig.ConditionPathExists = certmgrPaths;
- };
+ #TODO: Get rid of kube-addon-manager in the future for the following reasons
+ # - it is basically just a shell script wrapped around kubectl
+ # - it assumes that it is clusterAdmin or can gain clusterAdmin rights through serviceAccount
+ # - it is designed to be used with k8s system components only
+ # - it would be better with a more Nix-oriented way of managing addons
+ systemd.services.kube-addon-manager = mkIf top.addonManager.enable (mkMerge [{
+ environment.KUBECONFIG = with cfg.certs.addonManager;
+ top.lib.mkKubeConfig "addon-manager" {
+ server = top.apiserverAddress;
+ certFile = cert;
+ keyFile = key;
+ };
+ }
- systemd.paths.certmgr = {
- wantedBy = [ "certmgr.service" ];
- pathConfig = {
- PathExists = certmgrPaths;
- PathChanged = certmgrPaths;
- };
- };
+ (optionalAttrs (top.addonManager.bootstrapAddons != {}) {
+ serviceConfig.PermissionsStartOnly = true;
+ preStart = with pkgs;
+ let
+ files = mapAttrsToList (n: v: writeText "${n}.json" (builtins.toJSON v))
+ top.addonManager.bootstrapAddons;
+ in
+ ''
+ export KUBECONFIG=${clusterAdminKubeconfig}
+ ${kubectl}/bin/kubectl apply -f ${concatStringsSep " \\\n -f " files}
+ '';
+ })]);
- environment.etc.${cfg.etcClusterAdminKubeconfig}.source = mkIf (cfg.etcClusterAdminKubeconfig != null)
- (top.lib.mkKubeConfig "cluster-admin" clusterAdminKubeconfig);
+ environment.etc.${cfg.etcClusterAdminKubeconfig}.source = mkIf (!isNull cfg.etcClusterAdminKubeconfig)
+ clusterAdminKubeconfig;
environment.systemPackages = mkIf (top.kubelet.enable || top.proxy.enable) [
(pkgs.writeScriptBin "nixos-kubernetes-node-join" ''
@@ -311,22 +284,38 @@ in
exit 1
fi
- do_restart=$(test -s ${certmgrAPITokenPath} && echo -n y || echo -n n)
-
echo $token > ${certmgrAPITokenPath}
chmod 600 ${certmgrAPITokenPath}
- if [ y = $do_restart ]; then
- echo "Restarting certmgr..." >&1
- systemctl restart certmgr
- fi
+ echo "Restarting certmgr..." >&1
+ systemctl restart certmgr
- echo "Node joined succesfully" >&1
+ echo "Waiting for certs to appear..." >&1
+
+ ${optionalString top.kubelet.enable ''
+ while [ ! -f ${cfg.certs.kubelet.cert} ]; do sleep 1; done
+ echo "Restarting kubelet..." >&1
+ systemctl restart kubelet
+ ''}
+
+ ${optionalString top.proxy.enable ''
+ while [ ! -f ${cfg.certs.kubeProxyClient.cert} ]; do sleep 1; done
+ echo "Restarting kube-proxy..." >&1
+ systemctl restart kube-proxy
+ ''}
+
+ ${optionalString top.flannel.enable ''
+ while [ ! -f ${cfg.certs.flannelClient.cert} ]; do sleep 1; done
+ echo "Restarting flannel..." >&1
+ systemctl restart flannel
+ ''}
+
+ echo "Node joined succesfully"
'')];
# isolate etcd on loopback at the master node
# easyCerts doesn't support multimaster clusters anyway atm.
- services.etcd = mkIf top.apiserver.enable (with cfg.certs.etcd; {
+ services.etcd = with cfg.certs.etcd; {
listenClientUrls = ["https://127.0.0.1:2379"];
listenPeerUrls = ["https://127.0.0.1:2380"];
advertiseClientUrls = ["https://etcd.local:2379"];
@@ -335,11 +324,19 @@ in
certFile = mkDefault cert;
keyFile = mkDefault key;
trustedCaFile = mkDefault caCert;
- });
+ };
networking.extraHosts = mkIf (config.services.etcd.enable) ''
127.0.0.1 etcd.${top.addons.dns.clusterDomain} etcd.local
'';
+ services.flannel = with cfg.certs.flannelClient; {
+ kubeconfig = top.lib.mkKubeConfig "flannel" {
+ server = top.apiserverAddress;
+ certFile = cert;
+ keyFile = key;
+ };
+ };
+
services.kubernetes = {
apiserver = mkIf top.apiserver.enable (with cfg.certs.apiServer; {
@@ -359,13 +356,6 @@ in
proxyClientCertFile = mkDefault cfg.certs.apiserverProxyClient.cert;
proxyClientKeyFile = mkDefault cfg.certs.apiserverProxyClient.key;
});
- addonManager = mkIf top.addonManager.enable {
- kubeconfig = with cfg.certs.addonManager; {
- certFile = mkDefault cert;
- keyFile = mkDefault key;
- };
- bootstrapAddonsKubeconfig = clusterAdminKubeconfig;
- };
controllerManager = mkIf top.controllerManager.enable {
serviceAccountKeyFile = mkDefault cfg.certs.serviceAccount.key;
rootCaFile = cfg.certs.controllerManagerClient.caCert;
@@ -374,12 +364,6 @@ in
keyFile = mkDefault key;
};
};
- flannel = mkIf top.flannel.enable {
- kubeconfig = with cfg.certs.flannelClient; {
- certFile = cert;
- keyFile = key;
- };
- };
scheduler = mkIf top.scheduler.enable {
kubeconfig = with cfg.certs.schedulerClient; {
certFile = mkDefault cert;
diff --git a/nixos/modules/services/cluster/kubernetes/proxy.nix b/nixos/modules/services/cluster/kubernetes/proxy.nix
index 23f4d97b7030..bd4bf04ea833 100644
--- a/nixos/modules/services/cluster/kubernetes/proxy.nix
+++ b/nixos/modules/services/cluster/kubernetes/proxy.nix
@@ -45,28 +45,12 @@ in
};
###### implementation
- config = let
-
- proxyPaths = filter (a: a != null) [
- cfg.kubeconfig.caFile
- cfg.kubeconfig.certFile
- cfg.kubeconfig.keyFile
- ];
-
- in mkIf cfg.enable {
- systemd.services.kube-proxy = rec {
+ config = mkIf cfg.enable {
+ systemd.services.kube-proxy = {
description = "Kubernetes Proxy Service";
- wantedBy = [ "kube-node-online.target" ];
- after = [ "kubelet-online.service" ];
- before = [ "kube-node-online.target" ];
- environment.KUBECONFIG = top.lib.mkKubeConfig "kube-proxy" cfg.kubeconfig;
- path = with pkgs; [ iptables conntrack_tools kubectl ];
- preStart = ''
- until kubectl auth can-i get nodes/${top.kubelet.hostname} -q 2>/dev/null; do
- echo kubectl auth can-i get nodes/${top.kubelet.hostname}: exit status $?
- sleep 2
- done
- '';
+ wantedBy = [ "kubernetes.target" ];
+ after = [ "kube-apiserver.service" ];
+ path = with pkgs; [ iptables conntrack_tools ];
serviceConfig = {
Slice = "kubernetes.slice";
ExecStart = ''${top.package}/bin/kube-proxy \
@@ -75,7 +59,7 @@ in
"--cluster-cidr=${top.clusterCidr}"} \
${optionalString (cfg.featureGates != [])
"--feature-gates=${concatMapStringsSep "," (feature: "${feature}=true") cfg.featureGates}"} \
- --kubeconfig=${environment.KUBECONFIG} \
+ --kubeconfig=${top.lib.mkKubeConfig "kube-proxy" cfg.kubeconfig} \
${optionalString (cfg.verbosity != null) "--v=${toString cfg.verbosity}"} \
${cfg.extraOpts}
'';
@@ -83,15 +67,6 @@ in
Restart = "on-failure";
RestartSec = 5;
};
- unitConfig.ConditionPathExists = proxyPaths;
- };
-
- systemd.paths.kube-proxy = {
- wantedBy = [ "kube-proxy.service" ];
- pathConfig = {
- PathExists = proxyPaths;
- PathChanged = proxyPaths;
- };
};
services.kubernetes.pki.certs = {
diff --git a/nixos/modules/services/cluster/kubernetes/scheduler.nix b/nixos/modules/services/cluster/kubernetes/scheduler.nix
index a0e484542951..5f6113227d9d 100644
--- a/nixos/modules/services/cluster/kubernetes/scheduler.nix
+++ b/nixos/modules/services/cluster/kubernetes/scheduler.nix
@@ -56,35 +56,18 @@ in
};
###### implementation
- config = let
-
- schedulerPaths = filter (a: a != null) [
- cfg.kubeconfig.caFile
- cfg.kubeconfig.certFile
- cfg.kubeconfig.keyFile
- ];
-
- in mkIf cfg.enable {
- systemd.services.kube-scheduler = rec {
+ config = mkIf cfg.enable {
+ systemd.services.kube-scheduler = {
description = "Kubernetes Scheduler Service";
- wantedBy = [ "kube-control-plane-online.target" ];
+ wantedBy = [ "kubernetes.target" ];
after = [ "kube-apiserver.service" ];
- before = [ "kube-control-plane-online.target" ];
- environment.KUBECONFIG = top.lib.mkKubeConfig "kube-scheduler" cfg.kubeconfig;
- path = [ pkgs.kubectl ];
- preStart = ''
- until kubectl auth can-i get /api -q 2>/dev/null; do
- echo kubectl auth can-i get /api: exit status $?
- sleep 2
- done
- '';
serviceConfig = {
Slice = "kubernetes.slice";
ExecStart = ''${top.package}/bin/kube-scheduler \
--address=${cfg.address} \
${optionalString (cfg.featureGates != [])
"--feature-gates=${concatMapStringsSep "," (feature: "${feature}=true") cfg.featureGates}"} \
- --kubeconfig=${environment.KUBECONFIG} \
+ --kubeconfig=${top.lib.mkKubeConfig "kube-scheduler" cfg.kubeconfig} \
--leader-elect=${boolToString cfg.leaderElect} \
--port=${toString cfg.port} \
${optionalString (cfg.verbosity != null) "--v=${toString cfg.verbosity}"} \
@@ -96,15 +79,6 @@ in
Restart = "on-failure";
RestartSec = 5;
};
- unitConfig.ConditionPathExists = schedulerPaths;
- };
-
- systemd.paths.kube-scheduler = {
- wantedBy = [ "kube-scheduler.service" ];
- pathConfig = {
- PathExists = schedulerPaths;
- PathChanged = schedulerPaths;
- };
};
services.kubernetes.pki.certs = {
diff --git a/nixos/modules/services/computing/boinc/client.nix b/nixos/modules/services/computing/boinc/client.nix
index 7022751b3f01..a7edac025384 100644
--- a/nixos/modules/services/computing/boinc/client.nix
+++ b/nixos/modules/services/computing/boinc/client.nix
@@ -111,7 +111,7 @@ in
systemd.services.boinc = {
description = "BOINC Client";
- after = ["network.target" "local-fs.target"];
+ after = ["network.target"];
wantedBy = ["multi-user.target"];
script = ''
${fhsEnvExecutable} --dir ${cfg.dataDir} --redirectio ${allowRemoteGuiRpcFlag}
diff --git a/nixos/modules/services/continuous-integration/gitlab-runner.nix b/nixos/modules/services/continuous-integration/gitlab-runner.nix
index 3ceaa6f5ff3e..3d307b1abcf8 100644
--- a/nixos/modules/services/continuous-integration/gitlab-runner.nix
+++ b/nixos/modules/services/continuous-integration/gitlab-runner.nix
@@ -111,7 +111,10 @@ in
config = mkIf cfg.enable {
systemd.services.gitlab-runner = {
path = cfg.packages;
- environment = config.networking.proxy.envVars;
+ environment = config.networking.proxy.envVars // {
+ # Gitlab runner will not start if the HOME variable is not set
+ HOME = cfg.workDir;
+ };
description = "Gitlab Runner";
after = [ "network.target" ]
++ optional hasDocker "docker.service";
diff --git a/nixos/modules/services/continuous-integration/hydra/default.nix b/nixos/modules/services/continuous-integration/hydra/default.nix
index c7fe4eeeab99..30c5550f71c5 100644
--- a/nixos/modules/services/continuous-integration/hydra/default.nix
+++ b/nixos/modules/services/continuous-integration/hydra/default.nix
@@ -43,7 +43,7 @@ in
###### interface
options = {
- services.hydra = rec {
+ services.hydra = {
enable = mkOption {
type = types.bool;
@@ -242,8 +242,8 @@ in
environment.variables = hydraEnv;
nix.extraOptions = ''
- gc-keep-outputs = true
- gc-keep-derivations = true
+ keep-outputs = true
+ keep-derivations = true
# The default (`true') slows Nix down a lot since the build farm
# has so many GC roots.
@@ -275,6 +275,7 @@ in
${pkgs.sudo}/bin/sudo -u ${config.services.postgresql.superUser} ${config.services.postgresql.package}/bin/createdb -O hydra hydra
touch ${baseDir}/.db-created
fi
+ echo "create extension if not exists pg_trgm" | ${pkgs.sudo}/bin/sudo -u ${config.services.postgresql.superUser} -- ${config.services.postgresql.package}/bin/psql hydra
''}
if [ ! -e ${cfg.gcRootsDir} ]; then
@@ -379,6 +380,23 @@ in
};
};
+ systemd.services.hydra-notify =
+ { wantedBy = [ "multi-user.target" ];
+ requires = [ "hydra-init.service" ];
+ after = [ "hydra-init.service" ];
+ restartTriggers = [ hydraConf ];
+ environment = env // {
+ PGPASSFILE = "${baseDir}/pgpass-queue-runner";
+ };
+ serviceConfig =
+ { ExecStart = "@${cfg.package}/bin/hydra-notify hydra-notify";
+ # FIXME: run this under a less privileged user?
+ User = "hydra-queue-runner";
+ Restart = "always";
+ RestartSec = 5;
+ };
+ };
+
# If there is less than a certain amount of free disk space, stop
# the queue/evaluator to prevent builds from failing or aborting.
systemd.services.hydra-check-space =
@@ -416,6 +434,8 @@ in
hydra-users hydra-queue-runner hydra
hydra-users hydra-www hydra
hydra-users root hydra
+ # The postgres user is used to create the pg_trgm extension for the hydra database
+ hydra-users postgres postgres
'';
services.postgresql.authentication = optionalString haveLocalDB
diff --git a/nixos/modules/services/continuous-integration/jenkins/default.nix b/nixos/modules/services/continuous-integration/jenkins/default.nix
index ec6a36413fe7..0ec906713885 100644
--- a/nixos/modules/services/continuous-integration/jenkins/default.nix
+++ b/nixos/modules/services/continuous-integration/jenkins/default.nix
@@ -193,7 +193,7 @@ in {
then ""
else
let pluginCmds = lib.attrsets.mapAttrsToList
- (n: v: "cp ${v} ${cfg.home}/plugins/${n}.hpi")
+ (n: v: "cp ${v} ${cfg.home}/plugins/${n}.jpi")
cfg.plugins;
in ''
rm -r ${cfg.home}/plugins || true
diff --git a/nixos/modules/services/databases/cassandra.nix b/nixos/modules/services/databases/cassandra.nix
index a9da3a3c5620..90c094f68b61 100644
--- a/nixos/modules/services/databases/cassandra.nix
+++ b/nixos/modules/services/databases/cassandra.nix
@@ -259,7 +259,7 @@ in {
'';
};
incrementalRepairOptions = mkOption {
- type = types.listOf types.string;
+ type = types.listOf types.str;
default = [];
example = [ "--partitioner-range" ];
description = ''
@@ -267,7 +267,7 @@ in {
'';
};
maxHeapSize = mkOption {
- type = types.nullOr types.string;
+ type = types.nullOr types.str;
default = null;
example = "4G";
description = ''
@@ -287,7 +287,7 @@ in {
'';
};
heapNewSize = mkOption {
- type = types.nullOr types.string;
+ type = types.nullOr types.str;
default = null;
example = "800M";
description = ''
@@ -352,11 +352,11 @@ in {
type = types.listOf (types.submodule {
options = {
username = mkOption {
- type = types.string;
+ type = types.str;
description = "Username for JMX";
};
password = mkOption {
- type = types.string;
+ type = types.str;
description = "Password for JMX";
};
};
@@ -397,14 +397,14 @@ in {
}
];
users = mkIf (cfg.user == defaultUser) {
- extraUsers."${defaultUser}" =
+ extraUsers.${defaultUser} =
{ group = cfg.group;
home = cfg.homeDir;
createHome = true;
uid = config.ids.uids.cassandra;
description = "Cassandra service user";
};
- extraGroups."${defaultUser}".gid = config.ids.gids.cassandra;
+ extraGroups.${defaultUser}.gid = config.ids.gids.cassandra;
};
systemd.services.cassandra =
diff --git a/nixos/modules/services/databases/couchdb.nix b/nixos/modules/services/databases/couchdb.nix
index 5ddf8ba4bfbd..53224db1d896 100644
--- a/nixos/modules/services/databases/couchdb.nix
+++ b/nixos/modules/services/databases/couchdb.nix
@@ -56,7 +56,7 @@ in {
user = mkOption {
- type = types.string;
+ type = types.str;
default = "couchdb";
description = ''
User account under which couchdb runs.
@@ -64,7 +64,7 @@ in {
};
group = mkOption {
- type = types.string;
+ type = types.str;
default = "couchdb";
description = ''
Group account under which couchdb runs.
@@ -106,7 +106,7 @@ in {
};
bindAddress = mkOption {
- type = types.string;
+ type = types.str;
default = "127.0.0.1";
description = ''
Defines the IP address by which CouchDB will be accessible.
@@ -138,7 +138,7 @@ in {
};
configFile = mkOption {
- type = types.string;
+ type = types.path;
description = ''
Configuration file for persisting runtime changes. File
needs to be readable and writable from couchdb user/group.
@@ -160,7 +160,7 @@ in {
systemd.tmpfiles.rules = [
"d '${dirOf cfg.uriFile}' - ${cfg.user} ${cfg.group} - -"
- "d '${dirOf cfg.logFile}' - ${cfg.user} ${cfg.group} - -"
+ "f '${cfg.logFile}' - ${cfg.user} ${cfg.group} - -"
"d '${cfg.databaseDir}' - ${cfg.user} ${cfg.group} - -"
"d '${cfg.viewIndexDir}' - ${cfg.user} ${cfg.group} - -"
];
@@ -169,11 +169,9 @@ in {
description = "CouchDB Server";
wantedBy = [ "multi-user.target" ];
- preStart =
- ''
+ preStart = ''
touch ${cfg.configFile}
- touch -a ${cfg.logFile}
- '';
+ '';
environment = mkIf useVersion2 {
# we are actually specifying 4 configuration files:
diff --git a/nixos/modules/services/databases/foundationdb.nix b/nixos/modules/services/databases/foundationdb.nix
index 3746b875c7f2..8f8d0da7c8d3 100644
--- a/nixos/modules/services/databases/foundationdb.nix
+++ b/nixos/modules/services/databases/foundationdb.nix
@@ -140,7 +140,7 @@ in
};
logSize = mkOption {
- type = types.string;
+ type = types.str;
default = "10MiB";
description = ''
Roll over to a new log file after the current log file
@@ -149,7 +149,7 @@ in
};
maxLogSize = mkOption {
- type = types.string;
+ type = types.str;
default = "100MiB";
description = ''
Delete the oldest log file when the total size of all log
@@ -171,7 +171,7 @@ in
};
memory = mkOption {
- type = types.string;
+ type = types.str;
default = "8GiB";
description = ''
Maximum memory used by the process. The default value is
@@ -193,7 +193,7 @@ in
};
storageMemory = mkOption {
- type = types.string;
+ type = types.str;
default = "1GiB";
description = ''
Maximum memory used for data storage. The default value is
diff --git a/nixos/modules/services/databases/hbase.nix b/nixos/modules/services/databases/hbase.nix
index 589c8cf5ec80..2d1a47bbaa31 100644
--- a/nixos/modules/services/databases/hbase.nix
+++ b/nixos/modules/services/databases/hbase.nix
@@ -53,7 +53,7 @@ in {
user = mkOption {
- type = types.string;
+ type = types.str;
default = "hbase";
description = ''
User account under which HBase runs.
@@ -61,7 +61,7 @@ in {
};
group = mkOption {
- type = types.string;
+ type = types.str;
default = "hbase";
description = ''
Group account under which HBase runs.
diff --git a/nixos/modules/services/databases/influxdb.nix b/nixos/modules/services/databases/influxdb.nix
index 6868050c8446..2f176a038729 100644
--- a/nixos/modules/services/databases/influxdb.nix
+++ b/nixos/modules/services/databases/influxdb.nix
@@ -129,13 +129,13 @@ in
user = mkOption {
default = "influxdb";
description = "User account under which influxdb runs";
- type = types.string;
+ type = types.str;
};
group = mkOption {
default = "influxdb";
description = "Group under which influxdb runs";
- type = types.string;
+ type = types.str;
};
dataDir = mkOption {
diff --git a/nixos/modules/services/databases/memcached.nix b/nixos/modules/services/databases/memcached.nix
index 052ff1f308eb..d1dfdb41bf40 100644
--- a/nixos/modules/services/databases/memcached.nix
+++ b/nixos/modules/services/databases/memcached.nix
@@ -67,6 +67,7 @@ in
users.users = optional (cfg.user == "memcached") {
name = "memcached";
description = "Memcached server user";
+ isSystemUser = true;
};
environment.systemPackages = [ memcached ];
@@ -86,7 +87,24 @@ in
in "${memcached}/bin/memcached ${networking} -m ${toString cfg.maxMemory} -c ${toString cfg.maxConnections} ${concatStringsSep " " cfg.extraOptions}";
User = cfg.user;
+
+ # Filesystem access
+ ProtectSystem = "strict";
+ ProtectHome = true;
+ PrivateTmp = true;
+ PrivateDevices = true;
+ ProtectKernelTunables = true;
+ ProtectKernelModules = true;
+ ProtectControlGroups = true;
RuntimeDirectory = "memcached";
+ # Caps
+ CapabilityBoundingSet = "";
+ NoNewPrivileges = true;
+ # Misc.
+ LockPersonality = true;
+ RestrictRealtime = true;
+ PrivateMounts = true;
+ MemoryDenyWriteExecute = true;
};
};
};
diff --git a/nixos/modules/services/databases/mongodb.nix b/nixos/modules/services/databases/mongodb.nix
index c458a1d648a0..12879afed477 100644
--- a/nixos/modules/services/databases/mongodb.nix
+++ b/nixos/modules/services/databases/mongodb.nix
@@ -65,9 +65,9 @@ in
default = false;
description = "Enable client authentication. Creates a default superuser with username root!";
};
-
+
initialRootPassword = mkOption {
- type = types.nullOr types.string;
+ type = types.nullOr types.str;
default = null;
description = "Password for the root user if auth is enabled.";
};
diff --git a/nixos/modules/services/databases/mysql.nix b/nixos/modules/services/databases/mysql.nix
index df74cfc9a26b..39192d059485 100644
--- a/nixos/modules/services/databases/mysql.nix
+++ b/nixos/modules/services/databases/mysql.nix
@@ -272,8 +272,13 @@ in
port = ${toString cfg.port}
datadir = ${cfg.dataDir}
${optionalString (cfg.bind != null) "bind-address = ${cfg.bind}" }
- ${optionalString (cfg.replication.role == "master" || cfg.replication.role == "slave") "log-bin=mysql-bin"}
- ${optionalString (cfg.replication.role == "master" || cfg.replication.role == "slave") "server-id = ${toString cfg.replication.serverId}"}
+ ${optionalString (cfg.replication.role == "master" || cfg.replication.role == "slave")
+ ''
+ log-bin=mysql-bin-${toString cfg.replication.serverId}
+ log-bin-index=mysql-bin-${toString cfg.replication.serverId}.index
+ relay-log=mysql-relay-bin
+ server-id = ${toString cfg.replication.serverId}
+ ''}
${optionalString (cfg.ensureUsers != [])
''
plugin-load-add = auth_socket.so
@@ -381,6 +386,7 @@ in
( echo "stop slave;"
echo "change master to master_host='${cfg.replication.masterHost}', master_user='${cfg.replication.masterUser}', master_password='${cfg.replication.masterPassword}';"
+ echo "set global slave_exec_mode='IDEMPOTENT';"
echo "start slave;"
) | ${mysql}/bin/mysql -u root -N
''}
diff --git a/nixos/modules/services/databases/openldap.nix b/nixos/modules/services/databases/openldap.nix
index d8e2c715afb9..5bf57a1bf9cb 100644
--- a/nixos/modules/services/databases/openldap.nix
+++ b/nixos/modules/services/databases/openldap.nix
@@ -47,26 +47,26 @@ in
};
user = mkOption {
- type = types.string;
+ type = types.str;
default = "openldap";
description = "User account under which slapd runs.";
};
group = mkOption {
- type = types.string;
+ type = types.str;
default = "openldap";
description = "Group account under which slapd runs.";
};
urlList = mkOption {
- type = types.listOf types.string;
+ type = types.listOf types.str;
default = [ "ldap:///" ];
description = "URL list slapd should listen on.";
example = [ "ldaps:///" ];
};
dataDir = mkOption {
- type = types.string;
+ type = types.path;
default = "/var/db/openldap";
description = "The database directory.";
};
diff --git a/nixos/modules/services/databases/opentsdb.nix b/nixos/modules/services/databases/opentsdb.nix
index b26fa9093ef4..c4bd71f3d60e 100644
--- a/nixos/modules/services/databases/opentsdb.nix
+++ b/nixos/modules/services/databases/opentsdb.nix
@@ -34,7 +34,7 @@ in {
};
user = mkOption {
- type = types.string;
+ type = types.str;
default = "opentsdb";
description = ''
User account under which OpenTSDB runs.
@@ -42,7 +42,7 @@ in {
};
group = mkOption {
- type = types.string;
+ type = types.str;
default = "opentsdb";
description = ''
Group account under which OpenTSDB runs.
diff --git a/nixos/modules/services/databases/pgmanage.nix b/nixos/modules/services/databases/pgmanage.nix
index 1050c2dd481a..0f8634dab319 100644
--- a/nixos/modules/services/databases/pgmanage.nix
+++ b/nixos/modules/services/databases/pgmanage.nix
@@ -59,8 +59,8 @@ in {
type = types.attrsOf types.str;
default = {};
example = {
- "nuc-server" = "hostaddr=192.168.0.100 port=5432 dbname=postgres";
- "mini-server" = "hostaddr=127.0.0.1 port=5432 dbname=postgres sslmode=require";
+ nuc-server = "hostaddr=192.168.0.100 port=5432 dbname=postgres";
+ mini-server = "hostaddr=127.0.0.1 port=5432 dbname=postgres sslmode=require";
};
description = ''
pgmanage requires at least one PostgreSQL server be defined.
@@ -192,13 +192,13 @@ in {
};
};
users = {
- users."${pgmanage}" = {
+ users.${pgmanage} = {
name = pgmanage;
group = pgmanage;
home = cfg.sqlRoot;
createHome = true;
};
- groups."${pgmanage}" = {
+ groups.${pgmanage} = {
name = pgmanage;
};
};
diff --git a/nixos/modules/services/databases/postgresql.nix b/nixos/modules/services/databases/postgresql.nix
index 37d44e30fbeb..3bedfe96a180 100644
--- a/nixos/modules/services/databases/postgresql.nix
+++ b/nixos/modules/services/databases/postgresql.nix
@@ -81,6 +81,10 @@ in
default = "";
description = ''
Defines the mapping from system users to database users.
+
+ The general form is:
+
+ map-name system-username database-username
'';
};
@@ -222,9 +226,10 @@ in
# Note: when changing the default, make it conditional on
# ‘system.stateVersion’ to maintain compatibility with existing
# systems!
- mkDefault (if versionAtLeast config.system.stateVersion "17.09" then pkgs.postgresql_9_6
+ mkDefault (if versionAtLeast config.system.stateVersion "20.03" then pkgs.postgresql_11
+ else if versionAtLeast config.system.stateVersion "17.09" then pkgs.postgresql_9_6
else if versionAtLeast config.system.stateVersion "16.03" then pkgs.postgresql_9_5
- else pkgs.postgresql_9_4);
+ else throw "postgresql_9_4 was removed, please upgrade your postgresql version.");
services.postgresql.dataDir =
mkDefault (if versionAtLeast config.system.stateVersion "17.09" then "/var/lib/postgresql/${config.services.postgresql.package.psqlSchema}"
@@ -251,6 +256,10 @@ in
environment.systemPackages = [ postgresql ];
+ environment.pathsToLink = [
+ "/share/postgresql"
+ ];
+
systemd.services.postgresql =
{ description = "PostgreSQL Server";
@@ -326,13 +335,13 @@ in
fi
'' + optionalString (cfg.ensureDatabases != []) ''
${concatMapStrings (database: ''
- $PSQL -tAc "SELECT 1 FROM pg_database WHERE datname = '${database}'" | grep -q 1 || $PSQL -tAc "CREATE DATABASE ${database}"
+ $PSQL -tAc "SELECT 1 FROM pg_database WHERE datname = '${database}'" | grep -q 1 || $PSQL -tAc 'CREATE DATABASE "${database}"'
'') cfg.ensureDatabases}
'' + ''
${concatMapStrings (user: ''
$PSQL -tAc "SELECT 1 FROM pg_roles WHERE rolname='${user.name}'" | grep -q 1 || $PSQL -tAc "CREATE USER ${user.name}"
${concatStringsSep "\n" (mapAttrsToList (database: permission: ''
- $PSQL -tAc "GRANT ${permission} ON ${database} TO ${user.name}"
+ $PSQL -tAc 'GRANT ${permission} ON ${database} TO ${user.name}'
'') user.ensurePermissions)}
'') cfg.ensureUsers}
'';
diff --git a/nixos/modules/services/databases/redis.nix b/nixos/modules/services/databases/redis.nix
index c04cc1283b2e..5861323e5ea0 100644
--- a/nixos/modules/services/databases/redis.nix
+++ b/nixos/modules/services/databases/redis.nix
@@ -8,17 +8,19 @@ let
condOption = name: value: if value != null then "${name} ${toString value}" else "";
redisConfig = pkgs.writeText "redis.conf" ''
- pidfile ${cfg.pidFile}
port ${toString cfg.port}
${condOption "bind" cfg.bind}
${condOption "unixsocket" cfg.unixSocket}
+ daemonize yes
+ supervised systemd
loglevel ${cfg.logLevel}
logfile ${cfg.logfile}
syslog-enabled ${redisBool cfg.syslog}
+ pidfile /run/redis/redis.pid
databases ${toString cfg.databases}
${concatMapStrings (d: "save ${toString (builtins.elemAt d 0)} ${toString (builtins.elemAt d 1)}\n") cfg.save}
- dbfilename ${cfg.dbFilename}
- dir ${toString cfg.dbpath}
+ dbfilename dump.rdb
+ dir /var/lib/redis
${if cfg.slaveOf != null then "slaveof ${cfg.slaveOf.ip} ${toString cfg.slaveOf.port}" else ""}
${condOption "masterauth" cfg.masterAuth}
${condOption "requirepass" cfg.requirePass}
@@ -40,7 +42,12 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = "Whether to enable the Redis server.";
+ description = ''
+ Whether to enable the Redis server. Note that the NixOS module for
+ Redis disables kernel support for Transparent Huge Pages (THP),
+ because this features causes major performance problems for Redis,
+ e.g. (https://redis.io/topics/latency).
+ '';
};
package = mkOption {
@@ -50,18 +57,6 @@ in
description = "Which Redis derivation to use.";
};
- user = mkOption {
- type = types.str;
- default = "redis";
- description = "User account under which Redis runs.";
- };
-
- pidFile = mkOption {
- type = types.path;
- default = "/var/lib/redis/redis.pid";
- description = "";
- };
-
port = mkOption {
type = types.int;
default = 6379;
@@ -95,7 +90,7 @@ in
type = with types; nullOr path;
default = null;
description = "The path to the socket to bind to.";
- example = "/run/redis.sock";
+ example = "/run/redis/redis.sock";
};
logLevel = mkOption {
@@ -131,18 +126,6 @@ in
example = [ [900 1] [300 10] [60 10000] ];
};
- dbFilename = mkOption {
- type = types.str;
- default = "dump.rdb";
- description = "The filename where to dump the DB.";
- };
-
- dbpath = mkOption {
- type = types.path;
- default = "/var/lib/redis";
- description = "The DB will be written inside this directory, with the filename specified using the 'dbFilename' configuration.";
- };
-
slaveOf = mkOption {
default = null; # { ip, port }
description = "An attribute set with two attributes: ip and port to which this redis instance acts as a slave.";
@@ -170,12 +153,6 @@ in
description = "By default data is only periodically persisted to disk, enable this option to use an append-only file for improved persistence.";
};
- appendOnlyFilename = mkOption {
- type = types.str;
- default = "appendonly.aof";
- description = "Filename for the append-only file (stored inside of dbpath)";
- };
-
appendFsync = mkOption {
type = types.str;
default = "everysec"; # no, always, everysec
@@ -209,35 +186,18 @@ in
config = mkIf config.services.redis.enable {
- boot.kernel.sysctl = mkIf cfg.vmOverCommit {
- "vm.overcommit_memory" = "1";
- };
+ boot.kernel.sysctl = {
+ "vm.nr_hugepages" = "0";
+ } // mkIf cfg.vmOverCommit { "vm.overcommit_memory" = "1"; };
networking.firewall = mkIf cfg.openFirewall {
allowedTCPPorts = [ cfg.port ];
};
- users.users.redis =
- { name = cfg.user;
- description = "Redis database user";
- };
+ users.users.redis.description = "Redis database user";
environment.systemPackages = [ cfg.package ];
- systemd.services.redis_init =
- { description = "Redis Server Initialisation";
-
- wantedBy = [ "redis.service" ];
- before = [ "redis.service" ];
-
- serviceConfig.Type = "oneshot";
-
- script = ''
- install -d -m0700 -o ${cfg.user} ${cfg.dbpath}
- chown -R ${cfg.user} ${cfg.dbpath}
- '';
- };
-
systemd.services.redis =
{ description = "Redis Server";
@@ -246,7 +206,10 @@ in
serviceConfig = {
ExecStart = "${cfg.package}/bin/redis-server ${redisConfig}";
- User = cfg.user;
+ RuntimeDirectory = "redis";
+ StateDirectory = "redis";
+ Type = "notify";
+ User = "redis";
};
};
diff --git a/nixos/modules/services/databases/riak.nix b/nixos/modules/services/databases/riak.nix
index ac086cf55996..885215209bdf 100644
--- a/nixos/modules/services/databases/riak.nix
+++ b/nixos/modules/services/databases/riak.nix
@@ -29,7 +29,7 @@ in
};
nodeName = mkOption {
- type = types.string;
+ type = types.str;
default = "riak@127.0.0.1";
description = ''
Name of the Erlang node.
@@ -37,7 +37,7 @@ in
};
distributedCookie = mkOption {
- type = types.string;
+ type = types.str;
default = "riak";
description = ''
Cookie for distributed node communication. All nodes in the
diff --git a/nixos/modules/services/desktops/blueman.nix b/nixos/modules/services/desktops/blueman.nix
new file mode 100644
index 000000000000..18ad610247ed
--- /dev/null
+++ b/nixos/modules/services/desktops/blueman.nix
@@ -0,0 +1,25 @@
+# blueman service
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+ cfg = config.services.blueman;
+in {
+ ###### interface
+ options = {
+ services.blueman = {
+ enable = mkEnableOption "blueman";
+ };
+ };
+
+ ###### implementation
+ config = mkIf cfg.enable {
+
+ environment.systemPackages = [ pkgs.blueman ];
+
+ services.dbus.packages = [ pkgs.blueman ];
+
+ systemd.packages = [ pkgs.blueman ];
+ };
+}
diff --git a/nixos/modules/services/desktops/flatpak.nix b/nixos/modules/services/desktops/flatpak.nix
index 1492d855aa03..7fb0024f37dc 100644
--- a/nixos/modules/services/desktops/flatpak.nix
+++ b/nixos/modules/services/desktops/flatpak.nix
@@ -38,5 +38,16 @@ in {
"$HOME/.local/share/flatpak/exports"
"/var/lib/flatpak/exports"
];
+
+ # It has been possible since https://github.com/flatpak/flatpak/releases/tag/1.3.2
+ # to build a SELinux policy module.
+
+ users.users.flatpak = {
+ description = "Flatpak system helper";
+ group = "flatpak";
+ isSystemUser = true;
+ };
+
+ users.groups.flatpak = { };
};
}
diff --git a/nixos/modules/services/desktops/geoclue2.nix b/nixos/modules/services/desktops/geoclue2.nix
index 040fe157d52d..6007dddf50c0 100644
--- a/nixos/modules/services/desktops/geoclue2.nix
+++ b/nixos/modules/services/desktops/geoclue2.nix
@@ -202,14 +202,14 @@ in
];
# restart geoclue service when the configuration changes
- systemd.services."geoclue".restartTriggers = [
+ systemd.services.geoclue.restartTriggers = [
config.environment.etc."geoclue/geoclue.conf".source
];
# this needs to run as a user service, since it's associated with the
# user who is making the requests
systemd.user.services = mkIf cfg.enableDemoAgent {
- "geoclue-agent" = {
+ geoclue-agent = {
description = "Geoclue agent";
script = "${package}/libexec/geoclue-2.0/demos/agent";
# this should really be `partOf = [ "geoclue.service" ]`, but
@@ -219,12 +219,12 @@ in
};
};
- services.geoclue2.appConfig."epiphany" = {
+ services.geoclue2.appConfig.epiphany = {
isAllowed = true;
isSystem = false;
};
- services.geoclue2.appConfig."firefox" = {
+ services.geoclue2.appConfig.firefox = {
isAllowed = true;
isSystem = false;
};
diff --git a/nixos/modules/services/desktops/gnome3/chrome-gnome-shell.nix b/nixos/modules/services/desktops/gnome3/chrome-gnome-shell.nix
index 2740a22c7ca0..3d2b3ed85e3a 100644
--- a/nixos/modules/services/desktops/gnome3/chrome-gnome-shell.nix
+++ b/nixos/modules/services/desktops/gnome3/chrome-gnome-shell.nix
@@ -23,5 +23,7 @@ with lib;
environment.systemPackages = [ pkgs.chrome-gnome-shell ];
services.dbus.packages = [ pkgs.chrome-gnome-shell ];
+
+ nixpkgs.config.firefox.enableGnomeExtensions = true;
};
}
diff --git a/nixos/modules/services/desktops/gnome3/glib-networking.nix b/nixos/modules/services/desktops/gnome3/glib-networking.nix
index 186668d7d385..fcd58509d6fc 100644
--- a/nixos/modules/services/desktops/gnome3/glib-networking.nix
+++ b/nixos/modules/services/desktops/gnome3/glib-networking.nix
@@ -22,11 +22,11 @@ with lib;
config = mkIf config.services.gnome3.glib-networking.enable {
- services.dbus.packages = [ pkgs.gnome3.glib-networking ];
+ services.dbus.packages = [ pkgs.glib-networking ];
- systemd.packages = [ pkgs.gnome3.glib-networking ];
+ systemd.packages = [ pkgs.glib-networking ];
- environment.variables.GIO_EXTRA_MODULES = [ "${pkgs.gnome3.glib-networking.out}/lib/gio/modules" ];
+ environment.variables.GIO_EXTRA_MODULES = [ "${pkgs.glib-networking.out}/lib/gio/modules" ];
};
diff --git a/nixos/modules/services/desktops/gnome3/gnome-initial-setup.nix b/nixos/modules/services/desktops/gnome3/gnome-initial-setup.nix
new file mode 100644
index 000000000000..d715d52c2d06
--- /dev/null
+++ b/nixos/modules/services/desktops/gnome3/gnome-initial-setup.nix
@@ -0,0 +1,86 @@
+# GNOME Initial Setup.
+
+{ config, pkgs, lib, ... }:
+
+with lib;
+
+let
+
+ # GNOME initial setup's run is conditioned on whether
+ # the gnome-initial-setup-done file exists in XDG_CONFIG_HOME
+ # Because of this, every existing user will have initial setup
+ # running because they never ran it before.
+ #
+ # To prevent this we create the file if the users stateVersion
+ # is older than 20.03 (the release we added this module).
+
+ script = pkgs.writeScript "create-gis-stamp-files" ''
+ #!${pkgs.runtimeShell}
+ setup_done=$HOME/.config/gnome-initial-setup-done
+
+ echo "Creating g-i-s stamp file $setup_done ..."
+ cat - > $setup_done <<- EOF
+ yes
+ EOF
+ '';
+
+ createGisStampFilesAutostart = pkgs.writeTextFile rec {
+ name = "create-g-i-s-stamp-files";
+ destination = "/etc/xdg/autostart/${name}.desktop";
+ text = ''
+ [Desktop Entry]
+ Type=Application
+ Name=Create GNOME Initial Setup stamp files
+ Exec=${script}
+ StartupNotify=false
+ NoDisplay=true
+ OnlyShowIn=GNOME;
+ AutostartCondition=unless-exists gnome-initial-setup-done
+ X-GNOME-Autostart-Phase=EarlyInitialization
+ '';
+ };
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.gnome3.gnome-initial-setup = {
+
+ enable = mkEnableOption "GNOME Initial Setup, a Simple, easy, and safe way to prepare a new system";
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.services.gnome3.gnome-initial-setup.enable {
+
+ environment.systemPackages = [
+ pkgs.gnome3.gnome-initial-setup
+ ]
+ ++ optional (versionOlder config.system.stateVersion "20.03") createGisStampFilesAutostart
+ ;
+
+ systemd.packages = [
+ pkgs.gnome3.gnome-initial-setup
+ ];
+
+ systemd.user.targets."gnome-session".wants = [
+ "gnome-initial-setup-copy-worker.service"
+ "gnome-initial-setup-first-login.service"
+ "gnome-welcome-tour.service"
+ ];
+
+ systemd.user.targets."gnome-session@gnome-initial-setup".wants = [
+ "gnome-initial-setup.service"
+ ];
+
+ };
+
+}
diff --git a/nixos/modules/services/desktops/gnome3/gnome-online-accounts.nix b/nixos/modules/services/desktops/gnome3/gnome-online-accounts.nix
index 4286251357f7..748a025414a7 100644
--- a/nixos/modules/services/desktops/gnome3/gnome-online-accounts.nix
+++ b/nixos/modules/services/desktops/gnome3/gnome-online-accounts.nix
@@ -30,9 +30,9 @@ with lib;
config = mkIf config.services.gnome3.gnome-online-accounts.enable {
- environment.systemPackages = [ pkgs.gnome3.gnome-online-accounts ];
+ environment.systemPackages = [ pkgs.gnome-online-accounts ];
- services.dbus.packages = [ pkgs.gnome3.gnome-online-accounts ];
+ services.dbus.packages = [ pkgs.gnome-online-accounts ];
};
diff --git a/nixos/modules/services/desktops/gnome3/gnome-settings-daemon.nix b/nixos/modules/services/desktops/gnome3/gnome-settings-daemon.nix
index 7f7adcf26acf..2f83fd653bde 100644
--- a/nixos/modules/services/desktops/gnome3/gnome-settings-daemon.nix
+++ b/nixos/modules/services/desktops/gnome3/gnome-settings-daemon.nix
@@ -12,6 +12,12 @@ in
{
+ imports = [
+ (mkRemovedOptionModule
+ ["services" "gnome3" "gnome-settings-daemon" "package"]
+ "")
+ ];
+
###### interface
options = {
@@ -20,13 +26,6 @@ in
enable = mkEnableOption "GNOME Settings Daemon";
- # There are many forks of gnome-settings-daemon
- package = mkOption {
- type = types.package;
- default = pkgs.gnome3.gnome-settings-daemon;
- description = "Which gnome-settings-daemon package to use.";
- };
-
};
};
@@ -36,9 +35,39 @@ in
config = mkIf cfg.enable {
- environment.systemPackages = [ cfg.package ];
+ environment.systemPackages = [
+ pkgs.gnome3.gnome-settings-daemon
+ ];
- services.udev.packages = [ cfg.package ];
+ services.udev.packages = [
+ pkgs.gnome3.gnome-settings-daemon
+ ];
+
+ systemd.packages = [
+ pkgs.gnome3.gnome-settings-daemon
+ ];
+
+ systemd.user.targets."gnome-session-initialized".wants = [
+ "gsd-color.target"
+ "gsd-datetime.target"
+ "gsd-keyboard.target"
+ "gsd-media-keys.target"
+ "gsd-print-notifications.target"
+ "gsd-rfkill.target"
+ "gsd-screensaver-proxy.target"
+ "gsd-sharing.target"
+ "gsd-smartcard.target"
+ "gsd-sound.target"
+ "gsd-wacom.target"
+ "gsd-wwan.target"
+ "gsd-a11y-settings.target"
+ "gsd-housekeeping.target"
+ "gsd-power.target"
+ ];
+
+ systemd.user.targets."gnome-session-x11-services".wants = [
+ "gsd-xsettings.target"
+ ];
};
diff --git a/nixos/modules/services/desktops/gnome3/gnome-terminal-server.nix b/nixos/modules/services/desktops/gnome3/gnome-terminal-server.nix
deleted file mode 100644
index fd14efee5f2e..000000000000
--- a/nixos/modules/services/desktops/gnome3/gnome-terminal-server.nix
+++ /dev/null
@@ -1,41 +0,0 @@
-# GNOME Documents daemon.
-
-{ config, pkgs, lib, ... }:
-
-with lib;
-
-{
-
- ###### interface
-
- options = {
-
- services.gnome3.gnome-terminal-server = {
-
- enable = mkOption {
- type = types.bool;
- default = false;
- description = ''
- Whether to enable GNOME Terminal server service,
- needed for gnome-terminal.
- '';
- };
-
- };
-
- };
-
-
- ###### implementation
-
- config = mkIf config.services.gnome3.gnome-terminal-server.enable {
-
- environment.systemPackages = [ pkgs.gnome3.gnome-terminal ];
-
- services.dbus.packages = [ pkgs.gnome3.gnome-terminal ];
-
- systemd.packages = [ pkgs.gnome3.gnome-terminal ];
-
- };
-
-}
diff --git a/nixos/modules/services/desktops/gnome3/gnome-user-share.nix b/nixos/modules/services/desktops/gnome3/gnome-user-share.nix
index 1f6ce2ae968e..f83962877700 100644
--- a/nixos/modules/services/desktops/gnome3/gnome-user-share.nix
+++ b/nixos/modules/services/desktops/gnome3/gnome-user-share.nix
@@ -12,14 +12,7 @@ with lib;
services.gnome3.gnome-user-share = {
- enable = mkOption {
- type = types.bool;
- default = false;
- description = ''
- Whether to enable GNOME User Share, a service that exports the
- contents of the Public folder in your home directory on the local network.
- '';
- };
+ enable = mkEnableOption "GNOME User Share, a user-level file sharing service for GNOME";
};
@@ -30,12 +23,13 @@ with lib;
config = mkIf config.services.gnome3.gnome-user-share.enable {
- environment.systemPackages = [ pkgs.gnome3.gnome-user-share ];
+ environment.systemPackages = [
+ pkgs.gnome3.gnome-user-share
+ ];
- services.xserver.displayManager.sessionCommands = with pkgs.gnome3; ''
- # Don't let gnome-control-center depend upon gnome-user-share
- export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${gnome-user-share}/share/gsettings-schemas/${gnome-user-share.name}
- '';
+ systemd.packages = [
+ pkgs.gnome3.gnome-user-share
+ ];
};
diff --git a/nixos/modules/services/desktops/gnome3/gvfs.nix b/nixos/modules/services/desktops/gnome3/gvfs.nix
deleted file mode 100644
index 4e99d191f18c..000000000000
--- a/nixos/modules/services/desktops/gnome3/gvfs.nix
+++ /dev/null
@@ -1,43 +0,0 @@
-# gvfs backends
-
-{ config, lib, pkgs, ... }:
-
-with lib;
-
-{
-
- ###### interface
-
- options = {
-
- services.gnome3.gvfs = {
-
- enable = mkOption {
- type = types.bool;
- default = false;
- description = ''
- Whether to enable gvfs backends, userspace virtual filesystem used
- by GNOME components via D-Bus.
- '';
- };
-
- };
-
- };
-
-
- ###### implementation
-
- config = mkIf config.services.gnome3.gvfs.enable {
-
- environment.systemPackages = [ pkgs.gnome3.gvfs ];
-
- services.dbus.packages = [ pkgs.gnome3.gvfs ];
-
- systemd.packages = [ pkgs.gnome3.gvfs ];
-
- services.udev.packages = [ pkgs.libmtp.bin ];
-
- };
-
-}
diff --git a/nixos/modules/services/desktops/gnome3/seahorse.nix b/nixos/modules/services/desktops/gnome3/seahorse.nix
deleted file mode 100644
index 9631157934f9..000000000000
--- a/nixos/modules/services/desktops/gnome3/seahorse.nix
+++ /dev/null
@@ -1,38 +0,0 @@
-# Seahorse daemon.
-
-{ config, pkgs, lib, ... }:
-
-with lib;
-
-{
-
- ###### interface
-
- options = {
-
- services.gnome3.seahorse = {
-
- enable = mkOption {
- type = types.bool;
- default = false;
- description = ''
- Whether to enable Seahorse search provider for the GNOME Shell activity search.
- '';
- };
-
- };
-
- };
-
-
- ###### implementation
-
- config = mkIf config.services.gnome3.seahorse.enable {
-
- environment.systemPackages = [ pkgs.gnome3.seahorse pkgs.gnome3.dconf ];
-
- services.dbus.packages = [ pkgs.gnome3.seahorse ];
-
- };
-
-}
diff --git a/nixos/modules/services/desktops/gnome3/tracker-miners.nix b/nixos/modules/services/desktops/gnome3/tracker-miners.nix
index 20154fc2fed3..b390d8368c65 100644
--- a/nixos/modules/services/desktops/gnome3/tracker-miners.nix
+++ b/nixos/modules/services/desktops/gnome3/tracker-miners.nix
@@ -30,11 +30,11 @@ with lib;
config = mkIf config.services.gnome3.tracker-miners.enable {
- environment.systemPackages = [ pkgs.gnome3.tracker-miners ];
+ environment.systemPackages = [ pkgs.tracker-miners ];
- services.dbus.packages = [ pkgs.gnome3.tracker-miners ];
+ services.dbus.packages = [ pkgs.tracker-miners ];
- systemd.packages = [ pkgs.gnome3.tracker-miners ];
+ systemd.packages = [ pkgs.tracker-miners ];
};
diff --git a/nixos/modules/services/desktops/gnome3/tracker.nix b/nixos/modules/services/desktops/gnome3/tracker.nix
index c061f7890499..2e8292742264 100644
--- a/nixos/modules/services/desktops/gnome3/tracker.nix
+++ b/nixos/modules/services/desktops/gnome3/tracker.nix
@@ -30,11 +30,11 @@ with lib;
config = mkIf config.services.gnome3.tracker.enable {
- environment.systemPackages = [ pkgs.gnome3.tracker ];
+ environment.systemPackages = [ pkgs.tracker ];
- services.dbus.packages = [ pkgs.gnome3.tracker ];
+ services.dbus.packages = [ pkgs.tracker ];
- systemd.packages = [ pkgs.gnome3.tracker ];
+ systemd.packages = [ pkgs.tracker ];
};
diff --git a/nixos/modules/services/desktops/gvfs.nix b/nixos/modules/services/desktops/gvfs.nix
new file mode 100644
index 000000000000..1d002eac41de
--- /dev/null
+++ b/nixos/modules/services/desktops/gvfs.nix
@@ -0,0 +1,59 @@
+# GVfs
+
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+
+ cfg = config.services.gvfs;
+
+in
+
+{
+
+ # Added 2019-08-19
+ imports = [
+ (mkRenamedOptionModule
+ [ "services" "gnome3" "gvfs" "enable" ]
+ [ "services" "gvfs" "enable" ])
+ ];
+
+ ###### interface
+
+ options = {
+
+ services.gvfs = {
+
+ enable = mkEnableOption "GVfs, a userspace virtual filesystem";
+
+ # gvfs can be built with multiple configurations
+ package = mkOption {
+ type = types.package;
+ default = pkgs.gnome3.gvfs;
+ description = "Which GVfs package to use.";
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ environment.systemPackages = [ cfg.package ];
+
+ services.dbus.packages = [ cfg.package ];
+
+ systemd.packages = [ cfg.package ];
+
+ services.udev.packages = [ pkgs.libmtp.bin ];
+
+ # Needed for unwrapped applications
+ environment.variables.GIO_EXTRA_MODULES = [ "${cfg.package}/lib/gio/modules" ];
+
+ };
+
+}
diff --git a/nixos/modules/services/desktops/profile-sync-daemon.nix b/nixos/modules/services/desktops/profile-sync-daemon.nix
index e4e47cfbd438..a8ac22ac1276 100644
--- a/nixos/modules/services/desktops/profile-sync-daemon.nix
+++ b/nixos/modules/services/desktops/profile-sync-daemon.nix
@@ -34,7 +34,7 @@ in {
psd = {
enable = true;
description = "Profile Sync daemon";
- wants = [ "psd-resync.service" "local-fs.target" ];
+ wants = [ "psd-resync.service" ];
wantedBy = [ "default.target" ];
path = with pkgs; [ rsync kmod gawk nettools utillinux profile-sync-daemon ];
unitConfig = {
diff --git a/nixos/modules/services/desktops/system-config-printer.nix b/nixos/modules/services/desktops/system-config-printer.nix
new file mode 100644
index 000000000000..09c68c587b43
--- /dev/null
+++ b/nixos/modules/services/desktops/system-config-printer.nix
@@ -0,0 +1,41 @@
+{ config, pkgs, lib, ... }:
+
+with lib;
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.system-config-printer = {
+
+ enable = mkEnableOption "system-config-printer, a service for CUPS administration used by printing interfaces";
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.services.system-config-printer.enable {
+
+ services.dbus.packages = [
+ pkgs.system-config-printer
+ ];
+
+ systemd.packages = [
+ pkgs.system-config-printer
+ ];
+
+ services.udev.packages = [
+ pkgs.system-config-printer
+ ];
+
+ # for $out/bin/install-printer-driver
+ services.packagekit.enable = true;
+
+ };
+
+}
diff --git a/nixos/modules/services/development/bloop.nix b/nixos/modules/services/development/bloop.nix
index 56904b7c40e6..226718a9e80a 100644
--- a/nixos/modules/services/development/bloop.nix
+++ b/nixos/modules/services/development/bloop.nix
@@ -9,6 +9,20 @@ let
in {
options.services.bloop = {
+ extraOptions = mkOption {
+ type = types.listOf types.str;
+ default = [ ];
+ example = [
+ "-J-Xmx2G"
+ "-J-XX:MaxInlineLevel=20"
+ "-J-XX:+UseParallelGC"
+ ];
+ description = ''
+ Specifies additional command line argument to pass to bloop
+ java process.
+ '';
+ };
+
install = mkOption {
type = types.bool;
default = false;
@@ -25,10 +39,13 @@ in {
systemd.user.services.bloop = {
description = "Bloop Scala build server";
+ environment = {
+ PATH = mkForce "${makeBinPath [ config.programs.java.package ]}";
+ };
serviceConfig = {
- Type = "simple";
- ExecStart = ''${pkgs.bloop}/bin/blp-server'';
- Restart = "always";
+ Type = "simple";
+ ExecStart = ''${pkgs.bloop}/bin/bloop server'';
+ Restart = "always";
};
};
diff --git a/nixos/modules/services/editors/emacs.nix b/nixos/modules/services/editors/emacs.nix
index ba7ec967919e..d791b387665f 100644
--- a/nixos/modules/services/editors/emacs.nix
+++ b/nixos/modules/services/editors/emacs.nix
@@ -95,13 +95,7 @@ in {
environment.systemPackages = [ cfg.package editorScript desktopApplicationFile ];
- environment.variables = {
- # This is required so that GTK applications launched from Emacs
- # get properly themed:
- GTK_DATA_PREFIX = "${config.system.path}";
- } // (if cfg.defaultEditor then {
- EDITOR = mkOverride 900 "${editorScript}/bin/emacseditor";
- } else {});
+ environment.variables.EDITOR = mkIf cfg.defaultEditor (mkOverride 900 "${editorScript}/bin/emacseditor");
};
meta.doc = ./emacs.xml;
diff --git a/nixos/modules/services/editors/emacs.xml b/nixos/modules/services/editors/emacs.xml
index a3041ae22e78..03483f69fa2f 100644
--- a/nixos/modules/services/editors/emacs.xml
+++ b/nixos/modules/services/editors/emacs.xml
@@ -9,6 +9,7 @@
Damien Cassou @DamienCassou
Thomas Tuegel @ttuegel
Rodney Lorrimar @rvl
+ Adam Hoese @adisbladis
-->
Emacs is an
@@ -58,7 +59,7 @@
The latest stable version of Emacs 25 using the
GTK+ 2
+ xlink:href="http://www.gtk.org">GTK 2
widget toolkit.
@@ -130,15 +131,6 @@
Emacs packages through nixpkgs.
-
-
- This documentation describes the new Emacs packages framework in NixOS
- 16.03 (emacsPackagesNg) which should not be confused
- with the previous and deprecated framework
- (emacs24Packages).
-
-
-
The first step to declare the list of packages you want in your Emacs
installation is to create a dedicated derivation. This can be done in a
@@ -164,7 +156,7 @@ $ ./result/bin/emacs
let
myEmacs = pkgs.emacs;
- emacsWithPackages = (pkgs.emacsPackagesNgGen myEmacs).emacsWithPackages;
+ emacsWithPackages = (pkgs.emacsPackagesGen myEmacs).emacsWithPackages;
in
emacsWithPackages (epkgs: (with epkgs.melpaStablePackages; [
magit # ; Integrate git <C-x g>
@@ -262,10 +254,10 @@ in
Querying Emacs packages" -qaP -A emacsPackagesNg.elpaPackages
-nix-env -f "" -qaP -A emacsPackagesNg.melpaPackages
-nix-env -f "" -qaP -A emacsPackagesNg.melpaStablePackages
-nix-env -f "" -qaP -A emacsPackagesNg.orgPackages
+nix-env -f "" -qaP -A emacsPackages.elpaPackages
+nix-env -f "" -qaP -A emacsPackages.melpaPackages
+nix-env -f "" -qaP -A emacsPackages.melpaStablePackages
+nix-env -f "" -qaP -A emacsPackages.orgPackages
]]>
@@ -329,7 +321,7 @@ https://nixos.org/nixpkgs/manual/#sec-modify-via-packageOverrides
If you want, you can tweak the Emacs package itself from your
emacs.nix. For example, if you want to have a
- GTK+3-based Emacs instead of the default GTK+2-based binary and remove the
+ GTK 3-based Emacs instead of the default GTK 2-based binary and remove the
automatically generated emacs.desktop (useful is you
only use emacsclient), you can change your file
emacs.nix in this way:
@@ -357,7 +349,7 @@ in [...]
After building this file as shown in , you
- will get an GTK3-based Emacs binary pre-loaded with your favorite packages.
+ will get an GTK 3-based Emacs binary pre-loaded with your favorite packages.
@@ -552,7 +544,7 @@ emacsclient --create-frame --tty # opens a new frame on the current terminal
(NixOS), or run
- nix-env -i pkgs.docbook5
+ nix-env -f '<nixpkgs>' -iA docbook5
(Nix).
diff --git a/nixos/modules/services/games/factorio.nix b/nixos/modules/services/games/factorio.nix
index d04673a6c8b8..f3831156f453 100644
--- a/nixos/modules/services/games/factorio.nix
+++ b/nixos/modules/services/games/factorio.nix
@@ -55,7 +55,7 @@ in
'';
};
saveName = mkOption {
- type = types.string;
+ type = types.str;
default = "default";
description = ''
The name of the savegame that will be used by the server.
@@ -81,7 +81,7 @@ in
'';
};
stateDirName = mkOption {
- type = types.string;
+ type = types.str;
default = "factorio";
description = ''
Name of the directory under /var/lib holding the server's data.
@@ -102,14 +102,14 @@ in
'';
};
game-name = mkOption {
- type = types.nullOr types.string;
+ type = types.nullOr types.str;
default = "Factorio Game";
description = ''
Name of the game as it will appear in the game listing.
'';
};
description = mkOption {
- type = types.nullOr types.string;
+ type = types.nullOr types.str;
default = "";
description = ''
Description of the game that will appear in the listing.
@@ -130,28 +130,28 @@ in
'';
};
username = mkOption {
- type = types.nullOr types.string;
+ type = types.nullOr types.str;
default = null;
description = ''
Your factorio.com login credentials. Required for games with visibility public.
'';
};
password = mkOption {
- type = types.nullOr types.string;
+ type = types.nullOr types.str;
default = null;
description = ''
Your factorio.com login credentials. Required for games with visibility public.
'';
};
token = mkOption {
- type = types.nullOr types.string;
+ type = types.nullOr types.str;
default = null;
description = ''
Authentication token. May be used instead of 'password' above.
'';
};
game-password = mkOption {
- type = types.nullOr types.string;
+ type = types.nullOr types.str;
default = null;
description = ''
Game password.
diff --git a/nixos/modules/services/games/minecraft-server.nix b/nixos/modules/services/games/minecraft-server.nix
index 39a68f4b5536..eb9288fca586 100644
--- a/nixos/modules/services/games/minecraft-server.nix
+++ b/nixos/modules/services/games/minecraft-server.nix
@@ -118,7 +118,7 @@ in {
};
serverProperties = mkOption {
- type = with types; attrsOf (either bool (either int str));
+ type = with types; attrsOf (oneOf [ bool int str ]);
default = {};
example = literalExample ''
{
diff --git a/nixos/modules/services/games/terraria.nix b/nixos/modules/services/games/terraria.nix
index 31f8edca20ce..a59b74c0b4c4 100644
--- a/nixos/modules/services/games/terraria.nix
+++ b/nixos/modules/services/games/terraria.nix
@@ -4,7 +4,7 @@ with lib;
let
cfg = config.services.terraria;
- worldSizeMap = { "small" = 1; "medium" = 2; "large" = 3; };
+ worldSizeMap = { small = 1; medium = 2; large = 3; };
valFlag = name: val: optionalString (val != null) "-${name} \"${escape ["\\" "\""] (toString val)}\"";
boolFlag = name: val: optionalString val "-${name}";
flags = [
diff --git a/nixos/modules/services/hardware/fancontrol.nix b/nixos/modules/services/hardware/fancontrol.nix
new file mode 100644
index 000000000000..616e4add31e8
--- /dev/null
+++ b/nixos/modules/services/hardware/fancontrol.nix
@@ -0,0 +1,46 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+ cfg = config.hardware.fancontrol;
+ configFile = pkgs.writeText "fan.conf" cfg.config;
+
+in {
+
+ options.hardware.fancontrol = {
+ enable = mkEnableOption "fancontrol (requires fancontrol.config)";
+
+ config = mkOption {
+ type = types.lines;
+ default = null;
+ example = ''
+ # Configuration file generated by pwmconfig
+ INTERVAL=1
+ DEVPATH=hwmon0=devices/platform/nct6775.656 hwmon1=devices/pci0000:00/0000:00:18.3
+ DEVNAME=hwmon0=nct6779 hwmon1=k10temp
+ FCTEMPS=hwmon0/pwm2=hwmon1/temp1_input
+ FCFANS=hwmon0/pwm2=hwmon0/fan2_input
+ MINTEMP=hwmon0/pwm2=25
+ MAXTEMP=hwmon0/pwm2=60
+ MINSTART=hwmon0/pwm2=25
+ MINSTOP=hwmon0/pwm2=10
+ MINPWM=hwmon0/pwm2=0
+ MAXPWM=hwmon0/pwm2=255
+ '';
+ description = "Contents for configuration file. See pwmconfig8.";
+ };
+ };
+
+
+ config = mkIf cfg.enable {
+ systemd.services.fancontrol = {
+ description = "Fan speed control from lm_sensors";
+ wantedBy = [ "multi-user.target" ];
+ serviceConfig = {
+ Type = "simple";
+ ExecStart = "${pkgs.lm_sensors}/bin/fancontrol ${configFile}";
+ };
+ };
+ };
+}
diff --git a/nixos/modules/services/hardware/freefall.nix b/nixos/modules/services/hardware/freefall.nix
index 066ccaa4d7cf..83f1e8c84f28 100644
--- a/nixos/modules/services/hardware/freefall.nix
+++ b/nixos/modules/services/hardware/freefall.nix
@@ -28,7 +28,7 @@ in {
};
devices = mkOption {
- type = types.listOf types.string;
+ type = types.listOf types.str;
default = [ "/dev/sda" ];
description = ''
Device paths to all internal spinning hard drives.
diff --git a/nixos/modules/services/hardware/fwupd.nix b/nixos/modules/services/hardware/fwupd.nix
index cad9fa20de0f..6c341bcbf240 100644
--- a/nixos/modules/services/hardware/fwupd.nix
+++ b/nixos/modules/services/hardware/fwupd.nix
@@ -8,8 +8,8 @@ let
cfg = config.services.fwupd;
originalEtc =
let
- mkEtcFile = n: nameValuePair n { source = "${pkgs.fwupd}/etc/${n}"; };
- in listToAttrs (map mkEtcFile pkgs.fwupd.filesInstalledToEtc);
+ mkEtcFile = n: nameValuePair n { source = "${cfg.package}/etc/${n}"; };
+ in listToAttrs (map mkEtcFile cfg.package.filesInstalledToEtc);
extraTrustedKeys =
let
mkName = p: "pki/fwupd/${baseNameOf (toString p)}";
@@ -24,7 +24,7 @@ let
"fwupd/remotes.d/fwupd-tests.conf" = {
source = pkgs.runCommand "fwupd-tests-enabled.conf" {} ''
sed "s,^Enabled=false,Enabled=true," \
- "${pkgs.fwupd.installedTests}/etc/fwupd/remotes.d/fwupd-tests.conf" > "$out"
+ "${cfg.package.installedTests}/etc/fwupd/remotes.d/fwupd-tests.conf" > "$out"
'';
};
} else {};
@@ -43,7 +43,7 @@ in {
};
blacklistDevices = mkOption {
- type = types.listOf types.string;
+ type = types.listOf types.str;
default = [];
example = [ "2082b5e0-7a64-478a-b1b2-e3404fab6dad" ];
description = ''
@@ -52,7 +52,7 @@ in {
};
blacklistPlugins = mkOption {
- type = types.listOf types.string;
+ type = types.listOf types.str;
default = [ "test" ];
example = [ "udev" ];
description = ''
@@ -77,13 +77,21 @@ in {
installed tests.
'';
};
+
+ package = mkOption {
+ type = types.package;
+ default = pkgs.fwupd;
+ description = ''
+ Which fwupd package to use.
+ '';
+ };
};
};
###### implementation
config = mkIf cfg.enable {
- environment.systemPackages = [ pkgs.fwupd ];
+ environment.systemPackages = [ cfg.package ];
environment.etc = {
"fwupd/daemon.conf" = {
@@ -102,11 +110,11 @@ in {
} // originalEtc // extraTrustedKeys // testRemote;
- services.dbus.packages = [ pkgs.fwupd ];
+ services.dbus.packages = [ cfg.package ];
- services.udev.packages = [ pkgs.fwupd ];
+ services.udev.packages = [ cfg.package ];
- systemd.packages = [ pkgs.fwupd ];
+ systemd.packages = [ cfg.package ];
systemd.tmpfiles.rules = [
"d /var/lib/fwupd 0755 root root -"
diff --git a/nixos/modules/services/hardware/sane.nix b/nixos/modules/services/hardware/sane.nix
index fe05c5a5c06f..b344dfc20610 100644
--- a/nixos/modules/services/hardware/sane.nix
+++ b/nixos/modules/services/hardware/sane.nix
@@ -76,7 +76,7 @@ in
};
hardware.sane.configDir = mkOption {
- type = types.string;
+ type = types.str;
internal = true;
description = "The value of SANE_CONFIG_DIR.";
};
@@ -124,7 +124,7 @@ in
environment.sessionVariables = env;
services.udev.packages = backends;
- users.groups."scanner".gid = config.ids.gids.scanner;
+ users.groups.scanner.gid = config.ids.gids.scanner;
})
(mkIf config.services.saned.enable {
@@ -152,7 +152,7 @@ in
};
};
- users.users."scanner" = {
+ users.users.scanner = {
uid = config.ids.uids.scanner;
group = "scanner";
};
diff --git a/nixos/modules/services/hardware/sane_extra_backends/brscan4_etc_files.nix b/nixos/modules/services/hardware/sane_extra_backends/brscan4_etc_files.nix
index fd19d8020fb8..6bf31982b71a 100644
--- a/nixos/modules/services/hardware/sane_extra_backends/brscan4_etc_files.nix
+++ b/nixos/modules/services/hardware/sane_extra_backends/brscan4_etc_files.nix
@@ -33,7 +33,7 @@ let
addAllNetDev = xs: concatStringsSep "\n" (map addNetDev xs);
in
-stdenv.mkDerivation rec {
+stdenv.mkDerivation {
name = "brscan4-etc-files-0.4.3-3";
src = "${brscan4}/opt/brother/scanner/brscan4";
diff --git a/nixos/modules/services/hardware/tcsd.nix b/nixos/modules/services/hardware/tcsd.nix
index d4b0a9495d75..3876280ee6bc 100644
--- a/nixos/modules/services/hardware/tcsd.nix
+++ b/nixos/modules/services/hardware/tcsd.nix
@@ -49,13 +49,13 @@ in
user = mkOption {
default = "tss";
- type = types.string;
+ type = types.str;
description = "User account under which tcsd runs.";
};
group = mkOption {
default = "tss";
- type = types.string;
+ type = types.str;
description = "Group account under which tcsd runs.";
};
@@ -65,19 +65,19 @@ in
description = ''
The location of the system persistent storage file.
The system persistent storage file holds keys and data across
- restarts of the TCSD and system reboots.
+ restarts of the TCSD and system reboots.
'';
};
firmwarePCRs = mkOption {
default = "0,1,2,3,4,5,6,7";
- type = types.string;
+ type = types.str;
description = "PCR indices used in the TPM for firmware measurements.";
};
kernelPCRs = mkOption {
default = "8,9,10,11,12";
- type = types.string;
+ type = types.str;
description = "PCR indices used in the TPM for kernel measurements.";
};
diff --git a/nixos/modules/services/hardware/throttled.nix b/nixos/modules/services/hardware/throttled.nix
index cd5b01450e44..7617c4492d7c 100644
--- a/nixos/modules/services/hardware/throttled.nix
+++ b/nixos/modules/services/hardware/throttled.nix
@@ -8,14 +8,23 @@ in {
options = {
services.throttled = {
enable = mkEnableOption "fix for Intel CPU throttling";
+
+ extraConfig = mkOption {
+ type = types.str;
+ default = "";
+ description = "Alternative configuration";
+ };
};
};
config = mkIf cfg.enable {
systemd.packages = [ pkgs.throttled ];
# The upstream package has this in Install, but that's not enough, see the NixOS manual
- systemd.services."lenovo_fix".wantedBy = [ "multi-user.target" ];
+ systemd.services.lenovo_fix.wantedBy = [ "multi-user.target" ];
- environment.etc."lenovo_fix.conf".source = "${pkgs.throttled}/etc/lenovo_fix.conf";
+ environment.etc."lenovo_fix.conf".source =
+ if cfg.extraConfig != ""
+ then pkgs.writeText "lenovo_fix.conf" cfg.extraConfig
+ else "${pkgs.throttled}/etc/lenovo_fix.conf";
};
}
diff --git a/nixos/modules/services/hardware/tlp.nix b/nixos/modules/services/hardware/tlp.nix
index 092ff051a042..4f8af7978286 100644
--- a/nixos/modules/services/hardware/tlp.nix
+++ b/nixos/modules/services/hardware/tlp.nix
@@ -60,11 +60,11 @@ in
powerManagement.cpufreq.max = null;
powerManagement.cpufreq.min = null;
- systemd.sockets."systemd-rfkill".enable = false;
+ systemd.sockets.systemd-rfkill.enable = false;
systemd.services = {
"systemd-rfkill@".enable = false;
- "systemd-rfkill".enable = false;
+ systemd-rfkill.enable = false;
tlp = {
description = "TLP system startup/shutdown";
diff --git a/nixos/modules/services/hardware/trezord.nix b/nixos/modules/services/hardware/trezord.nix
index c06a0665d02f..62824ed7350a 100644
--- a/nixos/modules/services/hardware/trezord.nix
+++ b/nixos/modules/services/hardware/trezord.nix
@@ -4,6 +4,12 @@ with lib;
let
cfg = config.services.trezord;
in {
+
+ ### docs
+
+ meta = {
+ doc = ./trezord.xml;
+ };
### interface
@@ -16,6 +22,22 @@ in {
Enable Trezor bridge daemon, for use with Trezor hardware bitcoin wallets.
'';
};
+
+ emulator.enable = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Enable Trezor emulator support.
+ '';
+ };
+
+ emulator.port = mkOption {
+ type = types.port;
+ default = 21324;
+ description = ''
+ Listening port for the Trezor emulator.
+ '';
+ };
};
};
@@ -44,7 +66,7 @@ in {
path = [];
serviceConfig = {
Type = "simple";
- ExecStart = "${pkgs.trezord}/bin/trezord-go";
+ ExecStart = "${pkgs.trezord}/bin/trezord-go ${optionalString cfg.emulator.enable "-e ${builtins.toString cfg.emulator.port}"}";
User = "trezord";
};
};
diff --git a/nixos/modules/services/hardware/trezord.xml b/nixos/modules/services/hardware/trezord.xml
new file mode 100644
index 000000000000..972d409d9d0e
--- /dev/null
+++ b/nixos/modules/services/hardware/trezord.xml
@@ -0,0 +1,26 @@
+
+ Trezor
+
+ Trezor is an open-source cryptocurrency hardware wallet and security token
+ allowing secure storage of private keys.
+
+
+ It offers advanced features such U2F two-factor authorization, SSH login
+ through
+ Trezor SSH agent,
+ GPG and a
+ password manager.
+ For more information, guides and documentation, see .
+
+
+ To enable Trezor support, add the following to your configuration.nix:
+
+ = true;
+
+ This will add all necessary udev rules and start Trezor Bridge.
+
+
diff --git a/nixos/modules/services/hardware/triggerhappy.nix b/nixos/modules/services/hardware/triggerhappy.nix
index a500cb4fc367..f9f5234bdc3f 100644
--- a/nixos/modules/services/hardware/triggerhappy.nix
+++ b/nixos/modules/services/hardware/triggerhappy.nix
@@ -102,7 +102,6 @@ in
systemd.services.triggerhappy = {
wantedBy = [ "multi-user.target" ];
- after = [ "local-fs.target" ];
description = "Global hotkey daemon";
serviceConfig = {
ExecStart = "${pkgs.triggerhappy}/bin/thd ${optionalString (cfg.user != "root") "--user ${cfg.user}"} --socket ${socket} --triggers ${configFile} --deviceglob /dev/input/event*";
diff --git a/nixos/modules/services/hardware/udisks2.nix b/nixos/modules/services/hardware/udisks2.nix
index ed8703be921c..e898f3260585 100644
--- a/nixos/modules/services/hardware/udisks2.nix
+++ b/nixos/modules/services/hardware/udisks2.nix
@@ -34,10 +34,7 @@ with lib;
services.dbus.packages = [ pkgs.udisks2 ];
- system.activationScripts.udisks2 =
- ''
- mkdir -m 0755 -p /var/lib/udisks2
- '';
+ systemd.tmpfiles.rules = [ "d /var/lib/udisks2 0755 root root -" ];
services.udev.packages = [ pkgs.udisks2 ];
diff --git a/nixos/modules/services/hardware/upower.nix b/nixos/modules/services/hardware/upower.nix
index 1da47349c077..5e7ac7a6e659 100644
--- a/nixos/modules/services/hardware/upower.nix
+++ b/nixos/modules/services/hardware/upower.nix
@@ -5,8 +5,11 @@
with lib;
let
+
cfg = config.services.upower;
+
in
+
{
###### interface
@@ -49,55 +52,7 @@ in
services.udev.packages = [ cfg.package ];
- systemd.services.upower =
- { description = "Power Management Daemon";
- path = [ pkgs.glib.out ]; # needed for gdbus
- serviceConfig =
- { Type = "dbus";
- BusName = "org.freedesktop.UPower";
- ExecStart = "@${cfg.package}/libexec/upowerd upowerd";
- Restart = "on-failure";
- # Upstream lockdown:
- # Filesystem lockdown
- ProtectSystem = "strict";
- # Needed by keyboard backlight support
- ProtectKernelTunables = false;
- ProtectControlGroups = true;
- ReadWritePaths = "/var/lib/upower";
- ProtectHome = true;
- PrivateTmp = true;
-
- # Network
- # PrivateNetwork=true would block udev's netlink socket
- RestrictAddressFamilies = "AF_UNIX AF_NETLINK";
-
- # Execute Mappings
- MemoryDenyWriteExecute = true;
-
- # Modules
- ProtectKernelModules = true;
-
- # Real-time
- RestrictRealtime = true;
-
- # Privilege escalation
- NoNewPrivileges = true;
- };
- };
-
- system.activationScripts.upower =
- ''
- mkdir -m 0755 -p /var/lib/upower
- '';
-
- # The upower daemon seems to get stuck after doing a suspend
- # (i.e. subsequent suspend requests will say "Sleep has already
- # been requested and is pending"). So as a workaround, restart
- # the daemon.
- powerManagement.resumeCommands =
- ''
- ${config.systemd.package}/bin/systemctl try-restart upower
- '';
+ systemd.packages = [ cfg.package ];
};
diff --git a/nixos/modules/services/logging/SystemdJournal2Gelf.nix b/nixos/modules/services/logging/SystemdJournal2Gelf.nix
index e90d9e7a12b6..f26aef7262ba 100644
--- a/nixos/modules/services/logging/SystemdJournal2Gelf.nix
+++ b/nixos/modules/services/logging/SystemdJournal2Gelf.nix
@@ -16,7 +16,7 @@ in
};
graylogServer = mkOption {
- type = types.string;
+ type = types.str;
example = "graylog2.example.com:11201";
description = ''
Host and port of your graylog2 input. This should be a GELF
@@ -25,7 +25,7 @@ in
};
extraOptions = mkOption {
- type = types.string;
+ type = types.separatedString " ";
default = "";
description = ''
Any extra flags to pass to SystemdJournal2Gelf. Note that
@@ -56,4 +56,4 @@ in
};
};
};
-}
\ No newline at end of file
+}
diff --git a/nixos/modules/services/logging/awstats.nix b/nixos/modules/services/logging/awstats.nix
index 612ae06d0a79..a92ff3bee490 100644
--- a/nixos/modules/services/logging/awstats.nix
+++ b/nixos/modules/services/logging/awstats.nix
@@ -4,6 +4,7 @@ with lib;
let
cfg = config.services.awstats;
+ httpd = config.services.httpd;
package = pkgs.awstats;
in
@@ -31,7 +32,7 @@ in
};
updateAt = mkOption {
- type = types.nullOr types.string;
+ type = types.nullOr types.str;
default = null;
example = "hourly";
description = ''
@@ -49,7 +50,7 @@ in
description = ''Enable the awstats web service. This switches on httpd.'';
};
urlPrefix = mkOption {
- type = types.string;
+ type = types.str;
default = "/awstats";
description = "The URL prefix under which the awstats service appears.";
};
@@ -67,50 +68,43 @@ in
environment.etc."awstats/awstats.conf".source = pkgs.runCommand "awstats.conf"
{ preferLocalBuild = true; }
( let
- cfg-httpd = config.services.httpd;
logFormat =
- if cfg-httpd.logFormat == "combined" then "1" else
- if cfg-httpd.logFormat == "common" then "4" else
- throw "awstats service doesn't support Apache log format `${cfg-httpd.logFormat}`";
+ if httpd.logFormat == "combined" then "1" else
+ if httpd.logFormat == "common" then "4" else
+ throw "awstats service doesn't support Apache log format `${httpd.logFormat}`";
in
''
sed \
-e 's|^\(DirData\)=.*$|\1="${cfg.vardir}"|' \
-e 's|^\(DirIcons\)=.*$|\1="icons"|' \
-e 's|^\(CreateDirDataIfNotExists\)=.*$|\1=1|' \
- -e 's|^\(SiteDomain\)=.*$|\1="${cfg-httpd.hostName}"|' \
- -e 's|^\(LogFile\)=.*$|\1="${cfg-httpd.logDir}/access_log"|' \
+ -e 's|^\(SiteDomain\)=.*$|\1="${httpd.hostName}"|' \
+ -e 's|^\(LogFile\)=.*$|\1="${httpd.logDir}/access_log"|' \
-e 's|^\(LogFormat\)=.*$|\1=${logFormat}|' \
< '${package.out}/wwwroot/cgi-bin/awstats.model.conf' > "$out"
echo '${cfg.extraConfig}' >> "$out"
'');
- # The httpd sub-service showing awstats.
- services.httpd.enable = mkIf cfg.service.enable true;
- services.httpd.extraSubservices = mkIf cfg.service.enable [ { function = { serverInfo, ... }: {
- extraConfig =
- ''
- Alias ${cfg.service.urlPrefix}/classes "${package.out}/wwwroot/classes/"
- Alias ${cfg.service.urlPrefix}/css "${package.out}/wwwroot/css/"
- Alias ${cfg.service.urlPrefix}/icons "${package.out}/wwwroot/icon/"
- ScriptAlias ${cfg.service.urlPrefix}/ "${package.out}/wwwroot/cgi-bin/"
+ systemd.tmpfiles.rules = optionals cfg.service.enable [
+ "d '${cfg.vardir}' - ${httpd.user} ${httpd.group} - -"
+ "Z '${cfg.vardir}' - ${httpd.user} ${httpd.group} - -"
+ ];
-
- Options None
- AllowOverride None
- Order allow,deny
- Allow from all
-
- '';
- startupScript =
- let
- inherit (serverInfo.serverConfig) user group;
- in pkgs.writeScript "awstats_startup.sh"
- ''
- mkdir -p '${cfg.vardir}'
- chown '${user}:${group}' '${cfg.vardir}'
- '';
- };}];
+ # The httpd sub-service showing awstats.
+ services.httpd = optionalAttrs cfg.service.enable {
+ enable = true;
+ extraConfig = ''
+ Alias ${cfg.service.urlPrefix}/classes "${package.out}/wwwroot/classes/"
+ Alias ${cfg.service.urlPrefix}/css "${package.out}/wwwroot/css/"
+ Alias ${cfg.service.urlPrefix}/icons "${package.out}/wwwroot/icon/"
+ ScriptAlias ${cfg.service.urlPrefix}/ "${package.out}/wwwroot/cgi-bin/"
+
+
+ Options None
+ Require all granted
+
+ '';
+ };
systemd.services.awstats-update = mkIf (cfg.updateAt != null) {
description = "awstats log collector";
diff --git a/nixos/modules/services/logging/logcheck.nix b/nixos/modules/services/logging/logcheck.nix
index f139190a1709..6d8be5b926d5 100644
--- a/nixos/modules/services/logging/logcheck.nix
+++ b/nixos/modules/services/logging/logcheck.nix
@@ -23,9 +23,9 @@ let
flags = "-r ${rulesDir} -c ${configFile} -L ${logFiles} -${levelFlag} -m ${cfg.mailTo}";
levelFlag = getAttrFromPath [cfg.level]
- { "paranoid" = "p";
- "server" = "s";
- "workstation" = "w";
+ { paranoid = "p";
+ server = "s";
+ workstation = "w";
};
cronJob = ''
@@ -155,7 +155,7 @@ in
config = mkOption {
default = "FQDN=1";
- type = types.string;
+ type = types.lines;
description = ''
Config options that you would like in logcheck.conf.
'';
diff --git a/nixos/modules/services/logging/logstash.nix b/nixos/modules/services/logging/logstash.nix
index 9b707e9deb58..4943e8d7db3a 100644
--- a/nixos/modules/services/logging/logstash.nix
+++ b/nixos/modules/services/logging/logstash.nix
@@ -53,7 +53,7 @@ in
type = types.package;
default = pkgs.logstash;
defaultText = "pkgs.logstash";
- example = literalExample "pkgs.logstash5";
+ example = literalExample "pkgs.logstash";
description = "Logstash package to use.";
};
diff --git a/nixos/modules/services/logging/rsyslogd.nix b/nixos/modules/services/logging/rsyslogd.nix
index 1ea96b8f1325..b924d94e0b0d 100644
--- a/nixos/modules/services/logging/rsyslogd.nix
+++ b/nixos/modules/services/logging/rsyslogd.nix
@@ -46,7 +46,7 @@ in
};
defaultConfig = mkOption {
- type = types.string;
+ type = types.lines;
default = defaultConf;
description = ''
The default syslog.conf file configures a
@@ -56,7 +56,7 @@ in
};
extraConfig = mkOption {
- type = types.string;
+ type = types.lines;
default = "";
example = "news.* -/var/log/news";
description = ''
diff --git a/nixos/modules/services/mail/davmail.nix b/nixos/modules/services/mail/davmail.nix
index 5b5cc294e5c7..374a3dd75c1c 100644
--- a/nixos/modules/services/mail/davmail.nix
+++ b/nixos/modules/services/mail/davmail.nix
@@ -7,7 +7,7 @@ let
cfg = config.services.davmail;
configType = with types;
- either (either (attrsOf configType) str) (either int bool) // {
+ oneOf [ (attrsOf configType) str int bool ] // {
description = "davmail config type (str, int, bool or attribute set thereof)";
};
diff --git a/nixos/modules/services/mail/dovecot.nix b/nixos/modules/services/mail/dovecot.nix
index 139011dca23a..3fd06812c675 100644
--- a/nixos/modules/services/mail/dovecot.nix
+++ b/nixos/modules/services/mail/dovecot.nix
@@ -181,7 +181,7 @@ in
};
configFile = mkOption {
- type = types.nullOr types.str;
+ type = types.nullOr types.path;
default = null;
description = "Config file used for the whole dovecot configuration.";
apply = v: if v != null then v else pkgs.writeText "dovecot.conf" dovecotConf;
@@ -344,8 +344,7 @@ in
systemd.services.dovecot2 = {
description = "Dovecot IMAP/POP3 server";
- after = [ "keys.target" "network.target" ];
- wants = [ "keys.target" ];
+ after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
restartTriggers = [ cfg.configFile ];
diff --git a/nixos/modules/services/mail/exim.nix b/nixos/modules/services/mail/exim.nix
index c05811291359..47812dd1e40e 100644
--- a/nixos/modules/services/mail/exim.nix
+++ b/nixos/modules/services/mail/exim.nix
@@ -21,7 +21,7 @@ in
};
config = mkOption {
- type = types.string;
+ type = types.lines;
default = "";
description = ''
Verbatim Exim configuration. This should not contain exim_user,
@@ -30,7 +30,7 @@ in
};
user = mkOption {
- type = types.string;
+ type = types.str;
default = "exim";
description = ''
User to use when no root privileges are required.
@@ -42,7 +42,7 @@ in
};
group = mkOption {
- type = types.string;
+ type = types.str;
default = "exim";
description = ''
Group to use when no root privileges are required.
@@ -50,7 +50,7 @@ in
};
spoolDir = mkOption {
- type = types.string;
+ type = types.path;
default = "/var/spool/exim";
description = ''
Location of the spool directory of exim.
diff --git a/nixos/modules/services/mail/mailcatcher.nix b/nixos/modules/services/mail/mailcatcher.nix
index fa8d41e918d3..f5b4508b335c 100644
--- a/nixos/modules/services/mail/mailcatcher.nix
+++ b/nixos/modules/services/mail/mailcatcher.nix
@@ -3,7 +3,7 @@
let
cfg = config.services.mailcatcher;
- inherit (lib) mkEnableOption mkIf mkOption types;
+ inherit (lib) mkEnableOption mkIf mkOption types optionalString;
in
{
# interface
@@ -54,6 +54,7 @@ in
DynamicUser = true;
Restart = "always";
ExecStart = "${pkgs.mailcatcher}/bin/mailcatcher --foreground --no-quit --http-ip ${cfg.http.ip} --http-port ${toString cfg.http.port} --smtp-ip ${cfg.smtp.ip} --smtp-port ${toString cfg.smtp.port}";
+ AmbientCapabilities = optionalString (cfg.http.port < 1024 || cfg.smtp.port < 1024) "cap_net_bind_service";
};
};
};
diff --git a/nixos/modules/services/mail/mailman.nix b/nixos/modules/services/mail/mailman.nix
new file mode 100644
index 000000000000..e917209f3d1f
--- /dev/null
+++ b/nixos/modules/services/mail/mailman.nix
@@ -0,0 +1,297 @@
+{ config, pkgs, lib, ... }: # mailman.nix
+
+with lib;
+
+let
+
+ cfg = config.services.mailman;
+
+ mailmanPyEnv = pkgs.python3.withPackages (ps: with ps; [mailman mailman-hyperkitty]);
+
+ mailmanExe = with pkgs; stdenv.mkDerivation {
+ name = "mailman-" + python3Packages.mailman.version;
+ buildInputs = [makeWrapper];
+ unpackPhase = ":";
+ installPhase = ''
+ mkdir -p $out/bin
+ makeWrapper ${mailmanPyEnv}/bin/mailman $out/bin/mailman \
+ --set MAILMAN_CONFIG_FILE /etc/mailman.cfg
+ '';
+ };
+
+ mailmanWeb = pkgs.python3Packages.mailman-web.override {
+ serverEMail = cfg.siteOwner;
+ archiverKey = cfg.hyperkittyApiKey;
+ allowedHosts = cfg.webHosts;
+ };
+
+ mailmanWebPyEnv = pkgs.python3.withPackages (x: with x; [mailman-web]);
+
+ mailmanWebExe = with pkgs; stdenv.mkDerivation {
+ inherit (mailmanWeb) name;
+ buildInputs = [makeWrapper];
+ unpackPhase = ":";
+ installPhase = ''
+ mkdir -p $out/bin
+ makeWrapper ${mailmanWebPyEnv}/bin/django-admin $out/bin/mailman-web \
+ --set DJANGO_SETTINGS_MODULE settings
+ '';
+ };
+
+ mailmanCfg = ''
+ [mailman]
+ site_owner: ${cfg.siteOwner}
+ layout: fhs
+
+ [paths.fhs]
+ bin_dir: ${pkgs.python3Packages.mailman}/bin
+ var_dir: /var/lib/mailman
+ queue_dir: $var_dir/queue
+ template_dir: $var_dir/templates
+ log_dir: $var_dir/log
+ lock_dir: $var_dir/lock
+ etc_dir: /etc
+ ext_dir: $etc_dir/mailman.d
+ pid_file: /run/mailman/master.pid
+ '' + optionalString (cfg.hyperkittyApiKey != null) ''
+ [archiver.hyperkitty]
+ class: mailman_hyperkitty.Archiver
+ enable: yes
+ configuration: ${pkgs.writeText "mailman-hyperkitty.cfg" mailmanHyperkittyCfg}
+ '';
+
+ mailmanHyperkittyCfg = ''
+ [general]
+ # This is your HyperKitty installation, preferably on the localhost. This
+ # address will be used by Mailman to forward incoming emails to HyperKitty
+ # for archiving. It does not need to be publicly available, in fact it's
+ # better if it is not.
+ base_url: ${cfg.hyperkittyBaseUrl}
+
+ # Shared API key, must be the identical to the value in HyperKitty's
+ # settings.
+ api_key: ${cfg.hyperkittyApiKey}
+ '';
+
+in {
+
+ ###### interface
+
+ options = {
+
+ services.mailman = {
+
+ enable = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Enable Mailman on this host. Requires an active Postfix installation.";
+ };
+
+ siteOwner = mkOption {
+ type = types.str;
+ default = "postmaster@example.org";
+ description = ''
+ Certain messages that must be delivered to a human, but which can't
+ be delivered to a list owner (e.g. a bounce from a list owner), will
+ be sent to this address. It should point to a human.
+ '';
+ };
+
+ webRoot = mkOption {
+ type = types.path;
+ default = "${mailmanWeb}/${pkgs.python3.sitePackages}";
+ defaultText = "pkgs.python3Packages.mailman-web";
+ description = ''
+ The web root for the Hyperkity + Postorius apps provided by Mailman.
+ This variable can be set, of course, but it mainly exists so that site
+ admins can refer to it in their own hand-written httpd configuration files.
+ '';
+ };
+
+ webHosts = mkOption {
+ type = types.listOf types.str;
+ default = [];
+ description = ''
+ The list of hostnames and/or IP addresses from which the Mailman Web
+ UI will accept requests. By default, "localhost" and "127.0.0.1" are
+ enabled. All additional names under which your web server accepts
+ requests for the UI must be listed here or incoming requests will be
+ rejected.
+ '';
+ };
+
+ hyperkittyBaseUrl = mkOption {
+ type = types.str;
+ default = "http://localhost/hyperkitty/";
+ description = ''
+ Where can Mailman connect to Hyperkitty's internal API, preferably on
+ localhost?
+ '';
+ };
+
+ hyperkittyApiKey = mkOption {
+ type = types.nullOr types.str;
+ default = null;
+ description = ''
+ The shared secret used to authenticate Mailman's internal
+ communication with Hyperkitty. Must be set to enable support for the
+ Hyperkitty archiver. Note that this secret is going to be visible to
+ all local users in the Nix store.
+ '';
+ };
+
+ };
+ };
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ assertions = [
+ { assertion = cfg.enable -> config.services.postfix.enable;
+ message = "Mailman requires Postfix";
+ }
+ ];
+
+ users.users.mailman = { description = "GNU Mailman"; isSystemUser = true; };
+
+ environment = {
+ systemPackages = [ mailmanExe mailmanWebExe pkgs.sassc ];
+ etc."mailman.cfg".text = mailmanCfg;
+ };
+
+ services.postfix = {
+ relayDomains = [ "hash:/var/lib/mailman/data/postfix_domains" ];
+ recipientDelimiter = "+"; # bake recipient addresses in mail envelopes via VERP
+ config = {
+ transport_maps = [ "hash:/var/lib/mailman/data/postfix_lmtp" ];
+ local_recipient_maps = [ "hash:/var/lib/mailman/data/postfix_lmtp" ];
+ owner_request_special = "no"; # Mailman handles -owner addresses on its own
+ };
+ };
+
+ systemd.services.mailman = {
+ description = "GNU Mailman Master Process";
+ after = [ "network.target" ];
+ wantedBy = [ "multi-user.target" ];
+ serviceConfig = {
+ ExecStart = "${mailmanExe}/bin/mailman start";
+ ExecStop = "${mailmanExe}/bin/mailman stop";
+ User = "mailman";
+ Type = "forking";
+ StateDirectory = "mailman";
+ StateDirectoryMode = "0700";
+ RuntimeDirectory = "mailman";
+ PIDFile = "/run/mailman/master.pid";
+ };
+ };
+
+ systemd.services.mailman-web = {
+ description = "Init Postorius DB";
+ before = [ "httpd.service" ];
+ requiredBy = [ "httpd.service" ];
+ script = ''
+ ${mailmanWebExe}/bin/mailman-web migrate
+ rm -rf static
+ ${mailmanWebExe}/bin/mailman-web collectstatic
+ ${mailmanWebExe}/bin/mailman-web compress
+ '';
+ serviceConfig = {
+ User = config.services.httpd.user;
+ Type = "oneshot";
+ StateDirectory = "mailman-web";
+ StateDirectoryMode = "0700";
+ WorkingDirectory = "/var/lib/mailman-web";
+ };
+ };
+
+ systemd.services.mailman-daily = {
+ description = "Trigger daily Mailman events";
+ startAt = "daily";
+ serviceConfig = {
+ ExecStart = "${mailmanExe}/bin/mailman digests --send";
+ User = "mailman";
+ };
+ };
+
+ systemd.services.hyperkitty = {
+ enable = cfg.hyperkittyApiKey != null;
+ description = "GNU Hyperkitty QCluster Process";
+ after = [ "network.target" ];
+ wantedBy = [ "mailman.service" "multi-user.target" ];
+ serviceConfig = {
+ ExecStart = "${mailmanWebExe}/bin/mailman-web qcluster";
+ User = config.services.httpd.user;
+ WorkingDirectory = "/var/lib/mailman-web";
+ };
+ };
+
+ systemd.services.hyperkitty-minutely = {
+ enable = cfg.hyperkittyApiKey != null;
+ description = "Trigger minutely Hyperkitty events";
+ startAt = "minutely";
+ serviceConfig = {
+ ExecStart = "${mailmanWebExe}/bin/mailman-web runjobs minutely";
+ User = config.services.httpd.user;
+ WorkingDirectory = "/var/lib/mailman-web";
+ };
+ };
+
+ systemd.services.hyperkitty-quarter-hourly = {
+ enable = cfg.hyperkittyApiKey != null;
+ description = "Trigger quarter-hourly Hyperkitty events";
+ startAt = "*:00/15";
+ serviceConfig = {
+ ExecStart = "${mailmanWebExe}/bin/mailman-web runjobs quarter_hourly";
+ User = config.services.httpd.user;
+ WorkingDirectory = "/var/lib/mailman-web";
+ };
+ };
+
+ systemd.services.hyperkitty-hourly = {
+ enable = cfg.hyperkittyApiKey != null;
+ description = "Trigger hourly Hyperkitty events";
+ startAt = "hourly";
+ serviceConfig = {
+ ExecStart = "${mailmanWebExe}/bin/mailman-web runjobs hourly";
+ User = config.services.httpd.user;
+ WorkingDirectory = "/var/lib/mailman-web";
+ };
+ };
+
+ systemd.services.hyperkitty-daily = {
+ enable = cfg.hyperkittyApiKey != null;
+ description = "Trigger daily Hyperkitty events";
+ startAt = "daily";
+ serviceConfig = {
+ ExecStart = "${mailmanWebExe}/bin/mailman-web runjobs daily";
+ User = config.services.httpd.user;
+ WorkingDirectory = "/var/lib/mailman-web";
+ };
+ };
+
+ systemd.services.hyperkitty-weekly = {
+ enable = cfg.hyperkittyApiKey != null;
+ description = "Trigger weekly Hyperkitty events";
+ startAt = "weekly";
+ serviceConfig = {
+ ExecStart = "${mailmanWebExe}/bin/mailman-web runjobs weekly";
+ User = config.services.httpd.user;
+ WorkingDirectory = "/var/lib/mailman-web";
+ };
+ };
+
+ systemd.services.hyperkitty-yearly = {
+ enable = cfg.hyperkittyApiKey != null;
+ description = "Trigger yearly Hyperkitty events";
+ startAt = "yearly";
+ serviceConfig = {
+ ExecStart = "${mailmanWebExe}/bin/mailman-web runjobs yearly";
+ User = config.services.httpd.user;
+ WorkingDirectory = "/var/lib/mailman-web";
+ };
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/mail/mlmmj.nix b/nixos/modules/services/mail/mlmmj.nix
index 11565bc02f89..7ae00f3e501e 100644
--- a/nixos/modules/services/mail/mlmmj.nix
+++ b/nixos/modules/services/mail/mlmmj.nix
@@ -137,7 +137,7 @@ in
${pkgs.postfix}/bin/postmap ${stateDir}/transports
'';
- systemd.services."mlmmj-maintd" = {
+ systemd.services.mlmmj-maintd = {
description = "mlmmj maintenance daemon";
serviceConfig = {
User = cfg.user;
@@ -146,7 +146,7 @@ in
};
};
- systemd.timers."mlmmj-maintd" = {
+ systemd.timers.mlmmj-maintd = {
description = "mlmmj maintenance timer";
timerConfig.OnUnitActiveSec = cfg.maintInterval;
wantedBy = [ "timers.target" ];
diff --git a/nixos/modules/services/mail/nullmailer.nix b/nixos/modules/services/mail/nullmailer.nix
index 9997d287013e..2c2910e0aa9b 100644
--- a/nixos/modules/services/mail/nullmailer.nix
+++ b/nixos/modules/services/mail/nullmailer.nix
@@ -14,7 +14,7 @@ with lib;
};
user = mkOption {
- type = types.string;
+ type = types.str;
default = "nullmailer";
description = ''
User to use to run nullmailer-send.
@@ -22,7 +22,7 @@ with lib;
};
group = mkOption {
- type = types.string;
+ type = types.str;
default = "nullmailer";
description = ''
Group to use to run nullmailer-send.
diff --git a/nixos/modules/services/mail/pfix-srsd.nix b/nixos/modules/services/mail/pfix-srsd.nix
index 9599854352c9..38984f896d6a 100644
--- a/nixos/modules/services/mail/pfix-srsd.nix
+++ b/nixos/modules/services/mail/pfix-srsd.nix
@@ -40,7 +40,7 @@ with lib;
systemPackages = [ pkgs.pfixtools ];
};
- systemd.services."pfix-srsd" = {
+ systemd.services.pfix-srsd = {
description = "Postfix sender rewriting scheme daemon";
before = [ "postfix.service" ];
#note that we use requires rather than wants because postfix
diff --git a/nixos/modules/services/mail/postfix.nix b/nixos/modules/services/mail/postfix.nix
index dab1b29aa4be..d5fd76da970b 100644
--- a/nixos/modules/services/mail/postfix.nix
+++ b/nixos/modules/services/mail/postfix.nix
@@ -447,7 +447,7 @@ in
};
config = mkOption {
- type = with types; attrsOf (either bool (either str (listOf str)));
+ type = with types; attrsOf (oneOf [ bool str (listOf str) ]);
description = ''
The main.cf configuration file as key value set.
'';
@@ -509,7 +509,7 @@ in
};
localRecipients = mkOption {
- type = with types; nullOr (listOf string);
+ type = with types; nullOr (listOf str);
default = null;
description = ''
List of accepted local users. Specify a bare username, an
@@ -530,7 +530,7 @@ in
dnsBlacklists = mkOption {
default = [];
- type = with types; listOf string;
+ type = with types; listOf str;
description = "dns blacklist servers to use with smtpd_client_restrictions";
};
@@ -877,22 +877,22 @@ in
}
(mkIf haveAliases {
- services.postfix.aliasFiles."aliases" = aliasesFile;
+ services.postfix.aliasFiles.aliases = aliasesFile;
})
(mkIf haveTransport {
- services.postfix.mapFiles."transport" = transportFile;
+ services.postfix.mapFiles.transport = transportFile;
})
(mkIf haveVirtual {
- services.postfix.mapFiles."virtual" = virtualFile;
+ services.postfix.mapFiles.virtual = virtualFile;
})
(mkIf haveLocalRecipients {
- services.postfix.mapFiles."local_recipients" = localRecipientMapFile;
+ services.postfix.mapFiles.local_recipients = localRecipientMapFile;
})
(mkIf cfg.enableHeaderChecks {
- services.postfix.mapFiles."header_checks" = headerChecksFile;
+ services.postfix.mapFiles.header_checks = headerChecksFile;
})
(mkIf (cfg.dnsBlacklists != []) {
- services.postfix.mapFiles."client_access" = checkClientAccessFile;
+ services.postfix.mapFiles.client_access = checkClientAccessFile;
})
]);
}
diff --git a/nixos/modules/services/mail/postgrey.nix b/nixos/modules/services/mail/postgrey.nix
index 8e2b9c5dbc56..88fb7f0b4ad1 100644
--- a/nixos/modules/services/mail/postgrey.nix
+++ b/nixos/modules/services/mail/postgrey.nix
@@ -7,12 +7,12 @@ with lib; let
natural = with types; addCheck int (x: x >= 0);
natural' = with types; addCheck int (x: x > 0);
- socket = with types; addCheck (either (submodule unixSocket) (submodule inetSocket)) (x: x ? "path" || x ? "port");
+ socket = with types; addCheck (either (submodule unixSocket) (submodule inetSocket)) (x: x ? path || x ? port);
inetSocket = with types; {
options = {
addr = mkOption {
- type = nullOr string;
+ type = nullOr str;
default = null;
example = "127.0.0.1";
description = "The address to bind to. Localhost if null";
@@ -34,7 +34,7 @@ with lib; let
};
mode = mkOption {
- type = string;
+ type = str;
default = "0777";
description = "Mode of the unix socket";
};
@@ -63,17 +63,17 @@ in {
description = "Socket to bind to";
};
greylistText = mkOption {
- type = string;
+ type = str;
default = "Greylisted for %%s seconds";
description = "Response status text for greylisted messages; use %%s for seconds left until greylisting is over and %%r for mail domain of recipient";
};
greylistAction = mkOption {
- type = string;
+ type = str;
default = "DEFER_IF_PERMIT";
description = "Response status for greylisted messages (see access(5))";
};
greylistHeader = mkOption {
- type = string;
+ type = str;
default = "X-Greylist: delayed %%t seconds by postgrey-%%v at %%h; %%d";
description = "Prepend header to greylisted mails; use %%t for seconds delayed due to greylisting, %%v for the version of postgrey, %%d for the date, and %%h for the host";
};
@@ -88,7 +88,7 @@ in {
description = "Delete entries from whitelist if they haven't been seen for N days";
};
retryWindow = mkOption {
- type = either string natural;
+ type = either str natural;
default = 2;
example = "12h";
description = "Allow N days for the first retry. Use string with appended 'h' to specify time in hours";
@@ -151,7 +151,7 @@ in {
};
systemd.services.postgrey = let
- bind-flag = if cfg.socket ? "path" then
+ bind-flag = if cfg.socket ? path then
''--unix=${cfg.socket.path} --socketmode=${cfg.socket.mode}''
else
''--inet=${optionalString (cfg.socket.addr != null) (cfg.socket.addr + ":")}${toString cfg.socket.port}'';
diff --git a/nixos/modules/services/mail/rmilter.nix b/nixos/modules/services/mail/rmilter.nix
deleted file mode 100644
index 466365b6b305..000000000000
--- a/nixos/modules/services/mail/rmilter.nix
+++ /dev/null
@@ -1,252 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-with lib;
-
-let
-
- rspamdCfg = config.services.rspamd;
- postfixCfg = config.services.postfix;
- cfg = config.services.rmilter;
-
- inetSocket = addr: port: "inet:${addr}:${toString port}";
- unixSocket = sock: "unix:${sock}";
-
- systemdSocket = if cfg.bindSocket.type == "unix" then cfg.bindSocket.path
- else "${cfg.bindSocket.address}:${toString cfg.bindSocket.port}";
- rmilterSocket = if cfg.bindSocket.type == "unix" then unixSocket cfg.bindSocket.path
- else inetSocket cfg.bindSocket.address cfg.bindSocket.port;
-
- rmilterConf = ''
- pidfile = /run/rmilter/rmilter.pid;
- bind_socket = ${if cfg.socketActivation then "fd:3" else rmilterSocket};
- tempdir = /tmp;
- '' + (with cfg.rspamd; if enable then ''
- spamd {
- servers = ${concatStringsSep ", " servers};
- connect_timeout = 1s;
- results_timeout = 20s;
- error_time = 10;
- dead_time = 300;
- maxerrors = 10;
- reject_message = "${rejectMessage}";
- ${optionalString (length whitelist != 0) "whitelist = ${concatStringsSep ", " whitelist};"}
-
- # rspamd_metric - metric for using with rspamd
- # Default: "default"
- rspamd_metric = "default";
- ${extraConfig}
- };
- '' else "") + cfg.extraConfig;
-
- rmilterConfigFile = pkgs.writeText "rmilter.conf" rmilterConf;
-
-in
-
-{
-
- ###### interface
-
- options = {
-
- services.rmilter = {
-
- enable = mkOption {
- type = types.bool;
- default = false;
- description = "Whether to run the rmilter daemon.";
- };
-
- debug = mkOption {
- type = types.bool;
- default = false;
- description = "Whether to run the rmilter daemon in debug mode.";
- };
-
- user = mkOption {
- type = types.string;
- default = "rmilter";
- description = ''
- User to use when no root privileges are required.
- '';
- };
-
- group = mkOption {
- type = types.string;
- default = "rmilter";
- description = ''
- Group to use when no root privileges are required.
- '';
- };
-
- bindSocket.type = mkOption {
- type = types.enum [ "unix" "inet" ];
- default = "unix";
- description = ''
- What kind of socket rmilter should listen on. Either "unix"
- for an Unix domain socket or "inet" for a TCP socket.
- '';
- };
-
- bindSocket.path = mkOption {
- type = types.str;
- default = "/run/rmilter.sock";
- description = ''
- Path to Unix domain socket to listen on.
- '';
- };
-
- bindSocket.address = mkOption {
- type = types.str;
- default = "[::1]";
- example = "0.0.0.0";
- description = ''
- Inet address to listen on.
- '';
- };
-
- bindSocket.port = mkOption {
- type = types.int;
- default = 11990;
- description = ''
- Inet port to listen on.
- '';
- };
-
- socketActivation = mkOption {
- type = types.bool;
- default = true;
- description = ''
- Enable systemd socket activation for rmilter.
-
- Disabling socket activation is not recommended when a Unix
- domain socket is used and could lead to incorrect
- permissions.
- '';
- };
-
- rspamd = {
- enable = mkOption {
- type = types.bool;
- default = rspamdCfg.enable;
- description = "Whether to use rspamd to filter mails";
- };
-
- servers = mkOption {
- type = types.listOf types.str;
- default = ["r:/run/rspamd/rspamd.sock"];
- description = ''
- Spamd socket definitions.
- Is server name is prefixed with r: it is rspamd server.
- '';
- };
-
- whitelist = mkOption {
- type = types.listOf types.str;
- default = [ ];
- description = "list of ips or nets that should be not checked with spamd";
- };
-
- rejectMessage = mkOption {
- type = types.str;
- default = "Spam message rejected; If this is not spam contact abuse";
- description = "reject message for spam";
- };
-
- extraConfig = mkOption {
- type = types.lines;
- default = "";
- description = "Custom snippet to append to end of `spamd' section";
- };
- };
-
- extraConfig = mkOption {
- type = types.lines;
- default = "";
- description = "Custom snippet to append to rmilter config";
- };
-
- postfix = {
- enable = mkOption {
- type = types.bool;
- default = false;
- description = "Add rmilter to postfix main.conf";
- };
-
- configFragment = mkOption {
- type = types.str;
- description = "Addon to postfix configuration";
- default = ''
- smtpd_milters = ${rmilterSocket}
- milter_protocol = 6
- milter_mail_macros = i {mail_addr} {client_addr} {client_name} {auth_authen}
- '';
- };
- };
-
- };
-
- };
-
-
- ###### implementation
-
- config = mkMerge [
-
- (mkIf cfg.enable {
- warnings = [
- ''`config.services.rmilter' is deprecated, `rmilter' deprecated and unsupported by upstream, and will be removed from next releases. Use built-in rspamd milter instead.''
- ];
-
- users.users = singleton {
- name = cfg.user;
- description = "rmilter daemon";
- uid = config.ids.uids.rmilter;
- group = cfg.group;
- };
-
- users.groups = singleton {
- name = cfg.group;
- gid = config.ids.gids.rmilter;
- };
-
- systemd.services.rmilter = {
- description = "Rmilter Service";
-
- wantedBy = [ "multi-user.target" ];
- after = [ "network.target" ];
-
- serviceConfig = {
- ExecStart = "${pkgs.rmilter}/bin/rmilter ${optionalString cfg.debug "-d"} -n -c ${rmilterConfigFile}";
- ExecReload = "${pkgs.coreutils}/bin/kill -USR1 $MAINPID";
- User = cfg.user;
- Group = cfg.group;
- PermissionsStartOnly = true;
- Restart = "always";
- RuntimeDirectory = "rmilter";
- RuntimeDirectoryMode = "0750";
- };
-
- };
-
- systemd.sockets.rmilter = mkIf cfg.socketActivation {
- description = "Rmilter service socket";
- wantedBy = [ "sockets.target" ];
- socketConfig = {
- ListenStream = systemdSocket;
- SocketUser = cfg.user;
- SocketGroup = cfg.group;
- SocketMode = "0660";
- };
- };
- })
-
- (mkIf (cfg.enable && cfg.rspamd.enable && rspamdCfg.enable) {
- users.users.${cfg.user}.extraGroups = [ rspamdCfg.group ];
- })
-
- (mkIf (cfg.enable && cfg.postfix.enable) {
- services.postfix.extraConfig = cfg.postfix.configFragment;
- users.users.${postfixCfg.user}.extraGroups = [ cfg.group ];
- })
- ];
-}
diff --git a/nixos/modules/services/mail/roundcube.nix b/nixos/modules/services/mail/roundcube.nix
index e8b2e11bf726..bdedfa1bb701 100644
--- a/nixos/modules/services/mail/roundcube.nix
+++ b/nixos/modules/services/mail/roundcube.nix
@@ -4,6 +4,7 @@ with lib;
let
cfg = config.services.roundcube;
+ fpm = config.services.phpfpm.pools.roundcube;
in
{
options.services.roundcube = {
@@ -105,7 +106,7 @@ in
extraConfig = ''
location ~* \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
- fastcgi_pass unix:/run/phpfpm/roundcube;
+ fastcgi_pass unix:${fpm.socket};
include ${pkgs.nginx}/conf/fastcgi_params;
include ${pkgs.nginx}/conf/fastcgi.conf;
}
@@ -119,24 +120,27 @@ in
enable = true;
};
- services.phpfpm.poolConfigs.roundcube = ''
- listen = /run/phpfpm/roundcube
- listen.owner = nginx
- listen.group = nginx
- listen.mode = 0660
- user = nginx
- pm = dynamic
- pm.max_children = 75
- pm.start_servers = 2
- pm.min_spare_servers = 1
- pm.max_spare_servers = 20
- pm.max_requests = 500
- php_admin_value[error_log] = 'stderr'
- php_admin_flag[log_errors] = on
- php_admin_value[post_max_size] = 25M
- php_admin_value[upload_max_filesize] = 25M
- catch_workers_output = yes
- '';
+ services.phpfpm.pools.roundcube = {
+ user = "nginx";
+ phpOptions = ''
+ error_log = 'stderr'
+ log_errors = on
+ post_max_size = 25M
+ upload_max_filesize = 25M
+ '';
+ settings = mapAttrs (name: mkDefault) {
+ "listen.owner" = "nginx";
+ "listen.group" = "nginx";
+ "listen.mode" = "0660";
+ "pm" = "dynamic";
+ "pm.max_children" = 75;
+ "pm.start_servers" = 2;
+ "pm.min_spare_servers" = 1;
+ "pm.max_spare_servers" = 20;
+ "pm.max_requests" = 500;
+ "catch_workers_output" = true;
+ };
+ };
systemd.services.phpfpm-roundcube.after = [ "roundcube-setup.service" ];
systemd.services.roundcube-setup = let
diff --git a/nixos/modules/services/mail/rspamd.nix b/nixos/modules/services/mail/rspamd.nix
index 5541b8b79b7e..4db35d9e89ab 100644
--- a/nixos/modules/services/mail/rspamd.nix
+++ b/nixos/modules/services/mail/rspamd.nix
@@ -68,7 +68,7 @@ let
replaced with rspamd_proxy.
'';
apply = let
- from = "services.rspamd.workers.\”${name}\".type";
+ from = "services.rspamd.workers.\"${name}\".type";
files = options.type.files;
warning = "The option `${from}` defined in ${showFiles files} has enum value `proxy` which has been renamed to `rspamd_proxy`";
in x: if x == "proxy" then traceWarning warning "rspamd_proxy" else x;
@@ -308,7 +308,7 @@ in
};
user = mkOption {
- type = types.string;
+ type = types.str;
default = "rspamd";
description = ''
User to use when no root privileges are required.
@@ -316,7 +316,7 @@ in
};
group = mkOption {
- type = types.string;
+ type = types.str;
default = "rspamd";
description = ''
Group to use when no root privileges are required.
@@ -331,7 +331,7 @@ in
};
config = mkOption {
- type = with types; attrsOf (either bool (either str (listOf str)));
+ type = with types; attrsOf (oneOf [ bool str (listOf str) ]);
description = ''
Addon to postfix configuration
'';
@@ -387,7 +387,7 @@ in
gid = config.ids.gids.rspamd;
};
- environment.etc."rspamd".source = rspamdDir;
+ environment.etc.rspamd.source = rspamdDir;
systemd.services.rspamd = {
description = "Rspamd Service";
diff --git a/nixos/modules/services/mail/rss2email.nix b/nixos/modules/services/mail/rss2email.nix
index a123736005ab..c1e5964c4536 100644
--- a/nixos/modules/services/mail/rss2email.nix
+++ b/nixos/modules/services/mail/rss2email.nix
@@ -30,7 +30,7 @@ in {
};
config = mkOption {
- type = with types; attrsOf (either str (either int bool));
+ type = with types; attrsOf (oneOf [ str int bool ]);
default = {};
description = ''
The configuration to give rss2email.
@@ -43,9 +43,8 @@ in {
[DEFAULT] block along with the
to parameter.
- See
- https://github.com/rss2email/rss2email/blob/master/r2e.1
- for more information on which parameters are accepted.
+ See man r2e for more information on which
+ parameters are accepted.
'';
};
diff --git a/nixos/modules/services/misc/airsonic.nix b/nixos/modules/services/misc/airsonic.nix
index 8b2ec82c7705..919d3b2f6e64 100644
--- a/nixos/modules/services/misc/airsonic.nix
+++ b/nixos/modules/services/misc/airsonic.nix
@@ -34,7 +34,7 @@ in {
};
listenAddress = mkOption {
- type = types.string;
+ type = types.str;
default = "127.0.0.1";
description = ''
The host name or IP address on which to bind Airsonic.
@@ -105,7 +105,7 @@ in {
config = mkIf cfg.enable {
systemd.services.airsonic = {
description = "Airsonic Media Server";
- after = [ "local-fs.target" "network.target" ];
+ after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
preStart = ''
@@ -138,8 +138,8 @@ in {
services.nginx = mkIf (cfg.virtualHost != null) {
enable = true;
- virtualHosts."${cfg.virtualHost}" = {
- locations."${cfg.contextPath}".proxyPass = "http://${cfg.listenAddress}:${toString cfg.port}";
+ virtualHosts.${cfg.virtualHost} = {
+ locations.${cfg.contextPath}.proxyPass = "http://${cfg.listenAddress}:${toString cfg.port}";
};
};
diff --git a/nixos/modules/services/misc/apache-kafka.nix b/nixos/modules/services/misc/apache-kafka.nix
index 9eeae9556992..798e902ccae4 100644
--- a/nixos/modules/services/misc/apache-kafka.nix
+++ b/nixos/modules/services/misc/apache-kafka.nix
@@ -46,7 +46,7 @@ in {
hostname = mkOption {
description = "Hostname the broker should bind to.";
default = "localhost";
- type = types.string;
+ type = types.str;
};
logDirs = mkOption {
@@ -54,13 +54,13 @@ in {
default = [ "/tmp/kafka-logs" ];
type = types.listOf types.path;
};
-
+
zookeeper = mkOption {
description = "Zookeeper connection string";
default = "localhost:2181";
- type = types.string;
+ type = types.str;
};
-
+
extraProperties = mkOption {
description = "Extra properties for server.properties.";
type = types.nullOr types.lines;
@@ -79,8 +79,8 @@ in {
log4jProperties = mkOption {
description = "Kafka log4j property configuration.";
default = ''
- log4j.rootLogger=INFO, stdout
-
+ log4j.rootLogger=INFO, stdout
+
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=[%d] %p %m (%c)%n
diff --git a/nixos/modules/services/misc/cpuminer-cryptonight.nix b/nixos/modules/services/misc/cpuminer-cryptonight.nix
index f31526f8d107..907b9d90da29 100644
--- a/nixos/modules/services/misc/cpuminer-cryptonight.nix
+++ b/nixos/modules/services/misc/cpuminer-cryptonight.nix
@@ -28,15 +28,15 @@ in
'';
};
url = mkOption {
- type = types.string;
+ type = types.str;
description = "URL of mining server";
};
user = mkOption {
- type = types.string;
+ type = types.str;
description = "Username for mining server";
};
pass = mkOption {
- type = types.string;
+ type = types.str;
default = "x";
description = "Password for mining server";
};
@@ -63,4 +63,4 @@ in
};
-}
\ No newline at end of file
+}
diff --git a/nixos/modules/services/misc/dwm-status.nix b/nixos/modules/services/misc/dwm-status.nix
new file mode 100644
index 000000000000..b98a42e6a6d2
--- /dev/null
+++ b/nixos/modules/services/misc/dwm-status.nix
@@ -0,0 +1,73 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+ cfg = config.services.dwm-status;
+
+ order = concatMapStringsSep "," (feature: ''"${feature}"'') cfg.order;
+
+ configFile = pkgs.writeText "dwm-status.toml" ''
+ order = [${order}]
+
+ ${cfg.extraConfig}
+ '';
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.dwm-status = {
+
+ enable = mkEnableOption "dwm-status user service";
+
+ package = mkOption {
+ type = types.package;
+ default = pkgs.dwm-status;
+ defaultText = "pkgs.dwm-status";
+ example = "pkgs.dwm-status.override { enableAlsaUtils = false; }";
+ description = ''
+ Which dwm-status package to use.
+ '';
+ };
+
+ order = mkOption {
+ type = types.listOf (types.enum [ "audio" "backlight" "battery" "cpu_load" "network" "time" ]);
+ description = ''
+ List of enabled features in order.
+ '';
+ };
+
+ extraConfig = mkOption {
+ type = types.lines;
+ default = "";
+ description = ''
+ Extra config in TOML format.
+ '';
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ services.upower.enable = elem "battery" cfg.order;
+
+ systemd.user.services.dwm-status = {
+ description = "Highly performant and configurable DWM status service";
+ wantedBy = [ "graphical-session.target" ];
+ partOf = [ "graphical-session.target" ];
+
+ serviceConfig.ExecStart = "${cfg.package}/bin/dwm-status ${configFile}";
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/misc/dysnomia.nix b/nixos/modules/services/misc/dysnomia.nix
index 61ea822890ed..33a6fb152641 100644
--- a/nixos/modules/services/misc/dysnomia.nix
+++ b/nixos/modules/services/misc/dysnomia.nix
@@ -8,9 +8,9 @@ let
printProperties = properties:
concatMapStrings (propertyName:
let
- property = properties."${propertyName}";
+ property = properties.${propertyName};
in
- if isList property then "${propertyName}=(${lib.concatMapStrings (elem: "\"${toString elem}\" ") (properties."${propertyName}")})\n"
+ if isList property then "${propertyName}=(${lib.concatMapStrings (elem: "\"${toString elem}\" ") (properties.${propertyName})})\n"
else "${propertyName}=\"${toString property}\"\n"
) (builtins.attrNames properties);
@@ -31,7 +31,7 @@ let
${concatMapStrings (containerName:
let
- containerProperties = cfg.containers."${containerName}";
+ containerProperties = cfg.containers.${containerName};
in
''
cat > ${containerName} <root or the user set in
+ .
+ '';
};
backupPath = mkOption {
@@ -244,13 +250,33 @@ in {
databaseHost = mkOption {
type = types.str;
- default = "127.0.0.1";
- description = "Gitlab database hostname.";
+ default = "";
+ description = ''
+ Gitlab database hostname. An empty string means use
+ local unix socket connection.
+ '';
};
- databasePassword = mkOption {
- type = types.str;
- description = "Gitlab database user password.";
+ databasePasswordFile = mkOption {
+ type = with types; nullOr path;
+ default = null;
+ description = ''
+ File containing the Gitlab database user password.
+
+ This should be a string, not a nix path, since nix paths are
+ copied into the world-readable nix store.
+ '';
+ };
+
+ databaseCreateLocally = mkOption {
+ type = types.bool;
+ default = true;
+ description = ''
+ Whether a database should be automatically created on the
+ local host. Set this to false if you plan
+ on provisioning a local database yourself. This has no effect
+ if is customized.
+ '';
};
databaseName = mkOption {
@@ -338,10 +364,15 @@ in {
'';
};
- initialRootPassword = mkOption {
- type = types.str;
+ initialRootPasswordFile = mkOption {
+ type = with types; nullOr path;
+ default = null;
description = ''
- Initial password of the root account if this is a new install.
+ File containing the initial password of the root account if
+ this is a new install.
+
+ This should be a string, not a nix path, since nix paths are
+ copied into the world-readable nix store.
'';
};
@@ -365,15 +396,20 @@ in {
};
username = mkOption {
- type = types.nullOr types.str;
+ type = with types; nullOr str;
default = null;
description = "Username of the SMTP server for Gitlab.";
};
- password = mkOption {
- type = types.nullOr types.str;
+ passwordFile = mkOption {
+ type = types.nullOr types.path;
default = null;
- description = "Password of the SMTP server for Gitlab.";
+ description = ''
+ File containing the password of the SMTP server for Gitlab.
+
+ This should be a string, not a nix path, since nix paths
+ are copied into the world-readable nix store.
+ '';
};
domain = mkOption {
@@ -383,7 +419,7 @@ in {
};
authentication = mkOption {
- type = types.nullOr types.str;
+ type = with types; nullOr str;
default = null;
description = "Authentitcation type to use, see http://api.rubyonrails.org/classes/ActionMailer/Base.html";
};
@@ -401,68 +437,125 @@ in {
};
};
- secrets.secret = mkOption {
- type = types.str;
+ secrets.secretFile = mkOption {
+ type = with types; nullOr path;
+ default = null;
description = ''
- The secret is used to encrypt variables in the DB. If
- you change or lose this key you will be unable to access variables
- stored in database.
+ A file containing the secret used to encrypt variables in
+ the DB. If you change or lose this key you will be unable to
+ access variables stored in database.
Make sure the secret is at least 30 characters and all random,
no regular words or you'll be exposed to dictionary attacks.
+
+ This should be a string, not a nix path, since nix paths are
+ copied into the world-readable nix store.
'';
};
- secrets.db = mkOption {
- type = types.str;
+ secrets.dbFile = mkOption {
+ type = with types; nullOr path;
+ default = null;
description = ''
- The secret is used to encrypt variables in the DB. If
- you change or lose this key you will be unable to access variables
- stored in database.
+ A file containing the secret used to encrypt variables in
+ the DB. If you change or lose this key you will be unable to
+ access variables stored in database.
Make sure the secret is at least 30 characters and all random,
no regular words or you'll be exposed to dictionary attacks.
+
+ This should be a string, not a nix path, since nix paths are
+ copied into the world-readable nix store.
'';
};
- secrets.otp = mkOption {
- type = types.str;
+ secrets.otpFile = mkOption {
+ type = with types; nullOr path;
+ default = null;
description = ''
- The secret is used to encrypt secrets for OTP tokens. If
- you change or lose this key, users which have 2FA enabled for login
- won't be able to login anymore.
+ A file containing the secret used to encrypt secrets for OTP
+ tokens. If you change or lose this key, users which have 2FA
+ enabled for login won't be able to login anymore.
Make sure the secret is at least 30 characters and all random,
no regular words or you'll be exposed to dictionary attacks.
+
+ This should be a string, not a nix path, since nix paths are
+ copied into the world-readable nix store.
'';
};
- secrets.jws = mkOption {
- type = types.str;
+ secrets.jwsFile = mkOption {
+ type = with types; nullOr path;
+ default = null;
description = ''
- The secret is used to encrypt session keys. If you change or lose
- this key, users will be disconnected.
+ A file containing the secret used to encrypt session
+ keys. If you change or lose this key, users will be
+ disconnected.
Make sure the secret is an RSA private key in PEM format. You can
generate one with
openssl genrsa 2048
+
+ This should be a string, not a nix path, since nix paths are
+ copied into the world-readable nix store.
'';
};
extraConfig = mkOption {
type = types.attrs;
default = {};
- example = {
- gitlab = {
- default_projects_features = {
- builds = false;
+ example = literalExample ''
+ {
+ gitlab = {
+ default_projects_features = {
+ builds = false;
+ };
+ };
+ omniauth = {
+ enabled = true;
+ auto_sign_in_with_provider = "openid_connect";
+ allow_single_sign_on = ["openid_connect"];
+ block_auto_created_users = false;
+ providers = [
+ {
+ name = "openid_connect";
+ label = "OpenID Connect";
+ args = {
+ name = "openid_connect";
+ scope = ["openid" "profile"];
+ response_type = "code";
+ issuer = "https://keycloak.example.com/auth/realms/My%20Realm";
+ discovery = true;
+ client_auth_method = "query";
+ uid_field = "preferred_username";
+ client_options = {
+ identifier = "gitlab";
+ secret = { _secret = "/var/keys/gitlab_oidc_secret"; };
+ redirect_uri = "https://git.example.com/users/auth/openid_connect/callback";
+ };
+ };
+ }
+ ];
};
};
- };
+ '';
description = ''
- Extra options to be merged into config/gitlab.yml as nix
- attribute set.
+ Extra options to be added under
+ production in
+ config/gitlab.yml, as a nix attribute
+ set.
+
+ Options containing secret data should be set to an attribute
+ set containing the attribute _secret - a
+ string pointing to a file containing the value the option
+ should be set to. See the example to get a better picture of
+ this: in the resulting
+ config/gitlab.yml file, the
+ production.omniauth.providers[0].args.client_options.secret
+ key will be set to the contents of the
+ /var/keys/gitlab_oidc_secret file.
'';
};
};
@@ -470,12 +563,66 @@ in {
config = mkIf cfg.enable {
+ assertions = [
+ {
+ assertion = databaseActuallyCreateLocally -> (cfg.user == cfg.databaseUsername);
+ message = ''For local automatic database provisioning (services.gitlab.databaseCreateLocally == true) with peer authentication (services.gitlab.databaseHost == "") to work services.gitlab.user and services.gitlab.databaseUsername must be identical.'';
+ }
+ {
+ assertion = (cfg.databaseHost != "") -> (cfg.databasePasswordFile != null);
+ message = "When services.gitlab.databaseHost is customized, services.gitlab.databasePasswordFile must be set!";
+ }
+ {
+ assertion = cfg.initialRootPasswordFile != null;
+ message = "services.gitlab.initialRootPasswordFile must be set!";
+ }
+ {
+ assertion = cfg.secrets.secretFile != null;
+ message = "services.gitlab.secrets.secretFile must be set!";
+ }
+ {
+ assertion = cfg.secrets.dbFile != null;
+ message = "services.gitlab.secrets.dbFile must be set!";
+ }
+ {
+ assertion = cfg.secrets.otpFile != null;
+ message = "services.gitlab.secrets.otpFile must be set!";
+ }
+ {
+ assertion = cfg.secrets.jwsFile != null;
+ message = "services.gitlab.secrets.jwsFile must be set!";
+ }
+ ];
+
environment.systemPackages = [ pkgs.git gitlab-rake gitlab-rails cfg.packages.gitlab-shell ];
# Redis is required for the sidekiq queue runner.
services.redis.enable = mkDefault true;
+
# We use postgres as the main data store.
- services.postgresql.enable = mkDefault true;
+ services.postgresql = optionalAttrs databaseActuallyCreateLocally {
+ enable = true;
+ ensureUsers = singleton { name = cfg.databaseUsername; };
+ };
+ # The postgresql module doesn't currently support concepts like
+ # objects owners and extensions; for now we tack on what's needed
+ # here.
+ systemd.services.postgresql.postStart = mkAfter (optionalString databaseActuallyCreateLocally ''
+ $PSQL -tAc "SELECT 1 FROM pg_database WHERE datname = '${cfg.databaseName}'" | grep -q 1 || $PSQL -tAc 'CREATE DATABASE "${cfg.databaseName}" OWNER "${cfg.databaseUsername}"'
+ current_owner=$($PSQL -tAc "SELECT pg_catalog.pg_get_userbyid(datdba) FROM pg_catalog.pg_database WHERE datname = '${cfg.databaseName}'")
+ if [[ "$current_owner" != "${cfg.databaseUsername}" ]]; then
+ $PSQL -tAc 'ALTER DATABASE "${cfg.databaseName}" OWNER TO "${cfg.databaseUsername}"'
+ if [[ -e "${config.services.postgresql.dataDir}/.reassigning_${cfg.databaseName}" ]]; then
+ echo "Reassigning ownership of database ${cfg.databaseName} to user ${cfg.databaseUsername} failed on last boot. Failing..."
+ exit 1
+ fi
+ touch "${config.services.postgresql.dataDir}/.reassigning_${cfg.databaseName}"
+ $PSQL "${cfg.databaseName}" -tAc "REASSIGN OWNED BY \"$current_owner\" TO \"${cfg.databaseUsername}\""
+ rm "${config.services.postgresql.dataDir}/.reassigning_${cfg.databaseName}"
+ fi
+ $PSQL '${cfg.databaseName}' -tAc "CREATE EXTENSION IF NOT EXISTS pg_trgm"
+ '');
+
# Use postfix to send out mails.
services.postfix.enable = mkDefault true;
@@ -519,7 +666,6 @@ in {
"d ${gitlabConfig.production.shared.path}/artifacts 0750 ${cfg.user} ${cfg.group} -"
"d ${gitlabConfig.production.shared.path}/lfs-objects 0750 ${cfg.user} ${cfg.group} -"
"d ${gitlabConfig.production.shared.path}/pages 0750 ${cfg.user} ${cfg.group} -"
- "L+ ${cfg.statePath}/lib - - - - ${cfg.packages.gitlab}/share/gitlab/lib"
"L+ /run/gitlab/config - - - - ${cfg.statePath}/config"
"L+ /run/gitlab/log - - - - ${cfg.statePath}/log"
"L+ /run/gitlab/tmp - - - - ${cfg.statePath}/tmp"
@@ -527,26 +673,25 @@ in {
"L+ /run/gitlab/shell-config.yml - - - - ${pkgs.writeText "config.yml" (builtins.toJSON gitlabShellConfig)}"
- "L+ ${cfg.statePath}/config/gitlab.yml - - - - ${pkgs.writeText "gitlab.yml" (builtins.toJSON gitlabConfig)}"
- "L+ ${cfg.statePath}/config/database.yml - - - - ${pkgs.writeText "database.yml" (builtins.toJSON databaseConfig)}"
- "L+ ${cfg.statePath}/config/secrets.yml - - - - ${pkgs.writeText "secrets.yml" (builtins.toJSON secretsConfig)}"
"L+ ${cfg.statePath}/config/unicorn.rb - - - - ${./defaultUnicornConfig.rb}"
-
"L+ ${cfg.statePath}/config/initializers/extra-gitlab.rb - - - - ${extraGitlabRb}"
- ] ++ optional cfg.smtp.enable
- "L+ ${cfg.statePath}/config/initializers/smtp_settings.rb - - - - ${smtpSettings}" ;
+ ];
systemd.services.gitlab-sidekiq = {
after = [ "network.target" "redis.service" "gitlab.service" ];
wantedBy = [ "multi-user.target" ];
environment = gitlabEnv;
path = with pkgs; [
- config.services.postgresql.package
+ postgresqlPackage
gitAndTools.git
ruby
openssh
nodejs
gnupg
+
+ # Needed for GitLab project imports
+ gnutar
+ gzip
];
serviceConfig = {
Type = "simple";
@@ -618,60 +763,104 @@ in {
wantedBy = [ "multi-user.target" ];
environment = gitlabEnv;
path = with pkgs; [
- config.services.postgresql.package
+ postgresqlPackage
gitAndTools.git
openssh
nodejs
procps
gnupg
];
- preStart = ''
- ${pkgs.sudo}/bin/sudo -u ${cfg.user} cp -f ${cfg.packages.gitlab}/share/gitlab/VERSION ${cfg.statePath}/VERSION
- ${pkgs.sudo}/bin/sudo -u ${cfg.user} rm -rf ${cfg.statePath}/db/*
- ${pkgs.sudo}/bin/sudo -u ${cfg.user} cp -rf --no-preserve=mode ${cfg.packages.gitlab}/share/gitlab/config.dist/* ${cfg.statePath}/config
- ${pkgs.sudo}/bin/sudo -u ${cfg.user} cp -rf --no-preserve=mode ${cfg.packages.gitlab}/share/gitlab/db/* ${cfg.statePath}/db
-
- ${pkgs.openssl}/bin/openssl rand -hex 32 > ${cfg.statePath}/gitlab_shell_secret
-
- ${pkgs.sudo}/bin/sudo -u ${cfg.user} ${cfg.packages.gitlab-shell}/bin/install
-
- if ! test -e "${cfg.statePath}/db-created"; then
- if [ "${cfg.databaseHost}" = "127.0.0.1" ]; then
- ${pkgs.sudo}/bin/sudo -u ${pgSuperUser} psql postgres -c "CREATE ROLE ${cfg.databaseUsername} WITH LOGIN NOCREATEDB NOCREATEROLE ENCRYPTED PASSWORD '${cfg.databasePassword}'"
- ${pkgs.sudo}/bin/sudo -u ${pgSuperUser} ${config.services.postgresql.package}/bin/createdb --owner ${cfg.databaseUsername} ${cfg.databaseName}
-
- # enable required pg_trgm extension for gitlab
- ${pkgs.sudo}/bin/sudo -u ${pgSuperUser} psql ${cfg.databaseName} -c "CREATE EXTENSION IF NOT EXISTS pg_trgm"
- fi
-
- ${pkgs.sudo}/bin/sudo -u ${cfg.user} -H ${gitlab-rake}/bin/gitlab-rake db:schema:load
-
- ${pkgs.sudo}/bin/sudo -u ${cfg.user} touch "${cfg.statePath}/db-created"
- fi
-
- # Always do the db migrations just to be sure the database is up-to-date
- ${pkgs.sudo}/bin/sudo -u ${cfg.user} -H ${gitlab-rake}/bin/gitlab-rake db:migrate
-
- if ! test -e "${cfg.statePath}/db-seeded"; then
- ${pkgs.sudo}/bin/sudo -u ${cfg.user} ${gitlab-rake}/bin/gitlab-rake db:seed_fu \
- GITLAB_ROOT_PASSWORD='${cfg.initialRootPassword}' GITLAB_ROOT_EMAIL='${cfg.initialRootEmail}'
- ${pkgs.sudo}/bin/sudo -u ${cfg.user} touch "${cfg.statePath}/db-seeded"
- fi
-
- # We remove potentially broken links to old gitlab-shell versions
- rm -f ${cfg.statePath}/repositories/**/*.git/hooks
-
- ${pkgs.sudo}/bin/sudo -u ${cfg.user} -H ${pkgs.git}/bin/git config --global core.autocrlf "input"
- '';
serviceConfig = {
- PermissionsStartOnly = true; # preStart must be run as root
Type = "simple";
User = cfg.user;
Group = cfg.group;
TimeoutSec = "infinity";
Restart = "on-failure";
WorkingDirectory = "${cfg.packages.gitlab}/share/gitlab";
+ ExecStartPre = let
+ preStartFullPrivileges = ''
+ shopt -s dotglob nullglob
+ chown --no-dereference '${cfg.user}':'${cfg.group}' '${cfg.statePath}'/*
+ chown --no-dereference '${cfg.user}':'${cfg.group}' '${cfg.statePath}'/config/*
+ '';
+ preStart = ''
+ cp -f ${cfg.packages.gitlab}/share/gitlab/VERSION ${cfg.statePath}/VERSION
+ rm -rf ${cfg.statePath}/db/*
+ rm -rf ${cfg.statePath}/config/initializers/*
+ cp -rf --no-preserve=mode ${cfg.packages.gitlab}/share/gitlab/config.dist/* ${cfg.statePath}/config
+ cp -rf --no-preserve=mode ${cfg.packages.gitlab}/share/gitlab/db/* ${cfg.statePath}/db
+
+ ${cfg.packages.gitlab-shell}/bin/install
+
+ ${optionalString cfg.smtp.enable ''
+ install -m u=rw ${smtpSettings} ${cfg.statePath}/config/initializers/smtp_settings.rb
+ ${optionalString (cfg.smtp.passwordFile != null) ''
+ smtp_password=$(<'${cfg.smtp.passwordFile}')
+ ${pkgs.replace}/bin/replace-literal -e '@smtpPassword@' "$smtp_password" '${cfg.statePath}/config/initializers/smtp_settings.rb'
+ ''}
+ ''}
+
+ (
+ umask u=rwx,g=,o=
+
+ ${pkgs.openssl}/bin/openssl rand -hex 32 > ${cfg.statePath}/gitlab_shell_secret
+
+ if [[ -h '${cfg.statePath}/config/database.yml' ]]; then
+ rm '${cfg.statePath}/config/database.yml'
+ fi
+
+ ${if cfg.databasePasswordFile != null then ''
+ export db_password="$(<'${cfg.databasePasswordFile}')"
+
+ if [[ -z "$db_password" ]]; then
+ >&2 echo "Database password was an empty string!"
+ exit 1
+ fi
+
+ ${pkgs.jq}/bin/jq <${pkgs.writeText "database.yml" (builtins.toJSON databaseConfig)} \
+ '.production.password = $ENV.db_password' \
+ >'${cfg.statePath}/config/database.yml'
+ ''
+ else ''
+ ${pkgs.jq}/bin/jq <${pkgs.writeText "database.yml" (builtins.toJSON databaseConfig)} \
+ >'${cfg.statePath}/config/database.yml'
+ ''
+ }
+
+ ${utils.genJqSecretsReplacementSnippet
+ gitlabConfig
+ "${cfg.statePath}/config/gitlab.yml"
+ }
+
+ if [[ -h '${cfg.statePath}/config/secrets.yml' ]]; then
+ rm '${cfg.statePath}/config/secrets.yml'
+ fi
+
+ export secret="$(<'${cfg.secrets.secretFile}')"
+ export db="$(<'${cfg.secrets.dbFile}')"
+ export otp="$(<'${cfg.secrets.otpFile}')"
+ export jws="$(<'${cfg.secrets.jwsFile}')"
+ ${pkgs.jq}/bin/jq -n '{production: {secret_key_base: $ENV.secret,
+ otp_key_base: $ENV.otp,
+ db_key_base: $ENV.db,
+ openid_connect_signing_key: $ENV.jws}}' \
+ > '${cfg.statePath}/config/secrets.yml'
+ )
+
+ initial_root_password="$(<'${cfg.initialRootPasswordFile}')"
+ ${gitlab-rake}/bin/gitlab-rake gitlab:db:configure GITLAB_ROOT_PASSWORD="$initial_root_password" \
+ GITLAB_ROOT_EMAIL='${cfg.initialRootEmail}' > /dev/null
+
+ # We remove potentially broken links to old gitlab-shell versions
+ rm -Rf ${cfg.statePath}/repositories/**/*.git/hooks
+
+ ${pkgs.git}/bin/git config --global core.autocrlf "input"
+ '';
+ in [
+ "+${pkgs.writeShellScript "gitlab-pre-start-full-privileges" preStartFullPrivileges}"
+ "${pkgs.writeShellScript "gitlab-pre-start" preStart}"
+ ];
ExecStart = "${cfg.packages.gitlab.rubyEnv}/bin/unicorn -c ${cfg.statePath}/config/unicorn.rb -E production";
};
diff --git a/nixos/modules/services/misc/gitlab.xml b/nixos/modules/services/misc/gitlab.xml
index 5ff570a442f6..b6171a9a194c 100644
--- a/nixos/modules/services/misc/gitlab.xml
+++ b/nixos/modules/services/misc/gitlab.xml
@@ -54,8 +54,8 @@
services.gitlab = {
enable = true;
- databasePassword = "eXaMpl3";
- initialRootPassword = "UseNixOS!";
+ databasePasswordFile = "/var/keys/gitlab/db_password";
+ initialRootPasswordFile = "/var/keys/gitlab/root_password";
https = true;
host = "git.example.com";
port = 443;
@@ -67,38 +67,10 @@ services.gitlab = {
port = 25;
};
secrets = {
- db = "uPgq1gtwwHiatiuE0YHqbGa5lEIXH7fMsvuTNgdzJi8P0Dg12gibTzBQbq5LT7PNzcc3BP9P1snHVnduqtGF43PgrQtU7XL93ts6gqe9CBNhjtaqUwutQUDkygP5NrV6";
- secret = "devzJ0Tz0POiDBlrpWmcsjjrLaltyiAdS8TtgT9YNBOoUcDsfppiY3IXZjMVtKgXrFImIennFGOpPN8IkP8ATXpRgDD5rxVnKuTTwYQaci2NtaV1XxOQGjdIE50VGsR3";
- otp = "e1GATJVuS2sUh7jxiPzZPre4qtzGGaS22FR50Xs1TerRVdgI3CBVUi5XYtQ38W4xFeS4mDqi5cQjExE838iViSzCdcG19XSL6qNsfokQP9JugwiftmhmCadtsnHErBMI";
- jws = ''
- -----BEGIN RSA PRIVATE KEY-----
- MIIEpAIBAAKCAQEArrtx4oHKwXoqUbMNqnHgAklnnuDon3XG5LJB35yPsXKv/8GK
- ke92wkI+s1Xkvsp8tg9BIY/7c6YK4SR07EWL+dB5qwctsWR2Q8z+/BKmTx9D99pm
- hnsjuNIXTF7BXrx3RX6BxZpH5Vzzh9nCwWKT/JCFqtwH7afNGGL7aMf+hdaiUg/Q
- SD05yRObioiO4iXDolsJOhrnbZvlzVHl1ZYxFJv0H6/Snc0BBA9Fl/3uj6ANpbjP
- eXF1SnJCqT87bj46r5NdVauzaRxAsIfqHroHK4UZ98X5LjGQFGvSqTvyjPBS4I1i
- s7VJU28ObuutHxIxSlH0ibn4HZqWmKWlTS652wIDAQABAoIBAGtPcUTTw2sJlR3x
- 4k2wfAvLexkHNbZhBdKEa5JiO5mWPuLKwUiZEY2CU7Gd6csG3oqNWcm7/IjtC7dz
- xV8p4yp8T4yq7vQIJ93B80NqTLtBD2QTvG2RCMJEPMzJUObWxkVmyVpLQyZo7KOd
- KE/OM+aj94OUeEYLjRkSCScz1Gvq/qFG/nAy7KPCmN9JDHuhX26WHo2Rr1OnPNT/
- 7diph0bB9F3b8gjjNTqXDrpdAqVOgR/PsjEBz6DMY+bdyMIn87q2yfmMexxRofN6
- LulpzSaa6Yup8N8H6PzVO6KAkQuf1aQRj0sMwGk1IZEnj6I0KbuHIZkw21Nc6sf2
- ESFySDECgYEA1PnCNn5tmLnwe62Ttmrzl20zIS3Me1gUVJ1NTfr6+ai0I9iMYU21
- 5czuAjJPm9JKQF2vY8UAaCj2ZoObtHa/anb3xsCd8NXoM3iJq5JDoXI1ldz3Y+ad
- U/bZUg1DLRvAniTuXmw9iOTwTwPxlDIGq5k+wG2Xmi1lk7zH8ezr9BMCgYEA0gfk
- EhgcmPH8Z5cU3YYwOdt6HSJOM0OyN4k/5gnkv+HYVoJTj02gkrJmLr+mi1ugKj46
- 7huYO9TVnrKP21tmbaSv1dp5hS3letVRIxSloEtVGXmmdvJvBRzDWos+G+KcvADi
- fFCz6w8v9NmO40CB7y/3SxTmSiSxDQeoi9LhDBkCgYEAsPgMWm25sfOnkY2NNUIv
- wT8bAlHlHQT2d8zx5H9NttBpR3P0ShJhuF8N0sNthSQ7ULrIN5YGHYcUH+DyLAWU
- TuomP3/kfa+xL7vUYb269tdJEYs4AkoppxBySoz8qenqpz422D0G8M6TpIS5Y5Qi
- GMrQ6uLl21YnlpiCaFOfSQMCgYEAmZxj1kgEQmhZrnn1LL/D7czz1vMMNrpAUhXz
- wg9iWmSXkU3oR1sDIceQrIhHCo2M6thwyU0tXjUft93pEQocM/zLDaGoVxtmRxxV
- J08mg8IVD3jFoyFUyWxsBIDqgAKRl38eJsXvkO+ep3mm49Z+Ma3nM+apN3j2dQ0w
- 3HLzXaECgYBFLMEAboVFwi5+MZjGvqtpg2PVTisfuJy2eYnPwHs+AXUgi/xRNFjI
- YHEa7UBPb5TEPSzWImQpETi2P5ywcUYL1EbN/nqPWmjFnat8wVmJtV4sUpJhubF4
- Vqm9LxIWc1uQ1q1HDCejRIxIN3aSH+wgRS3Kcj8kCTIoXd1aERb04g==
- -----END RSA PRIVATE KEY-----
- '';
+ dbFile = "/var/keys/gitlab/db";
+ secretFile = "/var/keys/gitlab/secret";
+ otpFile = "/var/keys/gitlab/otp";
+ jwsFile = "/var/keys/gitlab/jws";
};
extraConfig = {
gitlab = {
@@ -113,12 +85,16 @@ services.gitlab = {
- If you're setting up a new Gitlab instance, generate new secrets. You for
- instance use tr -dc A-Za-z0-9 < /dev/urandom | head -c
- 128 to generate a new secret. Gitlab encrypts sensitive data
- stored in the database. If you're restoring an existing Gitlab instance, you
- must specify the secrets secret from config/secrets.yml
- located in your Gitlab state folder.
+ If you're setting up a new Gitlab instance, generate new
+ secrets. You for instance use tr -dc A-Za-z0-9 <
+ /dev/urandom | head -c 128 > /var/keys/gitlab/db to
+ generate a new db secret. Make sure the files can be read by, and
+ only by, the user specified by services.gitlab.user. Gitlab
+ encrypts sensitive data stored in the database. If you're restoring
+ an existing Gitlab instance, you must specify the secrets secret
+ from config/secrets.yml located in your Gitlab
+ state folder.
diff --git a/nixos/modules/services/misc/gitolite.nix b/nixos/modules/services/misc/gitolite.nix
index c7f2a168f8ab..cc69f81bbcc4 100644
--- a/nixos/modules/services/misc/gitolite.nix
+++ b/nixos/modules/services/misc/gitolite.nix
@@ -143,21 +143,37 @@ in
users.users.${cfg.user} = {
description = "Gitolite user";
home = cfg.dataDir;
- createHome = true;
uid = config.ids.uids.gitolite;
group = cfg.group;
useDefaultShell = true;
};
- users.groups."${cfg.group}".gid = config.ids.gids.gitolite;
+ users.groups.${cfg.group}.gid = config.ids.gids.gitolite;
- systemd.services."gitolite-init" = {
+ systemd.tmpfiles.rules = [
+ "d '${cfg.dataDir}' 0750 ${cfg.user} ${cfg.group} - -"
+ "d '${cfg.dataDir}'/.gitolite - ${cfg.user} ${cfg.group} - -"
+ "d '${cfg.dataDir}'/.gitolite/logs - ${cfg.user} ${cfg.group} - -"
+
+ "Z ${cfg.dataDir} 0750 ${cfg.user} ${cfg.group} - -"
+ ];
+
+ systemd.services.gitolite-init = {
description = "Gitolite initialization";
wantedBy = [ "multi-user.target" ];
unitConfig.RequiresMountsFor = cfg.dataDir;
- serviceConfig.User = "${cfg.user}";
- serviceConfig.Type = "oneshot";
- serviceConfig.RemainAfterExit = true;
+ environment = {
+ GITOLITE_RC = ".gitolite.rc";
+ GITOLITE_RC_DEFAULT = "${rcDir}/gitolite.rc.default";
+ };
+
+ serviceConfig = {
+ Type = "oneshot";
+ User = cfg.user;
+ Group = cfg.group;
+ WorkingDirectory = "~";
+ RemainAfterExit = true;
+ };
path = [ pkgs.gitolite pkgs.git pkgs.perl pkgs.bash pkgs.diffutils config.programs.ssh.package ];
script =
@@ -187,11 +203,6 @@ in
'';
in
''
- cd ${cfg.dataDir}
- mkdir -p .gitolite/logs
-
- GITOLITE_RC=.gitolite.rc
- GITOLITE_RC_DEFAULT=${rcDir}/gitolite.rc.default
if ( [[ ! -e "$GITOLITE_RC" ]] && [[ ! -L "$GITOLITE_RC" ]] ) ||
( [[ -f "$GITOLITE_RC" ]] && diff -q "$GITOLITE_RC" "$GITOLITE_RC_DEFAULT" >/dev/null ) ||
( [[ -L "$GITOLITE_RC" ]] && [[ "$(readlink "$GITOLITE_RC")" =~ ^/nix/store/ ]] )
diff --git a/nixos/modules/services/misc/home-assistant.nix b/nixos/modules/services/misc/home-assistant.nix
index f1b351246740..74702c97f551 100644
--- a/nixos/modules/services/misc/home-assistant.nix
+++ b/nixos/modules/services/misc/home-assistant.nix
@@ -224,6 +224,7 @@ in {
KillSignal = "SIGINT";
PrivateTmp = true;
RemoveIPC = true;
+ AmbientCapabilities = "cap_net_raw,cap_net_admin+eip";
};
path = [
"/run/wrappers" # needed for ping
diff --git a/nixos/modules/services/misc/lidarr.nix b/nixos/modules/services/misc/lidarr.nix
index 40755c162171..8ff1adadcf23 100644
--- a/nixos/modules/services/misc/lidarr.nix
+++ b/nixos/modules/services/misc/lidarr.nix
@@ -10,6 +10,12 @@ in
services.lidarr = {
enable = mkEnableOption "Lidarr";
+ dataDir = mkOption {
+ type = types.str;
+ default = "/var/lib/lidarr/.config/Lidarr";
+ description = "The directory where Lidarr stores its data files.";
+ };
+
package = mkOption {
type = types.package;
default = pkgs.lidarr;
@@ -44,6 +50,10 @@ in
};
config = mkIf cfg.enable {
+ systemd.tmpfiles.rules = [
+ "d '${cfg.dataDir}' 0700 ${cfg.user} ${cfg.group} - -"
+ ];
+
systemd.services.lidarr = {
description = "Lidarr";
after = [ "network.target" ];
@@ -53,11 +63,8 @@ in
Type = "simple";
User = cfg.user;
Group = cfg.group;
- ExecStart = "${cfg.package}/bin/Lidarr";
+ ExecStart = "${cfg.package}/bin/Lidarr -nobrowser -data='${cfg.dataDir}'";
Restart = "on-failure";
-
- StateDirectory = "lidarr";
- StateDirectoryMode = "0770";
};
};
diff --git a/nixos/modules/services/misc/logkeys.nix b/nixos/modules/services/misc/logkeys.nix
index ad13d9eaa674..0082db63a06a 100644
--- a/nixos/modules/services/misc/logkeys.nix
+++ b/nixos/modules/services/misc/logkeys.nix
@@ -11,7 +11,7 @@ in {
device = mkOption {
description = "Use the given device as keyboard input event device instead of /dev/input/eventX default.";
default = null;
- type = types.nullOr types.string;
+ type = types.nullOr types.str;
example = "/dev/input/event15";
};
};
diff --git a/nixos/modules/services/misc/mantisbt.nix b/nixos/modules/services/misc/mantisbt.nix
deleted file mode 100644
index 7e3474feb672..000000000000
--- a/nixos/modules/services/misc/mantisbt.nix
+++ /dev/null
@@ -1,68 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-with lib;
-let
- cfg = config.services.mantisbt;
-
- freshInstall = cfg.extraConfig == "";
-
- # combined code+config directory
- mantisbt = let
- config_inc = pkgs.writeText "config_inc.php" ("Java KeyStore file containing the certificates.
+ '';
+ };
+
+ };
+
+ openFirewall = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Open ports in the firewall for Metabase.
+ '';
+ };
+ };
+
+ };
+
+ config = mkIf cfg.enable {
+
+ systemd.services.metabase = {
+ description = "Metabase server";
+ wantedBy = [ "multi-user.target" ];
+ after = [ "network-online.target" ];
+ environment = {
+ MB_PLUGINS_DIR = "${dataDir}/plugins";
+ MB_DB_FILE = "${dataDir}/metabase.db";
+ MB_JETTY_HOST = cfg.listen.ip;
+ MB_JETTY_PORT = toString cfg.listen.port;
+ } // optionalAttrs (cfg.ssl.enable) {
+ MB_JETTY_SSL = true;
+ MB_JETTY_SSL_PORT = toString cfg.ssl.port;
+ MB_JETTY_SSL_KEYSTORE = cfg.ssl.keystore;
+ };
+ serviceConfig = {
+ DynamicUser = true;
+ StateDirectory = baseNameOf dataDir;
+ ExecStart = "${pkgs.metabase}/bin/metabase";
+ };
+ };
+
+ networking.firewall = mkIf cfg.openFirewall {
+ allowedTCPPorts = [ cfg.listen.port ] ++ optional cfg.ssl.enable cfg.ssl.port;
+ };
+
+ };
+}
diff --git a/nixos/modules/services/misc/mwlib.nix b/nixos/modules/services/misc/mwlib.nix
index a8edecff2a1e..6b41b552a86d 100644
--- a/nixos/modules/services/misc/mwlib.nix
+++ b/nixos/modules/services/misc/mwlib.nix
@@ -165,7 +165,7 @@ in
}; # options.services
- config = {
+ config = {
systemd.services.mwlib-nserve = mkIf cfg.nserve.enable
{
@@ -191,7 +191,6 @@ in
description = "mwlib job queue server";
wantedBy = [ "multi-user.target" ];
- after = [ "network.target" "local-fs.target" ];
preStart = ''
mkdir -pv '${cfg.qserve.datadir}'
@@ -218,7 +217,7 @@ in
description = "mwlib worker";
wantedBy = [ "multi-user.target" ];
- after = [ "network.target" "local-fs.target" ];
+ after = [ "network.target" ];
preStart = ''
mkdir -pv '${cfg.nslave.cachedir}'
diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix
index 6bc88c66dc19..c1754c0e0ecb 100644
--- a/nixos/modules/services/misc/nix-daemon.nix
+++ b/nixos/modules/services/misc/nix-daemon.nix
@@ -8,7 +8,9 @@ let
nix = cfg.package.out;
- isNix20 = versionAtLeast (getVersion nix) "2.0pre";
+ nixVersion = getVersion nix;
+
+ isNix23 = versionAtLeast nixVersion "2.3pre";
makeNixBuildUser = nr:
{ name = "nixbld${toString nr}";
@@ -25,42 +27,32 @@ let
nixbldUsers = map makeNixBuildUser (range 1 cfg.nrBuildUsers);
nixConf =
- let
- # In Nix < 2.0, If we're using sandbox for builds, then provide
- # /bin/sh in the sandbox as a bind-mount to bash. This means we
- # also need to include the entire closure of bash. Nix >= 2.0
- # provides a /bin/sh by default.
- sh = pkgs.runtimeShell;
- binshDeps = pkgs.writeReferencesToFile sh;
- in
- pkgs.runCommand "nix.conf" { preferLocalBuild = true; extraOptions = cfg.extraOptions; } (''
- ${optionalString (!isNix20) ''
- extraPaths=$(for i in $(cat ${binshDeps}); do if test -d $i; then echo $i; fi; done)
- ''}
+ assert versionAtLeast nixVersion "2.2";
+ pkgs.runCommand "nix.conf" { preferLocalBuild = true; extraOptions = cfg.extraOptions; } (
+ ''
cat > $out </dev/null
+ NIX_CONF_DIR=$PWD ${cfg.package}/bin/nix show-config ${optionalString isNix23 "--no-net"} >/dev/null
'')
);
@@ -160,8 +152,8 @@ in
type = types.lines;
default = "";
example = ''
- gc-keep-outputs = true
- gc-keep-derivations = true
+ keep-outputs = true
+ keep-derivations = true
'';
description = "Additional text appended to nix.conf.";
};
@@ -416,8 +408,7 @@ in
systemd.services.nix-daemon =
{ path = [ nix pkgs.utillinux config.programs.ssh.package ]
- ++ optionals cfg.distributedBuilds [ pkgs.gzip ]
- ++ optionals (!isNix20) [ pkgs.openssl.bin ];
+ ++ optionals cfg.distributedBuilds [ pkgs.gzip ];
environment = cfg.envVars
// { CURL_CA_BUNDLE = "/etc/ssl/certs/ca-certificates.crt"; }
@@ -434,34 +425,13 @@ in
restartTriggers = [ nixConf ];
};
- nix.envVars =
- optionalAttrs (!isNix20) {
- NIX_CONF_DIR = "/etc/nix";
-
- # Enable the copy-from-other-stores substituter, which allows
- # builds to be sped up by copying build results from remote
- # Nix stores. To do this, mount the remote file system on a
- # subdirectory of /run/nix/remote-stores.
- NIX_OTHER_STORES = "/run/nix/remote-stores/*/nix";
- }
-
- // optionalAttrs (cfg.distributedBuilds && !isNix20) {
- NIX_BUILD_HOOK = "${nix}/libexec/nix/build-remote.pl";
- };
-
# Set up the environment variables for running Nix.
environment.sessionVariables = cfg.envVars //
{ NIX_PATH = cfg.nixPath;
};
- environment.extraInit = optionalString (!isNix20)
+ environment.extraInit =
''
- # Set up secure multi-user builds: non-root users build through the
- # Nix daemon.
- if [ "$USER" != root -o ! -w /nix/var/nix/db ]; then
- export NIX_REMOTE=daemon
- fi
- '' + ''
if [ -e "$HOME/.nix-defexpr/channels" ]; then
export NIX_PATH="$HOME/.nix-defexpr/channels''${NIX_PATH:+:$NIX_PATH}"
fi
@@ -473,21 +443,15 @@ in
services.xserver.displayManager.hiddenUsers = map ({ name, ... }: name) nixbldUsers;
- # FIXME: use systemd-tmpfiles to create Nix directories.
system.activationScripts.nix = stringAfter [ "etc" "users" ]
''
- # Nix initialisation.
- install -m 0755 -d \
- /nix/var/nix/gcroots \
- /nix/var/nix/temproots \
- /nix/var/nix/userpool \
- /nix/var/nix/profiles \
- /nix/var/nix/db \
- /nix/var/log/nix/drvs
- install -m 1777 -d \
- /nix/var/nix/gcroots/per-user \
- /nix/var/nix/profiles/per-user \
- /nix/var/nix/gcroots/tmp
+ # Create directories in /nix.
+ ${nix}/bin/nix ping-store --no-net
+
+ # Subscribe the root user to the NixOS channel by default.
+ if [ ! -e "/root/.nix-channels" ]; then
+ echo "${config.system.defaultChannel} nixos" > "/root/.nix-channels"
+ fi
'';
nix.systemFeatures = mkDefault (
@@ -495,12 +459,12 @@ in
optionals (pkgs.stdenv.isx86_64 && pkgs.hostPlatform.platform ? gcc.arch) (
# a x86_64 builder can run code for `platform.gcc.arch` and minor architectures:
[ "gccarch-${pkgs.hostPlatform.platform.gcc.arch}" ] ++ {
- "sandybridge" = [ "gccarch-westmere" ];
- "ivybridge" = [ "gccarch-westmere" "gccarch-sandybridge" ];
- "haswell" = [ "gccarch-westmere" "gccarch-sandybridge" "gccarch-ivybridge" ];
- "broadwell" = [ "gccarch-westmere" "gccarch-sandybridge" "gccarch-ivybridge" "gccarch-haswell" ];
- "skylake" = [ "gccarch-westmere" "gccarch-sandybridge" "gccarch-ivybridge" "gccarch-haswell" "gccarch-broadwell" ];
- "skylake-avx512" = [ "gccarch-westmere" "gccarch-sandybridge" "gccarch-ivybridge" "gccarch-haswell" "gccarch-broadwell" "gccarch-skylake" ];
+ sandybridge = [ "gccarch-westmere" ];
+ ivybridge = [ "gccarch-westmere" "gccarch-sandybridge" ];
+ haswell = [ "gccarch-westmere" "gccarch-sandybridge" "gccarch-ivybridge" ];
+ broadwell = [ "gccarch-westmere" "gccarch-sandybridge" "gccarch-ivybridge" "gccarch-haswell" ];
+ skylake = [ "gccarch-westmere" "gccarch-sandybridge" "gccarch-ivybridge" "gccarch-haswell" "gccarch-broadwell" ];
+ skylake-avx512 = [ "gccarch-westmere" "gccarch-sandybridge" "gccarch-ivybridge" "gccarch-haswell" "gccarch-broadwell" "gccarch-skylake" ];
}.${pkgs.hostPlatform.platform.gcc.arch} or []
)
);
diff --git a/nixos/modules/services/misc/nix-optimise.nix b/nixos/modules/services/misc/nix-optimise.nix
index 416529f690e0..e02026d5f76c 100644
--- a/nixos/modules/services/misc/nix-optimise.nix
+++ b/nixos/modules/services/misc/nix-optimise.nix
@@ -40,8 +40,8 @@ in
systemd.services.nix-optimise =
{ description = "Nix Store Optimiser";
- # No point running it inside a nixos-container. It should be on the host instead.
- unitConfig.ConditionVirtualization = "!container";
+ # No point this if the nix daemon (and thus the nix store) is outside
+ unitConfig.ConditionPathIsReadWrite = "/nix/var/nix/daemon-socket";
serviceConfig.ExecStart = "${config.nix.package}/bin/nix-store --optimise";
startAt = optionals cfg.automatic cfg.dates;
};
diff --git a/nixos/modules/services/misc/nixos-manual.nix b/nixos/modules/services/misc/nixos-manual.nix
index df3e71c80dea..20ba3d8ef0bc 100644
--- a/nixos/modules/services/misc/nixos-manual.nix
+++ b/nixos/modules/services/misc/nixos-manual.nix
@@ -54,7 +54,7 @@ in
(mkIf (cfg.showManual && cfgd.enable && cfgd.nixos.enable) {
boot.extraTTYs = [ "tty${toString cfg.ttyNumber}" ];
- systemd.services."nixos-manual" = {
+ systemd.services.nixos-manual = {
description = "NixOS Manual";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
diff --git a/nixos/modules/services/misc/paperless.nix b/nixos/modules/services/misc/paperless.nix
index 4e6cd80e2425..3985dc0b303c 100644
--- a/nixos/modules/services/misc/paperless.nix
+++ b/nixos/modules/services/misc/paperless.nix
@@ -50,7 +50,7 @@ in
};
ocrLanguages = mkOption {
- type = with types; nullOr (listOf string);
+ type = with types; nullOr (listOf str);
default = null;
description = ''
Languages available for OCR via Tesseract, specified as
diff --git a/nixos/modules/services/misc/pykms.nix b/nixos/modules/services/misc/pykms.nix
index ef90d124a284..e2d1254602b0 100644
--- a/nixos/modules/services/misc/pykms.nix
+++ b/nixos/modules/services/misc/pykms.nix
@@ -4,12 +4,13 @@ with lib;
let
cfg = config.services.pykms;
+ libDir = "/var/lib/pykms";
in {
meta.maintainers = with lib.maintainers; [ peterhoeg ];
options = {
- services.pykms = rec {
+ services.pykms = {
enable = mkOption {
type = types.bool;
default = false;
@@ -28,12 +29,6 @@ in {
description = "The port on which to listen.";
};
- verbose = mkOption {
- type = types.bool;
- default = false;
- description = "Show verbose output.";
- };
-
openFirewallPort = mkOption {
type = types.bool;
default = false;
@@ -45,30 +40,44 @@ in {
default = "64M";
description = "How much memory to use at most.";
};
+
+ logLevel = mkOption {
+ type = types.enum [ "CRITICAL" "ERROR" "WARNING" "INFO" "DEBUG" "MINI" ];
+ default = "INFO";
+ description = "How much to log";
+ };
+
+ extraArgs = mkOption {
+ type = types.listOf types.str;
+ default = [];
+ description = "Additional arguments";
+ };
};
};
config = mkIf cfg.enable {
networking.firewall.allowedTCPPorts = lib.mkIf cfg.openFirewallPort [ cfg.port ];
- systemd.services.pykms = let
- home = "/var/lib/pykms";
- in {
+ systemd.services.pykms = {
description = "Python KMS";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
# python programs with DynamicUser = true require HOME to be set
- environment.HOME = home;
+ environment.HOME = libDir;
serviceConfig = with pkgs; {
DynamicUser = true;
- StateDirectory = baseNameOf home;
- ExecStartPre = "${getBin pykms}/bin/create_pykms_db.sh ${home}/clients.db";
+ StateDirectory = baseNameOf libDir;
+ ExecStartPre = "${getBin pykms}/libexec/create_pykms_db.sh ${libDir}/clients.db";
ExecStart = lib.concatStringsSep " " ([
- "${getBin pykms}/bin/server.py"
+ "${getBin pykms}/bin/server"
+ "--logfile STDOUT"
+ "--loglevel ${cfg.logLevel}"
+ ] ++ cfg.extraArgs ++ [
cfg.listenAddress
(toString cfg.port)
- ] ++ lib.optional cfg.verbose "--verbose");
- WorkingDirectory = home;
+ ]);
+ ProtectHome = "tmpfs";
+ WorkingDirectory = libDir;
Restart = "on-failure";
MemoryLimit = cfg.memoryLimit;
};
diff --git a/nixos/modules/services/misc/serviio.nix b/nixos/modules/services/misc/serviio.nix
index 8808f2d21931..9868192724b5 100644
--- a/nixos/modules/services/misc/serviio.nix
+++ b/nixos/modules/services/misc/serviio.nix
@@ -10,7 +10,7 @@ let
#!${pkgs.bash}/bin/sh
SERVIIO_HOME=${pkgs.serviio}
-
+
# Setup the classpath
SERVIIO_CLASS_PATH="$SERVIIO_HOME/lib/*:$SERVIIO_HOME/config"
@@ -21,13 +21,13 @@ let
# Execute the JVM in the foreground
exec ${pkgs.jre}/bin/java -Xmx512M -Xms20M -XX:+UseG1GC -XX:GCTimeRatio=1 -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 $JAVA_OPTS -classpath "$SERVIIO_CLASS_PATH" org.serviio.MediaServer "$@"
'';
-
+
in {
###### interface
options = {
services.serviio = {
-
+
enable = mkOption {
type = types.bool;
default = false;
@@ -52,7 +52,7 @@ in {
config = mkIf cfg.enable {
systemd.services.serviio = {
description = "Serviio Media Server";
- after = [ "local-fs.target" "network.target" ];
+ after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
path = [ pkgs.serviio ];
serviceConfig = {
@@ -64,7 +64,7 @@ in {
};
users.users = [
- {
+ {
name = "serviio";
group = "serviio";
home = cfg.dataDir;
@@ -75,16 +75,16 @@ in {
];
users.groups = [
- { name = "serviio";}
+ { name = "serviio";}
];
networking.firewall = {
- allowedTCPPorts = [
+ allowedTCPPorts = [
8895 # serve UPnP responses
23423 # console
23424 # mediabrowser
];
- allowedUDPPorts = [
+ allowedUDPPorts = [
1900 # UPnP service discovey
];
};
diff --git a/nixos/modules/services/misc/snapper.nix b/nixos/modules/services/misc/snapper.nix
index 62b344d11b06..6f3aaa973a04 100644
--- a/nixos/modules/services/misc/snapper.nix
+++ b/nixos/modules/services/misc/snapper.nix
@@ -44,7 +44,7 @@ in
configs = mkOption {
default = { };
example = literalExample {
- "home" = {
+ home = {
subvolume = "/home";
extraConfig = ''
ALLOW_USERS="alice"
diff --git a/nixos/modules/services/misc/subsonic.nix b/nixos/modules/services/misc/subsonic.nix
index 1612b197f35f..152917d345cc 100644
--- a/nixos/modules/services/misc/subsonic.nix
+++ b/nixos/modules/services/misc/subsonic.nix
@@ -17,7 +17,7 @@ let cfg = config.services.subsonic; in {
};
listenAddress = mkOption {
- type = types.string;
+ type = types.str;
default = "0.0.0.0";
description = ''
The host name or IP address on which to bind Subsonic.
@@ -105,7 +105,7 @@ let cfg = config.services.subsonic; in {
config = mkIf cfg.enable {
systemd.services.subsonic = {
description = "Personal media streamer";
- after = [ "local-fs.target" "network.target" ];
+ after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
script = ''
${pkgs.jre}/bin/java -Xmx${toString cfg.maxMemory}m \
diff --git a/nixos/modules/services/misc/synergy.nix b/nixos/modules/services/misc/synergy.nix
index b89cb41ac3ad..bfab8c534d8c 100644
--- a/nixos/modules/services/misc/synergy.nix
+++ b/nixos/modules/services/misc/synergy.nix
@@ -83,7 +83,7 @@ in
config = mkMerge [
(mkIf cfgC.enable {
- systemd.user.services."synergy-client" = {
+ systemd.user.services.synergy-client = {
after = [ "network.target" "graphical-session.target" ];
description = "Synergy client";
wantedBy = optional cfgC.autoStart "graphical-session.target";
@@ -93,7 +93,7 @@ in
};
})
(mkIf cfgS.enable {
- systemd.user.services."synergy-server" = {
+ systemd.user.services.synergy-server = {
after = [ "network.target" "graphical-session.target" ];
description = "Synergy server";
wantedBy = optional cfgS.autoStart "graphical-session.target";
diff --git a/nixos/modules/services/misc/uhub.nix b/nixos/modules/services/misc/uhub.nix
index 005951b9231e..753580c3e404 100644
--- a/nixos/modules/services/misc/uhub.nix
+++ b/nixos/modules/services/misc/uhub.nix
@@ -51,7 +51,7 @@ in
};
address = mkOption {
- type = types.string;
+ type = types.str;
default = "any";
description = "Address to bind the hub to.";
};
@@ -83,7 +83,7 @@ in
description = "Whether to enable the Sqlite authentication database plugin";
};
file = mkOption {
- type = types.string;
+ type = types.path;
example = "/var/db/uhub-users";
description = "Path to user database. Use the uhub-passwd utility to create the database and add/remove users.";
};
@@ -96,7 +96,7 @@ in
description = "Whether to enable the logging plugin.";
};
file = mkOption {
- type = types.string;
+ type = types.str;
default = "";
description = "Path of log file.";
};
@@ -117,7 +117,7 @@ in
default = "";
type = types.lines;
description = ''
- Welcome message displayed to clients after connecting
+ Welcome message displayed to clients after connecting
and with the !motd command.
'';
};
@@ -183,4 +183,4 @@ in
};
};
-}
\ No newline at end of file
+}
diff --git a/nixos/modules/services/misc/zoneminder.nix b/nixos/modules/services/misc/zoneminder.nix
index cf56ae89b399..3bff04e7127d 100644
--- a/nixos/modules/services/misc/zoneminder.nix
+++ b/nixos/modules/services/misc/zoneminder.nix
@@ -2,6 +2,7 @@
let
cfg = config.services.zoneminder;
+ fpm = config.services.phpfpm.pools.zoneminder;
pkg = pkgs.zoneminder;
dirName = pkg.dirName;
@@ -10,7 +11,7 @@ let
group = {
nginx = config.services.nginx.group;
none = user;
- }."${cfg.webserver}";
+ }.${cfg.webserver};
useNginx = cfg.webserver == "nginx";
@@ -19,8 +20,6 @@ let
useCustomDir = cfg.storageDir != null;
- socket = "/run/phpfpm/${dirName}.sock";
-
zms = "/cgi-bin/zms";
dirs = dirList: [ dirName ] ++ map (e: "${dirName}/${e}") dirList;
@@ -201,7 +200,10 @@ in {
"zoneminder/80-nixos.conf".source = configFile;
};
- networking.firewall.allowedTCPPorts = lib.mkIf cfg.openFirewall [ cfg.port ];
+ networking.firewall.allowedTCPPorts = lib.mkIf cfg.openFirewall [
+ cfg.port
+ 6802 # zmtrigger
+ ];
services = {
fcgiwrap = lib.mkIf useNginx {
@@ -223,7 +225,7 @@ in {
nginx = lib.mkIf useNginx {
enable = true;
virtualHosts = {
- "${cfg.hostname}" = {
+ ${cfg.hostname} = {
default = true;
root = "${pkg}/share/zoneminder/www";
listen = [ { addr = "0.0.0.0"; inherit (cfg) port; } ];
@@ -274,7 +276,7 @@ in {
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_param HTTP_PROXY "";
- fastcgi_pass unix:${socket};
+ fastcgi_pass unix:${fpm.socket};
}
}
'';
@@ -284,36 +286,33 @@ in {
phpfpm = lib.mkIf useNginx {
pools.zoneminder = {
- listen = socket;
+ inherit user group;
phpOptions = ''
date.timezone = "${config.time.timeZone}"
${lib.concatStringsSep "\n" (map (e:
"extension=${e.pkg}/lib/php/extensions/${e.name}.so") phpExtensions)}
'';
- extraConfig = ''
- user = ${user}
- group = ${group}
+ settings = lib.mapAttrs (name: lib.mkDefault) {
+ "listen.owner" = user;
+ "listen.group" = group;
+ "listen.mode" = "0660";
- listen.owner = ${user}
- listen.group = ${group}
- listen.mode = 0660
-
- pm = dynamic
- pm.start_servers = 1
- pm.min_spare_servers = 1
- pm.max_spare_servers = 2
- pm.max_requests = 500
- pm.max_children = 5
- pm.status_path = /$pool-status
- ping.path = /$pool-ping
- '';
+ "pm" = "dynamic";
+ "pm.start_servers" = 1;
+ "pm.min_spare_servers" = 1;
+ "pm.max_spare_servers" = 2;
+ "pm.max_requests" = 500;
+ "pm.max_children" = 5;
+ "pm.status_path" = "/$pool-status";
+ "ping.path" = "/$pool-ping";
+ };
};
};
};
systemd.services = {
- zoneminder = with pkgs; rec {
+ zoneminder = with pkgs; {
inherit (zoneminder.meta) description;
documentation = [ "https://zoneminder.readthedocs.org/en/latest/" ];
path = [
@@ -357,11 +356,11 @@ in {
};
};
- users.groups."${user}" = {
+ users.groups.${user} = {
gid = config.ids.gids.zoneminder;
};
- users.users."${user}" = {
+ users.users.${user} = {
uid = config.ids.uids.zoneminder;
group = user;
inherit home;
diff --git a/nixos/modules/services/misc/zookeeper.nix b/nixos/modules/services/misc/zookeeper.nix
index 50c84e3c6b80..5d91e44a199d 100644
--- a/nixos/modules/services/misc/zookeeper.nix
+++ b/nixos/modules/services/misc/zookeeper.nix
@@ -121,6 +121,7 @@ in {
systemd.tmpfiles.rules = [
"d '${cfg.dataDir}' 0700 zookeeper - - -"
+ "Z '${cfg.dataDir}' 0700 zookeeper - - -"
];
systemd.services.zookeeper = {
diff --git a/nixos/modules/services/monitoring/apcupsd.nix b/nixos/modules/services/monitoring/apcupsd.nix
index 49957e652900..75218aa1d46b 100644
--- a/nixos/modules/services/monitoring/apcupsd.nix
+++ b/nixos/modules/services/monitoring/apcupsd.nix
@@ -91,7 +91,7 @@ in
BATTERYLEVEL 50
MINUTES 5
'';
- type = types.string;
+ type = types.lines;
description = ''
Contents of the runtime configuration file, apcupsd.conf. The default
settings makes apcupsd autodetect USB UPSes, limit network access to
@@ -106,7 +106,7 @@ in
example = {
doshutdown = ''# shell commands to notify that the computer is shutting down'';
};
- type = types.attrsOf types.string;
+ type = types.attrsOf types.lines;
description = ''
Each attribute in this option names an apcupsd event and the string
value it contains will be executed in a shell, in response to that
diff --git a/nixos/modules/services/monitoring/bosun.nix b/nixos/modules/services/monitoring/bosun.nix
index 8bf741adb6e3..b1c12cce1f80 100644
--- a/nixos/modules/services/monitoring/bosun.nix
+++ b/nixos/modules/services/monitoring/bosun.nix
@@ -41,7 +41,7 @@ in {
};
user = mkOption {
- type = types.string;
+ type = types.str;
default = "bosun";
description = ''
User account under which bosun runs.
@@ -49,7 +49,7 @@ in {
};
group = mkOption {
- type = types.string;
+ type = types.str;
default = "bosun";
description = ''
Group account under which bosun runs.
@@ -57,7 +57,7 @@ in {
};
opentsdbHost = mkOption {
- type = types.nullOr types.string;
+ type = types.nullOr types.str;
default = "localhost:4242";
description = ''
Host and port of the OpenTSDB database that stores bosun data.
@@ -66,7 +66,7 @@ in {
};
influxHost = mkOption {
- type = types.nullOr types.string;
+ type = types.nullOr types.str;
default = null;
example = "localhost:8086";
description = ''
@@ -75,7 +75,7 @@ in {
};
listenAddress = mkOption {
- type = types.string;
+ type = types.str;
default = ":8070";
description = ''
The host address and port that bosun's web interface will listen on.
diff --git a/nixos/modules/services/monitoring/cadvisor.nix b/nixos/modules/services/monitoring/cadvisor.nix
index 6ca420a05b23..695a8c42e85e 100644
--- a/nixos/modules/services/monitoring/cadvisor.nix
+++ b/nixos/modules/services/monitoring/cadvisor.nix
@@ -84,6 +84,16 @@ in {
type = types.bool;
description = "Cadvisor storage driver, enable secure communication.";
};
+
+ extraOptions = mkOption {
+ type = types.listOf types.str;
+ default = [];
+ description = ''
+ Additional cadvisor options.
+
+ See for available options.
+ '';
+ };
};
};
@@ -112,6 +122,7 @@ in {
-logtostderr=true \
-listen_ip="${cfg.listenAddress}" \
-port="${toString cfg.port}" \
+ ${escapeShellArgs cfg.extraOptions} \
${optionalString (cfg.storageDriver != null) ''
-storage_driver "${cfg.storageDriver}" \
-storage_driver_user "${cfg.storageDriverHost}" \
diff --git a/nixos/modules/services/monitoring/collectd.nix b/nixos/modules/services/monitoring/collectd.nix
index 6a4c678eb21f..b2e44a1e3666 100644
--- a/nixos/modules/services/monitoring/collectd.nix
+++ b/nixos/modules/services/monitoring/collectd.nix
@@ -16,13 +16,29 @@ let
NotifyLevel "OKAY"
+ ${concatStrings (mapAttrsToList (plugin: pluginConfig: ''
+ LoadPlugin ${plugin}
+
+ ${pluginConfig}
+
+ '') cfg.plugins)}
+
${concatMapStrings (f: ''
- Include "${f}"
+ Include "${f}"
'') cfg.include}
${cfg.extraConfig}
'';
+ package =
+ if cfg.buildMinimalPackage
+ then minimalPackage
+ else cfg.package;
+
+ minimalPackage = cfg.package.override {
+ enabledPlugins = [ "syslog" ] ++ builtins.attrNames cfg.plugins;
+ };
+
in {
options.services.collectd = with types; {
enable = mkEnableOption "collectd agent";
@@ -33,7 +49,15 @@ in {
description = ''
Which collectd package to use.
'';
- type = package;
+ type = types.package;
+ };
+
+ buildMinimalPackage = mkOption {
+ default = false;
+ description = ''
+ Build a minimal collectd package with only the configured `services.collectd.plugins`
+ '';
+ type = types.bool;
};
user = mkOption {
@@ -68,6 +92,15 @@ in {
type = listOf str;
};
+ plugins = mkOption {
+ default = {};
+ example = { cpu = ""; memory = ""; network = "Server 192.168.1.1 25826"; };
+ description = ''
+ Attribute set of plugin names to plugin config segments
+ '';
+ type = types.attrsOf types.str;
+ };
+
extraConfig = mkOption {
default = "";
description = ''
@@ -89,7 +122,7 @@ in {
wantedBy = [ "multi-user.target" ];
serviceConfig = {
- ExecStart = "${cfg.package}/sbin/collectd -C ${conf} -f";
+ ExecStart = "${package}/sbin/collectd -C ${conf} -f";
User = cfg.user;
Restart = "on-failure";
RestartSec = 3;
diff --git a/nixos/modules/services/monitoring/datadog-agent.nix b/nixos/modules/services/monitoring/datadog-agent.nix
index ce3d53fb2c17..02a9f316fc32 100644
--- a/nixos/modules/services/monitoring/datadog-agent.nix
+++ b/nixos/modules/services/monitoring/datadog-agent.nix
@@ -42,9 +42,9 @@ let
# Apply the configured extraIntegrations to the provided agent
# package. See the documentation of `dd-agent/integrations-core.nix`
# for detailed information on this.
- datadogPkg = cfg.package.overrideAttrs(_: {
- python = (pkgs.datadog-integrations-core cfg.extraIntegrations).python;
- });
+ datadogPkg = cfg.package.override {
+ pythonPackages = pkgs.datadog-integrations-core cfg.extraIntegrations;
+ };
in {
options.services.datadog-agent = {
enable = mkOption {
@@ -60,7 +60,7 @@ in {
defaultText = "pkgs.datadog-agent";
description = ''
Which DataDog v6 agent package to use. Note that the provided
- package is expected to have an overridable `python`-attribute
+ package is expected to have an overridable `pythonPackages`-attribute
which configures the Python environment with the Datadog
checks.
'';
@@ -87,7 +87,7 @@ in {
description = "The hostname to show in the Datadog dashboard (optional)";
default = null;
example = "mymachine.mydomain";
- type = types.uniq (types.nullOr types.string);
+ type = types.nullOr types.str;
};
logLevel = mkOption {
diff --git a/nixos/modules/services/monitoring/dd-agent/dd-agent.nix b/nixos/modules/services/monitoring/dd-agent/dd-agent.nix
index abc8d65d58f2..5ee6b092a6a4 100644
--- a/nixos/modules/services/monitoring/dd-agent/dd-agent.nix
+++ b/nixos/modules/services/monitoring/dd-agent/dd-agent.nix
@@ -145,47 +145,46 @@ in {
description = "The hostname to show in the Datadog dashboard (optional)";
default = null;
example = "mymachine.mydomain";
- type = types.uniq (types.nullOr types.string);
+ type = types.nullOr types.str;
};
postgresqlConfig = mkOption {
description = "Datadog PostgreSQL integration configuration";
default = null;
- type = types.uniq (types.nullOr types.string);
+ type = types.nullOr types.lines;
};
nginxConfig = mkOption {
description = "Datadog nginx integration configuration";
default = null;
- type = types.uniq (types.nullOr types.string);
+ type = types.nullOr types.lines;
};
mongoConfig = mkOption {
description = "MongoDB integration configuration";
default = null;
- type = types.uniq (types.nullOr types.string);
+ type = types.nullOr types.lines;
};
jmxConfig = mkOption {
description = "JMX integration configuration";
default = null;
- type = types.uniq (types.nullOr types.string);
+ type = types.nullOr types.lines;
};
processConfig = mkOption {
description = ''
Process integration configuration
-
- See http://docs.datadoghq.com/integrations/process/
+ See
'';
default = null;
- type = types.uniq (types.nullOr types.string);
+ type = types.nullOr types.lines;
};
};
config = mkIf cfg.enable {
- environment.systemPackages = [ pkgs."dd-agent" pkgs.sysstat pkgs.procps ];
+ environment.systemPackages = [ pkgs.dd-agent pkgs.sysstat pkgs.procps ];
users.users.datadog = {
description = "Datadog Agent User";
diff --git a/nixos/modules/services/monitoring/do-agent.nix b/nixos/modules/services/monitoring/do-agent.nix
new file mode 100644
index 000000000000..2d3fe2f79768
--- /dev/null
+++ b/nixos/modules/services/monitoring/do-agent.nix
@@ -0,0 +1,34 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+ cfg = config.services.do-agent;
+in
+{
+ options.services.do-agent = {
+ enable = mkEnableOption "do-agent, the DigitalOcean droplet metrics agent";
+ };
+
+ config = mkIf cfg.enable {
+ environment.systemPackages = [ pkgs.do-agent ];
+
+ systemd.services.do-agent = {
+ description = "DigitalOcean Droplet Metrics Agent";
+ wantedBy = [ "multi-user.target" ];
+ after = [ "network-online.target" ];
+ wants = [ "network-online.target" ];
+ serviceConfig = {
+ ExecStart = "${pkgs.do-agent}/bin/do-agent --syslog";
+ Restart = "always";
+ OOMScoreAdjust = -900;
+ SyslogIdentifier = "DigitalOceanAgent";
+ PrivateTmp = "yes";
+ ProtectSystem = "full";
+ ProtectHome = "yes";
+ NoNewPrivileges = "yes";
+ DynamicUser = "yes";
+ };
+ };
+ };
+}
diff --git a/nixos/modules/services/monitoring/fusion-inventory.nix b/nixos/modules/services/monitoring/fusion-inventory.nix
index 9c976c65ea49..b90579bb70c7 100644
--- a/nixos/modules/services/monitoring/fusion-inventory.nix
+++ b/nixos/modules/services/monitoring/fusion-inventory.nix
@@ -51,7 +51,7 @@ in {
description = "FusionInventory user";
};
- systemd.services."fusion-inventory" = {
+ systemd.services.fusion-inventory = {
description = "Fusion Inventory Agent";
wantedBy = [ "multi-user.target" ];
diff --git a/nixos/modules/services/monitoring/grafana.nix b/nixos/modules/services/monitoring/grafana.nix
index c2f6b585d493..bf1084eecc3a 100644
--- a/nixos/modules/services/monitoring/grafana.nix
+++ b/nixos/modules/services/monitoring/grafana.nix
@@ -503,12 +503,12 @@ in {
message = "Cannot set both adminPassword and adminPasswordFile";
}
{
- assertion = cfg.security.secretKeyFile != opt.security.secretKeyFile.default -> cfg.security.secretKeyFile == null;
+ assertion = cfg.security.secretKey != opt.security.secretKey.default -> cfg.security.secretKeyFile == null;
message = "Cannot set both secretKey and secretKeyFile";
}
{
assertion = cfg.smtp.password != opt.smtp.password.default -> cfg.smtp.passwordFile == null;
- message = "Cannot set both password and secretKeyFile";
+ message = "Cannot set both password and passwordFile";
}
];
diff --git a/nixos/modules/services/monitoring/graphite.nix b/nixos/modules/services/monitoring/graphite.nix
index d6473220c140..f7874af3df29 100644
--- a/nixos/modules/services/monitoring/graphite.nix
+++ b/nixos/modules/services/monitoring/graphite.nix
@@ -11,7 +11,7 @@ let
graphiteLocalSettingsDir = pkgs.runCommand "graphite_local_settings" {
inherit graphiteLocalSettings;
- preferLocalBuild = true;
+ preferLocalBuild = true;
} ''
mkdir -p $out
ln -s $graphiteLocalSettings $out/graphite_local_settings.py
@@ -215,7 +215,7 @@ in {
storageAggregation = mkOption {
description = "Defines how to aggregate data to lower-precision retentions.";
default = null;
- type = types.uniq (types.nullOr types.string);
+ type = types.nullOr types.str;
example = ''
[all_min]
pattern = \.min$
@@ -227,7 +227,7 @@ in {
storageSchemas = mkOption {
description = "Defines retention rates for storing metrics.";
default = "";
- type = types.uniq (types.nullOr types.string);
+ type = types.nullOr types.str;
example = ''
[apache_busyWorkers]
pattern = ^servers\.www.*\.workers\.busyWorkers$
@@ -238,14 +238,14 @@ in {
blacklist = mkOption {
description = "Any metrics received which match one of the experssions will be dropped.";
default = null;
- type = types.uniq (types.nullOr types.string);
- example = "^some\.noisy\.metric\.prefix\..*";
+ type = types.nullOr types.str;
+ example = "^some\\.noisy\\.metric\\.prefix\\..*";
};
whitelist = mkOption {
description = "Only metrics received which match one of the experssions will be persisted.";
default = null;
- type = types.uniq (types.nullOr types.string);
+ type = types.nullOr types.str;
example = ".*";
};
@@ -255,7 +255,7 @@ in {
in a search and replace fashion.
'';
default = null;
- type = types.uniq (types.nullOr types.string);
+ type = types.nullOr types.str;
example = ''
[post]
_sum$ =
@@ -272,7 +272,7 @@ in {
relayRules = mkOption {
description = "Relay rules are used to send certain metrics to a certain backend.";
default = null;
- type = types.uniq (types.nullOr types.string);
+ type = types.nullOr types.str;
example = ''
[example]
pattern = ^mydata\.foo\..+
@@ -289,7 +289,7 @@ in {
aggregationRules = mkOption {
description = "Defines if and how received metrics will be aggregated.";
default = null;
- type = types.uniq (types.nullOr types.string);
+ type = types.nullOr types.str;
example = ''
.applications..all.requests (60) = sum .applications..*.requests
.applications..all.latency (60) = avg .applications..*.latency
diff --git a/nixos/modules/services/monitoring/heapster.nix b/nixos/modules/services/monitoring/heapster.nix
index fbdff2eb5dbe..6da0831b4c5f 100644
--- a/nixos/modules/services/monitoring/heapster.nix
+++ b/nixos/modules/services/monitoring/heapster.nix
@@ -15,19 +15,19 @@ in {
source = mkOption {
description = "Heapster metric source";
example = "kubernetes:https://kubernetes.default";
- type = types.string;
+ type = types.str;
};
sink = mkOption {
description = "Heapster metic sink";
example = "influxdb:http://localhost:8086";
- type = types.string;
+ type = types.str;
};
extraOpts = mkOption {
description = "Heapster extra options";
default = "";
- type = types.string;
+ type = types.separatedString " ";
};
package = mkOption {
diff --git a/nixos/modules/services/monitoring/kapacitor.nix b/nixos/modules/services/monitoring/kapacitor.nix
index 0f236d25c9ed..9b4ff3c56124 100644
--- a/nixos/modules/services/monitoring/kapacitor.nix
+++ b/nixos/modules/services/monitoring/kapacitor.nix
@@ -116,17 +116,17 @@ in
url = mkOption {
description = "The URL to an InfluxDB server that serves as the default database";
example = "http://localhost:8086";
- type = types.string;
+ type = types.str;
};
username = mkOption {
description = "The username to connect to the remote InfluxDB server";
- type = types.string;
+ type = types.str;
};
password = mkOption {
description = "The password to connect to the remote InfluxDB server";
- type = types.string;
+ type = types.str;
};
};
@@ -137,7 +137,7 @@ in
description = "The URL to the Alerta REST API";
default = "http://localhost:5000";
example = "http://localhost:5000";
- type = types.string;
+ type = types.str;
};
token = mkOption {
diff --git a/nixos/modules/services/monitoring/loki.nix b/nixos/modules/services/monitoring/loki.nix
index 4d11360d07e9..f4eec7e0d284 100644
--- a/nixos/modules/services/monitoring/loki.nix
+++ b/nixos/modules/services/monitoring/loki.nix
@@ -103,7 +103,7 @@ in {
PrivateTmp = true;
ProtectHome = true;
ProtectSystem = "full";
- DecvicePolicy = "closed";
+ DevicePolicy = "closed";
NoNewPrivileges = true;
WorkingDirectory = cfg.dataDir;
};
diff --git a/nixos/modules/services/monitoring/monit.nix b/nixos/modules/services/monitoring/monit.nix
index 32e14ab21ffc..ca9352272174 100644
--- a/nixos/modules/services/monitoring/monit.nix
+++ b/nixos/modules/services/monitoring/monit.nix
@@ -23,7 +23,7 @@ in
environment.systemPackages = [ pkgs.monit ];
- environment.etc."monitrc" = {
+ environment.etc.monitrc = {
text = cfg.config;
mode = "0400";
};
@@ -39,7 +39,7 @@ in
KillMode = "process";
Restart = "always";
};
- restartTriggers = [ config.environment.etc."monitrc".source ];
+ restartTriggers = [ config.environment.etc.monitrc.source ];
};
};
diff --git a/nixos/modules/services/monitoring/munin.nix b/nixos/modules/services/monitoring/munin.nix
index ffe223fedbe1..8af0650c7380 100644
--- a/nixos/modules/services/monitoring/munin.nix
+++ b/nixos/modules/services/monitoring/munin.nix
@@ -233,7 +233,7 @@ in
# In the meantime this at least suppresses a useless graph full of
# NaNs in the output.
default = [ "munin_stats" ];
- type = with types; listOf string;
+ type = with types; listOf str;
description = ''
Munin plugins to disable, even if
munin-node-configure --suggest tries to enable
diff --git a/nixos/modules/services/monitoring/netdata.nix b/nixos/modules/services/monitoring/netdata.nix
index f9b7550af23a..463b1b882acf 100644
--- a/nixos/modules/services/monitoring/netdata.nix
+++ b/nixos/modules/services/monitoring/netdata.nix
@@ -156,6 +156,8 @@ in {
};
};
+ systemd.enableCgroupAccounting = true;
+
security.wrappers."apps.plugin" = {
source = "${pkgs.netdata}/libexec/netdata/plugins.d/apps.plugin.org";
capabilities = "cap_dac_read_search,cap_sys_ptrace+ep";
diff --git a/nixos/modules/services/monitoring/prometheus/default.nix b/nixos/modules/services/monitoring/prometheus/default.nix
index d8384e0d35b3..191c0bff9c84 100644
--- a/nixos/modules/services/monitoring/prometheus/default.nix
+++ b/nixos/modules/services/monitoring/prometheus/default.nix
@@ -4,37 +4,14 @@ with lib;
let
cfg = config.services.prometheus;
- cfg2 = config.services.prometheus2;
- promUser = "prometheus";
- promGroup = "prometheus";
- stateDir =
- if cfg.stateDir != null
- then cfg.stateDir
- else
- if cfg.dataDir != null
- then
- # This assumes /var/lib/ is a prefix of cfg.dataDir.
- # This is checked as an assertion below.
- removePrefix stateDirBase cfg.dataDir
- else "prometheus";
- stateDirBase = "/var/lib/";
- workingDir = stateDirBase + stateDir;
- workingDir2 = stateDirBase + cfg2.stateDir;
+ workingDir = "/var/lib/" + cfg.stateDir;
# a wrapper that verifies that the configuration is valid
- promtoolCheck = what: name: file: pkgs.runCommand "${name}-${what}-checked"
- { buildInputs = [ cfg.package ]; } ''
- ln -s ${file} $out
- promtool ${what} $out
- '';
-
- # a wrapper that verifies that the configuration is valid for
- # prometheus 2
- prom2toolCheck = what: name: file:
+ promtoolCheck = what: name: file:
pkgs.runCommand
"${name}-${replaceStrings [" "] [""] what}-checked"
- { buildInputs = [ cfg2.package ]; } ''
+ { buildInputs = [ cfg.package ]; } ''
ln -s ${file} $out
promtool ${what} $out
'';
@@ -45,65 +22,34 @@ let
echo '${builtins.toJSON x}' | ${pkgs.jq}/bin/jq . > $out
'';
- # This becomes the main config file for Prometheus 1
+ generatedPrometheusYml = writePrettyJSON "prometheus.yml" promConfig;
+
+ # This becomes the main config file for Prometheus
promConfig = {
global = filterValidPrometheus cfg.globalConfig;
- rule_files = map (promtoolCheck "check-rules" "rules") (cfg.ruleFiles ++ [
+ rule_files = map (promtoolCheck "check rules" "rules") (cfg.ruleFiles ++ [
(pkgs.writeText "prometheus.rules" (concatStringsSep "\n" cfg.rules))
]);
scrape_configs = filterValidPrometheus cfg.scrapeConfigs;
+ alerting = {
+ inherit (cfg) alertmanagers;
+ };
};
- generatedPrometheusYml = writePrettyJSON "prometheus.yml" promConfig;
-
prometheusYml = let
yml = if cfg.configText != null then
pkgs.writeText "prometheus.yml" cfg.configText
else generatedPrometheusYml;
- in promtoolCheck "check-config" "prometheus.yml" yml;
+ in promtoolCheck "check config" "prometheus.yml" yml;
cmdlineArgs = cfg.extraFlags ++ [
- "-storage.local.path=${workingDir}/metrics"
- "-config.file=${prometheusYml}"
- "-web.listen-address=${cfg.listenAddress}"
- "-alertmanager.notification-queue-capacity=${toString cfg.alertmanagerNotificationQueueCapacity}"
- "-alertmanager.timeout=${toString cfg.alertmanagerTimeout}s"
+ "--storage.tsdb.path=${workingDir}/data/"
+ "--config.file=${prometheusYml}"
+ "--web.listen-address=${cfg.listenAddress}"
+ "--alertmanager.notification-queue-capacity=${toString cfg.alertmanagerNotificationQueueCapacity}"
+ "--alertmanager.timeout=${toString cfg.alertmanagerTimeout}s"
] ++
- optional (cfg.alertmanagerURL != []) "-alertmanager.url=${concatStringsSep "," cfg.alertmanagerURL}" ++
- optional (cfg.webExternalUrl != null) "-web.external-url=${cfg.webExternalUrl}";
-
- # This becomes the main config file for Prometheus 2
- promConfig2 = {
- global = filterValidPrometheus cfg2.globalConfig;
- rule_files = map (prom2toolCheck "check rules" "rules") (cfg2.ruleFiles ++ [
- (pkgs.writeText "prometheus.rules" (concatStringsSep "\n" cfg2.rules))
- ]);
- scrape_configs = filterValidPrometheus cfg2.scrapeConfigs;
- alerting = optionalAttrs (cfg2.alertmanagerURL != []) {
- alertmanagers = [{
- static_configs = [{
- targets = cfg2.alertmanagerURL;
- }];
- }];
- };
- };
-
- generatedPrometheus2Yml = writePrettyJSON "prometheus.yml" promConfig2;
-
- prometheus2Yml = let
- yml = if cfg2.configText != null then
- pkgs.writeText "prometheus.yml" cfg2.configText
- else generatedPrometheus2Yml;
- in prom2toolCheck "check config" "prometheus.yml" yml;
-
- cmdlineArgs2 = cfg2.extraFlags ++ [
- "--storage.tsdb.path=${workingDir2}/data/"
- "--config.file=${prometheus2Yml}"
- "--web.listen-address=${cfg2.listenAddress}"
- "--alertmanager.notification-queue-capacity=${toString cfg2.alertmanagerNotificationQueueCapacity}"
- "--alertmanager.timeout=${toString cfg2.alertmanagerTimeout}s"
- ] ++
- optional (cfg2.webExternalUrl != null) "--web.external-url=${cfg2.webExternalUrl}";
+ optional (cfg.webExternalUrl != null) "--web.external-url=${cfg.webExternalUrl}";
filterValidPrometheus = filterAttrsListRecursive (n: v: !(n == "_module" || v == null));
filterAttrsListRecursive = pred: x:
@@ -518,331 +464,159 @@ let
};
in {
- options = {
- services.prometheus = {
+ options.services.prometheus = {
- enable = mkOption {
- type = types.bool;
- default = false;
- description = ''
- Enable the Prometheus monitoring daemon.
- '';
- };
+ enable = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Enable the Prometheus monitoring daemon.
+ '';
+ };
- package = mkOption {
- type = types.package;
- default = pkgs.prometheus;
- defaultText = "pkgs.prometheus";
- description = ''
- The prometheus package that should be used.
- '';
- };
+ package = mkOption {
+ type = types.package;
+ default = pkgs.prometheus;
+ defaultText = "pkgs.prometheus";
+ description = ''
+ The prometheus package that should be used.
+ '';
+ };
- listenAddress = mkOption {
- type = types.str;
- default = "0.0.0.0:9090";
- description = ''
- Address to listen on for the web interface, API, and telemetry.
- '';
- };
+ listenAddress = mkOption {
+ type = types.str;
+ default = "0.0.0.0:9090";
+ description = ''
+ Address to listen on for the web interface, API, and telemetry.
+ '';
+ };
- dataDir = mkOption {
- type = types.nullOr types.path;
- default = null;
- description = ''
- Directory to store Prometheus metrics data.
- This option is deprecated, please use .
- '';
- };
+ stateDir = mkOption {
+ type = types.str;
+ default = "prometheus2";
+ description = ''
+ Directory below /var/lib to store Prometheus metrics data.
+ This directory will be created automatically using systemd's StateDirectory mechanism.
+ '';
+ };
- stateDir = mkOption {
- type = types.nullOr types.str;
- default = null;
- description = ''
- Directory below ${stateDirBase} to store Prometheus metrics data.
- This directory will be created automatically using systemd's StateDirectory mechanism.
- Defaults to prometheus.
- '';
- };
+ extraFlags = mkOption {
+ type = types.listOf types.str;
+ default = [];
+ description = ''
+ Extra commandline options when launching Prometheus.
+ '';
+ };
- extraFlags = mkOption {
- type = types.listOf types.str;
- default = [];
- description = ''
- Extra commandline options when launching Prometheus.
- '';
- };
+ configText = mkOption {
+ type = types.nullOr types.lines;
+ default = null;
+ description = ''
+ If non-null, this option defines the text that is written to
+ prometheus.yml. If null, the contents of prometheus.yml is generated
+ from the structured config options.
+ '';
+ };
- configText = mkOption {
- type = types.nullOr types.lines;
- default = null;
- description = ''
- If non-null, this option defines the text that is written to
- prometheus.yml. If null, the contents of prometheus.yml is generated
- from the structured config options.
- '';
- };
+ globalConfig = mkOption {
+ type = promTypes.globalConfig;
+ default = {};
+ description = ''
+ Parameters that are valid in all configuration contexts. They
+ also serve as defaults for other configuration sections
+ '';
+ };
- globalConfig = mkOption {
- type = promTypes.globalConfig;
- default = {};
- description = ''
- Parameters that are valid in all configuration contexts. They
- also serve as defaults for other configuration sections
- '';
- };
+ rules = mkOption {
+ type = types.listOf types.str;
+ default = [];
+ description = ''
+ Alerting and/or Recording rules to evaluate at runtime.
+ '';
+ };
- rules = mkOption {
- type = types.listOf types.str;
- default = [];
- description = ''
- Alerting and/or Recording rules to evaluate at runtime.
- '';
- };
+ ruleFiles = mkOption {
+ type = types.listOf types.path;
+ default = [];
+ description = ''
+ Any additional rules files to include in this configuration.
+ '';
+ };
- ruleFiles = mkOption {
- type = types.listOf types.path;
- default = [];
- description = ''
- Any additional rules files to include in this configuration.
- '';
- };
+ scrapeConfigs = mkOption {
+ type = types.listOf promTypes.scrape_config;
+ default = [];
+ description = ''
+ A list of scrape configurations.
+ '';
+ };
- scrapeConfigs = mkOption {
- type = types.listOf promTypes.scrape_config;
- default = [];
- description = ''
- A list of scrape configurations.
- '';
- };
+ alertmanagers = mkOption {
+ type = types.listOf types.attrs;
+ example = literalExample ''
+ [ {
+ scheme = "https";
+ path_prefix = "/alertmanager";
+ static_configs = [ {
+ targets = [
+ "prometheus.domain.tld"
+ ];
+ } ];
+ } ]
+ '';
+ default = [];
+ description = ''
+ A list of alertmanagers to send alerts to.
+ See the official documentation for more information.
+ '';
+ };
- alertmanagerURL = mkOption {
- type = types.listOf types.str;
- default = [];
- description = ''
- List of Alertmanager URLs to send notifications to.
- '';
- };
+ alertmanagerNotificationQueueCapacity = mkOption {
+ type = types.int;
+ default = 10000;
+ description = ''
+ The capacity of the queue for pending alert manager notifications.
+ '';
+ };
- alertmanagerNotificationQueueCapacity = mkOption {
- type = types.int;
- default = 10000;
- description = ''
- The capacity of the queue for pending alert manager notifications.
- '';
- };
+ alertmanagerTimeout = mkOption {
+ type = types.int;
+ default = 10;
+ description = ''
+ Alert manager HTTP API timeout (in seconds).
+ '';
+ };
- alertmanagerTimeout = mkOption {
- type = types.int;
- default = 10;
- description = ''
- Alert manager HTTP API timeout (in seconds).
- '';
- };
+ webExternalUrl = mkOption {
+ type = types.nullOr types.str;
+ default = null;
+ example = "https://example.com/";
+ description = ''
+ The URL under which Prometheus is externally reachable (for example,
+ if Prometheus is served via a reverse proxy).
+ '';
+ };
+ };
- webExternalUrl = mkOption {
- type = types.nullOr types.str;
- default = null;
- example = "https://example.com/";
- description = ''
- The URL under which Prometheus is externally reachable (for example,
- if Prometheus is served via a reverse proxy).
- '';
+ config = mkIf cfg.enable {
+ users.groups.prometheus.gid = config.ids.gids.prometheus;
+ users.users.prometheus = {
+ description = "Prometheus daemon user";
+ uid = config.ids.uids.prometheus;
+ group = "prometheus";
+ };
+ systemd.services.prometheus = {
+ wantedBy = [ "multi-user.target" ];
+ after = [ "network.target" ];
+ serviceConfig = {
+ ExecStart = "${cfg.package}/bin/prometheus" +
+ optionalString (length cmdlineArgs != 0) (" \\\n " +
+ concatStringsSep " \\\n " cmdlineArgs);
+ User = "prometheus";
+ Restart = "always";
+ WorkingDirectory = workingDir;
+ StateDirectory = cfg.stateDir;
};
};
- services.prometheus2 = {
-
- enable = mkOption {
- type = types.bool;
- default = false;
- description = ''
- Enable the Prometheus 2 monitoring daemon.
- '';
- };
-
- package = mkOption {
- type = types.package;
- default = pkgs.prometheus_2;
- defaultText = "pkgs.prometheus_2";
- description = ''
- The prometheus2 package that should be used.
- '';
- };
-
- listenAddress = mkOption {
- type = types.str;
- default = "0.0.0.0:9090";
- description = ''
- Address to listen on for the web interface, API, and telemetry.
- '';
- };
-
- stateDir = mkOption {
- type = types.str;
- default = "prometheus2";
- description = ''
- Directory below ${stateDirBase} to store Prometheus metrics data.
- This directory will be created automatically using systemd's StateDirectory mechanism.
- Defaults to prometheus2.
- '';
- };
-
- extraFlags = mkOption {
- type = types.listOf types.str;
- default = [];
- description = ''
- Extra commandline options when launching Prometheus 2.
- '';
- };
-
- configText = mkOption {
- type = types.nullOr types.lines;
- default = null;
- description = ''
- If non-null, this option defines the text that is written to
- prometheus.yml. If null, the contents of prometheus.yml is generated
- from the structured config options.
- '';
- };
-
- globalConfig = mkOption {
- type = promTypes.globalConfig;
- default = {};
- description = ''
- Parameters that are valid in all configuration contexts. They
- also serve as defaults for other configuration sections
- '';
- };
-
- rules = mkOption {
- type = types.listOf types.str;
- default = [];
- description = ''
- Alerting and/or Recording rules to evaluate at runtime.
- '';
- };
-
- ruleFiles = mkOption {
- type = types.listOf types.path;
- default = [];
- description = ''
- Any additional rules files to include in this configuration.
- '';
- };
-
- scrapeConfigs = mkOption {
- type = types.listOf promTypes.scrape_config;
- default = [];
- description = ''
- A list of scrape configurations.
- '';
- };
-
- alertmanagerURL = mkOption {
- type = types.listOf types.str;
- default = [];
- description = ''
- List of Alertmanager URLs to send notifications to.
- '';
- };
-
- alertmanagerNotificationQueueCapacity = mkOption {
- type = types.int;
- default = 10000;
- description = ''
- The capacity of the queue for pending alert manager notifications.
- '';
- };
-
- alertmanagerTimeout = mkOption {
- type = types.int;
- default = 10;
- description = ''
- Alert manager HTTP API timeout (in seconds).
- '';
- };
-
- webExternalUrl = mkOption {
- type = types.nullOr types.str;
- default = null;
- example = "https://example.com/";
- description = ''
- The URL under which Prometheus is externally reachable (for example,
- if Prometheus is served via a reverse proxy).
- '';
- };
- };
- };
-
- config = mkMerge [
- (mkIf (cfg.enable || cfg2.enable) {
- users.groups.${promGroup}.gid = config.ids.gids.prometheus;
- users.users.${promUser} = {
- description = "Prometheus daemon user";
- uid = config.ids.uids.prometheus;
- group = promGroup;
- };
- })
- (mkIf cfg.enable {
- warnings =
- optional (cfg.dataDir != null) ''
- The option services.prometheus.dataDir is deprecated, please use
- services.prometheus.stateDir.
- '';
- assertions = [
- {
- assertion = !(cfg.dataDir != null && cfg.stateDir != null);
- message =
- "The options services.prometheus.dataDir and services.prometheus.stateDir" +
- " can't both be set at the same time! It's recommended to only set the latter" +
- " since the former is deprecated.";
- }
- {
- assertion = cfg.dataDir != null -> hasPrefix stateDirBase cfg.dataDir;
- message =
- "The option services.prometheus.dataDir should have ${stateDirBase} as a prefix!";
- }
- {
- assertion = cfg.stateDir != null -> !hasPrefix "/" cfg.stateDir;
- message =
- "The option services.prometheus.stateDir shouldn't be an absolute directory." +
- " It should be a directory relative to ${stateDirBase}.";
- }
- {
- assertion = cfg2.stateDir != null -> !hasPrefix "/" cfg2.stateDir;
- message =
- "The option services.prometheus2.stateDir shouldn't be an absolute directory." +
- " It should be a directory relative to ${stateDirBase}.";
- }
- ];
- systemd.services.prometheus = {
- wantedBy = [ "multi-user.target" ];
- after = [ "network.target" ];
- serviceConfig = {
- ExecStart = "${cfg.package}/bin/prometheus" +
- optionalString (length cmdlineArgs != 0) (" \\\n " +
- concatStringsSep " \\\n " cmdlineArgs);
- User = promUser;
- Restart = "always";
- WorkingDirectory = workingDir;
- StateDirectory = stateDir;
- };
- };
- })
- (mkIf cfg2.enable {
- systemd.services.prometheus2 = {
- wantedBy = [ "multi-user.target" ];
- after = [ "network.target" ];
- serviceConfig = {
- ExecStart = "${cfg2.package}/bin/prometheus" +
- optionalString (length cmdlineArgs2 != 0) (" \\\n " +
- concatStringsSep " \\\n " cmdlineArgs2);
- User = promUser;
- Restart = "always";
- WorkingDirectory = workingDir2;
- StateDirectory = cfg2.stateDir;
- };
- };
- })
- ];
+ };
}
diff --git a/nixos/modules/services/monitoring/prometheus/exporters.nix b/nixos/modules/services/monitoring/prometheus/exporters.nix
index 2ab8910ff9db..35b513bac571 100644
--- a/nixos/modules/services/monitoring/prometheus/exporters.nix
+++ b/nixos/modules/services/monitoring/prometheus/exporters.nix
@@ -30,10 +30,12 @@ let
"json"
"mail"
"minio"
+ "nextcloud"
"nginx"
"node"
"postfix"
"postgres"
+ "rspamd"
"snmp"
"surfboard"
"tor"
@@ -132,14 +134,10 @@ let
in
mkIf conf.enable {
warnings = conf.warnings or [];
- users.users = (mkIf (conf.user == "${name}-exporter" && !enableDynamicUser) {
- "${name}-exporter" = {
- description = ''
- Prometheus ${name} exporter service user
- '';
- isSystemUser = true;
- inherit (conf) group;
- };
+ users.users."${name}-exporter" = (mkIf (conf.user == "${name}-exporter" && !enableDynamicUser) {
+ description = "Prometheus ${name} exporter service user";
+ isSystemUser = true;
+ inherit (conf) group;
});
users.groups = (mkIf (conf.group == "${name}-exporter" && !enableDynamicUser) {
"${name}-exporter" = {};
@@ -197,6 +195,8 @@ in
services.prometheus.exporters.minio.minioAddress = mkDefault "http://localhost:9000";
services.prometheus.exporters.minio.minioAccessKey = mkDefault config.services.minio.accessKey;
services.prometheus.exporters.minio.minioAccessSecret = mkDefault config.services.minio.secretKey;
+ })] ++ [(mkIf config.services.rspamd.enable {
+ services.prometheus.exporters.rspamd.url = mkDefault "http://localhost:11334/stat";
})] ++ (mapAttrsToList (name: conf:
mkExporterConf {
inherit name;
diff --git a/nixos/modules/services/monitoring/prometheus/exporters/blackbox.nix b/nixos/modules/services/monitoring/prometheus/exporters/blackbox.nix
index f69b389760f7..8a90afa99842 100644
--- a/nixos/modules/services/monitoring/prometheus/exporters/blackbox.nix
+++ b/nixos/modules/services/monitoring/prometheus/exporters/blackbox.nix
@@ -3,9 +3,34 @@
with lib;
let
+ logPrefix = "services.prometheus.exporter.blackbox";
cfg = config.services.prometheus.exporters.blackbox;
-in
-{
+
+ # This ensures that we can deal with string paths, path types and
+ # store-path strings with context.
+ coerceConfigFile = file:
+ if (builtins.isPath file) || (lib.isStorePath file) then
+ file
+ else
+ (lib.warn ''
+ ${logPrefix}: configuration file "${file}" is being copied to the nix-store.
+ If you would like to avoid that, please set enableConfigCheck to false.
+ '' /. + file);
+ checkConfigLocation = file:
+ if lib.hasPrefix "/tmp/" file then
+ throw
+ "${logPrefix}: configuration file must not reside within /tmp - it won't be visible to the systemd service."
+ else
+ true;
+ checkConfig = file:
+ pkgs.runCommand "checked-blackbox-exporter.conf" {
+ preferLocalBuild = true;
+ buildInputs = [ pkgs.buildPackages.prometheus-blackbox-exporter ];
+ } ''
+ ln -s ${coerceConfigFile file} $out
+ blackbox_exporter --config.check --config.file $out
+ '';
+in {
port = 9115;
extraOpts = {
configFile = mkOption {
@@ -14,14 +39,29 @@ in
Path to configuration file.
'';
};
+ enableConfigCheck = mkOption {
+ type = types.bool;
+ default = true;
+ description = ''
+ Whether to run a correctness check for the configuration file. This depends
+ on the configuration file residing in the nix-store. Paths passed as string will
+ be copied to the store.
+ '';
+ };
};
- serviceOpts = {
+
+ serviceOpts = let
+ adjustedConfigFile = if cfg.enableConfigCheck then
+ checkConfig cfg.configFile
+ else
+ checkConfigLocation cfg.configFile;
+ in {
serviceConfig = {
AmbientCapabilities = [ "CAP_NET_RAW" ]; # for ping probes
ExecStart = ''
${pkgs.prometheus-blackbox-exporter}/bin/blackbox_exporter \
--web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
- --config.file ${cfg.configFile} \
+ --config.file ${adjustedConfigFile} \
${concatStringsSep " \\\n " cfg.extraFlags}
'';
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
diff --git a/nixos/modules/services/monitoring/prometheus/exporters/nextcloud.nix b/nixos/modules/services/monitoring/prometheus/exporters/nextcloud.nix
new file mode 100644
index 000000000000..5f9a52053f79
--- /dev/null
+++ b/nixos/modules/services/monitoring/prometheus/exporters/nextcloud.nix
@@ -0,0 +1,58 @@
+{ config, lib, pkgs, options }:
+
+with lib;
+
+let
+ cfg = config.services.prometheus.exporters.nextcloud;
+in
+{
+ port = 9205;
+ extraOpts = {
+ url = mkOption {
+ type = types.str;
+ example = "https://domain.tld";
+ description = ''
+ URL to the Nextcloud serverinfo page.
+ Adding the path to the serverinfo API is optional, it defaults
+ to /ocs/v2.php/apps/serverinfo/api/v1/info.
+ '';
+ };
+ username = mkOption {
+ type = types.str;
+ default = "nextcloud-exporter";
+ description = ''
+ Username for connecting to Nextcloud.
+ Note that this account needs to have admin privileges in Nextcloud.
+ '';
+ };
+ passwordFile = mkOption {
+ type = types.path;
+ example = "/path/to/password-file";
+ description = ''
+ File containing the password for connecting to Nextcloud.
+ Make sure that this file is readable by the exporter user.
+ '';
+ };
+ timeout = mkOption {
+ type = types.str;
+ default = "5s";
+ description = ''
+ Timeout for getting server info document.
+ '';
+ };
+ };
+ serviceOpts = {
+ serviceConfig = {
+ DynamicUser = false;
+ ExecStart = ''
+ ${pkgs.prometheus-nextcloud-exporter}/bin/nextcloud-exporter \
+ -a ${cfg.listenAddress}:${toString cfg.port} \
+ -u ${cfg.username} \
+ -t ${cfg.timeout} \
+ -l ${cfg.url} \
+ -p @${cfg.passwordFile} \
+ ${concatStringsSep " \\\n " cfg.extraFlags}
+ '';
+ };
+ };
+}
diff --git a/nixos/modules/services/monitoring/prometheus/exporters/nginx.nix b/nixos/modules/services/monitoring/prometheus/exporters/nginx.nix
index 554377df37ba..ba852fea4336 100644
--- a/nixos/modules/services/monitoring/prometheus/exporters/nginx.nix
+++ b/nixos/modules/services/monitoring/prometheus/exporters/nginx.nix
@@ -49,6 +49,6 @@ in
(mkRemovedOptionModule [ "insecure" ] ''
This option was replaced by 'prometheus.exporters.nginx.sslVerify'.
'')
- ({ options.warnings = options.warnings; })
+ ({ options.warnings = options.warnings; options.assertions = options.assertions; })
];
}
diff --git a/nixos/modules/services/monitoring/prometheus/exporters/node.nix b/nixos/modules/services/monitoring/prometheus/exporters/node.nix
index 7e394e8463e0..adc2abe0b91c 100644
--- a/nixos/modules/services/monitoring/prometheus/exporters/node.nix
+++ b/nixos/modules/services/monitoring/prometheus/exporters/node.nix
@@ -9,7 +9,7 @@ in
port = 9100;
extraOpts = {
enabledCollectors = mkOption {
- type = types.listOf types.string;
+ type = types.listOf types.str;
default = [];
example = ''[ "systemd" ]'';
description = ''
diff --git a/nixos/modules/services/monitoring/prometheus/exporters/rspamd.nix b/nixos/modules/services/monitoring/prometheus/exporters/rspamd.nix
new file mode 100644
index 000000000000..1f02ae207249
--- /dev/null
+++ b/nixos/modules/services/monitoring/prometheus/exporters/rspamd.nix
@@ -0,0 +1,92 @@
+{ config, lib, pkgs, options }:
+
+with lib;
+
+let
+ cfg = config.services.prometheus.exporters.rspamd;
+
+ prettyJSON = conf:
+ pkgs.runCommand "rspamd-exporter-config.yml" { } ''
+ echo '${builtins.toJSON conf}' | ${pkgs.buildPackages.jq}/bin/jq '.' > $out
+ '';
+
+ generateConfig = extraLabels: (map (path: {
+ name = "rspamd_${replaceStrings [ "." " " ] [ "_" "_" ] path}";
+ path = "$.${path}";
+ labels = extraLabels;
+ }) [
+ "actions.'add header'"
+ "actions.'no action'"
+ "actions.'rewrite subject'"
+ "actions.'soft reject'"
+ "actions.greylist"
+ "actions.reject"
+ "bytes_allocated"
+ "chunks_allocated"
+ "chunks_freed"
+ "chunks_oversized"
+ "connections"
+ "control_connections"
+ "ham_count"
+ "learned"
+ "pools_allocated"
+ "pools_freed"
+ "read_only"
+ "scanned"
+ "shared_chunks_allocated"
+ "spam_count"
+ "total_learns"
+ ]) ++ [{
+ name = "rspamd_statfiles";
+ type = "object";
+ path = "$.statfiles[*]";
+ labels = recursiveUpdate {
+ symbol = "$.symbol";
+ type = "$.type";
+ } extraLabels;
+ values = {
+ revision = "$.revision";
+ size = "$.size";
+ total = "$.total";
+ used = "$.used";
+ languages = "$.languages";
+ users = "$.users";
+ };
+ }];
+in
+{
+ port = 7980;
+ extraOpts = {
+ listenAddress = {}; # not used
+
+ url = mkOption {
+ type = types.str;
+ description = ''
+ URL to the rspamd metrics endpoint.
+ Defaults to http://localhost:11334/stat when
+ is true.
+ '';
+ };
+
+ extraLabels = mkOption {
+ type = types.attrsOf types.str;
+ default = {
+ host = config.networking.hostName;
+ };
+ defaultText = "{ host = config.networking.hostName; }";
+ example = literalExample ''
+ {
+ host = config.networking.hostName;
+ custom_label = "some_value";
+ }
+ '';
+ description = "Set of labels added to each metric.";
+ };
+ };
+ serviceOpts.serviceConfig.ExecStart = ''
+ ${pkgs.prometheus-json-exporter}/bin/prometheus-json-exporter \
+ --port ${toString cfg.port} \
+ ${cfg.url} ${prettyJSON (generateConfig cfg.extraLabels)} \
+ ${concatStringsSep " \\\n " cfg.extraFlags}
+ '';
+}
diff --git a/nixos/modules/services/monitoring/prometheus/exporters/wireguard.nix b/nixos/modules/services/monitoring/prometheus/exporters/wireguard.nix
index aee7cba26384..374f83a2939d 100644
--- a/nixos/modules/services/monitoring/prometheus/exporters/wireguard.nix
+++ b/nixos/modules/services/monitoring/prometheus/exporters/wireguard.nix
@@ -6,6 +6,10 @@ let
cfg = config.services.prometheus.exporters.wireguard;
in {
port = 9586;
+ imports = [
+ (mkRenamedOptionModule [ "addr" ] [ "listenAddress" ])
+ ({ options.warnings = options.warnings; options.assertions = options.assertions; })
+ ];
extraOpts = {
verbose = mkEnableOption "Verbose logging mode for prometheus-wireguard-exporter";
@@ -34,6 +38,14 @@ in {
allowed_ip_1 and so on.
'';
};
+
+ withRemoteIp = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Whether or not the remote IP of a WireGuard peer should be exposed via prometheus.
+ '';
+ };
};
serviceOpts = {
path = [ pkgs.wireguard-tools ];
@@ -43,8 +55,10 @@ in {
ExecStart = ''
${pkgs.prometheus-wireguard-exporter}/bin/prometheus_wireguard_exporter \
-p ${toString cfg.port} \
+ -l ${cfg.listenAddress} \
${optionalString cfg.verbose "-v"} \
${optionalString cfg.singleSubnetPerField "-s"} \
+ ${optionalString cfg.withRemoteIp "-r"} \
${optionalString (cfg.wireguardConfig != null) "-n ${cfg.wireguardConfig}"}
'';
};
diff --git a/nixos/modules/services/monitoring/riemann-tools.nix b/nixos/modules/services/monitoring/riemann-tools.nix
index 9c400a1e3e46..86a11694e7b4 100644
--- a/nixos/modules/services/monitoring/riemann-tools.nix
+++ b/nixos/modules/services/monitoring/riemann-tools.nix
@@ -11,7 +11,7 @@ let
healthLauncher = writeScriptBin "riemann-health" ''
#!/bin/sh
- exec ${pkgs.riemann-tools}/bin/riemann-health --host ${riemannHost}
+ exec ${pkgs.riemann-tools}/bin/riemann-health ${builtins.concatStringsSep " " cfg.extraArgs} --host ${riemannHost}
'';
@@ -34,8 +34,16 @@ in {
Address of the host riemann node. Defaults to localhost.
'';
};
+ extraArgs = mkOption {
+ type = types.listOf types.str;
+ default = [];
+ description = ''
+ A list of commandline-switches forwarded to a riemann-tool.
+ See for example `riemann-health --help` for available options.
+ '';
+ example = ["-p 5555" "--timeout=30" "--attribute=myattribute=42"];
+ };
};
-
};
config = mkIf cfg.enableHealth {
diff --git a/nixos/modules/services/monitoring/scollector.nix b/nixos/modules/services/monitoring/scollector.nix
index dc0899c7e684..38cd2213de76 100644
--- a/nixos/modules/services/monitoring/scollector.nix
+++ b/nixos/modules/services/monitoring/scollector.nix
@@ -51,7 +51,7 @@ in {
};
user = mkOption {
- type = types.string;
+ type = types.str;
default = "scollector";
description = ''
User account under which scollector runs.
@@ -59,7 +59,7 @@ in {
};
group = mkOption {
- type = types.string;
+ type = types.str;
default = "scollector";
description = ''
Group account under which scollector runs.
@@ -67,7 +67,7 @@ in {
};
bosunHost = mkOption {
- type = types.string;
+ type = types.str;
default = "localhost:8070";
description = ''
Host and port of the bosun server that will store the collected
diff --git a/nixos/modules/services/monitoring/systemhealth.nix b/nixos/modules/services/monitoring/systemhealth.nix
deleted file mode 100644
index 32d4314d5f77..000000000000
--- a/nixos/modules/services/monitoring/systemhealth.nix
+++ /dev/null
@@ -1,133 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-with lib;
-
-let
- cfg = config.services.systemhealth;
-
- systemhealth = with pkgs; stdenv.mkDerivation {
- name = "systemhealth-1.0";
- src = fetchurl {
- url = "https://www.brianlane.com/downloads/systemhealth/systemhealth-1.0.tar.bz2";
- sha256 = "1q69lz7hmpbdpbz36zb06nzfkj651413n9icx0njmyr3xzq1j9qy";
- };
- buildInputs = [ python ];
- installPhase = ''
- mkdir -p $out/bin
- # Make it work for kernels 3.x, not so different than 2.6
- sed -i 's/2\.6/4.0/' system_health.py
- cp system_health.py $out/bin
- '';
- };
-
- rrdDir = "/var/lib/health/rrd";
- htmlDir = "/var/lib/health/html";
-
- configFile = rrdDir + "/.syshealthrc";
- # The program will try to read $HOME/.syshealthrc, so we set the proper home.
- command = "HOME=${rrdDir} ${systemhealth}/bin/system_health.py";
-
- cronJob = ''
- */5 * * * * wwwrun ${command} --log
- 5 * * * * wwwrun ${command} --graph
- '';
-
- nameEqualName = s: "${s} = ${s}";
- interfacesSection = concatStringsSep "\n" (map nameEqualName cfg.interfaces);
-
- driveLine = d: "${d.path} = ${d.name}";
- drivesSection = concatStringsSep "\n" (map driveLine cfg.drives);
-
-in
-{
- options = {
- services.systemhealth = {
- enable = mkOption {
- default = false;
- description = ''
- Enable the system health monitor and its generation of graphs.
- '';
- };
-
- urlPrefix = mkOption {
- default = "/health";
- description = ''
- The URL prefix under which the System Health web pages appear in httpd.
- '';
- };
-
- interfaces = mkOption {
- default = [ "lo" ];
- example = [ "lo" "eth0" "eth1" ];
- description = ''
- Interfaces to monitor (minimum one).
- '';
- };
-
- drives = mkOption {
- default = [ ];
- example = [ { name = "root"; path = "/"; } ];
- description = ''
- Drives to monitor.
- '';
- };
- };
- };
-
- config = mkIf cfg.enable {
- services.cron.systemCronJobs = [ cronJob ];
-
- system.activationScripts.systemhealth = stringAfter [ "var" ]
- ''
- mkdir -p ${rrdDir} ${htmlDir}
- chown wwwrun:wwwrun ${rrdDir} ${htmlDir}
-
- cat >${configFile} << EOF
- [paths]
- rrdtool = ${pkgs.rrdtool}/bin/rrdtool
- loadavg_rrd = loadavg
- ps = /run/current-system/sw/bin/ps
- df = /run/current-system/sw/bin/df
- meminfo_rrd = meminfo
- uptime_rrd = uptime
- rrd_path = ${rrdDir}
- png_path = ${htmlDir}
-
- [processes]
-
- [interfaces]
- ${interfacesSection}
-
- [drives]
- ${drivesSection}
-
- [graphs]
- width = 400
- time = ['-3hours', '-32hours', '-8days', '-5weeks', '-13months']
- height = 100
-
- [external]
-
- EOF
-
- chown wwwrun:wwwrun ${configFile}
-
- ${pkgs.su}/bin/su -s "/bin/sh" -c "${command} --check" wwwrun
- ${pkgs.su}/bin/su -s "/bin/sh" -c "${command} --html" wwwrun
- '';
-
- services.httpd.extraSubservices = [
- { function = f: {
- extraConfig = ''
- Alias ${cfg.urlPrefix} ${htmlDir}
-
-
- Order allow,deny
- Allow from all
-
- '';
- };
- }
- ];
- };
-}
diff --git a/nixos/modules/services/monitoring/thanos.nix b/nixos/modules/services/monitoring/thanos.nix
index b41e99b76477..52dab28cf72f 100644
--- a/nixos/modules/services/monitoring/thanos.nix
+++ b/nixos/modules/services/monitoring/thanos.nix
@@ -70,14 +70,14 @@ let
} ''json2yaml -i $json -o $out'';
thanos = cmd: "${cfg.package}/bin/thanos ${cmd}" +
- (let args = cfg."${cmd}".arguments;
+ (let args = cfg.${cmd}.arguments;
in optionalString (length args != 0) (" \\\n " +
concatStringsSep " \\\n " args));
argumentsOf = cmd: concatLists (collect isList
- (flip mapParamsRecursive params."${cmd}" (path: param:
+ (flip mapParamsRecursive params.${cmd} (path: param:
let opt = concatStringsSep "." path;
- v = getAttrFromPath path cfg."${cmd}";
+ v = getAttrFromPath path cfg.${cmd};
in param.toArgs opt v)));
mkArgumentsOption = cmd: mkOption {
@@ -95,7 +95,7 @@ let
};
mapParamsRecursive =
- let noParam = attr: !(attr ? "toArgs" && attr ? "option");
+ let noParam = attr: !(attr ? toArgs && attr ? option);
in mapAttrsRecursiveCond noParam;
paramsToOptions = mapParamsRecursive (_path: param: param.option);
@@ -126,6 +126,8 @@ let
'';
description = ''
Path to YAML file that contains tracing configuration.
+
+ See format details:
'';
};
};
@@ -141,6 +143,8 @@ let
will default to its path.
If is set this option has no effect.
+
+ See format details:
'';
};
};
@@ -187,6 +191,8 @@ let
'';
description = ''
Path to YAML file that contains object store configuration.
+
+ See format details:
'';
};
};
@@ -202,6 +208,8 @@ let
will default to its path.
If is set this option has no effect.
+
+ See format details:
'';
};
};
@@ -218,8 +226,8 @@ let
toArgs = optionToArgs;
option = mkOption {
type = types.str;
- default = "/var/lib/${config.services.prometheus2.stateDir}/data";
- defaultText = "/var/lib/\${config.services.prometheus2.stateDir}/data";
+ default = "/var/lib/${config.services.prometheus.stateDir}/data";
+ defaultText = "/var/lib/\${config.services.prometheus.stateDir}/data";
description = ''
Data directory of TSDB.
'';
@@ -276,6 +284,24 @@ let
block-sync-concurrency = mkParamDef types.int 20 ''
Number of goroutines to use when syncing blocks from object storage.
'';
+
+ min-time = mkParamDef types.str "0000-01-01T00:00:00Z" ''
+ Start of time range limit to serve.
+
+ Thanos Store serves only metrics, which happened later than this
+ value. Option can be a constant time in RFC3339 format or time duration
+ relative to current time, such as -1d or 2h45m. Valid duration units are
+ ms, s, m, h, d, w, y.
+ '';
+
+ max-time = mkParamDef types.str "9999-12-31T23:59:59Z" ''
+ End of time range limit to serve.
+
+ Thanos Store serves only blocks, which happened eariler than this
+ value. Option can be a constant time in RFC3339 format or time duration
+ relative to current time, such as -1d or 2h45m. Valid duration units are
+ ms, s, m, h, d, w, y.
+ '';
};
query = params.common cfg.query // {
@@ -560,6 +586,14 @@ let
'';
};
+ downsampling.disable = mkFlagParam ''
+ Disables downsampling.
+
+ This is not recommended as querying long time ranges without
+ non-downsampled data is not efficient and useful e.g it is not possible
+ to render all samples for a human eye anyway
+ '';
+
block-sync-concurrency = mkParamDef types.int 20 ''
Number of goroutines to use when syncing block metadata from object storage.
'';
@@ -607,7 +641,7 @@ let
assertRelativeStateDir = cmd: {
assertions = [
{
- assertion = !hasPrefix "/" cfg."${cmd}".stateDir;
+ assertion = !hasPrefix "/" cfg.${cmd}.stateDir;
message =
"The option services.thanos.${cmd}.stateDir should not be an absolute directory." +
" It should be a directory relative to /var/lib.";
@@ -679,22 +713,22 @@ in {
(mkIf cfg.sidecar.enable {
assertions = [
{
- assertion = config.services.prometheus2.enable;
+ assertion = config.services.prometheus.enable;
message =
- "Please enable services.prometheus2 when enabling services.thanos.sidecar.";
+ "Please enable services.prometheus when enabling services.thanos.sidecar.";
}
{
- assertion = !(config.services.prometheus2.globalConfig.external_labels == null ||
- config.services.prometheus2.globalConfig.external_labels == {});
+ assertion = !(config.services.prometheus.globalConfig.external_labels == null ||
+ config.services.prometheus.globalConfig.external_labels == {});
message =
"services.thanos.sidecar requires uniquely identifying external labels " +
"to be configured in the Prometheus server. " +
- "Please set services.prometheus2.globalConfig.external_labels.";
+ "Please set services.prometheus.globalConfig.external_labels.";
}
];
systemd.services.thanos-sidecar = {
wantedBy = [ "multi-user.target" ];
- after = [ "network.target" "prometheus2.service" ];
+ after = [ "network.target" "prometheus.service" ];
serviceConfig = {
User = "prometheus";
Restart = "always";
diff --git a/nixos/modules/services/monitoring/ups.nix b/nixos/modules/services/monitoring/ups.nix
index bc755612fd9b..1bdc4e4410f1 100644
--- a/nixos/modules/services/monitoring/ups.nix
+++ b/nixos/modules/services/monitoring/ups.nix
@@ -55,7 +55,7 @@ let
description = mkOption {
default = "";
- type = types.string;
+ type = types.str;
description = ''
Description of the UPS.
'';
@@ -71,7 +71,7 @@ let
summary = mkOption {
default = "";
- type = types.string;
+ type = types.lines;
description = ''
Lines which would be added inside ups.conf for handling this UPS.
'';
@@ -225,7 +225,7 @@ in
''
maxstartdelay = ${toString cfg.maxStartDelay}
- ${flip concatStringsSep (flip map (attrValues cfg.ups) (ups: ups.summary)) "
+ ${flip concatStringsSep (forEach (attrValues cfg.ups) (ups: ups.summary)) "
"}
'';
diff --git a/nixos/modules/services/monitoring/uptime.nix b/nixos/modules/services/monitoring/uptime.nix
index c0993f3bc2e7..245badc3e44f 100644
--- a/nixos/modules/services/monitoring/uptime.nix
+++ b/nixos/modules/services/monitoring/uptime.nix
@@ -57,7 +57,7 @@ in {
nodeEnv = mkOption {
description = "The node environment to run in (development, production, etc.)";
- type = types.string;
+ type = types.str;
default = "production";
};
diff --git a/nixos/modules/services/monitoring/zabbix-agent.nix b/nixos/modules/services/monitoring/zabbix-agent.nix
index b1645f861101..856b9432892b 100644
--- a/nixos/modules/services/monitoring/zabbix-agent.nix
+++ b/nixos/modules/services/monitoring/zabbix-agent.nix
@@ -135,7 +135,7 @@ in
users.groups.${group} = { };
- systemd.services."zabbix-agent" = {
+ systemd.services.zabbix-agent = {
description = "Zabbix Agent";
wantedBy = [ "multi-user.target" ];
diff --git a/nixos/modules/services/monitoring/zabbix-proxy.nix b/nixos/modules/services/monitoring/zabbix-proxy.nix
index 9cfcd1697c11..9d214469c3b3 100644
--- a/nixos/modules/services/monitoring/zabbix-proxy.nix
+++ b/nixos/modules/services/monitoring/zabbix-proxy.nix
@@ -120,7 +120,8 @@ in
name = mkOption {
type = types.str;
- default = "zabbix";
+ default = if cfg.database.type == "sqlite" then "${stateDir}/zabbix.db" else "zabbix";
+ defaultText = "zabbix";
description = "Database name.";
};
@@ -251,7 +252,7 @@ in
fping.source = "${pkgs.fping}/bin/fping";
};
- systemd.services."zabbix-proxy" = {
+ systemd.services.zabbix-proxy = {
description = "Zabbix Proxy";
wantedBy = [ "multi-user.target" ];
@@ -261,17 +262,17 @@ in
preStart = optionalString pgsqlLocal ''
if ! test -e "${stateDir}/db-created"; then
cat ${cfg.package}/share/zabbix/database/postgresql/schema.sql | ${pgsql.package}/bin/psql ${cfg.database.name}
- cat ${cfg.package}/share/zabbix/database/postgresql/images.sql | ${pgsql.package}/bin/psql ${cfg.database.name}
- cat ${cfg.package}/share/zabbix/database/postgresql/data.sql | ${pgsql.package}/bin/psql ${cfg.database.name}
touch "${stateDir}/db-created"
fi
'' + optionalString mysqlLocal ''
if ! test -e "${stateDir}/db-created"; then
cat ${cfg.package}/share/zabbix/database/mysql/schema.sql | ${mysql.package}/bin/mysql ${cfg.database.name}
- cat ${cfg.package}/share/zabbix/database/mysql/images.sql | ${mysql.package}/bin/mysql ${cfg.database.name}
- cat ${cfg.package}/share/zabbix/database/mysql/data.sql | ${mysql.package}/bin/mysql ${cfg.database.name}
touch "${stateDir}/db-created"
fi
+ '' + optionalString (cfg.database.type == "sqlite") ''
+ if ! test -e "${cfg.database.name}"; then
+ ${pkgs.sqlite}/bin/sqlite3 "${cfg.database.name}" < ${cfg.package}/share/zabbix/database/sqlite3/schema.sql
+ fi
'' + optionalString (cfg.database.passwordFile != null) ''
# create a copy of the supplied password file in a format zabbix can consume
touch ${passwordFile}
diff --git a/nixos/modules/services/monitoring/zabbix-server.nix b/nixos/modules/services/monitoring/zabbix-server.nix
index 11311b466c3f..e9f1590760a4 100644
--- a/nixos/modules/services/monitoring/zabbix-server.nix
+++ b/nixos/modules/services/monitoring/zabbix-server.nix
@@ -30,6 +30,7 @@ let
DBUser = ${cfg.database.user}
${optionalString (cfg.database.passwordFile != null) "Include ${passwordFile}"}
${optionalString (mysqlLocal && cfg.database.socket != null) "DBSocket = ${cfg.database.socket}"}
+ PidFile = ${runtimeDir}/zabbix_server.pid
SocketDir = ${runtimeDir}
FpingLocation = /run/wrappers/bin/fping
${optionalString (cfg.modules != {}) "LoadModulePath = ${moduleEnv}/lib"}
@@ -237,7 +238,7 @@ in
fping.source = "${pkgs.fping}/bin/fping";
};
- systemd.services."zabbix-server" = {
+ systemd.services.zabbix-server = {
description = "Zabbix Server";
wantedBy = [ "multi-user.target" ];
diff --git a/nixos/modules/services/network-filesystems/beegfs.nix b/nixos/modules/services/network-filesystems/beegfs.nix
index 86b1bb9160f1..2e03a422665a 100644
--- a/nixos/modules/services/network-filesystems/beegfs.nix
+++ b/nixos/modules/services/network-filesystems/beegfs.nix
@@ -69,7 +69,7 @@ let
# functions to generate systemd.service entries
systemdEntry = service: cfgFile: (mapAttrs' ( name: cfg:
- (nameValuePair "beegfs-${service}-${name}" (mkIf cfg."${service}".enable {
+ (nameValuePair "beegfs-${service}-${name}" (mkIf cfg.${service}.enable {
wantedBy = [ "multi-user.target" ];
requires = [ "network-online.target" ];
after = [ "network-online.target" ];
diff --git a/nixos/modules/services/network-filesystems/ceph.nix b/nixos/modules/services/network-filesystems/ceph.nix
index 4e3bc839d400..656a2d21b868 100644
--- a/nixos/modules/services/network-filesystems/ceph.nix
+++ b/nixos/modules/services/network-filesystems/ceph.nix
@@ -3,22 +3,22 @@
with lib;
let
- ceph = pkgs.ceph;
cfg = config.services.ceph;
+
# function that translates "camelCaseOptions" to "camel case options", credits to tilpner in #nixos@freenode
- translateOption = replaceStrings upperChars (map (s: " ${s}") lowerChars);
- generateDaemonList = (daemonType: daemons: extraServiceConfig:
- mkMerge (
- map (daemon:
- { "ceph-${daemonType}-${daemon}" = generateServiceFile daemonType daemon cfg.global.clusterName ceph extraServiceConfig; }
- ) daemons
- )
- );
- generateServiceFile = (daemonType: daemonId: clusterName: ceph: extraServiceConfig: {
+ expandCamelCase = replaceStrings upperChars (map (s: " ${s}") lowerChars);
+ expandCamelCaseAttrs = mapAttrs' (name: value: nameValuePair (expandCamelCase name) value);
+
+ makeServices = (daemonType: daemonIds: extraServiceConfig:
+ mkMerge (map (daemonId:
+ { "ceph-${daemonType}-${daemonId}" = makeService daemonType daemonId cfg.global.clusterName pkgs.ceph extraServiceConfig; })
+ daemonIds));
+
+ makeService = (daemonType: daemonId: clusterName: ceph: extraServiceConfig: {
enable = true;
description = "Ceph ${builtins.replaceStrings lowerChars upperChars daemonType} daemon ${daemonId}";
- after = [ "network-online.target" "local-fs.target" "time-sync.target" ] ++ optional (daemonType == "osd") "ceph-mon.target";
- wants = [ "network-online.target" "local-fs.target" "time-sync.target" ];
+ after = [ "network-online.target" "time-sync.target" ] ++ optional (daemonType == "osd") "ceph-mon.target";
+ wants = [ "network-online.target" "time-sync.target" ];
partOf = [ "ceph-${daemonType}.target" ];
wantedBy = [ "ceph-${daemonType}.target" ];
@@ -34,28 +34,34 @@ let
Restart = "on-failure";
StartLimitBurst = "5";
StartLimitInterval = "30min";
- ExecStart = "${ceph.out}/bin/${if daemonType == "rgw" then "radosgw" else "ceph-${daemonType}"} -f --cluster ${clusterName} --id ${if daemonType == "rgw" then "client.${daemonId}" else daemonId} --setuser ceph --setgroup ceph";
+ ExecStart = ''${ceph.out}/bin/${if daemonType == "rgw" then "radosgw" else "ceph-${daemonType}"} \
+ -f --cluster ${clusterName} --id ${daemonId} --setuser ceph \
+ --setgroup ${if daemonType == "osd" then "disk" else "ceph"}'';
} // extraServiceConfig
- // optionalAttrs (daemonType == "osd") { ExecStartPre = "${ceph.out}/libexec/ceph/ceph-osd-prestart.sh --id ${daemonId} --cluster ${clusterName}"; };
- } // optionalAttrs (builtins.elem daemonType [ "mds" "mon" "rgw" "mgr" ]) { preStart = ''
+ // optionalAttrs (daemonType == "osd") { ExecStartPre = ''${ceph.lib}/libexec/ceph/ceph-osd-prestart.sh \
+ --id ${daemonId} --cluster ${clusterName}''; };
+ } // optionalAttrs (builtins.elem daemonType [ "mds" "mon" "rgw" "mgr" ]) {
+ preStart = ''
daemonPath="/var/lib/ceph/${if daemonType == "rgw" then "radosgw" else daemonType}/${clusterName}-${daemonId}"
- if [ ! -d ''$daemonPath ]; then
- mkdir -m 755 -p ''$daemonPath
- chown -R ceph:ceph ''$daemonPath
+ if [ ! -d $daemonPath ]; then
+ mkdir -m 755 -p $daemonPath
+ chown -R ceph:ceph $daemonPath
fi
'';
} // optionalAttrs (daemonType == "osd") { path = [ pkgs.getopt ]; }
);
- generateTargetFile = (daemonType:
+
+ makeTarget = (daemonType:
{
"ceph-${daemonType}" = {
description = "Ceph target allowing to start/stop all ceph-${daemonType} services at once";
partOf = [ "ceph.target" ];
+ wantedBy = [ "ceph.target" ];
before = [ "ceph.target" ];
};
}
);
-in
+in
{
options.services.ceph = {
# Ceph has a monolithic configuration file but different sections for
@@ -82,11 +88,19 @@ in
'';
};
+ mgrModulePath = mkOption {
+ type = types.path;
+ default = "${pkgs.ceph.lib}/lib/ceph/mgr";
+ description = ''
+ Path at which to find ceph-mgr modules.
+ '';
+ };
+
monInitialMembers = mkOption {
type = with types; nullOr commas;
default = null;
example = ''
- node0, node1, node2
+ node0, node1, node2
'';
description = ''
List of hosts that will be used as monitors at startup.
@@ -157,6 +171,27 @@ in
A comma-separated list of subnets that will be used as cluster networks in the cluster.
'';
};
+
+ rgwMimeTypesFile = mkOption {
+ type = with types; nullOr path;
+ default = "${pkgs.mime-types}/etc/mime.types";
+ description = ''
+ Path to mime types used by radosgw.
+ '';
+ };
+ };
+
+ extraConfig = mkOption {
+ type = with types; attrsOf str;
+ default = {};
+ example = ''
+ {
+ "ms bind ipv6" = "true";
+ };
+ '';
+ description = ''
+ Extra configuration to add to the global section. Use for setting values that are common for all daemons in the cluster.
+ '';
};
mgr = {
@@ -216,6 +251,7 @@ in
to the id part in ceph i.e. [ "name1" ] would result in osd.name1
'';
};
+
extraConfig = mkOption {
type = with types; attrsOf str;
default = {
@@ -296,9 +332,6 @@ in
{ assertion = cfg.global.fsid != "";
message = "fsid has to be set to a valid uuid for the cluster to function";
}
- { assertion = cfg.mgr.enable == true;
- message = "ceph 12.x requires atleast 1 MGR daemon enabled for the cluster to function";
- }
{ assertion = cfg.mon.enable == true -> cfg.mon.daemons != [];
message = "have to set id of atleast one MON if you're going to enable Monitor";
}
@@ -313,21 +346,19 @@ in
}
];
- warnings = optional (cfg.global.monInitialMembers == null)
+ warnings = optional (cfg.global.monInitialMembers == null)
''Not setting up a list of members in monInitialMembers requires that you set the host variable for each mon daemon or else the cluster won't function'';
-
+
environment.etc."ceph/ceph.conf".text = let
- # Translate camelCaseOptions to the expected camel case option for ceph.conf
- translatedGlobalConfig = mapAttrs' (name: value: nameValuePair (translateOption name) value) cfg.global;
# Merge the extraConfig set for mgr daemons, as mgr don't have their own section
- globalAndMgrConfig = translatedGlobalConfig // optionalAttrs cfg.mgr.enable cfg.mgr.extraConfig;
+ globalSection = expandCamelCaseAttrs (cfg.global // cfg.extraConfig // optionalAttrs cfg.mgr.enable cfg.mgr.extraConfig);
# Remove all name-value pairs with null values from the attribute set to avoid making empty sections in the ceph.conf
- globalConfig = mapAttrs' (name: value: nameValuePair (translateOption name) value) (filterAttrs (name: value: value != null) globalAndMgrConfig);
+ globalSection' = filterAttrs (name: value: value != null) globalSection;
totalConfig = {
- "global" = globalConfig;
- } // optionalAttrs (cfg.mon.enable && cfg.mon.extraConfig != {}) { "mon" = cfg.mon.extraConfig; }
- // optionalAttrs (cfg.mds.enable && cfg.mds.extraConfig != {}) { "mds" = cfg.mds.extraConfig; }
- // optionalAttrs (cfg.osd.enable && cfg.osd.extraConfig != {}) { "osd" = cfg.osd.extraConfig; }
+ global = globalSection';
+ } // optionalAttrs (cfg.mon.enable && cfg.mon.extraConfig != {}) { mon = cfg.mon.extraConfig; }
+ // optionalAttrs (cfg.mds.enable && cfg.mds.extraConfig != {}) { mds = cfg.mds.extraConfig; }
+ // optionalAttrs (cfg.osd.enable && cfg.osd.extraConfig != {}) { osd = cfg.osd.extraConfig; }
// optionalAttrs (cfg.client.enable && cfg.client.extraConfig != {}) cfg.client.extraConfig;
in
generators.toINI {} totalConfig;
@@ -336,31 +367,36 @@ in
name = "ceph";
uid = config.ids.uids.ceph;
description = "Ceph daemon user";
+ group = "ceph";
+ extraGroups = [ "disk" ];
};
-
users.groups = singleton {
name = "ceph";
gid = config.ids.gids.ceph;
};
systemd.services = let
- services = []
- ++ optional cfg.mon.enable (generateDaemonList "mon" cfg.mon.daemons { RestartSec = "10"; })
- ++ optional cfg.mds.enable (generateDaemonList "mds" cfg.mds.daemons { StartLimitBurst = "3"; })
- ++ optional cfg.osd.enable (generateDaemonList "osd" cfg.osd.daemons { StartLimitBurst = "30"; RestartSec = "20s"; })
- ++ optional cfg.rgw.enable (generateDaemonList "rgw" cfg.rgw.daemons { })
- ++ optional cfg.mgr.enable (generateDaemonList "mgr" cfg.mgr.daemons { StartLimitBurst = "3"; });
- in
+ services = []
+ ++ optional cfg.mon.enable (makeServices "mon" cfg.mon.daemons { RestartSec = "10"; })
+ ++ optional cfg.mds.enable (makeServices "mds" cfg.mds.daemons { StartLimitBurst = "3"; })
+ ++ optional cfg.osd.enable (makeServices "osd" cfg.osd.daemons { StartLimitBurst = "30";
+ RestartSec = "20s";
+ PrivateDevices = "no"; # osd needs disk access
+ })
+ ++ optional cfg.rgw.enable (makeServices "rgw" cfg.rgw.daemons { })
+ ++ optional cfg.mgr.enable (makeServices "mgr" cfg.mgr.daemons { StartLimitBurst = "3"; });
+ in
mkMerge services;
systemd.targets = let
targets = [
- { "ceph" = { description = "Ceph target allowing to start/stop all ceph service instances at once"; }; }
- ] ++ optional cfg.mon.enable (generateTargetFile "mon")
- ++ optional cfg.mds.enable (generateTargetFile "mds")
- ++ optional cfg.osd.enable (generateTargetFile "osd")
- ++ optional cfg.rgw.enable (generateTargetFile "rgw")
- ++ optional cfg.mgr.enable (generateTargetFile "mgr");
+ { ceph = { description = "Ceph target allowing to start/stop all ceph service instances at once";
+ wantedBy = [ "multi-user.target" ]; }; }
+ ] ++ optional cfg.mon.enable (makeTarget "mon")
+ ++ optional cfg.mds.enable (makeTarget "mds")
+ ++ optional cfg.osd.enable (makeTarget "osd")
+ ++ optional cfg.rgw.enable (makeTarget "rgw")
+ ++ optional cfg.mgr.enable (makeTarget "mgr");
in
mkMerge targets;
diff --git a/nixos/modules/services/network-filesystems/davfs2.nix b/nixos/modules/services/network-filesystems/davfs2.nix
index c16e12378d75..100d458d536c 100644
--- a/nixos/modules/services/network-filesystems/davfs2.nix
+++ b/nixos/modules/services/network-filesystems/davfs2.nix
@@ -21,7 +21,7 @@ in
};
davUser = mkOption {
- type = types.string;
+ type = types.str;
default = "davfs2";
description = ''
When invoked by root the mount.davfs daemon will run as this user.
@@ -30,7 +30,7 @@ in
};
davGroup = mkOption {
- type = types.string;
+ type = types.str;
default = "davfs2";
description = ''
The group of the running mount.davfs daemon. Ordinary users must be
diff --git a/nixos/modules/services/network-filesystems/drbd.nix b/nixos/modules/services/network-filesystems/drbd.nix
index 57b1fbb597c7..4ab74ed8e1c0 100644
--- a/nixos/modules/services/network-filesystems/drbd.nix
+++ b/nixos/modules/services/network-filesystems/drbd.nix
@@ -23,7 +23,7 @@ let cfg = config.services.drbd; in
services.drbd.config = mkOption {
default = "";
- type = types.string;
+ type = types.lines;
description = ''
Contents of the drbd.conf configuration file.
'';
diff --git a/nixos/modules/services/network-filesystems/glusterfs.nix b/nixos/modules/services/network-filesystems/glusterfs.nix
index 00875c6c4a18..d70092999f67 100644
--- a/nixos/modules/services/network-filesystems/glusterfs.nix
+++ b/nixos/modules/services/network-filesystems/glusterfs.nix
@@ -156,7 +156,7 @@ in
wantedBy = [ "multi-user.target" ];
requires = lib.optional cfg.useRpcbind "rpcbind.service";
- after = [ "network.target" "local-fs.target" ] ++ lib.optional cfg.useRpcbind "rpcbind.service";
+ after = [ "network.target" ] ++ lib.optional cfg.useRpcbind "rpcbind.service";
preStart = ''
install -m 0755 -d /var/log/glusterfs
diff --git a/nixos/modules/services/network-filesystems/ipfs.nix b/nixos/modules/services/network-filesystems/ipfs.nix
index f19bf9d81396..b6d881afd7bd 100644
--- a/nixos/modules/services/network-filesystems/ipfs.nix
+++ b/nixos/modules/services/network-filesystems/ipfs.nix
@@ -208,9 +208,9 @@ in {
config = mkIf cfg.enable {
environment.systemPackages = [ wrapped ];
- environment.etc."fuse.conf" = mkIf cfg.autoMount { text = ''
- user_allow_other
- ''; };
+ programs.fuse = mkIf cfg.autoMount {
+ userAllowOther = true;
+ };
users.users = mkIf (cfg.user == "ipfs") {
ipfs = {
@@ -236,7 +236,6 @@ in {
systemd.services.ipfs-init = recursiveUpdate commonEnv {
description = "IPFS Initializer";
- after = [ "local-fs.target" ];
before = [ "ipfs.service" "ipfs-offline.service" "ipfs-norouting.service" ];
script = ''
@@ -263,21 +262,21 @@ in {
systemd.services.ipfs = recursiveUpdate baseService {
description = "IPFS Daemon";
wantedBy = mkIf (cfg.defaultMode == "online") [ "multi-user.target" ];
- after = [ "network.target" "local-fs.target" "ipfs-init.service" ];
+ after = [ "network.target" "ipfs-init.service" ];
conflicts = [ "ipfs-offline.service" "ipfs-norouting.service"];
};
systemd.services.ipfs-offline = recursiveUpdate baseService {
description = "IPFS Daemon (offline mode)";
wantedBy = mkIf (cfg.defaultMode == "offline") [ "multi-user.target" ];
- after = [ "local-fs.target" "ipfs-init.service" ];
+ after = [ "ipfs-init.service" ];
conflicts = [ "ipfs.service" "ipfs-norouting.service"];
};
systemd.services.ipfs-norouting = recursiveUpdate baseService {
description = "IPFS Daemon (no routing mode)";
wantedBy = mkIf (cfg.defaultMode == "norouting") [ "multi-user.target" ];
- after = [ "local-fs.target" "ipfs-init.service" ];
+ after = [ "ipfs-init.service" ];
conflicts = [ "ipfs.service" "ipfs-offline.service"];
};
diff --git a/nixos/modules/services/network-filesystems/openafs/lib.nix b/nixos/modules/services/network-filesystems/openafs/lib.nix
index 1cc9bed847ab..e068ee761c2a 100644
--- a/nixos/modules/services/network-filesystems/openafs/lib.nix
+++ b/nixos/modules/services/network-filesystems/openafs/lib.nix
@@ -3,7 +3,7 @@
let
inherit (lib) concatStringsSep mkOption types;
-in rec {
+in {
mkCellServDB = cellName: db: ''
>${cellName}
diff --git a/nixos/modules/services/network-filesystems/rsyncd.nix b/nixos/modules/services/network-filesystems/rsyncd.nix
index 054057d52ab1..b17ec3aa9300 100644
--- a/nixos/modules/services/network-filesystems/rsyncd.nix
+++ b/nixos/modules/services/network-filesystems/rsyncd.nix
@@ -35,7 +35,7 @@ in
};
motd = mkOption {
- type = types.string;
+ type = types.str;
default = "";
description = ''
Message of the day to display to clients on each connect.
diff --git a/nixos/modules/services/network-filesystems/samba.nix b/nixos/modules/services/network-filesystems/samba.nix
index 69368441c62c..ce565dbaab81 100644
--- a/nixos/modules/services/network-filesystems/samba.nix
+++ b/nixos/modules/services/network-filesystems/samba.nix
@@ -45,6 +45,7 @@ let
daemonService = appName: args:
{ description = "Samba Service Daemon ${appName}";
+ after = [ "network.target" ];
requiredBy = [ "samba.target" ];
partOf = [ "samba.target" ];
@@ -234,10 +235,10 @@ in
# Refer to https://github.com/samba-team/samba/tree/master/packaging/systemd
# for correct use with systemd
services = {
- "samba-smbd" = daemonService "smbd" "";
- "samba-nmbd" = mkIf cfg.enableNmbd (daemonService "nmbd" "");
- "samba-winbindd" = mkIf cfg.enableWinbindd (daemonService "winbindd" "");
- "samba-setup" = {
+ samba-smbd = daemonService "smbd" "";
+ samba-nmbd = mkIf cfg.enableNmbd (daemonService "nmbd" "");
+ samba-winbindd = mkIf cfg.enableWinbindd (daemonService "winbindd" "");
+ samba-setup = {
description = "Samba Setup Task";
script = setupScript;
unitConfig.RequiresMountsFor = "/var/lib/samba";
diff --git a/nixos/modules/services/network-filesystems/u9fs.nix b/nixos/modules/services/network-filesystems/u9fs.nix
index 4f37fc2a9e5c..77961b78cadb 100644
--- a/nixos/modules/services/network-filesystems/u9fs.nix
+++ b/nixos/modules/services/network-filesystems/u9fs.nix
@@ -55,6 +55,7 @@ in
sockets.u9fs = {
description = "U9fs Listening Socket";
wantedBy = [ "sockets.target" ];
+ after = [ "network.target" ];
inherit (cfg) listenStreams;
socketConfig.Accept = "yes";
};
diff --git a/nixos/modules/services/network-filesystems/yandex-disk.nix b/nixos/modules/services/network-filesystems/yandex-disk.nix
index e93f45b49867..0aa01ef9e6d9 100644
--- a/nixos/modules/services/network-filesystems/yandex-disk.nix
+++ b/nixos/modules/services/network-filesystems/yandex-disk.nix
@@ -29,7 +29,7 @@ in
username = mkOption {
default = "";
- type = types.string;
+ type = types.str;
description = ''
Your yandex.com login name.
'';
@@ -37,7 +37,7 @@ in
password = mkOption {
default = "";
- type = types.string;
+ type = types.str;
description = ''
Your yandex.com password. Warning: it will be world-readable in /nix/store.
'';
@@ -57,7 +57,7 @@ in
excludes = mkOption {
default = "";
- type = types.string;
+ type = types.commas;
example = "data,backup";
description = ''
Comma-separated list of directories which are excluded from synchronization.
diff --git a/nixos/modules/services/networking/aria2.nix b/nixos/modules/services/networking/aria2.nix
index 53829bf18863..156fef144791 100644
--- a/nixos/modules/services/networking/aria2.nix
+++ b/nixos/modules/services/networking/aria2.nix
@@ -47,8 +47,8 @@ in
'';
};
downloadDir = mkOption {
- type = types.string;
- default = "${downloadDir}";
+ type = types.path;
+ default = downloadDir;
description = ''
Directory to store downloaded files.
'';
@@ -66,7 +66,7 @@ in
description = "Specify a port number for JSON-RPC/XML-RPC server to listen to. Possible Values: 1024-65535";
};
rpcSecret = mkOption {
- type = types.string;
+ type = types.str;
default = "aria2rpc";
description = ''
Set RPC secret authorization token.
@@ -74,7 +74,7 @@ in
'';
};
extraArguments = mkOption {
- type = types.string;
+ type = types.separatedString " ";
example = "--rpc-listen-all --remote-time=true";
default = "";
description = ''
@@ -109,7 +109,7 @@ in
systemd.services.aria2 = {
description = "aria2 Service";
- after = [ "local-fs.target" "network.target" ];
+ after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
preStart = ''
if [[ ! -e "${sessionFile}" ]]
diff --git a/nixos/modules/services/networking/autossh.nix b/nixos/modules/services/networking/autossh.nix
index a098a155e991..a8d9a027e9fa 100644
--- a/nixos/modules/services/networking/autossh.nix
+++ b/nixos/modules/services/networking/autossh.nix
@@ -20,12 +20,12 @@ in
type = types.listOf (types.submodule {
options = {
name = mkOption {
- type = types.string;
+ type = types.str;
example = "socks-peer";
description = "Name of the local AutoSSH session";
};
user = mkOption {
- type = types.string;
+ type = types.str;
example = "bill";
description = "Name of the user the AutoSSH session should run as";
};
@@ -40,7 +40,7 @@ in
'';
};
extraArguments = mkOption {
- type = types.string;
+ type = types.separatedString " ";
example = "-N -D4343 bill@socks.example.net";
description = ''
Arguments to be passed to AutoSSH and retransmitted to SSH
diff --git a/nixos/modules/services/networking/babeld.nix b/nixos/modules/services/networking/babeld.nix
index 3dfd80f6ff52..de863461eab2 100644
--- a/nixos/modules/services/networking/babeld.nix
+++ b/nixos/modules/services/networking/babeld.nix
@@ -52,7 +52,7 @@ in
example =
{
type = "tunnel";
- "split-horizon" = true;
+ split-horizon = true;
};
};
@@ -66,8 +66,8 @@ in
example =
{ enp0s2 =
{ type = "wired";
- "hello-interval" = 5;
- "split-horizon" = "auto";
+ hello-interval = 5;
+ split-horizon = "auto";
};
};
};
diff --git a/nixos/modules/services/networking/bitcoind.nix b/nixos/modules/services/networking/bitcoind.nix
index d3501636b41d..1439d739da9d 100644
--- a/nixos/modules/services/networking/bitcoind.nix
+++ b/nixos/modules/services/networking/bitcoind.nix
@@ -59,8 +59,8 @@ in {
package = mkOption {
type = types.package;
- default = pkgs.altcoins.bitcoind;
- defaultText = "pkgs.altcoins.bitcoind";
+ default = pkgs.bitcoind;
+ defaultText = "pkgs.bitcoind";
description = "The package providing bitcoin binaries.";
};
configFile = mkOption {
diff --git a/nixos/modules/services/networking/charybdis.nix b/nixos/modules/services/networking/charybdis.nix
index e3aba063f87b..da26246e703e 100644
--- a/nixos/modules/services/networking/charybdis.nix
+++ b/nixos/modules/services/networking/charybdis.nix
@@ -21,14 +21,14 @@ in
enable = mkEnableOption "Charybdis IRC daemon";
config = mkOption {
- type = types.string;
+ type = types.str;
description = ''
Charybdis IRC daemon configuration file.
'';
};
statedir = mkOption {
- type = types.string;
+ type = types.path;
default = "/var/lib/charybdis";
description = ''
Location of the state directory of charybdis.
@@ -36,7 +36,7 @@ in
};
user = mkOption {
- type = types.string;
+ type = types.str;
default = "ircd";
description = ''
Charybdis IRC daemon user.
@@ -44,7 +44,7 @@ in
};
group = mkOption {
- type = types.string;
+ type = types.str;
default = "ircd";
description = ''
Charybdis IRC daemon group.
@@ -101,7 +101,7 @@ in
};
}
-
+
(mkIf (cfg.motd != null) {
environment.etc."charybdis/ircd.motd".text = cfg.motd;
})
diff --git a/nixos/modules/services/networking/cjdns.nix b/nixos/modules/services/networking/cjdns.nix
index c40962f4aa82..3fb85b16cbe2 100644
--- a/nixos/modules/services/networking/cjdns.nix
+++ b/nixos/modules/services/networking/cjdns.nix
@@ -44,9 +44,7 @@ let
parseModules = x:
x // { connectTo = mapAttrs (name: value: { inherit (value) password publicKey; }) x.connectTo; };
- # would be nice to merge 'cfg' with a //,
- # but the json nesting is wacky.
- cjdrouteConf = builtins.toJSON ( {
+ cjdrouteConf = builtins.toJSON ( recursiveUpdate {
admin = {
bind = cfg.admin.bind;
password = "@CJDNS_ADMIN_PASSWORD@";
@@ -71,7 +69,7 @@ let
security = [ { exemptAngel = 1; setuser = "nobody"; } ];
- });
+ } cfg.extraConfig);
in
@@ -91,6 +89,16 @@ in
'';
};
+ extraConfig = mkOption {
+ type = types.attrs;
+ default = {};
+ example = { router.interface.tunDevice = "tun10"; };
+ description = ''
+ Extra configuration, given as attrs, that will be merged recursively
+ with the rest of the JSON generated by this module, at the root node.
+ '';
+ };
+
confFile = mkOption {
type = types.nullOr types.path;
default = null;
@@ -246,7 +254,10 @@ in
if cfg.confFile != null then "${pkg}/bin/cjdroute < ${cfg.confFile}" else
''
source /etc/cjdns.keys
- echo '${cjdrouteConf}' | sed \
+ (cat <<'EOF'
+ ${cjdrouteConf}
+ EOF
+ ) | sed \
-e "s/@CJDNS_ADMIN_PASSWORD@/$CJDNS_ADMIN_PASSWORD/g" \
-e "s/@CJDNS_PRIVATE_KEY@/$CJDNS_PRIVATE_KEY/g" \
| ${pkg}/bin/cjdroute
diff --git a/nixos/modules/services/networking/connman.nix b/nixos/modules/services/networking/connman.nix
index c3ca6fbe725e..31127f790499 100644
--- a/nixos/modules/services/networking/connman.nix
+++ b/nixos/modules/services/networking/connman.nix
@@ -45,7 +45,7 @@ in {
};
networkInterfaceBlacklist = mkOption {
- type = with types; listOf string;
+ type = with types; listOf str;
default = [ "vmnet" "vboxnet" "virbr" "ifb" "ve" ];
description = ''
Default blacklisted interfaces, this includes NixOS containers interfaces (ve).
@@ -53,7 +53,7 @@ in {
};
extraFlags = mkOption {
- type = with types; listOf string;
+ type = with types; listOf str;
default = [ ];
example = [ "--nodnsproxy" ];
description = ''
@@ -82,7 +82,7 @@ in {
environment.systemPackages = [ connman ];
- systemd.services."connman" = {
+ systemd.services.connman = {
description = "Connection service";
wantedBy = [ "multi-user.target" ];
after = [ "syslog.target" ];
@@ -95,7 +95,7 @@ in {
};
};
- systemd.services."connman-vpn" = mkIf cfg.enableVPN {
+ systemd.services.connman-vpn = mkIf cfg.enableVPN {
description = "ConnMan VPN service";
wantedBy = [ "multi-user.target" ];
after = [ "syslog.target" ];
@@ -108,7 +108,7 @@ in {
};
};
- systemd.services."net-connman-vpn" = mkIf cfg.enableVPN {
+ systemd.services.net-connman-vpn = mkIf cfg.enableVPN {
description = "D-BUS Service";
serviceConfig = {
Name = "net.connman.vpn";
diff --git a/nixos/modules/services/networking/consul.nix b/nixos/modules/services/networking/consul.nix
index 3a92a883fbf8..689cbc8a986d 100644
--- a/nixos/modules/services/networking/consul.nix
+++ b/nixos/modules/services/networking/consul.nix
@@ -15,7 +15,7 @@ let
++ cfg.extraConfigFiles;
devices = attrValues (filterAttrs (_: i: i != null) cfg.interface);
- systemdDevices = flip map devices
+ systemdDevices = forEach devices
(i: "sys-subsystem-net-devices-${utils.escapeSystemdPath i}.device");
in
{
@@ -156,7 +156,7 @@ in
config = mkIf cfg.enable (
mkMerge [{
- users.users."consul" = {
+ users.users.consul = {
description = "Consul agent daemon user";
uid = config.ids.uids.consul;
# The shell is needed for health checks
diff --git a/nixos/modules/services/networking/dnschain.nix b/nixos/modules/services/networking/dnschain.nix
index 0c2add424bac..5b58ea9b0c91 100644
--- a/nixos/modules/services/networking/dnschain.nix
+++ b/nixos/modules/services/networking/dnschain.nix
@@ -136,10 +136,16 @@ in
"/.dns/127.0.0.1#${toString cfg.dns.port}"
];
- services.pdns-recursor.forwardZones = mkIf cfgs.pdns-recursor.resolveDNSChainQueries
- { bit = "127.0.0.1:${toString cfg.dns.port}";
- dns = "127.0.0.1:${toString cfg.dns.port}";
- };
+ services.pdns-recursor = mkIf cfgs.pdns-recursor.resolveDNSChainQueries {
+ forwardZones =
+ { bit = "127.0.0.1:${toString cfg.dns.port}";
+ dns = "127.0.0.1:${toString cfg.dns.port}";
+ };
+ luaConfig =''
+ addNTA("bit", "namecoin doesn't support DNSSEC")
+ addNTA("dns", "namecoin doesn't support DNSSEC")
+ '';
+ };
users.users = singleton {
name = username;
diff --git a/nixos/modules/services/networking/firewall.nix b/nixos/modules/services/networking/firewall.nix
index 4ea891262e56..5919962837a2 100644
--- a/nixos/modules/services/networking/firewall.nix
+++ b/nixos/modules/services/networking/firewall.nix
@@ -58,7 +58,7 @@ let
${text}
''; in "${dir}/bin/${name}";
- defaultInterface = { default = mapAttrs (name: value: cfg."${name}") commonOptions; };
+ defaultInterface = { default = mapAttrs (name: value: cfg.${name}) commonOptions; };
allInterfaces = defaultInterface // cfg.interfaces;
startScript = writeShScript "firewall-start" ''
@@ -331,6 +331,17 @@ in
'';
};
+ package = mkOption {
+ type = types.package;
+ default = pkgs.iptables;
+ defaultText = "pkgs.iptables";
+ example = literalExample "pkgs.iptables-nftables-compat";
+ description =
+ ''
+ The iptables package to use for running the firewall service."
+ '';
+ };
+
logRefusedConnections = mkOption {
type = types.bool;
default = true;
@@ -536,7 +547,7 @@ in
networking.firewall.trustedInterfaces = [ "lo" ];
- environment.systemPackages = [ pkgs.iptables ] ++ cfg.extraPackages;
+ environment.systemPackages = [ cfg.package ] ++ cfg.extraPackages;
boot.kernelModules = (optional cfg.autoLoadConntrackHelpers "nf_conntrack")
++ map (x: "nf_conntrack_${x}") cfg.connectionTrackingModules;
@@ -555,7 +566,7 @@ in
before = [ "network-pre.target" ];
after = [ "systemd-modules-load.service" ];
- path = [ pkgs.iptables ] ++ cfg.extraPackages;
+ path = [ cfg.package ] ++ cfg.extraPackages;
# FIXME: this module may also try to load kernel modules, but
# containers don't have CAP_SYS_MODULE. So the host system had
diff --git a/nixos/modules/services/networking/git-daemon.nix b/nixos/modules/services/networking/git-daemon.nix
index c0020349ec74..a638a3083fba 100644
--- a/nixos/modules/services/networking/git-daemon.nix
+++ b/nixos/modules/services/networking/git-daemon.nix
@@ -115,7 +115,7 @@ in
gid = config.ids.gids.git;
};
- systemd.services."git-daemon" = {
+ systemd.services.git-daemon = {
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
script = "${pkgs.git}/bin/git daemon --reuseaddr "
diff --git a/nixos/modules/services/networking/gogoclient.nix b/nixos/modules/services/networking/gogoclient.nix
index 9d16f0efb435..c9b03bca7112 100644
--- a/nixos/modules/services/networking/gogoclient.nix
+++ b/nixos/modules/services/networking/gogoclient.nix
@@ -34,7 +34,7 @@ in
password = mkOption {
default = "";
- type = types.string;
+ type = types.str;
description = ''
Path to a file (as a string), containing your gogoNET password, if any.
'';
diff --git a/nixos/modules/services/networking/hostapd.nix b/nixos/modules/services/networking/hostapd.nix
index 54a5bed2563f..2915b54f05b4 100644
--- a/nixos/modules/services/networking/hostapd.nix
+++ b/nixos/modules/services/networking/hostapd.nix
@@ -81,7 +81,7 @@ in
driver = mkOption {
default = "nl80211";
example = "hostapd";
- type = types.string;
+ type = types.str;
description = ''
Which driver hostapd will use.
Most applications will probably use the default.
@@ -91,7 +91,7 @@ in
ssid = mkOption {
default = "nixos";
example = "mySpecialSSID";
- type = types.string;
+ type = types.str;
description = "SSID to be used in IEEE 802.11 management frames.";
};
@@ -119,7 +119,7 @@ in
group = mkOption {
default = "wheel";
example = "network";
- type = types.string;
+ type = types.str;
description = ''
Members of this group can control hostapd.
'';
@@ -135,7 +135,7 @@ in
wpaPassphrase = mkOption {
default = "my_sekret";
example = "any_64_char_string";
- type = types.string;
+ type = types.str;
description = ''
WPA-PSK (pre-shared-key) passphrase. Clients will need this
passphrase to associate with this access point.
diff --git a/nixos/modules/services/networking/hylafax/systemd.nix b/nixos/modules/services/networking/hylafax/systemd.nix
index ef177e4be345..b9b9b9dca4f0 100644
--- a/nixos/modules/services/networking/hylafax/systemd.nix
+++ b/nixos/modules/services/networking/hylafax/systemd.nix
@@ -7,7 +7,7 @@ let
inherit (lib) concatStringsSep optionalString;
cfg = config.services.hylafax;
- mapModems = lib.flip map (lib.attrValues cfg.modems);
+ mapModems = lib.forEach (lib.attrValues cfg.modems);
mkConfigFile = name: conf:
# creates hylafax config file,
@@ -68,7 +68,7 @@ let
inherit (cfg) spoolAreaPath;
};
- sockets."hylafax-hfaxd" = {
+ sockets.hylafax-hfaxd = {
description = "HylaFAX server socket";
documentation = [ "man:hfaxd(8)" ];
wantedBy = [ "multi-user.target" ];
@@ -77,7 +77,7 @@ let
socketConfig.Accept = true;
};
- paths."hylafax-faxq" = {
+ paths.hylafax-faxq = {
description = "HylaFAX queue manager sendq watch";
documentation = [ "man:faxq(8)" "man:sendq(5)" ];
wantedBy = [ "multi-user.target" ];
@@ -87,11 +87,11 @@ let
timers = mkMerge [
(
mkIf (cfg.faxcron.enable.frequency!=null)
- { "hylafax-faxcron".timerConfig.Persistent = true; }
+ { hylafax-faxcron.timerConfig.Persistent = true; }
)
(
mkIf (cfg.faxqclean.enable.frequency!=null)
- { "hylafax-faxqclean".timerConfig.Persistent = true; }
+ { hylafax-faxqclean.timerConfig.Persistent = true; }
)
];
@@ -121,7 +121,7 @@ let
in
service: service // { serviceConfig = apply service; };
- services."hylafax-spool" = {
+ services.hylafax-spool = {
description = "HylaFAX spool area preparation";
documentation = [ "man:hylafax-server(4)" ];
script = ''
@@ -140,7 +140,7 @@ let
unitConfig.RequiresMountsFor = [ cfg.spoolAreaPath ];
};
- services."hylafax-faxq" = {
+ services.hylafax-faxq = {
description = "HylaFAX queue manager";
documentation = [ "man:faxq(8)" ];
requires = [ "hylafax-spool.service" ];
@@ -178,7 +178,7 @@ let
serviceConfig.PrivateNetwork = null;
};
- services."hylafax-faxcron" = rec {
+ services.hylafax-faxcron = rec {
description = "HylaFAX spool area maintenance";
documentation = [ "man:faxcron(8)" ];
after = [ "hylafax-spool.service" ];
@@ -194,7 +194,7 @@ let
];
};
- services."hylafax-faxqclean" = rec {
+ services.hylafax-faxqclean = rec {
description = "HylaFAX spool area queue cleaner";
documentation = [ "man:faxqclean(8)" ];
after = [ "hylafax-spool.service" ];
diff --git a/nixos/modules/services/networking/ircd-hybrid/default.nix b/nixos/modules/services/networking/ircd-hybrid/default.nix
index 2bd898edf897..f5abe61a1baf 100644
--- a/nixos/modules/services/networking/ircd-hybrid/default.nix
+++ b/nixos/modules/services/networking/ircd-hybrid/default.nix
@@ -121,7 +121,7 @@ in
users.groups.ircd.gid = config.ids.gids.ircd;
- systemd.services."ircd-hybrid" = {
+ systemd.services.ircd-hybrid = {
description = "IRCD Hybrid server";
after = [ "started networking" ];
wantedBy = [ "multi-user.target" ];
diff --git a/nixos/modules/services/networking/iwd.nix b/nixos/modules/services/networking/iwd.nix
index 18ed20e28886..839fa48d9a42 100644
--- a/nixos/modules/services/networking/iwd.nix
+++ b/nixos/modules/services/networking/iwd.nix
@@ -26,6 +26,7 @@ in {
systemd.tmpfiles.rules = [
"d /var/lib/iwd 0700 root root -"
+ "d /var/lib/ead 0700 root root -"
];
};
diff --git a/nixos/modules/services/networking/jormungandr.nix b/nixos/modules/services/networking/jormungandr.nix
new file mode 100644
index 000000000000..152cceb4bf91
--- /dev/null
+++ b/nixos/modules/services/networking/jormungandr.nix
@@ -0,0 +1,102 @@
+{ config, lib, pkgs, ... }:
+
+let
+ cfg = config.services.jormungandr;
+
+ inherit (lib) mkEnableOption mkIf mkOption;
+ inherit (lib) optionalString types;
+
+ dataDir = "/var/lib/jormungandr";
+
+ # Default settings so far, as the service matures we will
+ # move these out as separate settings
+ configSettings = {
+ storage = dataDir;
+ p2p = {
+ public_address = "/ip4/127.0.0.1/tcp/8299";
+ topics_of_interest = {
+ messages = "high";
+ blocks = "high";
+ };
+ };
+ rest = {
+ listen = "127.0.0.1:8607";
+ };
+ };
+
+ configFile = if cfg.configFile == null then
+ pkgs.writeText "jormungandr.yaml" (builtins.toJSON configSettings)
+ else cfg.configFile;
+
+in {
+
+ options = {
+
+ services.jormungandr = {
+ enable = mkEnableOption "jormungandr service";
+
+ configFile = mkOption {
+ type = types.nullOr types.path;
+ default = null;
+ example = "/var/lib/jormungandr/node.yaml";
+ description = ''
+ The path of the jormungandr blockchain configuration file in YAML format.
+ If no file is specified, a file is generated using the other options.
+ '';
+ };
+
+ secretFile = mkOption {
+ type = types.nullOr types.path;
+ default = null;
+ example = "/etc/secret/jormungandr.yaml";
+ description = ''
+ The path of the jormungandr blockchain secret node configuration file in
+ YAML format. Do not store this in nix store!
+ '';
+ };
+
+ genesisBlockHash = mkOption {
+ type = types.nullOr types.str;
+ default = null;
+ example = "d70495af81ae8600aca3e642b2427327cb6001ec4d7a0037e96a00dabed163f9";
+ description = ''
+ Set the genesis block hash (the hash of the block0) so we can retrieve
+ the genesis block (and the blockchain configuration) from the existing
+ storage or from the network.
+ '';
+ };
+
+ genesisBlockFile = mkOption {
+ type = types.nullOr types.path;
+ default = null;
+ example = "/var/lib/jormungandr/block-0.bin";
+ description = ''
+ The path of the genesis block file if we are hosting it locally.
+ '';
+ };
+
+ };
+ };
+
+ config = mkIf cfg.enable {
+
+ systemd.services.jormungandr = {
+ description = "jormungandr server";
+ wantedBy = [ "multi-user.target" ];
+ after = [ "network-online.target" ];
+ environment = {
+ RUST_BACKTRACE = "full";
+ };
+ serviceConfig = {
+ DynamicUser = true;
+ StateDirectory = baseNameOf dataDir;
+ ExecStart = ''
+ ${pkgs.jormungandr}/bin/jormungandr --config ${configFile} \
+ ${optionalString (cfg.secretFile != null) " --secret ${cfg.secretFile}"} \
+ ${optionalString (cfg.genesisBlockHash != null) " --genesis-block-hash ${cfg.genesisBlockHash}"} \
+ ${optionalString (cfg.genesisBlockFile != null) " --genesis-block ${cfg.genesisBlockFile}"}
+ '';
+ };
+ };
+ };
+}
diff --git a/nixos/modules/services/networking/kippo.nix b/nixos/modules/services/networking/kippo.nix
index 40c38254a57c..bdea6a1d1caa 100644
--- a/nixos/modules/services/networking/kippo.nix
+++ b/nixos/modules/services/networking/kippo.nix
@@ -11,7 +11,7 @@ with lib;
let
cfg = config.services.kippo;
in
-rec {
+{
options = {
services.kippo = {
enable = mkOption {
@@ -26,22 +26,22 @@ rec {
};
hostname = mkOption {
default = "nas3";
- type = types.string;
+ type = types.str;
description = ''Hostname for kippo to present to SSH login'';
};
varPath = mkOption {
default = "/var/lib/kippo";
- type = types.string;
+ type = types.path;
description = ''Path of read/write files needed for operation and configuration.'';
};
logPath = mkOption {
default = "/var/log/kippo";
- type = types.string;
+ type = types.path;
description = ''Path of log files needed for operation and configuration.'';
};
pidPath = mkOption {
default = "/run/kippo";
- type = types.string;
+ type = types.path;
description = ''Path of pid files needed for operation.'';
};
extraConfig = mkOption {
@@ -109,8 +109,8 @@ rec {
serviceConfig.ExecStart = "${pkgs.kippo.twisted}/bin/twistd -y ${pkgs.kippo}/src/kippo.tac --syslog --rundir=${cfg.varPath}/ --pidfile=${cfg.pidPath}/kippo.pid --prefix=kippo -n";
serviceConfig.PermissionsStartOnly = true;
- serviceConfig.User = "kippo";
- serviceConfig.Group = "kippo";
+ serviceConfig.User = "kippo";
+ serviceConfig.Group = "kippo";
};
};
}
diff --git a/nixos/modules/services/networking/logmein-hamachi.nix b/nixos/modules/services/networking/logmein-hamachi.nix
index 406626a8a343..11cbdda2f845 100644
--- a/nixos/modules/services/networking/logmein-hamachi.nix
+++ b/nixos/modules/services/networking/logmein-hamachi.nix
@@ -35,7 +35,7 @@ in
description = "LogMeIn Hamachi Daemon";
wantedBy = [ "multi-user.target" ];
- after = [ "network.target" "local-fs.target" ];
+ after = [ "network.target" ];
serviceConfig = {
Type = "forking";
diff --git a/nixos/modules/services/networking/minidlna.nix b/nixos/modules/services/networking/minidlna.nix
index ed0c1044a570..3ddea3c9757b 100644
--- a/nixos/modules/services/networking/minidlna.nix
+++ b/nixos/modules/services/networking/minidlna.nix
@@ -36,6 +36,37 @@ in
'';
};
+ services.minidlna.friendlyName = mkOption {
+ type = types.str;
+ default = "${config.networking.hostName} MiniDLNA";
+ defaultText = "$HOSTNAME MiniDLNA";
+ example = "rpi3";
+ description =
+ ''
+ Name that the DLNA server presents to clients.
+ '';
+ };
+
+ services.minidlna.rootContainer = mkOption {
+ type = types.str;
+ default = ".";
+ example = "B";
+ description =
+ ''
+ Use a different container as the root of the directory tree presented
+ to clients. The possible values are:
+ - "." - standard container
+ - "B" - "Browse Directory"
+ - "M" - "Music"
+ - "P" - "Pictures"
+ - "V" - "Video"
+ - Or, you can specify the ObjectID of your desired root container
+ (eg. 1$F for Music/Playlists)
+ If you specify "B" and the client device is audio-only then
+ "Music/Folders" will be used as root.
+ '';
+ };
+
services.minidlna.loglevel = mkOption {
type = types.str;
default = "warn";
@@ -66,7 +97,37 @@ in
services.minidlna.config = mkOption {
type = types.lines;
- description = "The contents of MiniDLNA's configuration file.";
+ description =
+ ''
+ The contents of MiniDLNA's configuration file.
+ When the service is activated, a basic template is generated
+ from the current options opened here.
+ '';
+ };
+
+ services.minidlna.extraConfig = mkOption {
+ type = types.lines;
+ default = "";
+ example = ''
+ # Not exhaustive example
+ # Support for streaming .jpg and .mp3 files to a TiVo supporting HMO.
+ enable_tivo=no
+ # SSDP notify interval, in seconds.
+ notify_interval=10
+ # maximum number of simultaneous connections
+ # note: many clients open several simultaneous connections while
+ # streaming
+ max_connections=50
+ # set this to yes to allow symlinks that point outside user-defined
+ # media_dirs.
+ wide_links=yes
+ '';
+ description =
+ ''
+ Extra minidlna options not yet opened for configuration here
+ (strict_dlna, model_number, model_name, etc...). This is appended
+ to the current service already provided.
+ '';
};
};
@@ -75,13 +136,15 @@ in
services.minidlna.config =
''
port=${toString port}
- friendly_name=${config.networking.hostName} MiniDLNA
+ friendly_name=${cfg.friendlyName}
db_dir=/var/cache/minidlna
log_level=${cfg.loglevel}
inotify=yes
+ root_container=${cfg.rootContainer}
${concatMapStrings (dir: ''
media_dir=${dir}
'') cfg.mediaDirs}
+ ${cfg.extraConfig}
'';
users.users.minidlna = {
@@ -96,7 +159,7 @@ in
{ description = "MiniDLNA Server";
wantedBy = [ "multi-user.target" ];
- after = [ "network.target" "local-fs.target" ];
+ after = [ "network.target" ];
serviceConfig =
{ User = "minidlna";
diff --git a/nixos/modules/services/networking/morty.nix b/nixos/modules/services/networking/morty.nix
index cc81e27e9399..1b3084fe9abb 100644
--- a/nixos/modules/services/networking/morty.nix
+++ b/nixos/modules/services/networking/morty.nix
@@ -27,7 +27,7 @@ in
};
key = mkOption {
- type = types.string;
+ type = types.str;
default = "";
description = "HMAC url validation key (hexadecimal encoded).
Leave blank to disable. Without validation key, anyone can
@@ -56,7 +56,7 @@ in
};
listenAddress = mkOption {
- type = types.string;
+ type = types.str;
default = "127.0.0.1";
description = "The address on which the service listens";
defaultText = "127.0.0.1 (localhost)";
diff --git a/nixos/modules/services/networking/mosquitto.nix b/nixos/modules/services/networking/mosquitto.nix
index 1d49c137723c..d2feb93e2b72 100644
--- a/nixos/modules/services/networking/mosquitto.nix
+++ b/nixos/modules/services/networking/mosquitto.nix
@@ -49,7 +49,7 @@ in
host = mkOption {
default = "127.0.0.1";
example = "0.0.0.0";
- type = types.string;
+ type = types.str;
description = ''
Host to listen on without SSL.
'';
@@ -88,7 +88,7 @@ in
host = mkOption {
default = "0.0.0.0";
example = "localhost";
- type = types.string;
+ type = types.str;
description = ''
Host to listen on with SSL.
'';
@@ -135,7 +135,7 @@ in
};
acl = mkOption {
- type = types.listOf types.string;
+ type = types.listOf types.str;
example = [ "topic read A/B" "topic A/#" ];
description = ''
Control client access to topics on the broker.
diff --git a/nixos/modules/services/networking/mtprotoproxy.nix b/nixos/modules/services/networking/mtprotoproxy.nix
index 24bf33815da8..d896f227b82c 100644
--- a/nixos/modules/services/networking/mtprotoproxy.nix
+++ b/nixos/modules/services/networking/mtprotoproxy.nix
@@ -50,8 +50,8 @@ in
users = mkOption {
type = types.attrsOf types.str;
example = {
- "tg" = "00000000000000000000000000000000";
- "tg2" = "0123456789abcdef0123456789abcdef";
+ tg = "00000000000000000000000000000000";
+ tg2 = "0123456789abcdef0123456789abcdef";
};
description = ''
Allowed users and their secrets. A secret is a 32 characters long hex string.
@@ -80,7 +80,7 @@ in
type = types.attrs;
default = {};
example = {
- "STATS_PRINT_PERIOD" = 600;
+ STATS_PRINT_PERIOD = 600;
};
description = ''
Extra configuration options for mtprotoproxy.
diff --git a/nixos/modules/services/networking/murmur.nix b/nixos/modules/services/networking/murmur.nix
index 7ac4d0c6419d..082953d2f6ab 100644
--- a/nixos/modules/services/networking/murmur.nix
+++ b/nixos/modules/services/networking/murmur.nix
@@ -234,7 +234,7 @@ in
extraConfig = mkOption {
type = types.lines;
default = "";
- description = "Extra configuration to put into mumur.ini.";
+ description = "Extra configuration to put into murmur.ini.";
};
};
};
diff --git a/nixos/modules/services/networking/mxisd.nix b/nixos/modules/services/networking/mxisd.nix
index 02e89f441b34..a3d61922e578 100644
--- a/nixos/modules/services/networking/mxisd.nix
+++ b/nixos/modules/services/networking/mxisd.nix
@@ -3,6 +3,15 @@
with lib;
let
+
+ isMa1sd =
+ package:
+ lib.hasPrefix "ma1sd" package.name;
+
+ isMxisd =
+ package:
+ lib.hasPrefix "mxisd" package.name;
+
cfg = config.services.mxisd;
server = optionalAttrs (cfg.server.name != null) { inherit (cfg.server) name; }
@@ -12,37 +21,41 @@ let
matrix.domain = cfg.matrix.domain;
key.path = "${cfg.dataDir}/signing.key";
storage = {
- provider.sqlite.database = "${cfg.dataDir}/mxisd.db";
+ provider.sqlite.database = if isMa1sd cfg.package
+ then "${cfg.dataDir}/ma1sd.db"
+ else "${cfg.dataDir}/mxisd.db";
};
} // optionalAttrs (server != {}) { inherit server; };
# merges baseConfig and extraConfig into a single file
fullConfig = recursiveUpdate baseConfig cfg.extraConfig;
- configFile = pkgs.writeText "mxisd-config.yaml" (builtins.toJSON fullConfig);
+ configFile = if isMa1sd cfg.package
+ then pkgs.writeText "ma1sd-config.yaml" (builtins.toJSON fullConfig)
+ else pkgs.writeText "mxisd-config.yaml" (builtins.toJSON fullConfig);
in {
options = {
services.mxisd = {
- enable = mkEnableOption "mxisd matrix federated identity server";
+ enable = mkEnableOption "matrix federated identity server";
package = mkOption {
type = types.package;
default = pkgs.mxisd;
defaultText = "pkgs.mxisd";
- description = "The mxisd package to use";
+ description = "The mxisd/ma1sd package to use";
};
dataDir = mkOption {
type = types.str;
default = "/var/lib/mxisd";
- description = "Where data mxisd uses resides";
+ description = "Where data mxisd/ma1sd uses resides";
};
extraConfig = mkOption {
type = types.attrs;
default = {};
- description = "Extra options merged into the mxisd configuration";
+ description = "Extra options merged into the mxisd/ma1sd configuration";
};
matrix = {
@@ -62,7 +75,7 @@ in {
type = types.nullOr types.str;
default = null;
description = ''
- Public hostname of mxisd, if different from the Matrix domain.
+ Public hostname of mxisd/ma1sd, if different from the Matrix domain.
'';
};
@@ -103,11 +116,13 @@ in {
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
- serviceConfig = {
+ serviceConfig = let
+ executable = if isMa1sd cfg.package then "ma1sd" else "mxisd";
+ in {
Type = "simple";
User = "mxisd";
Group = "mxisd";
- ExecStart = "${cfg.package}/bin/mxisd -c ${configFile}";
+ ExecStart = "${cfg.package}/bin/${executable} -c ${configFile}";
WorkingDirectory = cfg.dataDir;
Restart = "on-failure";
};
diff --git a/nixos/modules/services/networking/namecoind.nix b/nixos/modules/services/networking/namecoind.nix
index a569ca87e262..c8ee0a2f5647 100644
--- a/nixos/modules/services/networking/namecoind.nix
+++ b/nixos/modules/services/networking/namecoind.nix
@@ -175,7 +175,7 @@ in
serviceConfig = {
User = "namecoin";
Group = "namecoin";
- ExecStart = "${pkgs.altcoins.namecoind}/bin/namecoind -conf=${configFile} -datadir=${dataDir} -printtoconsole";
+ ExecStart = "${pkgs.namecoind}/bin/namecoind -conf=${configFile} -datadir=${dataDir} -printtoconsole";
ExecStop = "${pkgs.coreutils}/bin/kill -KILL $MAINPID";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
Nice = "10";
diff --git a/nixos/modules/services/networking/ndppd.nix b/nixos/modules/services/networking/ndppd.nix
index ba17f1ba825a..92088623517f 100644
--- a/nixos/modules/services/networking/ndppd.nix
+++ b/nixos/modules/services/networking/ndppd.nix
@@ -142,7 +142,7 @@ in {
messages, and respond to them according to a set of rules.
'';
default = {};
- example = { "eth0".rules."1111::/64" = {}; };
+ example = { eth0.rules."1111::/64" = {}; };
};
};
@@ -153,7 +153,7 @@ in {
'' ];
services.ndppd.proxies = mkIf (cfg.interface != null && cfg.network != null) {
- "${cfg.interface}".rules."${cfg.network}" = {};
+ ${cfg.interface}.rules.${cfg.network} = {};
};
systemd.services.ndppd = {
diff --git a/nixos/modules/services/networking/networkmanager.nix b/nixos/modules/services/networking/networkmanager.nix
index 551636a33d25..918bf891b103 100644
--- a/nixos/modules/services/networking/networkmanager.nix
+++ b/nixos/modules/services/networking/networkmanager.nix
@@ -5,11 +5,21 @@ with lib;
let
cfg = config.networking.networkmanager;
- dynamicHostsEnabled =
- cfg.dynamicHosts.enable && cfg.dynamicHosts.hostsDirs != {};
+ basePackages = with pkgs; [
+ crda
+ modemmanager
+ networkmanager
+ networkmanager-fortisslvpn
+ networkmanager-iodine
+ networkmanager-l2tp
+ networkmanager-openconnect
+ networkmanager-openvpn
+ networkmanager-vpnc
+ ] ++ optional (!delegateWireless && !enableIwd) wpa_supplicant;
- # /var/lib/misc is for dnsmasq.leases.
- stateDirs = "/var/lib/NetworkManager /var/lib/dhclient /var/lib/misc";
+ delegateWireless = config.networking.wireless.enable == true && cfg.unmanaged != [];
+
+ enableIwd = cfg.wifi.backend == "iwd";
configFile = pkgs.writeText "NetworkManager.conf" ''
[main]
@@ -25,6 +35,7 @@ let
[logging]
level=${cfg.logLevel}
+ audit=${lib.boolToString config.security.audit.enable}
[connection]
ipv6.ip6-privacy=2
@@ -35,6 +46,7 @@ let
[device]
wifi.scan-rand-mac-address=${if cfg.wifi.scanRandMacAddress then "yes" else "no"}
+ wifi.backend=${cfg.wifi.backend}
${cfg.extraConfig}
'';
@@ -81,9 +93,9 @@ let
'';
dispatcherTypesSubdirMap = {
- "basic" = "";
- "pre-up" = "pre-up.d/";
- "pre-down" = "pre-down.d/";
+ basic = "";
+ pre-up = "pre-up.d/";
+ pre-down = "pre-down.d/";
};
macAddressOpt = mkOption {
@@ -156,7 +168,7 @@ in {
};
unmanaged = mkOption {
- type = types.listOf types.string;
+ type = types.listOf types.str;
default = [];
description = ''
List of interfaces that will not be managed by NetworkManager.
@@ -173,29 +185,18 @@ in {
'';
};
- # Ugly hack for using the correct gnome3 packageSet
- basePackages = mkOption {
- type = types.attrsOf types.package;
- default = { inherit (pkgs)
- networkmanager modemmanager wpa_supplicant crda
- networkmanager-openvpn networkmanager-vpnc
- networkmanager-openconnect networkmanager-fortisslvpn
- networkmanager-l2tp networkmanager-iodine; };
- internal = true;
- };
-
packages = mkOption {
- type = types.listOf types.path;
+ type = types.listOf types.package;
default = [ ];
description = ''
Extra packages that provide NetworkManager plugins.
'';
- apply = list: (attrValues cfg.basePackages) ++ list;
+ apply = list: basePackages ++ list;
};
dhcp = mkOption {
type = types.enum [ "dhclient" "dhcpcd" "internal" ];
- default = "dhclient";
+ default = "internal";
description = ''
Which program (or internal library) should be used for DHCP.
'';
@@ -232,6 +233,15 @@ in {
wifi = {
macAddress = macAddressOpt;
+ backend = mkOption {
+ type = types.enum [ "wpa_supplicant" "iwd" ];
+ default = "wpa_supplicant";
+ description = ''
+ Specify the Wi-Fi backend used for the device.
+ Currently supported are or (experimental).
+ '';
+ };
+
powersave = mkOption {
type = types.nullOr types.bool;
default = null;
@@ -322,73 +332,35 @@ in {
so you don't need to to that yourself.
'';
};
-
- dynamicHosts = {
- enable = mkOption {
- type = types.bool;
- default = false;
- description = ''
- Enabling this option requires the
- option to be
- set to dnsmasq. If enabled, the directories
- defined by the
-
- option will be set up when the service starts. The dnsmasq instance
- managed by NetworkManager will then watch those directories for
- hosts files (see the --hostsdir option of
- dnsmasq). This way a non-privileged user can add or override DNS
- entries on the local system (depending on what hosts directories
- that are configured)..
- '';
- };
- hostsDirs = mkOption {
- type = with types; attrsOf (submodule {
- options = {
- user = mkOption {
- type = types.str;
- default = "root";
- description = ''
- The user that will own the hosts directory.
- '';
- };
- group = mkOption {
- type = types.str;
- default = "root";
- description = ''
- The group that will own the hosts directory.
- '';
- };
- };
- });
- default = {};
- description = ''
- Defines a set of directories (relative to
- /run/NetworkManager/hostdirs) that dnsmasq will
- watch for hosts files.
- '';
- };
- };
};
};
+ imports = [
+ (mkRemovedOptionModule ["networking" "networkmanager" "dynamicHosts"] ''
+ This option was removed because allowing (multiple) regular users to
+ override host entries affecting the whole system opens up a huge attack
+ vector. There seem to be very rare cases where this might be useful.
+ Consider setting system-wide host entries using networking.hosts, provide
+ them via the DNS server in your network, or use environment.etc
+ to add a file into /etc/NetworkManager/dnsmasq.d reconfiguring hostsdir.
+ '')
+ ];
+
###### implementation
config = mkIf cfg.enable {
assertions = [
- { assertion = config.networking.wireless.enable == false;
- message = "You can not use networking.networkmanager with networking.wireless";
- }
- { assertion = !dynamicHostsEnabled || (dynamicHostsEnabled && cfg.dns == "dnsmasq");
+ { assertion = config.networking.wireless.enable == true -> cfg.unmanaged != [];
message = ''
- To use networking.networkmanager.dynamicHosts you also need to set
- networking.networkmanager.dns = "dnsmasq"
+ You can not use networking.networkmanager with networking.wireless.
+ Except if you mark some interfaces as unmanaged by NetworkManager.
'';
}
];
- environment.etc = with cfg.basePackages; [
+ environment.etc = with pkgs; [
{ source = configFile;
target = "NetworkManager/NetworkManager.conf";
}
@@ -419,12 +391,6 @@ in {
target = "NetworkManager/dispatcher.d/${dispatcherTypesSubdirMap.${s.type}}03userscript${lib.fixedWidthNumber 4 i}";
mode = "0544";
}) cfg.dispatcherScripts
- ++ optional dynamicHostsEnabled
- { target = "NetworkManager/dnsmasq.d/dyndns.conf";
- text = concatMapStrings (n: ''
- hostsdir=/run/NetworkManager/hostsdirs/${n}
- '') (attrNames cfg.dynamicHosts.hostsDirs);
- }
++ optional cfg.enableStrongSwan
{ source = "${pkgs.networkmanager_strongswan}/lib/NetworkManager/VPN/nm-strongswan-service.name";
target = "NetworkManager/VPN/nm-strongswan-service.name";
@@ -453,58 +419,58 @@ in {
systemd.packages = cfg.packages;
- systemd.services."NetworkManager" = {
+ systemd.tmpfiles.rules = [
+ "d /etc/NetworkManager/system-connections 0700 root root -"
+ "d /etc/ipsec.d 0700 root root -"
+ "d /var/lib/NetworkManager-fortisslvpn 0700 root root -"
+
+ "d /var/lib/dhclient 0755 root root -"
+ "d /var/lib/misc 0755 root root -" # for dnsmasq.leases
+ ];
+
+ systemd.services.NetworkManager = {
wantedBy = [ "network.target" ];
restartTriggers = [ configFile ];
- preStart = ''
- mkdir -m 700 -p /etc/NetworkManager/system-connections
- mkdir -m 700 -p /etc/ipsec.d
- mkdir -m 755 -p ${stateDirs}
- '';
+ aliases = [ "dbus-org.freedesktop.NetworkManager.service" ];
+
+ serviceConfig = {
+ StateDirectory = "NetworkManager";
+ StateDirectoryMode = 755; # not sure if this really needs to be 755
+ };
};
systemd.services.NetworkManager-wait-online = {
wantedBy = [ "network-online.target" ];
};
- systemd.services.nm-setup-hostsdirs = mkIf dynamicHostsEnabled {
- wantedBy = [ "NetworkManager.service" ];
- before = [ "NetworkManager.service" ];
- partOf = [ "NetworkManager.service" ];
- script = concatStrings (mapAttrsToList (n: d: ''
- mkdir -p "/run/NetworkManager/hostsdirs/${n}"
- chown "${d.user}:${d.group}" "/run/NetworkManager/hostsdirs/${n}"
- chmod 0775 "/run/NetworkManager/hostsdirs/${n}"
- '') cfg.dynamicHosts.hostsDirs);
- serviceConfig = {
- Type = "oneshot";
- RemainAfterExit = true;
- };
- };
+ systemd.services.ModemManager.aliases = [ "dbus-org.freedesktop.ModemManager1.service" ];
- systemd.services."NetworkManager-dispatcher" = {
+ systemd.services.NetworkManager-dispatcher = {
wantedBy = [ "network.target" ];
restartTriggers = [ configFile ];
# useful binaries for user-specified hooks
path = [ pkgs.iproute pkgs.utillinux pkgs.coreutils ];
+ aliases = [ "dbus-org.freedesktop.nm-dispatcher.service" ];
};
- # Turn off NixOS' network management
- networking = {
+ # Turn off NixOS' network management when networking is managed entirely by NetworkManager
+ networking = (mkIf (!delegateWireless) {
useDHCP = false;
- # use mkDefault to trigger the assertion about the conflict above
+ # Use mkDefault to trigger the assertion about the conflict above
wireless.enable = mkDefault false;
- };
+ }) // (mkIf cfg.enableStrongSwan {
+ networkmanager.packages = [ pkgs.networkmanager_strongswan ];
+ }) // (mkIf enableIwd {
+ wireless.iwd.enable = true;
+ });
security.polkit.extraConfig = polkitConf;
- networking.networkmanager.packages =
- mkIf cfg.enableStrongSwan [ pkgs.networkmanager_strongswan ];
-
- services.dbus.packages =
- optional cfg.enableStrongSwan pkgs.strongswanNM ++ cfg.packages;
+ services.dbus.packages = cfg.packages
+ ++ optional cfg.enableStrongSwan pkgs.strongswanNM
+ ++ optional (cfg.dns == "dnsmasq") pkgs.dnsmasq;
services.udev.packages = cfg.packages;
};
diff --git a/nixos/modules/services/networking/nix-serve.nix b/nixos/modules/services/networking/nix-serve.nix
index ca458d089dcc..347d87b3f385 100644
--- a/nixos/modules/services/networking/nix-serve.nix
+++ b/nixos/modules/services/networking/nix-serve.nix
@@ -19,7 +19,7 @@ in
};
bindAddress = mkOption {
- type = types.string;
+ type = types.str;
default = "0.0.0.0";
description = ''
IP address where nix-serve will bind its listening socket.
@@ -44,7 +44,7 @@ in
};
extraParams = mkOption {
- type = types.string;
+ type = types.separatedString " ";
default = "";
description = ''
Extra command line parameters for nix-serve.
diff --git a/nixos/modules/services/networking/nsd.nix b/nixos/modules/services/networking/nsd.nix
index 8b918dab86dd..bc0966e6b8e6 100644
--- a/nixos/modules/services/networking/nsd.nix
+++ b/nixos/modules/services/networking/nsd.nix
@@ -916,9 +916,8 @@ in
systemd.services.nsd = {
description = "NSD authoritative only domain name service";
- after = [ "keys.target" "network.target" ];
+ after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
- wants = [ "keys.target" ];
serviceConfig = {
ExecStart = "${nsdPkg}/sbin/nsd -d -c ${nsdEnv}/nsd.conf";
@@ -955,7 +954,7 @@ in
'';
};
- systemd.timers."nsd-dnssec" = mkIf dnssec {
+ systemd.timers.nsd-dnssec = mkIf dnssec {
description = "Automatic DNSSEC key rollover";
wantedBy = [ "nsd.service" ];
@@ -966,7 +965,7 @@ in
};
};
- systemd.services."nsd-dnssec" = mkIf dnssec {
+ systemd.services.nsd-dnssec = mkIf dnssec {
description = "DNSSEC key rollover";
wantedBy = [ "nsd.service" ];
diff --git a/nixos/modules/services/networking/chrony.nix b/nixos/modules/services/networking/ntp/chrony.nix
similarity index 91%
rename from nixos/modules/services/networking/chrony.nix
rename to nixos/modules/services/networking/ntp/chrony.nix
index 77f702577000..c74476c7a155 100644
--- a/nixos/modules/services/networking/chrony.nix
+++ b/nixos/modules/services/networking/ntp/chrony.nix
@@ -9,11 +9,11 @@ let
keyFile = "${stateDir}/chrony.keys";
configFile = pkgs.writeText "chrony.conf" ''
- ${concatMapStringsSep "\n" (server: "server " + server) cfg.servers}
+ ${concatMapStringsSep "\n" (server: "server " + server + " iburst") cfg.servers}
${optionalString
(cfg.initstepslew.enabled && (cfg.servers != []))
- "initstepslew ${toString cfg.initstepslew.threshold} ${concatStringsSep " " cfg.initstepslew.servers}"
+ "initstepslew ${toString cfg.initstepslew.threshold} ${concatStringsSep " " cfg.servers}"
}
driftfile ${stateDir}/chrony.drift
@@ -24,7 +24,7 @@ let
${cfg.extraConfig}
'';
- chronyFlags = "-m -u chrony -f ${configFile} ${toString cfg.extraFlags}";
+ chronyFlags = "-n -m -u chrony -f ${configFile} ${toString cfg.extraFlags}";
in
{
options = {
@@ -48,7 +48,6 @@ in
default = {
enabled = true;
threshold = 1000; # by default, same threshold as 'ntpd -g' (1000s)
- servers = cfg.servers;
};
description = ''
Allow chronyd to make a rapid measurement of the system clock error at
@@ -76,6 +75,8 @@ in
};
config = mkIf cfg.enable {
+ meta.maintainers = with lib.maintainers; [ thoughtpolice ];
+
environment.systemPackages = [ pkgs.chrony ];
users.groups = singleton
@@ -115,7 +116,7 @@ in
unitConfig.ConditionCapability = "CAP_SYS_TIME";
serviceConfig =
- { Type = "forking";
+ { Type = "simple";
ExecStart = "${pkgs.chrony}/bin/chronyd ${chronyFlags}";
ProtectHome = "yes";
diff --git a/nixos/modules/services/networking/ntpd.nix b/nixos/modules/services/networking/ntp/ntpd.nix
similarity index 98%
rename from nixos/modules/services/networking/ntpd.nix
rename to nixos/modules/services/networking/ntp/ntpd.nix
index 588d1c6edb07..1197c84f0459 100644
--- a/nixos/modules/services/networking/ntpd.nix
+++ b/nixos/modules/services/networking/ntp/ntpd.nix
@@ -96,6 +96,7 @@ in
###### implementation
config = mkIf config.services.ntp.enable {
+ meta.maintainers = with lib.maintainers; [ thoughtpolice ];
# Make tools such as ntpq available in the system path.
environment.systemPackages = [ pkgs.ntp ];
diff --git a/nixos/modules/services/networking/openntpd.nix b/nixos/modules/services/networking/ntp/openntpd.nix
similarity index 94%
rename from nixos/modules/services/networking/openntpd.nix
rename to nixos/modules/services/networking/ntp/openntpd.nix
index 57638ebc9c01..471d15b1687b 100644
--- a/nixos/modules/services/networking/openntpd.nix
+++ b/nixos/modules/services/networking/ntp/openntpd.nix
@@ -40,7 +40,7 @@ in
};
extraOptions = mkOption {
- type = with types; string;
+ type = with types; separatedString " ";
default = "";
example = "-s";
description = ''
@@ -52,6 +52,7 @@ in
###### implementation
config = mkIf cfg.enable {
+ meta.maintainers = with lib.maintainers; [ thoughtpolice ];
services.timesyncd.enable = mkForce false;
# Add ntpctl to the environment for status checking
diff --git a/nixos/modules/services/networking/nylon.nix b/nixos/modules/services/networking/nylon.nix
index b061ce34ed2c..7c171281a926 100644
--- a/nixos/modules/services/networking/nylon.nix
+++ b/nixos/modules/services/networking/nylon.nix
@@ -65,7 +65,7 @@ let
};
acceptInterface = mkOption {
- type = types.string;
+ type = types.str;
default = "lo";
description = ''
Tell nylon which interface to listen for client requests on, default is "lo".
@@ -73,7 +73,7 @@ let
};
bindInterface = mkOption {
- type = types.string;
+ type = types.str;
default = "enp3s0f0";
description = ''
Tell nylon which interface to use as an uplink, default is "enp3s0f0".
@@ -89,7 +89,7 @@ let
};
allowedIPRanges = mkOption {
- type = with types; listOf string;
+ type = with types; listOf str;
default = [ "192.168.0.0/16" "127.0.0.1/8" "172.16.0.1/12" "10.0.0.0/8" ];
description = ''
Allowed client IP ranges are evaluated first, defaults to ARIN IPv4 private ranges:
@@ -98,7 +98,7 @@ let
};
deniedIPRanges = mkOption {
- type = with types; listOf string;
+ type = with types; listOf str;
default = [ "0.0.0.0/0" ];
description = ''
Denied client IP ranges, these gets evaluated after the allowed IP ranges, defaults to all IPv4 addresses:
diff --git a/nixos/modules/services/networking/ofono.nix b/nixos/modules/services/networking/ofono.nix
new file mode 100644
index 000000000000..40ef9433de0f
--- /dev/null
+++ b/nixos/modules/services/networking/ofono.nix
@@ -0,0 +1,44 @@
+# Ofono daemon.
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+
+ cfg = config.services.ofono;
+
+ plugin_path =
+ lib.concatMapStringsSep ":"
+ (plugin: "${plugin}/lib/ofono/plugins")
+ cfg.plugins
+ ;
+
+in
+
+{
+ ###### interface
+ options = {
+ services.ofono = {
+ enable = mkEnableOption "Ofono";
+
+ plugins = mkOption {
+ type = types.listOf types.package;
+ default = [];
+ example = literalExample "[ pkgs.modem-manager-gui ]";
+ description = ''
+ The list of plugins to install.
+ '';
+ };
+ };
+ };
+
+ ###### implementation
+ config = mkIf cfg.enable {
+ services.dbus.packages = [ pkgs.ofono ];
+
+ systemd.packages = [ pkgs.ofono ];
+
+ systemd.services.ofono.environment.OFONO_PLUGIN_PATH = mkIf (cfg.plugins != []) plugin_path;
+
+ };
+}
diff --git a/nixos/modules/services/networking/openvpn.nix b/nixos/modules/services/networking/openvpn.nix
index f47122ee70bf..05be97e66a3d 100644
--- a/nixos/modules/services/networking/openvpn.nix
+++ b/nixos/modules/services/networking/openvpn.nix
@@ -182,12 +182,12 @@ in
options = {
username = mkOption {
description = "The username to store inside the credentials file.";
- type = types.string;
+ type = types.str;
};
password = mkOption {
description = "The password to store inside the credentials file.";
- type = types.string;
+ type = types.str;
};
};
});
diff --git a/nixos/modules/services/networking/ostinato.nix b/nixos/modules/services/networking/ostinato.nix
index 13f784dc53c1..5e8cce5b89aa 100644
--- a/nixos/modules/services/networking/ostinato.nix
+++ b/nixos/modules/services/networking/ostinato.nix
@@ -50,7 +50,7 @@ in
rpcServer = {
address = mkOption {
- type = types.string;
+ type = types.str;
default = "0.0.0.0";
description = ''
By default, the Drone RPC server will listen on all interfaces and
@@ -63,7 +63,7 @@ in
portList = {
include = mkOption {
- type = types.listOf types.string;
+ type = types.listOf types.str;
default = [];
example = ''[ "eth*" "lo*" ]'';
description = ''
diff --git a/nixos/modules/services/networking/pdns-recursor.nix b/nixos/modules/services/networking/pdns-recursor.nix
index d07deb9dcc67..ebfdd9f35b72 100644
--- a/nixos/modules/services/networking/pdns-recursor.nix
+++ b/nixos/modules/services/networking/pdns-recursor.nix
@@ -6,25 +6,27 @@ let
dataDir = "/var/lib/pdns-recursor";
username = "pdns-recursor";
- cfg = config.services.pdns-recursor;
- zones = mapAttrsToList (zone: uri: "${zone}.=${uri}") cfg.forwardZones;
+ cfg = config.services.pdns-recursor;
- configFile = pkgs.writeText "recursor.conf" ''
- local-address=${cfg.dns.address}
- local-port=${toString cfg.dns.port}
- allow-from=${concatStringsSep "," cfg.dns.allowFrom}
+ oneOrMore = type: with types; either type (listOf type);
+ valueType = with types; oneOf [ int str bool path ];
+ configType = with types; attrsOf (nullOr (oneOrMore valueType));
- webserver-address=${cfg.api.address}
- webserver-port=${toString cfg.api.port}
- webserver-allow-from=${concatStringsSep "," cfg.api.allowFrom}
+ toBool = val: if val then "yes" else "no";
+ serialize = val: with types;
+ if str.check val then val
+ else if int.check val then toString val
+ else if path.check val then toString val
+ else if bool.check val then toBool val
+ else if builtins.isList val then (concatMapStringsSep "," serialize val)
+ else "";
- forward-zones=${concatStringsSep "," zones}
- export-etc-hosts=${if cfg.exportHosts then "yes" else "no"}
- dnssec=${cfg.dnssecValidation}
- serve-rfc1918=${if cfg.serveRFC1918 then "yes" else "no"}
+ configFile = pkgs.writeText "recursor.conf"
+ (concatStringsSep "\n"
+ (flip mapAttrsToList cfg.settings
+ (name: val: "${name}=${serialize val}")));
- ${cfg.extraConfig}
- '';
+ mkDefaultAttrs = mapAttrs (n: v: mkDefault v);
in {
options.services.pdns-recursor = {
@@ -117,18 +119,56 @@ in {
'';
};
- extraConfig = mkOption {
+ settings = mkOption {
+ type = configType;
+ default = { };
+ example = literalExample ''
+ {
+ loglevel = 8;
+ log-common-errors = true;
+ }
+ '';
+ description = ''
+ PowerDNS Recursor settings. Use this option to configure Recursor
+ settings not exposed in a NixOS option or to bypass one.
+ See the full documentation at
+
+ for the available options.
+ '';
+ };
+
+ luaConfig = mkOption {
type = types.lines;
default = "";
description = ''
- Extra options to be appended to the configuration file.
+ The content Lua configuration file for PowerDNS Recursor. See
+ .
'';
};
};
config = mkIf cfg.enable {
- users.users."${username}" = {
+ services.pdns-recursor.settings = mkDefaultAttrs {
+ local-address = cfg.dns.address;
+ local-port = cfg.dns.port;
+ allow-from = cfg.dns.allowFrom;
+
+ webserver-address = cfg.api.address;
+ webserver-port = cfg.api.port;
+ webserver-allow-from = cfg.api.allowFrom;
+
+ forward-zones = mapAttrsToList (zone: uri: "${zone}.=${uri}") cfg.forwardZones;
+ export-etc-hosts = cfg.exportHosts;
+ dnssec = cfg.dnssecValidation;
+ serve-rfc1918 = cfg.serveRFC1918;
+ lua-config-file = pkgs.writeText "recursor.lua" cfg.luaConfig;
+
+ log-timestamp = false;
+ disable-syslog = true;
+ };
+
+ users.users.${username} = {
home = dataDir;
createHome = true;
uid = config.ids.uids.pdns-recursor;
@@ -150,8 +190,7 @@ in {
AmbientCapabilities = "cap_net_bind_service";
ExecStart = ''${pkgs.pdns-recursor}/bin/pdns_recursor \
--config-dir=${dataDir} \
- --socket-dir=${dataDir} \
- --disable-syslog
+ --socket-dir=${dataDir}
'';
};
@@ -165,4 +204,10 @@ in {
'';
};
};
+
+ imports = [
+ (mkRemovedOptionModule [ "services" "pdns-recursor" "extraConfig" ]
+ "To change extra Recursor settings use services.pdns-recursor.settings instead.")
+ ];
+
}
diff --git a/nixos/modules/services/networking/polipo.nix b/nixos/modules/services/networking/polipo.nix
index 529115a1c6e1..dbe3b7380970 100644
--- a/nixos/modules/services/networking/polipo.nix
+++ b/nixos/modules/services/networking/polipo.nix
@@ -30,7 +30,7 @@ in
};
proxyAddress = mkOption {
- type = types.string;
+ type = types.str;
default = "127.0.0.1";
description = "IP address on which Polipo will listen.";
};
@@ -51,7 +51,7 @@ in
};
parentProxy = mkOption {
- type = types.string;
+ type = types.str;
default = "";
example = "localhost:8124";
description = ''
@@ -61,7 +61,7 @@ in
};
socksParentProxy = mkOption {
- type = types.string;
+ type = types.str;
default = "";
example = "localhost:9050";
description = ''
@@ -74,7 +74,7 @@ in
type = types.lines;
default = "";
description = ''
- Polio configuration. Contents will be added
+ Polio configuration. Contents will be added
verbatim to the configuration file.
'';
};
@@ -111,4 +111,4 @@ in
};
-}
\ No newline at end of file
+}
diff --git a/nixos/modules/services/networking/pppd.nix b/nixos/modules/services/networking/pppd.nix
new file mode 100644
index 000000000000..e96c27bd84b4
--- /dev/null
+++ b/nixos/modules/services/networking/pppd.nix
@@ -0,0 +1,134 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+ cfg = config.services.pppd;
+in
+{
+ meta = {
+ maintainers = with maintainers; [ danderson ];
+ };
+
+ options = {
+ services.pppd = {
+ enable = mkEnableOption "pppd";
+
+ package = mkOption {
+ default = pkgs.ppp;
+ defaultText = "pkgs.ppp";
+ type = types.package;
+ description = "pppd package to use.";
+ };
+
+ peers = mkOption {
+ default = {};
+ description = "pppd peers.";
+ type = types.attrsOf (types.submodule (
+ { name, ... }:
+ {
+ options = {
+ name = mkOption {
+ type = types.str;
+ default = name;
+ example = "dialup";
+ description = "Name of the PPP peer.";
+ };
+
+ enable = mkOption {
+ type = types.bool;
+ default = true;
+ example = false;
+ description = "Whether to enable this PPP peer.";
+ };
+
+ autostart = mkOption {
+ type = types.bool;
+ default = true;
+ example = false;
+ description = "Whether the PPP session is automatically started at boot time.";
+ };
+
+ config = mkOption {
+ type = types.lines;
+ default = "";
+ description = "pppd configuration for this peer, see the pppd(8) man page.";
+ };
+ };
+ }));
+ };
+ };
+ };
+
+ config = let
+ enabledConfigs = filter (f: f.enable) (attrValues cfg.peers);
+
+ mkEtc = peerCfg: {
+ "ppp/peers/${peerCfg.name}".text = peerCfg.config;
+ };
+
+ mkSystemd = peerCfg: {
+ "pppd-${peerCfg.name}" = {
+ restartTriggers = [ config.environment.etc."ppp/peers/${peerCfg.name}".source ];
+ before = [ "network.target" ];
+ wants = [ "network.target" ];
+ after = [ "network-pre.target" ];
+ environment = {
+ # pppd likes to write directly into /var/run. This is rude
+ # on a modern system, so we use libredirect to transparently
+ # move those files into /run/pppd.
+ LD_PRELOAD = "${pkgs.libredirect}/lib/libredirect.so";
+ NIX_REDIRECTS = "/var/run=/run/pppd";
+ };
+ serviceConfig = {
+ ExecStart = "${getBin cfg.package}/sbin/pppd call ${peerCfg.name} nodetach nolog";
+ Restart = "always";
+ RestartSec = 5;
+
+ AmbientCapabilities = "CAP_SYS_TTY_CONFIG CAP_NET_ADMIN CAP_NET_RAW CAP_SYS_ADMIN";
+ CapabilityBoundingSet = "CAP_SYS_TTY_CONFIG CAP_NET_ADMIN CAP_NET_RAW CAP_SYS_ADMIN";
+ KeyringMode = "private";
+ LockPersonality = true;
+ MemoryDenyWriteExecute = true;
+ NoNewPrivileges = true;
+ PrivateMounts = true;
+ PrivateTmp = true;
+ ProtectControlGroups = true;
+ ProtectHome = true;
+ ProtectHostname = true;
+ ProtectKernelModules = true;
+ # pppd can be configured to tweak kernel settings.
+ ProtectKernelTunables = false;
+ ProtectSystem = "strict";
+ RemoveIPC = true;
+ RestrictAddressFamilies = "AF_PACKET AF_UNIX AF_PPPOX AF_ATMPVC AF_ATMSVC AF_INET AF_INET6 AF_IPX";
+ RestrictNamespaces = true;
+ RestrictRealtime = true;
+ RestrictSUIDSGID = true;
+ SecureBits = "no-setuid-fixup-locked noroot-locked";
+ SystemCallFilter = "@system-service";
+ SystemCallArchitectures = "native";
+
+ # All pppd instances on a system must share a runtime
+ # directory in order for PPP multilink to work correctly. So
+ # we give all instances the same /run/pppd directory to store
+ # things in.
+ #
+ # For the same reason, we can't set PrivateUsers=true, because
+ # all instances need to run as the same user to access the
+ # multilink database.
+ RuntimeDirectory = "pppd";
+ RuntimeDirectoryPreserve = true;
+ };
+ wantedBy = mkIf peerCfg.autostart [ "multi-user.target" ];
+ };
+ };
+
+ etcFiles = map mkEtc enabledConfigs;
+ systemdConfigs = map mkSystemd enabledConfigs;
+
+ in mkIf cfg.enable {
+ environment.etc = mkMerge etcFiles;
+ systemd.services = mkMerge systemdConfigs;
+ };
+}
diff --git a/nixos/modules/services/networking/pptpd.nix b/nixos/modules/services/networking/pptpd.nix
index d8b9e8f8341a..3e7753b9dd35 100644
--- a/nixos/modules/services/networking/pptpd.nix
+++ b/nixos/modules/services/networking/pptpd.nix
@@ -8,13 +8,13 @@ with lib;
enable = mkEnableOption "pptpd, the Point-to-Point Tunneling Protocol daemon";
serverIp = mkOption {
- type = types.string;
+ type = types.str;
description = "The server-side IP address.";
default = "10.124.124.1";
};
clientIpRange = mkOption {
- type = types.string;
+ type = types.str;
description = "The range from which client IPs are drawn.";
default = "10.124.124.2-11";
};
diff --git a/nixos/modules/services/networking/prosody.nix b/nixos/modules/services/networking/prosody.nix
index 40bd9015b1eb..7a503e711665 100644
--- a/nixos/modules/services/networking/prosody.nix
+++ b/nixos/modules/services/networking/prosody.nix
@@ -297,7 +297,7 @@ in
};
dataDir = mkOption {
- type = types.string;
+ type = types.path;
description = "Directory where Prosody stores its data";
default = "/var/lib/prosody";
};
@@ -465,7 +465,7 @@ in
modules_enabled = {
- ${ lib.concatStringsSep "\n\ \ " (lib.mapAttrsToList
+ ${ lib.concatStringsSep "\n " (lib.mapAttrsToList
(name: val: optionalString val "${toLua name};")
cfg.modules) }
${ lib.concatStringsSep "\n" (map (x: "${toLua x};") cfg.package.communityModules)}
diff --git a/nixos/modules/services/networking/quicktun.nix b/nixos/modules/services/networking/quicktun.nix
index 5bcf923f909c..fb783c836464 100644
--- a/nixos/modules/services/networking/quicktun.nix
+++ b/nixos/modules/services/networking/quicktun.nix
@@ -93,18 +93,18 @@ with lib;
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
environment = {
- "INTERFACE" = name;
- "TUN_MODE" = toString qtcfg.tunMode;
- "REMOTE_ADDRESS" = qtcfg.remoteAddress;
- "LOCAL_ADDRESS" = qtcfg.localAddress;
- "LOCAL_PORT" = toString qtcfg.localPort;
- "REMOTE_PORT" = toString qtcfg.remotePort;
- "REMOTE_FLOAT" = toString qtcfg.remoteFloat;
- "PRIVATE_KEY" = qtcfg.privateKey;
- "PUBLIC_KEY" = qtcfg.publicKey;
- "TIME_WINDOW" = toString qtcfg.timeWindow;
- "TUN_UP_SCRIPT" = pkgs.writeScript "quicktun-${name}-up.sh" qtcfg.upScript;
- "SUID" = "nobody";
+ INTERFACE = name;
+ TUN_MODE = toString qtcfg.tunMode;
+ REMOTE_ADDRESS = qtcfg.remoteAddress;
+ LOCAL_ADDRESS = qtcfg.localAddress;
+ LOCAL_PORT = toString qtcfg.localPort;
+ REMOTE_PORT = toString qtcfg.remotePort;
+ REMOTE_FLOAT = toString qtcfg.remoteFloat;
+ PRIVATE_KEY = qtcfg.privateKey;
+ PUBLIC_KEY = qtcfg.publicKey;
+ TIME_WINDOW = toString qtcfg.timeWindow;
+ TUN_UP_SCRIPT = pkgs.writeScript "quicktun-${name}-up.sh" qtcfg.upScript;
+ SUID = "nobody";
};
serviceConfig = {
Type = "simple";
diff --git a/nixos/modules/services/networking/radicale.nix b/nixos/modules/services/networking/radicale.nix
index d6fabbcd4700..1daced4a6c70 100644
--- a/nixos/modules/services/networking/radicale.nix
+++ b/nixos/modules/services/networking/radicale.nix
@@ -41,7 +41,7 @@ in
};
services.radicale.config = mkOption {
- type = types.string;
+ type = types.str;
default = "";
description = ''
Radicale configuration, this will set the service
@@ -50,7 +50,7 @@ in
};
services.radicale.extraArgs = mkOption {
- type = types.listOf types.string;
+ type = types.listOf types.str;
default = [];
description = "Extra arguments passed to the Radicale daemon.";
};
diff --git a/nixos/modules/services/networking/resilio.nix b/nixos/modules/services/networking/resilio.nix
index ee7f82ac7bee..9b25aa575837 100644
--- a/nixos/modules/services/networking/resilio.nix
+++ b/nixos/modules/services/networking/resilio.nix
@@ -249,7 +249,7 @@ in
systemd.services.resilio = with pkgs; {
description = "Resilio Sync Service";
wantedBy = [ "multi-user.target" ];
- after = [ "network.target" "local-fs.target" ];
+ after = [ "network.target" ];
serviceConfig = {
Restart = "on-abort";
UMask = "0002";
diff --git a/nixos/modules/services/networking/shadowsocks.nix b/nixos/modules/services/networking/shadowsocks.nix
index fe6d65a5f963..af12db590f00 100644
--- a/nixos/modules/services/networking/shadowsocks.nix
+++ b/nixos/modules/services/networking/shadowsocks.nix
@@ -35,10 +35,10 @@ in
};
localAddress = mkOption {
- type = types.str;
- default = "0.0.0.0";
+ type = types.coercedTo types.str singleton (types.listOf types.str);
+ default = [ "[::0]" "0.0.0.0" ];
description = ''
- Local address to which the server binds.
+ Local addresses to which the server binds.
'';
};
diff --git a/nixos/modules/services/networking/shout.nix b/nixos/modules/services/networking/shout.nix
index f511a9af2562..e548ec66962a 100644
--- a/nixos/modules/services/networking/shout.nix
+++ b/nixos/modules/services/networking/shout.nix
@@ -35,7 +35,7 @@ in {
};
listenAddress = mkOption {
- type = types.string;
+ type = types.str;
default = "0.0.0.0";
description = "IP interface to listen on for http connections.";
};
diff --git a/nixos/modules/services/networking/smokeping.nix b/nixos/modules/services/networking/smokeping.nix
index c41d0edaf17f..d4d0594a9cdd 100644
--- a/nixos/modules/services/networking/smokeping.nix
+++ b/nixos/modules/services/networking/smokeping.nix
@@ -55,7 +55,7 @@ in
description = "Enable the smokeping service";
};
alertConfig = mkOption {
- type = types.string;
+ type = types.lines;
default = ''
to = root@localhost
from = smokeping@localhost
@@ -73,19 +73,20 @@ in
description = "Configuration for alerts.";
};
cgiUrl = mkOption {
- type = types.string;
- default = "http://${cfg.hostName}:${builtins.toString cfg.port}/smokeping.cgi";
+ type = types.str;
+ default = "http://${cfg.hostName}:${toString cfg.port}/smokeping.cgi";
+ defaultText = "http://\${hostName}:\${toString port}/smokeping.cgi";
example = "https://somewhere.example.com/smokeping.cgi";
description = "URL to the smokeping cgi.";
};
config = mkOption {
- type = types.nullOr types.string;
+ type = types.nullOr types.lines;
default = null;
description = "Full smokeping config supplied by the user. Overrides " +
"and replaces any other configuration supplied.";
};
databaseConfig = mkOption {
- type = types.string;
+ type = types.lines;
default = ''
step = 300
pings = 20
@@ -122,14 +123,15 @@ in
description = "Any additional customization not already included.";
};
hostName = mkOption {
- type = types.string;
+ type = types.str;
default = config.networking.hostName;
example = "somewhere.example.com";
description = "DNS name for the urls generated in the cgi.";
};
imgUrl = mkOption {
- type = types.string;
- default = "http://${cfg.hostName}:${builtins.toString cfg.port}/cache";
+ type = types.str;
+ default = "http://${cfg.hostName}:${toString cfg.port}/cache";
+ defaultText = "http://\${hostName}:\${toString port}/cache";
example = "https://somewhere.example.com/cache";
description = "Base url for images generated in the cgi.";
};
@@ -140,19 +142,19 @@ in
description = "DNS name for the urls generated in the cgi.";
};
mailHost = mkOption {
- type = types.string;
+ type = types.str;
default = "";
example = "localhost";
description = "Use this SMTP server to send alerts";
};
owner = mkOption {
- type = types.string;
+ type = types.str;
default = "nobody";
example = "Joe Admin";
description = "Real name of the owner of the instance";
};
ownerEmail = mkOption {
- type = types.string;
+ type = types.str;
default = "no-reply@${cfg.hostName}";
example = "no-reply@yourdomain.com";
description = "Email contact for owner";
@@ -170,7 +172,7 @@ in
description = "TCP port to use for the web server.";
};
presentationConfig = mkOption {
- type = types.string;
+ type = types.lines;
default = ''
+ charts
menu = Charts
@@ -211,12 +213,12 @@ in
description = "presentation graph style";
};
presentationTemplate = mkOption {
- type = types.string;
+ type = types.str;
default = "${pkgs.smokeping}/etc/basepage.html.dist";
description = "Default page layout for the web UI.";
};
probeConfig = mkOption {
- type = types.string;
+ type = types.lines;
default = ''
+ FPing
binary = ${config.security.wrapperDir}/fping
@@ -230,12 +232,12 @@ in
description = "Use this sendmail compatible script to deliver alerts";
};
smokeMailTemplate = mkOption {
- type = types.string;
+ type = types.str;
default = "${cfg.package}/etc/smokemail.dist";
description = "Specify the smokemail template for alerts.";
};
targetConfig = mkOption {
- type = types.string;
+ type = types.lines;
default = ''
probe = FPing
menu = Top
@@ -253,7 +255,7 @@ in
description = "Target configuration";
};
user = mkOption {
- type = types.string;
+ type = types.str;
default = "smokeping";
description = "User that runs smokeping and (optionally) thttpd";
};
@@ -275,7 +277,7 @@ in
];
security.wrappers = {
fping.source = "${pkgs.fping}/bin/fping";
- "fping6".source = "${pkgs.fping}/bin/fping6";
+ fping6.source = "${pkgs.fping}/bin/fping6";
};
environment.systemPackages = [ pkgs.fping ];
users.users = singleton {
diff --git a/nixos/modules/services/networking/softether.nix b/nixos/modules/services/networking/softether.nix
index 0046dcd366fa..2dc73d81b258 100644
--- a/nixos/modules/services/networking/softether.nix
+++ b/nixos/modules/services/networking/softether.nix
@@ -50,7 +50,7 @@ in
};
dataDir = mkOption {
- type = types.string;
+ type = types.path;
default = "/var/lib/softether";
description = ''
Data directory for SoftEther VPN.
@@ -68,10 +68,8 @@ in
mkMerge [{
environment.systemPackages = [ package ];
- systemd.services."softether-init" = {
+ systemd.services.softether-init = {
description = "SoftEther VPN services initial task";
- after = [ "keys.target" ];
- wants = [ "keys.target" ];
wantedBy = [ "network.target" ];
serviceConfig = {
Type = "oneshot";
diff --git a/nixos/modules/services/networking/ssh/sshd.nix b/nixos/modules/services/networking/ssh/sshd.nix
index 0f9d2420903b..91fc7d72bc6d 100644
--- a/nixos/modules/services/networking/ssh/sshd.nix
+++ b/nixos/modules/services/networking/ssh/sshd.nix
@@ -502,7 +502,7 @@ in
assertions = [{ assertion = if cfg.forwardX11 then cfgc.setXAuthLocation else true;
message = "cannot enable X11 forwarding without setting xauth location";}]
- ++ flip map cfg.listenAddresses ({ addr, ... }: {
+ ++ forEach cfg.listenAddresses ({ addr, ... }: {
assertion = addr != null;
message = "addr must be specified in each listenAddresses entry";
});
diff --git a/nixos/modules/services/networking/strongswan-swanctl/module.nix b/nixos/modules/services/networking/strongswan-swanctl/module.nix
index 817b5ec55f78..0fec3ef00ad9 100644
--- a/nixos/modules/services/networking/strongswan-swanctl/module.nix
+++ b/nixos/modules/services/networking/strongswan-swanctl/module.nix
@@ -62,9 +62,8 @@ in {
systemd.services.strongswan-swanctl = {
description = "strongSwan IPsec IKEv1/IKEv2 daemon using swanctl";
wantedBy = [ "multi-user.target" ];
- after = [ "network-online.target" "keys.target" ];
- wants = [ "keys.target" ];
- path = with pkgs; [ kmod iproute iptables utillinux ];
+ after = [ "network-online.target" ];
+ path = with pkgs; [ kmod iproute iptables utillinux ];
environment = {
STRONGSWAN_CONF = pkgs.writeTextFile {
name = "strongswan.conf";
diff --git a/nixos/modules/services/networking/strongswan-swanctl/param-constructors.nix b/nixos/modules/services/networking/strongswan-swanctl/param-constructors.nix
index 95a174122d04..dfdfc50d8ae2 100644
--- a/nixos/modules/services/networking/strongswan-swanctl/param-constructors.nix
+++ b/nixos/modules/services/networking/strongswan-swanctl/param-constructors.nix
@@ -63,7 +63,7 @@ rec {
StrongSwan default:
'';
- single = f: name: value: { "${name}" = f value; };
+ single = f: name: value: { ${name} = f value; };
mkStrParam = mkParamOfType types.str;
mkOptionalStrParam = mkStrParam null;
diff --git a/nixos/modules/services/networking/strongswan-swanctl/param-lib.nix b/nixos/modules/services/networking/strongswan-swanctl/param-lib.nix
index 193ad27f035a..2bbb39a76049 100644
--- a/nixos/modules/services/networking/strongswan-swanctl/param-lib.nix
+++ b/nixos/modules/services/networking/strongswan-swanctl/param-lib.nix
@@ -21,7 +21,7 @@ rec {
mkConf = indent : ps :
concatMapStringsSep "\n"
(name:
- let value = ps."${name}";
+ let value = ps.${name};
indentation = replicate indent " ";
in
indentation + (
@@ -58,7 +58,7 @@ rec {
) set);
# Recursively map over every parameter in the given attribute set.
- mapParamsRecursive = mapAttrsRecursiveCond' (as: (!(as ? "_type" && as._type == "param")));
+ mapParamsRecursive = mapAttrsRecursiveCond' (as: (!(as ? _type && as._type == "param")));
mapAttrsRecursiveCond' = cond: f: set:
let
@@ -67,7 +67,7 @@ rec {
g =
name: value:
if isAttrs value && cond value
- then { "${name}" = recurse (path ++ [name]) value; }
+ then { ${name} = recurse (path ++ [name]) value; }
else f (path ++ [name]) name value;
in mapAttrs'' g set;
in recurse [] set;
@@ -77,6 +77,6 @@ rec {
# Extract the options from the given set of parameters.
paramsToOptions = ps :
- mapParamsRecursive (_path: name: param: { "${name}" = param.option; }) ps;
+ mapParamsRecursive (_path: name: param: { ${name} = param.option; }) ps;
}
diff --git a/nixos/modules/services/networking/strongswan.nix b/nixos/modules/services/networking/strongswan.nix
index 41b69039ba7a..4ff9c486059c 100644
--- a/nixos/modules/services/networking/strongswan.nix
+++ b/nixos/modules/services/networking/strongswan.nix
@@ -151,8 +151,7 @@ in
description = "strongSwan IPSec Service";
wantedBy = [ "multi-user.target" ];
path = with pkgs; [ kmod iproute iptables utillinux ]; # XXX Linux
- wants = [ "keys.target" ];
- after = [ "network-online.target" "keys.target" ];
+ after = [ "network-online.target" ];
environment = {
STRONGSWAN_CONF = strongswanConf { inherit setup connections ca secretsFile managePlugins enabledPlugins; };
};
diff --git a/nixos/modules/services/networking/stubby.nix b/nixos/modules/services/networking/stubby.nix
index 3fbf6eb60e9d..b38bcd4cec05 100644
--- a/nixos/modules/services/networking/stubby.nix
+++ b/nixos/modules/services/networking/stubby.nix
@@ -168,7 +168,7 @@ in
default = defaultUpstream;
type = types.lines;
description = ''
- Add additional upstreams. See stubby
+ Replace default upstreams. See stubby
1 for an
example of the entry formatting. In Strict mode, at least one of the
following settings must be supplied for each nameserver:
diff --git a/nixos/modules/services/networking/stunnel.nix b/nixos/modules/services/networking/stunnel.nix
index 89a14966eca7..cbc899f2b4d7 100644
--- a/nixos/modules/services/networking/stunnel.nix
+++ b/nixos/modules/services/networking/stunnel.nix
@@ -35,12 +35,12 @@ let
clientConfig = {
options = {
accept = mkOption {
- type = types.string;
+ type = types.str;
description = "IP:Port on which connections should be accepted.";
};
connect = mkOption {
- type = types.string;
+ type = types.str;
description = "IP:Port destination to connect to.";
};
@@ -63,7 +63,7 @@ let
};
verifyHostname = mkOption {
- type = with types; nullOr string;
+ type = with types; nullOr str;
default = null;
description = "If set, stunnel checks if the provided certificate is valid for the given hostname.";
};
@@ -88,13 +88,13 @@ in
};
user = mkOption {
- type = with types; nullOr string;
+ type = with types; nullOr str;
default = "nobody";
description = "The user under which stunnel runs.";
};
group = mkOption {
- type = with types; nullOr string;
+ type = with types; nullOr str;
default = "nogroup";
description = "The group under which stunnel runs.";
};
diff --git a/nixos/modules/services/networking/syncplay.nix b/nixos/modules/services/networking/syncplay.nix
new file mode 100644
index 000000000000..e3147c10502c
--- /dev/null
+++ b/nixos/modules/services/networking/syncplay.nix
@@ -0,0 +1,80 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+ cfg = config.services.syncplay;
+
+ cmdArgs =
+ [ "--port" cfg.port ]
+ ++ optionals (cfg.salt != null) [ "--salt" cfg.salt ]
+ ++ optionals (cfg.certDir != null) [ "--tls" cfg.certDir ];
+
+in
+{
+ options = {
+ services.syncplay = {
+ enable = mkOption {
+ type = types.bool;
+ default = false;
+ description = "If enabled, start the Syncplay server.";
+ };
+
+ port = mkOption {
+ type = types.int;
+ default = 8999;
+ description = ''
+ TCP port to bind to.
+ '';
+ };
+
+ salt = mkOption {
+ type = types.nullOr types.str;
+ default = null;
+ description = ''
+ Salt to allow room operator passwords generated by this server
+ instance to still work when the server is restarted.
+ '';
+ };
+
+ certDir = mkOption {
+ type = types.nullOr types.path;
+ default = null;
+ description = ''
+ TLS certificates directory to use for encryption. See
+ .
+ '';
+ };
+
+ user = mkOption {
+ type = types.str;
+ default = "nobody";
+ description = ''
+ User to use when running Syncplay.
+ '';
+ };
+
+ group = mkOption {
+ type = types.str;
+ default = "nogroup";
+ description = ''
+ Group to use when running Syncplay.
+ '';
+ };
+ };
+ };
+
+ config = mkIf cfg.enable {
+ systemd.services.syncplay = {
+ description = "Syncplay Service";
+ wantedBy = [ "multi-user.target" ];
+ after = [ "network-online.target "];
+
+ serviceConfig = {
+ ExecStart = "${pkgs.syncplay}/bin/syncplay-server ${escapeShellArgs cmdArgs}";
+ User = cfg.user;
+ Group = cfg.group;
+ };
+ };
+ };
+}
diff --git a/nixos/modules/services/networking/syncthing.nix b/nixos/modules/services/networking/syncthing.nix
index 126f5b7b527b..165fd5970cf8 100644
--- a/nixos/modules/services/networking/syncthing.nix
+++ b/nixos/modules/services/networking/syncthing.nix
@@ -373,7 +373,7 @@ in {
systemd.packages = [ pkgs.syncthing ];
users.users = mkIf (cfg.systemService && cfg.user == defaultUser) {
- "${defaultUser}" =
+ ${defaultUser} =
{ group = cfg.group;
home = cfg.dataDir;
createHome = true;
@@ -383,7 +383,7 @@ in {
};
users.groups = mkIf (cfg.systemService && cfg.group == defaultUser) {
- "${defaultUser}".gid =
+ ${defaultUser}.gid =
config.ids.gids.syncthing;
};
diff --git a/nixos/modules/services/networking/toxvpn.nix b/nixos/modules/services/networking/toxvpn.nix
index 7830dfb1834c..9e97faeebc1e 100644
--- a/nixos/modules/services/networking/toxvpn.nix
+++ b/nixos/modules/services/networking/toxvpn.nix
@@ -8,7 +8,7 @@ with lib;
enable = mkEnableOption "toxvpn running on startup";
localip = mkOption {
- type = types.string;
+ type = types.str;
default = "10.123.123.1";
description = "your ip on the vpn";
};
@@ -20,10 +20,10 @@ with lib;
};
auto_add_peers = mkOption {
- type = types.listOf types.string;
+ type = types.listOf types.str;
default = [];
example = ''[ "toxid1" "toxid2" ]'';
- description = "peers to automacally connect to on startup";
+ description = "peers to automatically connect to on startup";
};
};
};
diff --git a/nixos/modules/services/networking/unifi.nix b/nixos/modules/services/networking/unifi.nix
index 9057a1e12b33..c922ba15960f 100644
--- a/nixos/modules/services/networking/unifi.nix
+++ b/nixos/modules/services/networking/unifi.nix
@@ -148,7 +148,7 @@ in
systemd.tmpfiles.rules = [
"e '${stateDir}' 0700 unifi - - -"
- "e '${stateDir}/data' 0700 unifi - - -"
+ "d '${stateDir}/data' 0700 unifi - - -"
];
systemd.services.unifi = {
@@ -176,6 +176,7 @@ in
Type = "simple";
ExecStart = "${(removeSuffix "\n" cmd)} start";
ExecStop = "${(removeSuffix "\n" cmd)} stop";
+ Restart = "on-failure";
User = "unifi";
UMask = "0077";
WorkingDirectory = "${stateDir}";
diff --git a/nixos/modules/services/networking/vsftpd.nix b/nixos/modules/services/networking/vsftpd.nix
index 31e1e65fa9ca..67be60da5673 100644
--- a/nixos/modules/services/networking/vsftpd.nix
+++ b/nixos/modules/services/networking/vsftpd.nix
@@ -164,7 +164,7 @@ in
};
anonymousUmask = mkOption {
- type = types.string;
+ type = types.str;
default = "077";
example = "002";
description = "Anonymous write umask.";
diff --git a/nixos/modules/services/networking/websockify.nix b/nixos/modules/services/networking/websockify.nix
index 4b76350ecf8a..d9177df65bd6 100644
--- a/nixos/modules/services/networking/websockify.nix
+++ b/nixos/modules/services/networking/websockify.nix
@@ -44,9 +44,9 @@ let cfg = config.services.networking.websockify; in {
scriptArgs = "%i";
};
- systemd.targets."default-websockify" = {
+ systemd.targets.default-websockify = {
description = "Target to start all default websockify@ services";
- unitConfig."X-StopOnReconfiguration" = true;
+ unitConfig.X-StopOnReconfiguration = true;
wants = mapAttrsToList (name: value: "websockify@${name}:${toString value}.service") cfg.portMap;
wantedBy = [ "multi-user.target" ];
};
diff --git a/nixos/modules/services/networking/wpa_supplicant.nix b/nixos/modules/services/networking/wpa_supplicant.nix
index 63e59e7c8fac..294c0d70edea 100644
--- a/nixos/modules/services/networking/wpa_supplicant.nix
+++ b/nixos/modules/services/networking/wpa_supplicant.nix
@@ -103,6 +103,13 @@ in {
description = ''
Set this to true if the SSID of the network is hidden.
'';
+ example = literalExample ''
+ { echelon = {
+ hidden = true;
+ psk = "abcdefgh";
+ };
+ }
+ '';
};
priority = mkOption {
@@ -146,10 +153,13 @@ in {
'';
default = {};
example = literalExample ''
- { echelon = {
+ { echelon = { # SSID with no spaces or special characters
psk = "abcdefgh";
};
- "free.wifi" = {};
+ "echelon's AP" = { # SSID with spaces and/or special characters
+ psk = "ijklmnop";
+ };
+ "free.wifi" = {}; # Public wireless network
}
'';
};
diff --git a/nixos/modules/services/networking/xinetd.nix b/nixos/modules/services/networking/xinetd.nix
index 2d7cd5cebb48..8dc6f845ed85 100644
--- a/nixos/modules/services/networking/xinetd.nix
+++ b/nixos/modules/services/networking/xinetd.nix
@@ -53,7 +53,7 @@ in
services.xinetd.extraDefaults = mkOption {
default = "";
- type = types.string;
+ type = types.lines;
description = ''
Additional configuration lines added to the default section of xinetd's configuration.
'';
@@ -70,13 +70,13 @@ in
options = {
name = mkOption {
- type = types.string;
+ type = types.str;
example = "login";
description = "Name of the service.";
};
protocol = mkOption {
- type = types.string;
+ type = types.str;
default = "tcp";
description =
"Protocol of the service. Usually tcp or udp.";
@@ -90,25 +90,25 @@ in
};
user = mkOption {
- type = types.string;
+ type = types.str;
default = "nobody";
description = "User account for the service";
};
server = mkOption {
- type = types.string;
+ type = types.str;
example = "/foo/bin/ftpd";
description = "Path of the program that implements the service.";
};
serverArgs = mkOption {
- type = types.string;
+ type = types.separatedString " ";
default = "";
description = "Command-line arguments for the server program.";
};
flags = mkOption {
- type = types.string;
+ type = types.str;
default = "";
description = "";
};
diff --git a/nixos/modules/services/networking/xl2tpd.nix b/nixos/modules/services/networking/xl2tpd.nix
index d0a3ed7bb5e0..7dbe51422d96 100644
--- a/nixos/modules/services/networking/xl2tpd.nix
+++ b/nixos/modules/services/networking/xl2tpd.nix
@@ -8,13 +8,13 @@ with lib;
enable = mkEnableOption "xl2tpd, the Layer 2 Tunnelling Protocol Daemon";
serverIp = mkOption {
- type = types.string;
+ type = types.str;
description = "The server-side IP address.";
default = "10.125.125.1";
};
clientIpRange = mkOption {
- type = types.string;
+ type = types.str;
description = "The range from which client IPs are drawn.";
default = "10.125.125.2-11";
};
diff --git a/nixos/modules/services/networking/zerobin.nix b/nixos/modules/services/networking/zerobin.nix
index 06ccd7032e6c..78de246a816f 100644
--- a/nixos/modules/services/networking/zerobin.nix
+++ b/nixos/modules/services/networking/zerobin.nix
@@ -74,7 +74,7 @@ in
};
config = mkIf (cfg.enable) {
- users.users."${cfg.user}" =
+ users.users.${cfg.user} =
if cfg.user == "zerobin" then {
isSystemUser = true;
group = cfg.group;
@@ -82,7 +82,7 @@ in
createHome = true;
}
else {};
- users.groups."${cfg.group}" = {};
+ users.groups.${cfg.group} = {};
systemd.services.zerobin = {
enable = true;
diff --git a/nixos/modules/services/networking/zeronet.nix b/nixos/modules/services/networking/zeronet.nix
index f4988a902685..f354a9d42c79 100644
--- a/nixos/modules/services/networking/zeronet.nix
+++ b/nixos/modules/services/networking/zeronet.nix
@@ -1,44 +1,39 @@
{ config, lib, pkgs, ... }:
let
+ inherit (lib) generators literalExample mkEnableOption mkIf mkOption recursiveUpdate types;
cfg = config.services.zeronet;
+ dataDir = "/var/lib/zeronet";
+ configFile = pkgs.writeText "zeronet.conf" (generators.toINI {} (recursiveUpdate defaultSettings cfg.settings));
- zConfFile = pkgs.writeTextFile {
- name = "zeronet.conf";
-
- text = ''
- [global]
- data_dir = ${cfg.dataDir}
- log_dir = ${cfg.logDir}
- '' + lib.optionalString (cfg.port != null) ''
- ui_port = ${toString cfg.port}
- '' + lib.optionalString (cfg.fileserverPort != null) ''
- fileserver_port = ${toString cfg.fileserverPort}
- '' + lib.optionalString (cfg.torAlways) ''
- tor = always
- '' + cfg.extraConfig;
+ defaultSettings = {
+ global = {
+ data_dir = dataDir;
+ log_dir = dataDir;
+ ui_port = cfg.port;
+ fileserver_port = cfg.fileserverPort;
+ tor = if !cfg.tor then "disable" else if cfg.torAlways then "always" else "enable";
+ };
};
in with lib; {
options.services.zeronet = {
enable = mkEnableOption "zeronet";
- dataDir = mkOption {
- type = types.path;
- default = "/var/lib/zeronet";
- example = "/home/okina/zeronet";
- description = "Path to the zeronet data directory.";
- };
+ settings = mkOption {
+ type = with types; attrsOf (oneOf [ str int bool (listOf str) ]);
+ default = {};
+ example = literalExample "global.tor = enable;";
- logDir = mkOption {
- type = types.path;
- default = "/var/log/zeronet";
- example = "/home/okina/zeronet/log";
- description = "Path to the zeronet log directory.";
+ description = ''
+ zeronet.conf configuration. Refer to
+
+ for details on supported values;
+ '';
};
port = mkOption {
- type = types.nullOr types.int;
- default = null;
+ type = types.int;
+ default = 43110;
example = 43110;
description = "Optional zeronet web UI port.";
};
@@ -63,22 +58,13 @@ in with lib; {
default = false;
description = "Use TOR for all zeronet traffic.";
};
-
- extraConfig = mkOption {
- type = types.lines;
- default = "";
-
- description = ''
- Extra configuration. Contents will be added verbatim to the
- configuration file at the end.
- '';
- };
};
config = mkIf cfg.enable {
services.tor = mkIf cfg.tor {
enable = true;
controlPort = 9051;
+
extraConfig = ''
CacheDirectoryGroupReadable 1
CookieAuthentication 1
@@ -86,37 +72,25 @@ in with lib; {
'';
};
- systemd.tmpfiles.rules = [
- "d '${cfg.dataDir}' 750 zeronet zeronet - -"
- "d '${cfg.logDir}' 750 zeronet zeronet - -"
- ];
-
systemd.services.zeronet = {
description = "zeronet";
after = [ "network.target" (optionalString cfg.tor "tor.service") ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
- PrivateTmp = "yes";
User = "zeronet";
- Group = "zeronet";
- ExecStart = "${pkgs.zeronet}/bin/zeronet --config_file ${zConfFile}";
- };
- };
-
- users = {
- groups.zeronet.gid = config.ids.gids.zeronet;
-
- users.zeronet = {
- description = "zeronet service user";
- home = cfg.dataDir;
- createHome = true;
- group = "zeronet";
- extraGroups = mkIf cfg.tor [ "tor" ];
- uid = config.ids.uids.zeronet;
+ DynamicUser = true;
+ StateDirectory = "zeronet";
+ SupplementaryGroups = mkIf cfg.tor [ "tor" ];
+ ExecStart = "${pkgs.zeronet}/bin/zeronet --config_file ${configFile}";
};
};
};
+ imports = [
+ (mkRemovedOptionModule [ "services" "zeronet" "dataDir" ] "Zeronet will store data by default in /var/lib/zeronet")
+ (mkRemovedOptionModule [ "services" "zeronet" "logDir" ] "Zeronet will log by default in /var/lib/zeronet")
+ ];
+
meta.maintainers = with maintainers; [ chiiruno ];
}
diff --git a/nixos/modules/services/networking/znc/default.nix b/nixos/modules/services/networking/znc/default.nix
index 46bff6954cdd..05f97bfa539f 100644
--- a/nixos/modules/services/networking/znc/default.nix
+++ b/nixos/modules/services/networking/znc/default.nix
@@ -62,9 +62,9 @@ let
concatStringsSep "\n" (toLines cfg.config);
semanticTypes = with types; rec {
- zncAtom = nullOr (either (either int bool) str);
+ zncAtom = nullOr (oneOf [ int bool str ]);
zncAttr = attrsOf (nullOr zncConf);
- zncAll = either (either zncAtom (listOf zncAtom)) zncAttr;
+ zncAll = oneOf [ zncAtom (listOf zncAtom) zncAttr ];
zncConf = attrsOf (zncAll // {
# Since this is a recursive type and the description by default contains
# the description of its subtypes, infinite recursion would occur without
diff --git a/nixos/modules/services/printing/cupsd.nix b/nixos/modules/services/printing/cupsd.nix
index 86b0c8d69beb..3fcae611dc79 100644
--- a/nixos/modules/services/printing/cupsd.nix
+++ b/nixos/modules/services/printing/cupsd.nix
@@ -127,7 +127,7 @@ in
startWhenNeeded = mkOption {
type = types.bool;
- default = false;
+ default = true;
description = ''
If set, CUPS is socket-activated; that is,
instead of having it permanently running as a daemon,
@@ -287,20 +287,35 @@ in
};
environment.systemPackages = [ cups.out ] ++ optional polkitEnabled cups-pk-helper;
- environment.etc."cups".source = "/var/lib/cups";
+ environment.etc.cups.source = "/var/lib/cups";
services.dbus.packages = [ cups.out ] ++ optional polkitEnabled cups-pk-helper;
+ # Allow asswordless printer admin for members of wheel group
+ security.polkit.extraConfig = mkIf polkitEnabled ''
+ polkit.addRule(function(action, subject) {
+ if (action.id == "org.opensuse.cupspkhelper.mechanism.all-edit" &&
+ subject.isInGroup("wheel")){
+ return polkit.Result.YES;
+ }
+ });
+ '';
+
# Cups uses libusb to talk to printers, and does not use the
# linux kernel driver. If the driver is not in a black list, it
# gets loaded, and then cups cannot access the printers.
boot.blacklistedKernelModules = [ "usblp" ];
+ # Some programs like print-manager rely on this value to get
+ # printer test pages.
+ environment.sessionVariables.CUPS_DATADIR = "${bindir}/share/cups";
+
systemd.packages = [ cups.out ];
systemd.sockets.cups = mkIf cfg.startWhenNeeded {
wantedBy = [ "sockets.target" ];
- listenStreams = map (x: replaceStrings ["localhost"] ["127.0.0.1"] (removePrefix "*:" x)) cfg.listenAddresses;
+ listenStreams = [ "/run/cups/cups.sock" ]
+ ++ map (x: replaceStrings ["localhost"] ["127.0.0.1"] (removePrefix "*:" x)) cfg.listenAddresses;
};
systemd.services.cups =
@@ -362,10 +377,10 @@ in
{ description = "CUPS Remote Printer Discovery";
wantedBy = [ "multi-user.target" ];
- wants = [ "cups.service" "avahi-daemon.service" ];
- bindsTo = [ "cups.service" "avahi-daemon.service" ];
- partOf = [ "cups.service" "avahi-daemon.service" ];
- after = [ "cups.service" "avahi-daemon.service" ];
+ wants = [ "avahi-daemon.service" ] ++ optional (!cfg.startWhenNeeded) "cups.service";
+ bindsTo = [ "avahi-daemon.service" ] ++ optional (!cfg.startWhenNeeded) "cups.service";
+ partOf = [ "avahi-daemon.service" ] ++ optional (!cfg.startWhenNeeded) "cups.service";
+ after = [ "avahi-daemon.service" ] ++ optional (!cfg.startWhenNeeded) "cups.service";
path = [ cups ];
@@ -421,4 +436,7 @@ in
security.pam.services.cups = {};
};
+
+ meta.maintainers = with lib.maintainers; [ matthewbauer ];
+
}
diff --git a/nixos/modules/services/scheduling/fcron.nix b/nixos/modules/services/scheduling/fcron.nix
index f77b3bcd5921..e43ca014e148 100644
--- a/nixos/modules/services/scheduling/fcron.nix
+++ b/nixos/modules/services/scheduling/fcron.nix
@@ -143,7 +143,6 @@ in
};
systemd.services.fcron = {
description = "fcron daemon";
- after = [ "local-fs.target" ];
wantedBy = [ "multi-user.target" ];
path = [ pkgs.fcron ];
diff --git a/nixos/modules/services/search/elasticsearch.nix b/nixos/modules/services/search/elasticsearch.nix
index 6b688c640d59..91d8f544e16b 100644
--- a/nixos/modules/services/search/elasticsearch.nix
+++ b/nixos/modules/services/search/elasticsearch.nix
@@ -131,6 +131,7 @@ in {
description = "Extra elasticsearch plugins";
default = [];
type = types.listOf types.package;
+ example = lib.literalExample "[ pkgs.elasticsearchPlugins.discovery-ec2 ]";
};
};
diff --git a/nixos/modules/services/search/kibana.nix b/nixos/modules/services/search/kibana.nix
index c096af731ad4..43a63aa8fdc2 100644
--- a/nixos/modules/services/search/kibana.nix
+++ b/nixos/modules/services/search/kibana.nix
@@ -9,7 +9,7 @@ let
lt6_6 = builtins.compareVersions cfg.package.version "6.6" < 0;
cfgFile = pkgs.writeText "kibana.json" (builtins.toJSON (
- (filterAttrsRecursive (n: v: v != null) ({
+ (filterAttrsRecursive (n: v: v != null && v != []) ({
server.host = cfg.listenAddress;
server.port = cfg.port;
server.ssl.certificate = cfg.cert;
@@ -150,7 +150,7 @@ in {
description = "Kibana package to use";
default = pkgs.kibana;
defaultText = "pkgs.kibana";
- example = "pkgs.kibana5";
+ example = "pkgs.kibana";
type = types.package;
};
diff --git a/nixos/modules/services/security/bitwarden_rs/default.nix b/nixos/modules/services/security/bitwarden_rs/default.nix
index bb036ee020f4..80fd65891ff8 100644
--- a/nixos/modules/services/security/bitwarden_rs/default.nix
+++ b/nixos/modules/services/security/bitwarden_rs/default.nix
@@ -36,7 +36,7 @@ in {
};
config = mkOption {
- type = attrsOf (nullOr (either (either bool int) str));
+ type = attrsOf (nullOr (oneOf [ bool int str ]));
default = {};
example = literalExample ''
{
diff --git a/nixos/modules/services/security/fprintd.nix b/nixos/modules/services/security/fprintd.nix
index 5662ebc61d20..8ece1ca19013 100644
--- a/nixos/modules/services/security/fprintd.nix
+++ b/nixos/modules/services/security/fprintd.nix
@@ -50,13 +50,6 @@ in
systemd.packages = [ cfg.package ];
-
- # The upstream unit does not use StateDirectory, and will
- # fail if the directory it needs is not present. Should be
- # fixed when https://gitlab.freedesktop.org/libfprint/fprintd/merge_requests/5
- # is merged.
- systemd.services.fprintd.serviceConfig.StateDirectory = "fprint";
-
};
}
diff --git a/nixos/modules/services/security/fprot.nix b/nixos/modules/services/security/fprot.nix
index b1ca4ab23452..474490391463 100644
--- a/nixos/modules/services/security/fprot.nix
+++ b/nixos/modules/services/security/fprot.nix
@@ -67,7 +67,7 @@ in {
services.cron.systemCronJobs = [ "*/${toString cfg.updater.frequency} * * * * root start fprot-updater" ];
- systemd.services."fprot-updater" = {
+ systemd.services.fprot-updater = {
serviceConfig = {
Type = "oneshot";
RemainAfterExit = false;
diff --git a/nixos/modules/services/security/haka.nix b/nixos/modules/services/security/haka.nix
index b64a1b4d03e0..618e689924fd 100644
--- a/nixos/modules/services/security/haka.nix
+++ b/nixos/modules/services/security/haka.nix
@@ -69,7 +69,7 @@ in
configFile = mkOption {
default = "empty.lua";
example = "/srv/haka/myfilter.lua";
- type = types.string;
+ type = types.str;
description = ''
Specify which configuration file Haka uses.
It can be absolute path or a path relative to the sample directory of
@@ -80,7 +80,7 @@ in
interfaces = mkOption {
default = [ "eth0" ];
example = [ "any" ];
- type = with types; listOf string;
+ type = with types; listOf str;
description = ''
Specify which interface(s) Haka listens to.
Use 'any' to listen to all interfaces.
diff --git a/nixos/modules/services/security/munge.nix b/nixos/modules/services/security/munge.nix
index 1c4f8e20552f..891788864710 100644
--- a/nixos/modules/services/security/munge.nix
+++ b/nixos/modules/services/security/munge.nix
@@ -19,7 +19,7 @@ in
password = mkOption {
default = "/etc/munge/munge.key";
- type = types.string;
+ type = types.path;
description = ''
The path to a daemon's secret key.
'';
diff --git a/nixos/modules/services/security/oauth2_proxy.nix b/nixos/modules/services/security/oauth2_proxy.nix
index 61f203ef9e7d..bb03f7fc9e43 100644
--- a/nixos/modules/services/security/oauth2_proxy.nix
+++ b/nixos/modules/services/security/oauth2_proxy.nix
@@ -284,7 +284,7 @@ in
####################################################
# UPSTREAM Configuration
upstream = mkOption {
- type = with types; coercedTo string (x: [x]) (listOf string);
+ type = with types; coercedTo str (x: [x]) (listOf str);
default = [];
description = ''
The http url(s) of the upstream endpoint or file://
@@ -523,7 +523,7 @@ in
};
keyFile = mkOption {
- type = types.nullOr types.string;
+ type = types.nullOr types.path;
default = null;
description = ''
oauth2_proxy allows passing sensitive configuration via environment variables.
diff --git a/nixos/modules/services/security/oauth2_proxy_nginx.nix b/nixos/modules/services/security/oauth2_proxy_nginx.nix
index a9ad5497a657..be6734f439f3 100644
--- a/nixos/modules/services/security/oauth2_proxy_nginx.nix
+++ b/nixos/modules/services/security/oauth2_proxy_nginx.nix
@@ -6,14 +6,14 @@ in
{
options.services.oauth2_proxy.nginx = {
proxy = mkOption {
- type = types.string;
+ type = types.str;
default = config.services.oauth2_proxy.httpAddress;
description = ''
The address of the reverse proxy endpoint for oauth2_proxy
'';
};
virtualHosts = mkOption {
- type = types.listOf types.string;
+ type = types.listOf types.str;
default = [];
description = ''
A list of nginx virtual hosts to put behind the oauth2 proxy
diff --git a/nixos/modules/services/security/physlock.nix b/nixos/modules/services/security/physlock.nix
index 97fbd6aae6e0..61bcd84f2e64 100644
--- a/nixos/modules/services/security/physlock.nix
+++ b/nixos/modules/services/security/physlock.nix
@@ -99,7 +99,7 @@ in
# for physlock -l and physlock -L
environment.systemPackages = [ pkgs.physlock ];
- systemd.services."physlock" = {
+ systemd.services.physlock = {
enable = true;
description = "Physlock";
wantedBy = optional cfg.lockOn.suspend "suspend.target"
diff --git a/nixos/modules/services/security/sks.nix b/nixos/modules/services/security/sks.nix
index 1b7a2ad13980..a91060dc659a 100644
--- a/nixos/modules/services/security/sks.nix
+++ b/nixos/modules/services/security/sks.nix
@@ -108,7 +108,7 @@ in {
hkpAddress = "'" + (builtins.concatStringsSep " " cfg.hkpAddress) + "'" ;
hkpPort = builtins.toString cfg.hkpPort;
in {
- "sks-db" = {
+ sks-db = {
description = "SKS database server";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
diff --git a/nixos/modules/services/security/sshguard.nix b/nixos/modules/services/security/sshguard.nix
index 25cec5b5b105..4a174564dd2c 100644
--- a/nixos/modules/services/security/sshguard.nix
+++ b/nixos/modules/services/security/sshguard.nix
@@ -106,14 +106,24 @@ in {
path = with pkgs; [ iptables ipset iproute systemd ];
- postStart = ''
+ # The sshguard ipsets must exist before we invoke
+ # iptables. sshguard creates the ipsets after startup if
+ # necessary, but if we let sshguard do it, we can't reliably add
+ # the iptables rules because postStart races with the creation
+ # of the ipsets. So instead, we create both the ipsets and
+ # firewall rules before sshguard starts.
+ preStart = ''
+ ${pkgs.ipset}/bin/ipset -quiet create -exist sshguard4 hash:net family inet
+ ${pkgs.ipset}/bin/ipset -quiet create -exist sshguard6 hash:net family inet6
${pkgs.iptables}/bin/iptables -I INPUT -m set --match-set sshguard4 src -j DROP
${pkgs.iptables}/bin/ip6tables -I INPUT -m set --match-set sshguard6 src -j DROP
'';
- preStop = ''
+ postStop = ''
${pkgs.iptables}/bin/iptables -D INPUT -m set --match-set sshguard4 src -j DROP
${pkgs.iptables}/bin/ip6tables -D INPUT -m set --match-set sshguard6 src -j DROP
+ ${pkgs.ipset}/bin/ipset -quiet destroy sshguard4
+ ${pkgs.ipset}/bin/ipset -quiet destroy sshguard6
'';
unitConfig.Documentation = "man:sshguard(8)";
diff --git a/nixos/modules/services/security/tor.nix b/nixos/modules/services/security/tor.nix
index abdc0cd78b4d..ed862387cce1 100644
--- a/nixos/modules/services/security/tor.nix
+++ b/nixos/modules/services/security/tor.nix
@@ -722,7 +722,6 @@ in
systemd.services.tor-init =
{ description = "Tor Daemon Init";
wantedBy = [ "tor.service" ];
- after = [ "local-fs.target" ];
script = ''
install -m 0700 -o tor -g tor -d ${torDirectory} ${torDirectory}/onion
install -m 0750 -o tor -g tor -d ${torRunDirectory}
diff --git a/nixos/modules/services/security/usbguard.nix b/nixos/modules/services/security/usbguard.nix
index 88d2f69db572..4ced5acd9bd9 100644
--- a/nixos/modules/services/security/usbguard.nix
+++ b/nixos/modules/services/security/usbguard.nix
@@ -39,6 +39,16 @@ in {
services.usbguard = {
enable = mkEnableOption "USBGuard daemon";
+ package = mkOption {
+ type = types.package;
+ default = pkgs.usbguard;
+ defaultText = "pkgs.usbguard";
+ description = ''
+ The usbguard package to use. If you do not need the Qt GUI, use
+ pkgs.usbguard-nox to save disk space.
+ '';
+ };
+
ruleFile = mkOption {
type = types.path;
default = "/var/lib/usbguard/rules.conf";
@@ -179,13 +189,13 @@ in {
config = mkIf cfg.enable {
- environment.systemPackages = [ pkgs.usbguard ];
+ environment.systemPackages = [ cfg.package ];
systemd.services.usbguard = {
description = "USBGuard daemon";
wantedBy = [ "basic.target" ];
- wants = [ "systemd-udevd.service" "local-fs.target" ];
+ wants = [ "systemd-udevd.service" ];
# make sure an empty rule file and required directories exist
preStart = ''
@@ -195,7 +205,7 @@ in {
serviceConfig = {
Type = "simple";
- ExecStart = ''${pkgs.usbguard}/bin/usbguard-daemon -P -k -c ${daemonConfFile}'';
+ ExecStart = ''${cfg.package}/bin/usbguard-daemon -P -k -c ${daemonConfFile}'';
Restart = "on-failure";
};
};
diff --git a/nixos/modules/services/security/vault.nix b/nixos/modules/services/security/vault.nix
index 8176c168ca94..d5962ba9af90 100644
--- a/nixos/modules/services/security/vault.nix
+++ b/nixos/modules/services/security/vault.nix
@@ -70,7 +70,7 @@ in
};
storageBackend = mkOption {
- type = types.enum [ "inmem" "file" "consul" "zookeeper" "s3" "azure" "dynamodb" "etcd" "mssql" "mysql" "postgresql" "swift" "gcs" ];
+ type = types.enum [ "inmem" "file" "consul" "zookeeper" "s3" "azure" "dynamodb" "etcd" "mssql" "mysql" "postgresql" "swift" "gcs" "raft" ];
default = "inmem";
description = "The name of the type of storage backend";
};
diff --git a/nixos/modules/services/system/cgmanager.nix b/nixos/modules/services/system/cgmanager.nix
index 59d3deced867..d3d57aa76928 100644
--- a/nixos/modules/services/system/cgmanager.nix
+++ b/nixos/modules/services/system/cgmanager.nix
@@ -14,7 +14,6 @@ in {
config = mkIf cfg.enable {
systemd.services.cgmanager = {
wantedBy = [ "multi-user.target" ];
- after = [ "local-fs.target" ];
description = "Cgroup management daemon";
restartIfChanged = false;
serviceConfig = {
diff --git a/nixos/modules/services/system/cloud-init.nix b/nixos/modules/services/system/cloud-init.nix
index 3ad555f78ef8..15fe822aec67 100644
--- a/nixos/modules/services/system/cloud-init.nix
+++ b/nixos/modules/services/system/cloud-init.nix
@@ -112,8 +112,6 @@ in
systemd.services.cloud-init-local =
{ description = "Initial cloud-init job (pre-networking)";
wantedBy = [ "multi-user.target" ];
- wants = [ "local-fs.target" ];
- after = [ "local-fs.target" ];
path = path;
serviceConfig =
{ Type = "oneshot";
@@ -127,9 +125,9 @@ in
systemd.services.cloud-init =
{ description = "Initial cloud-init job (metadata service crawler)";
wantedBy = [ "multi-user.target" ];
- wants = [ "local-fs.target" "network-online.target" "cloud-init-local.service"
+ wants = [ "network-online.target" "cloud-init-local.service"
"sshd.service" "sshd-keygen.service" ];
- after = [ "local-fs.target" "network-online.target" "cloud-init-local.service" ];
+ after = [ "network-online.target" "cloud-init-local.service" ];
before = [ "sshd.service" "sshd-keygen.service" ];
requires = [ "network.target "];
path = path;
diff --git a/nixos/modules/services/system/dbus.nix b/nixos/modules/services/system/dbus.nix
index e04580218442..936646a5fd78 100644
--- a/nixos/modules/services/system/dbus.nix
+++ b/nixos/modules/services/system/dbus.nix
@@ -44,8 +44,10 @@ in
message bus. Specifically, files in the following directories
will be included into their respective DBus configuration paths:
pkg/etc/dbus-1/system.d
+ pkg/share/dbus-1/system.dpkg/share/dbus-1/system-servicespkg/etc/dbus-1/session.d
+ pkg/share/dbus-1/session.dpkg/share/dbus-1/services
'';
};
diff --git a/nixos/modules/services/system/localtime.nix b/nixos/modules/services/system/localtime.nix
index 04595fc82fbb..c3c0b432b494 100644
--- a/nixos/modules/services/system/localtime.nix
+++ b/nixos/modules/services/system/localtime.nix
@@ -22,7 +22,7 @@ in {
config = mkIf cfg.enable {
services.geoclue2 = {
enable = true;
- appConfig."localtime" = {
+ appConfig.localtime = {
isAllowed = true;
isSystem = true;
};
diff --git a/nixos/modules/services/torrent/deluge.nix b/nixos/modules/services/torrent/deluge.nix
index 48ec4d692e2f..0c72505395dd 100644
--- a/nixos/modules/services/torrent/deluge.nix
+++ b/nixos/modules/services/torrent/deluge.nix
@@ -173,12 +173,16 @@ in {
# Provide a default set of `extraPackages`.
services.deluge.extraPackages = with pkgs; [ unzip gnutar xz p7zip bzip2 ];
- systemd.tmpfiles.rules = [ "d '${configDir}' 0770 ${cfg.user} ${cfg.group}" ]
- ++ optional (cfg.config ? "download_location")
+ systemd.tmpfiles.rules = [
+ "d '${cfg.dataDir}' 0770 ${cfg.user} ${cfg.group}"
+ "d '${cfg.dataDir}/.config' 0770 ${cfg.user} ${cfg.group}"
+ "d '${cfg.dataDir}/.config/deluge' 0770 ${cfg.user} ${cfg.group}"
+ ]
+ ++ optional (cfg.config ? download_location)
"d '${cfg.config.download_location}' 0770 ${cfg.user} ${cfg.group}"
- ++ optional (cfg.config ? "torrentfiles_location")
+ ++ optional (cfg.config ? torrentfiles_location)
"d '${cfg.config.torrentfiles_location}' 0770 ${cfg.user} ${cfg.group}"
- ++ optional (cfg.config ? "move_completed_path")
+ ++ optional (cfg.config ? move_completed_path)
"d '${cfg.config.move_completed_path}' 0770 ${cfg.user} ${cfg.group}";
systemd.services.deluged = {
@@ -237,7 +241,6 @@ in {
group = cfg.group;
uid = config.ids.uids.deluge;
home = cfg.dataDir;
- createHome = true;
description = "Deluge Daemon user";
};
};
diff --git a/nixos/modules/services/torrent/flexget.nix b/nixos/modules/services/torrent/flexget.nix
index ca63f529a5df..6ac85f8fa178 100644
--- a/nixos/modules/services/torrent/flexget.nix
+++ b/nixos/modules/services/torrent/flexget.nix
@@ -19,7 +19,7 @@ in {
user = mkOption {
default = "deluge";
example = "some_user";
- type = types.string;
+ type = types.str;
description = "The user under which to run flexget.";
};
@@ -33,7 +33,7 @@ in {
interval = mkOption {
default = "10m";
example = "1h";
- type = types.string;
+ type = types.str;
description = "When to perform a flexget run. See man 7 systemd.time for the format.";
};
diff --git a/nixos/modules/services/torrent/magnetico.nix b/nixos/modules/services/torrent/magnetico.nix
new file mode 100644
index 000000000000..02fa2ac0750a
--- /dev/null
+++ b/nixos/modules/services/torrent/magnetico.nix
@@ -0,0 +1,214 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+ cfg = config.services.magnetico;
+
+ dataDir = "/var/lib/magnetico";
+
+ credFile = with cfg.web;
+ if credentialsFile != null
+ then credentialsFile
+ else pkgs.writeText "magnetico-credentials"
+ (concatStrings (mapAttrsToList
+ (user: hash: "${user}:${hash}\n")
+ cfg.web.credentials));
+
+ # default options in magneticod/main.go
+ dbURI = concatStrings
+ [ "sqlite3://${dataDir}/database.sqlite3"
+ "?_journal_mode=WAL"
+ "&_busy_timeout=3000"
+ "&_foreign_keys=true"
+ ];
+
+ crawlerArgs = with cfg.crawler; escapeShellArgs
+ ([ "--database=${dbURI}"
+ "--indexer-addr=${address}:${toString port}"
+ "--indexer-max-neighbors=${toString maxNeighbors}"
+ "--leech-max-n=${toString maxLeeches}"
+ ] ++ extraOptions);
+
+ webArgs = with cfg.web; escapeShellArgs
+ ([ "--database=${dbURI}"
+ (if (cfg.web.credentialsFile != null || cfg.web.credentials != { })
+ then "--credentials=${toString credFile}"
+ else "--no-auth")
+ ] ++ extraOptions);
+
+in {
+
+ ###### interface
+
+ options.services.magnetico = {
+ enable = mkEnableOption "Magnetico, Bittorrent DHT crawler";
+
+ crawler.address = mkOption {
+ type = types.str;
+ default = "0.0.0.0";
+ example = "1.2.3.4";
+ description = ''
+ Address to be used for indexing DHT nodes.
+ '';
+ };
+
+ crawler.port = mkOption {
+ type = types.port;
+ default = 0;
+ description = ''
+ Port to be used for indexing DHT nodes.
+ This port should be added to
+ .
+ '';
+ };
+
+ crawler.maxNeighbors = mkOption {
+ type = types.ints.positive;
+ default = 1000;
+ description = ''
+ Maximum number of simultaneous neighbors of an indexer.
+ Be careful changing this number: high values can very
+ easily cause your network to be congested or even crash
+ your router.
+ '';
+ };
+
+ crawler.maxLeeches = mkOption {
+ type = types.ints.positive;
+ default = 200;
+ description = ''
+ Maximum number of simultaneous leeches.
+ '';
+ };
+
+ crawler.extraOptions = mkOption {
+ type = types.listOf types.str;
+ default = [];
+ description = ''
+ Extra command line arguments to pass to magneticod.
+ '';
+ };
+
+ web.address = mkOption {
+ type = types.str;
+ default = "localhost";
+ example = "1.2.3.4";
+ description = ''
+ Address the web interface will listen to.
+ '';
+ };
+
+ web.port = mkOption {
+ type = types.port;
+ default = 8080;
+ description = ''
+ Port the web interface will listen to.
+ '';
+ };
+
+ web.credentials = mkOption {
+ type = types.attrsOf types.str;
+ default = {};
+ example = lib.literalExample ''
+ {
+ myuser = "$2y$12$YE01LZ8jrbQbx6c0s2hdZO71dSjn2p/O9XsYJpz.5968yCysUgiaG";
+ }
+ '';
+ description = ''
+ The credentials to access the web interface, in case authentication is
+ enabled, in the format username:hash. If unset no
+ authentication will be required.
+
+ Usernames must start with a lowercase ([a-z]) ASCII character, might
+ contain non-consecutive underscores except at the end, and consists of
+ small-case a-z characters and digits 0-9. The
+ htpasswd tool from the apacheHttpd
+ package may be used to generate the hash: htpasswd
+ -bnBC 12 username password
+
+
+
+ The hashes will be stored world-readable in the nix store.
+ Consider using the credentialsFile option if you
+ don't want this.
+
+
+ '';
+ };
+
+ web.credentialsFile = mkOption {
+ type = types.nullOr types.path;
+ default = null;
+ description = ''
+ The path to the file holding the credentials to access the web
+ interface. If unset no authentication will be required.
+
+ The file must constain user names and password hashes in the format
+ username:hash , one for each line. Usernames must
+ start with a lowecase ([a-z]) ASCII character, might contain
+ non-consecutive underscores except at the end, and consists of
+ small-case a-z characters and digits 0-9.
+ The htpasswd tool from the apacheHttpd
+ package may be used to generate the hash:
+ htpasswd -bnBC 12 username password
+ '';
+ };
+
+ web.extraOptions = mkOption {
+ type = types.listOf types.str;
+ default = [];
+ description = ''
+ Extra command line arguments to pass to magneticow.
+ '';
+ };
+
+ };
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ users.users.magnetico = {
+ description = "Magnetico daemons user";
+ };
+
+ systemd.services.magneticod = {
+ description = "Magnetico DHT crawler";
+ wantedBy = [ "multi-user.target" ];
+ after = [ "network-online.target" ];
+
+ serviceConfig = {
+ User = "magnetico";
+ Restart = "on-failure";
+ ExecStart = "${pkgs.magnetico}/bin/magneticod ${crawlerArgs}";
+ };
+ };
+
+ systemd.services.magneticow = {
+ description = "Magnetico web interface";
+ wantedBy = [ "multi-user.target" ];
+ after = [ "network-online.target" "magneticod.service"];
+
+ serviceConfig = {
+ User = "magnetico";
+ StateDirectory = "magnetico";
+ Restart = "on-failure";
+ ExecStart = "${pkgs.magnetico}/bin/magneticow ${webArgs}";
+ };
+ };
+
+ assertions =
+ [
+ {
+ assertion = cfg.web.credentialsFile != null || cfg.web.credentials != { };
+ message = ''
+ The options services.magnetico.web.credentialsFile and
+ services.magnetico.web.credentials are mutually exclusives.
+ '';
+ }
+ ];
+
+ };
+
+}
diff --git a/nixos/modules/services/torrent/transmission.nix b/nixos/modules/services/torrent/transmission.nix
index f544928fb6b1..7409eb8cdcbe 100644
--- a/nixos/modules/services/torrent/transmission.nix
+++ b/nixos/modules/services/torrent/transmission.nix
@@ -84,13 +84,25 @@ in
The directory where transmission will create files.
'';
};
+
+ user = mkOption {
+ type = types.str;
+ default = "transmission";
+ description = "User account under which Transmission runs.";
+ };
+
+ group = mkOption {
+ type = types.str;
+ default = "transmission";
+ description = "Group account under which Transmission runs.";
+ };
};
};
config = mkIf cfg.enable {
systemd.services.transmission = {
description = "Transmission BitTorrent Service";
- after = [ "local-fs.target" "network.target" ] ++ optional apparmor "apparmor.service";
+ after = [ "network.target" ] ++ optional apparmor "apparmor.service";
requires = mkIf apparmor [ "apparmor.service" ];
wantedBy = [ "multi-user.target" ];
@@ -99,7 +111,8 @@ in
serviceConfig.ExecStartPre = preStart;
serviceConfig.ExecStart = "${pkgs.transmission}/bin/transmission-daemon -f --port ${toString config.services.transmission.port}";
serviceConfig.ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
- serviceConfig.User = "transmission";
+ serviceConfig.User = cfg.user;
+ serviceConfig.Group = cfg.group;
# NOTE: transmission has an internal umask that also must be set (in settings.json)
serviceConfig.UMask = "0002";
};
@@ -107,14 +120,19 @@ in
# It's useful to have transmission in path, e.g. for remote control
environment.systemPackages = [ pkgs.transmission ];
- users.groups.transmission.gid = config.ids.gids.transmission;
- users.users.transmission = {
- group = "transmission";
- uid = config.ids.uids.transmission;
- description = "Transmission BitTorrent user";
- home = homeDir;
- createHome = true;
- };
+ users.users = optionalAttrs (cfg.user == "transmission") (singleton
+ { name = "transmission";
+ group = cfg.group;
+ uid = config.ids.uids.transmission;
+ description = "Transmission BitTorrent user";
+ home = homeDir;
+ createHome = true;
+ });
+
+ users.groups = optionalAttrs (cfg.group == "transmission") (singleton
+ { name = "transmission";
+ gid = config.ids.gids.transmission;
+ });
# AppArmor profile
security.apparmor.profiles = mkIf apparmor [
diff --git a/nixos/modules/services/ttys/agetty.nix b/nixos/modules/services/ttys/agetty.nix
index b50de496e975..f127d8a0276d 100644
--- a/nixos/modules/services/ttys/agetty.nix
+++ b/nixos/modules/services/ttys/agetty.nix
@@ -92,7 +92,7 @@ in
restartIfChanged = false;
};
- systemd.services."console-getty" =
+ systemd.services.console-getty =
{ serviceConfig.ExecStart = [
"" # override upstream default with an empty ExecStart
(gettyCmd "--noclear --keep-baud console 115200,38400,9600 $TERM")
diff --git a/nixos/modules/services/web-apps/atlassian/confluence.nix b/nixos/modules/services/web-apps/atlassian/confluence.nix
index cf163271d276..59185fdbd36f 100644
--- a/nixos/modules/services/web-apps/atlassian/confluence.nix
+++ b/nixos/modules/services/web-apps/atlassian/confluence.nix
@@ -142,12 +142,12 @@ in
};
config = mkIf cfg.enable {
- users.users."${cfg.user}" = {
+ users.users.${cfg.user} = {
isSystemUser = true;
group = cfg.group;
};
- users.groups."${cfg.group}" = {};
+ users.groups.${cfg.group} = {};
systemd.tmpfiles.rules = [
"d '${cfg.home}' - ${cfg.user} - - -"
diff --git a/nixos/modules/services/web-apps/atlassian/crowd.nix b/nixos/modules/services/web-apps/atlassian/crowd.nix
index 020ca8d89dbb..ceab656b15e8 100644
--- a/nixos/modules/services/web-apps/atlassian/crowd.nix
+++ b/nixos/modules/services/web-apps/atlassian/crowd.nix
@@ -110,12 +110,12 @@ in
};
config = mkIf cfg.enable {
- users.users."${cfg.user}" = {
+ users.users.${cfg.user} = {
isSystemUser = true;
group = cfg.group;
};
- users.groups."${cfg.group}" = {};
+ users.groups.${cfg.group} = {};
systemd.tmpfiles.rules = [
"d '${cfg.home}' - ${cfg.user} ${cfg.group} - -"
diff --git a/nixos/modules/services/web-apps/atlassian/jira.nix b/nixos/modules/services/web-apps/atlassian/jira.nix
index b0019e77ac27..ce04982e8a9e 100644
--- a/nixos/modules/services/web-apps/atlassian/jira.nix
+++ b/nixos/modules/services/web-apps/atlassian/jira.nix
@@ -148,12 +148,12 @@ in
};
config = mkIf cfg.enable {
- users.users."${cfg.user}" = {
+ users.users.${cfg.user} = {
isSystemUser = true;
group = cfg.group;
};
- users.groups."${cfg.group}" = {};
+ users.groups.${cfg.group} = {};
systemd.tmpfiles.rules = [
"d '${cfg.home}' - ${cfg.user} - - -"
diff --git a/nixos/modules/services/web-apps/documize.nix b/nixos/modules/services/web-apps/documize.nix
index 37359869cb64..1b90299aa23c 100644
--- a/nixos/modules/services/web-apps/documize.nix
+++ b/nixos/modules/services/web-apps/documize.nix
@@ -14,6 +14,15 @@ in {
options.services.documize = {
enable = mkEnableOption "Documize Wiki";
+ stateDirectoryName = mkOption {
+ type = types.str;
+ default = "documize";
+ description = ''
+ The name of the directory below /var/lib/private
+ where documize runs in and stores, for example, backups.
+ '';
+ };
+
package = mkOption {
type = types.package;
default = pkgs.documize-community;
@@ -132,6 +141,8 @@ in {
];
Restart = "always";
DynamicUser = "yes";
+ StateDirectory = cfg.stateDirectoryName;
+ WorkingDirectory = "/var/lib/${cfg.stateDirectoryName}";
};
};
};
diff --git a/nixos/modules/services/web-apps/frab.nix b/nixos/modules/services/web-apps/frab.nix
index e885dc69b3c0..7914e5cc0ee1 100644
--- a/nixos/modules/services/web-apps/frab.nix
+++ b/nixos/modules/services/web-apps/frab.nix
@@ -19,7 +19,7 @@ let
RAILS_SERVE_STATIC_FILES = "1";
} // cfg.extraEnvironment;
- frab-rake = pkgs.stdenv.mkDerivation rec {
+ frab-rake = pkgs.stdenv.mkDerivation {
name = "frab-rake";
buildInputs = [ package.env pkgs.makeWrapper ];
phases = "installPhase fixupPhase";
diff --git a/nixos/modules/services/web-apps/icingaweb2/icingaweb2.nix b/nixos/modules/services/web-apps/icingaweb2/icingaweb2.nix
index 910e1d937bf3..d9ad7e9e3d39 100644
--- a/nixos/modules/services/web-apps/icingaweb2/icingaweb2.nix
+++ b/nixos/modules/services/web-apps/icingaweb2/icingaweb2.nix
@@ -1,14 +1,16 @@
{ config, lib, pkgs, ... }: with lib; let
cfg = config.services.icingaweb2;
+ fpm = config.services.phpfpm.pools.${poolName};
poolName = "icingaweb2";
- phpfpmSocketName = "/var/run/phpfpm/${poolName}.sock";
defaultConfig = {
global = {
- module_path = "${pkgs.icingaweb2}/modules${optionalString (builtins.length config.modulePath > 0) ":${concatStringsSep ":" config.modulePath}"}";
+ module_path = "${pkgs.icingaweb2}/modules";
};
};
in {
+ meta.maintainers = with maintainers; [ das_j ];
+
options.services.icingaweb2 = with types; {
enable = mkEnableOption "the icingaweb2 web interface";
@@ -162,33 +164,32 @@ in {
};
config = mkIf cfg.enable {
- services.phpfpm.poolConfigs = mkIf (cfg.pool == "${poolName}") {
- "${poolName}" = ''
- listen = "${phpfpmSocketName}"
- listen.owner = nginx
- listen.group = nginx
- listen.mode = 0600
- user = icingaweb2
- pm = dynamic
- pm.max_children = 75
- pm.start_servers = 2
- pm.min_spare_servers = 2
- pm.max_spare_servers = 10
- '';
+ services.phpfpm.pools = mkIf (cfg.pool == "${poolName}") {
+ ${poolName} = {
+ user = "icingaweb2";
+ phpOptions = ''
+ extension = ${pkgs.phpPackages.imagick}/lib/php/extensions/imagick.so
+ date.timezone = "${cfg.timezone}"
+ '';
+ settings = mapAttrs (name: mkDefault) {
+ "listen.owner" = "nginx";
+ "listen.group" = "nginx";
+ "listen.mode" = "0600";
+ "pm" = "dynamic";
+ "pm.max_children" = 75;
+ "pm.start_servers" = 2;
+ "pm.min_spare_servers" = 2;
+ "pm.max_spare_servers" = 10;
+ };
+ };
};
- services.phpfpm.phpOptions = mkIf (cfg.pool == "${poolName}")
- ''
- extension = ${pkgs.phpPackages.imagick}/lib/php/extensions/imagick.so
- date.timezone = "${cfg.timezone}"
- '';
-
systemd.services."phpfpm-${poolName}".serviceConfig.ReadWritePaths = [ "/etc/icingaweb2" ];
services.nginx = {
enable = true;
virtualHosts = mkIf (cfg.virtualHost != null) {
- "${cfg.virtualHost}" = {
+ ${cfg.virtualHost} = {
root = "${pkgs.icingaweb2}/public";
extraConfig = ''
@@ -206,7 +207,7 @@ in {
include ${config.services.nginx.package}/conf/fastcgi.conf;
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
- fastcgi_pass unix:${phpfpmSocketName};
+ fastcgi_pass unix:${fpm.socket};
fastcgi_param SCRIPT_FILENAME ${pkgs.icingaweb2}/public/index.php;
'';
};
@@ -215,7 +216,7 @@ in {
# /etc/icingaweb2
environment.etc = let
- doModule = name: optionalAttrs (cfg.modules."${name}".enable) { "icingaweb2/enabledModules/${name}".source = "${pkgs.icingaweb2}/modules/${name}"; };
+ doModule = name: optionalAttrs (cfg.modules.${name}.enable) { "icingaweb2/enabledModules/${name}".source = "${pkgs.icingaweb2}/modules/${name}"; };
in {}
# Module packages
// (mapAttrs' (k: v: nameValuePair "icingaweb2/enabledModules/${k}" { source = v; }) cfg.modulePackages)
diff --git a/nixos/modules/services/web-apps/icingaweb2/module-monitoring.nix b/nixos/modules/services/web-apps/icingaweb2/module-monitoring.nix
index 167e5e389568..e9c1d4ffe5ea 100644
--- a/nixos/modules/services/web-apps/icingaweb2/module-monitoring.nix
+++ b/nixos/modules/services/web-apps/icingaweb2/module-monitoring.nix
@@ -58,7 +58,7 @@ in {
};
backends = mkOption {
- default = { "icinga" = { resource = "icinga_ido"; }; };
+ default = { icinga = { resource = "icinga_ido"; }; };
description = "Monitoring backends to define";
type = attrsOf (submodule ({ name, ... }: {
options = {
diff --git a/nixos/modules/services/web-apps/limesurvey.nix b/nixos/modules/services/web-apps/limesurvey.nix
index 5b2f3875aaa9..68b57a9b90dd 100644
--- a/nixos/modules/services/web-apps/limesurvey.nix
+++ b/nixos/modules/services/web-apps/limesurvey.nix
@@ -14,7 +14,7 @@ let
pkg = pkgs.limesurvey;
- configType = with types; either (either (attrsOf configType) str) (either int bool) // {
+ configType = with types; oneOf [ (attrsOf configType) str int bool ] // {
description = "limesurvey config type (str, int, bool or attribute set thereof)";
};
@@ -120,15 +120,15 @@ in
};
poolConfig = mkOption {
- type = types.lines;
- default = ''
- pm = dynamic
- pm.max_children = 32
- pm.start_servers = 2
- pm.min_spare_servers = 2
- pm.max_spare_servers = 4
- pm.max_requests = 500
- '';
+ type = with types; attrsOf (oneOf [ str int bool ]);
+ default = {
+ "pm" = "dynamic";
+ "pm.max_children" = 32;
+ "pm.start_servers" = 2;
+ "pm.min_spare_servers" = 2;
+ "pm.max_spare_servers" = 4;
+ "pm.max_requests" = 500;
+ };
description = ''
Options for the LimeSurvey PHP pool. See the documentation on php-fpm.conf
for details on configuration directives.
@@ -203,17 +203,12 @@ in
};
services.phpfpm.pools.limesurvey = {
- listen = "/run/phpfpm/limesurvey.sock";
- extraConfig = ''
- listen.owner = ${config.services.httpd.user};
- listen.group = ${config.services.httpd.group};
- user = ${user};
- group = ${group};
-
- env[LIMESURVEY_CONFIG] = ${limesurveyConfig}
-
- ${cfg.poolConfig}
- '';
+ inherit user group;
+ phpEnv.LIMESURVEY_CONFIG = "${limesurveyConfig}";
+ settings = {
+ "listen.owner" = config.services.httpd.user;
+ "listen.group" = config.services.httpd.group;
+ } // cfg.poolConfig;
};
services.httpd = {
@@ -241,7 +236,7 @@ in
- SetHandler "proxy:unix:${fpm.listen}|fcgi://localhost/"
+ SetHandler "proxy:unix:${fpm.socket}|fcgi://localhost/"
@@ -282,7 +277,7 @@ in
systemd.services.httpd.after = optional mysqlLocal "mysql.service" ++ optional pgsqlLocal "postgresql.service";
- users.users."${user}".group = group;
+ users.users.${user}.group = group;
};
}
diff --git a/nixos/modules/services/web-apps/matomo.nix b/nixos/modules/services/web-apps/matomo.nix
index 14aca45a342b..1e34aff8d171 100644
--- a/nixos/modules/services/web-apps/matomo.nix
+++ b/nixos/modules/services/web-apps/matomo.nix
@@ -105,8 +105,8 @@ in {
default = null;
example = {
serverAliases = [
- "matomo.$\{config.networking.domain\}"
- "stats.$\{config.networking.domain\}"
+ "matomo.\${config.networking.domain}"
+ "stats.\${config.networking.domain}"
];
enableACME = false;
};
@@ -115,7 +115,7 @@ in {
Either this option or the webServerUser option is mandatory.
Set this to {} to just enable the virtualHost if you don't need any customization.
If enabled, then by default, the is
- ${user}.$\{config.networking.hostName\}.$\{config.networking.domain\},
+ ''${user}.''${config.networking.hostName}.''${config.networking.domain},
SSL is active, and certificates are acquired via ACME.
If this is set to null (the default), no nginx virtualHost will be configured.
'';
@@ -176,7 +176,7 @@ in {
# Use User-Private Group scheme to protect Matomo data, but allow administration / backup via 'matomo' group
# Copy config folder
chmod g+s "${dataDir}"
- cp -r "${cfg.package}/config" "${dataDir}/"
+ cp -r "${cfg.package}/share/config" "${dataDir}/"
chmod -R u+rwX,g+rwX,o-rwx "${dataDir}"
# check whether user setup has already been done
@@ -225,22 +225,24 @@ in {
serviceConfig.UMask = "0007";
};
- services.phpfpm.poolConfigs = let
+ services.phpfpm.pools = let
# workaround for when both are null and need to generate a string,
# which is illegal, but as assertions apparently are being triggered *after* config generation,
# we have to avoid already throwing errors at this previous stage.
socketOwner = if (cfg.nginx != null) then config.services.nginx.user
else if (cfg.webServerUser != null) then cfg.webServerUser else "";
in {
- ${pool} = ''
- listen = "${phpSocket}"
- listen.owner = ${socketOwner}
- listen.group = root
- listen.mode = 0600
- user = ${user}
- env[PIWIK_USER_PATH] = ${dataDir}
- ${cfg.phpfpmProcessManagerConfig}
- '';
+ ${pool} = {
+ listen = phpSocket;
+ extraConfig = ''
+ listen.owner = ${socketOwner}
+ listen.group = root
+ listen.mode = 0600
+ user = ${user}
+ env[PIWIK_USER_PATH] = ${dataDir}
+ ${cfg.phpfpmProcessManagerConfig}
+ '';
+ };
};
@@ -273,7 +275,7 @@ in {
fastcgi_pass unix:${phpSocket};
'';
# Any other attempt to access any php files is forbidden
- locations."~* ^.+\.php$".extraConfig = ''
+ locations."~* ^.+\\.php$".extraConfig = ''
return 403;
'';
# Disallow access to unneeded directories
@@ -282,7 +284,7 @@ in {
return 403;
'';
# Disallow access to several helper files
- locations."~* \.(?:bat|git|ini|sh|txt|tpl|xml|md)$".extraConfig = ''
+ locations."~* \\.(?:bat|git|ini|sh|txt|tpl|xml|md)$".extraConfig = ''
return 403;
'';
# No crawling of this site for bots that obey robots.txt - no useful information here.
diff --git a/nixos/modules/services/web-apps/mediawiki.nix b/nixos/modules/services/web-apps/mediawiki.nix
index 5bd5977e592b..ec2568bf952d 100644
--- a/nixos/modules/services/web-apps/mediawiki.nix
+++ b/nixos/modules/services/web-apps/mediawiki.nix
@@ -312,17 +312,17 @@ in
};
poolConfig = mkOption {
- type = types.lines;
- default = ''
- pm = dynamic
- pm.max_children = 32
- pm.start_servers = 2
- pm.min_spare_servers = 2
- pm.max_spare_servers = 4
- pm.max_requests = 500
- '';
+ type = with types; attrsOf (oneOf [ str int bool ]);
+ default = {
+ "pm" = "dynamic";
+ "pm.max_children" = 32;
+ "pm.start_servers" = 2;
+ "pm.min_spare_servers" = 2;
+ "pm.max_spare_servers" = 4;
+ "pm.max_requests" = 500;
+ };
description = ''
- Options for MediaWiki's PHP pool. See the documentation on php-fpm.conf
+ Options for the MediaWiki PHP pool. See the documentation on php-fpm.conf
for details on configuration directives.
'';
};
@@ -379,17 +379,12 @@ in
};
services.phpfpm.pools.mediawiki = {
- listen = "/run/phpfpm/mediawiki.sock";
- extraConfig = ''
- listen.owner = ${config.services.httpd.user}
- listen.group = ${config.services.httpd.group}
- user = ${user}
- group = ${group}
-
- env[MEDIAWIKI_CONFIG] = ${mediawikiConfig}
-
- ${cfg.poolConfig}
- '';
+ inherit user group;
+ phpEnv.MEDIAWIKI_CONFIG = "${mediawikiConfig}";
+ settings = {
+ "listen.owner" = config.services.httpd.user;
+ "listen.group" = config.services.httpd.group;
+ } // cfg.poolConfig;
};
services.httpd = {
@@ -403,7 +398,7 @@ in
- SetHandler "proxy:unix:${fpm.listen}|fcgi://localhost/"
+ SetHandler "proxy:unix:${fpm.socket}|fcgi://localhost/"
diff --git a/nixos/modules/services/web-apps/moodle.nix b/nixos/modules/services/web-apps/moodle.nix
new file mode 100644
index 000000000000..211bc17ee192
--- /dev/null
+++ b/nixos/modules/services/web-apps/moodle.nix
@@ -0,0 +1,315 @@
+{ config, lib, pkgs, ... }:
+
+let
+ inherit (lib) mkDefault mkEnableOption mkForce mkIf mkMerge mkOption types;
+ inherit (lib) concatStringsSep literalExample mapAttrsToList optional optionalString;
+
+ cfg = config.services.moodle;
+ fpm = config.services.phpfpm.pools.moodle;
+
+ user = "moodle";
+ group = config.services.httpd.group;
+ stateDir = "/var/lib/moodle";
+
+ moodleConfig = pkgs.writeText "config.php" ''
+ dbtype = '${ { mysql = "mariadb"; pgsql = "pgsql"; }.${cfg.database.type} }';
+ $CFG->dblibrary = 'native';
+ $CFG->dbhost = '${cfg.database.host}';
+ $CFG->dbname = '${cfg.database.name}';
+ $CFG->dbuser = '${cfg.database.user}';
+ ${optionalString (cfg.database.passwordFile != null) "$CFG->dbpass = file_get_contents('${cfg.database.passwordFile}');"}
+ $CFG->prefix = 'mdl_';
+ $CFG->dboptions = array (
+ 'dbpersist' => 0,
+ 'dbport' => '${toString cfg.database.port}',
+ ${optionalString (cfg.database.socket != null) "'dbsocket' => '${cfg.database.socket}',"}
+ 'dbcollation' => 'utf8mb4_unicode_ci',
+ );
+
+ $CFG->wwwroot = '${if cfg.virtualHost.enableSSL then "https" else "http"}://${cfg.virtualHost.hostName}';
+ $CFG->dataroot = '${stateDir}';
+ $CFG->admin = 'admin';
+
+ $CFG->directorypermissions = 02777;
+ $CFG->disableupdateautodeploy = true;
+
+ $CFG->pathtogs = '${pkgs.ghostscript}/bin/gs';
+ $CFG->pathtophp = '${pkgs.php}/bin/php';
+ $CFG->pathtodu = '${pkgs.coreutils}/bin/du';
+ $CFG->aspellpath = '${pkgs.aspell}/bin/aspell';
+ $CFG->pathtodot = '${pkgs.graphviz}/bin/dot';
+
+ ${cfg.extraConfig}
+
+ require_once('${cfg.package}/share/moodle/lib/setup.php');
+
+ // There is no php closing tag in this file,
+ // it is intentional because it prevents trailing whitespace problems!
+ '';
+
+ mysqlLocal = cfg.database.createLocally && cfg.database.type == "mysql";
+ pgsqlLocal = cfg.database.createLocally && cfg.database.type == "pgsql";
+in
+{
+ # interface
+ options.services.moodle = {
+ enable = mkEnableOption "Moodle web application";
+
+ package = mkOption {
+ type = types.package;
+ default = pkgs.moodle;
+ defaultText = "pkgs.moodle";
+ description = "The Moodle package to use.";
+ };
+
+ initialPassword = mkOption {
+ type = types.str;
+ example = "correcthorsebatterystaple";
+ description = ''
+ Specifies the initial password for the admin, i.e. the password assigned if the user does not already exist.
+ The password specified here is world-readable in the Nix store, so it should be changed promptly.
+ '';
+ };
+
+ database = {
+ type = mkOption {
+ type = types.enum [ "mysql" "pgsql" ];
+ default = "mysql";
+ description = ''Database engine to use.'';
+ };
+
+ host = mkOption {
+ type = types.str;
+ default = "localhost";
+ description = "Database host address.";
+ };
+
+ port = mkOption {
+ type = types.int;
+ description = "Database host port.";
+ default = {
+ mysql = 3306;
+ pgsql = 5432;
+ }.${cfg.database.type};
+ defaultText = "3306";
+ };
+
+ name = mkOption {
+ type = types.str;
+ default = "moodle";
+ description = "Database name.";
+ };
+
+ user = mkOption {
+ type = types.str;
+ default = "moodle";
+ description = "Database user.";
+ };
+
+ passwordFile = mkOption {
+ type = types.nullOr types.path;
+ default = null;
+ example = "/run/keys/moodle-dbpassword";
+ description = ''
+ A file containing the password corresponding to
+ .
+ '';
+ };
+
+ socket = mkOption {
+ type = types.nullOr types.path;
+ default =
+ if mysqlLocal then "/run/mysqld/mysqld.sock"
+ else if pgsqlLocal then "/run/postgresql"
+ else null;
+ defaultText = "/run/mysqld/mysqld.sock";
+ description = "Path to the unix socket file to use for authentication.";
+ };
+
+ createLocally = mkOption {
+ type = types.bool;
+ default = true;
+ description = "Create the database and database user locally.";
+ };
+ };
+
+ virtualHost = mkOption {
+ type = types.submodule ({
+ options = import ../web-servers/apache-httpd/per-server-options.nix {
+ inherit lib;
+ forMainServer = false;
+ };
+ });
+ example = {
+ hostName = "moodle.example.org";
+ enableSSL = true;
+ adminAddr = "webmaster@example.org";
+ sslServerCert = "/var/lib/acme/moodle.example.org/full.pem";
+ sslServerKey = "/var/lib/acme/moodle.example.org/key.pem";
+ };
+ description = ''
+ Apache configuration can be done by adapting .
+ See for further information.
+ '';
+ };
+
+ poolConfig = mkOption {
+ type = with types; attrsOf (oneOf [ str int bool ]);
+ default = {
+ "pm" = "dynamic";
+ "pm.max_children" = 32;
+ "pm.start_servers" = 2;
+ "pm.min_spare_servers" = 2;
+ "pm.max_spare_servers" = 4;
+ "pm.max_requests" = 500;
+ };
+ description = ''
+ Options for the Moodle PHP pool. See the documentation on php-fpm.conf
+ for details on configuration directives.
+ '';
+ };
+
+ extraConfig = mkOption {
+ type = types.lines;
+ default = "";
+ description = ''
+ Any additional text to be appended to the config.php
+ configuration file. This is a PHP script. For configuration
+ details, see .
+ '';
+ example = ''
+ $CFG->disableupdatenotifications = true;
+ '';
+ };
+ };
+
+ # implementation
+ config = mkIf cfg.enable {
+
+ assertions = [
+ { assertion = cfg.database.createLocally -> cfg.database.user == user;
+ message = "services.moodle.database.user must be set to ${user} if services.moodle.database.createLocally is set true";
+ }
+ { assertion = cfg.database.createLocally -> cfg.database.passwordFile == null;
+ message = "a password cannot be specified if services.moodle.database.createLocally is set to true";
+ }
+ ];
+
+ services.mysql = mkIf mysqlLocal {
+ enable = true;
+ package = mkDefault pkgs.mariadb;
+ ensureDatabases = [ cfg.database.name ];
+ ensureUsers = [
+ { name = cfg.database.user;
+ ensurePermissions = {
+ "${cfg.database.name}.*" = "SELECT, INSERT, UPDATE, DELETE, CREATE, CREATE TEMPORARY TABLES, DROP, INDEX, ALTER";
+ };
+ }
+ ];
+ };
+
+ services.postgresql = mkIf pgsqlLocal {
+ enable = true;
+ ensureDatabases = [ cfg.database.name ];
+ ensureUsers = [
+ { name = cfg.database.user;
+ ensurePermissions = { "DATABASE ${cfg.database.name}" = "ALL PRIVILEGES"; };
+ }
+ ];
+ };
+
+ services.phpfpm.pools.moodle = {
+ inherit user group;
+ phpEnv.MOODLE_CONFIG = "${moodleConfig}";
+ phpOptions = ''
+ zend_extension = opcache.so
+ opcache.enable = 1
+ '';
+ settings = {
+ "listen.owner" = config.services.httpd.user;
+ "listen.group" = config.services.httpd.group;
+ } // cfg.poolConfig;
+ };
+
+ services.httpd = {
+ enable = true;
+ adminAddr = mkDefault cfg.virtualHost.adminAddr;
+ extraModules = [ "proxy_fcgi" ];
+ virtualHosts = [ (mkMerge [
+ cfg.virtualHost {
+ documentRoot = mkForce "${cfg.package}/share/moodle";
+ extraConfig = ''
+
+
+
+ SetHandler "proxy:unix:${fpm.socket}|fcgi://localhost/"
+
+
+ Options -Indexes
+ DirectoryIndex index.php
+
+ '';
+ }
+ ]) ];
+ };
+
+ systemd.tmpfiles.rules = [
+ "d '${stateDir}' 0750 ${user} ${group} - -"
+ ];
+
+ systemd.services.moodle-init = {
+ wantedBy = [ "multi-user.target" ];
+ before = [ "phpfpm-moodle.service" ];
+ after = optional mysqlLocal "mysql.service" ++ optional pgsqlLocal "postgresql.service";
+ environment.MOODLE_CONFIG = moodleConfig;
+ script = ''
+ ${pkgs.php}/bin/php ${cfg.package}/share/moodle/admin/cli/check_database_schema.php && rc=$? || rc=$?
+
+ [ "$rc" == 1 ] && ${pkgs.php}/bin/php ${cfg.package}/share/moodle/admin/cli/upgrade.php \
+ --non-interactive \
+ --allow-unstable
+
+ [ "$rc" == 2 ] && ${pkgs.php}/bin/php ${cfg.package}/share/moodle/admin/cli/install_database.php \
+ --agree-license \
+ --adminpass=${cfg.initialPassword}
+
+ true
+ '';
+ serviceConfig = {
+ User = user;
+ Group = group;
+ Type = "oneshot";
+ };
+ };
+
+ systemd.services.moodle-cron = {
+ description = "Moodle cron service";
+ after = [ "moodle-init.service" ];
+ environment.MOODLE_CONFIG = moodleConfig;
+ serviceConfig = {
+ User = user;
+ Group = group;
+ ExecStart = "${pkgs.php}/bin/php ${cfg.package}/share/moodle/admin/cli/cron.php";
+ };
+ };
+
+ systemd.timers.moodle-cron = {
+ description = "Moodle cron timer";
+ wantedBy = [ "timers.target" ];
+ timerConfig = {
+ OnCalendar = "minutely";
+ };
+ };
+
+ systemd.services.httpd.after = optional mysqlLocal "mysql.service" ++ optional pgsqlLocal "postgresql.service";
+
+ users.users.${user}.group = group;
+
+ };
+}
diff --git a/nixos/modules/services/web-apps/nextcloud.nix b/nixos/modules/services/web-apps/nextcloud.nix
index a0214a75d93e..db5dc915c89f 100644
--- a/nixos/modules/services/web-apps/nextcloud.nix
+++ b/nixos/modules/services/web-apps/nextcloud.nix
@@ -4,6 +4,7 @@ with lib;
let
cfg = config.services.nextcloud;
+ fpm = config.services.phpfpm.pools.nextcloud;
phpPackage = pkgs.php73;
phpPackages = pkgs.php73Packages;
@@ -101,10 +102,10 @@ in {
phpOptions = mkOption {
type = types.attrsOf types.str;
default = {
- "short_open_tag" = "Off";
- "expose_php" = "Off";
- "error_reporting" = "E_ALL & ~E_DEPRECATED & ~E_STRICT";
- "display_errors" = "stderr";
+ short_open_tag = "Off";
+ expose_php = "Off";
+ error_reporting = "E_ALL & ~E_DEPRECATED & ~E_STRICT";
+ display_errors = "stderr";
"opcache.enable_cli" = "1";
"opcache.interned_strings_buffer" = "8";
"opcache.max_accelerated_files" = "10000";
@@ -112,23 +113,31 @@ in {
"opcache.revalidate_freq" = "1";
"opcache.fast_shutdown" = "1";
"openssl.cafile" = "/etc/ssl/certs/ca-certificates.crt";
- "catch_workers_output" = "yes";
+ catch_workers_output = "yes";
};
description = ''
Options for PHP's php.ini file for nextcloud.
'';
};
- poolConfig = mkOption {
- type = types.lines;
- default = ''
- pm = dynamic
- pm.max_children = 32
- pm.start_servers = 2
- pm.min_spare_servers = 2
- pm.max_spare_servers = 4
- pm.max_requests = 500
+ poolSettings = mkOption {
+ type = with types; attrsOf (oneOf [ str int bool ]);
+ default = {
+ "pm" = "dynamic";
+ "pm.max_children" = "32";
+ "pm.start_servers" = "2";
+ "pm.min_spare_servers" = "2";
+ "pm.max_spare_servers" = "4";
+ "pm.max_requests" = "500";
+ };
+ description = ''
+ Options for nextcloud's PHP pool. See the documentation on php-fpm.conf for details on configuration directives.
'';
+ };
+
+ poolConfig = mkOption {
+ type = types.nullOr types.lines;
+ default = null;
description = ''
Options for nextcloud's PHP pool. See the documentation on php-fpm.conf for details on configuration directives.
'';
@@ -286,9 +295,14 @@ in {
message = "Please specify exactly one of adminpass or adminpassFile";
}
];
+
+ warnings = optional (cfg.poolConfig != null) ''
+ Using config.services.nextcloud.poolConfig is deprecated and will become unsupported in a future release.
+ Please migrate your configuration to config.services.nextcloud.poolSettings.
+ '';
}
- { systemd.timers."nextcloud-cron" = {
+ { systemd.timers.nextcloud-cron = {
wantedBy = [ "timers.target" ];
timerConfig.OnBootSec = "5m";
timerConfig.OnUnitActiveSec = "15m";
@@ -296,7 +310,7 @@ in {
};
systemd.services = {
- "nextcloud-setup" = let
+ nextcloud-setup = let
c = cfg.config;
writePhpArrary = a: "[${concatMapStringsSep "," (val: ''"${toString val}"'') a}]";
overrideConfig = pkgs.writeText "nextcloud-config.php" ''
@@ -396,13 +410,13 @@ in {
'';
serviceConfig.Type = "oneshot";
};
- "nextcloud-cron" = {
+ nextcloud-cron = {
environment.NEXTCLOUD_CONFIG_DIR = "${cfg.home}/config";
serviceConfig.Type = "oneshot";
serviceConfig.User = "nextcloud";
serviceConfig.ExecStart = "${phpPackage}/bin/php -f ${pkgs.nextcloud}/cron.php";
};
- "nextcloud-update-plugins" = mkIf cfg.autoUpdateApps.enable {
+ nextcloud-update-plugins = mkIf cfg.autoUpdateApps.enable {
serviceConfig.Type = "oneshot";
serviceConfig.ExecStart = "${occ}/bin/nextcloud-occ app:update --all";
startAt = cfg.autoUpdateApps.startAt;
@@ -410,25 +424,20 @@ in {
};
services.phpfpm = {
- pools.nextcloud = let
- phpAdminValues = (toKeyValue
- (foldr (a: b: a // b) {}
- (mapAttrsToList (k: v: { "php_admin_value[${k}]" = v; })
- phpOptions)));
- in {
- phpOptions = phpOptionsExtensions;
+ pools.nextcloud = {
+ user = "nextcloud";
+ group = "nginx";
+ phpOptions = phpOptionsExtensions + phpOptionsStr;
phpPackage = phpPackage;
- listen = "/run/phpfpm/nextcloud";
- extraConfig = ''
- listen.owner = nginx
- listen.group = nginx
- user = nextcloud
- group = nginx
- ${cfg.poolConfig}
- env[NEXTCLOUD_CONFIG_DIR] = ${cfg.home}/config
- env[PATH] = /run/wrappers/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/usr/bin:/bin
- ${phpAdminValues}
- '';
+ phpEnv = {
+ NEXTCLOUD_CONFIG_DIR = "${cfg.home}/config";
+ PATH = "/run/wrappers/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/usr/bin:/bin";
+ };
+ settings = mapAttrs (name: mkDefault) {
+ "listen.owner" = "nginx";
+ "listen.group" = "nginx";
+ } // cfg.poolSettings;
+ extraConfig = cfg.poolConfig;
};
};
@@ -445,7 +454,7 @@ in {
services.nginx = {
enable = true;
virtualHosts = {
- "${cfg.hostName}" = {
+ ${cfg.hostName} = {
root = pkgs.nextcloud;
locations = {
"= /robots.txt" = {
@@ -489,7 +498,7 @@ in {
fastcgi_param HTTPS ${if cfg.https then "on" else "off"};
fastcgi_param modHeadersAvailable true;
fastcgi_param front_controller_active true;
- fastcgi_pass unix:/run/phpfpm/nextcloud;
+ fastcgi_pass unix:${fpm.socket};
fastcgi_intercept_errors on;
fastcgi_request_buffering off;
fastcgi_read_timeout 120s;
diff --git a/nixos/modules/services/web-apps/nexus.nix b/nixos/modules/services/web-apps/nexus.nix
index 052dbed6d4f8..3af97e146d0a 100644
--- a/nixos/modules/services/web-apps/nexus.nix
+++ b/nixos/modules/services/web-apps/nexus.nix
@@ -80,14 +80,14 @@ in
};
config = mkIf cfg.enable {
- users.users."${cfg.user}" = {
+ users.users.${cfg.user} = {
isSystemUser = true;
group = cfg.group;
home = cfg.home;
createHome = true;
};
- users.groups."${cfg.group}" = {};
+ users.groups.${cfg.group} = {};
systemd.services.nexus = {
description = "Sonatype Nexus3";
diff --git a/nixos/modules/services/web-apps/pgpkeyserver-lite.nix b/nixos/modules/services/web-apps/pgpkeyserver-lite.nix
index 93f69bd12651..ad70ba70bbef 100644
--- a/nixos/modules/services/web-apps/pgpkeyserver-lite.nix
+++ b/nixos/modules/services/web-apps/pgpkeyserver-lite.nix
@@ -60,7 +60,7 @@ in
services.nginx.virtualHosts = let
hkpPort = builtins.toString cfg.hkpPort;
in {
- "${cfg.hostname}" = {
+ ${cfg.hostname} = {
root = webPkg;
locations = {
"/pks".extraConfig = ''
diff --git a/nixos/modules/services/web-apps/restya-board.nix b/nixos/modules/services/web-apps/restya-board.nix
index b200a89260ac..2c2f36ac598a 100644
--- a/nixos/modules/services/web-apps/restya-board.nix
+++ b/nixos/modules/services/web-apps/restya-board.nix
@@ -9,11 +9,11 @@ with lib;
let
cfg = config.services.restya-board;
+ fpm = config.services.phpfpm.pools.${poolName};
runDir = "/run/restya-board";
poolName = "restya-board";
- phpfpmSocketName = "/run/phpfpm/${poolName}.sock";
in
@@ -179,8 +179,9 @@ in
config = mkIf cfg.enable {
services.phpfpm.pools = {
- "${poolName}" = {
- listen = phpfpmSocketName;
+ ${poolName} = {
+ inherit (cfg) user group;
+
phpOptions = ''
date.timezone = "CET"
@@ -191,25 +192,23 @@ in
auth_password = ${cfg.email.password}
''}
'';
- extraConfig = ''
- listen.owner = nginx
- listen.group = nginx
- listen.mode = 0600
- user = ${cfg.user}
- group = ${cfg.group}
- pm = dynamic
- pm.max_children = 75
- pm.start_servers = 10
- pm.min_spare_servers = 5
- pm.max_spare_servers = 20
- pm.max_requests = 500
- catch_workers_output = 1
- '';
+ settings = mapAttrs (name: mkDefault) {
+ "listen.owner" = "nginx";
+ "listen.group" = "nginx";
+ "listen.mode" = "0600";
+ "pm" = "dynamic";
+ "pm.max_children" = 75;
+ "pm.start_servers" = 10;
+ "pm.min_spare_servers" = 5;
+ "pm.max_spare_servers" = 20;
+ "pm.max_requests" = 500;
+ "catch_workers_output" = 1;
+ };
};
};
services.nginx.enable = true;
- services.nginx.virtualHosts."${cfg.virtualHost.serverName}" = {
+ services.nginx.virtualHosts.${cfg.virtualHost.serverName} = {
listen = [ { addr = cfg.virtualHost.listenHost; port = cfg.virtualHost.listenPort; } ];
serverName = cfg.virtualHost.serverName;
root = runDir;
@@ -217,7 +216,6 @@ in
index index.html index.php;
gzip on;
- gzip_disable "msie6";
gzip_comp_level 6;
gzip_min_length 1100;
@@ -237,18 +235,18 @@ in
locations."/".root = "${runDir}/client";
- locations."~ \.php$" = {
+ locations."~ \\.php$" = {
tryFiles = "$uri =404";
extraConfig = ''
include ${pkgs.nginx}/conf/fastcgi_params;
- fastcgi_pass unix:${phpfpmSocketName};
+ fastcgi_pass unix:${fpm.socket};
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PHP_VALUE "upload_max_filesize=9G \n post_max_size=9G \n max_execution_time=200 \n max_input_time=200 \n memory_limit=256M";
'';
};
- locations."~* \.(css|js|less|html|ttf|woff|jpg|jpeg|gif|png|bmp|ico)" = {
+ locations."~* \\.(css|js|less|html|ttf|woff|jpg|jpeg|gif|png|bmp|ico)" = {
root = "${runDir}/client";
extraConfig = ''
if (-f $request_filename) {
diff --git a/nixos/modules/services/web-apps/selfoss.nix b/nixos/modules/services/web-apps/selfoss.nix
index cd0f743a5fb8..d5a660ebf289 100644
--- a/nixos/modules/services/web-apps/selfoss.nix
+++ b/nixos/modules/services/web-apps/selfoss.nix
@@ -4,7 +4,6 @@ let
cfg = config.services.selfoss;
poolName = "selfoss_pool";
- phpfpmSocketName = "/run/phpfpm/${poolName}.sock";
dataDir = "/var/lib/selfoss";
@@ -115,22 +114,22 @@ in
};
config = mkIf cfg.enable {
-
- services.phpfpm.poolConfigs = mkIf (cfg.pool == "${poolName}") {
- "${poolName}" = ''
- listen = "${phpfpmSocketName}";
- listen.owner = nginx
- listen.group = nginx
- listen.mode = 0600
- user = nginx
- pm = dynamic
- pm.max_children = 75
- pm.start_servers = 10
- pm.min_spare_servers = 5
- pm.max_spare_servers = 20
- pm.max_requests = 500
- catch_workers_output = 1
- '';
+ services.phpfpm.pools = mkIf (cfg.pool == "${poolName}") {
+ ${poolName} = {
+ user = "nginx";
+ settings = mapAttrs (name: mkDefault) {
+ "listen.owner" = "nginx";
+ "listen.group" = "nginx";
+ "listen.mode" = "0600";
+ "pm" = "dynamic";
+ "pm.max_children" = 75;
+ "pm.start_servers" = 10;
+ "pm.min_spare_servers" = 5;
+ "pm.max_spare_servers" = 20;
+ "pm.max_requests" = 500;
+ "catch_workers_output" = 1;
+ };
+ };
};
systemd.services.selfoss-config = {
diff --git a/nixos/modules/services/web-apps/shiori.nix b/nixos/modules/services/web-apps/shiori.nix
new file mode 100644
index 000000000000..1817a2039352
--- /dev/null
+++ b/nixos/modules/services/web-apps/shiori.nix
@@ -0,0 +1,50 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+let
+ cfg = config.services.shiori;
+in {
+ options = {
+ services.shiori = {
+ enable = mkEnableOption "Shiori simple bookmarks manager";
+
+ package = mkOption {
+ type = types.package;
+ default = pkgs.shiori;
+ defaultText = "pkgs.shiori";
+ description = "The Shiori package to use.";
+ };
+
+ address = mkOption {
+ type = types.str;
+ default = "";
+ description = ''
+ The IP address on which Shiori will listen.
+ If empty, listens on all interfaces.
+ '';
+ };
+
+ port = mkOption {
+ type = types.port;
+ default = 8080;
+ description = "The port of the Shiori web application";
+ };
+ };
+ };
+
+ config = mkIf cfg.enable {
+ systemd.services.shiori = with cfg; {
+ description = "Shiori simple bookmarks manager";
+ wantedBy = [ "multi-user.target" ];
+
+ serviceConfig = {
+ ExecStart = "${package}/bin/shiori serve --address '${address}' --port '${toString port}'";
+ DynamicUser = true;
+ Environment = "SHIORI_DIR=/var/lib/shiori";
+ StateDirectory = "shiori";
+ };
+ };
+ };
+
+ meta.maintainers = with maintainers; [ minijackson ];
+}
diff --git a/nixos/modules/services/web-apps/tt-rss.nix b/nixos/modules/services/web-apps/tt-rss.nix
index 1bd9de93735d..b92e34498949 100644
--- a/nixos/modules/services/web-apps/tt-rss.nix
+++ b/nixos/modules/services/web-apps/tt-rss.nix
@@ -520,21 +520,20 @@ let
];
services.phpfpm.pools = mkIf (cfg.pool == "${poolName}") {
- "${poolName}" = {
- listen = "/var/run/phpfpm/${poolName}.sock";
- extraConfig = ''
- listen.owner = nginx
- listen.group = nginx
- listen.mode = 0600
- user = ${cfg.user}
- pm = dynamic
- pm.max_children = 75
- pm.start_servers = 10
- pm.min_spare_servers = 5
- pm.max_spare_servers = 20
- pm.max_requests = 500
- catch_workers_output = 1
- '';
+ ${poolName} = {
+ inherit (cfg) user;
+ settings = mapAttrs (name: mkDefault) {
+ "listen.owner" = "nginx";
+ "listen.group" = "nginx";
+ "listen.mode" = "0600";
+ "pm" = "dynamic";
+ "pm.max_children" = 75;
+ "pm.start_servers" = 10;
+ "pm.min_spare_servers" = 5;
+ "pm.max_spare_servers" = 20;
+ "pm.max_requests" = 500;
+ "catch_workers_output" = 1;
+ };
};
};
@@ -542,17 +541,17 @@ let
services.nginx = mkIf (cfg.virtualHost != null) {
enable = true;
virtualHosts = {
- "${cfg.virtualHost}" = {
+ ${cfg.virtualHost} = {
root = "${cfg.root}";
locations."/" = {
index = "index.php";
};
- locations."~ \.php$" = {
+ locations."~ \\.php$" = {
extraConfig = ''
fastcgi_split_path_info ^(.+\.php)(/.+)$;
- fastcgi_pass unix:${config.services.phpfpm.pools.${cfg.pool}.listen};
+ fastcgi_pass unix:${config.services.phpfpm.pools.${cfg.pool}.socket};
fastcgi_index index.php;
'';
};
diff --git a/nixos/modules/services/web-apps/wordpress.nix b/nixos/modules/services/web-apps/wordpress.nix
index 624b0089a037..e311dd917dd0 100644
--- a/nixos/modules/services/web-apps/wordpress.nix
+++ b/nixos/modules/services/web-apps/wordpress.nix
@@ -61,6 +61,19 @@ let
?>
'';
+ secretsVars = [ "AUTH_KEY" "SECURE_AUTH_KEY" "LOOGGED_IN_KEY" "NONCE_KEY" "AUTH_SALT" "SECURE_AUTH_SALT" "LOGGED_IN_SALT" "NONCE_SALT" ];
+ secretsScript = hostStateDir: ''
+ if ! test -e "${hostStateDir}/secret-keys.php"; then
+ umask 0177
+ echo "> "${hostStateDir}/secret-keys.php"
+ ${concatMapStringsSep "\n" (var: ''
+ echo "define('${var}', '`tr -dc a-zA-Z0-9 > "${hostStateDir}/secret-keys.php"
+ '') secretsVars}
+ echo "?>" >> "${hostStateDir}/secret-keys.php"
+ chmod 440 "${hostStateDir}/secret-keys.php"
+ fi
+ '';
+
siteOpts = { lib, name, ... }:
{
options = {
@@ -133,7 +146,7 @@ let
'';
};
- database = rec {
+ database = {
host = mkOption {
type = types.str;
default = "localhost";
@@ -216,15 +229,15 @@ let
};
poolConfig = mkOption {
- type = types.lines;
- default = ''
- pm = dynamic
- pm.max_children = 32
- pm.start_servers = 2
- pm.min_spare_servers = 2
- pm.max_spare_servers = 4
- pm.max_requests = 500
- '';
+ type = with types; attrsOf (oneOf [ str int bool ]);
+ default = {
+ "pm" = "dynamic";
+ "pm.max_children" = 32;
+ "pm.start_servers" = 2;
+ "pm.min_spare_servers" = 2;
+ "pm.max_spare_servers" = 4;
+ "pm.max_requests" = 500;
+ };
description = ''
Options for the WordPress PHP pool. See the documentation on php-fpm.conf
for details on configuration directives.
@@ -280,15 +293,11 @@ in
services.phpfpm.pools = mapAttrs' (hostName: cfg: (
nameValuePair "wordpress-${hostName}" {
- listen = "/run/phpfpm/wordpress-${hostName}.sock";
- extraConfig = ''
- listen.owner = ${config.services.httpd.user}
- listen.group = ${config.services.httpd.group}
- user = ${user}
- group = ${group}
-
- ${cfg.poolConfig}
- '';
+ inherit user group;
+ settings = {
+ "listen.owner" = config.services.httpd.user;
+ "listen.group" = config.services.httpd.group;
+ } // cfg.poolConfig;
}
)) eachSite;
@@ -303,7 +312,7 @@ in
- SetHandler "proxy:unix:/run/phpfpm/wordpress-${hostName}.sock|fcgi://localhost/"
+ SetHandler "proxy:unix:${config.services.phpfpm.pools."wordpress-${hostName}".socket}|fcgi://localhost/"
@@ -344,14 +353,7 @@ in
wantedBy = [ "multi-user.target" ];
before = [ "phpfpm-wordpress-${hostName}.service" ];
after = optional cfg.database.createLocally "mysql.service";
- script = ''
- if ! test -e "${stateDir hostName}/secret-keys.php"; then
- echo "> "${stateDir hostName}/secret-keys.php"
- ${pkgs.curl}/bin/curl -s https://api.wordpress.org/secret-key/1.1/salt/ >> "${stateDir hostName}/secret-keys.php"
- echo "?>" >> "${stateDir hostName}/secret-keys.php"
- chmod 440 "${stateDir hostName}/secret-keys.php"
- fi
- '';
+ script = secretsScript (stateDir hostName);
serviceConfig = {
Type = "oneshot";
diff --git a/nixos/modules/services/web-apps/youtrack.nix b/nixos/modules/services/web-apps/youtrack.nix
index 691cbdc8d1d5..830edac20bac 100644
--- a/nixos/modules/services/web-apps/youtrack.nix
+++ b/nixos/modules/services/web-apps/youtrack.nix
@@ -28,28 +28,28 @@ in
The interface youtrack will listen on.
'';
default = "127.0.0.1";
- type = types.string;
+ type = types.str;
};
baseUrl = mkOption {
description = ''
Base URL for youtrack. Will be auto-detected and stored in database.
'';
- type = types.nullOr types.string;
+ type = types.nullOr types.str;
default = null;
};
extraParams = mkOption {
default = {};
description = ''
- Extra parameters to pass to youtrack. See
+ Extra parameters to pass to youtrack. See
https://www.jetbrains.com/help/youtrack/standalone/YouTrack-Java-Start-Parameters.html
for more information.
'';
example = {
"jetbrains.youtrack.overrideRootPassword" = "tortuga";
};
- type = types.attrsOf types.string;
+ type = types.attrsOf types.str;
};
package = mkOption {
@@ -73,7 +73,7 @@ in
description = ''
Where to keep the youtrack database.
'';
- type = types.string;
+ type = types.path;
default = "/var/lib/youtrack";
};
@@ -83,7 +83,7 @@ in
If null, do not setup anything.
'';
default = null;
- type = types.nullOr types.string;
+ type = types.nullOr types.str;
};
jvmOpts = mkOption {
@@ -92,7 +92,7 @@ in
See https://www.jetbrains.com/help/youtrack/standalone/Configure-JVM-Options.html
for more information.
'';
- type = types.string;
+ type = types.separatedString " ";
example = "-XX:MetaspaceSize=250m";
default = "";
};
@@ -101,7 +101,7 @@ in
description = ''
Maximum Java heap size
'';
- type = types.string;
+ type = types.str;
default = "1g";
};
@@ -109,7 +109,7 @@ in
description = ''
Maximum java Metaspace memory.
'';
- type = types.string;
+ type = types.str;
default = "350m";
};
};
diff --git a/nixos/modules/services/web-apps/zabbix.nix b/nixos/modules/services/web-apps/zabbix.nix
index 4b5334579a99..09538726b7cd 100644
--- a/nixos/modules/services/web-apps/zabbix.nix
+++ b/nixos/modules/services/web-apps/zabbix.nix
@@ -16,7 +16,7 @@ let
php-fpm.conf for details on configuration directives.
'';
@@ -160,6 +160,8 @@ in
];
services.phpfpm.pools.zabbix = {
+ inherit user;
+ group = config.services.httpd.group;
phpOptions = ''
# https://www.zabbix.com/documentation/current/manual/installation/install
memory_limit = 128M
@@ -177,15 +179,11 @@ in
'' + optionalString (cfg.database.type == "oracle") ''
extension=${pkgs.phpPackages.oci8}/lib/php/extensions/oci8.so
'';
- listen = "/run/phpfpm/zabbix.sock";
- extraConfig = ''
- listen.owner = ${config.services.httpd.user};
- listen.group = ${config.services.httpd.group};
- user = ${user};
- group = ${config.services.httpd.group};
- env[ZABBIX_CONFIG] = ${zabbixConfig}
- ${cfg.poolConfig}
- '';
+ phpEnv.ZABBIX_CONFIG = "${zabbixConfig}";
+ settings = {
+ "listen.owner" = config.services.httpd.user;
+ "listen.group" = config.services.httpd.group;
+ } // cfg.poolConfig;
};
services.httpd = {
@@ -199,7 +197,7 @@ in
- SetHandler "proxy:unix:${fpm.listen}|fcgi://localhost/"
+ SetHandler "proxy:unix:${fpm.socket}|fcgi://localhost/"
AllowOverride all
diff --git a/nixos/modules/services/web-servers/apache-httpd/default.nix b/nixos/modules/services/web-servers/apache-httpd/default.nix
index ea9476a7c915..99304d0e48ae 100644
--- a/nixos/modules/services/web-servers/apache-httpd/default.nix
+++ b/nixos/modules/services/web-servers/apache-httpd/default.nix
@@ -12,7 +12,7 @@ let
php = mainCfg.phpPackage.override { apacheHttpd = httpd.dev; /* otherwise it only gets .out */ };
- phpMajorVersion = head (splitString "." php.version);
+ phpMajorVersion = lib.versions.major (lib.getVersion php);
mod_perl = pkgs.apacheHttpdPackages.mod_perl.override { apacheHttpd = httpd; };
@@ -31,70 +31,8 @@ let
extraForeignModules = filter isAttrs extraModules;
extraApacheModules = filter isString extraModules;
-
- makeServerInfo = cfg: {
- # Canonical name must not include a trailing slash.
- canonicalNames =
- let defaultPort = (head (defaultListen cfg)).port; in
- map (port:
- (if cfg.enableSSL then "https" else "http") + "://" +
- cfg.hostName +
- (if port != defaultPort then ":${toString port}" else "")
- ) (map (x: x.port) (getListen cfg));
-
- # Admin address: inherit from the main server if not specified for
- # a virtual host.
- adminAddr = if cfg.adminAddr != null then cfg.adminAddr else mainCfg.adminAddr;
-
- vhostConfig = cfg;
- serverConfig = mainCfg;
- fullConfig = config; # machine config
- };
-
-
allHosts = [mainCfg] ++ mainCfg.virtualHosts;
-
- callSubservices = serverInfo: defs:
- let f = svc:
- let
- svcFunction =
- if svc ? function then svc.function
- # instead of using serviceType="mediawiki"; you can copy mediawiki.nix to any location outside nixpkgs, modify it at will, and use serviceExpression=./mediawiki.nix;
- else if svc ? serviceExpression then import (toString svc.serviceExpression)
- else import (toString "${toString ./.}/${if svc ? serviceType then svc.serviceType else svc.serviceName}.nix");
- config = (evalModules
- { modules = [ { options = res.options; config = svc.config or svc; } ];
- check = false;
- }).config;
- defaults = {
- extraConfig = "";
- extraModules = [];
- extraModulesPre = [];
- extraPath = [];
- extraServerPath = [];
- globalEnvVars = [];
- robotsEntries = "";
- startupScript = "";
- enablePHP = false;
- enablePerl = false;
- phpOptions = "";
- options = {};
- documentRoot = null;
- };
- res = defaults // svcFunction { inherit config lib pkgs serverInfo php; };
- in res;
- in map f defs;
-
-
- # !!! callSubservices is expensive
- subservicesFor = cfg: callSubservices (makeServerInfo cfg) cfg.extraSubservices;
-
- mainSubservices = subservicesFor mainCfg;
-
- allSubservices = mainSubservices ++ concatMap subservicesFor mainCfg.virtualHosts;
-
-
enableSSL = any (vhost: vhost.enableSSL) allHosts;
@@ -188,13 +126,18 @@ let
perServerConf = isMainServer: cfg: let
- serverInfo = makeServerInfo cfg;
-
- subservices = callSubservices serverInfo cfg.extraSubservices;
+ # Canonical name must not include a trailing slash.
+ canonicalNames =
+ let defaultPort = (head (defaultListen cfg)).port; in
+ map (port:
+ (if cfg.enableSSL then "https" else "http") + "://" +
+ cfg.hostName +
+ (if port != defaultPort then ":${toString port}" else "")
+ ) (map (x: x.port) (getListen cfg));
maybeDocumentRoot = fold (svc: acc:
if acc == null then svc.documentRoot else assert svc.documentRoot == null; acc
- ) null ([ cfg ] ++ subservices);
+ ) null ([ cfg ]);
documentRoot = if maybeDocumentRoot != null then maybeDocumentRoot else
pkgs.runCommand "empty" { preferLocalBuild = true; } "mkdir -p $out";
@@ -209,15 +152,11 @@ let
'';
- robotsTxt =
- concatStringsSep "\n" (filter (x: x != "") (
- # If this is a vhost, the include the entries for the main server as well.
- (if isMainServer then [] else [mainCfg.robotsEntries] ++ map (svc: svc.robotsEntries) mainSubservices)
- ++ [cfg.robotsEntries]
- ++ (map (svc: svc.robotsEntries) subservices)));
+ # If this is a vhost, the include the entries for the main server as well.
+ robotsTxt = concatStringsSep "\n" (filter (x: x != "") ([ cfg.robotsEntries ] ++ lib.optional (!isMainServer) mainCfg.robotsEntries));
in ''
- ${concatStringsSep "\n" (map (n: "ServerName ${n}") serverInfo.canonicalNames)}
+ ${concatStringsSep "\n" (map (n: "ServerName ${n}") canonicalNames)}
${concatMapStrings (alias: "ServerAlias ${alias}\n") cfg.serverAliases}
@@ -292,8 +231,6 @@ let
in concatMapStrings makeDirConf cfg.servedDirs
}
- ${concatMapStrings (svc: svc.extraConfig) subservices}
-
${cfg.extraConfig}
'';
@@ -328,15 +265,12 @@ let
${let
load = {name, path}: "LoadModule ${name}_module ${path}\n";
- allModules =
- concatMap (svc: svc.extraModulesPre) allSubservices
- ++ map (name: {inherit name; path = "${httpd}/modules/mod_${name}.so";}) apacheModules
+ allModules = map (name: {inherit name; path = "${httpd}/modules/mod_${name}.so";}) apacheModules
++ optional mainCfg.enableMellon { name = "auth_mellon"; path = "${pkgs.apacheHttpdPackages.mod_auth_mellon}/modules/mod_auth_mellon.so"; }
- ++ optional enablePHP { name = "php${phpMajorVersion}"; path = "${php}/modules/libphp${phpMajorVersion}.so"; }
- ++ optional enablePerl { name = "perl"; path = "${mod_perl}/modules/mod_perl.so"; }
- ++ concatMap (svc: svc.extraModules) allSubservices
+ ++ optional mainCfg.enablePHP { name = "php${phpMajorVersion}"; path = "${php}/modules/libphp${phpMajorVersion}.so"; }
+ ++ optional mainCfg.enablePerl { name = "perl"; path = "${mod_perl}/modules/mod_perl.so"; }
++ extraForeignModules;
- in concatMapStrings load allModules
+ in concatMapStrings load (unique allModules)
}
AddHandler type-map var
@@ -385,17 +319,10 @@ let
}
'';
-
- enablePHP = mainCfg.enablePHP || any (svc: svc.enablePHP) allSubservices;
-
- enablePerl = mainCfg.enablePerl || any (svc: svc.enablePerl) allSubservices;
-
-
# Generate the PHP configuration file. Should probably be factored
# out into a separate module.
phpIni = pkgs.runCommand "php.ini"
- { options = concatStringsSep "\n"
- ([ mainCfg.phpOptions ] ++ (map (svc: svc.phpOptions) allSubservices));
+ { options = mainCfg.phpOptions;
preferLocalBuild = true;
}
''
@@ -408,6 +335,10 @@ in
{
+ imports = [
+ (mkRemovedOptionModule [ "services" "httpd" "extraSubservices" ] "Most existing subservices have been ported to the NixOS module system. Please update your configuration accordingly.")
+ ];
+
###### interface
options = {
@@ -637,8 +568,6 @@ in
message = "SSL is enabled for httpd, but sslServerCert and/or sslServerKey haven't been specified."; }
];
- warnings = map (cfg: "apache-httpd's extraSubservices option is deprecated. Most existing subservices have been ported to the NixOS module system. Please update your configuration accordingly.") (lib.filter (cfg: cfg.extraSubservices != []) allHosts);
-
users.users = optionalAttrs (mainCfg.user == "wwwrun") (singleton
{ name = "wwwrun";
group = mainCfg.group;
@@ -651,7 +580,7 @@ in
gid = config.ids.gids.wwwrun;
});
- environment.systemPackages = [httpd] ++ concatMap (svc: svc.extraPath) allSubservices;
+ environment.systemPackages = [httpd];
services.httpd.phpOptions =
''
@@ -670,18 +599,15 @@ in
{ description = "Apache HTTPD";
wantedBy = [ "multi-user.target" ];
- wants = [ "keys.target" ];
- after = [ "network.target" "fs.target" "keys.target" ];
+ after = [ "network.target" "fs.target" ];
path =
[ httpd pkgs.coreutils pkgs.gnugrep ]
- ++ optional enablePHP pkgs.system-sendmail # Needed for PHP's mail() function.
- ++ concatMap (svc: svc.extraServerPath) allSubservices;
+ ++ optional mainCfg.enablePHP pkgs.system-sendmail; # Needed for PHP's mail() function.
environment =
- optionalAttrs enablePHP { PHPRC = phpIni; }
- // optionalAttrs mainCfg.enableMellon { LD_LIBRARY_PATH = "${pkgs.xmlsec}/lib"; }
- // (listToAttrs (concatMap (svc: svc.globalEnvVars) allSubservices));
+ optionalAttrs mainCfg.enablePHP { PHPRC = phpIni; }
+ // optionalAttrs mainCfg.enableMellon { LD_LIBRARY_PATH = "${pkgs.xmlsec}/lib"; };
preStart =
''
@@ -699,12 +625,6 @@ in
for i in $(${pkgs.utillinux}/bin/ipcs -s | grep ' ${mainCfg.user} ' | cut -f2 -d ' '); do
${pkgs.utillinux}/bin/ipcrm -s $i
done
-
- # Run the startup hooks for the subservices.
- for i in ${toString (map (svn: svn.startupScript) allSubservices)}; do
- echo Running Apache startup hook $i...
- $i
- done
'';
serviceConfig.ExecStart = "@${httpd}/bin/httpd httpd -f ${httpdConf}";
diff --git a/nixos/modules/services/web-servers/apache-httpd/per-server-options.nix b/nixos/modules/services/web-servers/apache-httpd/per-server-options.nix
index 536e707137c6..c36207d54607 100644
--- a/nixos/modules/services/web-servers/apache-httpd/per-server-options.nix
+++ b/nixos/modules/services/web-servers/apache-httpd/per-server-options.nix
@@ -33,7 +33,7 @@ with lib;
description = "port to listen on";
};
ip = mkOption {
- type = types.string;
+ type = types.str;
default = "*";
description = "Ip to listen on. 0.0.0.0 for ipv4 only, * for all.";
};
@@ -133,12 +133,6 @@ with lib;
'';
};
- extraSubservices = mkOption {
- type = types.listOf types.unspecified;
- default = [];
- description = "Extra subservices to enable in the webserver.";
- };
-
enableUserDir = mkOption {
type = types.bool;
default = false;
diff --git a/nixos/modules/services/web-servers/caddy.nix b/nixos/modules/services/web-servers/caddy.nix
index d0b936cb019f..132c50735d96 100644
--- a/nixos/modules/services/web-servers/caddy.nix
+++ b/nixos/modules/services/web-servers/caddy.nix
@@ -27,13 +27,13 @@ in {
ca = mkOption {
default = "https://acme-v02.api.letsencrypt.org/directory";
example = "https://acme-staging-v02.api.letsencrypt.org/directory";
- type = types.string;
+ type = types.str;
description = "Certificate authority ACME server. The default (Let's Encrypt production server) should be fine for most people.";
};
email = mkOption {
default = "";
- type = types.string;
+ type = types.str;
description = "Email address (for Let's Encrypt certificate)";
};
@@ -70,7 +70,7 @@ in {
{ CADDYPATH = cfg.dataDir; };
serviceConfig = {
ExecStart = ''
- ${cfg.package.bin}/bin/caddy -root=/var/tmp -conf=${configFile} \
+ ${cfg.package}/bin/caddy -root=/var/tmp -conf=${configFile} \
-ca=${cfg.ca} -email=${cfg.email} ${optionalString cfg.agree "-agree"}
'';
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
diff --git a/nixos/modules/services/web-servers/darkhttpd.nix b/nixos/modules/services/web-servers/darkhttpd.nix
new file mode 100644
index 000000000000..d6649fd472d9
--- /dev/null
+++ b/nixos/modules/services/web-servers/darkhttpd.nix
@@ -0,0 +1,77 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+ cfg = config.services.darkhttpd;
+
+ args = concatStringsSep " " ([
+ cfg.rootDir
+ "--port ${toString cfg.port}"
+ "--addr ${cfg.address}"
+ ] ++ cfg.extraArgs
+ ++ optional cfg.hideServerId "--no-server-id"
+ ++ optional config.networking.enableIPv6 "--ipv6");
+
+in {
+ options.services.darkhttpd = with types; {
+ enable = mkEnableOption "DarkHTTPd web server";
+
+ port = mkOption {
+ default = 80;
+ type = ints.u16;
+ description = ''
+ Port to listen on.
+ Pass 0 to let the system choose any free port for you.
+ '';
+ };
+
+ address = mkOption {
+ default = "127.0.0.1";
+ type = str;
+ description = ''
+ Address to listen on.
+ Pass `all` to listen on all interfaces.
+ '';
+ };
+
+ rootDir = mkOption {
+ type = path;
+ description = ''
+ Path from which to serve files.
+ '';
+ };
+
+ hideServerId = mkOption {
+ type = bool;
+ default = true;
+ description = ''
+ Don't identify the server type in headers or directory listings.
+ '';
+ };
+
+ extraArgs = mkOption {
+ type = listOf str;
+ default = [];
+ description = ''
+ Additional configuration passed to the executable.
+ '';
+ };
+ };
+
+ config = mkIf cfg.enable {
+ systemd.services.darkhttpd = {
+ description = "Dark HTTPd";
+ wants = [ "network.target" ];
+ after = [ "network.target" ];
+ wantedBy = [ "multi-user.target" ];
+ serviceConfig = {
+ DynamicUser = true;
+ ExecStart = "${pkgs.darkhttpd}/bin/darkhttpd ${args}";
+ AmbientCapabilities = lib.mkIf (cfg.port < 1024) [ "CAP_NET_BIND_SERVICE" ];
+ Restart = "on-failure";
+ RestartSec = "2s";
+ };
+ };
+ };
+}
diff --git a/nixos/modules/services/web-servers/nginx/default.nix b/nixos/modules/services/web-servers/nginx/default.nix
index 2b7fcb314041..eb90dae94dfe 100644
--- a/nixos/modules/services/web-servers/nginx/default.nix
+++ b/nixos/modules/services/web-servers/nginx/default.nix
@@ -4,23 +4,25 @@ with lib;
let
cfg = config.services.nginx;
+ certs = config.security.acme.certs;
+ vhostsConfigs = mapAttrsToList (vhostName: vhostConfig: vhostConfig) virtualHosts;
+ acmeEnabledVhosts = filter (vhostConfig: vhostConfig.enableACME && vhostConfig.useACMEHost == null) vhostsConfigs;
virtualHosts = mapAttrs (vhostName: vhostConfig:
let
serverName = if vhostConfig.serverName != null
then vhostConfig.serverName
else vhostName;
- acmeDirectory = config.security.acme.directory;
in
vhostConfig // {
inherit serverName;
} // (optionalAttrs vhostConfig.enableACME {
- sslCertificate = "${acmeDirectory}/${serverName}/fullchain.pem";
- sslCertificateKey = "${acmeDirectory}/${serverName}/key.pem";
- sslTrustedCertificate = "${acmeDirectory}/${serverName}/fullchain.pem";
+ sslCertificate = "${certs.${serverName}.directory}/fullchain.pem";
+ sslCertificateKey = "${certs.${serverName}.directory}/key.pem";
+ sslTrustedCertificate = "${certs.${serverName}.directory}/full.pem";
}) // (optionalAttrs (vhostConfig.useACMEHost != null) {
- sslCertificate = "${acmeDirectory}/${vhostConfig.useACMEHost}/fullchain.pem";
- sslCertificateKey = "${acmeDirectory}/${vhostConfig.useACMEHost}/key.pem";
- sslTrustedCertificate = "${acmeDirectory}/${vhostConfig.useACMEHost}/fullchain.pem";
+ sslCertificate = "${certs.${vhostConfig.useACMEHost}.directory}/fullchain.pem";
+ sslCertificateKey = "${certs.${vhostConfig.useACMEHost}.directory}/key.pem";
+ sslTrustedCertificate = "${certs.${vhostConfig.useACMEHost}.directory}/fullchain.pem";
})
) cfg.virtualHosts;
enableIPv6 = config.networking.enableIPv6;
@@ -59,7 +61,10 @@ let
${optionalString (cfg.httpConfig == "" && cfg.config == "") ''
http {
- include ${cfg.package}/conf/mime.types;
+ # The mime type definitions included with nginx are very incomplete, so
+ # we use a list of mime types from the mailcap package, which is also
+ # used by most other Linux distributions by default.
+ include ${pkgs.mailcap}/etc/nginx/mime.types;
include ${cfg.package}/conf/fastcgi.conf;
include ${cfg.package}/conf/uwsgi_params;
@@ -92,7 +97,6 @@ let
${optionalString (cfg.recommendedGzipSettings) ''
gzip on;
- gzip_disable "msie6";
gzip_proxied any;
gzip_comp_level 5;
gzip_types
@@ -118,6 +122,14 @@ let
include ${recommendedProxyConfig};
''}
+ ${optionalString (cfg.mapHashBucketSize != null) ''
+ map_hash_bucket_size ${toString cfg.mapHashBucketSize};
+ ''}
+
+ ${optionalString (cfg.mapHashMaxSize != null) ''
+ map_hash_max_size ${toString cfg.mapHashMaxSize};
+ ''}
+
# $connection_upgrade is used for websocket proxying
map $http_upgrade $connection_upgrade {
default upgrade;
@@ -162,6 +174,10 @@ let
${cfg.appendConfig}
'';
+ configPath = if cfg.enableReload
+ then "/etc/nginx/nginx.conf"
+ else configFile;
+
vhosts = concatStringsSep "\n" (mapAttrsToList (vhostName: vhost:
let
onlySSL = vhost.onlySSL || vhost.enableSSL;
@@ -431,6 +447,16 @@ in
";
};
+ enableReload = mkOption {
+ default = false;
+ type = types.bool;
+ description = ''
+ Reload nginx when configuration file changes (instead of restart).
+ The configuration file is exposed at /etc/nginx/nginx.conf.
+ See also systemd.services.*.restartIfChanged.
+ '';
+ };
+
stateDir = mkOption {
default = "/var/spool/nginx";
description = "
@@ -457,7 +483,7 @@ in
};
clientMaxBodySize = mkOption {
- type = types.string;
+ type = types.str;
default = "10m";
description = "Set nginx global client_max_body_size.";
};
@@ -492,6 +518,23 @@ in
'';
};
+ mapHashBucketSize = mkOption {
+ type = types.nullOr (types.enum [ 32 64 128 ]);
+ default = null;
+ description = ''
+ Sets the bucket size for the map variables hash tables. Default
+ value depends on the processor’s cache line size.
+ '';
+ };
+
+ mapHashMaxSize = mkOption {
+ type = types.nullOr types.ints.positive;
+ default = null;
+ description = ''
+ Sets the maximum size of the map variables hash tables.
+ '';
+ };
+
resolver = mkOption {
type = types.submodule {
options = {
@@ -632,16 +675,17 @@ in
systemd.services.nginx = {
description = "Nginx Web Server";
- after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
+ wants = concatLists (map (vhostConfig: ["acme-${vhostConfig.serverName}.service" "acme-selfsigned-${vhostConfig.serverName}.service"]) acmeEnabledVhosts);
+ after = [ "network.target" ] ++ map (vhostConfig: "acme-selfsigned-${vhostConfig.serverName}.service") acmeEnabledVhosts;
stopIfChanged = false;
preStart =
''
${cfg.preStart}
- ${cfg.package}/bin/nginx -c ${configFile} -p ${cfg.stateDir} -t
+ ${cfg.package}/bin/nginx -c ${configPath} -p ${cfg.stateDir} -t
'';
serviceConfig = {
- ExecStart = "${cfg.package}/bin/nginx -c ${configFile} -p ${cfg.stateDir}";
+ ExecStart = "${cfg.package}/bin/nginx -c ${configPath} -p ${cfg.stateDir}";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
Restart = "always";
RestartSec = "10s";
@@ -649,10 +693,23 @@ in
};
};
+ environment.etc."nginx/nginx.conf" = mkIf cfg.enableReload {
+ source = configFile;
+ };
+
+ systemd.services.nginx-config-reload = mkIf cfg.enableReload {
+ wantedBy = [ "nginx.service" ];
+ restartTriggers = [ configFile ];
+ script = ''
+ if ${pkgs.systemd}/bin/systemctl -q is-active nginx.service ; then
+ ${pkgs.systemd}/bin/systemctl reload nginx.service
+ fi
+ '';
+ serviceConfig.RemainAfterExit = true;
+ };
+
security.acme.certs = filterAttrs (n: v: v != {}) (
let
- vhostsConfigs = mapAttrsToList (vhostName: vhostConfig: vhostConfig) virtualHosts;
- acmeEnabledVhosts = filter (vhostConfig: vhostConfig.enableACME && vhostConfig.useACMEHost == null) vhostsConfigs;
acmePairs = map (vhostConfig: { name = vhostConfig.serverName; value = {
user = cfg.user;
group = lib.mkDefault cfg.group;
diff --git a/nixos/modules/services/web-servers/phpfpm/default.nix b/nixos/modules/services/web-servers/phpfpm/default.nix
index ffafbc5e92f2..4ab7e3f0c0a9 100644
--- a/nixos/modules/services/web-servers/phpfpm/default.nix
+++ b/nixos/modules/services/web-servers/phpfpm/default.nix
@@ -4,41 +4,27 @@ with lib;
let
cfg = config.services.phpfpm;
- enabled = cfg.poolConfigs != {} || cfg.pools != {};
- stateDir = "/run/phpfpm";
+ runtimeDir = "/run/phpfpm";
- poolConfigs =
- (mapAttrs mapPoolConfig cfg.poolConfigs) //
- (mapAttrs mapPool cfg.pools);
+ toStr = value:
+ if true == value then "yes"
+ else if false == value then "no"
+ else toString value;
- mapPoolConfig = n: p: {
- phpPackage = cfg.phpPackage;
- phpOptions = cfg.phpOptions;
- config = p;
- };
-
- mapPool = n: p: {
- phpPackage = p.phpPackage;
- phpOptions = p.phpOptions;
- config = ''
- listen = ${p.listen}
- ${p.extraConfig}
- '';
- };
-
- fpmCfgFile = pool: conf: pkgs.writeText "phpfpm-${pool}.conf" ''
+ fpmCfgFile = pool: poolOpts: pkgs.writeText "phpfpm-${pool}.conf" ''
[global]
- error_log = syslog
- daemonize = no
- ${cfg.extraConfig}
+ ${concatStringsSep "\n" (mapAttrsToList (n: v: "${n} = ${toStr v}") cfg.settings)}
+ ${optionalString (cfg.extraConfig != null) cfg.extraConfig}
[${pool}]
- ${conf}
+ ${concatStringsSep "\n" (mapAttrsToList (n: v: "${n} = ${toStr v}") poolOpts.settings)}
+ ${concatStringsSep "\n" (mapAttrsToList (n: v: "env[${n}] = ${toStr v}") poolOpts.phpEnv)}
+ ${optionalString (poolOpts.extraConfig != null) poolOpts.extraConfig}
'';
- phpIni = pool: pkgs.runCommand "php.ini" {
- inherit (pool) phpPackage phpOptions;
+ phpIni = poolOpts: pkgs.runCommand "php.ini" {
+ inherit (poolOpts) phpPackage phpOptions;
preferLocalBuild = true;
nixDefaults = ''
sendmail_path = "/run/wrappers/bin/sendmail -t -i"
@@ -48,13 +34,138 @@ let
cat $phpPackage/etc/php.ini $nixDefaultsPath $phpOptionsPath > $out
'';
+ poolOpts = { name, ... }:
+ let
+ poolOpts = cfg.pools.${name};
+ in
+ {
+ options = {
+ socket = mkOption {
+ type = types.str;
+ readOnly = true;
+ description = ''
+ Path to the unix socket file on which to accept FastCGI requests.
+ This option is read-only and managed by NixOS.
+ '';
+ };
+
+ listen = mkOption {
+ type = types.str;
+ default = "";
+ example = "/path/to/unix/socket";
+ description = ''
+ The address on which to accept FastCGI requests.
+ '';
+ };
+
+ phpPackage = mkOption {
+ type = types.package;
+ default = cfg.phpPackage;
+ defaultText = "config.services.phpfpm.phpPackage";
+ description = ''
+ The PHP package to use for running this PHP-FPM pool.
+ '';
+ };
+
+ phpOptions = mkOption {
+ type = types.lines;
+ default = cfg.phpOptions;
+ defaultText = "config.services.phpfpm.phpOptions";
+ description = ''
+ "Options appended to the PHP configuration file php.ini used for this PHP-FPM pool."
+ '';
+ };
+
+ phpEnv = lib.mkOption {
+ type = with types; attrsOf str;
+ default = {};
+ description = ''
+ Environment variables used for this PHP-FPM pool.
+ '';
+ example = literalExample ''
+ {
+ HOSTNAME = "$HOSTNAME";
+ TMP = "/tmp";
+ TMPDIR = "/tmp";
+ TEMP = "/tmp";
+ }
+ '';
+ };
+
+ user = mkOption {
+ type = types.str;
+ description = "User account under which this pool runs.";
+ };
+
+ group = mkOption {
+ type = types.str;
+ description = "Group account under which this pool runs.";
+ };
+
+ settings = mkOption {
+ type = with types; attrsOf (oneOf [ str int bool ]);
+ default = {};
+ description = ''
+ PHP-FPM pool directives. Refer to the "List of pool directives" section of
+
+ for details. Note that settings names must be enclosed in quotes (e.g.
+ "pm.max_children" instead of pm.max_children).
+ '';
+ example = literalExample ''
+ {
+ "pm" = "dynamic";
+ "pm.max_children" = 75;
+ "pm.start_servers" = 10;
+ "pm.min_spare_servers" = 5;
+ "pm.max_spare_servers" = 20;
+ "pm.max_requests" = 500;
+ }
+ '';
+ };
+
+ extraConfig = mkOption {
+ type = with types; nullOr lines;
+ default = null;
+ description = ''
+ Extra lines that go into the pool configuration.
+ See the documentation on php-fpm.conf for
+ details on configuration directives.
+ '';
+ };
+ };
+
+ config = {
+ socket = if poolOpts.listen == "" then "${runtimeDir}/${name}.sock" else poolOpts.listen;
+ group = mkDefault poolOpts.user;
+
+ settings = mapAttrs (name: mkDefault){
+ listen = poolOpts.socket;
+ user = poolOpts.user;
+ group = poolOpts.group;
+ };
+ };
+ };
+
in {
options = {
services.phpfpm = {
+ settings = mkOption {
+ type = with types; attrsOf (oneOf [ str int bool ]);
+ default = {};
+ description = ''
+ PHP-FPM global directives. Refer to the "List of global php-fpm.conf directives" section of
+
+ for details. Note that settings names must be enclosed in quotes (e.g.
+ "pm.max_children" instead of pm.max_children).
+ You need not specify the options error_log or
+ daemonize here, since they are generated by NixOS.
+ '';
+ };
+
extraConfig = mkOption {
- type = types.lines;
- default = "";
+ type = with types; nullOr lines;
+ default = null;
description = ''
Extra configuration that should be put in the global section of
the PHP-FPM configuration file. Do not specify the options
@@ -80,64 +191,56 @@ in {
''
date.timezone = "CET"
'';
- description =
- "Options appended to the PHP configuration file php.ini.";
- };
-
- poolConfigs = mkOption {
- default = {};
- type = types.attrsOf types.lines;
- example = literalExample ''
- { mypool = '''
- listen = /run/phpfpm/mypool
- user = nobody
- pm = dynamic
- pm.max_children = 75
- pm.start_servers = 10
- pm.min_spare_servers = 5
- pm.max_spare_servers = 20
- pm.max_requests = 500
- ''';
- }
- '';
description = ''
- A mapping between PHP-FPM pool names and their configurations.
- See the documentation on php-fpm.conf for
- details on configuration directives. If no pools are defined,
- the phpfpm service is disabled.
+ Options appended to the PHP configuration file php.ini.
'';
};
pools = mkOption {
- type = types.attrsOf (types.submodule (import ./pool-options.nix {
- inherit lib config;
- }));
+ type = types.attrsOf (types.submodule poolOpts);
default = {};
example = literalExample ''
{
mypool = {
- listen = "/path/to/unix/socket";
+ user = "php";
+ group = "php";
phpPackage = pkgs.php;
- extraConfig = '''
- user = nobody
- pm = dynamic
- pm.max_children = 75
- pm.start_servers = 10
- pm.min_spare_servers = 5
- pm.max_spare_servers = 20
- pm.max_requests = 500
+ settings = '''
+ "pm" = "dynamic";
+ "pm.max_children" = 75;
+ "pm.start_servers" = 10;
+ "pm.min_spare_servers" = 5;
+ "pm.max_spare_servers" = 20;
+ "pm.max_requests" = 500;
''';
}
}'';
description = ''
- PHP-FPM pools. If no pools or poolConfigs are defined, the PHP-FPM
+ PHP-FPM pools. If no pools are defined, the PHP-FPM
service is disabled.
'';
};
};
};
- config = mkIf enabled {
+ config = mkIf (cfg.pools != {}) {
+
+ warnings =
+ mapAttrsToList (pool: poolOpts: ''
+ Using config.services.phpfpm.pools.${pool}.listen is deprecated and will become unsupported in a future release. Please reference the read-only option config.services.phpfpm.pools.${pool}.socket to access the path of your socket.
+ '') (filterAttrs (pool: poolOpts: poolOpts.listen != "") cfg.pools) ++
+ mapAttrsToList (pool: poolOpts: ''
+ Using config.services.phpfpm.pools.${pool}.extraConfig is deprecated and will become unsupported in a future release. Please migrate your configuration to config.services.phpfpm.pools.${pool}.settings.
+ '') (filterAttrs (pool: poolOpts: poolOpts.extraConfig != null) cfg.pools) ++
+ optional (cfg.extraConfig != null) ''
+ Using config.services.phpfpm.extraConfig is deprecated and will become unsupported in a future release. Please migrate your configuration to config.services.phpfpm.settings.
+ ''
+ ;
+
+ services.phpfpm.settings = {
+ error_log = "syslog";
+ daemonize = false;
+ };
systemd.slices.phpfpm = {
description = "PHP FastCGI Process manager pools slice";
@@ -148,18 +251,15 @@ in {
wantedBy = [ "multi-user.target" ];
};
- systemd.services = flip mapAttrs' poolConfigs (pool: poolConfig:
+ systemd.services = mapAttrs' (pool: poolOpts:
nameValuePair "phpfpm-${pool}" {
description = "PHP FastCGI Process Manager service for pool ${pool}";
after = [ "network.target" ];
wantedBy = [ "phpfpm.target" ];
partOf = [ "phpfpm.target" ];
- preStart = ''
- mkdir -p ${stateDir}
- '';
serviceConfig = let
- cfgFile = fpmCfgFile pool poolConfig.config;
- iniFile = phpIni poolConfig;
+ cfgFile = fpmCfgFile pool poolOpts;
+ iniFile = phpIni poolOpts;
in {
Slice = "phpfpm.slice";
PrivateDevices = true;
@@ -168,10 +268,12 @@ in {
# XXX: We need AF_NETLINK to make the sendmail SUID binary from postfix work
RestrictAddressFamilies = "AF_UNIX AF_INET AF_INET6 AF_NETLINK";
Type = "notify";
- ExecStart = "${poolConfig.phpPackage}/bin/php-fpm -y ${cfgFile} -c ${iniFile}";
+ ExecStart = "${poolOpts.phpPackage}/bin/php-fpm -y ${cfgFile} -c ${iniFile}";
ExecReload = "${pkgs.coreutils}/bin/kill -USR2 $MAINPID";
+ RuntimeDirectory = "phpfpm";
+ RuntimeDirectoryPreserve = true; # Relevant when multiple processes are running
};
}
- );
+ ) cfg.pools;
};
}
diff --git a/nixos/modules/services/web-servers/phpfpm/pool-options.nix b/nixos/modules/services/web-servers/phpfpm/pool-options.nix
deleted file mode 100644
index d9ad7eff71f2..000000000000
--- a/nixos/modules/services/web-servers/phpfpm/pool-options.nix
+++ /dev/null
@@ -1,57 +0,0 @@
-{ lib, config }:
-
-let
- fpmCfg = config.services.phpfpm;
-in
-
-with lib; {
-
- options = {
-
- listen = mkOption {
- type = types.str;
- example = "/path/to/unix/socket";
- description = ''
- The address on which to accept FastCGI requests.
- '';
- };
-
- phpPackage = mkOption {
- type = types.package;
- default = fpmCfg.phpPackage;
- defaultText = "config.services.phpfpm.phpPackage";
- description = ''
- The PHP package to use for running this PHP-FPM pool.
- '';
- };
-
- phpOptions = mkOption {
- type = types.lines;
- default = fpmCfg.phpOptions;
- defaultText = "config.services.phpfpm.phpOptions";
- description = ''
- "Options appended to the PHP configuration file php.ini used for this PHP-FPM pool."
- '';
- };
-
- extraConfig = mkOption {
- type = types.lines;
- example = ''
- user = nobody
- pm = dynamic
- pm.max_children = 75
- pm.start_servers = 10
- pm.min_spare_servers = 5
- pm.max_spare_servers = 20
- pm.max_requests = 500
- '';
-
- description = ''
- Extra lines that go into the pool configuration.
- See the documentation on php-fpm.conf for
- details on configuration directives.
- '';
- };
- };
-}
-
diff --git a/nixos/modules/services/web-servers/traefik.nix b/nixos/modules/services/web-servers/traefik.nix
index 5bac895d43ac..8de7df0d446c 100644
--- a/nixos/modules/services/web-servers/traefik.nix
+++ b/nixos/modules/services/web-servers/traefik.nix
@@ -67,7 +67,7 @@ in {
group = mkOption {
default = "traefik";
- type = types.string;
+ type = types.str;
example = "docker";
description = ''
Set the group that traefik runs under.
diff --git a/nixos/modules/services/web-servers/uwsgi.nix b/nixos/modules/services/web-servers/uwsgi.nix
index 3f858d90fa46..af70f32f32d0 100644
--- a/nixos/modules/services/web-servers/uwsgi.nix
+++ b/nixos/modules/services/web-servers/uwsgi.nix
@@ -72,7 +72,7 @@ in {
};
runDir = mkOption {
- type = types.string;
+ type = types.path;
default = "/run/uwsgi";
description = "Where uWSGI communication sockets can live";
};
diff --git a/nixos/modules/services/web-servers/zope2.nix b/nixos/modules/services/web-servers/zope2.nix
index 4cad2a2ff777..3abd506827c0 100644
--- a/nixos/modules/services/web-servers/zope2.nix
+++ b/nixos/modules/services/web-servers/zope2.nix
@@ -11,7 +11,7 @@ let
name = mkOption {
default = "${name}";
- type = types.string;
+ type = types.str;
description = "The name of the zope2 instance. If undefined, the name of the attribute set will be used.";
};
@@ -23,19 +23,19 @@ let
http_address = mkOption {
default = "localhost:8080";
- type = types.string;
+ type = types.str;
description = "Give a port and address for the HTTP server.";
};
user = mkOption {
default = "zope2";
- type = types.string;
+ type = types.str;
description = "The name of the effective user for the Zope process.";
};
clientHome = mkOption {
default = "/var/lib/zope2/${name}";
- type = types.string;
+ type = types.path;
description = "Home directory of zope2 instance.";
};
extra = mkOption {
@@ -52,7 +52,7 @@ let
'';
- type = types.string;
+ type = types.lines;
description = "Extra zope.conf";
};
diff --git a/nixos/modules/services/x11/clight.nix b/nixos/modules/services/x11/clight.nix
new file mode 100644
index 000000000000..4daf6d8d9db7
--- /dev/null
+++ b/nixos/modules/services/x11/clight.nix
@@ -0,0 +1,115 @@
+{ config, pkgs, lib, ... }:
+
+with lib;
+
+let
+ cfg = config.services.clight;
+
+ toConf = v:
+ if builtins.isFloat v then toString v
+ else if isInt v then toString v
+ else if isBool v then boolToString v
+ else if isString v then ''"${escape [''"''] v}"''
+ else if isList v then "[ " + concatMapStringsSep ", " toConf v + " ]"
+ else abort "clight.toConf: unexpected type (v = ${v})";
+
+ clightConf = pkgs.writeText "clight.conf"
+ (concatStringsSep "\n" (mapAttrsToList
+ (name: value: "${toString name} = ${toConf value};")
+ (filterAttrs
+ (_: value: value != null)
+ cfg.settings)));
+in {
+ options.services.clight = {
+ enable = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Whether to enable clight or not.
+ '';
+ };
+
+ temperature = {
+ day = mkOption {
+ type = types.int;
+ default = 5500;
+ description = ''
+ Colour temperature to use during the day, between
+ 1000 and 25000 K.
+ '';
+ };
+ night = mkOption {
+ type = types.int;
+ default = 3700;
+ description = ''
+ Colour temperature to use at night, between
+ 1000 and 25000 K.
+ '';
+ };
+ };
+
+ settings = let
+ validConfigTypes = with types; either int (either str (either bool float));
+ in mkOption {
+ type = with types; attrsOf (nullOr (either validConfigTypes (listOf validConfigTypes)));
+ default = {};
+ example = { captures = 20; gamma_long_transition = true; ac_capture_timeouts = [ 120 300 60 ]; };
+ description = ''
+ Additional configuration to extend clight.conf. See
+ for a
+ sample configuration file.
+ '';
+ };
+ };
+
+ config = mkIf cfg.enable {
+ boot.kernelModules = [ "i2c_dev" ];
+ environment.systemPackages = with pkgs; [ clight clightd ];
+ services.dbus.packages = with pkgs; [ clight clightd ];
+ services.upower.enable = true;
+
+ services.clight.settings = {
+ gamma_temp = with cfg.temperature; mkDefault [ day night ];
+ } // (optionalAttrs (config.location.provider == "manual") {
+ latitude = mkDefault config.location.latitude;
+ longitude = mkDefault config.location.longitude;
+ });
+
+ services.geoclue2.appConfig.clightc = {
+ isAllowed = true;
+ isSystem = true;
+ };
+
+ systemd.services.clightd = {
+ requires = [ "polkit.service" ];
+ wantedBy = [ "multi-user.target" ];
+
+ description = "Bus service to manage various screen related properties (gamma, dpms, backlight)";
+ serviceConfig = {
+ Type = "dbus";
+ BusName = "org.clightd.clightd";
+ Restart = "on-failure";
+ RestartSec = 5;
+ ExecStart = ''
+ ${pkgs.clightd}/bin/clightd
+ '';
+ };
+ };
+
+ systemd.user.services.clight = {
+ after = [ "upower.service" "clightd.service" ];
+ wants = [ "upower.service" "clightd.service" ];
+ partOf = [ "graphical-session.target" ];
+ wantedBy = [ "graphical-session.target" ];
+
+ description = "C daemon to adjust screen brightness to match ambient brightness, as computed capturing frames from webcam";
+ serviceConfig = {
+ Restart = "on-failure";
+ RestartSec = 5;
+ ExecStart = ''
+ ${pkgs.clight}/bin/clight --conf-file ${clightConf}
+ '';
+ };
+ };
+ };
+}
diff --git a/nixos/modules/services/x11/compton.nix b/nixos/modules/services/x11/compton.nix
index c02c9bfd94e8..a94a76ff0c0f 100644
--- a/nixos/modules/services/x11/compton.nix
+++ b/nixos/modules/services/x11/compton.nix
@@ -215,7 +215,7 @@ in {
};
settings = let
- configTypes = with types; either bool (either int (either float str));
+ configTypes = with types; oneOf [ bool int float str ];
# types.loaOf converts lists to sets
loaOf = t: with types; either (listOf t) (attrsOf t);
in mkOption {
diff --git a/nixos/modules/services/x11/desktop-managers/default.nix b/nixos/modules/services/x11/desktop-managers/default.nix
index 2b1e9169e5f6..dfb84113e130 100644
--- a/nixos/modules/services/x11/desktop-managers/default.nix
+++ b/nixos/modules/services/x11/desktop-managers/default.nix
@@ -18,9 +18,9 @@ in
# determines the default: later modules (if enabled) are preferred.
# E.g., if Plasma 5 is enabled, it supersedes xterm.
imports = [
- ./none.nix ./xterm.nix ./xfce.nix ./plasma5.nix ./lumina.nix
+ ./none.nix ./xterm.nix ./xfce.nix ./xfce4-14.nix ./plasma5.nix ./lumina.nix
./lxqt.nix ./enlightenment.nix ./gnome3.nix ./kodi.nix ./maxx.nix
- ./mate.nix ./pantheon.nix
+ ./mate.nix ./pantheon.nix ./surf-display.nix
];
options = {
diff --git a/nixos/modules/services/x11/desktop-managers/enlightenment.nix b/nixos/modules/services/x11/desktop-managers/enlightenment.nix
index 527e4b18045b..3745069f6eaf 100644
--- a/nixos/modules/services/x11/desktop-managers/enlightenment.nix
+++ b/nixos/modules/services/x11/desktop-managers/enlightenment.nix
@@ -31,7 +31,7 @@ in
e.efl e.enlightenment
e.terminology e.econnman
pkgs.xorg.xauth # used by kdesu
- pkgs.gtk2 # To get GTK+'s themes.
+ pkgs.gtk2 # To get GTK's themes.
pkgs.tango-icon-theme
pkgs.gnome2.gnome_icon_theme
@@ -48,10 +48,6 @@ in
services.xserver.desktopManager.session = [
{ name = "Enlightenment";
start = ''
- # Set GTK_DATA_PREFIX so that GTK+ can find the themes
- export GTK_DATA_PREFIX=${config.system.path}
- # find theme engines
- export GTK_PATH=${config.system.path}/lib/gtk-3.0:${config.system.path}/lib/gtk-2.0
export XDG_MENU_PREFIX=e-
export GST_PLUGIN_PATH="${GST_PLUGIN_PATH}"
diff --git a/nixos/modules/services/x11/desktop-managers/gnome3.nix b/nixos/modules/services/x11/desktop-managers/gnome3.nix
index cd7502421255..5ad31e5b9d00 100644
--- a/nixos/modules/services/x11/desktop-managers/gnome3.nix
+++ b/nixos/modules/services/x11/desktop-managers/gnome3.nix
@@ -3,7 +3,9 @@
with lib;
let
+
cfg = config.services.xserver.desktopManager.gnome3;
+ serviceCfg = config.services.gnome3;
# Prioritize nautilus by default when opening directories
mimeAppsList = pkgs.writeTextFile {
@@ -15,20 +17,33 @@ let
'';
};
- nixos-gsettings-desktop-schemas = pkgs.runCommand "nixos-gsettings-desktop-schemas" { preferLocalBuild = true; }
+ nixos-gsettings-desktop-schemas = let
+ defaultPackages = with pkgs; [ gsettings-desktop-schemas gnome3.gnome-shell ];
+ in
+ pkgs.runCommand "nixos-gsettings-desktop-schemas" { preferLocalBuild = true; }
''
mkdir -p $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas
- cp -rf ${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/gsettings-desktop-schemas*/glib-2.0/schemas/*.xml $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas
- ${concatMapStrings (pkg: "cp -rf ${pkg}/share/gsettings-schemas/*/glib-2.0/schemas/*.xml $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas\n") cfg.extraGSettingsOverridePackages}
+ ${concatMapStrings
+ (pkg: "cp -rf ${pkg}/share/gsettings-schemas/*/glib-2.0/schemas/*.xml $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas\n")
+ (defaultPackages ++ cfg.extraGSettingsOverridePackages)}
+
+ cp -f ${pkgs.gnome3.gnome-shell}/share/gsettings-schemas/*/glib-2.0/schemas/*.gschema.override $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas
+
+ ${optionalString flashbackEnabled ''
+ cp -f ${pkgs.gnome3.gnome-flashback}/share/gsettings-schemas/*/glib-2.0/schemas/*.gschema.override $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas
+ ''}
chmod -R a+w $out/share/gsettings-schemas/nixos-gsettings-overrides
cat - > $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas/nixos-defaults.gschema.override <<- EOF
[org.gnome.desktop.background]
- picture-uri='${pkgs.nixos-artwork.wallpapers.simple-dark-gray}/share/artwork/gnome/nix-wallpaper-simple-dark-gray.png'
+ picture-uri='file://${pkgs.nixos-artwork.wallpapers.simple-dark-gray}/share/artwork/gnome/nix-wallpaper-simple-dark-gray.png'
[org.gnome.desktop.screensaver]
- picture-uri='${pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom}/share/artwork/gnome/nix-wallpaper-simple-dark-gray_bottom.png'
+ picture-uri='file://${pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom}/share/artwork/gnome/nix-wallpaper-simple-dark-gray_bottom.png'
+
+ [org.gnome.shell]
+ favorite-apps=[ 'org.gnome.Epiphany.desktop', 'org.gnome.Geary.desktop', 'org.gnome.Music.desktop', 'org.gnome.Photos.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop' ]
${cfg.extraGSettingsOverrides}
EOF
@@ -38,10 +53,19 @@ let
flashbackEnabled = cfg.flashback.enableMetacity || length cfg.flashback.customSessions > 0;
-in {
+in
+
+{
options = {
+ services.gnome3 = {
+ core-os-services.enable = mkEnableOption "essential services for GNOME3";
+ core-shell.enable = mkEnableOption "GNOME Shell services";
+ core-utilities.enable = mkEnableOption "GNOME core utilities";
+ games.enable = mkEnableOption "GNOME games";
+ };
+
services.xserver.desktopManager.gnome3 = {
enable = mkOption {
default = false;
@@ -114,60 +138,40 @@ in {
};
- config = mkIf cfg.enable {
+ config = mkMerge [
+ (mkIf (cfg.enable || flashbackEnabled) {
+ services.gnome3.core-os-services.enable = true;
+ services.gnome3.core-shell.enable = true;
+ services.gnome3.core-utilities.enable = mkDefault true;
- # Enable helpful DBus services.
- security.polkit.enable = true;
- services.udisks2.enable = true;
- services.accounts-daemon.enable = true;
- services.dleyna-renderer.enable = mkDefault true;
- services.dleyna-server.enable = mkDefault true;
- services.gnome3.at-spi2-core.enable = true;
- services.gnome3.evince.enable = mkDefault true;
- services.gnome3.evolution-data-server.enable = true;
- services.gnome3.file-roller.enable = mkDefault true;
- services.gnome3.glib-networking.enable = true;
- services.gnome3.gnome-disks.enable = mkDefault true;
- services.gnome3.gnome-documents.enable = mkDefault true;
- services.gnome3.gnome-keyring.enable = true;
- services.gnome3.gnome-online-accounts.enable = mkDefault true;
- services.gnome3.gnome-remote-desktop.enable = mkDefault true;
- services.gnome3.gnome-settings-daemon.enable = true;
- services.gnome3.gnome-terminal-server.enable = mkDefault true;
- services.gnome3.gnome-user-share.enable = mkDefault true;
- services.gnome3.gvfs.enable = true;
- services.gnome3.rygel.enable = mkDefault true;
- services.gnome3.seahorse.enable = mkDefault true;
- services.gnome3.sushi.enable = mkDefault true;
- services.gnome3.tracker.enable = mkDefault true;
- services.gnome3.tracker-miners.enable = mkDefault true;
- hardware.pulseaudio.enable = mkDefault true;
- services.telepathy.enable = mkDefault true;
- networking.networkmanager.enable = mkDefault true;
- services.upower.enable = config.powerManagement.enable;
- services.dbus.packages =
- optional config.services.printing.enable pkgs.system-config-printer ++
- optional flashbackEnabled pkgs.gnome3.gnome-screensaver;
- services.colord.enable = mkDefault true;
- services.packagekit.enable = mkDefault true;
- hardware.bluetooth.enable = mkDefault true;
- services.hardware.bolt.enable = mkDefault true;
- services.xserver.libinput.enable = mkDefault true; # for controlling touchpad settings via gnome control center
- systemd.packages = [ pkgs.gnome3.vino ];
- xdg.portal.enable = true;
- xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
+ services.xserver.displayManager.extraSessionFilePackages = [ pkgs.gnome3.gnome-session ];
- # If gnome3 is installed, build vim for gtk3 too.
- nixpkgs.config.vim.gui = "gtk3";
+ environment.extraInit = ''
+ ${concatMapStrings (p: ''
+ if [ -d "${p}/share/gsettings-schemas/${p.name}" ]; then
+ export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${p}/share/gsettings-schemas/${p.name}
+ fi
- fonts.fonts = [
- pkgs.dejavu_fonts pkgs.cantarell-fonts
- pkgs.source-sans-pro
- pkgs.source-code-pro # Default monospace font in 3.32
- ];
+ if [ -d "${p}/lib/girepository-1.0" ]; then
+ export GI_TYPELIB_PATH=$GI_TYPELIB_PATH''${GI_TYPELIB_PATH:+:}${p}/lib/girepository-1.0
+ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${p}/lib
+ fi
+ '') cfg.sessionPath}
+ '';
- services.xserver.displayManager.extraSessionFilePackages = [ pkgs.gnome3.gnome-session ]
- ++ map
+ environment.systemPackages = cfg.sessionPath;
+
+ environment.sessionVariables.GNOME_SESSION_DEBUG = mkIf cfg.debug "1";
+
+ # Override GSettings schemas
+ environment.sessionVariables.NIX_GSETTINGS_OVERRIDES_DIR = "${nixos-gsettings-desktop-schemas}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas";
+
+ # If gnome3 is installed, build vim for gtk3 too.
+ nixpkgs.config.vim.gui = "gtk3";
+ })
+
+ (mkIf flashbackEnabled {
+ services.xserver.displayManager.extraSessionFilePackages = map
(wm: pkgs.gnome3.gnome-flashback.mkSessionForWm {
inherit (wm) wmName wmLabel wmCommand;
}) (optional cfg.flashback.enableMetacity {
@@ -176,75 +180,173 @@ in {
wmCommand = "${pkgs.gnome3.metacity}/bin/metacity";
} ++ cfg.flashback.customSessions);
- environment.extraInit = ''
- ${concatMapStrings (p: ''
- if [ -d "${p}/share/gsettings-schemas/${p.name}" ]; then
- export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${p}/share/gsettings-schemas/${p.name}
- fi
+ security.pam.services.gnome-screensaver = {
+ enableGnomeKeyring = true;
+ };
- if [ -d "${p}/lib/girepository-1.0" ]; then
- export GI_TYPELIB_PATH=$GI_TYPELIB_PATH''${GI_TYPELIB_PATH:+:}${p}/lib/girepository-1.0
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${p}/lib
- fi
- '') cfg.sessionPath}
- '';
+ services.dbus.packages = [
+ pkgs.gnome3.gnome-screensaver
+ ];
+ })
+ (mkIf serviceCfg.core-os-services.enable {
+ hardware.bluetooth.enable = mkDefault true;
+ hardware.pulseaudio.enable = mkDefault true;
+ programs.dconf.enable = true;
+ security.polkit.enable = true;
+ services.accounts-daemon.enable = true;
+ services.dleyna-renderer.enable = mkDefault true;
+ services.dleyna-server.enable = mkDefault true;
+ services.gnome3.at-spi2-core.enable = true;
+ services.gnome3.evolution-data-server.enable = true;
+ services.gnome3.gnome-keyring.enable = true;
+ services.gnome3.gnome-online-accounts.enable = mkDefault true;
+ services.gnome3.gnome-online-miners.enable = true;
+ services.gnome3.tracker-miners.enable = mkDefault true;
+ services.gnome3.tracker.enable = mkDefault true;
+ services.hardware.bolt.enable = mkDefault true;
+ services.packagekit.enable = mkDefault true;
+ services.udisks2.enable = true;
+ services.upower.enable = config.powerManagement.enable;
+ services.xserver.libinput.enable = mkDefault true; # for controlling touchpad settings via gnome control center
- services.geoclue2.enable = mkDefault true;
- # GNOME should have its own geoclue agent
- services.geoclue2.enableDemoAgent = false;
+ xdg.portal.enable = true;
+ xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
- services.geoclue2.appConfig."gnome-datetime-panel" = {
- isAllowed = true;
- isSystem = true;
- };
- services.geoclue2.appConfig."gnome-color-panel" = {
- isAllowed = true;
- isSystem = true;
- };
- services.geoclue2.appConfig."org.gnome.Shell" = {
- isAllowed = true;
- isSystem = true;
- };
+ networking.networkmanager.enable = mkDefault true;
- environment.variables.GNOME_SESSION_DEBUG = optionalString cfg.debug "1";
+ services.xserver.updateDbusEnvironment = true;
- # Override default mimeapps
- environment.variables.XDG_DATA_DIRS = [ "${mimeAppsList}/share" ];
+ # Needed for themes and backgrounds
+ environment.pathsToLink = [
+ "/share" # TODO: https://github.com/NixOS/nixpkgs/issues/47173
+ ];
+ })
- # Override GSettings schemas
- environment.variables.NIX_GSETTINGS_OVERRIDES_DIR = "${nixos-gsettings-desktop-schemas}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas";
+ (mkIf serviceCfg.core-shell.enable {
+ services.colord.enable = mkDefault true;
+ services.gnome3.chrome-gnome-shell.enable = mkDefault true;
+ services.gnome3.glib-networking.enable = true;
+ services.gnome3.gnome-initial-setup.enable = mkDefault true;
+ services.gnome3.gnome-remote-desktop.enable = mkDefault true;
+ services.gnome3.gnome-settings-daemon.enable = true;
+ services.gnome3.gnome-user-share.enable = mkDefault true;
+ services.gnome3.rygel.enable = mkDefault true;
+ services.gvfs.enable = true;
+ services.system-config-printer.enable = (mkIf config.services.printing.enable (mkDefault true));
+ services.telepathy.enable = mkDefault true;
- # Let nautilus find extensions
- # TODO: Create nautilus-with-extensions package
- environment.variables.NAUTILUS_EXTENSION_DIR = "${config.system.path}/lib/nautilus/extensions-3.0";
+ systemd.packages = with pkgs.gnome3; [ vino gnome-session ];
- services.xserver.updateDbusEnvironment = true;
+ services.avahi.enable = mkDefault true;
- environment.variables.GIO_EXTRA_MODULES = [ "${lib.getLib pkgs.gnome3.dconf}/lib/gio/modules"
- "${pkgs.gnome3.gvfs}/lib/gio/modules" ];
- environment.systemPackages = pkgs.gnome3.corePackages ++ cfg.sessionPath
- ++ (pkgs.gnome3.removePackagesByName pkgs.gnome3.optionalPackages config.environment.gnome3.excludePackages) ++ [
- pkgs.xdg-user-dirs # Update user dirs as described in http://freedesktop.org/wiki/Software/xdg-user-dirs/
- ];
+ xdg.portal.extraPortals = [ pkgs.gnome3.gnome-shell ];
- # Use the correct gnome3 packageSet
- networking.networkmanager.basePackages =
- { inherit (pkgs) networkmanager modemmanager wpa_supplicant crda;
- inherit (pkgs.gnome3) networkmanager-openvpn networkmanager-vpnc
- networkmanager-openconnect networkmanager-fortisslvpn
- networkmanager-iodine networkmanager-l2tp; };
+ services.geoclue2.enable = mkDefault true;
+ services.geoclue2.enableDemoAgent = false; # GNOME has its own geoclue agent
- # Needed for themes and backgrounds
- environment.pathsToLink = [
- "/share"
- "/share/nautilus-python/extensions"
- ];
+ services.geoclue2.appConfig.gnome-datetime-panel = {
+ isAllowed = true;
+ isSystem = true;
+ };
+ services.geoclue2.appConfig.gnome-color-panel = {
+ isAllowed = true;
+ isSystem = true;
+ };
+ services.geoclue2.appConfig."org.gnome.Shell" = {
+ isAllowed = true;
+ isSystem = true;
+ };
- security.pam.services.gnome-screensaver = mkIf flashbackEnabled {
- enableGnomeKeyring = true;
- };
- };
+ fonts.fonts = with pkgs; [
+ cantarell-fonts
+ dejavu_fonts
+ source-code-pro # Default monospace font in 3.32
+ source-sans-pro
+ ];
+ # Adapt from https://gitlab.gnome.org/GNOME/gnome-build-meta/blob/gnome-3-32/elements/core/meta-gnome-core-shell.bst
+ environment.systemPackages = with pkgs.gnome3; [
+ adwaita-icon-theme
+ gnome-backgrounds
+ gnome-bluetooth
+ gnome-color-manager
+ gnome-control-center
+ gnome-getting-started-docs
+ gnome-shell
+ gnome-shell-extensions
+ gnome-themes-extra
+ gnome-user-docs
+ pkgs.orca
+ pkgs.glib # for gsettings
+ pkgs.gnome-menus
+ pkgs.gtk3.out # for gtk-launch
+ pkgs.hicolor-icon-theme
+ pkgs.shared-mime-info # for update-mime-database
+ pkgs.xdg-user-dirs # Update user dirs as described in http://freedesktop.org/wiki/Software/xdg-user-dirs/
+ vino
+ ];
+ })
+
+ # Adapt from https://gitlab.gnome.org/GNOME/gnome-build-meta/blob/gnome-3-32/elements/core/meta-gnome-core-utilities.bst
+ (mkIf serviceCfg.core-utilities.enable {
+ environment.systemPackages = (with pkgs.gnome3; removePackagesByName [
+ baobab
+ cheese
+ eog
+ epiphany
+ geary
+ gedit
+ gnome-calculator
+ gnome-calendar
+ gnome-characters
+ gnome-clocks
+ gnome-contacts
+ gnome-font-viewer
+ gnome-logs
+ gnome-maps
+ gnome-music
+ gnome-photos
+ gnome-screenshot
+ gnome-software
+ gnome-system-monitor
+ gnome-weather
+ nautilus
+ simple-scan
+ totem
+ yelp
+ # Unsure if sensible for NixOS
+ /* gnome-boxes */
+ ] config.environment.gnome3.excludePackages);
+
+ # Enable default programs
+ programs.evince.enable = mkDefault true;
+ programs.file-roller.enable = mkDefault true;
+ programs.gnome-disks.enable = mkDefault true;
+ programs.gnome-terminal.enable = mkDefault true;
+ programs.seahorse.enable = mkDefault true;
+ services.gnome3.sushi.enable = mkDefault true;
+
+ # Let nautilus find extensions
+ # TODO: Create nautilus-with-extensions package
+ environment.sessionVariables.NAUTILUS_EXTENSION_DIR = "${config.system.path}/lib/nautilus/extensions-3.0";
+
+ # Override default mimeapps for nautilus
+ environment.sessionVariables.XDG_DATA_DIRS = [ "${mimeAppsList}/share" ];
+
+ environment.pathsToLink = [
+ "/share/nautilus-python/extensions"
+ ];
+ })
+
+ (mkIf serviceCfg.games.enable {
+ environment.systemPackages = (with pkgs.gnome3; removePackagesByName [
+ aisleriot atomix five-or-more four-in-a-row gnome-chess gnome-klotski
+ gnome-mahjongg gnome-mines gnome-nibbles gnome-robots gnome-sudoku
+ gnome-taquin gnome-tetravex hitori iagno lightsoff quadrapassel
+ swell-foop tali
+ ] config.environment.gnome3.excludePackages);
+ })
+ ];
}
diff --git a/nixos/modules/services/x11/desktop-managers/lxqt.nix b/nixos/modules/services/x11/desktop-managers/lxqt.nix
index 4368adedb34b..bf53082b267d 100644
--- a/nixos/modules/services/x11/desktop-managers/lxqt.nix
+++ b/nixos/modules/services/x11/desktop-managers/lxqt.nix
@@ -58,7 +58,8 @@ in
# Link some extra directories in /run/current-system/software/share
environment.pathsToLink = [ "/share" ];
- environment.variables.GIO_EXTRA_MODULES = [ "${pkgs.gvfs}/lib/gio/modules" ];
+ services.gvfs.enable = true;
+ services.gvfs.package = pkgs.gvfs;
services.upower.enable = config.powerManagement.enable;
};
diff --git a/nixos/modules/services/x11/desktop-managers/mate.nix b/nixos/modules/services/x11/desktop-managers/mate.nix
index a2d0810f90df..fe63f36cf96a 100644
--- a/nixos/modules/services/x11/desktop-managers/mate.nix
+++ b/nixos/modules/services/x11/desktop-managers/mate.nix
@@ -48,12 +48,6 @@ in
name = "mate";
bgSupport = true;
start = ''
- # Set GTK_DATA_PREFIX so that GTK+ can find the themes
- export GTK_DATA_PREFIX=${config.system.path}
-
- # Find theme engines
- export GTK_PATH=${config.system.path}/lib/gtk-3.0:${config.system.path}/lib/gtk-2.0
-
export XDG_MENU_PREFIX=mate-
# Let caja find extensions
@@ -91,19 +85,25 @@ in
pkgs.gtk3.out
pkgs.shared-mime-info
pkgs.xdg-user-dirs # Update user dirs as described in https://freedesktop.org/wiki/Software/xdg-user-dirs/
+ pkgs.mate.mate-settings-daemon
];
programs.dconf.enable = true;
+ # Shell integration for VTE terminals
+ programs.bash.vteIntegration = mkDefault true;
+ programs.zsh.vteIntegration = mkDefault true;
+
+ # Mate uses this for printing
+ programs.system-config-printer.enable = (mkIf config.services.printing.enable (mkDefault true));
+
services.gnome3.at-spi2-core.enable = true;
services.gnome3.gnome-keyring.enable = true;
services.gnome3.gnome-settings-daemon.enable = true;
- services.gnome3.gnome-settings-daemon.package = pkgs.mate.mate-settings-daemon;
- services.gnome3.gvfs.enable = true;
+ services.udev.packages = [ pkgs.mate.mate-settings-daemon ];
+ services.gvfs.enable = true;
services.upower.enable = config.powerManagement.enable;
- security.pam.services."mate-screensaver".unixAuth = true;
-
- environment.variables.GIO_EXTRA_MODULES = [ "${pkgs.gnome3.gvfs}/lib/gio/modules" ];
+ security.pam.services.mate-screensaver.unixAuth = true;
environment.pathsToLink = [ "/share" ];
};
diff --git a/nixos/modules/services/x11/desktop-managers/pantheon.nix b/nixos/modules/services/x11/desktop-managers/pantheon.nix
index e27a479adadd..80dab135ee26 100644
--- a/nixos/modules/services/x11/desktop-managers/pantheon.nix
+++ b/nixos/modules/services/x11/desktop-managers/pantheon.nix
@@ -79,8 +79,7 @@ in
Using Pantheon without LightDM as a displayManager will break screenlocking from the UI.
'';
- services.xserver.displayManager.lightdm.enable = mkDefault true;
- services.xserver.displayManager.lightdm.greeters.gtk.enable = mkDefault true;
+ services.xserver.displayManager.lightdm.greeters.pantheon.enable = mkDefault true;
# If not set manually Pantheon session cannot be started
# Known issue of https://github.com/NixOS/nixpkgs/pull/43992
@@ -98,10 +97,6 @@ in
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${p}/lib
fi
'') cfg.sessionPath}
-
- # Makes qt applications look less alien
- export QT_QPA_PLATFORMTHEME=gtk3
- export QT_STYLE_OVERRIDE=adwaita
fi
'';
@@ -113,21 +108,20 @@ in
services.colord.enable = mkDefault true;
services.pantheon.files.enable = mkDefault true;
services.tumbler.enable = mkDefault true;
- services.dbus.packages = mkMerge [
- ([ pkgs.pantheon.switchboard-plug-power ])
- (mkIf config.services.printing.enable ([pkgs.system-config-printer]) )
+ services.system-config-printer.enable = (mkIf config.services.printing.enable (mkDefault true));
+ services.dbus.packages = with pkgs.pantheon; [
+ switchboard-plug-power
+ elementary-default-settings
];
services.pantheon.contractor.enable = mkDefault true;
services.gnome3.at-spi2-core.enable = true;
- services.gnome3.evince.enable = mkDefault true;
services.gnome3.evolution-data-server.enable = true;
- services.gnome3.file-roller.enable = mkDefault true;
- # TODO: gnome-keyring's xdg autostarts will still be in the environment (from elementary-session-settings) if disabled forcefully
services.gnome3.glib-networking.enable = true;
+ # TODO: gnome-keyring's xdg autostarts will still be in the environment (from elementary-session-settings) if disabled forcefully
services.gnome3.gnome-keyring.enable = true;
services.gnome3.gnome-settings-daemon.enable = true;
- services.gnome3.gnome-settings-daemon.package = pkgs.pantheon.elementary-settings-daemon;
- services.gnome3.gvfs.enable = true;
+ services.udev.packages = [ pkgs.pantheon.elementary-settings-daemon ];
+ services.gvfs.enable = true;
services.gnome3.rygel.enable = mkDefault true;
services.gsignond.enable = mkDefault true;
services.gsignond.plugins = with pkgs.gsignondPlugins; [ lastfm mail oauth ];
@@ -136,7 +130,6 @@ in
services.xserver.libinput.enable = mkDefault true;
services.xserver.updateDbusEnvironment = true;
services.zeitgeist.enable = mkDefault true;
-
services.geoclue2.enable = mkDefault true;
# pantheon has pantheon-agent-geoclue2
services.geoclue2.enableDemoAgent = false;
@@ -145,22 +138,33 @@ in
isSystem = true;
};
+ programs.dconf.enable = true;
+ programs.evince.enable = mkDefault true;
+ programs.file-roller.enable = mkDefault true;
+ # Otherwise you can't store NetworkManager Secrets with
+ # "Store the password only for this user"
+ programs.nm-applet.enable = true;
+
+ # Shell integration for VTE terminals
+ programs.bash.vteIntegration = mkDefault true;
+ programs.zsh.vteIntegration = mkDefault true;
+
+ # Harmonize Qt5 applications under Pantheon
+ qt5.enable = true;
+ qt5.platformTheme = "gnome";
+ qt5.style = "adwaita";
+
networking.networkmanager.enable = mkDefault true;
- networking.networkmanager.basePackages =
- { inherit (pkgs) networkmanager modemmanager wpa_supplicant crda;
- inherit (pkgs.gnome3) networkmanager-openvpn networkmanager-vpnc
- networkmanager-openconnect networkmanager-fortisslvpn
- networkmanager-iodine networkmanager-l2tp; };
# Override GSettings schemas
- environment.variables.NIX_GSETTINGS_OVERRIDES_DIR = "${nixos-gsettings-desktop-schemas}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas";
+ environment.sessionVariables.NIX_GSETTINGS_OVERRIDES_DIR = "${nixos-gsettings-desktop-schemas}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas";
- environment.variables.GNOME_SESSION_DEBUG = optionalString cfg.debug "1";
+ environment.sessionVariables.GNOME_SESSION_DEBUG = optionalString cfg.debug "1";
- environment.variables.GIO_EXTRA_MODULES = [
- "${lib.getLib pkgs.gnome3.dconf}/lib/gio/modules"
- "${pkgs.gnome3.gvfs}/lib/gio/modules"
- ];
+ # Settings from elementary-default-settings
+ environment.sessionVariables.GTK_CSD = "1";
+ environment.sessionVariables.GTK_MODULES = "pantheon-filechooser-module";
+ environment.etc."gtk-3.0/settings.ini".source = "${pkgs.pantheon.elementary-default-settings}/etc/gtk-3.0/settings.ini";
environment.pathsToLink = [
# FIXME: modules should link subdirs of `/share` rather than relying on this
@@ -183,10 +187,10 @@ in
glib-networking
gnome-menus
gnome3.adwaita-icon-theme
- gnome3.dconf
gtk3.out
hicolor-icon-theme
lightlocker
+ onboard
plank
qgnomeplatform
shared-mime-info
diff --git a/nixos/modules/services/x11/desktop-managers/plasma5.nix b/nixos/modules/services/x11/desktop-managers/plasma5.nix
index 6d148fba8954..b6fb7218da6f 100644
--- a/nixos/modules/services/x11/desktop-managers/plasma5.nix
+++ b/nixos/modules/services/x11/desktop-managers/plasma5.nix
@@ -72,7 +72,7 @@ in
security.wrappers = {
kcheckpass.source = "${lib.getBin plasma5.kscreenlocker}/libexec/kcheckpass";
- "start_kdeinit".source = "${lib.getBin pkgs.kinit}/libexec/kf5/start_kdeinit";
+ start_kdeinit.source = "${lib.getBin pkgs.kinit}/libexec/kf5/start_kdeinit";
kwin_wayland = {
source = "${lib.getBin plasma5.kwin}/bin/kwin_wayland";
capabilities = "cap_sys_nice+ep";
@@ -178,12 +178,13 @@ in
++ lib.optional (cfg.phononBackend == "vlc" && cfg.enableQt4Support) pkgs.phonon-backend-vlc
# Optional hardware support features
- ++ lib.optional config.hardware.bluetooth.enable bluedevil
+ ++ lib.optionals config.hardware.bluetooth.enable [ bluedevil bluez-qt ]
++ lib.optional config.networking.networkmanager.enable plasma-nm
++ lib.optional config.hardware.pulseaudio.enable plasma-pa
++ lib.optional config.powerManagement.enable powerdevil
++ lib.optional config.services.colord.enable colord-kde
- ++ lib.optionals config.services.samba.enable [ kdenetwork-filesharing pkgs.samba ];
+ ++ lib.optionals config.services.samba.enable [ kdenetwork-filesharing pkgs.samba ]
+ ++ lib.optional config.services.xserver.wacom.enable wacomtablet;
environment.pathsToLink = [
# FIXME: modules should link subdirs of `/share` rather than relying on this
@@ -210,8 +211,8 @@ in
# Enable helpful DBus services.
services.udisks2.enable = true;
services.upower.enable = config.powerManagement.enable;
- services.dbus.packages =
- mkIf config.services.printing.enable [ pkgs.system-config-printer ];
+ services.system-config-printer.enable = (mkIf config.services.printing.enable (mkDefault true));
+ services.xserver.libinput.enable = mkDefault true;
# Extra UDEV rules used by Solid
services.udev.packages = [
diff --git a/nixos/modules/services/x11/desktop-managers/surf-display.nix b/nixos/modules/services/x11/desktop-managers/surf-display.nix
new file mode 100644
index 000000000000..140dde828daa
--- /dev/null
+++ b/nixos/modules/services/x11/desktop-managers/surf-display.nix
@@ -0,0 +1,127 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+ cfg = config.services.xserver.desktopManager.surf-display;
+
+ surfDisplayConf = ''
+ # Surf Kiosk Display: Wrap around surf browser and turn your
+ # system into a browser screen in KIOSK-mode.
+
+ # default download URI for all display screens if not configured individually
+ DEFAULT_WWW_URI="${cfg.defaultWwwUri}"
+
+ # Enforce fixed resolution for all displays (default: not set):
+ #DEFAULT_RESOLUTION="1920x1080"
+
+ # HTTP proxy URL, if needed (default: not set).
+ #HTTP_PROXY_URL="http://webcache:3128"
+
+ # Setting for internal inactivity timer to restart surf-display
+ # if the user goes inactive/idle.
+ INACTIVITY_INTERVAL="${builtins.toString cfg.inactivityInterval}"
+
+ # log to syslog instead of .xsession-errors
+ LOG_TO_SYSLOG="yes"
+
+ # Launch pulseaudio daemon if not already running.
+ WITH_PULSEAUDIO="yes"
+
+ # screensaver settings, see "man 1 xset" for possible options
+ SCREENSAVER_SETTINGS="${cfg.screensaverSettings}"
+
+ # disable right and middle pointer device click in browser sessions while keeping
+ # scrolling wheels' functionality intact... (consider "pointer" subcommand on
+ # xmodmap man page for details).
+ POINTER_BUTTON_MAP="${cfg.pointerButtonMap}"
+
+ # Hide idle mouse pointer.
+ HIDE_IDLE_POINTER="${cfg.hideIdlePointer}"
+
+ ${cfg.extraConfig}
+ '';
+
+in {
+ options = {
+ services.xserver.desktopManager.surf-display = {
+ enable = mkEnableOption "surf-display as a kiosk browser session";
+
+ defaultWwwUri = mkOption {
+ type = types.str;
+ default = "${pkgs.surf-display}/share/surf-display/empty-page.html";
+ example = "https://www.example.com/";
+ description = "Default URI to display.";
+ };
+
+ inactivityInterval = mkOption {
+ type = types.int;
+ default = 300;
+ example = "0";
+ description = ''
+ Setting for internal inactivity timer to restart surf-display if the
+ user goes inactive/idle to get a fresh session for the next user of
+ the kiosk.
+
+ If this value is set to zero, the whole feature of restarting due to
+ inactivity is disabled.
+ '';
+ };
+
+ screensaverSettings = mkOption {
+ type = types.separatedString " ";
+ default = "";
+ description = ''
+ Screensaver settings, see man 1 xset for possible options.
+ '';
+ };
+
+ pointerButtonMap = mkOption {
+ type = types.str;
+ default = "1 0 0 4 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0";
+ description = ''
+ Disable right and middle pointer device click in browser sessions
+ while keeping scrolling wheels' functionality intact. See pointer
+ subcommand on man xmodmap for details.
+ '';
+ };
+
+ hideIdlePointer = mkOption {
+ type = types.str;
+ default = "yes";
+ example = "no";
+ description = "Hide idle mouse pointer.";
+ };
+
+ extraConfig = mkOption {
+ type = types.lines;
+ default = "";
+ example = ''
+ # Enforce fixed resolution for all displays (default: not set):
+ DEFAULT_RESOLUTION="1920x1080"
+
+ # HTTP proxy URL, if needed (default: not set).
+ HTTP_PROXY_URL="http://webcache:3128"
+
+ # Configure individual display screens with host specific parameters:
+ DISPLAYS['display-host-0']="www_uri=https://www.displayserver.comany.net/display-1/index.html"
+ DISPLAYS['display-host-1']="www_uri=https://www.displayserver.comany.net/display-2/index.html"
+ DISPLAYS['display-host-2']="www_uri=https://www.displayserver.comany.net/display-3/index.html|res=1920x1280"
+ DISPLAYS['display-host-3']="www_uri=https://www.displayserver.comany.net/display-4/index.html"|res=1280x1024"
+ DISPLAYS['display-host-local-file']="www_uri=file:///usr/share/doc/surf-display/empty-page.html"
+ '';
+ description = ''
+ Extra configuration options to append to /etc/default/surf-display.
+ '';
+ };
+ };
+ };
+
+ config = mkIf cfg.enable {
+ services.xserver.displayManager.extraSessionFilePackages = [
+ pkgs.surf-display
+ ];
+
+ environment.etc."default/surf-display".text = surfDisplayConf;
+ };
+}
diff --git a/nixos/modules/services/x11/desktop-managers/xfce.nix b/nixos/modules/services/x11/desktop-managers/xfce.nix
index 6852154378d7..6965c6d26467 100644
--- a/nixos/modules/services/x11/desktop-managers/xfce.nix
+++ b/nixos/modules/services/x11/desktop-managers/xfce.nix
@@ -48,7 +48,7 @@ in
config = mkIf cfg.enable {
environment.systemPackages = with pkgs.xfce // pkgs; [
- # Get GTK+ themes and gtk-update-icon-cache
+ # Get GTK themes and gtk-update-icon-cache
gtk2.out
# Supplies some abstract icons such as:
@@ -66,7 +66,6 @@ in
exo
garcon
gtk-xfce-engine
- gvfs
libxfce4ui
tumbler
xfconf
@@ -100,10 +99,6 @@ in
"/share/gtksourceview-2.0"
];
- environment.variables = {
- GIO_EXTRA_MODULES = [ "${pkgs.xfce.gvfs}/lib/gio/modules" ];
- };
-
services.xserver.gdk-pixbuf.modulePackages = [ pkgs.librsvg ];
services.xserver.desktopManager.session = [{
@@ -112,12 +107,6 @@ in
start = ''
${cfg.extraSessionCommands}
- # Set GTK_PATH so that GTK+ can find the theme engines.
- export GTK_PATH="${config.system.path}/lib/gtk-2.0:${config.system.path}/lib/gtk-3.0"
-
- # Set GTK_DATA_PREFIX so that GTK+ can find the Xfce themes.
- export GTK_DATA_PREFIX=${config.system.path}
-
${pkgs.runtimeShell} ${pkgs.xfce.xinitrc} &
waitPID=$!
'';
@@ -128,5 +117,7 @@ in
# Enable helpful DBus services.
services.udisks2.enable = true;
services.upower.enable = config.powerManagement.enable;
+ services.gvfs.enable = true;
+ services.gvfs.package = pkgs.xfce.gvfs;
};
}
diff --git a/nixos/modules/services/x11/desktop-managers/xfce4-14.nix b/nixos/modules/services/x11/desktop-managers/xfce4-14.nix
new file mode 100644
index 000000000000..ffc99172e795
--- /dev/null
+++ b/nixos/modules/services/x11/desktop-managers/xfce4-14.nix
@@ -0,0 +1,152 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+ cfg = config.services.xserver.desktopManager.xfce4-14;
+in
+
+{
+ # added 2019-08-18
+ # needed to preserve some semblance of UI familarity
+ # with original XFCE module
+ imports = [
+ (mkRenamedOptionModule
+ [ "services" "xserver" "desktopManager" "xfce4-14" "extraSessionCommands" ]
+ [ "services" "xserver" "displayManager" "sessionCommands" ])
+ ];
+
+ options = {
+ services.xserver.desktopManager.xfce4-14 = {
+ enable = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Enable the Xfce desktop environment.";
+ };
+
+ # TODO: support thunar plugins
+ # thunarPlugins = mkOption {
+ # default = [];
+ # type = types.listOf types.package;
+ # example = literalExample "[ pkgs.xfce4-14.thunar-archive-plugin ]";
+ # description = ''
+ # A list of plugin that should be installed with Thunar.
+ # '';
+ # };
+
+ noDesktop = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Don't install XFCE desktop components (xfdesktop, panel and notification daemon).";
+ };
+
+ enableXfwm = mkOption {
+ type = types.bool;
+ default = true;
+ description = "Enable the XFWM (default) window manager.";
+ };
+ };
+ };
+
+ config = mkIf cfg.enable {
+ environment.systemPackages = with pkgs.xfce4-14 // pkgs; [
+ glib # for gsettings
+ gtk3.out # gtk-update-icon-cache
+
+ gnome3.gnome-themes-extra
+ gnome3.adwaita-icon-theme
+ hicolor-icon-theme
+ tango-icon-theme
+ xfce4-icon-theme
+
+ desktop-file-utils
+ shared-mime-info # for update-mime-database
+
+ # For a polkit authentication agent
+ polkit_gnome
+
+ # Needed by Xfce's xinitrc script
+ xdg-user-dirs # Update user dirs as described in https://freedesktop.org/wiki/Software/xdg-user-dirs/
+
+ exo
+ garcon
+ libxfce4ui
+ xfconf
+
+ mousepad
+ parole
+ ristretto
+ xfce4-appfinder
+ xfce4-screenshooter
+ xfce4-session
+ xfce4-settings
+ xfce4-taskmanager
+ xfce4-terminal
+
+ # TODO: resync patch for plugins
+ #(thunar.override { thunarPlugins = cfg.thunarPlugins; })
+ thunar
+ ] # TODO: NetworkManager doesn't belong here
+ ++ optional config.networking.networkmanager.enable networkmanagerapplet
+ ++ optional config.powerManagement.enable xfce4-power-manager
+ ++ optionals config.hardware.pulseaudio.enable [
+ pavucontrol
+ # volume up/down keys support:
+ # xfce4-pulseaudio-plugin includes all the functionalities of xfce4-volumed-pulse
+ # but can only be used with xfce4-panel, so for no-desktop usage we still include
+ # xfce4-volumed-pulse
+ (if cfg.noDesktop then xfce4-volumed-pulse else xfce4-pulseaudio-plugin)
+ ] ++ optionals cfg.enableXfwm [
+ xfwm4
+ xfwm4-themes
+ ] ++ optionals (!cfg.noDesktop) [
+ xfce4-notifyd
+ xfce4-panel
+ xfdesktop
+ ];
+
+ environment.pathsToLink = [
+ "/share/xfce4"
+ "/lib/xfce4"
+ "/share/gtksourceview-3.0"
+ "/share/gtksourceview-4.0"
+ ];
+
+ services.xserver.desktopManager.session = [{
+ name = "xfce4-14";
+ bgSupport = true;
+ start = ''
+ ${pkgs.runtimeShell} ${pkgs.xfce4-14.xinitrc} &
+ waitPID=$!
+ '';
+ }];
+
+ services.xserver.updateDbusEnvironment = true;
+ services.xserver.gdk-pixbuf.modulePackages = [ pkgs.librsvg ];
+
+ # Enable helpful DBus services.
+ services.udisks2.enable = true;
+ security.polkit.enable = true;
+ services.accounts-daemon.enable = true;
+ services.upower.enable = config.powerManagement.enable;
+ services.gnome3.glib-networking.enable = true;
+ services.gvfs.enable = true;
+ services.gvfs.package = pkgs.xfce.gvfs;
+ services.tumbler.enable = true;
+ services.system-config-printer.enable = (mkIf config.services.printing.enable (mkDefault true));
+ services.xserver.libinput.enable = mkDefault true; # used in xfce4-settings-manager
+
+ # Enable default programs
+ programs.dconf.enable = true;
+
+ # Shell integration for VTE terminals
+ programs.bash.vteIntegration = mkDefault true;
+ programs.zsh.vteIntegration = mkDefault true;
+
+ # Systemd services
+ systemd.packages = with pkgs.xfce4-14; [
+ thunar
+ ] ++ optional (!cfg.noDesktop) xfce4-notifyd;
+
+ };
+}
diff --git a/nixos/modules/services/x11/desktop-managers/xterm.nix b/nixos/modules/services/x11/desktop-managers/xterm.nix
index ea441fbbe715..f76db278a927 100644
--- a/nixos/modules/services/x11/desktop-managers/xterm.nix
+++ b/nixos/modules/services/x11/desktop-managers/xterm.nix
@@ -5,7 +5,7 @@ with lib;
let
cfg = config.services.xserver.desktopManager.xterm;
- xserverEnabled = config.services.xserver.enable;
+ xSessionEnabled = config.services.xserver.enable;
in
@@ -14,8 +14,8 @@ in
services.xserver.desktopManager.xterm.enable = mkOption {
type = types.bool;
- default = xserverEnabled;
- defaultText = "config.services.xserver.enable";
+ default = (versionOlder config.system.stateVersion "19.09") && xSessionEnabled;
+ defaultText = if versionOlder config.system.stateVersion "19.09" then "config.services.xserver.enable" else "false";
description = "Enable a xterm terminal as a desktop manager.";
};
diff --git a/nixos/modules/services/x11/display-managers/default.nix b/nixos/modules/services/x11/display-managers/default.nix
index 0e87e6adbab8..bf6b048654b3 100644
--- a/nixos/modules/services/x11/display-managers/default.nix
+++ b/nixos/modules/services/x11/display-managers/default.nix
@@ -109,7 +109,7 @@ let
# Allow the user to setup a custom session type.
if test -x ~/.xsession; then
- exec ~/.xsession
+ eval exec ~/.xsession "$@"
fi
if test "$1"; then
diff --git a/nixos/modules/services/x11/display-managers/gdm.nix b/nixos/modules/services/x11/display-managers/gdm.nix
index ff4b91923e02..e5990aec4b9c 100644
--- a/nixos/modules/services/x11/display-managers/gdm.nix
+++ b/nixos/modules/services/x11/display-managers/gdm.nix
@@ -42,10 +42,7 @@ in
services.xserver.displayManager.gdm = {
enable = mkEnableOption ''
- GDM as the display manager.
- GDM in NixOS is not well-tested with desktops other
- than GNOME, so use with caution, as it could render the
- system unusable.
+ GDM, the GNOME Display Manager
'';
debug = mkEnableOption ''
@@ -96,6 +93,14 @@ in
type = types.bool;
};
+ autoSuspend = mkOption {
+ default = true;
+ description = ''
+ Suspend the machine after inactivity.
+ '';
+ type = types.bool;
+ };
+
};
};
@@ -134,8 +139,6 @@ in
GDM_X_SERVER_EXTRA_ARGS = toString
(filter (arg: arg != "-terminate") cfg.xserverArgs);
XDG_DATA_DIRS = "${cfg.session.desktops}/share/";
- # Find the mouse
- XCURSOR_PATH = "~/.icons:${pkgs.gnome3.adwaita-icon-theme}/share/icons";
} // optionalAttrs (xSessionWrapper != null) {
# Make GDM use this wrapper before running the session, which runs the
# configured setupCommands. This relies on a patched GDM which supports
@@ -147,6 +150,12 @@ in
mkdir -p /run/gdm/.config/pulse
ln -sf ${pulseConfig} /run/gdm/.config/pulse/default.pa
chown -R gdm:gdm /run/gdm/.config
+ '' + optionalString config.services.gnome3.gnome-initial-setup.enable ''
+ # Create stamp file for gnome-initial-setup to prevent run.
+ mkdir -p /run/gdm/.config
+ cat - > /run/gdm/.config/gnome-initial-setup-done <<- EOF
+ yes
+ EOF
'';
};
@@ -156,6 +165,17 @@ in
"rc-local.service"
"systemd-machined.service"
"systemd-user-sessions.service"
+ "getty@tty${gdm.initialVT}.service"
+ "plymouth-quit.service"
+ "plymouth-start.service"
+ ];
+ systemd.services.display-manager.conflicts = [
+ "getty@tty${gdm.initialVT}.service"
+ # TODO: Add "plymouth-quit.service" so GDM can control when plymouth quits.
+ # Currently this breaks switching configurations while using plymouth.
+ ];
+ systemd.services.display-manager.onFailure = [
+ "plymouth-quit.service"
];
systemd.services.display-manager.serviceConfig = {
@@ -165,6 +185,9 @@ in
BusName = "org.gnome.DisplayManager";
StandardOutput = "syslog";
StandardError = "inherit";
+ ExecReload = "${pkgs.coreutils}/bin/kill -SIGHUP $MAINPID";
+ KeyringMode = "shared";
+ EnvironmentFile = "-/etc/locale.conf";
};
systemd.services.display-manager.path = [ pkgs.gnome3.gnome-session ];
@@ -176,10 +199,40 @@ in
systemd.user.services.dbus.wantedBy = [ "default.target" ];
- programs.dconf.profiles.gdm = pkgs.writeText "dconf-gdm-profile" ''
- system-db:local
- ${gdm}/share/dconf/profile/gdm
- '';
+ programs.dconf.profiles.gdm =
+ let
+ customDconf = pkgs.writeTextFile {
+ name = "gdm-dconf";
+ destination = "/dconf/gdm-custom";
+ text = ''
+ ${optionalString (!cfg.gdm.autoSuspend) ''
+ [org/gnome/settings-daemon/plugins/power]
+ sleep-inactive-ac-type='nothing'
+ sleep-inactive-battery-type='nothing'
+ sleep-inactive-ac-timeout=0
+ sleep-inactive-battery-timeout=0
+ ''}
+ '';
+ };
+
+ customDconfDb = pkgs.stdenv.mkDerivation {
+ name = "gdm-dconf-db";
+ buildCommand = ''
+ ${pkgs.gnome3.dconf}/bin/dconf compile $out ${customDconf}/dconf
+ '';
+ };
+ in pkgs.stdenv.mkDerivation {
+ name = "dconf-gdm-profile";
+ buildCommand = ''
+ # Check that the GDM profile starts with what we expect.
+ if [ $(head -n 1 ${gdm}/share/dconf/profile/gdm) != "user-db:user" ]; then
+ echo "GDM dconf profile changed, please update gdm.nix"
+ exit 1
+ fi
+ # Insert our custom DB behind it.
+ sed '2ifile-db:${customDconfDb}' ${gdm}/share/dconf/profile/gdm > $out
+ '';
+ };
# Use AutomaticLogin if delay is zero, because it's immediate.
# Otherwise with TimedLogin with zero seconds the prompt is still
@@ -224,7 +277,7 @@ in
password required pam_deny.so
session required pam_succeed_if.so audit quiet_success user = gdm
- session required pam_env.so envfile=${config.system.build.pamEnvironment}
+ session required pam_env.so conffile=${config.system.build.pamEnvironment} readenv=0
session optional ${pkgs.systemd}/lib/security/pam_systemd.so
session optional pam_keyinit.so force revoke
session optional pam_permit.so
diff --git a/nixos/modules/services/x11/display-managers/lightdm-greeters/enso-os.nix b/nixos/modules/services/x11/display-managers/lightdm-greeters/enso-os.nix
index de128809ce30..129df139c61a 100644
--- a/nixos/modules/services/x11/display-managers/lightdm-greeters/enso-os.nix
+++ b/nixos/modules/services/x11/display-managers/lightdm-greeters/enso-os.nix
@@ -10,32 +10,6 @@ let
icons = cfg.iconTheme.package;
cursors = cfg.cursorTheme.package;
- # We need a few things in the environment for the greeter to run with
- # fonts/icons.
- wrappedEnsoGreeter = pkgs.runCommand "lightdm-enso-os-greeter" {
- buildInputs = [ pkgs.makeWrapper ];
- preferLocalBuild = true;
- } ''
- # This wrapper ensures that we actually get themes
- makeWrapper ${pkgs.lightdm-enso-os-greeter}/bin/pantheon-greeter \
- $out/greeter \
- --prefix PATH : "${pkgs.glibc.bin}/bin" \
- --set GDK_PIXBUF_MODULE_FILE "${pkgs.librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache" \
- --set GTK_PATH "${theme}:${pkgs.gtk3.out}" \
- --set GTK_EXE_PREFIX "${theme}" \
- --set GTK_DATA_PREFIX "${theme}" \
- --set XDG_DATA_DIRS "${theme}/share:${icons}/share:${cursors}/share" \
- --set XDG_CONFIG_HOME "${theme}/share"
-
- cat - > $out/lightdm-enso-os-greeter.desktop << EOF
- [Desktop Entry]
- Name=LightDM Greeter
- Comment=This runs the LightDM Greeter
- Exec=$out/greeter
- Type=Application
- EOF
- '';
-
ensoGreeterConf = pkgs.writeText "lightdm-enso-os-greeter.conf" ''
[greeter]
default-wallpaper=${ldmcfg.background}
@@ -144,10 +118,16 @@ in {
config = mkIf (ldmcfg.enable && cfg.enable) {
environment.etc."lightdm/greeter.conf".source = ensoGreeterConf;
+ environment.systemPackages = [
+ cursors
+ icons
+ theme
+ ];
+
services.xserver.displayManager.lightdm = {
greeter = mkDefault {
- package = wrappedEnsoGreeter;
- name = "lightdm-enso-os-greeter";
+ package = pkgs.lightdm-enso-os-greeter.xgreeters;
+ name = "pantheon-greeter";
};
greeters = {
diff --git a/nixos/modules/services/x11/display-managers/lightdm-greeters/gtk.nix b/nixos/modules/services/x11/display-managers/lightdm-greeters/gtk.nix
index 5b280b024233..de932e6e840a 100644
--- a/nixos/modules/services/x11/display-managers/lightdm-greeters/gtk.nix
+++ b/nixos/modules/services/x11/display-managers/lightdm-greeters/gtk.nix
@@ -15,34 +15,6 @@ let
icons = cfg.iconTheme.package;
cursors = cfg.cursorTheme.package;
- # The default greeter provided with this expression is the GTK greeter.
- # Again, we need a few things in the environment for the greeter to run with
- # fonts/icons.
- wrappedGtkGreeter = pkgs.runCommand "lightdm-gtk-greeter" {
- buildInputs = [ pkgs.makeWrapper ];
- preferLocalBuild = true;
- } ''
- # This wrapper ensures that we actually get themes
- makeWrapper ${pkgs.lightdm_gtk_greeter}/sbin/lightdm-gtk-greeter \
- $out/greeter \
- --prefix PATH : "${lib.getBin pkgs.stdenv.cc.libc}/bin" \
- --set GDK_PIXBUF_MODULE_FILE "${pkgs.librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache" \
- --set GTK_PATH "${theme}:${pkgs.gtk3.out}" \
- --set GTK_EXE_PREFIX "${theme}" \
- --set GTK_DATA_PREFIX "${theme}" \
- --set XDG_DATA_DIRS "${theme}/share:${icons}/share" \
- --set XDG_CONFIG_HOME "${theme}/share" \
- --set XCURSOR_PATH "${cursors}/share/icons"
-
- cat - > $out/lightdm-gtk-greeter.desktop << EOF
- [Desktop Entry]
- Name=LightDM Greeter
- Comment=This runs the LightDM Greeter
- Exec=$out/greeter
- Type=Application
- EOF
- '';
-
gtkGreeterConf = writeText "lightdm-gtk-greeter.conf"
''
[greeter]
@@ -185,10 +157,16 @@ in
config = mkIf (ldmcfg.enable && cfg.enable) {
services.xserver.displayManager.lightdm.greeter = mkDefault {
- package = wrappedGtkGreeter;
+ package = pkgs.lightdm_gtk_greeter.xgreeters;
name = "lightdm-gtk-greeter";
};
+ environment.systemPackages = [
+ cursors
+ icons
+ theme
+ ];
+
environment.etc."lightdm/lightdm-gtk-greeter.conf".source = gtkGreeterConf;
};
diff --git a/nixos/modules/services/x11/display-managers/lightdm-greeters/mini.nix b/nixos/modules/services/x11/display-managers/lightdm-greeters/mini.nix
index ba8151a60f20..fa9445af32e7 100644
--- a/nixos/modules/services/x11/display-managers/lightdm-greeters/mini.nix
+++ b/nixos/modules/services/x11/display-managers/lightdm-greeters/mini.nix
@@ -8,11 +8,6 @@ let
ldmcfg = dmcfg.lightdm;
cfg = ldmcfg.greeters.mini;
- xgreeters = pkgs.linkFarm "lightdm-mini-greeter-xgreeters" [{
- path = "${pkgs.lightdm-mini-greeter}/share/xgreeters/lightdm-mini-greeter.desktop";
- name = "lightdm-mini-greeter.desktop";
- }];
-
miniGreeterConf = pkgs.writeText "lightdm-mini-greeter.conf"
''
[greeter]
@@ -90,7 +85,7 @@ in
services.xserver.displayManager.lightdm.greeters.gtk.enable = false;
services.xserver.displayManager.lightdm.greeter = mkDefault {
- package = xgreeters;
+ package = pkgs.lightdm-mini-greeter.xgreeters;
name = "lightdm-mini-greeter";
};
diff --git a/nixos/modules/services/x11/display-managers/lightdm-greeters/pantheon.nix b/nixos/modules/services/x11/display-managers/lightdm-greeters/pantheon.nix
index bfba174144a1..29cb6ccbc06b 100644
--- a/nixos/modules/services/x11/display-managers/lightdm-greeters/pantheon.nix
+++ b/nixos/modules/services/x11/display-managers/lightdm-greeters/pantheon.nix
@@ -8,11 +8,6 @@ let
ldmcfg = dmcfg.lightdm;
cfg = ldmcfg.greeters.pantheon;
- xgreeters = pkgs.linkFarm "pantheon-greeter-xgreeters" [{
- path = "${pkgs.pantheon.elementary-greeter}/share/xgreeters/io.elementary.greeter.desktop";
- name = "io.elementary.greeter.desktop";
- }];
-
in
{
options = {
@@ -33,17 +28,10 @@ in
config = mkIf (ldmcfg.enable && cfg.enable) {
- warnings = [
- ''
- The Pantheon greeter is suboptimal in NixOS and can possibly put you in
- a situation where you cannot start a session when switching desktopManagers.
- ''
- ];
-
services.xserver.displayManager.lightdm.greeters.gtk.enable = false;
services.xserver.displayManager.lightdm.greeter = mkDefault {
- package = xgreeters;
+ package = pkgs.pantheon.elementary-greeter.xgreeters;
name = "io.elementary.greeter";
};
diff --git a/nixos/modules/services/x11/display-managers/lightdm.nix b/nixos/modules/services/x11/display-managers/lightdm.nix
index afa0cebbc527..cf4c05acbccd 100644
--- a/nixos/modules/services/x11/display-managers/lightdm.nix
+++ b/nixos/modules/services/x11/display-managers/lightdm.nix
@@ -6,7 +6,7 @@ let
xcfg = config.services.xserver;
dmcfg = xcfg.displayManager;
- xEnv = config.systemd.services."display-manager".environment;
+ xEnv = config.systemd.services.display-manager.environment;
cfg = dmcfg.lightdm;
dmDefault = xcfg.desktopManager.default;
@@ -114,7 +114,7 @@ in
};
name = mkOption {
- type = types.string;
+ type = types.str;
description = ''
The name of a .desktop file in the directory specified
in the 'package' option.
@@ -220,6 +220,43 @@ in
exec ${lightdm}/sbin/lightdm
'';
+ # Replaces getty
+ systemd.services.display-manager.conflicts = [
+ "getty@tty7.service"
+ # TODO: Add "plymouth-quit.service" so LightDM can control when plymouth
+ # quits. Currently this breaks switching to configurations with plymouth.
+ ];
+
+ # Pull in dependencies of services we replace.
+ systemd.services.display-manager.after = [
+ "rc-local.service"
+ "systemd-machined.service"
+ "systemd-user-sessions.service"
+ "getty@tty7.service"
+ "user.slice"
+ ];
+
+ # user.slice needs to be present
+ systemd.services.display-manager.requires = [
+ "user.slice"
+ ];
+
+ # lightdm stops plymouth so when it fails make sure plymouth stops.
+ systemd.services.display-manager.onFailure = [
+ "plymouth-quit.service"
+ ];
+
+ systemd.services.display-manager.serviceConfig = {
+ BusName = "org.freedesktop.DisplayManager";
+ IgnoreSIGPIPE = "no";
+ # This allows lightdm to pass the LUKS password through to PAM.
+ # login keyring is unlocked automatic when autologin is used.
+ KeyringMode = "shared";
+ KillMode = "mixed";
+ StandardError = "inherit";
+ StandardOutput = "syslog";
+ };
+
environment.etc."lightdm/lightdm.conf".source = lightdmConf;
environment.etc."lightdm/users.conf".source = usersConf;
@@ -232,36 +269,41 @@ in
# Enable the accounts daemon to find lightdm's dbus interface
environment.systemPackages = [ lightdm ];
- security.pam.services.lightdm = {
- allowNullPassword = true;
- startSession = true;
- };
- security.pam.services.lightdm-greeter = {
- allowNullPassword = true;
- startSession = true;
- text = ''
- auth required pam_env.so envfile=${config.system.build.pamEnvironment}
- auth required pam_permit.so
+ security.pam.services.lightdm.text = ''
+ auth substack login
+ account include login
+ password substack login
+ session include login
+ '';
- account required pam_permit.so
+ security.pam.services.lightdm-greeter.text = ''
+ auth required pam_succeed_if.so audit quiet_success user = lightdm
+ auth optional pam_permit.so
- password required pam_deny.so
+ account required pam_succeed_if.so audit quiet_success user = lightdm
+ account sufficient pam_unix.so
+
+ password required pam_deny.so
+
+ session required pam_succeed_if.so audit quiet_success user = lightdm
+ session required pam_env.so conffile=${config.system.build.pamEnvironment} readenv=0
+ session optional ${pkgs.systemd}/lib/security/pam_systemd.so
+ session optional pam_keyinit.so force revoke
+ session optional pam_permit.so
+ '';
- session required pam_env.so envfile=${config.system.build.pamEnvironment}
- session required pam_unix.so
- session optional ${pkgs.systemd}/lib/security/pam_systemd.so
- '';
- };
security.pam.services.lightdm-autologin.text = ''
- auth requisite pam_nologin.so
- auth required pam_succeed_if.so uid >= 1000 quiet
- auth required pam_permit.so
+ auth requisite pam_nologin.so
- account include lightdm
+ auth required pam_succeed_if.so uid >= 1000 quiet
+ auth required pam_permit.so
- password include lightdm
+ account sufficient pam_unix.so
- session include lightdm
+ password requisite pam_unix.so nullok sha512
+
+ session optional pam_keyinit.so revoke
+ session include login
'';
users.users.lightdm = {
diff --git a/nixos/modules/services/x11/display-managers/sddm.nix b/nixos/modules/services/x11/display-managers/sddm.nix
index d1ed345ac579..8847acb0c604 100644
--- a/nixos/modules/services/x11/display-managers/sddm.nix
+++ b/nixos/modules/services/x11/display-managers/sddm.nix
@@ -7,7 +7,7 @@ let
xcfg = config.services.xserver;
dmcfg = xcfg.displayManager;
cfg = dmcfg.sddm;
- xEnv = config.systemd.services."display-manager".environment;
+ xEnv = config.systemd.services.display-manager.environment;
inherit (pkgs) sddm;
@@ -219,8 +219,6 @@ in
# Load themes from system environment
QT_PLUGIN_PATH = "/run/current-system/sw/" + pkgs.qt5.qtbase.qtPluginPrefix;
QML2_IMPORT_PATH = "/run/current-system/sw/" + pkgs.qt5.qtbase.qtQmlPrefix;
-
- XDG_DATA_DIRS = "/run/current-system/sw/share";
};
execCmd = "exec /run/current-system/sw/bin/sddm";
@@ -242,7 +240,7 @@ in
password required pam_deny.so
session required pam_succeed_if.so audit quiet_success user = sddm
- session required pam_env.so envfile=${config.system.build.pamEnvironment}
+ session required pam_env.so conffile=${config.system.build.pamEnvironment} readenv=0
session optional ${pkgs.systemd}/lib/security/pam_systemd.so
session optional pam_keyinit.so force revoke
session optional pam_permit.so
diff --git a/nixos/modules/services/x11/extra-layouts.nix b/nixos/modules/services/x11/extra-layouts.nix
index 5523dd2bf023..1af98a1318bb 100644
--- a/nixos/modules/services/x11/extra-layouts.nix
+++ b/nixos/modules/services/x11/extra-layouts.nix
@@ -158,7 +158,10 @@ in
});
- services.xserver.xkbDir = "${pkgs.xkb_patched}/etc/X11/xkb";
+ services.xserver = {
+ xkbDir = "${pkgs.xkb_patched}/etc/X11/xkb";
+ exportConfiguration = config.services.xserver.displayManager.startx.enable;
+ };
};
diff --git a/nixos/modules/services/x11/hardware/cmt.nix b/nixos/modules/services/x11/hardware/cmt.nix
new file mode 100644
index 000000000000..5ac824c5e419
--- /dev/null
+++ b/nixos/modules/services/x11/hardware/cmt.nix
@@ -0,0 +1,59 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+
+cfg = config.services.xserver.cmt;
+etcPath = "X11/xorg.conf.d";
+
+in {
+
+ options = {
+
+ services.xserver.cmt = {
+ enable = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Enable chrome multitouch input (cmt). Touchpad drivers that are configured for chromebooks.";
+ };
+ models = mkOption {
+ type = types.enum [ "atlas" "banjo" "candy" "caroline" "cave" "celes" "clapper" "cyan" "daisy" "elan" "elm" "enguarde" "eve" "expresso" "falco" "gandof" "glimmer" "gnawty" "heli" "kevin" "kip" "leon" "lulu" "orco" "pbody" "peppy" "pi" "pit" "puppy" "quawks" "rambi" "samus" "snappy" "spring" "squawks" "swanky" "winky" "wolf" "auron_paine" "auron_yuna" "daisy_skate" "nyan_big" "nyan_blaze" "veyron_jaq" "veyron_jerry" "veyron_mighty" "veyron_minnie" "veyron_speedy" ];
+ example = "banjo";
+ description = ''
+ Which models to enable cmt for. Enter the Code Name for your Chromebook.
+ Code Name can be found at .
+ '';
+ };
+ }; #closes services
+ }; #closes options
+
+ config = mkIf cfg.enable {
+
+ services.xserver.modules = [ pkgs.xf86_input_cmt ];
+
+ environment.etc = {
+ "${etcPath}/40-touchpad-cmt.conf" = {
+ source = "${pkgs.chromium-xorg-conf}/40-touchpad-cmt.conf";
+ };
+ "${etcPath}/50-touchpad-cmt-${cfg.models}.conf" = {
+ source = "${pkgs.chromium-xorg-conf}/50-touchpad-cmt-${cfg.models}.conf";
+ };
+ "${etcPath}/60-touchpad-cmt-${cfg.models}.conf" = {
+ source = "${pkgs.chromium-xorg-conf}/60-touchpad-cmt-${cfg.models}.conf";
+ };
+ };
+
+ assertions = [
+ {
+ assertion = !config.services.xserver.libinput.enable;
+ message = ''
+ cmt and libinput are incompatible, meaning you cannot enable them both.
+ To use cmt you need to disable libinput with `services.xserver.libinput.enable = false`
+ If you haven't enabled it in configuration.nix, it's enabled by default on a
+ different xserver module.
+ '';
+ }
+ ];
+ };
+}
diff --git a/nixos/modules/services/x11/hardware/libinput.nix b/nixos/modules/services/x11/hardware/libinput.nix
index a0a5e2656852..bd289976532b 100644
--- a/nixos/modules/services/x11/hardware/libinput.nix
+++ b/nixos/modules/services/x11/hardware/libinput.nix
@@ -41,13 +41,13 @@ in {
};
accelSpeed = mkOption {
- type = types.nullOr types.string;
+ type = types.nullOr types.str;
default = null;
description = "Cursor acceleration (how fast speed increases from minSpeed to maxSpeed).";
};
buttonMapping = mkOption {
- type = types.nullOr types.string;
+ type = types.nullOr types.str;
default = null;
description =
''
@@ -61,7 +61,7 @@ in {
};
calibrationMatrix = mkOption {
- type = types.nullOr types.string;
+ type = types.nullOr types.str;
default = null;
description =
''
diff --git a/nixos/modules/services/x11/hardware/synaptics.nix b/nixos/modules/services/x11/hardware/synaptics.nix
index f032c5938852..22af869f1f8a 100644
--- a/nixos/modules/services/x11/hardware/synaptics.nix
+++ b/nixos/modules/services/x11/hardware/synaptics.nix
@@ -44,19 +44,19 @@ in {
};
accelFactor = mkOption {
- type = types.nullOr types.string;
+ type = types.nullOr types.str;
default = "0.001";
description = "Cursor acceleration (how fast speed increases from minSpeed to maxSpeed).";
};
minSpeed = mkOption {
- type = types.nullOr types.string;
+ type = types.nullOr types.str;
default = "0.6";
description = "Cursor speed factor for precision finger motion.";
};
maxSpeed = mkOption {
- type = types.nullOr types.string;
+ type = types.nullOr types.str;
default = "1.0";
description = "Cursor speed factor for highest-speed finger motion.";
};
@@ -167,7 +167,7 @@ in {
services.xserver.modules = [ pkg.out ];
- environment.etc."${etcFile}".source =
+ environment.etc.${etcFile}.source =
"${pkg.out}/share/X11/xorg.conf.d/70-synaptics.conf";
environment.systemPackages = [ pkg ];
diff --git a/nixos/modules/services/x11/redshift.nix b/nixos/modules/services/x11/redshift.nix
index 4345a3348081..21b0b33553ac 100644
--- a/nixos/modules/services/x11/redshift.nix
+++ b/nixos/modules/services/x11/redshift.nix
@@ -5,9 +5,26 @@ with lib;
let
cfg = config.services.redshift;
+ lcfg = config.location;
in {
+ imports = [
+ (mkChangedOptionModule [ "services" "redshift" "latitude" ] [ "location" "latitude" ]
+ (config:
+ let value = getAttrFromPath [ "services" "redshift" "latitude" ] config;
+ in if value == null then
+ throw "services.redshift.latitude is set to null, you can remove this"
+ else builtins.fromJSON value))
+ (mkChangedOptionModule [ "services" "redshift" "longitude" ] [ "location" "longitude" ]
+ (config:
+ let value = getAttrFromPath [ "services" "redshift" "longitude" ] config;
+ in if value == null then
+ throw "services.redshift.longitude is set to null, you can remove this"
+ else builtins.fromJSON value))
+ (mkRenamedOptionModule [ "services" "redshift" "provider" ] [ "location" "provider" ])
+ ];
+
options.services.redshift = {
enable = mkOption {
type = types.bool;
@@ -18,35 +35,6 @@ in {
'';
};
- latitude = mkOption {
- type = types.nullOr types.str;
- default = null;
- description = ''
- Your current latitude, between
- -90.0 and 90.0. Must be provided
- along with longitude.
- '';
- };
-
- longitude = mkOption {
- type = types.nullOr types.str;
- default = null;
- description = ''
- Your current longitude, between
- between -180.0 and 180.0. Must be
- provided along with latitude.
- '';
- };
-
- provider = mkOption {
- type = types.enum [ "manual" "geoclue2" ];
- default = "manual";
- description = ''
- The location provider to use for determining your location. If set to
- manual you must also provide latitude/longitude.
- '';
- };
-
temperature = {
day = mkOption {
type = types.int;
@@ -106,33 +94,19 @@ in {
};
config = mkIf cfg.enable {
- assertions = [
- {
- assertion =
- if cfg.provider == "manual"
- then (cfg.latitude != null && cfg.longitude != null)
- else (cfg.latitude == null && cfg.longitude == null);
- message = "Latitude and longitude must be provided together, and with provider set to null.";
- }
- ];
-
# needed so that .desktop files are installed, which geoclue cares about
environment.systemPackages = [ cfg.package ];
- services.geoclue2 = mkIf (cfg.provider == "geoclue2") {
- enable = true;
- appConfig."redshift" = {
- isAllowed = true;
- isSystem = true;
- };
+ services.geoclue2.appConfig.redshift = {
+ isAllowed = true;
+ isSystem = true;
};
- systemd.user.services.redshift =
+ systemd.user.services.redshift =
let
- providerString =
- if cfg.provider == "manual"
- then "${cfg.latitude}:${cfg.longitude}"
- else cfg.provider;
+ providerString = if lcfg.provider == "manual"
+ then "${toString lcfg.latitude}:${toString lcfg.longitude}"
+ else lcfg.provider;
in
{
description = "Redshift colour temperature adjuster";
diff --git a/nixos/modules/services/x11/window-managers/cwm.nix b/nixos/modules/services/x11/window-managers/cwm.nix
new file mode 100644
index 000000000000..03375a226bb6
--- /dev/null
+++ b/nixos/modules/services/x11/window-managers/cwm.nix
@@ -0,0 +1,23 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+ cfg = config.services.xserver.windowManager.cwm;
+in
+{
+ options = {
+ services.xserver.windowManager.cwm.enable = mkEnableOption "cwm";
+ };
+ config = mkIf cfg.enable {
+ services.xserver.windowManager.session = singleton
+ { name = "cwm";
+ start =
+ ''
+ cwm &
+ waitPID=$!
+ '';
+ };
+ environment.systemPackages = [ pkgs.cwm ];
+ };
+}
diff --git a/nixos/modules/services/x11/window-managers/default.nix b/nixos/modules/services/x11/window-managers/default.nix
index 2a1f22fa9a4c..c17f3830d0e9 100644
--- a/nixos/modules/services/x11/window-managers/default.nix
+++ b/nixos/modules/services/x11/window-managers/default.nix
@@ -11,6 +11,7 @@ in
./2bwm.nix
./afterstep.nix
./bspwm.nix
+ ./cwm.nix
./dwm.nix
./evilwm.nix
./exwm.nix
diff --git a/nixos/modules/services/x11/window-managers/xmonad.nix b/nixos/modules/services/x11/window-managers/xmonad.nix
index a6055f26789e..0e1314122767 100644
--- a/nixos/modules/services/x11/window-managers/xmonad.nix
+++ b/nixos/modules/services/x11/window-managers/xmonad.nix
@@ -59,7 +59,7 @@ in
config = mkOption {
default = null;
- type = with lib.types; nullOr (either path string);
+ type = with lib.types; nullOr (either path str);
description = ''
Configuration from which XMonad gets compiled. If no value
is specified, the xmonad config from $HOME/.xmonad is taken.
diff --git a/nixos/modules/services/x11/xautolock.nix b/nixos/modules/services/x11/xautolock.nix
index cbe000058dc6..3e03131ca114 100644
--- a/nixos/modules/services/x11/xautolock.nix
+++ b/nixos/modules/services/x11/xautolock.nix
@@ -129,10 +129,10 @@ in
assertion = cfg.killer != null -> cfg.killtime >= 10;
message = "killtime has to be at least 10 minutes according to `man xautolock`";
}
- ] ++ (lib.flip map [ "locker" "notifier" "nowlocker" "killer" ]
+ ] ++ (lib.forEach [ "locker" "notifier" "nowlocker" "killer" ]
(option:
{
- assertion = cfg."${option}" != null -> builtins.substring 0 1 cfg."${option}" == "/";
+ assertion = cfg.${option} != null -> builtins.substring 0 1 cfg.${option} == "/";
message = "Please specify a canonical path for `services.xserver.xautolock.${option}`";
})
);
diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix
index b1a316706976..a8406544a72f 100644
--- a/nixos/modules/services/x11/xserver.nix
+++ b/nixos/modules/services/x11/xserver.nix
@@ -78,7 +78,7 @@ let
in imap1 mkHead cfg.xrandrHeads;
xrandrDeviceSection = let
- monitors = flip map xrandrHeads (h: ''
+ monitors = forEach xrandrHeads (h: ''
Option "monitor-${h.config.output}" "${h.name}"
'');
# First option is indented through the space in the config but any
@@ -659,7 +659,7 @@ in
systemd.services.display-manager =
{ description = "X11 Server";
- after = [ "systemd-udev-settle.service" "local-fs.target" "acpid.service" "systemd-logind.service" ];
+ after = [ "systemd-udev-settle.service" "acpid.service" "systemd-logind.service" ];
wants = [ "systemd-udev-settle.service" ];
restartIfChanged = false;
@@ -714,7 +714,7 @@ in
nativeBuildInputs = [ pkgs.xkbvalidate ];
preferLocalBuild = true;
} ''
- validate "$xkbModel" "$layout" "$xkbVariant" "$xkbOptions"
+ xkbvalidate "$xkbModel" "$layout" "$xkbVariant" "$xkbOptions"
touch "$out"
'');
diff --git a/nixos/modules/system/activation/activation-script.nix b/nixos/modules/system/activation/activation-script.nix
index 74c150a848d1..ddfd1af4a319 100644
--- a/nixos/modules/system/activation/activation-script.nix
+++ b/nixos/modules/system/activation/activation-script.nix
@@ -218,7 +218,7 @@ in
systemd.user = {
services.nixos-activation = {
- description = "Run user specific NixOS activation";
+ description = "Run user-specific NixOS activation";
script = config.system.userActivationScripts.script;
unitConfig.ConditionUser = "!@system";
serviceConfig.Type = "oneshot";
diff --git a/nixos/modules/system/activation/switch-to-configuration.pl b/nixos/modules/system/activation/switch-to-configuration.pl
index 8ff00fa11dc7..641cf9faadc9 100644
--- a/nixos/modules/system/activation/switch-to-configuration.pl
+++ b/nixos/modules/system/activation/switch-to-configuration.pl
@@ -10,6 +10,9 @@ use Cwd 'abs_path';
my $out = "@out@";
+# FIXME: maybe we should use /proc/1/exe to get the current systemd.
+my $curSystemd = abs_path("/run/current-system/sw/bin");
+
# To be robust against interruption, record what units need to be started etc.
my $startListFile = "/run/systemd/start-list";
my $restartListFile = "/run/systemd/restart-list";
@@ -267,7 +270,7 @@ while (my ($unit, $state) = each %{$activePrev}) {
sub pathToUnitName {
my ($path) = @_;
# Use current version of systemctl binary before daemon is reexeced.
- open my $cmd, "-|", "/run/current-system/sw/bin/systemd-escape", "--suffix=mount", "-p", $path
+ open my $cmd, "-|", "$curSystemd/systemd-escape", "--suffix=mount", "-p", $path
or die "Unable to escape $path!\n";
my $escaped = join "", <$cmd>;
chomp $escaped;
@@ -370,7 +373,7 @@ if (scalar (keys %unitsToStop) > 0) {
print STDERR "stopping the following units: ", join(", ", @unitsToStopFiltered), "\n"
if scalar @unitsToStopFiltered;
# Use current version of systemctl binary before daemon is reexeced.
- system("/run/current-system/sw/bin/systemctl", "stop", "--", sort(keys %unitsToStop)); # FIXME: ignore errors?
+ system("$curSystemd/systemctl", "stop", "--", sort(keys %unitsToStop)); # FIXME: ignore errors?
}
print STDERR "NOT restarting the following changed units: ", join(", ", sort(keys %unitsToSkip)), "\n"
@@ -382,10 +385,12 @@ my $res = 0;
print STDERR "activating the configuration...\n";
system("$out/activate", "$out") == 0 or $res = 2;
-# Restart systemd if necessary.
+# Restart systemd if necessary. Note that this is done using the
+# current version of systemd, just in case the new one has trouble
+# communicating with the running pid 1.
if ($restartSystemd) {
print STDERR "restarting systemd...\n";
- system("@systemd@/bin/systemctl", "daemon-reexec") == 0 or $res = 2;
+ system("$curSystemd/systemctl", "daemon-reexec") == 0 or $res = 2;
}
# Forget about previously failed services.
@@ -401,8 +406,10 @@ while (my $f = <$listActiveUsers>) {
my ($uid, $name) = ($+{uid}, $+{user});
print STDERR "reloading user units for $name...\n";
- system("@su@", "-s", "@shell@", "-l", $name, "-c", "XDG_RUNTIME_DIR=/run/user/$uid @systemd@/bin/systemctl --user daemon-reload");
- system("@su@", "-s", "@shell@", "-l", $name, "-c", "XDG_RUNTIME_DIR=/run/user/$uid @systemd@/bin/systemctl --user start nixos-activation.service");
+ system("@su@", "-s", "@shell@", "-l", $name, "-c",
+ "export XDG_RUNTIME_DIR=/run/user/$uid; " .
+ "$curSystemd/systemctl --user daemon-reexec; " .
+ "@systemd@/bin/systemctl --user start nixos-activation.service");
}
close $listActiveUsers;
diff --git a/nixos/modules/system/activation/top-level.nix b/nixos/modules/system/activation/top-level.nix
index 5c88d27b6c65..f67d29005616 100644
--- a/nixos/modules/system/activation/top-level.nix
+++ b/nixos/modules/system/activation/top-level.nix
@@ -46,8 +46,8 @@ let
ln -s ${kernelPath} $out/kernel
ln -s ${config.system.modulesTree} $out/kernel-modules
- ${optionalString (pkgs.stdenv.hostPlatform.platform.kernelDTB or false) ''
- ln -s ${config.boot.kernelPackages.kernel}/dtbs $out/dtbs
+ ${optionalString (config.hardware.deviceTree.package != null) ''
+ ln -s ${config.hardware.deviceTree.package} $out/dtbs
''}
echo -n "$kernelParams" > $out/kernel-params
diff --git a/nixos/modules/system/boot/binfmt.nix b/nixos/modules/system/boot/binfmt.nix
index d6c0f0504868..a32c9dc1f2b4 100644
--- a/nixos/modules/system/boot/binfmt.nix
+++ b/nixos/modules/system/boot/binfmt.nix
@@ -115,6 +115,14 @@ let
magicOrExtension = ''\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xf3\x00'';
mask = ''\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'';
};
+ wasm32-wasi = {
+ magicOrExtension = ''\x00asm'';
+ mask = ''\xff\xff\xff\xff'';
+ };
+ wasm64-wasi = {
+ magicOrExtension = ''\x00asm'';
+ mask = ''\xff\xff\xff\xff'';
+ };
x86_64-windows = {
magicOrExtension = ".exe";
recognitionType = "extension";
@@ -226,11 +234,12 @@ in {
emulatedSystems = mkOption {
default = [];
+ example = [ "wasm32-wasi" "x86_64-windows" "aarch64-linux" ];
description = ''
List of systems to emulate. Will also configure Nix to
support your new systems.
'';
- type = types.listOf types.string;
+ type = types.listOf types.str;
};
};
};
diff --git a/nixos/modules/system/boot/coredump.nix b/nixos/modules/system/boot/coredump.nix
deleted file mode 100644
index 30f367da7666..000000000000
--- a/nixos/modules/system/boot/coredump.nix
+++ /dev/null
@@ -1,66 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-with lib;
-
-{
-
- options = {
-
- systemd.coredump = {
-
- enable = mkOption {
- default = false;
- type = types.bool;
- description = ''
- Enables storing core dumps in systemd.
- Note that this alone is not enough to enable core dumps. The maximum
- file size for core dumps must be specified in limits.conf as well. See
- and the limits.conf(5)
- man page (these specify the core dump limits for user login sessions)
- and (where e.g.
- DefaultLimitCORE=1000000 can be specified to set
- the core dump limit for systemd system-level services).
- '';
- };
-
- extraConfig = mkOption {
- default = "";
- type = types.lines;
- example = "Storage=journal";
- description = ''
- Extra config options for systemd-coredump. See coredump.conf(5) man page
- for available options.
- '';
- };
- };
-
- };
-
- config = mkMerge [
- (mkIf config.systemd.coredump.enable {
-
- systemd.additionalUpstreamSystemUnits = [ "systemd-coredump.socket" "systemd-coredump@.service" ];
-
- environment.etc."systemd/coredump.conf".text =
- ''
- [Coredump]
- ${config.systemd.coredump.extraConfig}
- '';
-
- # Have the kernel pass core dumps to systemd's coredump helper binary.
- # From systemd's 50-coredump.conf file. See:
- #
- boot.kernel.sysctl."kernel.core_pattern" = "|${pkgs.systemd}/lib/systemd/systemd-coredump %P %u %g %s %t %c %e";
- })
-
- (mkIf (!config.systemd.coredump.enable) {
- boot.kernel.sysctl."kernel.core_pattern" = mkDefault "core";
-
- systemd.extraConfig =
- ''
- DefaultLimitCORE=0:infinity
- '';
- })
- ];
-
-}
diff --git a/nixos/modules/system/boot/kernel.nix b/nixos/modules/system/boot/kernel.nix
index ee43fe100238..8a309f3bc5fe 100644
--- a/nixos/modules/system/boot/kernel.nix
+++ b/nixos/modules/system/boot/kernel.nix
@@ -36,6 +36,7 @@ in
boot.kernelPackages = mkOption {
default = pkgs.linuxPackages;
+ type = types.unspecified // { merge = mergeEqualOption; };
apply = kernelPackages: kernelPackages.extend (self: super: {
kernel = super.kernel.override {
inherit randstructSeed;
@@ -107,7 +108,7 @@ in
boot.extraModulePackages = mkOption {
type = types.listOf types.package;
default = [];
- example = literalExample "[ pkgs.linuxPackages.nvidia_x11 ]";
+ example = literalExample "[ config.boot.kernelPackages.nvidia_x11 ]";
description = "A list of additional packages supplying kernel modules.";
};
@@ -260,7 +261,7 @@ in
source = kernelModulesConf;
};
- systemd.services."systemd-modules-load" =
+ systemd.services.systemd-modules-load =
{ wantedBy = [ "multi-user.target" ];
restartTriggers = [ kernelModulesConf ];
serviceConfig =
diff --git a/nixos/modules/system/boot/kexec.nix b/nixos/modules/system/boot/kexec.nix
index fd2cb94b756b..27a8e0217c55 100644
--- a/nixos/modules/system/boot/kexec.nix
+++ b/nixos/modules/system/boot/kexec.nix
@@ -4,7 +4,7 @@
config = lib.mkIf (lib.any (lib.meta.platformMatch pkgs.stdenv.hostPlatform) pkgs.kexectools.meta.platforms) {
environment.systemPackages = [ pkgs.kexectools ];
- systemd.services."prepare-kexec" =
+ systemd.services.prepare-kexec =
{ description = "Preparation for kexec";
wantedBy = [ "kexec.target" ];
before = [ "systemd-kexec.service" ];
diff --git a/nixos/modules/system/boot/loader/generic-extlinux-compatible/extlinux-conf-builder.sh b/nixos/modules/system/boot/loader/generic-extlinux-compatible/extlinux-conf-builder.sh
index c780a89b102c..0092ee92b62f 100644
--- a/nixos/modules/system/boot/loader/generic-extlinux-compatible/extlinux-conf-builder.sh
+++ b/nixos/modules/system/boot/loader/generic-extlinux-compatible/extlinux-conf-builder.sh
@@ -75,9 +75,8 @@ addEntry() {
copyToKernelsDir "$path/kernel"; kernel=$result
copyToKernelsDir "$path/initrd"; initrd=$result
- # XXX UGLY: maybe the system config should have a top-level "dtbs" entry?
- dtbDir=$(readlink -m "$path/kernel/../dtbs")
- if [ -d "$dtbDir" ]; then
+ dtbDir=$(readlink -m "$path/dtbs")
+ if [ -e "$dtbDir" ]; then
copyToKernelsDir "$dtbDir"; dtbs=$result
fi
diff --git a/nixos/modules/system/boot/loader/grub/grub.nix b/nixos/modules/system/boot/loader/grub/grub.nix
index 4e4d14985b0d..e13f0421d38f 100644
--- a/nixos/modules/system/boot/loader/grub/grub.nix
+++ b/nixos/modules/system/boot/loader/grub/grub.nix
@@ -8,7 +8,7 @@ let
efi = config.boot.loader.efi;
- grubPkgs =
+ grubPkgs =
# Package set of targeted architecture
if cfg.forcei686 then pkgs.pkgsi686Linux else pkgs;
@@ -72,7 +72,7 @@ let
else "${convertedFont}");
});
- bootDeviceCounters = fold (device: attr: attr // { "${device}" = (attr."${device}" or 0) + 1; }) {}
+ bootDeviceCounters = fold (device: attr: attr // { ${device} = (attr.${device} or 0) + 1; }) {}
(concatMap (args: args.devices) cfg.mirroredBoots);
convertedFont = (pkgs.runCommand "grub-font-converted.pf2" {}
@@ -333,7 +333,7 @@ in
};
backgroundColor = mkOption {
- type = types.nullOr types.string;
+ type = types.nullOr types.str;
example = "#7EBAE4";
default = null;
description = ''
@@ -399,7 +399,7 @@ in
example = "text";
type = types.str;
description = ''
- The gfxpayload to pass to GRUB when loading a graphical boot interface under EFI.
+ The gfxpayload to pass to GRUB when loading a graphical boot interface under EFI.
'';
};
@@ -408,7 +408,7 @@ in
example = "keep";
type = types.str;
description = ''
- The gfxpayload to pass to GRUB when loading a graphical boot interface under BIOS.
+ The gfxpayload to pass to GRUB when loading a graphical boot interface under BIOS.
'';
};
@@ -535,7 +535,7 @@ in
default = false;
type = types.bool;
description = ''
- Whether to force the use of a ia32 boot loader on x64 systems. Required
+ Whether to force the use of a ia32 boot loader on x64 systems. Required
to install and run NixOS on 64bit x86 systems with 32bit (U)EFI.
'';
};
@@ -554,7 +554,7 @@ in
systemHasTPM = mkOption {
default = "";
example = "YES_TPM_is_activated";
- type = types.string;
+ type = types.str;
description = ''
Assertion that the target system has an activated TPM. It is a safety
check before allowing the activation of 'trustedBoot.enable'. TrustedBoot
@@ -684,7 +684,7 @@ in
assertion = if args.efiSysMountPoint == null then true else hasPrefix "/" args.efiSysMountPoint;
message = "EFI paths must be absolute, not ${args.efiSysMountPoint}";
}
- ] ++ flip map args.devices (device: {
+ ] ++ forEach args.devices (device: {
assertion = device == "nodev" || hasPrefix "/" device;
message = "GRUB devices must be absolute paths, not ${device} in ${args.path}";
}));
diff --git a/nixos/modules/system/boot/loader/raspberrypi/raspberrypi-builder.sh b/nixos/modules/system/boot/loader/raspberrypi/raspberrypi-builder.sh
index 0fb07de10c04..c8b5bf2e61af 100644
--- a/nixos/modules/system/boot/loader/raspberrypi/raspberrypi-builder.sh
+++ b/nixos/modules/system/boot/loader/raspberrypi/raspberrypi-builder.sh
@@ -71,7 +71,7 @@ addEntry() {
local kernel=$(readlink -f $path/kernel)
local initrd=$(readlink -f $path/initrd)
- local dtb_path=$(readlink -f $path/kernel-modules/dtbs)
+ local dtb_path=$(readlink -f $path/dtbs)
if test -n "@copyKernels@"; then
copyToKernelsDir $kernel; kernel=$result
@@ -113,10 +113,18 @@ done
fwdir=@firmware@/share/raspberrypi/boot/
copyForced $fwdir/bootcode.bin $target/bootcode.bin
copyForced $fwdir/fixup.dat $target/fixup.dat
+copyForced $fwdir/fixup4.dat $target/fixup4.dat
+copyForced $fwdir/fixup4cd.dat $target/fixup4cd.dat
+copyForced $fwdir/fixup4db.dat $target/fixup4db.dat
+copyForced $fwdir/fixup4x.dat $target/fixup4x.dat
copyForced $fwdir/fixup_cd.dat $target/fixup_cd.dat
copyForced $fwdir/fixup_db.dat $target/fixup_db.dat
copyForced $fwdir/fixup_x.dat $target/fixup_x.dat
copyForced $fwdir/start.elf $target/start.elf
+copyForced $fwdir/start4.elf $target/start4.elf
+copyForced $fwdir/start4cd.elf $target/start4cd.elf
+copyForced $fwdir/start4db.elf $target/start4db.elf
+copyForced $fwdir/start4x.elf $target/start4x.elf
copyForced $fwdir/start_cd.elf $target/start_cd.elf
copyForced $fwdir/start_db.elf $target/start_db.elf
copyForced $fwdir/start_x.elf $target/start_x.elf
diff --git a/nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix b/nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix
index 7db60daa60b8..337afe9ef628 100644
--- a/nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix
+++ b/nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix
@@ -10,7 +10,7 @@ let
builderUboot = import ./uboot-builder.nix { inherit pkgs configTxt; inherit (cfg) version; };
builderGeneric = import ./raspberrypi-builder.nix { inherit pkgs configTxt; };
- builder =
+ builder =
if cfg.uboot.enable then
"${builderUboot} -g ${toString cfg.uboot.configurationLimit} -t ${timeoutStr} -c"
else
@@ -59,7 +59,7 @@ in
version = mkOption {
default = 2;
- type = types.enum [ 0 1 2 3 ];
+ type = types.enum [ 0 1 2 3 4 ];
description = ''
'';
};
@@ -86,7 +86,7 @@ in
firmwareConfig = mkOption {
default = null;
- type = types.nullOr types.string;
+ type = types.nullOr types.lines;
description = ''
Extra options that will be appended to /boot/config.txt file.
For possible values, see: https://www.raspberrypi.org/documentation/configuration/config-txt/
@@ -97,8 +97,8 @@ in
config = mkIf cfg.enable {
assertions = singleton {
- assertion = !pkgs.stdenv.hostPlatform.isAarch64 || cfg.version == 3;
- message = "Only Raspberry Pi 3 supports aarch64.";
+ assertion = !pkgs.stdenv.hostPlatform.isAarch64 || cfg.version >= 3;
+ message = "Only Raspberry Pi >= 3 supports aarch64.";
};
system.build.installBootLoader = builder;
diff --git a/nixos/modules/system/boot/loader/raspberrypi/uboot-builder.nix b/nixos/modules/system/boot/loader/raspberrypi/uboot-builder.nix
index 9d4f8a93d282..1dc397e521b4 100644
--- a/nixos/modules/system/boot/loader/raspberrypi/uboot-builder.nix
+++ b/nixos/modules/system/boot/loader/raspberrypi/uboot-builder.nix
@@ -10,11 +10,13 @@ let
pkgs.ubootRaspberryPi
else if version == 2 then
pkgs.ubootRaspberryPi2
- else
+ else if version == 3 then
if isAarch64 then
pkgs.ubootRaspberryPi3_64bit
else
- pkgs.ubootRaspberryPi3_32bit;
+ pkgs.ubootRaspberryPi3_32bit
+ else
+ throw "U-Boot is not yet supported on the raspberry pi 4.";
extlinuxConfBuilder =
import ../generic-extlinux-compatible/extlinux-conf-builder.nix {
diff --git a/nixos/modules/system/boot/luksroot.nix b/nixos/modules/system/boot/luksroot.nix
index b5c8d5241a3d..a4029d766b05 100644
--- a/nixos/modules/system/boot/luksroot.nix
+++ b/nixos/modules/system/boot/luksroot.nix
@@ -476,7 +476,7 @@ in
boot.initrd.luks.devices = mkOption {
default = { };
- example = { "luksroot".device = "/dev/disk/by-uuid/430e9eff-d852-4f68-aa3b-2fa3599ebe08"; };
+ example = { luksroot.device = "/dev/disk/by-uuid/430e9eff-d852-4f68-aa3b-2fa3599ebe08"; };
description = ''
The encrypted disk that should be opened before the root
filesystem is mounted. Both LVM-over-LUKS and LUKS-over-LVM
diff --git a/nixos/modules/system/boot/networkd.nix b/nixos/modules/system/boot/networkd.nix
index f1aa9064bef4..f2060e21509c 100644
--- a/nixos/modules/system/boot/networkd.nix
+++ b/nixos/modules/system/boot/networkd.nix
@@ -10,7 +10,7 @@ let
checkLink = checkUnitConfig "Link" [
(assertOnlyFields [
- "Description" "Alias" "MACAddressPolicy" "MACAddress" "NamePolicy" "Name"
+ "Description" "Alias" "MACAddressPolicy" "MACAddress" "NamePolicy" "OriginalName"
"MTUBytes" "BitsPerSecond" "Duplex" "AutoNegotiation" "WakeOnLan" "Port"
"TCPSegmentationOffload" "TCP6SegmentationOffload" "GenericSegmentationOffload"
"GenericReceiveOffload" "LargeReceiveOffload" "RxChannels" "TxChannels"
@@ -55,6 +55,27 @@ let
(assertMacAddress "MACAddress")
];
+ # NOTE The PrivateKey directive is missing on purpose here, please
+ # do not add it to this list. The nix store is world-readable let's
+ # refrain ourselves from providing a footgun.
+ checkWireGuard = checkUnitConfig "WireGuard" [
+ (assertOnlyFields [
+ "PrivateKeyFile" "ListenPort" "FwMark"
+ ])
+ (assertRange "FwMark" 1 4294967295)
+ ];
+
+ # NOTE The PresharedKey directive is missing on purpose here, please
+ # do not add it to this list. The nix store is world-readable,let's
+ # refrain ourselves from providing a footgun.
+ checkWireGuardPeer = checkUnitConfig "WireGuardPeer" [
+ (assertOnlyFields [
+ "PublicKey" "PresharedKeyFile" "AllowedIPs"
+ "Endpoint" "PersistentKeepalive"
+ ])
+ (assertRange "PersistentKeepalive" 1 65535)
+ ];
+
checkVlan = checkUnitConfig "VLAN" [
(assertOnlyFields ["Id" "GVRP" "MVRP" "LooseBinding" "ReorderHeader"])
(assertRange "Id" 0 4094)
@@ -320,6 +341,46 @@ let
'';
};
+ wireguardConfig = mkOption {
+ default = {};
+ example = {
+ PrivateKeyFile = "/etc/wireguard/secret.key";
+ ListenPort = 51820;
+ FwMark = 42;
+ };
+ type = types.addCheck (types.attrsOf unitOption) checkWireGuard;
+ description = ''
+ Each attribute in this set specifies an option in the
+ [WireGuard] section of the unit. See
+ systemd.netdev
+ 5 for details.
+ Use PrivateKeyFile instead of
+ PrivateKey: the nix store is
+ world-readable.
+ '';
+ };
+
+ wireguardPeers = mkOption {
+ default = [];
+ example = [ { wireguardPeerConfig={
+ Endpoint = "192.168.1.1:51820";
+ PublicKey = "27s0OvaBBdHoJYkH9osZpjpgSOVNw+RaKfboT/Sfq0g=";
+ PresharedKeyFile = "/etc/wireguard/psk.key";
+ AllowedIPs = [ "10.0.0.1/32" ];
+ PersistentKeepalive = 15;
+ };}];
+ type = with types; listOf (submodule wireguardPeerOptions);
+ description = ''
+ Each item in this array specifies an option in the
+ [WireGuardPeer] section of the unit. See
+ systemd.netdev
+ 5 for details.
+ Use PresharedKeyFile instead of
+ PresharedKey: the nix store is
+ world-readable.
+ '';
+ };
+
vlanConfig = mkOption {
default = {};
example = { Id = "4"; };
@@ -450,6 +511,23 @@ let
};
};
+ wireguardPeerOptions = {
+ options = {
+ wireguardPeerConfig = mkOption {
+ default = {};
+ example = { };
+ type = types.addCheck (types.attrsOf unitOption) checkWireGuardPeer;
+ description = ''
+ Each attribute in this set specifies an option in the
+ [WireGuardPeer] section of the unit. See
+ systemd.network
+ 5 for details.
+ '';
+ };
+ };
+ };
+
+
networkOptions = commonNetworkOptions // {
networkConfig = mkOption {
@@ -732,6 +810,16 @@ let
${attrsToSection def.bondConfig}
''}
+ ${optionalString (def.wireguardConfig != { }) ''
+ [WireGuard]
+ ${attrsToSection def.wireguardConfig}
+
+ ''}
+ ${flip concatMapStrings def.wireguardPeers (x: ''
+ [WireGuardPeer]
+ ${attrsToSection x.wireguardPeerConfig}
+
+ '')}
${def.extraConfig}
'';
};
diff --git a/nixos/modules/system/boot/plymouth.nix b/nixos/modules/system/boot/plymouth.nix
index e4223bae7d32..adca3c3f66e7 100644
--- a/nixos/modules/system/boot/plymouth.nix
+++ b/nixos/modules/system/boot/plymouth.nix
@@ -5,17 +5,20 @@ with lib;
let
inherit (pkgs) plymouth;
+ inherit (pkgs) nixos-icons;
cfg = config.boot.plymouth;
- breezePlymouth = pkgs.breeze-plymouth.override {
- nixosBranding = true;
- nixosVersion = config.system.nixos.release;
+ nixosBreezePlymouth = pkgs.breeze-plymouth.override {
+ logoFile = cfg.logo;
+ logoName = "nixos";
+ osName = "NixOS";
+ osVersion = config.system.nixos.release;
};
themesEnv = pkgs.buildEnv {
name = "plymouth-themes";
- paths = [ plymouth breezePlymouth ] ++ cfg.themePackages;
+ paths = [ plymouth ] ++ cfg.themePackages;
};
configFile = pkgs.writeText "plymouthd.conf" ''
@@ -35,7 +38,7 @@ in
enable = mkEnableOption "Plymouth boot splash screen";
themePackages = mkOption {
- default = [];
+ default = [ nixosBreezePlymouth ];
type = types.listOf types.package;
description = ''
Extra theme packages for plymouth.
@@ -52,10 +55,7 @@ in
logo = mkOption {
type = types.path;
- default = pkgs.fetchurl {
- url = "https://nixos.org/logo/nixos-hires.png";
- sha256 = "1ivzgd7iz0i06y36p8m5w48fd8pjqwxhdaavc0pxs7w1g7mcy5si";
- };
+ default = "${nixos-icons}/share/icons/hicolor/128x128/apps/nix-snowflake.png";
defaultText = ''pkgs.fetchurl {
url = "https://nixos.org/logo/nixos-hires.png";
sha256 = "1ivzgd7iz0i06y36p8m5w48fd8pjqwxhdaavc0pxs7w1g7mcy5si";
@@ -88,10 +88,7 @@ in
systemd.services.plymouth-kexec.wantedBy = [ "kexec.target" ];
systemd.services.plymouth-halt.wantedBy = [ "halt.target" ];
systemd.services.plymouth-quit-wait.wantedBy = [ "multi-user.target" ];
- systemd.services.plymouth-quit = {
- wantedBy = [ "multi-user.target" ];
- after = [ "display-manager.service" ];
- };
+ systemd.services.plymouth-quit.wantedBy = [ "multi-user.target" ];
systemd.services.plymouth-poweroff.wantedBy = [ "poweroff.target" ];
systemd.services.plymouth-reboot.wantedBy = [ "reboot.target" ];
systemd.services.plymouth-read-write.wantedBy = [ "sysinit.target" ];
diff --git a/nixos/modules/system/boot/stage-1-init.sh b/nixos/modules/system/boot/stage-1-init.sh
index 67cbe720ddc3..f520bf54ad1b 100644
--- a/nixos/modules/system/boot/stage-1-init.sh
+++ b/nixos/modules/system/boot/stage-1-init.sh
@@ -44,13 +44,13 @@ EOF
*) to ignore the error and continue
EOF
- read reply
+ read -n 1 reply
if [ -n "$allowShell" -a "$reply" = f ]; then
exec setsid @shell@ -c "exec @shell@ < /dev/$console >/dev/$console 2>/dev/$console"
elif [ -n "$allowShell" -a "$reply" = i ]; then
echo "Starting interactive shell..."
- setsid @shell@ -c "@shell@ < /dev/$console >/dev/$console 2>/dev/$console" || fail
+ setsid @shell@ -c "exec @shell@ < /dev/$console >/dev/$console 2>/dev/$console" || fail
elif [ "$reply" = r ]; then
echo "Rebooting..."
reboot -f
@@ -183,6 +183,12 @@ for o in $(cat /proc/cmdline); do
copytoram)
copytoram=1
;;
+ findiso=*)
+ # if an iso name is supplied, try to find the device where
+ # the iso resides on
+ set -- $(IFS==; echo $o)
+ isoPath=$2
+ ;;
esac
done
@@ -442,6 +448,27 @@ if test -e /sys/power/resume -a -e /sys/power/disk; then
fi
fi
+# If we have a path to an iso file, find the iso and link it to /dev/root
+if [ -n "$isoPath" ]; then
+ mkdir -p /findiso
+
+ for delay in 5 10; do
+ blkid | while read -r line; do
+ device=$(echo "$line" | sed 's/:.*//')
+ type=$(echo "$line" | sed 's/.*TYPE="\([^"]*\)".*/\1/')
+
+ mount -t "$type" "$device" /findiso
+ if [ -e "/findiso$isoPath" ]; then
+ ln -sf "/findiso$isoPath" /dev/root
+ break 2
+ else
+ umount /findiso
+ fi
+ done
+
+ sleep "$delay"
+ done
+fi
# Try to find and mount the root device.
mkdir -p $targetRoot
diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix
index 788e3f4a2ab1..4c2d130d5a5d 100644
--- a/nixos/modules/system/boot/stage-1.nix
+++ b/nixos/modules/system/boot/stage-1.nix
@@ -217,13 +217,11 @@ let
--replace ata_id ${extraUtils}/bin/ata_id \
--replace scsi_id ${extraUtils}/bin/scsi_id \
--replace cdrom_id ${extraUtils}/bin/cdrom_id \
- --replace ${pkgs.utillinux}/sbin/blkid ${extraUtils}/bin/blkid \
- --replace /sbin/blkid ${extraUtils}/bin/blkid \
+ --replace ${pkgs.coreutils}/bin/basename ${extraUtils}/bin/basename \
+ --replace ${pkgs.utillinux}/bin/blkid ${extraUtils}/bin/blkid \
--replace ${pkgs.lvm2}/sbin ${extraUtils}/bin \
- --replace /sbin/mdadm ${extraUtils}/bin/mdadm \
+ --replace ${pkgs.mdadm}/sbin ${extraUtils}/sbin \
--replace ${pkgs.bash}/bin/sh ${extraUtils}/bin/sh \
- --replace /usr/bin/readlink ${extraUtils}/bin/readlink \
- --replace /usr/bin/basename ${extraUtils}/bin/basename \
--replace ${udev}/bin/udevadm ${extraUtils}/bin/udevadm
done
diff --git a/nixos/modules/system/boot/stage-2-init.sh b/nixos/modules/system/boot/stage-2-init.sh
index 03daafa1ce4f..d1de7920df98 100644
--- a/nixos/modules/system/boot/stage-2-init.sh
+++ b/nixos/modules/system/boot/stage-2-init.sh
@@ -142,7 +142,7 @@ fi
# Record the boot configuration.
ln -sfn "$systemConfig" /run/booted-system
-# Prevent the booted system form being garbage-collected If it weren't
+# Prevent the booted system from being garbage-collected. If it weren't
# a gcroot, if we were running a different kernel, switched system,
# and garbage collected all, we could not load kernel modules anymore.
ln -sfn /run/booted-system /nix/var/nix/gcroots/booted-system
diff --git a/nixos/modules/system/boot/systemd-nspawn.nix b/nixos/modules/system/boot/systemd-nspawn.nix
index 34a34091a7dc..3ddd45b13482 100644
--- a/nixos/modules/system/boot/systemd-nspawn.nix
+++ b/nixos/modules/system/boot/systemd-nspawn.nix
@@ -113,11 +113,21 @@ in {
config =
let
units = mapAttrs' (n: v: let nspawnFile = "${n}.nspawn"; in nameValuePair nspawnFile (instanceToUnit nspawnFile v)) cfg;
- in mkIf (cfg != {}) {
-
- environment.etc."systemd/nspawn".source = generateUnits "nspawn" units [] [];
-
- systemd.targets."multi-user".wants = [ "machines.target" ];
- };
+ in
+ mkMerge [
+ (mkIf (cfg != {}) {
+ environment.etc."systemd/nspawn".source = mkIf (cfg != {}) (generateUnits "nspawn" units [] []);
+ })
+ {
+ systemd.targets.multi-user.wants = [ "machines.target" ];
+ # Workaround for https://github.com/NixOS/nixpkgs/pull/67232#issuecomment-531315437 and https://github.com/systemd/systemd/issues/13622
+ # Once systemd fixes this upstream, we can re-enable -U
+ systemd.services."systemd-nspawn@".serviceConfig.ExecStart = [
+ "" # deliberately empty. signals systemd to override the ExecStart
+ # Only difference between upstream is that we do not pass the -U flag
+ "${pkgs.systemd}/bin/systemd-nspawn --quiet --keep-unit --boot --link-journal=try-guest --network-veth --settings=override --machine=%i"
+ ];
+ }
+ ];
}
diff --git a/nixos/modules/system/boot/systemd-unit-options.nix b/nixos/modules/system/boot/systemd-unit-options.nix
index ee4ae845a7d5..c1f2c98afcd8 100644
--- a/nixos/modules/system/boot/systemd-unit-options.nix
+++ b/nixos/modules/system/boot/systemd-unit-options.nix
@@ -226,7 +226,7 @@ in rec {
environment = mkOption {
default = {};
- type = with types; attrsOf (nullOr (either str (either path package)));
+ type = with types; attrsOf (nullOr (oneOf [ str path package ]));
example = { PATH = "/foo/bar/bin"; LANG = "nl_NL.UTF-8"; };
description = "Environment variables passed to the service's processes.";
};
diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix
index cf35504e5182..33b350902a1a 100644
--- a/nixos/modules/system/boot/systemd.nix
+++ b/nixos/modules/system/boot/systemd.nix
@@ -76,6 +76,10 @@ let
"systemd-journald-dev-log.socket"
"syslog.socket"
+ # Coredumps.
+ "systemd-coredump.socket"
+ "systemd-coredump@.service"
+
# SysV init compatibility.
"systemd-initctl.socket"
"systemd-initctl.service"
@@ -108,11 +112,13 @@ let
# Hibernate / suspend.
"hibernate.target"
"suspend.target"
+ "suspend-then-hibernate.target"
"sleep.target"
"hybrid-sleep.target"
"systemd-hibernate.service"
"systemd-hybrid-sleep.service"
"systemd-suspend.service"
+ "systemd-suspend-then-hibernate.service"
# Reboot stuff.
"reboot.target"
@@ -322,7 +328,7 @@ let
[Service]
${let env = cfg.globalEnvironment // def.environment;
in concatMapStrings (n:
- let s = optionalString (env."${n}" != null)
+ let s = optionalString (env.${n} != null)
"Environment=${builtins.toJSON "${n}=${env.${n}}"}\n";
# systemd max line length is now 1MiB
# https://github.com/systemd/systemd/commit/e6dde451a51dc5aaa7f4d98d39b8fe735f73d2af
@@ -427,7 +433,8 @@ in
systemd.packages = mkOption {
default = [];
type = types.listOf types.package;
- description = "Packages providing systemd units.";
+ example = literalExample "[ pkgs.systemd-cryptsetup-generator ]";
+ description = "Packages providing systemd units and hooks.";
};
systemd.targets = mkOption {
@@ -489,7 +496,7 @@ in
systemd.generators = mkOption {
type = types.attrsOf types.path;
default = {};
- example = { "systemd-gpt-auto-generator" = "/dev/null"; };
+ example = { systemd-gpt-auto-generator = "/dev/null"; };
description = ''
Definition of systemd generators.
For each NAME = VALUE pair of the attrSet, a link is generated from
@@ -497,11 +504,14 @@ in
'';
};
- systemd.generator-packages = mkOption {
- default = [];
- type = types.listOf types.package;
- example = literalExample "[ pkgs.systemd-cryptsetup-generator ]";
- description = "Packages providing systemd generators.";
+ systemd.shutdown = mkOption {
+ type = types.attrsOf types.path;
+ default = {};
+ description = ''
+ Definition of systemd shutdown executables.
+ For each NAME = VALUE pair of the attrSet, a link is generated from
+ /etc/systemd/system-shutdown/NAME to VALUE.
+ '';
};
systemd.defaultUnit = mkOption {
@@ -520,7 +530,7 @@ in
};
systemd.globalEnvironment = mkOption {
- type = with types; attrsOf (nullOr (either str (either path package)));
+ type = with types; attrsOf (nullOr (oneOf [ str path package ]));
default = {};
example = { TZ = "CET"; };
description = ''
@@ -529,13 +539,33 @@ in
};
systemd.enableCgroupAccounting = mkOption {
- default = false;
+ default = true;
type = types.bool;
description = ''
Whether to enable cgroup accounting.
'';
};
+ systemd.coredump.enable = mkOption {
+ default = true;
+ type = types.bool;
+ description = ''
+ Whether core dumps should be processed by
+ systemd-coredump. If disabled, core dumps
+ appear in the current directory of the crashing process.
+ '';
+ };
+
+ systemd.coredump.extraConfig = mkOption {
+ default = "";
+ type = types.lines;
+ example = "Storage=journal";
+ description = ''
+ Extra config options for systemd-coredump. See coredump.conf(5) man page
+ for available options.
+ '';
+ };
+
systemd.extraConfig = mkOption {
default = "";
type = types.lines;
@@ -761,18 +791,21 @@ in
environment.systemPackages = [ systemd ];
environment.etc = let
- # generate contents for /etc/systemd/system-generators from
- # systemd.generators and systemd.generator-packages
- generators = pkgs.runCommand "system-generators" {
+ # generate contents for /etc/systemd/system-${type} from attrset of links and packages
+ hooks = type: links: pkgs.runCommand "system-${type}" {
preferLocalBuild = true;
- packages = cfg.generator-packages;
- } ''
+ packages = cfg.packages;
+ } ''
+ set -e
mkdir -p $out
for package in $packages
do
- ln -s $package/lib/systemd/system-generators/* $out/
- done;
- ${concatStrings (mapAttrsToList (generator: target: "ln -s ${target} $out/${generator};\n") cfg.generators)}
+ for hook in $package/lib/systemd/system-${type}/*
+ do
+ ln -s $hook $out/
+ done
+ done
+ ${concatStrings (mapAttrsToList (exec: target: "ln -s ${target} $out/${exec};\n") links)}
'';
in ({
"systemd/system".source = generateUnits "system" cfg.units upstreamSystemUnits upstreamSystemWants;
@@ -783,11 +816,12 @@ in
[Manager]
${optionalString config.systemd.enableCgroupAccounting ''
DefaultCPUAccounting=yes
+ DefaultBlockIOAccounting=yes
DefaultIOAccounting=yes
DefaultBlockIOAccounting=yes
- DefaultMemoryAccounting=yes
- DefaultTasksAccounting=yes
+ DefaultIPAccounting=yes
''}
+ DefaultLimitCORE=infinity
${config.systemd.extraConfig}
'';
@@ -811,6 +845,12 @@ in
${config.services.journald.extraConfig}
'';
+ "systemd/coredump.conf".text =
+ ''
+ [Coredump]
+ ${config.systemd.coredump.extraConfig}
+ '';
+
"systemd/logind.conf".text = ''
[Login]
KillUserProcesses=${if config.services.logind.killUserProcesses then "yes" else "no"}
@@ -824,7 +864,16 @@ in
[Sleep]
'';
+ # install provided sysctl snippets
+ "sysctl.d/50-coredump.conf".source = "${systemd}/example/sysctl.d/50-coredump.conf";
+ "sysctl.d/50-default.conf".source = "${systemd}/example/sysctl.d/50-default.conf";
+
+ "tmpfiles.d/journal-nocow.conf".source = "${systemd}/example/tmpfiles.d/journal-nocow.conf";
+ "tmpfiles.d/static-nodes-permissions.conf".source = "${systemd}/example/tmpfiles.d/static-nodes-permissions.conf";
"tmpfiles.d/systemd.conf".source = "${systemd}/example/tmpfiles.d/systemd.conf";
+ "tmpfiles.d/systemd-nspawn.conf".source = "${systemd}/example/tmpfiles.d/systemd-nspawn.conf";
+ "tmpfiles.d/systemd-tmp.conf".source = "${systemd}/example/tmpfiles.d/systemd-tmp.conf";
+ "tmpfiles.d/var.conf".source = "${systemd}/example/tmpfiles.d/var.conf";
"tmpfiles.d/x11.conf".source = "${systemd}/example/tmpfiles.d/x11.conf";
"tmpfiles.d/nixos.conf".text = ''
@@ -834,7 +883,8 @@ in
${concatStringsSep "\n" cfg.tmpfiles.rules}
'';
- "systemd/system-generators" = { source = generators; };
+ "systemd/system-generators" = { source = hooks "generators" cfg.generators; };
+ "systemd/system-shutdown" = { source = hooks "shutdown" cfg.shutdown; };
});
services.dbus.enable = true;
@@ -943,6 +993,10 @@ in
# Don't bother with certain units in containers.
systemd.services.systemd-remount-fs.unitConfig.ConditionVirtualization = "!container";
systemd.services.systemd-random-seed.unitConfig.ConditionVirtualization = "!container";
+
+ boot.kernel.sysctl = mkIf (!cfg.coredump.enable) {
+ "kernel.core_pattern" = "core";
+ };
};
# FIXME: Remove these eventually.
diff --git a/nixos/modules/tasks/auto-upgrade.nix b/nixos/modules/tasks/auto-upgrade.nix
index 18753ae0c1ae..7fe066991918 100644
--- a/nixos/modules/tasks/auto-upgrade.nix
+++ b/nixos/modules/tasks/auto-upgrade.nix
@@ -88,7 +88,7 @@ let cfg = config.system.autoUpgrade; in
HOME = "/root";
} // config.networking.proxy.envVars;
- path = [ pkgs.coreutils pkgs.gnutar pkgs.xz.bin pkgs.gitMinimal config.nix.package.out ];
+ path = with pkgs; [ coreutils gnutar xz.bin gzip gitMinimal config.nix.package.out ];
script = let
nixos-rebuild = "${config.system.build.nixos-rebuild}/bin/nixos-rebuild";
diff --git a/nixos/modules/tasks/filesystems.nix b/nixos/modules/tasks/filesystems.nix
index 43764bb82f1f..688c77cb22d1 100644
--- a/nixos/modules/tasks/filesystems.nix
+++ b/nixos/modules/tasks/filesystems.nix
@@ -12,7 +12,7 @@ let
fileSystems' = toposort fsBefore (attrValues config.fileSystems);
- fileSystems = if fileSystems' ? "result"
+ fileSystems = if fileSystems' ? result
then # use topologically sorted fileSystems everywhere
fileSystems'.result
else # the assertion below will catch this,
@@ -211,7 +211,7 @@ in
ls = sep: concatMapStringsSep sep (x: x.mountPoint);
notAutoResizable = fs: fs.autoResize && !(hasPrefix "ext" fs.fsType || fs.fsType == "f2fs");
in [
- { assertion = ! (fileSystems' ? "cycle");
+ { assertion = ! (fileSystems' ? cycle);
message = "The ‘fileSystems’ option can't be topologically sorted: mountpoint dependency path ${ls " -> " fileSystems'.cycle} loops to ${ls ", " fileSystems'.loops}";
}
{ assertion = ! (any notAutoResizable fileSystems);
diff --git a/nixos/modules/tasks/filesystems/nfs.nix b/nixos/modules/tasks/filesystems/nfs.nix
index d3a558738f4b..e0e8bb1f03de 100644
--- a/nixos/modules/tasks/filesystems/nfs.nix
+++ b/nixos/modules/tasks/filesystems/nfs.nix
@@ -56,7 +56,6 @@ in
boot.initrd.kernelModules = mkIf inInitrd [ "nfs" ];
systemd.packages = [ pkgs.nfs-utils ];
- systemd.generator-packages = [ pkgs.nfs-utils ];
environment.etc = {
"idmapd.conf".source = idmapdConfFile;
diff --git a/nixos/modules/tasks/filesystems/zfs.nix b/nixos/modules/tasks/filesystems/zfs.nix
index ac06b6caee30..fe11917c609c 100644
--- a/nixos/modules/tasks/filesystems/zfs.nix
+++ b/nixos/modules/tasks/filesystems/zfs.nix
@@ -16,9 +16,7 @@ let
inInitrd = any (fs: fs == "zfs") config.boot.initrd.supportedFilesystems;
inSystem = any (fs: fs == "zfs") config.boot.supportedFilesystems;
- enableAutoSnapshots = cfgSnapshots.enable;
- enableAutoScrub = cfgScrub.enable;
- enableZfs = inInitrd || inSystem || enableAutoSnapshots || enableAutoScrub;
+ enableZfs = inInitrd || inSystem;
kernel = config.boot.kernelPackages;
@@ -268,7 +266,12 @@ in
};
services.zfs.trim = {
- enable = mkEnableOption "Enables periodic TRIM on all ZFS pools.";
+ enable = mkOption {
+ description = "Whether to enable periodic TRIM on all ZFS pools.";
+ default = true;
+ example = false;
+ type = types.bool;
+ };
interval = mkOption {
default = "weekly";
@@ -387,10 +390,11 @@ in
};
environment.etc."zfs/zed.d".source = "${packages.zfsUser}/etc/zfs/zed.d/";
+ environment.etc."zfs/zpool.d".source = "${packages.zfsUser}/etc/zfs/zpool.d/";
system.fsPackages = [ packages.zfsUser ]; # XXX: needed? zfs doesn't have (need) a fsck
environment.systemPackages = [ packages.zfsUser ]
- ++ optional enableAutoSnapshots autosnapPkg; # so the user can run the command to see flags
+ ++ optional cfgSnapshots.enable autosnapPkg; # so the user can run the command to see flags
services.udev.packages = [ packages.zfsUser ]; # to hook zvol naming, etc.
systemd.packages = [ packages.zfsUser ];
@@ -469,7 +473,7 @@ in
map createSyncService allPools ++
map createZfsService [ "zfs-mount" "zfs-share" "zfs-zed" ]);
- systemd.targets."zfs-import" =
+ systemd.targets.zfs-import =
let
services = map (pool: "zfs-import-${pool}.service") dataPools;
in
@@ -479,10 +483,10 @@ in
wantedBy = [ "zfs.target" ];
};
- systemd.targets."zfs".wantedBy = [ "multi-user.target" ];
+ systemd.targets.zfs.wantedBy = [ "multi-user.target" ];
})
- (mkIf enableAutoSnapshots {
+ (mkIf (enableZfs && cfgSnapshots.enable) {
systemd.services = let
descr = name: if name == "frequent" then "15 mins"
else if name == "hourly" then "hour"
@@ -520,7 +524,7 @@ in
}) snapshotNames);
})
- (mkIf enableAutoScrub {
+ (mkIf (enableZfs && cfgScrub.enable) {
systemd.services.zfs-scrub = {
description = "ZFS pools scrubbing";
after = [ "zfs-import.target" ];
@@ -547,15 +551,13 @@ in
};
})
- (mkIf cfgTrim.enable {
+ (mkIf (enableZfs && cfgTrim.enable) {
systemd.services.zpool-trim = {
description = "ZFS pools trim";
after = [ "zfs-import.target" ];
path = [ packages.zfsUser ];
startAt = cfgTrim.interval;
- script = ''
- zpool list -H -o name | xargs -n1 zpool trim
- '';
+ serviceConfig.ExecStart = "${pkgs.runtimeShell} -c 'zpool list -H -o name | xargs --no-run-if-empty -n1 zpool trim'";
};
})
];
diff --git a/nixos/modules/tasks/kbd.nix b/nixos/modules/tasks/kbd.nix
index 6d34f897d189..c6ba998b19e6 100644
--- a/nixos/modules/tasks/kbd.nix
+++ b/nixos/modules/tasks/kbd.nix
@@ -73,7 +73,7 @@ in
config = mkMerge [
(mkIf (!setVconsole) {
- systemd.services."systemd-vconsole-setup".enable = false;
+ systemd.services.systemd-vconsole-setup.enable = false;
})
(mkIf setVconsole (mkMerge [
@@ -83,7 +83,7 @@ in
# virtual consoles.
environment.etc."vconsole.conf".source = vconsoleConf;
# Provide kbd with additional packages.
- environment.etc."kbd".source = "${kbdEnv}/share";
+ environment.etc.kbd.source = "${kbdEnv}/share";
boot.initrd.preLVMCommands = mkBefore ''
kbd_mode ${if isUnicode then "-u" else "-a"} -C /dev/console
@@ -99,7 +99,7 @@ in
'') config.i18n.consoleColors}
'';
- systemd.services."systemd-vconsole-setup" =
+ systemd.services.systemd-vconsole-setup =
{ before = [ "display-manager.service" ];
after = [ "systemd-udev-settle.service" ];
restartTriggers = [ vconsoleConf kbdEnv ];
diff --git a/nixos/modules/tasks/network-interfaces-scripted.nix b/nixos/modules/tasks/network-interfaces-scripted.nix
index 2b8a7944dc36..1726d05115ea 100644
--- a/nixos/modules/tasks/network-interfaces-scripted.nix
+++ b/nixos/modules/tasks/network-interfaces-scripted.nix
@@ -498,8 +498,8 @@ let
// mapAttrs' createSitDevice cfg.sits
// mapAttrs' createVlanDevice cfg.vlans
// {
- "network-setup" = networkSetup;
- "network-local-commands" = networkLocalCommands;
+ network-setup = networkSetup;
+ network-local-commands = networkLocalCommands;
};
services.udev.extraRules =
diff --git a/nixos/modules/tasks/network-interfaces-systemd.nix b/nixos/modules/tasks/network-interfaces-systemd.nix
index 857aaf1e6e30..863072e33dc3 100644
--- a/nixos/modules/tasks/network-interfaces-systemd.nix
+++ b/nixos/modules/tasks/network-interfaces-systemd.nix
@@ -12,7 +12,7 @@ let
i.ipv4.addresses
++ optionals cfg.enableIPv6 i.ipv6.addresses;
- dhcpStr = useDHCP: if useDHCP == true || useDHCP == null then "both" else "no";
+ dhcpStr = useDHCP: if useDHCP == true || useDHCP == null then "yes" else "no";
slaves =
concatLists (map (bond: bond.interfaces) (attrValues cfg.bonds))
@@ -38,6 +38,12 @@ in
} {
assertion = cfg.defaultGateway6 == null || cfg.defaultGateway6.interface == null;
message = "networking.defaultGateway6.interface is not supported by networkd.";
+ } {
+ assertion = cfg.useDHCP == false;
+ message = ''
+ networking.useDHCP is not supported by networkd.
+ Please use per interface configuration and set the global option to false.
+ '';
} ] ++ flip mapAttrsToList cfg.bridges (n: { rstp, ... }: {
assertion = !rstp;
message = "networking.bridges.${n}.rstp is not supported by networkd.";
@@ -56,9 +62,7 @@ in
genericNetwork = override:
let gateway = optional (cfg.defaultGateway != null) cfg.defaultGateway.address
++ optional (cfg.defaultGateway6 != null) cfg.defaultGateway6.address;
- in {
- DHCP = override (dhcpStr cfg.useDHCP);
- } // optionalAttrs (gateway != [ ]) {
+ in optionalAttrs (gateway != [ ]) {
routes = override [
{
routeConfig = {
@@ -72,9 +76,17 @@ in
};
in mkMerge [ {
enable = true;
- networks."99-main" = genericNetwork mkDefault;
+ networks."99-main" = (genericNetwork mkDefault) // {
+ # We keep the "broken" behaviour of applying this to all interfaces.
+ # In general we want to get rid of this workaround but there hasn't
+ # been any work on that.
+ # See the following issues for details:
+ # - https://github.com/NixOS/nixpkgs/issues/18962
+ # - https://github.com/NixOS/nixpkgs/issues/61629
+ matchConfig = mkDefault { Name = "*"; };
+ };
}
- (mkMerge (flip map interfaces (i: {
+ (mkMerge (forEach interfaces (i: {
netdevs = mkIf i.virtual ({
"40-${i.name}" = {
netdevConfig = {
@@ -89,8 +101,8 @@ in
networks."40-${i.name}" = mkMerge [ (genericNetwork mkDefault) {
name = mkDefault i.name;
DHCP = mkForce (dhcpStr
- (if i.useDHCP != null then i.useDHCP else cfg.useDHCP && interfaceIps i == [ ]));
- address = flip map (interfaceIps i)
+ (if i.useDHCP != null then i.useDHCP else false));
+ address = forEach (interfaceIps i)
(ip: "${ip.address}/${toString ip.prefixLength}");
networkConfig.IPv6PrivacyExtensions = "kernel";
} ];
@@ -102,7 +114,7 @@ in
Kind = "bridge";
};
};
- networks = listToAttrs (flip map bridge.interfaces (bi:
+ networks = listToAttrs (forEach bridge.interfaces (bi:
nameValuePair "40-${bi}" (mkMerge [ (genericNetwork (mkOverride 999)) {
DHCP = mkOverride 0 (dhcpStr false);
networkConfig.Bridge = name;
@@ -160,20 +172,20 @@ in
(mapAttrsToList (k: _: k) do); "";
# get those driverOptions that have been set
filterSystemdOptions = filterAttrs (sysDOpt: kOpts:
- any (kOpt: do ? "${kOpt}") kOpts.optNames);
+ any (kOpt: do ? ${kOpt}) kOpts.optNames);
# build final set of systemd options to bond values
buildOptionSet = mapAttrs (_: kOpts: with kOpts;
# we simply take the first set kernel bond option
# (one option has multiple names, which is silly)
- head (map (optN: valTransform (do."${optN}"))
+ head (map (optN: valTransform (do.${optN}))
# only map those that exist
- (filter (o: do ? "${o}") optNames)));
+ (filter (o: do ? ${o}) optNames)));
in seq assertNoUnknownOption
(buildOptionSet (filterSystemdOptions driverOptionMapping));
};
- networks = listToAttrs (flip map bond.interfaces (bi:
+ networks = listToAttrs (forEach bond.interfaces (bi:
nameValuePair "40-${bi}" (mkMerge [ (genericNetwork (mkOverride 999)) {
DHCP = mkOverride 0 (dhcpStr false);
networkConfig.Bond = name;
diff --git a/nixos/modules/tasks/network-interfaces.nix b/nixos/modules/tasks/network-interfaces.nix
index c75d7cbc408b..31e2ed1cd1ea 100644
--- a/nixos/modules/tasks/network-interfaces.nix
+++ b/nixos/modules/tasks/network-interfaces.nix
@@ -305,7 +305,7 @@ let
optional (defined ipv6Address && defined ipv6PrefixLength)
{ address = ipv6Address; prefixLength = ipv6PrefixLength; }))
- ({ options.warnings = options.warnings; })
+ ({ options.warnings = options.warnings; options.assertions = options.assertions; })
];
};
@@ -799,19 +799,19 @@ in
networking.wlanInterfaces = mkOption {
default = { };
example = literalExample {
- "wlan-station0" = {
+ wlan-station0 = {
device = "wlp6s0";
};
- "wlan-adhoc0" = {
+ wlan-adhoc0 = {
type = "ibss";
device = "wlp6s0";
mac = "02:00:00:00:00:01";
};
- "wlan-p2p0" = {
+ wlan-p2p0 = {
device = "wlp6s0";
mac = "02:00:00:00:00:02";
};
- "wlan-ap0" = {
+ wlan-ap0 = {
device = "wlp6s0";
mac = "02:00:00:00:00:03";
};
@@ -836,7 +836,7 @@ in
options = {
device = mkOption {
- type = types.string;
+ type = types.str;
example = "wlp6s0";
description = "The name of the underlying hardware WLAN device as assigned by udev.";
};
@@ -852,7 +852,7 @@ in
};
meshID = mkOption {
- type = types.nullOr types.string;
+ type = types.nullOr types.str;
default = null;
description = "MeshID of interface with type mesh.";
};
@@ -903,6 +903,11 @@ in
Whether to use DHCP to obtain an IP address and other
configuration for all network interfaces that are not manually
configured.
+
+ Using this option is highly discouraged and also incompatible with
+ . Please use
+ instead
+ and set this to false.
'';
};
@@ -926,7 +931,7 @@ in
warnings = concatMap (i: i.warnings) interfaces;
assertions =
- (flip map interfaces (i: {
+ (forEach interfaces (i: {
# With the linux kernel, interface name length is limited by IFNAMSIZ
# to 16 bytes, including the trailing null byte.
# See include/linux/if.h in the kernel sources
@@ -934,12 +939,12 @@ in
message = ''
The name of networking.interfaces."${i.name}" is too long, it needs to be less than 16 characters.
'';
- })) ++ (flip map slaveIfs (i: {
+ })) ++ (forEach slaveIfs (i: {
assertion = i.ipv4.addresses == [ ] && i.ipv6.addresses == [ ];
message = ''
The networking.interfaces."${i.name}" must not have any defined ips when it is a slave.
'';
- })) ++ (flip map interfaces (i: {
+ })) ++ (forEach interfaces (i: {
assertion = i.preferTempAddress -> cfg.enableIPv6;
message = ''
Temporary addresses are only needed when IPv6 is enabled.
@@ -967,9 +972,9 @@ in
"net.ipv6.conf.default.disable_ipv6" = mkDefault (!cfg.enableIPv6);
"net.ipv6.conf.all.forwarding" = mkDefault (any (i: i.proxyARP) interfaces);
} // listToAttrs (flip concatMap (filter (i: i.proxyARP) interfaces)
- (i: flip map [ "4" "6" ] (v: nameValuePair "net.ipv${v}.conf.${i.name}.proxy_arp" true)))
- // listToAttrs (flip map (filter (i: i.preferTempAddress) interfaces)
- (i: nameValuePair "net.ipv6.conf.${i.name}.use_tempaddr" 2));
+ (i: forEach [ "4" "6" ] (v: nameValuePair "net.ipv${v}.conf.${replaceChars ["."] ["/"] i.name}.proxy_arp" true)))
+ // listToAttrs (forEach (filter (i: i.preferTempAddress) interfaces)
+ (i: nameValuePair "net.ipv6.conf.${replaceChars ["."] ["/"] i.name}.use_tempaddr" 2));
# Capabilities won't work unless we have at-least a 4.3 Linux
# kernel because we need the ambient capability
@@ -994,7 +999,7 @@ in
domainname "${cfg.domain}"
'';
- environment.etc."hostid" = mkIf (cfg.hostId != null)
+ environment.etc.hostid = mkIf (cfg.hostId != null)
{ source = pkgs.runCommand "gen-hostid" { preferLocalBuild = true; } ''
hi="${cfg.hostId}"
${if pkgs.stdenv.isBigEndian then ''
@@ -1007,7 +1012,7 @@ in
# static hostname configuration needed for hostnamectl and the
# org.freedesktop.hostname1 dbus service (both provided by systemd)
- environment.etc."hostname" = mkIf (cfg.hostName != "")
+ environment.etc.hostname = mkIf (cfg.hostName != "")
{
text = cfg.hostName + "\n";
};
@@ -1027,7 +1032,7 @@ in
# The network-interfaces target is kept for backwards compatibility.
# New modules must NOT use it.
- systemd.targets."network-interfaces" =
+ systemd.targets.network-interfaces =
{ description = "All Network Interfaces (deprecated)";
wantedBy = [ "network.target" ];
before = [ "network.target" ];
@@ -1050,7 +1055,7 @@ in
${cfg.localCommands}
'';
};
- } // (listToAttrs (flip map interfaces (i:
+ } // (listToAttrs (forEach interfaces (i:
let
deviceDependency = if (config.boot.isContainer || i.name == "lo")
then []
@@ -1092,7 +1097,7 @@ in
destination = "/etc/udev/rules.d/98-${name}";
text = ''
# enable and prefer IPv6 privacy addresses by default
- ACTION=="add", SUBSYSTEM=="net", RUN+="${pkgs.procps}/bin/sysctl net.ipv6.conf.%k.use_tempaddr=2"
+ ACTION=="add", SUBSYSTEM=="net", RUN+="${pkgs.bash}/bin/sh -c 'echo 2 > /proc/sys/net/ipv6/conf/%k/use_tempaddr'"
'';
})
(pkgs.writeTextFile rec {
@@ -1100,7 +1105,7 @@ in
destination = "/etc/udev/rules.d/99-${name}";
text = concatMapStrings (i: ''
# enable IPv6 privacy addresses but prefer EUI-64 addresses for ${i.name}
- ACTION=="add", SUBSYSTEM=="net", RUN+="${pkgs.procps}/bin/sysctl net.ipv6.conf.${i.name}.use_tempaddr=1"
+ ACTION=="add", SUBSYSTEM=="net", RUN+="${pkgs.procps}/bin/sysctl net.ipv6.conf.${replaceChars ["."] ["/"] i.name}.use_tempaddr=1"
'') (filter (i: !i.preferTempAddress) interfaces);
})
] ++ lib.optional (cfg.wlanInterfaces != {})
@@ -1162,13 +1167,13 @@ in
in
flip (concatMapStringsSep "\n") (attrNames wlanDeviceInterfaces) (device:
let
- interfaces = wlanListDeviceFirst device wlanDeviceInterfaces."${device}";
+ interfaces = wlanListDeviceFirst device wlanDeviceInterfaces.${device};
curInterface = elemAt interfaces 0;
newInterfaces = drop 1 interfaces;
in ''
# It is important to have that rule first as overwriting the NAME attribute also prevents the
# next rules from matching.
- ${flip (concatMapStringsSep "\n") (wlanListDeviceFirst device wlanDeviceInterfaces."${device}") (interface:
+ ${flip (concatMapStringsSep "\n") (wlanListDeviceFirst device wlanDeviceInterfaces.${device}) (interface:
''ACTION=="add", SUBSYSTEM=="net", ENV{DEVTYPE}=="wlan", ENV{INTERFACE}=="${interface._iName}", ${systemdAttrs interface._iName}, RUN+="${newInterfaceScript device interface}"'')}
# Add the required, new WLAN interfaces to the default WLAN interface with the
diff --git a/nixos/modules/tasks/swraid.nix b/nixos/modules/tasks/swraid.nix
index 93e03c44c868..8fa19194bed4 100644
--- a/nixos/modules/tasks/swraid.nix
+++ b/nixos/modules/tasks/swraid.nix
@@ -6,51 +6,12 @@
services.udev.packages = [ pkgs.mdadm ];
+ systemd.packages = [ pkgs.mdadm ];
+
boot.initrd.availableKernelModules = [ "md_mod" "raid0" "raid1" "raid10" "raid456" ];
boot.initrd.extraUdevRulesCommands = ''
cp -v ${pkgs.mdadm}/lib/udev/rules.d/*.rules $out/
'';
- systemd.services.mdadm-shutdown = {
- wantedBy = [ "final.target"];
- after = [ "umount.target" ];
-
- unitConfig = {
- DefaultDependencies = false;
- };
-
- serviceConfig = {
- Type = "oneshot";
- ExecStart = ''${pkgs.mdadm}/bin/mdadm --wait-clean --scan'';
- };
- };
-
- systemd.services."mdmon@" = {
- description = "MD Metadata Monitor on /dev/%I";
-
- unitConfig.DefaultDependencies = false;
-
- serviceConfig = {
- Type = "forking";
- Environment = "IMSM_NO_PLATFORM=1";
- ExecStart = ''${pkgs.mdadm}/bin/mdmon --offroot --takeover %I'';
- KillMode = "none";
- };
- };
-
- systemd.services."mdadm-grow-continue@" = {
- description = "Manage MD Reshape on /dev/%I";
-
- unitConfig.DefaultDependencies = false;
-
- serviceConfig = {
- ExecStart = ''${pkgs.mdadm}/bin/mdadm --grow --continue /dev/%I'';
- StandardInput = "null";
- StandardOutput = "null";
- StandardError = "null";
- KillMode = "none";
- };
- };
-
}
diff --git a/nixos/modules/virtualisation/amazon-image.nix b/nixos/modules/virtualisation/amazon-image.nix
index d67790702f1f..aadfc5add350 100644
--- a/nixos/modules/virtualisation/amazon-image.nix
+++ b/nixos/modules/virtualisation/amazon-image.nix
@@ -25,6 +25,9 @@ in
{ assertion = cfg.hvm;
message = "Paravirtualized EC2 instances are no longer supported.";
}
+ { assertion = cfg.efi -> cfg.hvm;
+ message = "EC2 instances using EFI must be HVM instances.";
+ }
];
boot.growPartition = cfg.hvm;
@@ -35,10 +38,14 @@ in
autoResize = true;
};
- boot.extraModulePackages =
- [ config.boot.kernelPackages.ixgbevf
- config.boot.kernelPackages.ena
- ];
+ fileSystems."/boot" = mkIf cfg.efi {
+ device = "/dev/disk/by-label/ESP";
+ fsType = "vfat";
+ };
+
+ boot.extraModulePackages = [
+ config.boot.kernelPackages.ena
+ ];
boot.initrd.kernelModules = [ "xen-blkfront" "xen-netfront" ];
boot.initrd.availableKernelModules = [ "ixgbevf" "ena" "nvme" ];
boot.kernelParams = mkIf cfg.hvm [ "console=ttyS0" ];
@@ -51,8 +58,10 @@ in
# Generate a GRUB menu. Amazon's pv-grub uses this to boot our kernel/initrd.
boot.loader.grub.version = if cfg.hvm then 2 else 1;
- boot.loader.grub.device = if cfg.hvm then "/dev/xvda" else "nodev";
+ boot.loader.grub.device = if (cfg.hvm && !cfg.efi) then "/dev/xvda" else "nodev";
boot.loader.grub.extraPerEntryConfig = mkIf (!cfg.hvm) "root (hd0)";
+ boot.loader.grub.efiSupport = cfg.efi;
+ boot.loader.grub.efiInstallAsRemovable = cfg.efi;
boot.loader.timeout = 0;
boot.initrd.network.enable = true;
@@ -138,7 +147,7 @@ in
networking.timeServers = [ "169.254.169.123" ];
# udisks has become too bloated to have in a headless system
- # (e.g. it depends on GTK+).
+ # (e.g. it depends on GTK).
services.udisks2.enable = false;
};
}
diff --git a/nixos/modules/virtualisation/amazon-options.nix b/nixos/modules/virtualisation/amazon-options.nix
index 15de8638bbab..2e807131e938 100644
--- a/nixos/modules/virtualisation/amazon-options.nix
+++ b/nixos/modules/virtualisation/amazon-options.nix
@@ -1,4 +1,4 @@
-{ config, lib, ... }:
+{ config, lib, pkgs, ... }:
{
options = {
ec2 = {
@@ -9,6 +9,13 @@
Whether the EC2 instance is a HVM instance.
'';
};
+ efi = lib.mkOption {
+ default = pkgs.stdenv.hostPlatform.isAarch64;
+ internal = true;
+ description = ''
+ Whether the EC2 instance is using EFI.
+ '';
+ };
};
};
}
diff --git a/nixos/modules/virtualisation/anbox.nix b/nixos/modules/virtualisation/anbox.nix
index c63b971ead02..da5df3580734 100644
--- a/nixos/modules/virtualisation/anbox.nix
+++ b/nixos/modules/virtualisation/anbox.nix
@@ -56,7 +56,7 @@ in
dns = mkOption {
default = "1.1.1.1";
- type = types.string;
+ type = types.str;
description = ''
Container DNS server.
'';
diff --git a/nixos/modules/virtualisation/azure-agent.nix b/nixos/modules/virtualisation/azure-agent.nix
index 770cefbcd511..036b1036f92a 100644
--- a/nixos/modules/virtualisation/azure-agent.nix
+++ b/nixos/modules/virtualisation/azure-agent.nix
@@ -166,7 +166,6 @@ in
wantedBy = [ "sshd.service" "waagent.service" ];
before = [ "sshd.service" "waagent.service" ];
- after = [ "local-fs.target" ];
path = [ pkgs.coreutils ];
script =
diff --git a/nixos/modules/virtualisation/azure-image.nix b/nixos/modules/virtualisation/azure-image.nix
index dd2108ccc379..e91dd72ff5d4 100644
--- a/nixos/modules/virtualisation/azure-image.nix
+++ b/nixos/modules/virtualisation/azure-image.nix
@@ -26,7 +26,6 @@ in
wantedBy = [ "sshd.service" "waagent.service" ];
before = [ "sshd.service" "waagent.service" ];
- after = [ "local-fs.target" ];
path = [ pkgs.coreutils ];
script =
diff --git a/nixos/modules/virtualisation/brightbox-image.nix b/nixos/modules/virtualisation/brightbox-image.nix
index e716982c510a..d0efbcc808aa 100644
--- a/nixos/modules/virtualisation/brightbox-image.nix
+++ b/nixos/modules/virtualisation/brightbox-image.nix
@@ -111,7 +111,7 @@ in
# Always include cryptsetup so that NixOps can use it.
environment.systemPackages = [ pkgs.cryptsetup ];
- systemd.services."fetch-ec2-data" =
+ systemd.services.fetch-ec2-data =
{ description = "Fetch EC2 Data";
wantedBy = [ "multi-user.target" "sshd.service" ];
diff --git a/nixos/modules/virtualisation/container-config.nix b/nixos/modules/virtualisation/container-config.nix
index 604fb8a75932..f7a37d8c9f3b 100644
--- a/nixos/modules/virtualisation/container-config.nix
+++ b/nixos/modules/virtualisation/container-config.nix
@@ -7,6 +7,7 @@ with lib;
config = mkIf config.boot.isContainer {
# Disable some features that are not useful in a container.
+ nix.optimise.automatic = mkDefault false; # the store is host managed
services.udisks2.enable = mkDefault false;
powerManagement.enable = mkDefault false;
diff --git a/nixos/modules/virtualisation/containers.nix b/nixos/modules/virtualisation/containers.nix
index c10e2b162ccc..691ee2c136ec 100644
--- a/nixos/modules/virtualisation/containers.nix
+++ b/nixos/modules/virtualisation/containers.nix
@@ -138,7 +138,7 @@ let
--bind-ro=/nix/var/nix/daemon-socket \
--bind="/nix/var/nix/profiles/per-container/$INSTANCE:/nix/var/nix/profiles" \
--bind="/nix/var/nix/gcroots/per-container/$INSTANCE:/nix/var/nix/gcroots" \
- --link-journal=try-guest \
+ ${optionalString (!cfg.ephemeral) "--link-journal=try-guest"} \
--setenv PRIVATE_NETWORK="$PRIVATE_NETWORK" \
--setenv HOST_BRIDGE="$HOST_BRIDGE" \
--setenv HOST_ADDRESS="$HOST_ADDRESS" \
@@ -147,6 +147,7 @@ let
--setenv LOCAL_ADDRESS6="$LOCAL_ADDRESS6" \
--setenv HOST_PORT="$HOST_PORT" \
--setenv PATH="$PATH" \
+ ${optionalString cfg.ephemeral "--ephemeral"} \
${if cfg.additionalCapabilities != null && cfg.additionalCapabilities != [] then
''--capability="${concatStringsSep " " cfg.additionalCapabilities}"'' else ""
} \
@@ -247,12 +248,18 @@ let
Type = "notify";
+ RuntimeDirectory = lib.optional cfg.ephemeral "containers/%i";
+
# Note that on reboot, systemd-nspawn returns 133, so this
# unit will be restarted. On poweroff, it returns 0, so the
# unit won't be restarted.
RestartForceExitStatus = "133";
SuccessExitStatus = "133";
+ # Some containers take long to start
+ # especially when you automatically start many at once
+ TimeoutStartSec = cfg.timeoutStartSec;
+
Restart = "on-failure";
Slice = "machine.slice";
@@ -330,7 +337,7 @@ let
networkOptions = {
hostBridge = mkOption {
- type = types.nullOr types.string;
+ type = types.nullOr types.str;
default = null;
example = "br0";
description = ''
@@ -380,7 +387,7 @@ let
};
hostAddress6 = mkOption {
- type = types.nullOr types.string;
+ type = types.nullOr types.str;
default = null;
example = "fc00::1";
description = ''
@@ -402,7 +409,7 @@ let
};
localAddress6 = mkOption {
- type = types.nullOr types.string;
+ type = types.nullOr types.str;
default = null;
example = "fc00::2";
description = ''
@@ -419,6 +426,8 @@ let
{
extraVeths = {};
additionalCapabilities = [];
+ ephemeral = false;
+ timeoutStartSec = "15s";
allowedDevices = [];
hostAddress = null;
hostAddress6 = null;
@@ -511,6 +520,26 @@ in
information.
'';
};
+
+ ephemeral = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Runs container in ephemeral mode with the empty root filesystem at boot.
+ This way container will be bootstrapped from scratch on each boot
+ and will be cleaned up on shutdown leaving no traces behind.
+ Useful for completely stateless, reproducible containers.
+
+ Note that this option might require to do some adjustments to the container configuration,
+ e.g. you might want to set
+ systemd.network.networks.$interface.dhcpConfig.ClientIdentifier to "mac"
+ if you use macvlans option.
+ This way dhcp client identifier will be stable between the container restarts.
+
+ Note that the container journal will not be linked to the host if this option is enabled.
+ '';
+ };
+
enableTun = mkOption {
type = types.bool;
default = false;
@@ -536,7 +565,7 @@ in
};
interfaces = mkOption {
- type = types.listOf types.string;
+ type = types.listOf types.str;
default = [];
example = [ "eth1" "eth2" ];
description = ''
@@ -571,6 +600,18 @@ in
'';
};
+ timeoutStartSec = mkOption {
+ type = types.str;
+ default = "1min";
+ description = ''
+ Time for the container to start. In case of a timeout,
+ the container processes get killed.
+ See systemd.time
+ 7
+ for more information about the format.
+ '';
+ };
+
bindMounts = mkOption {
type = with types; loaOf (submodule bindMountOpts);
default = {};
@@ -659,12 +700,14 @@ in
unit = {
description = "Container '%i'";
- unitConfig.RequiresMountsFor = [ "/var/lib/containers/%i" ];
+ unitConfig.RequiresMountsFor = "/var/lib/containers/%i";
path = [ pkgs.iproute ];
- environment.INSTANCE = "%i";
- environment.root = "/var/lib/containers/%i";
+ environment = {
+ root = "/var/lib/containers/%i";
+ INSTANCE = "%i";
+ };
preStart = preStartScript dummyConfig;
@@ -686,7 +729,7 @@ in
serviceConfig = serviceDirectives dummyConfig;
};
in {
- systemd.targets."multi-user".wants = [ "machines.target" ];
+ systemd.targets.multi-user.wants = [ "machines.target" ];
systemd.services = listToAttrs (filter (x: x.value != null) (
# The generic container template used by imperative containers
@@ -703,11 +746,13 @@ in
}
else {});
in
- unit // {
+ recursiveUpdate unit {
preStart = preStartScript containerConfig;
script = startScript containerConfig;
postStart = postStartScript containerConfig;
serviceConfig = serviceDirectives containerConfig;
+ unitConfig.RequiresMountsFor = lib.optional (!containerConfig.ephemeral) "/var/lib/containers/%i";
+ environment.root = if containerConfig.ephemeral then "/run/containers/%i" else "/var/lib/containers/%i";
} // (
if containerConfig.autoStart then
{
@@ -779,5 +824,12 @@ in
'';
environment.systemPackages = [ pkgs.nixos-container ];
+
+ boot.kernelModules = [
+ "bridge"
+ "macvlan"
+ "tap"
+ "tun"
+ ];
});
}
diff --git a/nixos/modules/virtualisation/cri-o.nix b/nixos/modules/virtualisation/cri-o.nix
new file mode 100644
index 000000000000..14a435f6c8bb
--- /dev/null
+++ b/nixos/modules/virtualisation/cri-o.nix
@@ -0,0 +1,106 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+ cfg = config.virtualisation.cri-o;
+in
+{
+ options.virtualisation.cri-o = {
+ enable = mkEnableOption "Container Runtime Interface for OCI (CRI-O)";
+
+ storageDriver = mkOption {
+ type = types.enum ["btrfs" "overlay" "vfs"];
+ default = "overlay";
+ description = "Storage driver to be used";
+ };
+
+ logLevel = mkOption {
+ type = types.enum ["trace" "debug" "info" "warn" "error" "fatal"];
+ default = "info";
+ description = "Log level to be used";
+ };
+
+ pauseImage = mkOption {
+ type = types.str;
+ default = "k8s.gcr.io/pause:3.1";
+ description = "Pause image for pod sandboxes to be used";
+ };
+
+ pauseCommand = mkOption {
+ type = types.str;
+ default = "/pause";
+ description = "Pause command to be executed";
+ };
+
+ registries = mkOption {
+ type = types.listOf types.str;
+ default = [ "docker.io" "quay.io" ];
+ description = "Registries to be configured for unqualified image pull";
+ };
+ };
+
+ config = mkIf cfg.enable {
+ environment.systemPackages = with pkgs;
+ [ cri-o cri-tools conmon cni-plugins iptables runc utillinux ];
+ environment.etc."crictl.yaml".text = ''
+ runtime-endpoint: unix:///var/run/crio/crio.sock
+ '';
+ environment.etc."crio/crio.conf".text = ''
+ [crio]
+ storage_driver = "${cfg.storageDriver}"
+
+ [crio.image]
+ pause_image = "${cfg.pauseImage}"
+ pause_command = "${cfg.pauseCommand}"
+ registries = [
+ ${concatMapStringsSep ", " (x: "\"" + x + "\"") cfg.registries}
+ ]
+
+ [crio.runtime]
+ conmon = "${pkgs.conmon}/bin/conmon"
+ log_level = "${cfg.logLevel}"
+ manage_network_ns_lifecycle = true
+ '';
+ environment.etc."containers/policy.json".text = ''
+ {"default": [{"type": "insecureAcceptAnything"}]}
+ '';
+ environment.etc."cni/net.d/20-cri-o-bridge.conf".text = ''
+ {
+ "cniVersion": "0.3.1",
+ "name": "crio-bridge",
+ "type": "bridge",
+ "bridge": "cni0",
+ "isGateway": true,
+ "ipMasq": true,
+ "ipam": {
+ "type": "host-local",
+ "subnet": "10.88.0.0/16",
+ "routes": [
+ { "dst": "0.0.0.0/0" }
+ ]
+ }
+ }
+ '';
+
+ systemd.services.crio = {
+ description = "Container Runtime Interface for OCI (CRI-O)";
+ documentation = [ "https://github.com/cri-o/cri-o" ];
+ wantedBy = [ "multi-user.target" ];
+ after = [ "network.target" ];
+ path = [ pkgs.utillinux pkgs.runc pkgs.iptables ];
+ serviceConfig = {
+ Type = "notify";
+ ExecStart = "${pkgs.cri-o}/bin/crio";
+ ExecReload = "/bin/kill -s HUP $MAINPID";
+ TasksMax = "infinity";
+ LimitNOFILE = "1048576";
+ LimitNPROC = "1048576";
+ LimitCORE = "infinity";
+ OOMScoreAdjust = "-999";
+ TimeoutStartSec = "0";
+ Restart = "on-abnormal";
+ };
+ };
+ };
+}
diff --git a/nixos/modules/virtualisation/ec2-data.nix b/nixos/modules/virtualisation/ec2-data.nix
index db3dd9949c12..82451787e8a1 100644
--- a/nixos/modules/virtualisation/ec2-data.nix
+++ b/nixos/modules/virtualisation/ec2-data.nix
@@ -64,7 +64,7 @@ with lib;
serviceConfig.RemainAfterExit = true;
};
- systemd.services."print-host-key" =
+ systemd.services.print-host-key =
{ description = "Print SSH Host Key";
wantedBy = [ "multi-user.target" ];
after = [ "sshd.service" ];
diff --git a/nixos/modules/virtualisation/google-compute-config.nix b/nixos/modules/virtualisation/google-compute-config.nix
index 5c59188b68b2..327324f2921d 100644
--- a/nixos/modules/virtualisation/google-compute-config.nix
+++ b/nixos/modules/virtualisation/google-compute-config.nix
@@ -21,7 +21,7 @@ in
boot.initrd.kernelModules = [ "virtio_scsi" ];
boot.kernelModules = [ "virtio_pci" "virtio_net" ];
- # Generate a GRUB menu. Amazon's pv-grub uses this to boot our kernel/initrd.
+ # Generate a GRUB menu.
boot.loader.grub.device = "/dev/sda";
boot.loader.timeout = 0;
@@ -29,12 +29,16 @@ in
# way to select them anyway.
boot.loader.grub.configurationLimit = 0;
- # Allow root logins only using the SSH key that the user specified
- # at instance creation time.
+ # Allow root logins only using SSH keys
+ # and disable password authentication in general
services.openssh.enable = true;
services.openssh.permitRootLogin = "prohibit-password";
services.openssh.passwordAuthentication = mkDefault false;
+ # enable OS Login. This also requires setting enable-oslogin=TRUE metadata on
+ # instance or project level
+ security.googleOsLogin.enable = true;
+
# Use GCE udev rules for dynamic disk volumes
services.udev.packages = [ gce ];
@@ -65,171 +69,80 @@ in
# GC has 1460 MTU
networking.interfaces.eth0.mtu = 1460;
- security.googleOsLogin.enable = true;
-
- systemd.services.google-clock-skew-daemon = {
- description = "Google Compute Engine Clock Skew Daemon";
- after = [
- "network.target"
- "google-instance-setup.service"
- "google-network-setup.service"
- ];
- requires = ["network.target"];
- wantedBy = ["multi-user.target"];
- serviceConfig = {
- Type = "simple";
- ExecStart = "${gce}/bin/google_clock_skew_daemon --debug";
- };
- };
-
systemd.services.google-instance-setup = {
description = "Google Compute Engine Instance Setup";
- after = ["local-fs.target" "network-online.target" "network.target" "rsyslog.service"];
- before = ["sshd.service"];
- wants = ["local-fs.target" "network-online.target" "network.target"];
- wantedBy = [ "sshd.service" "multi-user.target" ];
- path = with pkgs; [ ethtool openssh ];
+ after = [ "network-online.target" "network.target" "rsyslog.service" ];
+ before = [ "sshd.service" ];
+ path = with pkgs; [ coreutils ethtool openssh ];
serviceConfig = {
- ExecStart = "${gce}/bin/google_instance_setup --debug";
+ ExecStart = "${gce}/bin/google_instance_setup";
+ StandardOutput="journal+console";
Type = "oneshot";
};
+ wantedBy = [ "sshd.service" "multi-user.target" ];
};
systemd.services.google-network-daemon = {
description = "Google Compute Engine Network Daemon";
- after = ["local-fs.target" "network-online.target" "network.target" "rsyslog.service" "google-instance-setup.service"];
- wants = ["local-fs.target" "network-online.target" "network.target"];
- requires = ["network.target"];
- partOf = ["network.target"];
- wantedBy = [ "multi-user.target" ];
+ after = [ "network-online.target" "network.target" "google-instance-setup.service" ];
path = with pkgs; [ iproute ];
serviceConfig = {
- ExecStart = "${gce}/bin/google_network_daemon --debug";
+ ExecStart = "${gce}/bin/google_network_daemon";
+ StandardOutput="journal+console";
+ Type="simple";
};
+ wantedBy = [ "multi-user.target" ];
};
+ systemd.services.google-clock-skew-daemon = {
+ description = "Google Compute Engine Clock Skew Daemon";
+ after = [ "network.target" "google-instance-setup.service" "google-network-daemon.service" ];
+ serviceConfig = {
+ ExecStart = "${gce}/bin/google_clock_skew_daemon";
+ StandardOutput="journal+console";
+ Type = "simple";
+ };
+ wantedBy = ["multi-user.target"];
+ };
+
+
systemd.services.google-shutdown-scripts = {
description = "Google Compute Engine Shutdown Scripts";
after = [
- "local-fs.target"
"network-online.target"
"network.target"
"rsyslog.service"
- "systemd-resolved.service"
"google-instance-setup.service"
"google-network-daemon.service"
];
- wants = [ "local-fs.target" "network-online.target" "network.target"];
- wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${pkgs.coreutils}/bin/true";
- ExecStop = "${gce}/bin/google_metadata_script_runner --debug --script-type shutdown";
- Type = "oneshot";
+ ExecStop = "${gce}/bin/google_metadata_script_runner --script-type shutdown";
RemainAfterExit = true;
- TimeoutStopSec = "infinity";
+ StandardOutput="journal+console";
+ TimeoutStopSec = "0";
+ Type = "oneshot";
};
+ wantedBy = [ "multi-user.target" ];
};
systemd.services.google-startup-scripts = {
description = "Google Compute Engine Startup Scripts";
after = [
- "local-fs.target"
"network-online.target"
"network.target"
"rsyslog.service"
"google-instance-setup.service"
"google-network-daemon.service"
];
- wants = ["local-fs.target" "network-online.target" "network.target"];
- wantedBy = [ "multi-user.target" ];
serviceConfig = {
- ExecStart = "${gce}/bin/google_metadata_script_runner --debug --script-type startup";
+ ExecStart = "${gce}/bin/google_metadata_script_runner --script-type startup";
KillMode = "process";
+ StandardOutput = "journal+console";
Type = "oneshot";
};
+ wantedBy = [ "multi-user.target" ];
};
-
- # Settings taken from https://github.com/GoogleCloudPlatform/compute-image-packages/blob/master/google_config/sysctl/11-gce-network-security.conf
- boot.kernel.sysctl = {
- # Turn on SYN-flood protections. Starting with 2.6.26, there is no loss
- # of TCP functionality/features under normal conditions. When flood
- # protections kick in under high unanswered-SYN load, the system
- # should remain more stable, with a trade off of some loss of TCP
- # functionality/features (e.g. TCP Window scaling).
- "net.ipv4.tcp_syncookies" = mkDefault "1";
-
- # ignores source-routed packets
- "net.ipv4.conf.all.accept_source_route" = mkDefault "0";
-
- # ignores source-routed packets
- "net.ipv4.conf.default.accept_source_route" = mkDefault "0";
-
- # ignores ICMP redirects
- "net.ipv4.conf.all.accept_redirects" = mkDefault "0";
-
- # ignores ICMP redirects
- "net.ipv4.conf.default.accept_redirects" = mkDefault "0";
-
- # ignores ICMP redirects from non-GW hosts
- "net.ipv4.conf.all.secure_redirects" = mkDefault "1";
-
- # ignores ICMP redirects from non-GW hosts
- "net.ipv4.conf.default.secure_redirects" = mkDefault "1";
-
- # don't allow traffic between networks or act as a router
- "net.ipv4.ip_forward" = mkDefault "0";
-
- # don't allow traffic between networks or act as a router
- "net.ipv4.conf.all.send_redirects" = mkDefault "0";
-
- # don't allow traffic between networks or act as a router
- "net.ipv4.conf.default.send_redirects" = mkDefault "0";
-
- # reverse path filtering - IP spoofing protection
- "net.ipv4.conf.all.rp_filter" = mkDefault "1";
-
- # reverse path filtering - IP spoofing protection
- "net.ipv4.conf.default.rp_filter" = mkDefault "1";
-
- # ignores ICMP broadcasts to avoid participating in Smurf attacks
- "net.ipv4.icmp_echo_ignore_broadcasts" = mkDefault "1";
-
- # ignores bad ICMP errors
- "net.ipv4.icmp_ignore_bogus_error_responses" = mkDefault "1";
-
- # logs spoofed, source-routed, and redirect packets
- "net.ipv4.conf.all.log_martians" = mkDefault "1";
-
- # log spoofed, source-routed, and redirect packets
- "net.ipv4.conf.default.log_martians" = mkDefault "1";
-
- # implements RFC 1337 fix
- "net.ipv4.tcp_rfc1337" = mkDefault "1";
-
- # randomizes addresses of mmap base, heap, stack and VDSO page
- "kernel.randomize_va_space" = mkDefault "2";
-
- # Reboot the machine soon after a kernel panic.
- "kernel.panic" = mkDefault "10";
-
- ## Not part of the original config
-
- # provides protection from ToCToU races
- "fs.protected_hardlinks" = mkDefault "1";
-
- # provides protection from ToCToU races
- "fs.protected_symlinks" = mkDefault "1";
-
- # makes locating kernel addresses more difficult
- "kernel.kptr_restrict" = mkDefault "1";
-
- # set ptrace protections
- "kernel.yama.ptrace_scope" = mkOverride 500 "1";
-
- # set perf only available to root
- "kernel.perf_event_paranoid" = mkDefault "2";
-
- };
-
+ environment.etc."sysctl.d/11-gce-network-security.conf".source = "${gce}/sysctl.d/11-gce-network-security.conf";
}
diff --git a/nixos/modules/virtualisation/kvmgt.nix b/nixos/modules/virtualisation/kvmgt.nix
index 289e26e17035..36ef6d17df69 100644
--- a/nixos/modules/virtualisation/kvmgt.nix
+++ b/nixos/modules/virtualisation/kvmgt.nix
@@ -9,7 +9,7 @@ let
vgpuOptions = {
uuid = mkOption {
- type = types.string;
+ type = types.str;
description = "UUID of VGPU device. You can generate one with libossp_uuid.";
};
};
@@ -23,7 +23,7 @@ in {
'';
# multi GPU support is under the question
device = mkOption {
- type = types.string;
+ type = types.str;
default = "0000:00:02.0";
description = "PCI ID of graphics card. You can figure it with ls /sys/class/mdev_bus.";
};
@@ -35,7 +35,7 @@ in {
and find info about device via cat /sys/bus/pci/devices/*/mdev_supported_types/i915-GVTg_V5_4/description
'';
example = {
- "i915-GVTg_V5_8" = {
+ i915-GVTg_V5_8 = {
uuid = "a297db4a-f4c2-11e6-90f6-d3b88d6c9525";
};
};
diff --git a/nixos/modules/virtualisation/libvirtd.nix b/nixos/modules/virtualisation/libvirtd.nix
index 394b4ce56563..16b79d869193 100644
--- a/nixos/modules/virtualisation/libvirtd.nix
+++ b/nixos/modules/virtualisation/libvirtd.nix
@@ -104,6 +104,18 @@ in {
'';
};
+ onBoot = mkOption {
+ type = types.enum ["start" "ignore" ];
+ default = "start";
+ description = ''
+ Specifies the action to be done to / on the guests when the host boots.
+ The "start" option starts all guests that were running prior to shutdown
+ regardless of their autostart settings. The "ignore" option will not
+ start the formally running guest on boot. However, any guest marked as
+ autostart will still be automatically started by libvirtd.
+ '';
+ };
+
onShutdown = mkOption {
type = types.enum ["shutdown" "suspend" ];
default = "suspend";
@@ -221,6 +233,7 @@ in {
path = with pkgs; [ coreutils libvirt gawk ];
restartIfChanged = false;
+ environment.ON_BOOT = "${cfg.onBoot}";
environment.ON_SHUTDOWN = "${cfg.onShutdown}";
};
diff --git a/nixos/modules/virtualisation/railcar.nix b/nixos/modules/virtualisation/railcar.nix
new file mode 100644
index 000000000000..12da1c75fc38
--- /dev/null
+++ b/nixos/modules/virtualisation/railcar.nix
@@ -0,0 +1,125 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+ cfg = config.services.railcar;
+ generateUnit = name: containerConfig:
+ let
+ container = pkgs.ociTools.buildContainer {
+ args = [
+ (pkgs.writeShellScript "run.sh" containerConfig.cmd).outPath
+ ];
+ };
+ in
+ nameValuePair "railcar-${name}" {
+ enable = true;
+ wantedBy = [ "multi-user.target" ];
+ serviceConfig = {
+ ExecStart = ''
+ ${cfg.package}/bin/railcar -r ${cfg.stateDir} run ${name} -b ${container}
+ '';
+ Type = containerConfig.runType;
+ };
+ };
+ mount = with types; (submodule {
+ options = {
+ type = mkOption {
+ type = str;
+ default = "none";
+ description = ''
+ The type of the filesystem to be mounted.
+ Linux: filesystem types supported by the kernel as listed in
+ `/proc/filesystems` (e.g., "minix", "ext2", "ext3", "jfs", "xfs",
+ "reiserfs", "msdos", "proc", "nfs", "iso9660"). For bind mounts
+ (when options include either bind or rbind), the type is a dummy,
+ often "none" (not listed in /proc/filesystems).
+ '';
+ };
+ source = mkOption {
+ type = str;
+ description = "Source for the in-container mount";
+ };
+ options = mkOption {
+ type = loaOf (str);
+ default = [ "bind" ];
+ description = ''
+ Mount options of the filesystem to be used.
+
+ Support optoions are listed in the mount(8) man page. Note that
+ both filesystem-independent and filesystem-specific options
+ are listed.
+ '';
+ };
+ };
+ });
+in
+{
+ options.services.railcar = {
+ enable = mkEnableOption "railcar";
+
+ containers = mkOption {
+ default = {};
+ description = "Declarative container configuration";
+ type = with types; loaOf (submodule ({ name, config, ... }: {
+ options = {
+ cmd = mkOption {
+ type = types.lines;
+ description = "Command or script to run inside the container";
+ };
+
+ mounts = mkOption {
+ type = with types; attrsOf mount;
+ default = {};
+ description = ''
+ A set of mounts inside the container.
+
+ The defaults have been chosen for simple bindmounts, meaning
+ that you only need to provide the "source" parameter.
+ '';
+ example = ''
+ { "/data" = { source = "/var/lib/data"; }; }
+ '';
+ };
+
+ runType = mkOption {
+ type = types.str;
+ default = "oneshot";
+ description = "The systemd service run type";
+ };
+
+ os = mkOption {
+ type = types.str;
+ default = "linux";
+ description = "OS type of the container";
+ };
+
+ arch = mkOption {
+ type = types.str;
+ default = "x86_64";
+ description = "Computer architecture type of the container";
+ };
+ };
+ }));
+ };
+
+ stateDir = mkOption {
+ type = types.path;
+ default = ''/var/railcar'';
+ description = "Railcar persistent state directory";
+ };
+
+ package = mkOption {
+ type = types.package;
+ default = pkgs.railcar;
+ description = "Railcar package to use";
+ };
+ };
+
+ config = mkIf cfg.enable {
+ systemd.services = flip mapAttrs' cfg.containers (name: containerConfig:
+ generateUnit name containerConfig
+ );
+ };
+}
+
diff --git a/nixos/modules/virtualisation/virtualbox-host.nix b/nixos/modules/virtualisation/virtualbox-host.nix
index 41bcb909fb5c..6081d4153a6c 100644
--- a/nixos/modules/virtualisation/virtualbox-host.nix
+++ b/nixos/modules/virtualisation/virtualbox-host.nix
@@ -122,7 +122,7 @@ in
# Since we lack the right setuid/setcap binaries, set up a host-only network by default.
} (mkIf cfg.addNetworkInterface {
- systemd.services."vboxnet0" =
+ systemd.services.vboxnet0 =
{ description = "VirtualBox vboxnet0 Interface";
requires = [ "dev-vboxnetctl.device" ];
after = [ "dev-vboxnetctl.device" ];
diff --git a/nixos/modules/virtualisation/vmware-guest.nix b/nixos/modules/virtualisation/vmware-guest.nix
index d18778f81588..f418f849759f 100644
--- a/nixos/modules/virtualisation/vmware-guest.nix
+++ b/nixos/modules/virtualisation/vmware-guest.nix
@@ -33,7 +33,7 @@ in
serviceConfig.ExecStart = "${open-vm-tools}/bin/vmtoolsd";
};
- environment.etc."vmware-tools".source = "${open-vm-tools}/etc/vmware-tools/*";
+ environment.etc.vmware-tools.source = "${open-vm-tools}/etc/vmware-tools/*";
services.xserver = mkIf (!cfg.headless) {
videoDrivers = mkOverride 50 [ "vmware" ];
diff --git a/nixos/modules/virtualisation/xen-dom0.nix b/nixos/modules/virtualisation/xen-dom0.nix
index 70e575b6c0d2..06d5c63476f9 100644
--- a/nixos/modules/virtualisation/xen-dom0.nix
+++ b/nixos/modules/virtualisation/xen-dom0.nix
@@ -119,7 +119,7 @@ in
virtualisation.xen.domains = {
extraConfig = mkOption {
- type = types.string;
+ type = types.lines;
default = "";
description =
''
diff --git a/nixos/release-combined.nix b/nixos/release-combined.nix
index b9a9515f94ef..9e2109d88b5f 100644
--- a/nixos/release-combined.nix
+++ b/nixos/release-combined.nix
@@ -68,8 +68,10 @@ in rec {
nixos.tests.chromium.x86_64-linux or []
(all nixos.tests.firefox)
(all nixos.tests.firewall)
- (except ["aarch64-linux"] nixos.tests.gnome3)
- (except ["aarch64-linux"] nixos.tests.pantheon)
+ (all nixos.tests.fontconfig-default-fonts)
+ (all nixos.tests.gnome3-xorg)
+ (all nixos.tests.gnome3)
+ (all nixos.tests.pantheon)
nixos.tests.installer.zfsroot.x86_64-linux or [] # ZFS is 64bit only
(except ["aarch64-linux"] nixos.tests.installer.lvm)
(except ["aarch64-linux"] nixos.tests.installer.luksroot)
@@ -103,7 +105,7 @@ in rec {
#(all nixos.tests.keymap.neo)
#(all nixos.tests.keymap.qwertz)
(all nixos.tests.plasma5)
- #(all nixos.tests.lightdm)
+ (all nixos.tests.lightdm)
(all nixos.tests.login)
(all nixos.tests.misc)
(all nixos.tests.mutableUsers)
@@ -135,6 +137,7 @@ in rec {
(all nixos.tests.switchTest)
(all nixos.tests.udisks2)
(all nixos.tests.xfce)
+ (all nixos.tests.xfce4-14)
nixpkgs.tarball
(all allSupportedNixpkgs.emacs)
diff --git a/nixos/release.nix b/nixos/release.nix
index df2c52ccd0b6..f40b5fa9bd7f 100644
--- a/nixos/release.nix
+++ b/nixos/release.nix
@@ -180,6 +180,11 @@ in rec {
inherit system;
});
+ sd_image_raspberrypi4 = forMatchingSystems [ "aarch64-linux" ] (system: makeSdImage {
+ module = ./modules/installer/cd-dvd/sd-image-raspberrypi4.nix;
+ inherit system;
+ });
+
# A bootable VirtualBox virtual appliance as an OVA file (i.e. packaged OVF).
ova = forMatchingSystems [ "x86_64-linux" ] (system:
@@ -196,6 +201,22 @@ in rec {
);
+ # A disk image that can be imported to Amazon EC2 and registered as an AMI
+ amazonImage = forMatchingSystems [ "x86_64-linux" "aarch64-linux" ] (system:
+
+ with import nixpkgs { inherit system; };
+
+ hydraJob ((import lib/eval-config.nix {
+ inherit system;
+ modules =
+ [ versionModule
+ ./maintainers/scripts/ec2/amazon-image.nix
+ ];
+ }).config.system.build.amazonImage)
+
+ );
+
+
# Ensure that all packages used by the minimal NixOS config end up in the channel.
dummy = forAllSystems (system: pkgs.runCommand "dummy"
{ toplevel = (import lib/eval-config.nix {
@@ -276,6 +297,12 @@ in rec {
services.xserver.desktopManager.xfce.enable = true;
});
+ gnome3 = makeClosure ({ ... }:
+ { services.xserver.enable = true;
+ services.xserver.displayManager.gdm.enable = true;
+ services.xserver.desktopManager.gnome3.enable = true;
+ });
+
# Linux/Apache/PostgreSQL/PHP stack.
lapp = makeClosure ({ pkgs, ... }:
{ services.httpd.enable = true;
diff --git a/nixos/tests/acme.nix b/nixos/tests/acme.nix
index 4669a092433e..8cfdea4a16ef 100644
--- a/nixos/tests/acme.nix
+++ b/nixos/tests/acme.nix
@@ -3,19 +3,49 @@ let
in import ./make-test.nix {
name = "acme";
- nodes = {
+ nodes = rec {
letsencrypt = ./common/letsencrypt;
+ acmeStandalone = { config, pkgs, ... }: {
+ imports = [ commonConfig ];
+ networking.firewall.allowedTCPPorts = [ 80 ];
+ networking.extraHosts = ''
+ ${config.networking.primaryIPAddress} standalone.com
+ '';
+ security.acme.certs."standalone.com" = {
+ webroot = "/var/lib/acme/acme-challenges";
+ };
+ systemd.targets."acme-finished-standalone.com" = {};
+ systemd.services."acme-standalone.com" = {
+ wants = [ "acme-finished-standalone.com.target" ];
+ before = [ "acme-finished-standalone.com.target" ];
+ };
+ services.nginx.enable = true;
+ services.nginx.virtualHosts."standalone.com" = {
+ locations."/.well-known/acme-challenge".root = "/var/lib/acme/acme-challenges";
+ };
+ };
+
webserver = { config, pkgs, ... }: {
imports = [ commonConfig ];
networking.firewall.allowedTCPPorts = [ 80 443 ];
networking.extraHosts = ''
- ${config.networking.primaryIPAddress} example.com
+ ${config.networking.primaryIPAddress} a.example.com
+ ${config.networking.primaryIPAddress} b.example.com
'';
+ # A target remains active. Use this to probe the fact that
+ # a service fired eventhough it is not RemainAfterExit
+ systemd.targets."acme-finished-a.example.com" = {};
+ systemd.services."acme-a.example.com" = {
+ wants = [ "acme-finished-a.example.com.target" ];
+ before = [ "acme-finished-a.example.com.target" ];
+ };
+
services.nginx.enable = true;
- services.nginx.virtualHosts."example.com" = {
+
+ services.nginx.virtualHosts."a.example.com" = {
enableACME = true;
forceSSL = true;
locations."/".root = pkgs.runCommand "docroot" {} ''
@@ -23,17 +53,63 @@ in import ./make-test.nix {
echo hello world > "$out/index.html"
'';
};
+
+ nesting.clone = [
+ ({pkgs, ...}: {
+
+ networking.extraHosts = ''
+ ${config.networking.primaryIPAddress} b.example.com
+ '';
+ systemd.targets."acme-finished-b.example.com" = {};
+ systemd.services."acme-b.example.com" = {
+ wants = [ "acme-finished-b.example.com.target" ];
+ before = [ "acme-finished-b.example.com.target" ];
+ };
+ services.nginx.virtualHosts."b.example.com" = {
+ enableACME = true;
+ forceSSL = true;
+ locations."/".root = pkgs.runCommand "docroot" {} ''
+ mkdir -p "$out"
+ echo hello world > "$out/index.html"
+ '';
+ };
+ })
+ ];
};
client = commonConfig;
};
- testScript = ''
- $letsencrypt->waitForUnit("default.target");
- $letsencrypt->waitForUnit("boulder.service");
- $webserver->waitForUnit("default.target");
- $webserver->waitForUnit("acme-certificates.target");
- $client->waitForUnit("default.target");
- $client->succeed('curl https://example.com/ | grep -qF "hello world"');
- '';
+ testScript = {nodes, ...}:
+ let
+ newServerSystem = nodes.webserver2.config.system.build.toplevel;
+ switchToNewServer = "${newServerSystem}/bin/switch-to-configuration test";
+ in
+ # Note, waitForUnit does not work for oneshot services that do not have RemainAfterExit=true,
+ # this is because a oneshot goes from inactive => activating => inactive, and never
+ # reaches the active state. To work around this, we create some mock target units which
+ # get pulled in by the oneshot units. The target units linger after activation, and hence we
+ # can use them to probe that a oneshot fired. It is a bit ugly, but it is the best we can do
+ ''
+ $client->waitForUnit("default.target");
+ $letsencrypt->waitForUnit("default.target");
+ $letsencrypt->waitForUnit("boulder.service");
+
+ subtest "can request certificate with HTTPS-01 challenge", sub {
+ $acmeStandalone->waitForUnit("default.target");
+ $acmeStandalone->succeed("systemctl start acme-standalone.com.service");
+ $acmeStandalone->waitForUnit("acme-finished-standalone.com.target");
+ };
+
+ subtest "Can request certificate for nginx service", sub {
+ $webserver->waitForUnit("acme-finished-a.example.com.target");
+ $client->succeed('curl https://a.example.com/ | grep -qF "hello world"');
+ };
+
+ subtest "Can add another certificate for nginx service", sub {
+ $webserver->succeed("/run/current-system/fine-tune/child-1/bin/switch-to-configuration test");
+ $webserver->waitForUnit("acme-finished-b.example.com.target");
+ $client->succeed('curl https://b.example.com/ | grep -qF "hello world"');
+ };
+ '';
}
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix
index c3fa53ac544f..e94c9712cbfa 100644
--- a/nixos/tests/all-tests.nix
+++ b/nixos/tests/all-tests.nix
@@ -25,6 +25,7 @@ in
atd = handleTest ./atd.nix {};
automysqlbackup = handleTest ./automysqlbackup.nix {};
avahi = handleTest ./avahi.nix {};
+ babeld = handleTest ./babeld.nix {};
bcachefs = handleTestOn ["x86_64-linux"] ./bcachefs.nix {}; # linux-4.18.2018.10.12 is unsupported on aarch64
beanstalkd = handleTest ./beanstalkd.nix {};
beegfs = handleTestOn ["x86_64-linux"] ./beegfs.nix {}; # beegfs is unsupported on aarch64
@@ -35,6 +36,7 @@ in
boot-stage1 = handleTest ./boot-stage1.nix {};
borgbackup = handleTest ./borgbackup.nix {};
buildbot = handleTest ./buildbot.nix {};
+ caddy = handleTest ./caddy.nix {};
cadvisor = handleTestOn ["x86_64-linux"] ./cadvisor.nix {};
cassandra = handleTest ./cassandra.nix {};
ceph = handleTestOn ["x86_64-linux"] ./ceph.nix {};
@@ -47,6 +49,7 @@ in
codimd = handleTest ./codimd.nix {};
colord = handleTest ./colord.nix {};
containers-bridge = handleTest ./containers-bridge.nix {};
+ containers-ephemeral = handleTest ./containers-ephemeral.nix {};
containers-extra_veth = handleTest ./containers-extra_veth.nix {};
containers-hosts = handleTest ./containers-hosts.nix {};
containers-imperative = handleTest ./containers-imperative.nix {};
@@ -56,7 +59,7 @@ in
containers-physical_interfaces = handleTest ./containers-physical_interfaces.nix {};
containers-restart_networking = handleTest ./containers-restart_networking.nix {};
containers-tmpfs = handleTest ./containers-tmpfs.nix {};
- #couchdb = handleTest ./couchdb.nix {}; # spidermonkey-1.8.5 is marked as broken
+ couchdb = handleTest ./couchdb.nix {};
deluge = handleTest ./deluge.nix {};
dhparams = handleTest ./dhparams.nix {};
dnscrypt-proxy = handleTestOn ["x86_64-linux"] ./dnscrypt-proxy.nix {};
@@ -73,7 +76,7 @@ in
#ec2-config = (handleTestOn ["x86_64-linux"] ./ec2.nix {}).boot-ec2-config or {};
ec2-nixops = (handleTestOn ["x86_64-linux"] ./ec2.nix {}).boot-ec2-nixops or {};
ecryptfs = handleTest ./ecryptfs.nix {};
- ejabberd = handleTest ./ejabberd.nix {};
+ ejabberd = handleTest ./xmpp/ejabberd.nix {};
elk = handleTestOn ["x86_64-linux"] ./elk.nix {};
env = handleTest ./env.nix {};
etcd = handleTestOn ["x86_64-linux"] ./etcd.nix {};
@@ -86,6 +89,7 @@ in
flatpak = handleTest ./flatpak.nix {};
flatpak-builder = handleTest ./flatpak-builder.nix {};
fluentd = handleTest ./fluentd.nix {};
+ fontconfig-default-fonts = handleTest ./fontconfig-default-fonts.nix {};
fsck = handleTest ./fsck.nix {};
fwupd = handleTestOn ["x86_64-linux"] ./fwupd.nix {}; # libsmbios is unsupported on aarch64
gdk-pixbuf = handleTest ./gdk-pixbuf.nix {};
@@ -93,8 +97,11 @@ in
gitlab = handleTest ./gitlab.nix {};
gitolite = handleTest ./gitolite.nix {};
gjs = handleTest ./gjs.nix {};
- gnome3 = handleTestOn ["x86_64-linux"] ./gnome3.nix {}; # libsmbios is unsupported on aarch64
- gnome3-gdm = handleTestOn ["x86_64-linux"] ./gnome3-gdm.nix {}; # libsmbios is unsupported on aarch64
+ glib-networking = handleTest ./glib-networking.nix {};
+ glusterfs = handleTest ./glusterfs.nix {};
+ gnome3-xorg = handleTest ./gnome3-xorg.nix {};
+ gnome3 = handleTest ./gnome3.nix {};
+ gnome-photos = handleTest ./gnome-photos.nix {};
gocd-agent = handleTest ./gocd-agent.nix {};
gocd-server = handleTest ./gocd-server.nix {};
google-oslogin = handleTest ./google-oslogin {};
@@ -114,6 +121,7 @@ in
hound = handleTest ./hound.nix {};
hydra = handleTest ./hydra {};
i3wm = handleTest ./i3wm.nix {};
+ icingaweb2 = handleTest ./icingaweb2.nix {};
iftop = handleTest ./iftop.nix {};
incron = handleTest ./incron.nix {};
influxdb = handleTest ./influxdb.nix {};
@@ -124,6 +132,7 @@ in
jackett = handleTest ./jackett.nix {};
jellyfin = handleTest ./jellyfin.nix {};
jenkins = handleTest ./jenkins.nix {};
+ jormungandr = handleTest ./jormungandr.nix {};
kafka = handleTest ./kafka.nix {};
kerberos = handleTest ./kerberos/default.nix {};
kernel-latest = handleTest ./kernel-latest.nix {};
@@ -138,8 +147,10 @@ in
latestKernel.login = handleTest ./login.nix { latestKernel = true; };
ldap = handleTest ./ldap.nix {};
leaps = handleTest ./leaps.nix {};
+ libgdata = handleTest ./libgdata.nix {};
+ libxmlb = handleTest ./libxmlb.nix {};
lidarr = handleTest ./lidarr.nix {};
- #lightdm = handleTest ./lightdm.nix {};
+ lightdm = handleTest ./lightdm.nix {};
limesurvey = handleTest ./limesurvey.nix {};
login = handleTest ./login.nix {};
loki = handleTest ./loki.nix {};
@@ -150,10 +161,13 @@ in
mediawiki = handleTest ./mediawiki.nix {};
memcached = handleTest ./memcached.nix {};
mesos = handleTest ./mesos.nix {};
+ metabase = handleTest ./metabase.nix {};
miniflux = handleTest ./miniflux.nix {};
minio = handleTest ./minio.nix {};
+ minidlna = handleTest ./minidlna.nix {};
misc = handleTest ./misc.nix {};
mongodb = handleTest ./mongodb.nix {};
+ moodle = handleTest ./moodle.nix {};
morty = handleTest ./morty.nix {};
mosquitto = handleTest ./mosquitto.nix {};
mpd = handleTest ./mpd.nix {};
@@ -183,6 +197,7 @@ in
nginx = handleTest ./nginx.nix {};
nginx-sso = handleTest ./nginx-sso.nix {};
nix-ssh-serve = handleTest ./nix-ssh-serve.nix {};
+ nixos-generate-config = handleTest ./nixos-generate-config.nix {};
novacomd = handleTestOn ["x86_64-linux"] ./novacomd.nix {};
nsd = handleTest ./nsd.nix {};
nzbget = handleTest ./nzbget.nix {};
@@ -192,6 +207,7 @@ in
# openstack-image-userdata doesn't work in a sandbox as the simulated openstack instance needs network access
#openstack-image-userdata = (handleTestOn ["x86_64-linux"] ./openstack-image.nix {}).userdata or {};
openstack-image-metadata = (handleTestOn ["x86_64-linux"] ./openstack-image.nix {}).metadata or {};
+ os-prober = handleTestOn ["x86_64-linux"] ./os-prober.nix {};
osquery = handleTest ./osquery.nix {};
osrm-backend = handleTest ./osrm-backend.nix {};
ostree = handleTest ./ostree.nix {};
@@ -209,19 +225,22 @@ in
plotinus = handleTest ./plotinus.nix {};
postgis = handleTest ./postgis.nix {};
postgresql = handleTest ./postgresql.nix {};
+ postgresql-wal-receiver = handleTest ./postgresql-wal-receiver.nix {};
powerdns = handleTest ./powerdns.nix {};
+ pppd = handleTest ./pppd.nix {};
predictable-interface-names = handleTest ./predictable-interface-names.nix {};
printing = handleTest ./printing.nix {};
prometheus = handleTest ./prometheus.nix {};
- prometheus2 = handleTest ./prometheus-2.nix {};
prometheus-exporters = handleTest ./prometheus-exporters.nix {};
- prosody = handleTest ./prosody.nix {};
+ prosody = handleTest ./xmpp/prosody.nix {};
+ prosodyMysql = handleTest ./xmpp/prosody-mysql.nix {};
proxy = handleTest ./proxy.nix {};
quagga = handleTest ./quagga.nix {};
quake3 = handleTest ./quake3.nix {};
rabbitmq = handleTest ./rabbitmq.nix {};
radarr = handleTest ./radarr.nix {};
radicale = handleTest ./radicale.nix {};
+ redis = handleTest ./redis.nix {};
redmine = handleTest ./redmine.nix {};
roundcube = handleTest ./roundcube.nix {};
rspamd = handleTest ./rspamd.nix {};
@@ -247,6 +266,7 @@ in
systemd = handleTest ./systemd.nix {};
systemd-confinement = handleTest ./systemd-confinement.nix {};
systemd-timesyncd = handleTest ./systemd-timesyncd.nix {};
+ systemd-networkd-wireguard = handleTest ./systemd-networkd-wireguard.nix {};
pdns-recursor = handleTest ./pdns-recursor.nix {};
taskserver = handleTest ./taskserver.nix {};
telegraf = handleTest ./telegraf.nix {};
@@ -254,6 +274,7 @@ in
tinydns = handleTest ./tinydns.nix {};
tor = handleTest ./tor.nix {};
transmission = handleTest ./transmission.nix {};
+ trezord = handleTest ./trezord.nix {};
udisks2 = handleTest ./udisks2.nix {};
upnp = handleTest ./upnp.nix {};
uwsgi = handleTest ./uwsgi.nix {};
@@ -265,6 +286,7 @@ in
xautolock = handleTest ./xautolock.nix {};
xdg-desktop-portal = handleTest ./xdg-desktop-portal.nix {};
xfce = handleTest ./xfce.nix {};
+ xfce4-14 = handleTest ./xfce4-14.nix {};
xmonad = handleTest ./xmonad.nix {};
xrdp = handleTest ./xrdp.nix {};
xss-lock = handleTest ./xss-lock.nix {};
diff --git a/nixos/tests/babeld.nix b/nixos/tests/babeld.nix
new file mode 100644
index 000000000000..5242cf395d70
--- /dev/null
+++ b/nixos/tests/babeld.nix
@@ -0,0 +1,148 @@
+
+import ./make-test.nix ({ pkgs, lib, ...} : {
+ name = "babeld";
+ meta = with pkgs.stdenv.lib.maintainers; {
+ maintainers = [ hexa ];
+ };
+
+ nodes =
+ { client = { pkgs, lib, ... }:
+ {
+ virtualisation.vlans = [ 10 ];
+
+ networking = {
+ useDHCP = false;
+ interfaces."eth1" = {
+ ipv4.addresses = lib.mkForce [ { address = "192.168.10.2"; prefixLength = 24; } ];
+ ipv4.routes = lib.mkForce [ { address = "0.0.0.0"; prefixLength = 0; via = "192.168.10.1"; } ];
+ ipv6.addresses = lib.mkForce [ { address = "2001:db8:10::2"; prefixLength = 64; } ];
+ ipv6.routes = lib.mkForce [ { address = "::"; prefixLength = 0; via = "2001:db8:10::1"; } ];
+ };
+ };
+ };
+
+ localRouter = { pkgs, lib, ... }:
+ {
+ virtualisation.vlans = [ 10 20 ];
+
+ boot.kernel.sysctl."net.ipv4.conf.all.forwarding" = 1;
+ boot.kernel.sysctl."net.ipv6.conf.all.forwarding" = 1;
+
+ networking = {
+ useDHCP = false;
+ firewall.enable = false;
+
+ interfaces."eth1" = {
+ ipv4.addresses = lib.mkForce [ { address = "192.168.10.1"; prefixLength = 24; } ];
+ ipv6.addresses = lib.mkForce [ { address = "2001:db8:10::1"; prefixLength = 64; } ];
+ };
+
+ interfaces."eth2" = {
+ ipv4.addresses = lib.mkForce [ { address = "192.168.20.1"; prefixLength = 24; } ];
+ ipv6.addresses = lib.mkForce [ { address = "2001:db8:20::1"; prefixLength = 64; } ];
+ };
+ };
+
+ services.babeld = {
+ enable = true;
+ interfaces.eth2 = {
+ hello-interval = 1;
+ type = "wired";
+ };
+ extraConfig = ''
+ local-port-readwrite 33123
+
+ import-table 254 # main
+ export-table 254 # main
+
+ in ip 192.168.10.0/24 deny
+ in ip 192.168.20.0/24 deny
+ in ip 2001:db8:10::/64 deny
+ in ip 2001:db8:20::/64 deny
+
+ in ip 192.168.30.0/24 allow
+ in ip 2001:db8:30::/64 allow
+
+ in deny
+
+ redistribute local proto 2
+ redistribute local deny
+ '';
+ };
+ };
+ remoteRouter = { pkgs, lib, ... }:
+ {
+ virtualisation.vlans = [ 20 30 ];
+
+ boot.kernel.sysctl."net.ipv4.conf.all.forwarding" = 1;
+ boot.kernel.sysctl."net.ipv6.conf.all.forwarding" = 1;
+
+ networking = {
+ useDHCP = false;
+ firewall.enable = false;
+
+ interfaces."eth1" = {
+ ipv4.addresses = lib.mkForce [ { address = "192.168.20.2"; prefixLength = 24; } ];
+ ipv6.addresses = lib.mkForce [ { address = "2001:db8:20::2"; prefixLength = 64; } ];
+ };
+
+ interfaces."eth2" = {
+ ipv4.addresses = lib.mkForce [ { address = "192.168.30.1"; prefixLength = 24; } ];
+ ipv6.addresses = lib.mkForce [ { address = "2001:db8:30::1"; prefixLength = 64; } ];
+ };
+ };
+
+ services.babeld = {
+ enable = true;
+ interfaces.eth1 = {
+ hello-interval = 1;
+ type = "wired";
+ };
+ extraConfig = ''
+ local-port-readwrite 33123
+
+ import-table 254 # main
+ export-table 254 # main
+
+ in ip 192.168.20.0/24 deny
+ in ip 192.168.30.0/24 deny
+ in ip 2001:db8:20::/64 deny
+ in ip 2001:db8:30::/64 deny
+
+ in ip 192.168.10.0/24 allow
+ in ip 2001:db8:10::/64 allow
+
+ in deny
+
+ redistribute local proto 2
+ redistribute local deny
+ '';
+ };
+
+ };
+ };
+
+ testScript =
+ ''
+ startAll;
+
+ $client->waitForUnit("network-online.target");
+ $localRouter->waitForUnit("network-online.target");
+ $remoteRouter->waitForUnit("network-online.target");
+
+ $localRouter->waitForUnit("babeld.service");
+ $remoteRouter->waitForUnit("babeld.service");
+
+ $localRouter->waitUntilSucceeds("ip route get 192.168.30.1");
+ $localRouter->waitUntilSucceeds("ip route get 2001:db8:30::1");
+
+ $remoteRouter->waitUntilSucceeds("ip route get 192.168.10.1");
+ $remoteRouter->waitUntilSucceeds("ip route get 2001:db8:10::1");
+
+ $client->succeed("ping -c1 192.168.30.1");
+ $client->succeed("ping -c1 2001:db8:30::1");
+
+ $remoteRouter->succeed("ping -c1 192.168.10.2");
+ $remoteRouter->succeed("ping -c1 2001:db8:10::2");
+ '';
+})
diff --git a/nixos/tests/beegfs.nix b/nixos/tests/beegfs.nix
index 9c241fd2301a..3465272f5599 100644
--- a/nixos/tests/beegfs.nix
+++ b/nixos/tests/beegfs.nix
@@ -23,7 +23,7 @@ let
}
];
- environment.etc."${connAuthFile}" = {
+ environment.etc.${connAuthFile} = {
enable = true;
text = "ThisIsALousySecret";
mode = "0600";
@@ -47,7 +47,7 @@ let
];
environment.systemPackages = with pkgs; [ beegfs ];
- environment.etc."${connAuthFile}" = {
+ environment.etc.${connAuthFile} = {
enable = true;
text = "ThisIsALousySecret";
mode = "0600";
@@ -57,7 +57,7 @@ let
services.beegfs.default = {
mgmtdHost = "mgmt";
connAuthFile = "/etc/${connAuthFile}";
- "${service}" = {
+ ${service} = {
enable = true;
storeDir = "/data";
};
diff --git a/nixos/tests/borgbackup.nix b/nixos/tests/borgbackup.nix
index fdb87dbea438..165f64b0d6dc 100644
--- a/nixos/tests/borgbackup.nix
+++ b/nixos/tests/borgbackup.nix
@@ -44,7 +44,7 @@ in {
client = { ... }: {
services.borgbackup.jobs = {
- local = rec {
+ local = {
paths = dataDir;
repo = localRepo;
preHook = ''
diff --git a/nixos/tests/caddy.nix b/nixos/tests/caddy.nix
new file mode 100644
index 000000000000..ab9d2fbf4d1d
--- /dev/null
+++ b/nixos/tests/caddy.nix
@@ -0,0 +1,82 @@
+import ./make-test.nix ({ pkgs, ... }: {
+ name = "caddy";
+ meta = with pkgs.stdenv.lib.maintainers; {
+ maintainers = [ xfix ];
+ };
+
+ nodes = {
+ webserver = { pkgs, lib, ... }: {
+ services.caddy.enable = true;
+ services.caddy.config = ''
+ http://localhost {
+ gzip
+
+ root ${
+ pkgs.runCommand "testdir" {} ''
+ mkdir "$out"
+ echo hello world > "$out/example.html"
+ ''
+ }
+ }
+ '';
+
+ nesting.clone = [
+ {
+ services.caddy.config = lib.mkForce ''
+ http://localhost {
+ gzip
+
+ root ${
+ pkgs.runCommand "testdir2" {} ''
+ mkdir "$out"
+ echo changed > "$out/example.html"
+ ''
+ }
+ }
+ '';
+ }
+
+ {
+ services.caddy.config = ''
+ http://localhost:8080 {
+ }
+ '';
+ }
+ ];
+ };
+ };
+
+ testScript = { nodes, ... }: let
+ etagSystem = "${nodes.webserver.config.system.build.toplevel}/fine-tune/child-1";
+ justReloadSystem = "${nodes.webserver.config.system.build.toplevel}/fine-tune/child-2";
+ in ''
+ my $url = 'http://localhost/example.html';
+ $webserver->waitForUnit("caddy");
+ $webserver->waitForOpenPort("80");
+
+ sub checkEtag {
+ my $etag = $webserver->succeed(
+ 'curl -v '.$url.' 2>&1 | sed -n -e "s/^< [Ee][Tt][Aa][Gg]: *//p"'
+ );
+ $etag =~ s/\r?\n$//;
+ my $httpCode = $webserver->succeed(
+ 'curl -w "%{http_code}" -X HEAD -H \'If-None-Match: '.$etag.'\' '.$url
+ );
+ die "HTTP code is not 304" unless $httpCode == 304;
+ return $etag;
+ }
+
+ subtest "check ETag if serving Nix store paths", sub {
+ my $oldEtag = checkEtag;
+ $webserver->succeed("${etagSystem}/bin/switch-to-configuration test >&2");
+ $webserver->sleep(1); # race condition
+ my $newEtag = checkEtag;
+ die "Old ETag $oldEtag is the same as $newEtag" if $oldEtag eq $newEtag;
+ };
+
+ subtest "config is reloaded on nixos-rebuild switch", sub {
+ $webserver->succeed("${justReloadSystem}/bin/switch-to-configuration test >&2");
+ $webserver->waitForOpenPort("8080");
+ };
+ '';
+})
diff --git a/nixos/tests/cassandra.nix b/nixos/tests/cassandra.nix
index aea4fa4d1c95..c55733c9be7b 100644
--- a/nixos/tests/cassandra.nix
+++ b/nixos/tests/cassandra.nix
@@ -8,11 +8,12 @@ let
jmxRoles = [{ username = "me"; password = "password"; }];
jmxRolesFile = ./cassandra-jmx-roles;
jmxAuthArgs = "-u ${(builtins.elemAt jmxRoles 0).username} -pw ${(builtins.elemAt jmxRoles 0).password}";
+ jmxPort = 7200; # Non-standard port so it doesn't accidentally work
# Would usually be assigned to 512M
numMaxHeapSize = "400";
getHeapLimitCommand = ''
- nodetool info | grep "^Heap Memory" | awk \'{print $NF}\'
+ nodetool info -p ${toString jmxPort} | grep "^Heap Memory" | awk \'{print $NF}\'
'';
checkHeapLimitCommand = ''
[ 1 -eq "$(echo "$(${getHeapLimitCommand}) < ${numMaxHeapSize}" | ${pkgs.bc}/bin/bc)" ]
@@ -27,19 +28,20 @@ let
package = testPackage;
maxHeapSize = "${numMaxHeapSize}M";
heapNewSize = "100M";
+ inherit jmxPort;
};
- nodeCfg = ipAddress: extra: {pkgs, config, ...}:
- { environment.systemPackages = [ testPackage ];
- networking = {
- firewall.allowedTCPPorts = [ 7000 7199 9042 ];
- useDHCP = false;
- interfaces.eth1.ipv4.addresses = pkgs.lib.mkOverride 0 [
- { address = ipAddress; prefixLength = 24; }
- ];
- };
- services.cassandra = cassandraCfg ipAddress // extra;
- virtualisation.memorySize = 1024;
+ nodeCfg = ipAddress: extra: {pkgs, config, ...}: rec {
+ environment.systemPackages = [ testPackage ];
+ networking = {
+ firewall.allowedTCPPorts = [ 7000 9042 services.cassandra.jmxPort ];
+ useDHCP = false;
+ interfaces.eth1.ipv4.addresses = pkgs.lib.mkOverride 0 [
+ { address = ipAddress; prefixLength = 24; }
+ ];
};
+ services.cassandra = cassandraCfg ipAddress // extra;
+ virtualisation.memorySize = 1024;
+ };
in
{
name = "cassandra-ci";
@@ -50,7 +52,9 @@ in
cass2 = nodeCfg "192.168.1.3" { jvmOpts = [ "-Dcassandra.replace_address=cass1" ]; };
};
- testScript = ''
+ testScript = let
+ jmxPortS = toString jmxPort;
+ in ''
# Check configuration
subtest "Timers exist", sub {
$cass0->succeed("systemctl list-timers | grep cassandra-full-repair.timer");
@@ -63,51 +67,51 @@ in
};
subtest "Nodetool is operational", sub {
$cass0->waitForUnit("cassandra.service");
- $cass0->waitUntilSucceeds("nc -z localhost 7199");
- $cass0->succeed("nodetool status --resolve-ip | egrep '^UN[[:space:]]+cass0'");
+ $cass0->waitUntilSucceeds("nc -z localhost ${jmxPortS}");
+ $cass0->succeed("nodetool status -p ${jmxPortS} --resolve-ip | egrep '^UN[[:space:]]+cass0'");
};
subtest "Cluster name was set", sub {
$cass0->waitForUnit("cassandra.service");
- $cass0->waitUntilSucceeds("nc -z localhost 7199");
- $cass0->waitUntilSucceeds("nodetool describecluster | grep 'Name: ${clusterName}'");
+ $cass0->waitUntilSucceeds("nc -z localhost ${jmxPortS}");
+ $cass0->waitUntilSucceeds("nodetool describecluster -p ${jmxPortS} | grep 'Name: ${clusterName}'");
};
subtest "Heap limit set correctly", sub {
# Nodetool takes a while until it can display info
- $cass0->waitUntilSucceeds('nodetool info');
+ $cass0->waitUntilSucceeds('nodetool info -p ${jmxPortS}');
$cass0->succeed('${checkHeapLimitCommand}');
};
# Check cluster interaction
subtest "Bring up cluster", sub {
$cass1->waitForUnit("cassandra.service");
- $cass1->waitUntilSucceeds("nodetool ${jmxAuthArgs} status | egrep -c '^UN' | grep 2");
- $cass0->succeed("nodetool status --resolve-ip | egrep '^UN[[:space:]]+cass1'");
+ $cass1->waitUntilSucceeds("nodetool -p ${jmxPortS} ${jmxAuthArgs} status | egrep -c '^UN' | grep 2");
+ $cass0->succeed("nodetool status -p ${jmxPortS} --resolve-ip | egrep '^UN[[:space:]]+cass1'");
};
'' + lib.optionalString testRemoteAuth ''
subtest "Remote authenticated jmx", sub {
# Doesn't work if not enabled
- $cass0->waitUntilSucceeds("nc -z localhost 7199");
- $cass1->fail("nc -z 192.168.1.1 7199");
- $cass1->fail("nodetool -h 192.168.1.1 status");
+ $cass0->waitUntilSucceeds("nc -z localhost ${jmxPortS}");
+ $cass1->fail("nc -z 192.168.1.1 ${toString jmxPort}");
+ $cass1->fail("nodetool -p ${jmxPortS} -h 192.168.1.1 status");
# Works if enabled
- $cass1->waitUntilSucceeds("nc -z localhost 7199");
- $cass0->succeed("nodetool -h 192.168.1.2 ${jmxAuthArgs} status");
+ $cass1->waitUntilSucceeds("nc -z localhost ${toString jmxPort}");
+ $cass0->succeed("nodetool -p ${jmxPortS} -h 192.168.1.2 ${jmxAuthArgs} status");
};
'' + ''
subtest "Break and fix node", sub {
$cass1->block;
- $cass0->waitUntilSucceeds("nodetool status --resolve-ip | egrep -c '^DN[[:space:]]+cass1'");
- $cass0->succeed("nodetool status | egrep -c '^UN' | grep 1");
+ $cass0->waitUntilSucceeds("nodetool status -p ${jmxPortS} --resolve-ip | egrep -c '^DN[[:space:]]+cass1'");
+ $cass0->succeed("nodetool status -p ${jmxPortS} | egrep -c '^UN' | grep 1");
$cass1->unblock;
- $cass1->waitUntilSucceeds("nodetool ${jmxAuthArgs} status | egrep -c '^UN' | grep 2");
- $cass0->succeed("nodetool status | egrep -c '^UN' | grep 2");
+ $cass1->waitUntilSucceeds("nodetool -p ${jmxPortS} ${jmxAuthArgs} status | egrep -c '^UN' | grep 2");
+ $cass0->succeed("nodetool status -p ${jmxPortS} | egrep -c '^UN' | grep 2");
};
subtest "Replace crashed node", sub {
$cass1->crash;
$cass2->waitForUnit("cassandra.service");
- $cass0->waitUntilFails("nodetool status --resolve-ip | egrep '^UN[[:space:]]+cass1'");
- $cass0->waitUntilSucceeds("nodetool status --resolve-ip | egrep '^UN[[:space:]]+cass2'");
+ $cass0->waitUntilFails("nodetool status -p ${jmxPortS} --resolve-ip | egrep '^UN[[:space:]]+cass1'");
+ $cass0->waitUntilSucceeds("nodetool status -p ${jmxPortS} --resolve-ip | egrep '^UN[[:space:]]+cass2'");
};
'';
})
diff --git a/nixos/tests/ceph.nix b/nixos/tests/ceph.nix
index 7408029c460e..57120ff978f7 100644
--- a/nixos/tests/ceph.nix
+++ b/nixos/tests/ceph.nix
@@ -1,12 +1,13 @@
-import ./make-test.nix ({pkgs, ...}: rec {
+import ./make-test.nix ({pkgs, lib, ...}: {
name = "All-in-one-basic-ceph-cluster";
meta = with pkgs.stdenv.lib.maintainers; {
- maintainers = [ lejonet ];
+ maintainers = [ johanot lejonet ];
};
nodes = {
aio = { pkgs, ... }: {
virtualisation = {
+ memorySize = 1536;
emptyDiskImages = [ 20480 20480 ];
vlans = [ 1 ];
};
@@ -24,9 +25,6 @@ import ./make-test.nix ({pkgs, ...}: rec {
ceph
xfsprogs
];
- nixpkgs.config.packageOverrides = super: {
- ceph = super.ceph.override({ nss = super.nss; libxfs = super.libxfs; libaio = super.libaio; jemalloc = super.jemalloc; });
- };
boot.kernelModules = [ "xfs" ];
@@ -51,6 +49,9 @@ import ./make-test.nix ({pkgs, ...}: rec {
enable = true;
daemons = [ "0" "1" ];
};
+
+ # So that we don't have to battle systemd when bootstraping
+ systemd.targets.ceph.wantedBy = lib.mkForce [];
};
};
@@ -61,24 +62,26 @@ import ./make-test.nix ({pkgs, ...}: rec {
# Create the ceph-related directories
$aio->mustSucceed(
- "mkdir -p /var/lib/ceph/mgr/ceph-aio/",
- "mkdir -p /var/lib/ceph/mon/ceph-aio/",
- "mkdir -p /var/lib/ceph/osd/ceph-{0..1}/",
- "chown ceph:ceph -R /var/lib/ceph/"
+ "mkdir -p /var/lib/ceph/mgr/ceph-aio",
+ "mkdir -p /var/lib/ceph/mon/ceph-aio",
+ "mkdir -p /var/lib/ceph/osd/ceph-{0,1}",
+ "chown ceph:ceph -R /var/lib/ceph/",
+ "mkdir -p /etc/ceph",
+ "chown ceph:ceph -R /etc/ceph"
);
# Bootstrap ceph-mon daemon
$aio->mustSucceed(
- "mkdir -p /var/lib/ceph/bootstrap-osd && chown ceph:ceph /var/lib/ceph/bootstrap-osd",
"sudo -u ceph ceph-authtool --create-keyring /tmp/ceph.mon.keyring --gen-key -n mon. --cap mon 'allow *'",
- "ceph-authtool --create-keyring /etc/ceph/ceph.client.admin.keyring --gen-key -n client.admin --set-uid=0 --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow *' --cap mgr 'allow *'",
- "ceph-authtool /tmp/ceph.mon.keyring --import-keyring /etc/ceph/ceph.client.admin.keyring",
- "monmaptool --create --add aio 192.168.1.1 --fsid 066ae264-2a5d-4729-8001-6ad265f50b03 /tmp/monmap",
+ "sudo -u ceph ceph-authtool --create-keyring /etc/ceph/ceph.client.admin.keyring --gen-key -n client.admin --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow *' --cap mgr 'allow *'",
+ "sudo -u ceph ceph-authtool /tmp/ceph.mon.keyring --import-keyring /etc/ceph/ceph.client.admin.keyring",
+ "monmaptool --create --add aio 192.168.1.1 --fsid 066ae264-2a5d-4729-8001-6ad265f50b03 /tmp/monmap",
"sudo -u ceph ceph-mon --mkfs -i aio --monmap /tmp/monmap --keyring /tmp/ceph.mon.keyring",
- "touch /var/lib/ceph/mon/ceph-aio/done",
+ "sudo -u ceph touch /var/lib/ceph/mon/ceph-aio/done",
"systemctl start ceph-mon-aio"
);
$aio->waitForUnit("ceph-mon-aio");
+ $aio->mustSucceed("ceph mon enable-msgr2");
# Can't check ceph status until a mon is up
$aio->succeed("ceph -s | grep 'mon: 1 daemons'");
@@ -90,6 +93,7 @@ import ./make-test.nix ({pkgs, ...}: rec {
);
$aio->waitForUnit("ceph-mgr-aio");
$aio->waitUntilSucceeds("ceph -s | grep 'quorum aio'");
+ $aio->waitUntilSucceeds("ceph -s | grep 'mgr: aio(active,'");
# Bootstrap both OSDs
$aio->mustSucceed(
@@ -112,8 +116,8 @@ import ./make-test.nix ({pkgs, ...}: rec {
"systemctl start ceph-osd-1"
);
- $aio->waitUntilSucceeds("ceph osd stat | grep '2 osds: 2 up, 2 in'");
- $aio->waitUntilSucceeds("ceph -s | grep 'mgr: aio(active)'");
+ $aio->waitUntilSucceeds("ceph osd stat | grep -e '2 osds: 2 up[^,]*, 2 in'");
+ $aio->waitUntilSucceeds("ceph -s | grep 'mgr: aio(active,'");
$aio->waitUntilSucceeds("ceph -s | grep 'HEALTH_OK'");
$aio->mustSucceed(
@@ -135,5 +139,23 @@ import ./make-test.nix ({pkgs, ...}: rec {
"ceph osd pool ls | grep 'aio-test'",
"ceph osd pool delete aio-other-test aio-other-test --yes-i-really-really-mean-it"
);
+
+ # As we disable the target in the config, we still want to test that it works as intended
+ $aio->mustSucceed(
+ "systemctl stop ceph-osd-0",
+ "systemctl stop ceph-osd-1",
+ "systemctl stop ceph-mgr-aio",
+ "systemctl stop ceph-mon-aio"
+ );
+ $aio->succeed("systemctl start ceph.target");
+ $aio->waitForUnit("ceph-mon-aio");
+ $aio->waitForUnit("ceph-mgr-aio");
+ $aio->waitForUnit("ceph-osd-0");
+ $aio->waitForUnit("ceph-osd-1");
+ $aio->succeed("ceph -s | grep 'mon: 1 daemons'");
+ $aio->waitUntilSucceeds("ceph -s | grep 'quorum aio'");
+ $aio->waitUntilSucceeds("ceph osd stat | grep -e '2 osds: 2 up[^,]*, 2 in'");
+ $aio->waitUntilSucceeds("ceph -s | grep 'mgr: aio(active,'");
+ $aio->waitUntilSucceeds("ceph -s | grep 'HEALTH_OK'");
'';
})
diff --git a/nixos/tests/cjdns.nix b/nixos/tests/cjdns.nix
index e03bb9882540..6660eecf05b9 100644
--- a/nixos/tests/cjdns.nix
+++ b/nixos/tests/cjdns.nix
@@ -23,8 +23,7 @@ import ./make-test.nix ({ pkgs, ...} : {
maintainers = [ ehmry ];
};
- nodes = rec
- { # Alice finds peers over over ETHInterface.
+ nodes = { # Alice finds peers over over ETHInterface.
alice =
{ ... }:
{ imports = [ basicConfig ];
diff --git a/nixos/tests/cockroachdb.nix b/nixos/tests/cockroachdb.nix
index 56c624d8cf2f..496283fddc7b 100644
--- a/nixos/tests/cockroachdb.nix
+++ b/nixos/tests/cockroachdb.nix
@@ -100,7 +100,7 @@ in import ./make-test.nix ({ pkgs, ...} : {
meta.maintainers = with pkgs.stdenv.lib.maintainers;
[ thoughtpolice ];
- nodes = rec {
+ nodes = {
node1 = makeNode "country=us,region=east,dc=1" "192.168.1.1" null;
node2 = makeNode "country=us,region=west,dc=2b" "192.168.1.2" "192.168.1.1";
node3 = makeNode "country=eu,region=west,dc=2" "192.168.1.3" "192.168.1.1";
diff --git a/nixos/tests/common/letsencrypt/default.nix b/nixos/tests/common/letsencrypt/default.nix
index 8fe59bf4e70c..58d87c64e344 100644
--- a/nixos/tests/common/letsencrypt/default.nix
+++ b/nixos/tests/common/letsencrypt/default.nix
@@ -56,11 +56,11 @@
let
softhsm = pkgs.stdenv.mkDerivation rec {
- name = "softhsm-${version}";
+ pname = "softhsm";
version = "1.3.8";
src = pkgs.fetchurl {
- url = "https://dist.opendnssec.org/source/${name}.tar.gz";
+ url = "https://dist.opendnssec.org/source/${pname}-${version}.tar.gz";
sha256 = "0flmnpkgp65ym7w3qyg78d3fbmvq3aznmi66rgd420n33shf7aif";
};
diff --git a/nixos/tests/containers-ephemeral.nix b/nixos/tests/containers-ephemeral.nix
new file mode 100644
index 000000000000..1ef8717d9a0e
--- /dev/null
+++ b/nixos/tests/containers-ephemeral.nix
@@ -0,0 +1,56 @@
+# Test for NixOS' container support.
+
+import ./make-test.nix ({ pkgs, ...} : {
+ name = "containers-ephemeral";
+
+ machine = { pkgs, ... }: {
+ virtualisation.memorySize = 768;
+ virtualisation.writableStore = true;
+
+ containers.webserver = {
+ ephemeral = true;
+ privateNetwork = true;
+ hostAddress = "10.231.136.1";
+ localAddress = "10.231.136.2";
+ config = {
+ services.nginx = {
+ enable = true;
+ virtualHosts.localhost = {
+ root = (pkgs.runCommand "localhost" {} ''
+ mkdir "$out"
+ echo hello world > "$out/index.html"
+ '');
+ };
+ };
+ networking.firewall.allowedTCPPorts = [ 80 ];
+ };
+ };
+ };
+
+ testScript = ''
+ $machine->succeed("nixos-container list") =~ /webserver/ or die;
+
+ # Start the webserver container.
+ $machine->succeed("nixos-container start webserver");
+
+ # Check that container got its own root folder
+ $machine->succeed("ls /run/containers/webserver");
+
+ # Check that container persistent directory is not created
+ $machine->fail("ls /var/lib/containers/webserver");
+
+ # Since "start" returns after the container has reached
+ # multi-user.target, we should now be able to access it.
+ my $ip = $machine->succeed("nixos-container show-ip webserver");
+ chomp $ip;
+ $machine->succeed("ping -n -c1 $ip");
+ $machine->succeed("curl --fail http://$ip/ > /dev/null");
+
+ # Stop the container.
+ $machine->succeed("nixos-container stop webserver");
+ $machine->fail("curl --fail --connect-timeout 2 http://$ip/ > /dev/null");
+
+ # Check that container's root folder was removed
+ $machine->fail("ls /run/containers/webserver");
+ '';
+})
diff --git a/nixos/tests/containers-reloadable.nix b/nixos/tests/containers-reloadable.nix
index 9726ca0cb0e7..f41dea91b1e4 100644
--- a/nixos/tests/containers-reloadable.nix
+++ b/nixos/tests/containers-reloadable.nix
@@ -1,11 +1,11 @@
import ./make-test.nix ({ pkgs, lib, ...} :
let
- client_base = rec {
+ client_base = {
containers.test1 = {
autoStart = true;
config = {
- environment.etc."check".text = "client_base";
+ environment.etc.check.text = "client_base";
};
};
@@ -29,7 +29,7 @@ in {
imports = [ client_base ];
containers.test1.config = {
- environment.etc."check".text = lib.mkForce "client_c1";
+ environment.etc.check.text = lib.mkForce "client_c1";
services.httpd.enable = true;
services.httpd.adminAddr = "nixos@example.com";
};
@@ -38,7 +38,7 @@ in {
imports = [ client_base ];
containers.test1.config = {
- environment.etc."check".text = lib.mkForce "client_c2";
+ environment.etc.check.text = lib.mkForce "client_c2";
services.nginx.enable = true;
};
};
diff --git a/nixos/tests/containers-restart_networking.nix b/nixos/tests/containers-restart_networking.nix
index 0fb3b591e9f9..df15f5b2f455 100644
--- a/nixos/tests/containers-restart_networking.nix
+++ b/nixos/tests/containers-restart_networking.nix
@@ -1,7 +1,7 @@
# Test for NixOS' container support.
let
- client_base = rec {
+ client_base = {
networking.firewall.enable = false;
containers.webserver = {
diff --git a/nixos/tests/containers-tmpfs.nix b/nixos/tests/containers-tmpfs.nix
index 05c21f4907bf..e29fe6bbf032 100644
--- a/nixos/tests/containers-tmpfs.nix
+++ b/nixos/tests/containers-tmpfs.nix
@@ -3,7 +3,7 @@
import ./make-test.nix ({ pkgs, ...} : {
name = "containers-tmpfs";
meta = with pkgs.stdenv.lib.maintainers; {
- maintainers = [ ckampka ];
+ maintainers = [ kampka ];
};
machine =
diff --git a/nixos/tests/elk.nix b/nixos/tests/elk.nix
index 95371ef44436..b33d98b85d69 100644
--- a/nixos/tests/elk.nix
+++ b/nixos/tests/elk.nix
@@ -178,13 +178,7 @@ let
'';
};
in mapAttrs mkElkTest {
- "ELK-5" = {
- elasticsearch = pkgs.elasticsearch5;
- logstash = pkgs.logstash5;
- kibana = pkgs.kibana5;
- journalbeat = pkgs.journalbeat5;
- };
- "ELK-6" =
+ ELK-6 =
if enableUnfree
then {
elasticsearch = pkgs.elasticsearch6;
@@ -198,7 +192,7 @@ in mapAttrs mkElkTest {
kibana = pkgs.kibana6-oss;
journalbeat = pkgs.journalbeat6;
};
- "ELK-7" =
+ ELK-7 =
if enableUnfree
then {
elasticsearch = pkgs.elasticsearch7;
diff --git a/nixos/tests/env.nix b/nixos/tests/env.nix
index 064c498204ae..6c681905b19f 100644
--- a/nixos/tests/env.nix
+++ b/nixos/tests/env.nix
@@ -7,7 +7,7 @@ import ./make-test.nix ({ pkgs, ...} : {
machine = { pkgs, ... }:
{
boot.kernelPackages = pkgs.linuxPackages;
- environment.etc."plainFile".text = ''
+ environment.etc.plainFile.text = ''
Hello World
'';
environment.etc."folder/with/file".text = ''
diff --git a/nixos/tests/ferm.nix b/nixos/tests/ferm.nix
index b8e8663e3ad2..edf9c8036aca 100644
--- a/nixos/tests/ferm.nix
+++ b/nixos/tests/ferm.nix
@@ -22,6 +22,8 @@ import ./make-test.nix ({ pkgs, ...} : {
{
networking = {
dhcpcd.enable = false;
+ useNetworkd = true;
+ useDHCP = false;
interfaces.eth1.ipv6.addresses = mkOverride 0 [ { address = "fd00::1"; prefixLength = 64; } ];
interfaces.eth1.ipv4.addresses = mkOverride 0 [ { address = "192.168.1.1"; prefixLength = 24; } ];
};
diff --git a/nixos/tests/flannel.nix b/nixos/tests/flannel.nix
index 0b261a684772..9991c5eaa329 100644
--- a/nixos/tests/flannel.nix
+++ b/nixos/tests/flannel.nix
@@ -1,4 +1,4 @@
-import ./make-test.nix ({ pkgs, ...} : rec {
+import ./make-test.nix ({ pkgs, ...} : {
name = "flannel";
meta = with pkgs.stdenv.lib.maintainers; {
diff --git a/nixos/tests/fontconfig-default-fonts.nix b/nixos/tests/fontconfig-default-fonts.nix
new file mode 100644
index 000000000000..1991cec92189
--- /dev/null
+++ b/nixos/tests/fontconfig-default-fonts.nix
@@ -0,0 +1,28 @@
+import ./make-test.nix ({ lib, ... }:
+{
+ name = "fontconfig-default-fonts";
+
+ machine = { config, pkgs, ... }: {
+ fonts.enableDefaultFonts = true; # Background fonts
+ fonts.fonts = with pkgs; [
+ noto-fonts-emoji
+ cantarell-fonts
+ twitter-color-emoji
+ source-code-pro
+ gentium
+ ];
+ fonts.fontconfig.defaultFonts = {
+ serif = [ "Gentium Plus" ];
+ sansSerif = [ "Cantarell" ];
+ monospace = [ "Source Code Pro" ];
+ emoji = [ "Twitter Color Emoji" ];
+ };
+ };
+
+ testScript = ''
+ $machine->succeed("fc-match serif | grep '\"Gentium Plus\"'");
+ $machine->succeed("fc-match sans-serif | grep '\"Cantarell\"'");
+ $machine->succeed("fc-match monospace | grep '\"Source Code Pro\"'");
+ $machine->succeed("fc-match emoji | grep '\"Twitter Color Emoji\"'");
+ '';
+})
diff --git a/nixos/tests/gitlab.nix b/nixos/tests/gitlab.nix
index ac733461932d..be0b3c8746a9 100644
--- a/nixos/tests/gitlab.nix
+++ b/nixos/tests/gitlab.nix
@@ -21,7 +21,7 @@ import ./make-test.nix ({ pkgs, lib, ...} : with lib; {
enable = true;
recommendedProxySettings = true;
virtualHosts = {
- "localhost" = {
+ localhost = {
locations."/".proxyPass = "http://unix:/run/gitlab/gitlab-workhorse.socket";
};
};
@@ -29,44 +29,14 @@ import ./make-test.nix ({ pkgs, lib, ...} : with lib; {
services.gitlab = {
enable = true;
- databasePassword = "dbPassword";
- inherit initialRootPassword;
+ databasePasswordFile = pkgs.writeText "dbPassword" "xo0daiF4";
+ initialRootPasswordFile = pkgs.writeText "rootPassword" initialRootPassword;
smtp.enable = true;
secrets = {
- secret = "secret";
- otp = "otpsecret";
- db = "dbsecret";
-
- # nix-shell -p openssl --run "openssl genrsa 2048"
- jws = ''
- -----BEGIN RSA PRIVATE KEY-----
- MIIEpAIBAAKCAQEA13/qEio76OWUtWO0WIz9lWnsTWOU8Esv4sQHDq9PCEFsLt21
- PAXrlWhLjjWcxGfsrDwnh7YErGHYL62BMSxMdFJolaknlQK/O/V8UETDe45VoHM+
- Znk270RfUcfYFgiihnXUZXVmL0om9TsQSk646wCcjCY9LxtxUyKNhvT7KjgYw2aX
- z34aw7M+Js3T2p1TjZPSC82GtmtKkJEKFMi5EjprLTDE7EdcUzr9Xuw+kQ+gRm9k
- 7FE+JQqSoprwE3Q0v2OAn3UhLMgg0gNFRnsc5l6IAshDzV+H22RPqKKlJjVjjfPY
- 0TQSvYLVApigHbDPH0BoCXfjFfQazbbP3OUHrwIDAQABAoIBAQCMU+tkcMQaYIV5
- qLdjgkwO467QpivyXcOM8wF1eosIYTHFQvIlZ+WEoSmyLQ8shlADyBgls01Pw1c3
- lNAv6RzQEmmwKzpvOh61OKH+0whIiOMRXHoh2IUBQZCgfHYlwvGyhUAN4WjtGmhM
- AG4XNTQNM5S9Xpkw97nP3Qwz+YskbbkrfqtCEVy9ro+4nhbjqPsuO3adbnkva4zR
- cyurRhrHgHU6LPjn5NHnHH4qw2faY2oAsL8pmpkTbO5IqWDvOcbjNfjVPgVoq26O
- bbaa1qs4nmc80qQgMjRPJef535xyf3eLsSlDvpf6O8sPrJzVR1zaqEqixpQCZDac
- +kRiSBrhAoGBAOwHiq0PuyJh6VzBu7ybqX6+gF/wA4Jkwzx6mbfaBgurvU1aospp
- kisIonAkxSbxllZMnjbkShZEdATYKeT9o5NEhnU4YnHfc5bJZbiWOZAzYGLcY7g8
- vDQ31pBItyY4pFgPbSpNlbUvUsoPVJ45RasRADDTNCzMzdjFQQXst2V9AoGBAOm7
- sSpzYfFPLEAhieAkuhtbsX58Boo46djiKVfzGftfp6F9aHTOfzGORU5jrZ16mSbS
- qkkC6BEFrATX2051dzzXC89fWoJYALrsffE5I3KlKXsCAWSnCP1MMxOfH+Ls61Mr
- 7pK/LKfvJt53mUH4jIdbmmFUDwbg18oBEH+x9PmbAoGAS/+JqXu9N67rIxDGUE6W
- 3tacI0f2+U9Uhe67/DTZaXyc8YFTlXU0uWKIWy+bw5RaYeM9tlL/f/f+m2i25KK+
- vrZ7zNag7CWU5GJovGyykDnauTpZaYM03mN0VPT08/uc/zXIYqyknbhlIeaZynCK
- fDB3LUF0NVCknz20WCIGU0kCgYEAkxY0ZXx61Dp4pFr2wwEZxQGs7uXpz64FKyEX
- 12r6nMATY4Lh6y/Px0W6w5vis8lk+5Ny6cNUevHQ0LNuJS+yu6ywl+1vrbrnqroM
- f3LvpcPeGLSoX8jl1VDQi7aFgG6LoKly1xJLbdsH4NPutB9PgBbbTghx9GgmI88L
- rPA2M6UCgYBOmkYJocNgxg6B1/n4Tb9fN1Q/XuJrFDE6NxVUoke+IIyMPRH7FC3m
- VMYzu+b7zTVJjaBb1cmJemxl/xajziWDofJYPefhdbOVU7HXtmJFY0IG3pVxU1zW
- 3bmDj5QAtCUDpuuNa6GEIT0YR4+D/V7o3DmlZ0tVIwKJmVJoQ2f5dw==
- -----END RSA PRIVATE KEY-----
- '';
+ secretFile = pkgs.writeText "secret" "Aig5zaic";
+ otpFile = pkgs.writeText "otpsecret" "Riew9mue";
+ dbFile = pkgs.writeText "dbsecret" "we2quaeZ";
+ jwsFile = pkgs.runCommand "oidcKeyBase" {} "${pkgs.openssl}/bin/openssl genrsa 2048 > $out";
};
};
};
diff --git a/nixos/tests/glib-networking.nix b/nixos/tests/glib-networking.nix
new file mode 100644
index 000000000000..c0bbb2b3554b
--- /dev/null
+++ b/nixos/tests/glib-networking.nix
@@ -0,0 +1,17 @@
+# run installed tests
+import ./make-test.nix ({ pkgs, ... }:
+
+{
+ name = "glib-networking";
+ meta = {
+ maintainers = pkgs.glib-networking.meta.maintainers;
+ };
+
+ machine = { pkgs, ... }: {
+ environment.systemPackages = with pkgs; [ gnome-desktop-testing ];
+ };
+
+ testScript = ''
+ $machine->succeed("gnome-desktop-testing-runner -d '${pkgs.glib-networking.installedTests}/share'");
+ '';
+})
diff --git a/nixos/tests/glusterfs.nix b/nixos/tests/glusterfs.nix
new file mode 100644
index 000000000000..9fd8bd2ed129
--- /dev/null
+++ b/nixos/tests/glusterfs.nix
@@ -0,0 +1,65 @@
+import ./make-test.nix ({ ... } :
+
+let
+ client = { pkgs, ... } : {
+ environment.systemPackages = [ pkgs.glusterfs ];
+ fileSystems = pkgs.lib.mkVMOverride
+ [ { mountPoint = "/gluster";
+ fsType = "glusterfs";
+ device = "server1:/gv0";
+ } ];
+ };
+
+ server = { pkgs, ... } : {
+ networking.firewall.enable = false;
+ services.glusterfs.enable = true;
+
+ # create a mount point for the volume
+ boot.initrd.postDeviceCommands = ''
+ ${pkgs.e2fsprogs}/bin/mkfs.ext4 -L data /dev/vdb
+ '';
+
+ virtualisation.emptyDiskImages = [ 1024 ];
+
+ fileSystems = pkgs.lib.mkVMOverride
+ [ { mountPoint = "/data";
+ device = "/dev/disk/by-label/data";
+ fsType = "ext4";
+ }
+ ];
+ };
+in {
+ name = "glusterfs";
+
+ nodes = {
+ server1 = server;
+ server2 = server;
+ client1 = client;
+ client2 = client;
+ };
+
+ testScript = ''
+ $server1->waitForUnit("glusterd.service");
+ $server2->waitForUnit("glusterd.service");
+
+ # establish initial contact
+ $server1->succeed("sleep 2");
+ $server1->succeed("gluster peer probe server2");
+ $server1->succeed("gluster peer probe server1");
+
+ $server1->succeed("gluster peer status | grep Connected");
+
+ # create volumes
+ $server1->succeed("mkdir -p /data/vg0");
+ $server2->succeed("mkdir -p /data/vg0");
+ $server1->succeed("gluster volume create gv0 server1:/data/vg0 server2:/data/vg0");
+ $server1->succeed("gluster volume start gv0");
+
+ # test clients
+ $client1->waitForUnit("gluster.mount");
+ $client2->waitForUnit("gluster.mount");
+
+ $client1->succeed("echo test > /gluster/file1");
+ $client2->succeed("grep test /gluster/file1");
+ '';
+})
diff --git a/nixos/tests/gnome-photos.nix b/nixos/tests/gnome-photos.nix
new file mode 100644
index 000000000000..2ecda1d68ce3
--- /dev/null
+++ b/nixos/tests/gnome-photos.nix
@@ -0,0 +1,42 @@
+# run installed tests
+import ./make-test.nix ({ pkgs, lib, ... }:
+
+let
+
+ # gsettings tool with access to gsettings-desktop-schemas
+ desktop-gsettings = with pkgs; stdenv.mkDerivation {
+ name = "desktop-gsettings";
+ dontUnpack = true;
+ nativeBuildInputs = [ glib wrapGAppsHook ];
+ buildInputs = [ gsettings-desktop-schemas ];
+ installPhase = ''
+ runHook preInstall
+ mkdir -p $out/bin
+ ln -s ${glib.bin}/bin/gsettings $out/bin/desktop-gsettings
+ runHook postInstall
+ '';
+ };
+
+in
+
+{
+ name = "gnome-photos";
+ meta = {
+ maintainers = pkgs.gnome-photos.meta.maintainers;
+ };
+
+ machine = { pkgs, ... }: {
+ imports = [ ./common/x11.nix ];
+ programs.dconf.enable = true;
+ services.gnome3.at-spi2-core.enable = true; # needed for dogtail
+ environment.systemPackages = with pkgs; [ gnome-desktop-testing desktop-gsettings ];
+ services.dbus.packages = with pkgs; [ gnome-photos ];
+ };
+
+ testScript = ''
+ $machine->waitForX;
+ # dogtail needs accessibility enabled
+ $machine->succeed("desktop-gsettings set org.gnome.desktop.interface toolkit-accessibility true 2>&1");
+ $machine->succeed("gnome-desktop-testing-runner -d '${pkgs.gnome-photos.installedTests}/share' 2>&1");
+ '';
+})
diff --git a/nixos/tests/gnome3-gdm.nix b/nixos/tests/gnome3-gdm.nix
deleted file mode 100644
index c2808d87d99d..000000000000
--- a/nixos/tests/gnome3-gdm.nix
+++ /dev/null
@@ -1,63 +0,0 @@
-import ./make-test.nix ({ pkgs, ...} : {
- name = "gnome3-gdm";
- meta = with pkgs.stdenv.lib.maintainers; {
- maintainers = [ lethalman ];
- };
-
- machine =
- { ... }:
-
- { imports = [ ./common/user-account.nix ];
-
- services.xserver.enable = true;
-
- services.xserver.displayManager.gdm = {
- enable = true;
- autoLogin = {
- enable = true;
- user = "alice";
- };
- };
- services.xserver.desktopManager.gnome3.enable = true;
-
- virtualisation.memorySize = 1024;
- };
-
- testScript = let
- # Keep line widths somewhat managable
- bus = "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus";
- gdbus = "${bus} gdbus";
- # Call javascript in gnome shell, returns a tuple (success, output), where
- # `success` is true if the dbus call was successful and output is what the
- # javascript evaluates to.
- eval = "call --session -d org.gnome.Shell -o /org/gnome/Shell -m org.gnome.Shell.Eval";
- # False when startup is done
- startingUp = "${gdbus} ${eval} Main.layoutManager._startingUp";
- # Hopefully gnome-terminal's wm class
- wmClass = "${gdbus} ${eval} global.display.focus_window.wm_class";
- in ''
- # wait for gdm to start
- $machine->waitForUnit("display-manager.service");
-
- # wait for alice to be logged in
- $machine->waitForUnit("default.target","alice");
-
- # Check that logging in has given the user ownership of devices.
- $machine->succeed("getfacl /dev/snd/timer | grep -q alice");
-
- # Wait for the wayland server
- $machine->waitForFile("/run/user/1000/wayland-0");
-
- # Wait for gnome shell, correct output should be "(true, 'false')"
- $machine->waitUntilSucceeds("su - alice -c '${startingUp} | grep -q true,..false'");
-
- # open a terminal
- $machine->succeed("su - alice -c '${bus} gnome-terminal'");
- # and check it's there
- $machine->waitUntilSucceeds("su - alice -c '${wmClass} | grep -q gnome-terminal-server'");
-
- # wait to get a nice screenshot
- $machine->sleep(20);
- $machine->screenshot("screen");
- '';
-})
diff --git a/nixos/tests/gnome3-xorg.nix b/nixos/tests/gnome3-xorg.nix
new file mode 100644
index 000000000000..eb4c376319be
--- /dev/null
+++ b/nixos/tests/gnome3-xorg.nix
@@ -0,0 +1,41 @@
+import ./make-test.nix ({ pkgs, ...} : {
+ name = "gnome3-xorg";
+ meta = with pkgs.stdenv.lib.maintainers; {
+ maintainers = pkgs.gnome3.maintainers;
+ };
+
+ machine =
+ { ... }:
+
+ { imports = [ ./common/user-account.nix ];
+
+ services.xserver.enable = true;
+
+ services.xserver.displayManager.gdm.enable = false;
+ services.xserver.displayManager.lightdm.enable = true;
+ services.xserver.displayManager.lightdm.autoLogin.enable = true;
+ services.xserver.displayManager.lightdm.autoLogin.user = "alice";
+ services.xserver.desktopManager.gnome3.enable = true;
+ services.xserver.desktopManager.default = "gnome-xorg";
+
+ virtualisation.memorySize = 1024;
+ };
+
+ testScript =
+ ''
+ $machine->waitForX;
+
+ # wait for alice to be logged in
+ $machine->waitForUnit("default.target","alice");
+
+ # Check that logging in has given the user ownership of devices.
+ $machine->succeed("getfacl -p /dev/snd/timer | grep -q alice");
+
+ $machine->succeed("su - alice -c 'DISPLAY=:0.0 gnome-terminal &'");
+ $machine->succeed("xauth merge ~alice/.Xauthority");
+ $machine->waitForWindow(qr/alice.*machine/);
+ $machine->succeed("timeout 900 bash -c 'while read msg; do if [[ \$msg =~ \"GNOME Shell started\" ]]; then break; fi; done < <(journalctl -f)'");
+ $machine->sleep(10);
+ $machine->screenshot("screen");
+ '';
+})
diff --git a/nixos/tests/gnome3.nix b/nixos/tests/gnome3.nix
index b58c9e5a0e32..ab363efb6a19 100644
--- a/nixos/tests/gnome3.nix
+++ b/nixos/tests/gnome3.nix
@@ -1,7 +1,7 @@
import ./make-test.nix ({ pkgs, ...} : {
name = "gnome3";
meta = with pkgs.stdenv.lib.maintainers; {
- maintainers = [ domenkozar eelco lethalman ];
+ maintainers = pkgs.gnome3.maintainers;
};
machine =
@@ -11,31 +11,54 @@ import ./make-test.nix ({ pkgs, ...} : {
services.xserver.enable = true;
- services.xserver.displayManager.gdm.enable = false;
- services.xserver.displayManager.lightdm.enable = true;
- services.xserver.displayManager.lightdm.autoLogin.enable = true;
- services.xserver.displayManager.lightdm.autoLogin.user = "alice";
+ services.xserver.displayManager.gdm = {
+ enable = true;
+ autoLogin = {
+ enable = true;
+ user = "alice";
+ };
+ };
+
services.xserver.desktopManager.gnome3.enable = true;
- services.xserver.desktopManager.default = "gnome-xorg";
virtualisation.memorySize = 1024;
};
- testScript =
- ''
- $machine->waitForX;
+ testScript = let
+ # Keep line widths somewhat managable
+ bus = "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus";
+ gdbus = "${bus} gdbus";
+ # Call javascript in gnome shell, returns a tuple (success, output), where
+ # `success` is true if the dbus call was successful and output is what the
+ # javascript evaluates to.
+ eval = "call --session -d org.gnome.Shell -o /org/gnome/Shell -m org.gnome.Shell.Eval";
+ # False when startup is done
+ startingUp = "${gdbus} ${eval} Main.layoutManager._startingUp";
+ # Hopefully gnome-terminal's wm class
+ wmClass = "${gdbus} ${eval} global.display.focus_window.wm_class";
+ in ''
+ # wait for gdm to start
+ $machine->waitForUnit("display-manager.service");
# wait for alice to be logged in
$machine->waitForUnit("default.target","alice");
# Check that logging in has given the user ownership of devices.
- $machine->succeed("getfacl /dev/snd/timer | grep -q alice");
+ $machine->succeed("getfacl -p /dev/snd/timer | grep -q alice");
- $machine->succeed("su - alice -c 'DISPLAY=:0.0 gnome-terminal &'");
- $machine->succeed("xauth merge ~alice/.Xauthority");
- $machine->waitForWindow(qr/alice.*machine/);
- $machine->succeed("timeout 900 bash -c 'while read msg; do if [[ \$msg =~ \"GNOME Shell started\" ]]; then break; fi; done < <(journalctl -f)'");
- $machine->sleep(10);
+ # Wait for the wayland server
+ $machine->waitForFile("/run/user/1000/wayland-0");
+
+ # Wait for gnome shell, correct output should be "(true, 'false')"
+ $machine->waitUntilSucceeds("su - alice -c '${startingUp} | grep -q true,..false'");
+
+ # open a terminal
+ $machine->succeed("su - alice -c '${bus} gnome-terminal'");
+ # and check it's there
+ $machine->waitUntilSucceeds("su - alice -c '${wmClass} | grep -q gnome-terminal-server'");
+
+ # wait to get a nice screenshot
+ $machine->sleep(20);
$machine->screenshot("screen");
'';
})
diff --git a/nixos/tests/hardened.nix b/nixos/tests/hardened.nix
index 1ff329bd98de..cbf76f9e5587 100644
--- a/nixos/tests/hardened.nix
+++ b/nixos/tests/hardened.nix
@@ -10,6 +10,7 @@ import ./make-test.nix ({ pkgs, ...} : {
{ users.users.alice = { isNormalUser = true; extraGroups = [ "proc" ]; };
users.users.sybil = { isNormalUser = true; group = "wheel"; };
imports = [ ../modules/profiles/hardened.nix ];
+ environment.memoryAllocator.provider = "graphene-hardened";
nix.useSandbox = false;
virtualisation.emptyDiskImages = [ 4096 ];
boot.initrd.postDeviceCommands = ''
@@ -28,7 +29,7 @@ import ./make-test.nix ({ pkgs, ...} : {
testScript =
let
- hardened-malloc-tests = pkgs.stdenv.mkDerivation rec {
+ hardened-malloc-tests = pkgs.stdenv.mkDerivation {
name = "hardened-malloc-tests-${pkgs.graphene-hardened-malloc.version}";
src = pkgs.graphene-hardened-malloc.src;
buildPhase = ''
diff --git a/nixos/tests/hocker-fetchdocker/machine.nix b/nixos/tests/hocker-fetchdocker/machine.nix
index 78343f0e02f0..885adebe1498 100644
--- a/nixos/tests/hocker-fetchdocker/machine.nix
+++ b/nixos/tests/hocker-fetchdocker/machine.nix
@@ -11,8 +11,8 @@
systemd.services.docker-load-fetchdocker-image = {
description = "Docker load hello-world-container";
wantedBy = [ "multi-user.target" ];
- wants = [ "docker.service" "local-fs.target" ];
- after = [ "docker.service" "local-fs.target" ];
+ wants = [ "docker.service" ];
+ after = [ "docker.service" ];
script = ''
${pkgs.hello-world-container}/compositeImage.sh | ${pkgs.docker}/bin/docker load
diff --git a/nixos/tests/hydra/create-trivial-project.sh b/nixos/tests/hydra/create-trivial-project.sh
index 39122c9b473a..5aae2d5bf90d 100755
--- a/nixos/tests/hydra/create-trivial-project.sh
+++ b/nixos/tests/hydra/create-trivial-project.sh
@@ -44,6 +44,8 @@ cat >data.json < $out; exit 0"];
};
}
@@ -53,11 +55,16 @@ let
notificationSender = "example@example.com";
package = pkgs.hydra.override { inherit nix; };
+
+ extraConfig = ''
+ email_notification = 1
+ '';
};
+ services.postfix.enable = true;
nix = {
buildMachines = [{
hostName = "localhost";
- systems = [ "x86_64-linux" ];
+ systems = [ system ];
}];
binaryCaches = [];
@@ -68,12 +75,12 @@ let
# let the system boot up
$machine->waitForUnit("multi-user.target");
# test whether the database is running
- $machine->succeed("systemctl status postgresql.service");
+ $machine->waitForUnit("postgresql.service");
# test whether the actual hydra daemons are running
- $machine->succeed("systemctl status hydra-queue-runner.service");
- $machine->succeed("systemctl status hydra-init.service");
- $machine->succeed("systemctl status hydra-evaluator.service");
- $machine->succeed("systemctl status hydra-send-stats.service");
+ $machine->waitForUnit("hydra-init.service");
+ $machine->requireActiveUnit("hydra-queue-runner.service");
+ $machine->requireActiveUnit("hydra-evaluator.service");
+ $machine->requireActiveUnit("hydra-notify.service");
$machine->succeed("hydra-create-user admin --role admin --password admin");
@@ -84,6 +91,8 @@ let
$machine->succeed("create-trivial-project.sh");
$machine->waitUntilSucceeds('curl -L -s http://localhost:3000/build/1 -H "Accept: application/json" | jq .buildstatus | xargs test 0 -eq');
+
+ $machine->waitUntilSucceeds('journalctl -eu hydra-notify.service -o cat | grep -q "sending mail notification to hydra@localhost"');
'';
})));
diff --git a/nixos/tests/icingaweb2.nix b/nixos/tests/icingaweb2.nix
new file mode 100644
index 000000000000..ea1b94c526b1
--- /dev/null
+++ b/nixos/tests/icingaweb2.nix
@@ -0,0 +1,71 @@
+import ./make-test.nix ({ pkgs, ... }: {
+ name = "icingaweb2";
+ meta = with pkgs.stdenv.lib.maintainers; {
+ maintainers = [ das_j ];
+ };
+
+ nodes = {
+ icingaweb2 = { config, pkgs, ... }: {
+ services.icingaweb2 = {
+ enable = true;
+
+ modulePackages = with pkgs.icingaweb2Modules; {
+ particles = theme-particles;
+ spring = theme-spring;
+ };
+
+ modules = {
+ doc.enable = true;
+ migrate.enable = true;
+ setup.enable = true;
+ test.enable = true;
+ translation.enable = true;
+ };
+
+ generalConfig = {
+ global = {
+ module_path = "${pkgs.icingaweb2}/modules";
+ };
+ };
+
+ authentications = {
+ icingaweb = {
+ backend = "external";
+ };
+ };
+
+ groupBackends = {
+ icingaweb = {
+ backend = "db";
+ resource = "icingaweb_db";
+ };
+ };
+
+ resources = {
+ # Not used, so no DB server needed
+ icingaweb_db = {
+ type = "db";
+ db = "mysql";
+ host = "localhost";
+ username = "icingaweb2";
+ password = "icingaweb2";
+ dbname = "icingaweb2";
+ };
+ };
+
+ roles = {
+ Administrators = {
+ users = "*";
+ permissions = "*";
+ };
+ };
+ };
+ };
+ };
+
+ testScript = ''
+ startAll();
+ $icingaweb2->waitForUnit("multi-user.target");
+ $icingaweb2->succeed("curl -sSf http://icingaweb2/authentication/login");
+ '';
+})
diff --git a/nixos/tests/initdb.nix b/nixos/tests/initdb.nix
new file mode 100644
index 000000000000..749d7857a134
--- /dev/null
+++ b/nixos/tests/initdb.nix
@@ -0,0 +1,26 @@
+let
+ pkgs = import { };
+in
+with import { inherit pkgs; system = builtins.currentSystem; };
+with pkgs.lib;
+
+makeTest {
+ name = "pg-initdb";
+
+ machine = {...}:
+ {
+ documentation.enable = false;
+ services.postgresql.enable = true;
+ services.postgresql.package = pkgs.postgresql_9_6;
+ environment.pathsToLink = [
+ "/share/postgresql"
+ ];
+ };
+
+ testScript = ''
+ $machine->start;
+ $machine->succeed("sudo -u postgres initdb -D /tmp/testpostgres2");
+ $machine->shutdown;
+ '';
+
+ }
\ No newline at end of file
diff --git a/nixos/tests/initrd-network-ssh/default.nix b/nixos/tests/initrd-network-ssh/default.nix
index b2209f297a4f..796c50c610e3 100644
--- a/nixos/tests/initrd-network-ssh/default.nix
+++ b/nixos/tests/initrd-network-ssh/default.nix
@@ -6,7 +6,7 @@ import ../make-test.nix ({ lib, ... }:
maintainers = [ willibutz ];
};
- nodes = with lib; rec {
+ nodes = with lib; {
server =
{ config, ... }:
{
diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix
index a136678c6eff..eb1f4f192dd1 100644
--- a/nixos/tests/installer.nix
+++ b/nixos/tests/installer.nix
@@ -54,8 +54,6 @@ let
hardware.enableAllFirmware = lib.mkForce false;
- services.udisks2.enable = lib.mkDefault false;
-
${replaceChars ["\n"] ["\n "] extraConfig}
}
'';
@@ -295,8 +293,6 @@ let
++ optional (bootLoader == "grub" && grubVersion == 1) pkgs.grub
++ optionals (bootLoader == "grub" && grubVersion == 2) [ pkgs.grub2 pkgs.grub2_efi ];
- services.udisks2.enable = mkDefault false;
-
nix.binaryCaches = mkForce [ ];
nix.extraOptions =
''
diff --git a/nixos/tests/jackett.nix b/nixos/tests/jackett.nix
index 399a0c272327..c749c32ad04e 100644
--- a/nixos/tests/jackett.nix
+++ b/nixos/tests/jackett.nix
@@ -2,7 +2,7 @@ import ./make-test.nix ({ lib, ... }:
with lib;
-rec {
+{
name = "jackett";
meta.maintainers = with maintainers; [ etu ];
diff --git a/nixos/tests/jormungandr.nix b/nixos/tests/jormungandr.nix
new file mode 100644
index 000000000000..2abafc53ce51
--- /dev/null
+++ b/nixos/tests/jormungandr.nix
@@ -0,0 +1,77 @@
+import ./make-test.nix ({ pkgs, ... }: {
+ name = "jormungandr";
+ meta = with pkgs.stdenv.lib.maintainers; {
+ maintainers = [ mmahut ];
+ };
+
+ nodes = {
+ # Testing the Byzantine Fault Tolerant protocol
+ bft = { ... }: {
+ environment.systemPackages = [ pkgs.jormungandr ];
+ services.jormungandr.enable = true;
+ services.jormungandr.genesisBlockFile = "/var/lib/jormungandr/block-0.bin";
+ services.jormungandr.secretFile = "/etc/secrets/jormungandr.yaml";
+ };
+
+ # Testing the Ouroboros Genesis Praos protocol
+ genesis = { ... }: {
+ environment.systemPackages = [ pkgs.jormungandr ];
+ services.jormungandr.enable = true;
+ services.jormungandr.genesisBlockFile = "/var/lib/jormungandr/block-0.bin";
+ services.jormungandr.secretFile = "/etc/secrets/jormungandr.yaml";
+ };
+ };
+
+ testScript = ''
+ startAll;
+
+ ## Testing BFT
+ # Let's wait for the StateDirectory
+ $bft->waitForFile("/var/lib/jormungandr/");
+
+ # First, we generate the genesis file for our new blockchain
+ $bft->succeed("jcli genesis init > /root/genesis.yaml");
+
+ # We need to generate our secret key
+ $bft->succeed("jcli key generate --type=Ed25519 > /root/key.prv");
+
+ # We include the secret key into our services.jormungandr.secretFile
+ $bft->succeed("mkdir -p /etc/secrets");
+ $bft->succeed("echo -e \"bft:\\n signing_key:\" \$(cat /root/key.prv) > /etc/secrets/jormungandr.yaml");
+
+ # After that, we generate our public key from it
+ $bft->succeed("cat /root/key.prv | jcli key to-public > /root/key.pub");
+
+ # We add our public key as a consensus leader in the genesis configration file
+ $bft->succeed("sed -ie \"s/ed25519_pk1vvwp2s0n5jl5f4xcjurp2e92sj2awehkrydrlas4vgqr7xzt33jsadha32/\$(cat /root/key.pub)/\" /root/genesis.yaml");
+
+ # Now we can generate the genesis block from it
+ $bft->succeed("jcli genesis encode --input /root/genesis.yaml --output /var/lib/jormungandr/block-0.bin");
+
+ # We should have everything to start the service now
+ $bft->succeed("systemctl restart jormungandr");
+ $bft->waitForUnit("jormungandr.service");
+
+ # Now we can test if we are able to reach the REST API
+ $bft->waitUntilSucceeds("curl -L http://localhost:8607/api/v0/node/stats | grep uptime");
+
+ ## Testing Genesis
+ # Let's wait for the StateDirectory
+ $genesis->waitForFile("/var/lib/jormungandr/");
+
+ # Bootstraping the configuration
+ $genesis->succeed("jormungandr-bootstrap -g -p 8607 -s 1");
+
+ # Moving generated files in place
+ $genesis->succeed("mkdir -p /etc/secrets");
+ $genesis->succeed("mv pool-secret1.yaml /etc/secrets/jormungandr.yaml");
+ $genesis->succeed("mv block-0.bin /var/lib/jormungandr/");
+
+ # We should have everything to start the service now
+ $genesis->succeed("systemctl restart jormungandr");
+ $genesis->waitForUnit("jormungandr.service");
+
+ # Now we can create and delegate an account
+ $genesis->succeed("./create-account-and-delegate.sh | tee -a /tmp/delegate.log");
+ '';
+})
diff --git a/nixos/tests/kafka.nix b/nixos/tests/kafka.nix
index f526d18befee..48ca98da8fa1 100644
--- a/nixos/tests/kafka.nix
+++ b/nixos/tests/kafka.nix
@@ -73,4 +73,5 @@ in with pkgs; {
kafka_2_0 = makeKafkaTest "kafka_2_0" apacheKafka_2_0;
kafka_2_1 = makeKafkaTest "kafka_2_1" apacheKafka_2_1;
kafka_2_2 = makeKafkaTest "kafka_2_2" apacheKafka_2_2;
+ kafka_2_3 = makeKafkaTest "kafka_2_3" apacheKafka_2_3;
}
diff --git a/nixos/tests/kubernetes/base.nix b/nixos/tests/kubernetes/base.nix
index 212023859f6d..f21634c4ffbf 100644
--- a/nixos/tests/kubernetes/base.nix
+++ b/nixos/tests/kubernetes/base.nix
@@ -30,10 +30,7 @@ let
{ config, pkgs, lib, nodes, ... }:
mkMerge [
{
- boot = {
- postBootCommands = "rm -fr /var/lib/kubernetes/secrets /tmp/shared/*";
- kernel.sysctl = { "fs.inotify.max_user_instances" = 256; };
- };
+ boot.postBootCommands = "rm -fr /var/lib/kubernetes/secrets /tmp/shared/*";
virtualisation.memorySize = mkDefault 1536;
virtualisation.diskSize = mkDefault 4096;
networking = {
@@ -71,7 +68,7 @@ let
443 # kubernetes apiserver
];
})
- (optionalAttrs (machine ? "extraConfiguration") (machine.extraConfiguration { inherit config pkgs lib nodes; }))
+ (optionalAttrs (machine ? extraConfiguration) (machine.extraConfiguration { inherit config pkgs lib nodes; }))
(optionalAttrs (extraConfiguration != null) (extraConfiguration { inherit config pkgs lib nodes; }))
]
) machines;
diff --git a/nixos/tests/kubernetes/dns.nix b/nixos/tests/kubernetes/dns.nix
index e7db0a58ab61..46bcb01a5265 100644
--- a/nixos/tests/kubernetes/dns.nix
+++ b/nixos/tests/kubernetes/dns.nix
@@ -77,7 +77,6 @@ let
singleNodeTest = {
test = ''
# prepare machine1 for test
- $machine1->waitForUnit("kubernetes.target");
$machine1->waitUntilSucceeds("kubectl get node machine1.${domain} | grep -w Ready");
$machine1->waitUntilSucceeds("docker load < ${redisImage}");
$machine1->waitUntilSucceeds("kubectl create -f ${redisPod}");
@@ -103,8 +102,6 @@ let
# Node token exchange
$machine1->waitUntilSucceeds("cp -f /var/lib/cfssl/apitoken.secret /tmp/shared/apitoken.secret");
$machine2->waitUntilSucceeds("cat /tmp/shared/apitoken.secret | nixos-kubernetes-node-join");
- $machine1->waitForUnit("kubernetes.target");
- $machine2->waitForUnit("kubernetes.target");
# prepare machines for test
$machine1->waitUntilSucceeds("kubectl get node machine2.${domain} | grep -w Ready");
diff --git a/nixos/tests/kubernetes/rbac.nix b/nixos/tests/kubernetes/rbac.nix
index 967fe506004f..3ce7adcd0d71 100644
--- a/nixos/tests/kubernetes/rbac.nix
+++ b/nixos/tests/kubernetes/rbac.nix
@@ -94,8 +94,6 @@ let
singlenode = base // {
test = ''
- $machine1->waitForUnit("kubernetes.target");
-
$machine1->waitUntilSucceeds("kubectl get node machine1.my.zyx | grep -w Ready");
$machine1->waitUntilSucceeds("docker load < ${kubectlImage}");
@@ -118,8 +116,6 @@ let
# Node token exchange
$machine1->waitUntilSucceeds("cp -f /var/lib/cfssl/apitoken.secret /tmp/shared/apitoken.secret");
$machine2->waitUntilSucceeds("cat /tmp/shared/apitoken.secret | nixos-kubernetes-node-join");
- $machine1->waitForUnit("kubernetes.target");
- $machine2->waitForUnit("kubernetes.target");
$machine1->waitUntilSucceeds("kubectl get node machine2.my.zyx | grep -w Ready");
diff --git a/nixos/tests/ldap.nix b/nixos/tests/ldap.nix
index fe859876ed25..665b9ee09b55 100644
--- a/nixos/tests/ldap.nix
+++ b/nixos/tests/ldap.nix
@@ -115,7 +115,7 @@ in
);
slapdDatabases = {
- "${dbSuffix}" = {
+ ${dbSuffix} = {
conf = ''
dn: olcBackend={1}mdb,cn=config
objectClass: olcBackendConfig
diff --git a/nixos/tests/libgdata.nix b/nixos/tests/libgdata.nix
new file mode 100644
index 000000000000..10a3ca97dd22
--- /dev/null
+++ b/nixos/tests/libgdata.nix
@@ -0,0 +1,21 @@
+# run installed tests
+import ./make-test.nix ({ pkgs, ... }:
+
+{
+ name = "libgdata";
+
+ meta = {
+ maintainers = pkgs.libgdata.meta.maintainers;
+ };
+
+ machine = { pkgs, ... }: {
+ environment.systemPackages = with pkgs; [ gnome-desktop-testing ];
+ # # GLib-GIO-DEBUG: _g_io_module_get_default: Found default implementation dummy (GDummyTlsBackend) for ‘gio-tls-backend’
+ # Bail out! libgdata:ERROR:../gdata/tests/common.c:134:gdata_test_init: assertion failed (child_error == NULL): TLS support is not available (g-tls-error-quark, 0)
+ services.gnome3.glib-networking.enable = true;
+ };
+
+ testScript = ''
+ $machine->succeed("gnome-desktop-testing-runner -d '${pkgs.libgdata.installedTests}/share'");
+ '';
+})
diff --git a/nixos/tests/libxmlb.nix b/nixos/tests/libxmlb.nix
new file mode 100644
index 000000000000..3bee568ac5a2
--- /dev/null
+++ b/nixos/tests/libxmlb.nix
@@ -0,0 +1,17 @@
+# run installed tests
+import ./make-test.nix ({ pkgs, ... }:
+
+{
+ name = "libxmlb";
+ meta = {
+ maintainers = pkgs.libxmlb.meta.maintainers;
+ };
+
+ machine = { pkgs, ... }: {
+ environment.systemPackages = with pkgs; [ gnome-desktop-testing ];
+ };
+
+ testScript = ''
+ $machine->succeed("gnome-desktop-testing-runner -d '${pkgs.libxmlb.installedTests}/share'");
+ '';
+})
diff --git a/nixos/tests/lidarr.nix b/nixos/tests/lidarr.nix
index 58bf82503f8c..85fcbd21d8c0 100644
--- a/nixos/tests/lidarr.nix
+++ b/nixos/tests/lidarr.nix
@@ -2,7 +2,7 @@ import ./make-test.nix ({ lib, ... }:
with lib;
-rec {
+{
name = "lidarr";
meta.maintainers = with maintainers; [ etu ];
diff --git a/nixos/tests/lightdm.nix b/nixos/tests/lightdm.nix
index 8a9a7408d292..c805f1ed9f3c 100644
--- a/nixos/tests/lightdm.nix
+++ b/nixos/tests/lightdm.nix
@@ -1,7 +1,7 @@
import ./make-test.nix ({ pkgs, ...} : {
name = "lightdm";
meta = with pkgs.stdenv.lib.maintainers; {
- maintainers = [ aszlig ];
+ maintainers = [ aszlig worldofpeace ];
};
machine = { ... }: {
diff --git a/nixos/tests/login.nix b/nixos/tests/login.nix
index 9844ad492e88..bd8ed23a7b8e 100644
--- a/nixos/tests/login.nix
+++ b/nixos/tests/login.nix
@@ -9,6 +9,7 @@ import ./make-test.nix ({ pkgs, latestKernel ? false, ... }:
machine =
{ pkgs, lib, ... }:
{ boot.kernelPackages = lib.mkIf latestKernel pkgs.linuxPackages_latest;
+ sound.enable = true; # needed for the factl test, /dev/snd/* exists without them but udev doesn't care then
};
testScript =
@@ -47,12 +48,12 @@ import ./make-test.nix ({ pkgs, latestKernel ? false, ... }:
# Check whether systemd gives and removes device ownership as
# needed.
subtest "device permissions", sub {
- $machine->succeed("getfacl /dev/snd/timer | grep -q alice");
+ $machine->succeed("getfacl -p /dev/snd/timer | grep -q alice");
$machine->sendKeys("alt-f1");
$machine->waitUntilSucceeds("[ \$(fgconsole) = 1 ]");
- $machine->fail("getfacl /dev/snd/timer | grep -q alice");
+ $machine->fail("getfacl -p /dev/snd/timer | grep -q alice");
$machine->succeed("chvt 2");
- $machine->waitUntilSucceeds("getfacl /dev/snd/timer | grep -q alice");
+ $machine->waitUntilSucceeds("getfacl -p /dev/snd/timer | grep -q alice");
};
# Log out.
diff --git a/nixos/tests/magnetico.nix b/nixos/tests/magnetico.nix
new file mode 100644
index 000000000000..bc7aef653ee5
--- /dev/null
+++ b/nixos/tests/magnetico.nix
@@ -0,0 +1,28 @@
+import ./make-test.nix ({ pkgs, ...} : {
+ name = "magnetico";
+ meta = with pkgs.stdenv.lib.maintainers; {
+ maintainers = [ rnhmjoj ];
+ };
+
+ machine = { ... }: {
+ imports = [ ../modules/profiles/minimal.nix ];
+
+ networking.firewall.allowedTCPPorts = [ 9000 ];
+
+ services.magnetico = {
+ enable = true;
+ crawler.port = 9000;
+ web.credentials.user = "$2y$12$P88ZF6soFthiiAeXnz64aOWDsY3Dw7Yw8fZ6GtiqFNjknD70zDmNe";
+ };
+ };
+
+ testScript =
+ ''
+ startAll;
+ $machine->waitForUnit("magneticod");
+ $machine->waitForUnit("magneticow");
+ $machine->succeed("${pkgs.curl}/bin/curl -u user:password http://localhost:8080");
+ $machine->succeed("${pkgs.curl}/bin/curl -u user:wrongpwd http://localhost:8080") =~ "Unauthorised." or die;
+ $machine->shutdown();
+ '';
+})
diff --git a/nixos/tests/metabase.nix b/nixos/tests/metabase.nix
new file mode 100644
index 000000000000..be9e5ed5b1e8
--- /dev/null
+++ b/nixos/tests/metabase.nix
@@ -0,0 +1,20 @@
+import ./make-test.nix ({ pkgs, ... }: {
+ name = "metabase";
+ meta = with pkgs.stdenv.lib.maintainers; {
+ maintainers = [ mmahut ];
+ };
+
+ nodes = {
+ machine = { ... }: {
+ services.metabase.enable = true;
+ virtualisation.memorySize = 1024;
+ };
+ };
+
+ testScript = ''
+ startAll;
+ $machine->waitForUnit("metabase.service");
+ $machine->waitForOpenPort(3000);
+ $machine->waitUntilSucceeds("curl -L http://localhost:3000/setup | grep Metabase");
+ '';
+})
diff --git a/nixos/tests/minidlna.nix b/nixos/tests/minidlna.nix
new file mode 100644
index 000000000000..7bf1bed69d06
--- /dev/null
+++ b/nixos/tests/minidlna.nix
@@ -0,0 +1,39 @@
+import ./make-test.nix ({ pkgs, ... }: {
+ name = "minidlna";
+
+ nodes = {
+ server =
+ { ... }:
+ {
+ imports = [ ../modules/profiles/minimal.nix ];
+ networking.firewall.allowedTCPPorts = [ 8200 ];
+ services.minidlna = {
+ enable = true;
+ loglevel = "error";
+ mediaDirs = [
+ "PV,/tmp/stuff"
+ ];
+ friendlyName = "rpi3";
+ rootContainer = "B";
+ extraConfig =
+ ''
+ album_art_names=Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumartsmall.jpg
+ album_art_names=AlbumArt.jpg/albumart.jpg/Album.jpg/album.jpg
+ album_art_names=Folder.jpg/folder.jpg/Thumb.jpg/thumb.jpg
+ notify_interval=60
+ '';
+ };
+ };
+ client = { ... }: { };
+ };
+
+ testScript =
+ ''
+ startAll;
+ $server->succeed("mkdir -p /tmp/stuff && chown minidlna: /tmp/stuff");
+ $server->waitForUnit("minidlna");
+ $server->waitForOpenPort("8200");
+ $server->succeed("curl --fail http://localhost:8200/");
+ $client->succeed("curl --fail http://server:8200/");
+ '';
+})
diff --git a/nixos/tests/moodle.nix b/nixos/tests/moodle.nix
new file mode 100644
index 000000000000..565a6b636949
--- /dev/null
+++ b/nixos/tests/moodle.nix
@@ -0,0 +1,22 @@
+import ./make-test.nix ({ pkgs, lib, ... }: {
+ name = "moodle";
+ meta.maintainers = [ lib.maintainers.aanderse ];
+
+ machine =
+ { ... }:
+ { services.moodle.enable = true;
+ services.moodle.virtualHost.hostName = "localhost";
+ services.moodle.virtualHost.adminAddr = "root@example.com";
+ services.moodle.initialPassword = "correcthorsebatterystaple";
+
+ # Ensure the virtual machine has enough memory to avoid errors like:
+ # Fatal error: Out of memory (allocated 152047616) (tried to allocate 33554440 bytes)
+ virtualisation.memorySize = 2000;
+ };
+
+ testScript = ''
+ startAll;
+ $machine->waitForUnit('phpfpm-moodle.service');
+ $machine->succeed('curl http://localhost/') =~ /You are not logged in/ or die;
+ '';
+})
diff --git a/nixos/tests/mosquitto.nix b/nixos/tests/mosquitto.nix
index 86b7f9c044d8..b4c897c3ab5d 100644
--- a/nixos/tests/mosquitto.nix
+++ b/nixos/tests/mosquitto.nix
@@ -16,7 +16,7 @@ let
"-t ${topic}"
];
-in rec {
+in {
name = "mosquitto";
meta = with pkgs.stdenv.lib; {
maintainers = with maintainers; [ peterhoeg ];
@@ -34,7 +34,7 @@ in rec {
enable = true;
host = "0.0.0.0";
checkPasswords = true;
- users."${username}" = {
+ users.${username} = {
inherit password;
acl = [
"topic readwrite ${topic}"
@@ -49,21 +49,40 @@ in rec {
testScript = let
file = "/tmp/msg";
- payload = "wootWOOT";
+ sub = args:
+ "(${cmd "sub"} -C 1 ${args} | tee ${file} &)";
in ''
startAll;
$server->waitForUnit("mosquitto.service");
$server->fail("test -f ${file}");
- $server->execute("(${cmd "sub"} -C 1 | tee ${file} &)");
-
$client1->fail("test -f ${file}");
- $client1->execute("(${cmd "sub"} -C 1 | tee ${file} &)");
+ $client2->fail("test -f ${file}");
- $client2->succeed("${cmd "pub"} -m ${payload}");
- $server->succeed("grep -q ${payload} ${file}");
+ # QoS = 0, so only one subscribers should get it
+ $server->execute("${sub "-q 0"}");
- $client1->succeed("grep -q ${payload} ${file}");
+ # we need to give the subscribers some time to connect
+ $client2->execute("sleep 5");
+ $client2->succeed("${cmd "pub"} -m FOO -q 0");
+
+ $server->waitUntilSucceeds("grep -q FOO ${file}");
+ $server->execute("rm ${file}");
+
+
+ # QoS = 1, so both subscribers should get it
+ $server->execute("${sub "-q 1"}");
+ $client1->execute("${sub "-q 1"}");
+
+ # we need to give the subscribers some time to connect
+ $client2->execute("sleep 5");
+ $client2->succeed("${cmd "pub"} -m BAR -q 1");
+
+ $server->waitUntilSucceeds("grep -q BAR ${file}");
+ $server->execute("rm ${file}");
+
+ $client1->waitUntilSucceeds("grep -q BAR ${file}");
+ $client1->execute("rm ${file}");
'';
})
diff --git a/nixos/tests/mumble.nix b/nixos/tests/mumble.nix
index dadd16fd9a0c..652d49a24b1c 100644
--- a/nixos/tests/mumble.nix
+++ b/nixos/tests/mumble.nix
@@ -63,8 +63,8 @@ in
$client2->sendChars("y");
# Find clients in logs
- $server->waitUntilSucceeds("grep -q 'client1' /var/log/murmur/murmurd.log");
- $server->waitUntilSucceeds("grep -q 'client2' /var/log/murmur/murmurd.log");
+ $server->waitUntilSucceeds("journalctl -eu murmur -o cat | grep -q client1");
+ $server->waitUntilSucceeds("journalctl -eu murmur -o cat | grep -q client2");
$server->sleep(5); # wait to get screenshot
$client1->screenshot("screen1");
diff --git a/nixos/tests/mxisd.nix b/nixos/tests/mxisd.nix
index 3d03a5a53e38..0039256f5861 100644
--- a/nixos/tests/mxisd.nix
+++ b/nixos/tests/mxisd.nix
@@ -10,12 +10,22 @@ import ./make-test.nix ({ pkgs, ... } : {
services.mxisd.enable = true;
services.mxisd.matrix.domain = "example.org";
};
+
+ server_ma1sd = args : {
+ services.mxisd.enable = true;
+ services.mxisd.matrix.domain = "example.org";
+ services.mxisd.package = pkgs.ma1sd;
+ };
};
testScript = ''
startAll;
$server_mxisd->waitForUnit("mxisd.service");
$server_mxisd->waitForOpenPort(8090);
- $server_mxisd->succeed("curl -Ssf \"http://127.0.0.1:8090/_matrix/identity/api/v1\"")
+ $server_mxisd->succeed("curl -Ssf \"http://127.0.0.1:8090/_matrix/identity/api/v1\"");
+ $server_ma1sd->waitForUnit("mxisd.service");
+ $server_ma1sd->waitForOpenPort(8090);
+ $server_ma1sd->succeed("curl -Ssf \"http://127.0.0.1:8090/_matrix/identity/api/v1\"")
+
'';
})
diff --git a/nixos/tests/mysql.nix b/nixos/tests/mysql.nix
index abf9606aa366..05bd968de02d 100644
--- a/nixos/tests/mysql.nix
+++ b/nixos/tests/mysql.nix
@@ -19,7 +19,7 @@ import ./make-test.nix ({ pkgs, ...} : {
services.mysql.initialScript = pkgs.writeText "mysql-init.sql" ''
CREATE USER 'passworduser'@'localhost' IDENTIFIED BY 'password123';
'';
- services.mysql.package = pkgs.mysql;
+ services.mysql.package = pkgs.mysql57;
};
mariadb =
diff --git a/nixos/tests/ndppd.nix b/nixos/tests/ndppd.nix
index c53ff93a91f9..6a6f602726de 100644
--- a/nixos/tests/ndppd.nix
+++ b/nixos/tests/ndppd.nix
@@ -37,7 +37,7 @@ import ./make-test.nix ({ pkgs, lib, ...} : {
};
services.ndppd = {
enable = true;
- proxies."eth1".rules."fd42::/112" = {};
+ proxies.eth1.rules."fd42::/112" = {};
};
containers.client = {
autoStart = true;
diff --git a/nixos/tests/networking.nix b/nixos/tests/networking.nix
index 949d946bdc4c..e0585d8f1bb4 100644
--- a/nixos/tests/networking.nix
+++ b/nixos/tests/networking.nix
@@ -21,7 +21,7 @@ let
useNetworkd = networkd;
firewall.checkReversePath = true;
firewall.allowedUDPPorts = [ 547 ];
- interfaces = mkOverride 0 (listToAttrs (flip map vlanIfs (n:
+ interfaces = mkOverride 0 (listToAttrs (forEach vlanIfs (n:
nameValuePair "eth${toString n}" {
ipv4.addresses = [ { address = "192.168.${toString n}.1"; prefixLength = 24; } ];
ipv6.addresses = [ { address = "fd00:1234:5678:${toString n}::1"; prefixLength = 64; } ];
@@ -72,6 +72,7 @@ let
testCases = {
loopback = {
name = "Loopback";
+ machine.networking.useDHCP = false;
machine.networking.useNetworkd = networkd;
testScript = ''
startAll;
@@ -139,14 +140,16 @@ let
virtualisation.vlans = [ 1 2 ];
networking = {
useNetworkd = networkd;
- useDHCP = true;
+ useDHCP = false;
interfaces.eth1 = {
ipv4.addresses = mkOverride 0 [ ];
ipv6.addresses = mkOverride 0 [ ];
+ useDHCP = true;
};
interfaces.eth2 = {
ipv4.addresses = mkOverride 0 [ ];
ipv6.addresses = mkOverride 0 [ ];
+ useDHCP = true;
};
};
};
@@ -320,13 +323,19 @@ let
virtualisation.vlans = [ 1 ];
networking = {
useNetworkd = networkd;
+ useDHCP = false;
firewall.logReversePathDrops = true; # to debug firewall rules
# reverse path filtering rules for the macvlan interface seem
# to be incorrect, causing the test to fail. Disable temporarily.
firewall.checkReversePath = false;
- useDHCP = true;
macvlans.macvlan.interface = "eth1";
- interfaces.eth1.ipv4.addresses = mkOverride 0 [ ];
+ interfaces.eth1 = {
+ ipv4.addresses = mkOverride 0 [ ];
+ useDHCP = true;
+ };
+ interfaces.macvlan = {
+ useDHCP = true;
+ };
};
};
testScript = { ... }:
@@ -440,12 +449,14 @@ let
virtual = {
name = "Virtual";
machine = {
- networking.interfaces."tap0" = {
+ networking.useNetworkd = networkd;
+ networking.useDHCP = false;
+ networking.interfaces.tap0 = {
ipv4.addresses = [ { address = "192.168.1.1"; prefixLength = 24; } ];
ipv6.addresses = [ { address = "2001:1470:fffd:2096::"; prefixLength = 64; } ];
virtual = true;
};
- networking.interfaces."tun0" = {
+ networking.interfaces.tun0 = {
ipv4.addresses = [ { address = "192.168.1.2"; prefixLength = 24; } ];
ipv6.addresses = [ { address = "2001:1470:fffd:2097::"; prefixLength = 64; } ];
virtual = true;
@@ -489,6 +500,7 @@ let
boot.kernel.sysctl."net.ipv6.conf.all.forwarding" = true;
networking = {
useNetworkd = networkd;
+ useDHCP = false;
interfaces.eth1.ipv6.addresses = singleton {
address = "fd00:1234:5678:1::1";
prefixLength = 64;
@@ -514,11 +526,12 @@ let
virtualisation.vlans = [ 1 ];
networking = {
useNetworkd = networkd;
- useDHCP = true;
+ useDHCP = false;
interfaces.eth1 = {
preferTempAddress = true;
ipv4.addresses = mkOverride 0 [ ];
ipv6.addresses = mkOverride 0 [ ];
+ useDHCP = true;
};
};
};
@@ -526,11 +539,12 @@ let
virtualisation.vlans = [ 1 ];
networking = {
useNetworkd = networkd;
- useDHCP = true;
+ useDHCP = false;
interfaces.eth1 = {
preferTempAddress = false;
ipv4.addresses = mkOverride 0 [ ];
ipv6.addresses = mkOverride 0 [ ];
+ useDHCP = true;
};
};
};
@@ -561,7 +575,7 @@ let
name = "routes";
machine = {
networking.useDHCP = false;
- networking.interfaces."eth0" = {
+ networking.interfaces.eth0 = {
ipv4.addresses = [ { address = "192.168.1.2"; prefixLength = 24; } ];
ipv6.addresses = [ { address = "2001:1470:fffd:2097::"; prefixLength = 64; } ];
ipv6.routes = [
diff --git a/nixos/tests/nextcloud/with-mysql-and-memcached.nix b/nixos/tests/nextcloud/with-mysql-and-memcached.nix
index c0d347238b47..aaf37ee4c810 100644
--- a/nixos/tests/nextcloud/with-mysql-and-memcached.nix
+++ b/nixos/tests/nextcloud/with-mysql-and-memcached.nix
@@ -50,7 +50,7 @@ in {
'';
};
- systemd.services."nextcloud-setup"= {
+ systemd.services.nextcloud-setup= {
requires = ["mysql.service"];
after = ["mysql.service"];
};
diff --git a/nixos/tests/nextcloud/with-postgresql-and-redis.nix b/nixos/tests/nextcloud/with-postgresql-and-redis.nix
index 8a840a608753..f655aba9d45e 100644
--- a/nixos/tests/nextcloud/with-postgresql-and-redis.nix
+++ b/nixos/tests/nextcloud/with-postgresql-and-redis.nix
@@ -36,49 +36,16 @@ in {
};
services.redis = {
- unixSocket = "/var/run/redis/redis.sock";
enable = true;
- extraConfig = ''
- unixsocketperm 770
- '';
};
- systemd.services.redis = {
- preStart = ''
- mkdir -p /var/run/redis
- chown ${config.services.redis.user}:${config.services.nginx.group} /var/run/redis
- '';
- serviceConfig.PermissionsStartOnly = true;
- };
-
- systemd.services."nextcloud-setup"= {
+ systemd.services.nextcloud-setup= {
requires = ["postgresql.service"];
after = [
"postgresql.service"
- "chown-redis-socket.service"
];
};
- # At the time of writing, redis creates its socket with the "nobody"
- # group. I figure this is slightly less bad than making the socket world
- # readable.
- systemd.services."chown-redis-socket" = {
- enable = true;
- script = ''
- until ${pkgs.redis}/bin/redis-cli ping; do
- echo "waiting for redis..."
- sleep 1
- done
- chown ${config.services.redis.user}:${config.services.nginx.group} /var/run/redis/redis.sock
- '';
- after = [ "redis.service" ];
- requires = [ "redis.service" ];
- wantedBy = [ "redis.service" ];
- serviceConfig = {
- Type = "oneshot";
- };
- };
-
services.postgresql = {
enable = true;
ensureDatabases = [ "nextcloud" ];
@@ -94,8 +61,8 @@ in {
testScript = let
configureRedis = pkgs.writeScript "configure-redis" ''
#!${pkgs.stdenv.shell}
- nextcloud-occ config:system:set redis 'host' --value '/var/run/redis/redis.sock' --type string
- nextcloud-occ config:system:set redis 'port' --value 0 --type integer
+ nextcloud-occ config:system:set redis 'host' --value 'localhost' --type string
+ nextcloud-occ config:system:set redis 'port' --value 6379 --type integer
nextcloud-occ config:system:set memcache.local --value '\OC\Memcache\Redis' --type string
nextcloud-occ config:system:set memcache.locking --value '\OC\Memcache\Redis' --type string
'';
diff --git a/nixos/tests/nghttpx.nix b/nixos/tests/nghttpx.nix
index d41fa01aa9a8..11611bfe1063 100644
--- a/nixos/tests/nghttpx.nix
+++ b/nixos/tests/nghttpx.nix
@@ -15,7 +15,7 @@ in
services.nginx = {
enable = true;
- virtualHosts."server" = {
+ virtualHosts.server = {
locations."/".root = nginxRoot;
};
};
diff --git a/nixos/tests/nginx.nix b/nixos/tests/nginx.nix
index d66d99821c11..d0b7306ae83b 100644
--- a/nixos/tests/nginx.nix
+++ b/nixos/tests/nginx.nix
@@ -3,15 +3,15 @@
# generated virtual hosts config.
# 2. whether the ETag header is properly generated whenever we're serving
# files in Nix store paths
-
+# 3. nginx doesn't restart on configuration changes (only reloads)
import ./make-test.nix ({ pkgs, ... }: {
name = "nginx";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ mbbx6spp ];
};
- nodes = let
- commonConfig = { pkgs, ... }: {
+ nodes = {
+ webserver = { pkgs, lib, ... }: {
services.nginx.enable = true;
services.nginx.commonHttpConfig = ''
log_format ceeformat '@cee: {"status":"$status",'
@@ -32,30 +32,42 @@ import ./make-test.nix ({ pkgs, ... }: {
location /favicon.ico { allow all; access_log off; log_not_found off; }
'';
};
+
services.nginx.virtualHosts.localhost = {
root = pkgs.runCommand "testdir" {} ''
mkdir "$out"
echo hello world > "$out/index.html"
'';
};
- };
- in {
- webserver = commonConfig;
- newwebserver = { pkgs, lib, ... }: {
- imports = [ commonConfig ];
- services.nginx.virtualHosts.localhost = {
- root = lib.mkForce (pkgs.runCommand "testdir2" {} ''
- mkdir "$out"
- echo hello world > "$out/index.html"
- '');
- };
+ services.nginx.enableReload = true;
+
+ nesting.clone = [
+ {
+ services.nginx.virtualHosts.localhost = {
+ root = lib.mkForce (pkgs.runCommand "testdir2" {} ''
+ mkdir "$out"
+ echo content changed > "$out/index.html"
+ '');
+ };
+ }
+
+ {
+ services.nginx.virtualHosts."1.my.test".listen = [ { addr = "127.0.0.1"; port = 8080; }];
+ }
+
+ {
+ services.nginx.package = pkgs.nginxUnstable;
+ }
+ ];
};
+
};
testScript = { nodes, ... }: let
- newServerSystem = nodes.newwebserver.config.system.build.toplevel;
- switch = "${newServerSystem}/bin/switch-to-configuration test";
+ etagSystem = "${nodes.webserver.config.system.build.toplevel}/fine-tune/child-1";
+ justReloadSystem = "${nodes.webserver.config.system.build.toplevel}/fine-tune/child-2";
+ reloadRestartSystem = "${nodes.webserver.config.system.build.toplevel}/fine-tune/child-3";
in ''
my $url = 'http://localhost/index.html';
@@ -77,9 +89,23 @@ import ./make-test.nix ({ pkgs, ... }: {
subtest "check ETag if serving Nix store paths", sub {
my $oldEtag = checkEtag;
- $webserver->succeed('${switch}');
+ $webserver->succeed("${etagSystem}/bin/switch-to-configuration test >&2");
+ $webserver->sleep(1); # race condition
my $newEtag = checkEtag;
die "Old ETag $oldEtag is the same as $newEtag" if $oldEtag eq $newEtag;
};
+
+ subtest "config is reloaded on nixos-rebuild switch", sub {
+ $webserver->succeed("${justReloadSystem}/bin/switch-to-configuration test >&2");
+ $webserver->waitForOpenPort("8080");
+ $webserver->fail("journalctl -u nginx | grep -q -i stopped");
+ $webserver->succeed("journalctl -u nginx | grep -q -i reloaded");
+ };
+
+ subtest "restart when nginx package changes", sub {
+ $webserver->succeed("${reloadRestartSystem}/bin/switch-to-configuration test >&2");
+ $webserver->waitForUnit("nginx");
+ $webserver->succeed("journalctl -u nginx | grep -q -i stopped");
+ };
'';
})
diff --git a/nixos/tests/nixos-generate-config.nix b/nixos/tests/nixos-generate-config.nix
new file mode 100644
index 000000000000..15a173e024b4
--- /dev/null
+++ b/nixos/tests/nixos-generate-config.nix
@@ -0,0 +1,24 @@
+import ./make-test.nix ({ lib, ... } : {
+ name = "nixos-generate-config";
+ meta.maintainers = with lib.maintainers; [ basvandijk ];
+ machine = {
+ system.nixos-generate-config.configuration = ''
+ # OVERRIDDEN
+ { config, pkgs, ... }: {
+ imports = [ ./hardware-configuration.nix ];
+ $bootLoaderConfig
+ }
+ '';
+ };
+ testScript = ''
+ startAll;
+ $machine->waitForUnit("multi-user.target");
+ $machine->succeed("nixos-generate-config");
+
+ # Test if the configuration really is overridden
+ $machine->succeed("grep 'OVERRIDDEN' /etc/nixos/configuration.nix");
+
+ # Test of if the Perl variable $bootLoaderConfig is spliced correctly:
+ $machine->succeed("grep 'boot\\.loader\\.grub\\.enable = true;' /etc/nixos/configuration.nix");
+ '';
+})
diff --git a/nixos/tests/os-prober.nix b/nixos/tests/os-prober.nix
new file mode 100644
index 000000000000..5407a62339fe
--- /dev/null
+++ b/nixos/tests/os-prober.nix
@@ -0,0 +1,118 @@
+import ./make-test.nix ({pkgs, lib, ...}:
+let
+ # A filesystem image with a (presumably) bootable debian
+ debianImage = pkgs.vmTools.diskImageFuns.debian9i386 {
+ # os-prober cannot detect systems installed on disks without a partition table
+ # so we create the disk ourselves
+ createRootFS = with pkgs; ''
+ ${parted}/bin/parted --script /dev/vda mklabel msdos
+ ${parted}/sbin/parted --script /dev/vda -- mkpart primary ext2 1M -1s
+ mkdir /mnt
+ ${e2fsprogs}/bin/mkfs.ext4 /dev/vda1
+ ${utillinux}/bin/mount -t ext4 /dev/vda1 /mnt
+
+ if test -e /mnt/.debug; then
+ exec ${bash}/bin/sh
+ fi
+ touch /mnt/.debug
+
+ mkdir /mnt/proc /mnt/dev /mnt/sys
+ '';
+ extraPackages = [
+ # /etc/os-release
+ "base-files"
+ # make the disk bootable-looking
+ "grub2" "linux-image-686"
+ ];
+ # install grub
+ postInstall = ''
+ ln -sf /proc/self/mounts > /etc/mtab
+ PATH=/usr/bin:/bin:/usr/sbin:/sbin $chroot /mnt \
+ grub-install /dev/vda --force
+ PATH=/usr/bin:/bin:/usr/sbin:/sbin $chroot /mnt \
+ update-grub
+ '';
+ };
+
+ # options to add the disk to the test vm
+ QEMU_OPTS = "-drive index=2,file=${debianImage}/disk-image.qcow2,read-only,if=virtio";
+
+ # a part of the configuration of the test vm
+ simpleConfig = {
+ boot.loader.grub = {
+ enable = true;
+ useOSProber = true;
+ device = "/dev/vda";
+ # vda is a filesystem without partition table
+ forceInstall = true;
+ };
+ nix.binaryCaches = lib.mkForce [ ];
+ nix.extraOptions = ''
+ hashed-mirrors =
+ connect-timeout = 1
+ '';
+ };
+ # /etc/nixos/configuration.nix for the vm
+ configFile = pkgs.writeText "configuration.nix" ''
+ {config, pkgs, ...}: ({
+ imports =
+ [ ./hardware-configuration.nix
+
+ ];
+ } // (builtins.fromJSON (builtins.readFile ${
+ pkgs.writeText "simpleConfig.json" (builtins.toJSON simpleConfig)
+ })))
+ '';
+in {
+ name = "os-prober";
+
+ machine = { config, pkgs, ... }: (simpleConfig // {
+ imports = [ ../modules/profiles/installation-device.nix
+ ../modules/profiles/base.nix ];
+ virtualisation.memorySize = 1024;
+ # The test cannot access the network, so any packages
+ # nixos-rebuild needs must be included in the VM.
+ system.extraDependencies = with pkgs;
+ [ sudo
+ libxml2.bin
+ libxslt.bin
+ desktop-file-utils
+ docbook5
+ docbook_xsl_ns
+ unionfs-fuse
+ ntp
+ nixos-artwork.wallpapers.simple-dark-gray-bottom
+ perlPackages.XMLLibXML
+ perlPackages.ListCompare
+ shared-mime-info
+ texinfo
+ xorg.lndir
+ grub2
+
+ # add curl so that rather than seeing the test attempt to download
+ # curl's tarball, we see what it's trying to download
+ curl
+ ];
+ });
+
+ testScript = ''
+ # hack to add the secondary disk
+ $machine->{startCommand} = "QEMU_OPTS=\"\$QEMU_OPTS \"${lib.escapeShellArg QEMU_OPTS} ".$machine->{startCommand};
+
+ $machine->start;
+ $machine->succeed("udevadm settle");
+ $machine->waitForUnit("multi-user.target");
+
+ # check that os-prober works standalone
+ $machine->succeed("${pkgs.os-prober}/bin/os-prober | grep /dev/vdb1");
+
+ # rebuild and test that debian is available in the grub menu
+ $machine->succeed("nixos-generate-config");
+ $machine->copyFileFromHost(
+ "${configFile}",
+ "/etc/nixos/configuration.nix");
+ $machine->succeed("nixos-rebuild boot >&2");
+
+ $machine->succeed("egrep 'menuentry.*debian' /boot/grub/grub.cfg");
+ '';
+})
diff --git a/nixos/tests/pantheon.nix b/nixos/tests/pantheon.nix
index c50f77f86173..9888887ee8b5 100644
--- a/nixos/tests/pantheon.nix
+++ b/nixos/tests/pantheon.nix
@@ -42,7 +42,7 @@ import ./make-test.nix ({ pkgs, ...} :
$machine->waitForWindow(qr/plank/);
# Check that logging in has given the user ownership of devices.
- $machine->succeed("getfacl /dev/snd/timer | grep -q alice");
+ $machine->succeed("getfacl -p /dev/snd/timer | grep -q alice");
# Open elementary terminal
$machine->execute("su - alice -c 'DISPLAY=:0.0 io.elementary.terminal &'");
diff --git a/nixos/tests/pgmanage.nix b/nixos/tests/pgmanage.nix
index 110cbd5c5b40..bacaf3f41588 100644
--- a/nixos/tests/pgmanage.nix
+++ b/nixos/tests/pgmanage.nix
@@ -21,7 +21,7 @@ in
pgmanage = {
enable = true;
connections = {
- "${conn}" = "hostaddr=127.0.0.1 port=${toString config.services.postgresql.port} dbname=postgres";
+ ${conn} = "hostaddr=127.0.0.1 port=${toString config.services.postgresql.port} dbname=postgres";
};
};
};
diff --git a/nixos/tests/php-pcre.nix b/nixos/tests/php-pcre.nix
index 19bde9babad5..ae44aec7944f 100644
--- a/nixos/tests/php-pcre.nix
+++ b/nixos/tests/php-pcre.nix
@@ -8,30 +8,25 @@ import ./make-test.nix ({ ...}: {
services.httpd = {
enable = true;
adminAddr = "please@dont.contact";
- extraSubservices = lib.singleton {
- function = f: {
- enablePHP = true;
- phpOptions = "pcre.jit = true";
+ enablePHP = true;
+ phpOptions = "pcre.jit = true";
+ extraConfig =
+ let
+ testRoot = pkgs.writeText "index.php"
+ ''
+
+ '';
+ in
+ ''
+ Alias / ${testRoot}/
- extraConfig =
- let
- testRoot = pkgs.writeText "index.php"
- ''
-
- '';
- in
- ''
- Alias / ${testRoot}/
-
-
- Require all granted
-
- '';
- };
- };
+
+ Require all granted
+
+ '';
};
};
testScript = { ... }:
diff --git a/nixos/tests/plasma5.nix b/nixos/tests/plasma5.nix
index 788c8719c8d2..614fc9bf316e 100644
--- a/nixos/tests/plasma5.nix
+++ b/nixos/tests/plasma5.nix
@@ -30,6 +30,7 @@ import ./make-test.nix ({ pkgs, ...} :
enable = true;
user = "alice";
};
+ hardware.pulseaudio.enable = true; # needed for the factl test, /dev/snd/* exists without them but udev doesn't care then
virtualisation.memorySize = 1024;
environment.systemPackages = [ sddm_theme ];
};
@@ -47,7 +48,7 @@ import ./make-test.nix ({ pkgs, ...} :
$machine->waitForWindow("^Desktop ");
# Check that logging in has given the user ownership of devices.
- $machine->succeed("getfacl /dev/snd/timer | grep -q alice");
+ $machine->succeed("getfacl -p /dev/snd/timer | grep -q alice");
$machine->execute("su - alice -c 'DISPLAY=:0.0 dolphin &'");
$machine->waitForWindow(" Dolphin");
diff --git a/nixos/tests/postgresql-wal-receiver.nix b/nixos/tests/postgresql-wal-receiver.nix
new file mode 100644
index 000000000000..791b041ba95b
--- /dev/null
+++ b/nixos/tests/postgresql-wal-receiver.nix
@@ -0,0 +1,86 @@
+{ system ? builtins.currentSystem
+, config ? { }
+, pkgs ? import ../.. { inherit system config; } }:
+
+with import ../lib/testing.nix { inherit system pkgs; };
+with pkgs.lib;
+
+let
+ postgresqlDataDir = "/var/db/postgresql/test";
+ replicationUser = "wal_receiver_user";
+ replicationSlot = "wal_receiver_slot";
+ replicationConn = "postgresql://${replicationUser}@localhost";
+ baseBackupDir = "/tmp/pg_basebackup";
+ walBackupDir = "/tmp/pg_wal";
+ recoveryConf = pkgs.writeText "recovery.conf" ''
+ restore_command = 'cp ${walBackupDir}/%f %p'
+ '';
+
+ makePostgresqlWalReceiverTest = subTestName: postgresqlPackage: makeTest {
+ name = "postgresql-wal-receiver-${subTestName}";
+ meta.maintainers = with maintainers; [ pacien ];
+
+ machine = { ... }: {
+ services.postgresql = {
+ package = postgresqlPackage;
+ enable = true;
+ dataDir = postgresqlDataDir;
+ extraConfig = ''
+ wal_level = archive # alias for replica on pg >= 9.6
+ max_wal_senders = 10
+ max_replication_slots = 10
+ '';
+ authentication = ''
+ host replication ${replicationUser} all trust
+ '';
+ initialScript = pkgs.writeText "init.sql" ''
+ create user ${replicationUser} replication;
+ select * from pg_create_physical_replication_slot('${replicationSlot}');
+ '';
+ };
+
+ services.postgresqlWalReceiver.receivers.main = {
+ inherit postgresqlPackage;
+ connection = replicationConn;
+ slot = replicationSlot;
+ directory = walBackupDir;
+ };
+ };
+
+ testScript = ''
+ # make an initial base backup
+ $machine->waitForUnit('postgresql');
+ $machine->waitForUnit('postgresql-wal-receiver-main');
+ # WAL receiver healthchecks PG every 5 seconds, so let's be sure they have connected each other
+ # required only for 9.4
+ $machine->sleep(5);
+ $machine->succeed('${postgresqlPackage}/bin/pg_basebackup --dbname=${replicationConn} --pgdata=${baseBackupDir}');
+
+ # create a dummy table with 100 records
+ $machine->succeed('sudo -u postgres psql --command="create table dummy as select * from generate_series(1, 100) as val;"');
+
+ # stop postgres and destroy data
+ $machine->systemctl('stop postgresql');
+ $machine->systemctl('stop postgresql-wal-receiver-main');
+ $machine->succeed('rm -r ${postgresqlDataDir}/{base,global,pg_*}');
+
+ # restore the base backup
+ $machine->succeed('cp -r ${baseBackupDir}/* ${postgresqlDataDir} && chown postgres:postgres -R ${postgresqlDataDir}');
+
+ # prepare WAL and recovery
+ $machine->succeed('chmod a+rX -R ${walBackupDir}');
+ $machine->execute('for part in ${walBackupDir}/*.partial; do mv $part ''${part%%.*}; done'); # make use of partial segments too
+ $machine->succeed('cp ${recoveryConf} ${postgresqlDataDir}/recovery.conf && chmod 666 ${postgresqlDataDir}/recovery.conf');
+
+ # replay WAL
+ $machine->systemctl('start postgresql');
+ $machine->waitForFile('${postgresqlDataDir}/recovery.done');
+ $machine->systemctl('restart postgresql');
+ $machine->waitForUnit('postgresql');
+
+ # check that our records have been restored
+ $machine->succeed('test $(sudo -u postgres psql --pset="pager=off" --tuples-only --command="select count(distinct val) from dummy;") -eq 100');
+ '';
+ };
+
+in mapAttrs makePostgresqlWalReceiverTest (import ../../pkgs/servers/sql/postgresql pkgs)
diff --git a/nixos/tests/pppd.nix b/nixos/tests/pppd.nix
new file mode 100644
index 000000000000..91f811859093
--- /dev/null
+++ b/nixos/tests/pppd.nix
@@ -0,0 +1,62 @@
+import ./make-test.nix (
+ let
+ chap-secrets = {
+ text = ''"flynn" * "reindeerflotilla" *'';
+ mode = "0640";
+ };
+ in {
+ nodes = {
+ server = {config, pkgs, ...}: {
+ config = {
+ # Run a PPPoE access concentrator server. It will spawn an
+ # appropriate PPP server process when a PPPoE client sets up a
+ # PPPoE session.
+ systemd.services.pppoe-server = {
+ restartTriggers = [
+ config.environment.etc."ppp/pppoe-server-options".source
+ config.environment.etc."ppp/chap-secrets".source
+ ];
+ after = ["network.target"];
+ serviceConfig = {
+ ExecStart = "${pkgs.rpPPPoE}/sbin/pppoe-server -F -O /etc/ppp/pppoe-server-options -q ${pkgs.ppp}/sbin/pppd -I eth1 -L 192.0.2.1 -R 192.0.2.2";
+ };
+ wantedBy = ["multi-user.target"];
+ };
+ environment.etc = {
+ "ppp/pppoe-server-options".text = ''
+ lcp-echo-interval 10
+ lcp-echo-failure 2
+ plugin rp-pppoe.so
+ require-chap
+ nobsdcomp
+ noccp
+ novj
+ '';
+ "ppp/chap-secrets" = chap-secrets;
+ };
+ };
+ };
+ client = {config, pkgs, ...}: {
+ services.pppd = {
+ enable = true;
+ peers.test = {
+ config = ''
+ plugin rp-pppoe.so eth1
+ name "flynn"
+ noipdefault
+ persist
+ noauth
+ debug
+ '';
+ };
+ };
+ environment.etc."ppp/chap-secrets" = chap-secrets;
+ };
+ };
+
+ testScript = ''
+ startAll;
+ $client->waitUntilSucceeds("ping -c1 -W1 192.0.2.1");
+ $server->waitUntilSucceeds("ping -c1 -W1 192.0.2.2");
+ '';
+ })
diff --git a/nixos/tests/predictable-interface-names.nix b/nixos/tests/predictable-interface-names.nix
index 85047f66f23c..194b4dafa772 100644
--- a/nixos/tests/predictable-interface-names.nix
+++ b/nixos/tests/predictable-interface-names.nix
@@ -16,6 +16,7 @@ in pkgs.lib.listToAttrs (pkgs.lib.crossLists (predictable: withNetworkd: {
networking.usePredictableInterfaceNames = lib.mkForce predictable;
networking.useNetworkd = withNetworkd;
networking.dhcpcd.enable = !withNetworkd;
+ networking.useDHCP = !withNetworkd;
};
testScript = ''
diff --git a/nixos/tests/printing.nix b/nixos/tests/printing.nix
index e8702c1ffbf1..4d0df289cf75 100644
--- a/nixos/tests/printing.nix
+++ b/nixos/tests/printing.nix
@@ -1,33 +1,53 @@
# Test printing via CUPS.
-import ./make-test.nix ({pkgs, ... }: {
+import ./make-test.nix ({pkgs, ... }:
+let
+ printingServer = startWhenNeeded: {
+ services.printing.enable = true;
+ services.printing.startWhenNeeded = startWhenNeeded;
+ services.printing.listenAddresses = [ "*:631" ];
+ services.printing.defaultShared = true;
+ services.printing.extraConf =
+ ''
+
+ Order allow,deny
+ Allow from all
+
+ '';
+ networking.firewall.allowedTCPPorts = [ 631 ];
+ # Add a HP Deskjet printer connected via USB to the server.
+ hardware.printers.ensurePrinters = [{
+ name = "DeskjetLocal";
+ deviceUri = "usb://foobar/printers/foobar";
+ model = "drv:///sample.drv/deskjet.ppd";
+ }];
+ };
+ printingClient = startWhenNeeded: {
+ services.printing.enable = true;
+ services.printing.startWhenNeeded = startWhenNeeded;
+ # Add printer to the client as well, via IPP.
+ hardware.printers.ensurePrinters = [{
+ name = "DeskjetRemote";
+ deviceUri = "ipp://${if startWhenNeeded then "socketActivatedServer" else "serviceServer"}/printers/DeskjetLocal";
+ model = "drv:///sample.drv/deskjet.ppd";
+ }];
+ hardware.printers.ensureDefaultPrinter = "DeskjetRemote";
+ };
+
+in
+
+{
name = "printing";
meta = with pkgs.stdenv.lib.maintainers; {
- maintainers = [ domenkozar eelco ];
+ maintainers = [ domenkozar eelco matthewbauer ];
};
nodes = {
+ socketActivatedServer = { ... }: (printingServer true);
+ serviceServer = { ... }: (printingServer false);
- server =
- { ... }:
- { services.printing.enable = true;
- services.printing.listenAddresses = [ "*:631" ];
- services.printing.defaultShared = true;
- services.printing.extraConf =
- ''
-
- Order allow,deny
- Allow from all
-
- '';
- networking.firewall.allowedTCPPorts = [ 631 ];
- };
-
- client =
- { ... }:
- { services.printing.enable = true;
- };
-
+ socketActivatedClient = { ... }: (printingClient true);
+ serviceClient = { ... }: (printingClient false);
};
testScript =
@@ -35,69 +55,60 @@ import ./make-test.nix ({pkgs, ... }: {
startAll;
# Make sure that cups is up on both sides.
- $server->waitForUnit("cups.service");
- $client->waitForUnit("cups.service");
- $client->sleep(10); # wait until cups is fully initialized
- $client->succeed("lpstat -r") =~ /scheduler is running/ or die;
- # check local encrypted connections work without error
- $client->succeed("lpstat -E -r") =~ /scheduler is running/ or die;
- # Test that UNIX socket is used for connections.
- $client->succeed("lpstat -H") =~ "/run/cups/cups.sock" or die;
- # Test that HTTP server is available too.
- $client->succeed("curl --fail http://localhost:631/");
- $client->succeed("curl --fail http://server:631/");
- $server->fail("curl --fail --connect-timeout 2 http://client:631/");
-
- # Add a HP Deskjet printer connected via USB to the server.
- $server->succeed("lpadmin -p DeskjetLocal -E -v usb://foobar/printers/foobar");
-
- # Add it to the client as well via IPP.
- $client->succeed("lpadmin -p DeskjetRemote -E -v ipp://server/printers/DeskjetLocal");
- $client->succeed("lpadmin -d DeskjetRemote");
-
- # Do some status checks.
- $client->succeed("lpstat -a") =~ /DeskjetRemote accepting requests/ or die;
- $client->succeed("lpstat -h server:631 -a") =~ /DeskjetLocal accepting requests/ or die;
- $client->succeed("cupsdisable DeskjetRemote");
- $client->succeed("lpq") =~ /DeskjetRemote is not ready.*no entries/s or die;
- $client->succeed("cupsenable DeskjetRemote");
- $client->succeed("lpq") =~ /DeskjetRemote is ready.*no entries/s or die;
-
- # Test printing various file types.
- foreach my $file ("${pkgs.groff.doc}/share/doc/*/examples/mom/penguin.pdf",
- "${pkgs.groff.doc}/share/doc/*/meref.ps",
- "${pkgs.cups.out}/share/doc/cups/images/cups.png",
- "${pkgs.pcre.doc}/share/doc/pcre/pcre.txt")
- {
- $file =~ /([^\/]*)$/; my $fn = $1;
-
- subtest "print $fn", sub {
-
- # Print the file on the client.
- $client->succeed("lp $file");
- $client->sleep(10);
- $client->succeed("lpq") =~ /active.*root.*$fn/ or die;
-
- # Ensure that a raw PCL file appeared in the server's queue
- # (showing that the right filters have been applied). Of
- # course, since there is no actual USB printer attached, the
- # file will stay in the queue forever.
- $server->waitForFile("/var/spool/cups/d*-001");
- $server->sleep(10);
- $server->succeed("lpq -a") =~ /$fn/ or die;
-
- # Delete the job on the client. It should disappear on the
- # server as well.
- $client->succeed("lprm");
- $client->sleep(10);
- $client->succeed("lpq -a") =~ /no entries/;
- Machine::retry sub {
- return 1 if $server->succeed("lpq -a") =~ /no entries/;
+ $serviceServer->waitForUnit("cups.service");
+ $serviceClient->waitForUnit("cups.service");
+ # wait until cups is fully initialized and ensure-printers has executed with 10s delay
+ $serviceClient->sleep(20);
+ $socketActivatedClient->waitUntilSucceeds("systemctl status ensure-printers | grep -q -E 'code=exited, status=0/SUCCESS'");
+ sub testPrinting {
+ my ($client, $server) = (@_);
+ my $clientHostname = $client->name();
+ my $serverHostname = $server->name();
+ $client->succeed("lpstat -r") =~ /scheduler is running/ or die;
+ # Test that UNIX socket is used for connections.
+ $client->succeed("lpstat -H") =~ "/var/run/cups/cups.sock" or die;
+ # Test that HTTP server is available too.
+ $client->succeed("curl --fail http://localhost:631/");
+ $client->succeed("curl --fail http://$serverHostname:631/");
+ $server->fail("curl --fail --connect-timeout 2 http://$clientHostname:631/");
+ # Do some status checks.
+ $client->succeed("lpstat -a") =~ /DeskjetRemote accepting requests/ or die;
+ $client->succeed("lpstat -h $serverHostname:631 -a") =~ /DeskjetLocal accepting requests/ or die;
+ $client->succeed("cupsdisable DeskjetRemote");
+ $client->succeed("lpq") =~ /DeskjetRemote is not ready.*no entries/s or die;
+ $client->succeed("cupsenable DeskjetRemote");
+ $client->succeed("lpq") =~ /DeskjetRemote is ready.*no entries/s or die;
+ # Test printing various file types.
+ foreach my $file ("${pkgs.groff.doc}/share/doc/*/examples/mom/penguin.pdf",
+ "${pkgs.groff.doc}/share/doc/*/meref.ps",
+ "${pkgs.cups.out}/share/doc/cups/images/cups.png",
+ "${pkgs.pcre.doc}/share/doc/pcre/pcre.txt")
+ {
+ $file =~ /([^\/]*)$/; my $fn = $1;
+ subtest "print $fn", sub {
+ # Print the file on the client.
+ $client->succeed("lp $file");
+ $client->waitUntilSucceeds("lpq | grep -q -E 'active.*root.*$fn'");
+ # Ensure that a raw PCL file appeared in the server's queue
+ # (showing that the right filters have been applied). Of
+ # course, since there is no actual USB printer attached, the
+ # file will stay in the queue forever.
+ $server->waitForFile("/var/spool/cups/d*-001");
+ $server->waitUntilSucceeds("lpq -a | grep -q -E '$fn'");
+ # Delete the job on the client. It should disappear on the
+ # server as well.
+ $client->succeed("lprm");
+ $client->waitUntilSucceeds("lpq -a | grep -q -E 'no entries'");
+ Machine::retry sub {
+ return 1 if $server->succeed("lpq -a") =~ /no entries/;
+ };
+ # The queue is empty already, so this should be safe.
+ # Otherwise, pairs of "c*"-"d*-001" files might persist.
+ $server->execute("rm /var/spool/cups/*");
};
- # The queue is empty already, so this should be safe.
- # Otherwise, pairs of "c*"-"d*-001" files might persist.
- $server->execute("rm /var/spool/cups/*");
- };
+ }
}
- '';
+ testPrinting($serviceClient, $serviceServer);
+ testPrinting($socketActivatedClient, $socketActivatedServer);
+ '';
})
diff --git a/nixos/tests/prometheus-2.nix b/nixos/tests/prometheus-2.nix
deleted file mode 100644
index 219c47c73d95..000000000000
--- a/nixos/tests/prometheus-2.nix
+++ /dev/null
@@ -1,239 +0,0 @@
-let
- grpcPort = 19090;
- queryPort = 9090;
- minioPort = 9000;
- pushgwPort = 9091;
-
- s3 = {
- accessKey = "BKIKJAA5BMMU2RHO6IBB";
- secretKey = "V7f1CwQqAcwo80UEIJEjc5gVQUSSx5ohQ9GSrr12";
- };
-
- objstore.config = {
- type = "S3";
- config = {
- bucket = "thanos-bucket";
- endpoint = "s3:${toString minioPort}";
- region = "us-east-1";
- access_key = s3.accessKey;
- secret_key = s3.secretKey;
- insecure = true;
- signature_version2 = false;
- encrypt_sse = false;
- put_user_metadata = {};
- http_config = {
- idle_conn_timeout = "0s";
- insecure_skip_verify = false;
- };
- trace = {
- enable = false;
- };
- };
- };
-
-in import ./make-test.nix {
- name = "prometheus-2";
-
- nodes = {
- prometheus = { pkgs, ... }: {
- virtualisation.diskSize = 2 * 1024;
- environment.systemPackages = [ pkgs.jq ];
- networking.firewall.allowedTCPPorts = [ grpcPort ];
- services.prometheus2 = {
- enable = true;
- scrapeConfigs = [
- {
- job_name = "prometheus";
- static_configs = [
- {
- targets = [ "127.0.0.1:${toString queryPort}" ];
- labels = { instance = "localhost"; };
- }
- ];
- }
- {
- job_name = "pushgateway";
- scrape_interval = "1s";
- static_configs = [
- {
- targets = [ "127.0.0.1:${toString pushgwPort}" ];
- }
- ];
- }
- ];
- rules = [
- ''
- groups:
- - name: test
- rules:
- - record: testrule
- expr: count(up{job="prometheus"})
- ''
- ];
- globalConfig = {
- external_labels = {
- some_label = "required by thanos";
- };
- };
- extraFlags = [
- # Required by thanos
- "--storage.tsdb.min-block-duration=5s"
- "--storage.tsdb.max-block-duration=5s"
- ];
- };
- services.prometheus.pushgateway = {
- enable = true;
- web.listen-address = ":${toString pushgwPort}";
- persistMetrics = true;
- persistence.interval = "1s";
- stateDir = "prometheus-pushgateway";
- };
- services.thanos = {
- sidecar = {
- enable = true;
- grpc-address = "0.0.0.0:${toString grpcPort}";
- inherit objstore;
- };
-
- # TODO: Add some tests for these services:
- #rule = {
- # enable = true;
- # http-address = "0.0.0.0:19194";
- # grpc-address = "0.0.0.0:19193";
- # query.addresses = [
- # "localhost:19191"
- # ];
- # labels = {
- # just = "some";
- # nice = "labels";
- # };
- #};
- #
- #receive = {
- # http-address = "0.0.0.0:19195";
- # enable = true;
- # labels = {
- # just = "some";
- # nice = "labels";
- # };
- #};
- };
- };
-
- query = { pkgs, ... }: {
- environment.systemPackages = [ pkgs.jq ];
- services.thanos.query = {
- enable = true;
- http-address = "0.0.0.0:${toString queryPort}";
- store.addresses = [
- "prometheus:${toString grpcPort}"
- ];
- };
- };
-
- store = { pkgs, ... }: {
- virtualisation.diskSize = 2 * 1024;
- environment.systemPackages = with pkgs; [ jq thanos ];
- services.thanos.store = {
- enable = true;
- http-address = "0.0.0.0:10902";
- grpc-address = "0.0.0.0:${toString grpcPort}";
- inherit objstore;
- sync-block-duration = "1s";
- };
- services.thanos.compact = {
- enable = true;
- http-address = "0.0.0.0:10903";
- inherit objstore;
- consistency-delay = "5s";
- };
- services.thanos.query = {
- enable = true;
- http-address = "0.0.0.0:${toString queryPort}";
- store.addresses = [
- "localhost:${toString grpcPort}"
- ];
- };
- };
-
- s3 = { pkgs, ... } : {
- # Minio requires at least 1GiB of free disk space to run.
- virtualisation.diskSize = 2 * 1024;
- networking.firewall.allowedTCPPorts = [ minioPort ];
-
- services.minio = {
- enable = true;
- inherit (s3) accessKey secretKey;
- };
-
- environment.systemPackages = [ pkgs.minio-client ];
- };
- };
-
- testScript = { nodes, ... } : ''
- # Before starting the other machines we first make sure that our S3 service is online
- # and has a bucket added for thanos:
- $s3->start;
- $s3->waitForUnit("minio.service");
- $s3->waitForOpenPort(${toString minioPort});
- $s3->succeed(
- "mc config host add minio " .
- "http://localhost:${toString minioPort} ${s3.accessKey} ${s3.secretKey} S3v4");
- $s3->succeed("mc mb minio/thanos-bucket");
-
- # Now that s3 has started we can start the other machines:
- $prometheus->start;
- $query->start;
- $store->start;
-
- # Check if prometheus responds to requests:
- $prometheus->waitForUnit("prometheus2.service");
- $prometheus->waitForOpenPort(${toString queryPort});
- $prometheus->succeed("curl -s http://127.0.0.1:${toString queryPort}/metrics");
-
- # Let's test if pushing a metric to the pushgateway succeeds:
- $prometheus->waitForUnit("pushgateway.service");
- $prometheus->succeed(
- "echo 'some_metric 3.14' | " .
- "curl --data-binary \@- http://127.0.0.1:${toString pushgwPort}/metrics/job/some_job");
-
- # Now check whether that metric gets ingested by prometheus.
- # Since we'll check for the metric several times on different machines
- # we abstract the test using the following function:
-
- # Function to check if the metric "some_metric" has been received and returns the correct value.
- local *Machine::waitForMetric = sub {
- my ($self) = @_;
- $self->waitUntilSucceeds(
- "curl -sf 'http://127.0.0.1:${toString queryPort}/api/v1/query?query=some_metric' " .
- "| jq '.data.result[0].value[1]' | grep '\"3.14\"'");
- };
-
- $prometheus->waitForMetric;
-
- # Let's test if the pushgateway persists metrics to the configured location.
- $prometheus->waitUntilSucceeds("test -e /var/lib/prometheus-pushgateway/metrics");
-
- # Test thanos
- $prometheus->waitForUnit("thanos-sidecar.service");
-
- # Test if the Thanos query service can correctly retrieve the metric that was send above.
- $query->waitForUnit("thanos-query.service");
- $query->waitForMetric;
-
- # Test if the Thanos sidecar has correctly uploaded its TSDB to S3, if the
- # Thanos storage service has correctly downloaded it from S3 and if the Thanos
- # query service running on $store can correctly retrieve the metric:
- $store->waitForUnit("thanos-store.service");
- $store->waitForMetric;
-
- $store->waitForUnit("thanos-compact.service");
-
- # Test if the Thanos bucket command is able to retrieve blocks from the S3 bucket
- # and check if the blocks have the correct labels:
- $store->succeed(
- "thanos bucket ls" .
- " --objstore.config-file=${nodes.store.config.services.thanos.store.objstore.config-file}" .
- " --output=json | jq .thanos.labels.some_label | grep 'required by thanos'");
- '';
-}
diff --git a/nixos/tests/prometheus-exporters.nix b/nixos/tests/prometheus-exporters.nix
index 02d83f82f338..676183f6356f 100644
--- a/nixos/tests/prometheus-exporters.nix
+++ b/nixos/tests/prometheus-exporters.nix
@@ -229,6 +229,40 @@ let
'';
};
+ nextcloud = {
+ exporterConfig = {
+ enable = true;
+ passwordFile = "/var/nextcloud-pwfile";
+ url = "http://localhost/negative-space.xml";
+ };
+ metricProvider = {
+ systemd.services.nc-pwfile = let
+ passfile = (pkgs.writeText "pwfile" "snakeoilpw");
+ in {
+ requiredBy = [ "prometheus-nextcloud-exporter.service" ];
+ before = [ "prometheus-nextcloud-exporter.service" ];
+ serviceConfig.ExecStart = ''
+ ${pkgs.coreutils}/bin/install -o nextcloud-exporter -m 0400 ${passfile} /var/nextcloud-pwfile
+ '';
+ };
+ services.nginx = {
+ enable = true;
+ virtualHosts."localhost" = {
+ basicAuth.nextcloud-exporter = "snakeoilpw";
+ locations."/" = {
+ root = "${pkgs.prometheus-nextcloud-exporter.src}/serverinfo/testdata";
+ };
+ };
+ };
+ };
+ exporterTest = ''
+ waitForUnit("nginx.service")
+ waitForUnit("prometheus-nextcloud-exporter.service")
+ waitForOpenPort(9205)
+ succeed("curl -sSf http://localhost:9205/metrics | grep -q 'nextcloud_up 1'")
+ '';
+ };
+
nginx = {
exporterConfig = {
enable = true;
@@ -297,6 +331,22 @@ let
'';
};
+ rspamd = {
+ exporterConfig = {
+ enable = true;
+ };
+ metricProvider = {
+ services.rspamd.enable = true;
+ };
+ exporterTest = ''
+ waitForUnit("rspamd.service");
+ waitForUnit("prometheus-rspamd-exporter.service");
+ waitForOpenPort(11334);
+ waitForOpenPort(7980);
+ waitUntilSucceeds("curl -sSf localhost:7980/metrics | grep -q 'rspamd_scanned{host=\"rspamd\"} 0'");
+ '';
+ };
+
snmp = {
exporterConfig = {
enable = true;
diff --git a/nixos/tests/prometheus.nix b/nixos/tests/prometheus.nix
index f1b20a33d71e..52f61046be39 100644
--- a/nixos/tests/prometheus.nix
+++ b/nixos/tests/prometheus.nix
@@ -1,48 +1,239 @@
-import ./make-test.nix {
- name = "prometheus";
+let
+ grpcPort = 19090;
+ queryPort = 9090;
+ minioPort = 9000;
+ pushgwPort = 9091;
- nodes = {
- one = { ... }: {
- services.prometheus = {
- enable = true;
- scrapeConfigs = [{
- job_name = "prometheus";
- static_configs = [{
- targets = [ "127.0.0.1:9090" ];
- labels = { instance = "localhost"; };
- }];
- }];
- rules = [ ''testrule = count(up{job="prometheus"})'' ];
+ s3 = {
+ accessKey = "BKIKJAA5BMMU2RHO6IBB";
+ secretKey = "V7f1CwQqAcwo80UEIJEjc5gVQUSSx5ohQ9GSrr12";
+ };
- # a very simple version of the alertmanager configuration just to see if
- # configuration checks & service startup are working
- alertmanager = {
- enable = true;
- listenAddress = "[::1]";
- port = 9093;
- configuration = {
- route.receiver = "webhook";
- receivers = [
- {
- name = "webhook";
- webhook_configs = [
- { url = "http://localhost"; }
- ];
- }
- ];
- };
- };
+ objstore.config = {
+ type = "S3";
+ config = {
+ bucket = "thanos-bucket";
+ endpoint = "s3:${toString minioPort}";
+ region = "us-east-1";
+ access_key = s3.accessKey;
+ secret_key = s3.secretKey;
+ insecure = true;
+ signature_version2 = false;
+ encrypt_sse = false;
+ put_user_metadata = {};
+ http_config = {
+ idle_conn_timeout = "0s";
+ insecure_skip_verify = false;
+ };
+ trace = {
+ enable = false;
};
};
};
- testScript = ''
- startAll;
- $one->waitForUnit("prometheus.service");
- $one->waitForOpenPort(9090);
- $one->succeed("curl -s http://127.0.0.1:9090/metrics");
- $one->waitForUnit("alertmanager.service");
- $one->waitForOpenPort("9093");
- $one->succeed("curl -f -s http://localhost:9093/");
+in import ./make-test.nix {
+ name = "prometheus";
+
+ nodes = {
+ prometheus = { pkgs, ... }: {
+ virtualisation.diskSize = 2 * 1024;
+ environment.systemPackages = [ pkgs.jq ];
+ networking.firewall.allowedTCPPorts = [ grpcPort ];
+ services.prometheus = {
+ enable = true;
+ scrapeConfigs = [
+ {
+ job_name = "prometheus";
+ static_configs = [
+ {
+ targets = [ "127.0.0.1:${toString queryPort}" ];
+ labels = { instance = "localhost"; };
+ }
+ ];
+ }
+ {
+ job_name = "pushgateway";
+ scrape_interval = "1s";
+ static_configs = [
+ {
+ targets = [ "127.0.0.1:${toString pushgwPort}" ];
+ }
+ ];
+ }
+ ];
+ rules = [
+ ''
+ groups:
+ - name: test
+ rules:
+ - record: testrule
+ expr: count(up{job="prometheus"})
+ ''
+ ];
+ globalConfig = {
+ external_labels = {
+ some_label = "required by thanos";
+ };
+ };
+ extraFlags = [
+ # Required by thanos
+ "--storage.tsdb.min-block-duration=5s"
+ "--storage.tsdb.max-block-duration=5s"
+ ];
+ };
+ services.prometheus.pushgateway = {
+ enable = true;
+ web.listen-address = ":${toString pushgwPort}";
+ persistMetrics = true;
+ persistence.interval = "1s";
+ stateDir = "prometheus-pushgateway";
+ };
+ services.thanos = {
+ sidecar = {
+ enable = true;
+ grpc-address = "0.0.0.0:${toString grpcPort}";
+ inherit objstore;
+ };
+
+ # TODO: Add some tests for these services:
+ #rule = {
+ # enable = true;
+ # http-address = "0.0.0.0:19194";
+ # grpc-address = "0.0.0.0:19193";
+ # query.addresses = [
+ # "localhost:19191"
+ # ];
+ # labels = {
+ # just = "some";
+ # nice = "labels";
+ # };
+ #};
+ #
+ #receive = {
+ # http-address = "0.0.0.0:19195";
+ # enable = true;
+ # labels = {
+ # just = "some";
+ # nice = "labels";
+ # };
+ #};
+ };
+ };
+
+ query = { pkgs, ... }: {
+ environment.systemPackages = [ pkgs.jq ];
+ services.thanos.query = {
+ enable = true;
+ http-address = "0.0.0.0:${toString queryPort}";
+ store.addresses = [
+ "prometheus:${toString grpcPort}"
+ ];
+ };
+ };
+
+ store = { pkgs, ... }: {
+ virtualisation.diskSize = 2 * 1024;
+ environment.systemPackages = with pkgs; [ jq thanos ];
+ services.thanos.store = {
+ enable = true;
+ http-address = "0.0.0.0:10902";
+ grpc-address = "0.0.0.0:${toString grpcPort}";
+ inherit objstore;
+ sync-block-duration = "1s";
+ };
+ services.thanos.compact = {
+ enable = true;
+ http-address = "0.0.0.0:10903";
+ inherit objstore;
+ consistency-delay = "5s";
+ };
+ services.thanos.query = {
+ enable = true;
+ http-address = "0.0.0.0:${toString queryPort}";
+ store.addresses = [
+ "localhost:${toString grpcPort}"
+ ];
+ };
+ };
+
+ s3 = { pkgs, ... } : {
+ # Minio requires at least 1GiB of free disk space to run.
+ virtualisation.diskSize = 2 * 1024;
+ networking.firewall.allowedTCPPorts = [ minioPort ];
+
+ services.minio = {
+ enable = true;
+ inherit (s3) accessKey secretKey;
+ };
+
+ environment.systemPackages = [ pkgs.minio-client ];
+ };
+ };
+
+ testScript = { nodes, ... } : ''
+ # Before starting the other machines we first make sure that our S3 service is online
+ # and has a bucket added for thanos:
+ $s3->start;
+ $s3->waitForUnit("minio.service");
+ $s3->waitForOpenPort(${toString minioPort});
+ $s3->succeed(
+ "mc config host add minio " .
+ "http://localhost:${toString minioPort} ${s3.accessKey} ${s3.secretKey} S3v4");
+ $s3->succeed("mc mb minio/thanos-bucket");
+
+ # Now that s3 has started we can start the other machines:
+ $prometheus->start;
+ $query->start;
+ $store->start;
+
+ # Check if prometheus responds to requests:
+ $prometheus->waitForUnit("prometheus.service");
+ $prometheus->waitForOpenPort(${toString queryPort});
+ $prometheus->succeed("curl -s http://127.0.0.1:${toString queryPort}/metrics");
+
+ # Let's test if pushing a metric to the pushgateway succeeds:
+ $prometheus->waitForUnit("pushgateway.service");
+ $prometheus->succeed(
+ "echo 'some_metric 3.14' | " .
+ "curl --data-binary \@- http://127.0.0.1:${toString pushgwPort}/metrics/job/some_job");
+
+ # Now check whether that metric gets ingested by prometheus.
+ # Since we'll check for the metric several times on different machines
+ # we abstract the test using the following function:
+
+ # Function to check if the metric "some_metric" has been received and returns the correct value.
+ local *Machine::waitForMetric = sub {
+ my ($self) = @_;
+ $self->waitUntilSucceeds(
+ "curl -sf 'http://127.0.0.1:${toString queryPort}/api/v1/query?query=some_metric' " .
+ "| jq '.data.result[0].value[1]' | grep '\"3.14\"'");
+ };
+
+ $prometheus->waitForMetric;
+
+ # Let's test if the pushgateway persists metrics to the configured location.
+ $prometheus->waitUntilSucceeds("test -e /var/lib/prometheus-pushgateway/metrics");
+
+ # Test thanos
+ $prometheus->waitForUnit("thanos-sidecar.service");
+
+ # Test if the Thanos query service can correctly retrieve the metric that was send above.
+ $query->waitForUnit("thanos-query.service");
+ $query->waitForMetric;
+
+ # Test if the Thanos sidecar has correctly uploaded its TSDB to S3, if the
+ # Thanos storage service has correctly downloaded it from S3 and if the Thanos
+ # query service running on $store can correctly retrieve the metric:
+ $store->waitForUnit("thanos-store.service");
+ $store->waitForMetric;
+
+ $store->waitForUnit("thanos-compact.service");
+
+ # Test if the Thanos bucket command is able to retrieve blocks from the S3 bucket
+ # and check if the blocks have the correct labels:
+ $store->succeed(
+ "thanos bucket ls" .
+ " --objstore.config-file=${nodes.store.config.services.thanos.store.objstore.config-file}" .
+ " --output=json | jq .thanos.labels.some_label | grep 'required by thanos'");
'';
}
diff --git a/nixos/tests/prosody.nix b/nixos/tests/prosody.nix
deleted file mode 100644
index a39bae7898dc..000000000000
--- a/nixos/tests/prosody.nix
+++ /dev/null
@@ -1,38 +0,0 @@
-import ./make-test.nix {
- name = "prosody";
-
- machine = { pkgs, ... }: {
- services.prosody = {
- enable = true;
- # TODO: use a self-signed certificate
- c2sRequireEncryption = false;
- extraConfig = ''
- storage = "sql"
- '';
- virtualHosts.test = {
- domain = "example.com";
- enabled = true;
- };
- };
- environment.systemPackages = [
- (pkgs.callPackage ./xmpp-sendmessage.nix {})
- ];
- };
-
- testScript = ''
- $machine->waitForUnit('prosody.service');
- $machine->succeed('prosodyctl status') =~ /Prosody is running/;
-
- # set password to 'nothunter2' (it's asked twice)
- $machine->succeed('yes nothunter2 | prosodyctl adduser cthon98@example.com');
- # set password to 'y'
- $machine->succeed('yes | prosodyctl adduser azurediamond@example.com');
- # correct password to 'hunter2'
- $machine->succeed('yes hunter2 | prosodyctl passwd azurediamond@example.com');
-
- $machine->succeed("send-message");
-
- $machine->succeed('prosodyctl deluser cthon98@example.com');
- $machine->succeed('prosodyctl deluser azurediamond@example.com');
- '';
-}
diff --git a/nixos/tests/quake3.nix b/nixos/tests/quake3.nix
index fbb798515e1a..4253ce4a8672 100644
--- a/nixos/tests/quake3.nix
+++ b/nixos/tests/quake3.nix
@@ -4,7 +4,7 @@ let
# Build Quake with coverage instrumentation.
overrides = pkgs:
- rec {
+ {
quake3game = pkgs.quake3game.override (args: {
stdenv = pkgs.stdenvAdapters.addCoverageInstrumentation args.stdenv;
});
@@ -12,9 +12,9 @@ let
# Only allow the demo data to be used (only if it's unfreeRedistributable).
unfreePredicate = pkg: with pkgs.lib; let
- allowDrvPredicates = [ "quake3-demo" "quake3-pointrelease" ];
+ allowPackageNames = [ "quake3-demodata" "quake3-pointrelease" ];
allowLicenses = [ pkgs.lib.licenses.unfreeRedistributable ];
- in any (flip hasPrefix pkg.name) allowDrvPredicates &&
+ in elem pkg.pname allowPackageNames &&
elem (pkg.meta.license or null) allowLicenses;
in
@@ -42,7 +42,7 @@ rec {
{ server =
{ pkgs, ... }:
- { systemd.services."quake3-server" =
+ { systemd.services.quake3-server =
{ wantedBy = [ "multi-user.target" ];
script =
"${pkgs.quake3demo}/bin/quake3-server +set g_gametype 0 " +
diff --git a/nixos/tests/radarr.nix b/nixos/tests/radarr.nix
index 6b9a909e44b5..9bc5607ccd5a 100644
--- a/nixos/tests/radarr.nix
+++ b/nixos/tests/radarr.nix
@@ -2,7 +2,7 @@ import ./make-test.nix ({ lib, ... }:
with lib;
-rec {
+{
name = "radarr";
meta.maintainers = with maintainers; [ etu ];
diff --git a/nixos/tests/redis.nix b/nixos/tests/redis.nix
new file mode 100644
index 000000000000..325d93424dd7
--- /dev/null
+++ b/nixos/tests/redis.nix
@@ -0,0 +1,26 @@
+import ./make-test.nix ({ pkgs, ...} : {
+ name = "redis";
+ meta = with pkgs.stdenv.lib.maintainers; {
+ maintainers = [ flokli ];
+ };
+
+ nodes = {
+ machine =
+ { pkgs, ... }:
+
+ {
+ services.redis.enable = true;
+ services.redis.unixSocket = "/run/redis/redis.sock";
+ };
+ };
+
+ testScript = ''
+ startAll;
+
+ $machine->waitForUnit("redis");
+ $machine->waitForOpenPort("6379");
+
+ $machine->succeed("redis-cli ping | grep PONG");
+ $machine->succeed("redis-cli -s /run/redis/redis.sock ping | grep PONG");
+ '';
+})
diff --git a/nixos/tests/shiori.nix b/nixos/tests/shiori.nix
new file mode 100644
index 000000000000..0022a7220fe2
--- /dev/null
+++ b/nixos/tests/shiori.nix
@@ -0,0 +1,17 @@
+import ./make-test.nix ({ lib, ...}:
+
+{
+ name = "shiori";
+ meta.maintainers = with lib.maintainers; [ minijackson ];
+
+ machine =
+ { ... }:
+ { services.shiori.enable = true; };
+
+ testScript = ''
+ $machine->waitForUnit('shiori.service');
+ $machine->waitForOpenPort('8080');
+ $machine->succeed("curl --fail http://localhost:8080/");
+ $machine->succeed("curl --fail --location http://localhost:8080/ | grep -qi shiori");
+ '';
+})
diff --git a/nixos/tests/sonarr.nix b/nixos/tests/sonarr.nix
index 3d5c3b19b6ea..3e84445099ab 100644
--- a/nixos/tests/sonarr.nix
+++ b/nixos/tests/sonarr.nix
@@ -2,7 +2,7 @@ import ./make-test.nix ({ lib, ... }:
with lib;
-rec {
+{
name = "sonarr";
meta.maintainers = with maintainers; [ etu ];
diff --git a/nixos/tests/strongswan-swanctl.nix b/nixos/tests/strongswan-swanctl.nix
index 8bbebd423003..9bab9349ea73 100644
--- a/nixos/tests/strongswan-swanctl.nix
+++ b/nixos/tests/strongswan-swanctl.nix
@@ -65,16 +65,16 @@ in {
enable = true;
swanctl = {
connections = {
- "rw" = {
+ rw = {
local_addrs = [ moonIp ];
- local."main" = {
+ local.main = {
auth = "psk";
};
- remote."main" = {
+ remote.main = {
auth = "psk";
};
children = {
- "net" = {
+ net = {
local_ts = [ vlan0 ];
updown = "${strongswan}/libexec/ipsec/_updown iptables";
inherit esp_proposals;
@@ -85,8 +85,8 @@ in {
};
};
secrets = {
- ike."carol" = {
- id."main" = carolIp;
+ ike.carol = {
+ id.main = carolIp;
inherit secret;
};
};
@@ -107,19 +107,19 @@ in {
enable = true;
swanctl = {
connections = {
- "home" = {
+ home = {
local_addrs = [ carolIp ];
remote_addrs = [ moonIp ];
- local."main" = {
+ local.main = {
auth = "psk";
id = carolIp;
};
- remote."main" = {
+ remote.main = {
auth = "psk";
id = moonIp;
};
children = {
- "home" = {
+ home = {
remote_ts = [ vlan0 ];
start_action = "trap";
updown = "${strongswan}/libexec/ipsec/_updown iptables";
@@ -131,8 +131,8 @@ in {
};
};
secrets = {
- ike."moon" = {
- id."main" = moonIp;
+ ike.moon = {
+ id.main = moonIp;
inherit secret;
};
};
diff --git a/nixos/tests/subversion.nix b/nixos/tests/subversion.nix
deleted file mode 100644
index e7b99b10602a..000000000000
--- a/nixos/tests/subversion.nix
+++ /dev/null
@@ -1,121 +0,0 @@
-import ./make-test.nix ({ pkgs, ...} :
-
-let
-
- # Build some packages with coverage instrumentation.
- overrides = pkgs:
- with pkgs.stdenvAdapters;
- let
- do = pkg: pkg.override (args: {
- stdenv = addCoverageInstrumentation args.stdenv;
- });
- in
- rec {
- apr = do pkgs.apr;
- aprutil = do pkgs.aprutil;
- apacheHttpd = do pkgs.apacheHttpd;
- mod_python = do pkgs.mod_python;
- subversion = do pkgs.subversion;
-
- # To build the kernel with coverage instrumentation, we need a
- # special patch to make coverage data available under /proc.
- linux = pkgs.linux.override (orig: {
- stdenv = overrideInStdenv pkgs.stdenv [ pkgs.keepBuildTree ];
- extraConfig =
- ''
- GCOV_KERNEL y
- GCOV_PROFILE_ALL y
- '';
- });
- };
-
-in
-
-{
- name = "subversion";
- meta = with pkgs.stdenv.lib.maintainers; {
- maintainers = [ eelco ];
- };
-
- nodes =
- { webserver =
- { ... }:
-
- {
- services.httpd.enable = true;
- services.httpd.adminAddr = "e.dolstra@tudelft.nl";
- services.httpd.extraSubservices =
- [ { function = import ;
- urlPrefix = "";
- dataDir = "/data/subversion";
- userCreationDomain = "192.168.0.0/16";
- }
- ];
- nixpkgs.config.packageOverrides = overrides;
- };
-
- client =
- { pkgs, ... }:
-
- {
- environment.systemPackages = [ pkgs.subversion ];
- nixpkgs.config.packageOverrides = overrides;
- };
-
- };
-
- testScript =
- ''
- startAll;
-
- $webserver->waitForOpenPort(80);
-
- print STDERR $client->succeed("svn --version");
-
- print STDERR $client->succeed("curl --fail http://webserver/");
-
- # Create a new user through the web interface.
- $client->succeed("curl --fail -F username=alice -F fullname='Alice Lastname' -F address=alice\@example.org -F password=foobar -F password_again=foobar http://webserver/repoman/adduser");
-
- # Let Alice create a new repository.
- $client->succeed("curl --fail -u alice:foobar --form repo=xyzzy --form description=Xyzzy http://webserver/repoman/create");
-
- $client->succeed("curl --fail http://webserver/") =~ /alice/ or die;
-
- # Let Alice do a checkout.
- my $svnFlags = "--non-interactive --username alice --password foobar";
- $client->succeed("svn co $svnFlags http://webserver/repos/xyzzy wc");
- $client->succeed("echo hello > wc/world");
- $client->succeed("svn add wc/world");
- $client->succeed("svn ci $svnFlags -m 'Added world.' wc/world");
-
- # Create a new user on the server through the create-user.pl script.
- $webserver->execute("svn-server-create-user.pl bob bob\@example.org Bob");
- $webserver->succeed("svn-server-resetpw.pl bob fnord");
- $client->succeed("curl --fail http://webserver/") =~ /bob/ or die;
-
- # Bob should not have access to the repo.
- my $svnFlagsBob = "--non-interactive --username bob --password fnord";
- $client->fail("svn co $svnFlagsBob http://webserver/repos/xyzzy wc2");
-
- # Bob should not be able change the ACLs of the repo.
- # !!! Repoman should really return a 403 here.
- $client->succeed("curl --fail -u bob:fnord -F description=Xyzzy -F readers=alice,bob -F writers=alice -F watchers= -F tardirs= http://webserver/repoman/update/xyzzy")
- =~ /not authorised/ or die;
-
- # Give Bob access.
- $client->succeed("curl --fail -u alice:foobar -F description=Xyzzy -F readers=alice,bob -F writers=alice -F watchers= -F tardirs= http://webserver/repoman/update/xyzzy");
-
- # So now his checkout should succeed.
- $client->succeed("svn co $svnFlagsBob http://webserver/repos/xyzzy wc2");
-
- # Test ViewVC and WebSVN
- $client->succeed("curl --fail -u alice:foobar http://webserver/viewvc/xyzzy");
- $client->succeed("curl --fail -u alice:foobar http://webserver/websvn/xyzzy");
- $client->succeed("curl --fail -u alice:foobar http://webserver/repos-xml/xyzzy");
-
- # Stop Apache to gather all the coverage data.
- $webserver->stopJob("httpd");
- '';
-
-})
diff --git a/nixos/tests/syncthing-init.nix b/nixos/tests/syncthing-init.nix
index 811a466ff941..0de76b688bdc 100644
--- a/nixos/tests/syncthing-init.nix
+++ b/nixos/tests/syncthing-init.nix
@@ -22,9 +22,13 @@ in {
};
testScript = ''
+ my $config;
+
$machine->waitForUnit("syncthing-init.service");
- $machine->succeed("cat /var/lib/syncthing/config.xml") =~ /${testId}/ or die;
- $machine->succeed("cat /var/lib/syncthing/config.xml") =~ /testFolder/ or die;
+ $config = $machine->succeed("cat /var/lib/syncthing/.config/syncthing/config.xml");
+
+ $config =~ /${testId}/ or die;
+ $config =~ /testFolder/ or die;
'';
})
diff --git a/nixos/tests/systemd-networkd-wireguard.nix b/nixos/tests/systemd-networkd-wireguard.nix
new file mode 100644
index 000000000000..aa0ac54e7969
--- /dev/null
+++ b/nixos/tests/systemd-networkd-wireguard.nix
@@ -0,0 +1,81 @@
+let generateNodeConf = { lib, pkgs, config, privkpath, pubk, peerId, nodeId, ...}: {
+ imports = [ common/user-account.nix ];
+ systemd.services.systemd-networkd.environment.SYSTEMD_LOG_LEVEL = "debug";
+ networking.useNetworkd = true;
+ networking.useDHCP = false;
+ networking.firewall.enable = false;
+ virtualisation.vlans = [ 1 ];
+ environment.systemPackages = with pkgs; [ wireguard-tools ];
+ boot.extraModulePackages = [ config.boot.kernelPackages.wireguard ];
+ systemd.network = {
+ enable = true;
+ netdevs = {
+ "90-wg0" = {
+ netdevConfig = { Kind = "wireguard"; Name = "wg0"; };
+ wireguardConfig = {
+ PrivateKeyFile = privkpath ;
+ ListenPort = 51820;
+ FwMark = 42;
+ };
+ wireguardPeers = [ {wireguardPeerConfig={
+ Endpoint = "192.168.1.${peerId}:51820";
+ PublicKey = pubk;
+ PresharedKeyFile = pkgs.writeText "psk.key" "yTL3sCOL33Wzi6yCnf9uZQl/Z8laSE+zwpqOHC4HhFU=";
+ AllowedIPs = [ "10.0.0.${peerId}/32" ];
+ PersistentKeepalive = 15;
+ };}];
+ };
+ };
+ networks = {
+ "99-nope" = {
+ matchConfig.Name = "eth*";
+ linkConfig.Unmanaged = true;
+ };
+ "90-wg0" = {
+ matchConfig = { Name = "wg0"; };
+ address = [ "10.0.0.${nodeId}/32" ];
+ routes = [
+ { routeConfig = { Gateway = "10.0.0.${nodeId}"; Destination = "10.0.0.0/24"; }; }
+ ];
+ };
+ "90-eth1" = {
+ matchConfig = { Name = "eth1"; };
+ address = [ "192.168.1.${nodeId}/24" ];
+ };
+ };
+ };
+ };
+in import ./make-test.nix ({pkgs, ... }: {
+ name = "networkd-wireguard";
+ meta = with pkgs.stdenv.lib.maintainers; {
+ maintainers = [ ninjatrappeur ];
+ };
+ nodes = {
+ node1 = { pkgs, ... }@attrs:
+ let localConf = {
+ privkpath = pkgs.writeText "priv.key" "GDiXWlMQKb379XthwX0haAbK6hTdjblllpjGX0heP00=";
+ pubk = "iRxpqj42nnY0Qz8MAQbSm7bXxXP5hkPqWYIULmvW+EE=";
+ nodeId = "1";
+ peerId = "2";
+ };
+ in generateNodeConf (attrs // localConf);
+
+ node2 = { pkgs, ... }@attrs:
+ let localConf = {
+ privkpath = pkgs.writeText "priv.key" "eHxSI2jwX/P4AOI0r8YppPw0+4NZnjOxfbS5mt06K2k=";
+ pubk = "27s0OvaBBdHoJYkH9osZpjpgSOVNw+RaKfboT/Sfq0g=";
+ nodeId = "2";
+ peerId = "1";
+ };
+ in generateNodeConf (attrs // localConf);
+ };
+testScript = ''
+ startAll;
+ $node1->waitForUnit('systemd-networkd-wait-online.service');
+ $node2->waitForUnit('systemd-networkd-wait-online.service');
+ $node1->succeed('ping -c 5 10.0.0.2');
+ $node2->succeed('ping -c 5 10.0.0.1');
+ # Is the fwmark set?
+ $node2->succeed('wg | grep -q 42');
+'';
+})
diff --git a/nixos/tests/systemd.nix b/nixos/tests/systemd.nix
index 4d470126abee..4b71b4d67597 100644
--- a/nixos/tests/systemd.nix
+++ b/nixos/tests/systemd.nix
@@ -1,4 +1,4 @@
-import ./make-test.nix {
+import ./make-test.nix ({ pkgs, ... }: {
name = "systemd";
machine = { lib, ... }: {
@@ -21,6 +21,14 @@ import ./make-test.nix {
services.journald.extraConfig = "Storage=volatile";
services.xserver.displayManager.auto.user = "alice";
+ systemd.shutdown.test = pkgs.writeScript "test.shutdown" ''
+ #!${pkgs.stdenv.shell}
+ PATH=${lib.makeBinPath (with pkgs; [ utillinux coreutils ])}
+ mount -t 9p shared -o trans=virtio,version=9p2000.L /tmp/shared
+ touch /tmp/shared/shutdown-test
+ umount /tmp/shared
+ '';
+
systemd.services.testservice1 = {
description = "Test Service 1";
wantedBy = [ "multi-user.target" ];
@@ -63,11 +71,32 @@ import ./make-test.nix {
# Regression test for https://github.com/NixOS/nixpkgs/issues/35268
subtest "file system with x-initrd.mount is not unmounted", sub {
+ $machine->succeed('mountpoint -q /test-x-initrd-mount');
+ $machine->shutdown;
+ system('qemu-img', 'convert', '-O', 'raw',
+ 'vm-state-machine/empty2.qcow2', 'x-initrd-mount.raw');
+ my $extinfo = `${pkgs.e2fsprogs}/bin/dumpe2fs x-initrd-mount.raw`;
+ die "File system was not cleanly unmounted: $extinfo"
+ unless $extinfo =~ /^Filesystem state: *clean$/m;
+ };
+
+ subtest "systemd-shutdown works", sub {
$machine->shutdown;
$machine->waitForUnit('multi-user.target');
- # If the file system was unmounted during the shutdown the file system
- # has a last mount time, because the file system wasn't checked.
- $machine->fail('dumpe2fs /dev/vdb | grep -q "^Last mount time: *n/a"');
+ $machine->succeed('test -e /tmp/shared/shutdown-test');
};
+
+ # Test settings from /etc/sysctl.d/50-default.conf are applied
+ subtest "systemd sysctl settings are applied", sub {
+ $machine->waitForUnit('multi-user.target');
+ $machine->succeed('sysctl net.core.default_qdisc | grep -q "fq_codel"');
+ };
+
+ # Test cgroup accounting is enabled
+ subtest "systemd cgroup accounting is enabled", sub {
+ $machine->waitForUnit('multi-user.target');
+ $machine->succeed('systemctl show testservice1.service -p IOAccounting | grep -q "yes"');
+ $machine->succeed('systemctl status testservice1.service | grep -q "CPU:"');
+ };
'';
-}
+})
diff --git a/nixos/tests/trezord.nix b/nixos/tests/trezord.nix
new file mode 100644
index 000000000000..1c85bf539345
--- /dev/null
+++ b/nixos/tests/trezord.nix
@@ -0,0 +1,20 @@
+import ./make-test.nix ({ pkgs, ... }: {
+ name = "trezord";
+ meta = with pkgs.stdenv.lib.maintainers; {
+ maintainers = [ mmahut ];
+ };
+
+ nodes = {
+ machine = { ... }: {
+ services.trezord.enable = true;
+ services.trezord.emulator.enable = true;
+ };
+ };
+
+ testScript = ''
+ startAll;
+ $machine->waitForUnit("trezord.service");
+ $machine->waitForOpenPort(21325);
+ $machine->waitUntilSucceeds("curl -L http://localhost:21325/status/ | grep Version");
+ '';
+})
diff --git a/nixos/tests/virtualbox.nix b/nixos/tests/virtualbox.nix
index 844ce47d743f..32637d2c1efe 100644
--- a/nixos/tests/virtualbox.nix
+++ b/nixos/tests/virtualbox.nix
@@ -10,17 +10,10 @@
# to run 32-bit guests.
useKvmNestedVirt ? false,
# Whether to run 64-bit guests instead of 32-bit. Requires nested KVM.
- use64bitGuest ? false,
- # Whether to enable the virtual UART in VirtualBox guests, allowing to see
- # the guest console. There is currently a bug in VirtualBox where this will
- # cause a crash if running with SW virtualization
- # (https://www.virtualbox.org/ticket/18632). If you need to debug the tests
- # then enable this and nested KVM to work around the crash (see above).
- enableVBoxUART ? false
+ use64bitGuest ? false
}:
assert use64bitGuest -> useKvmNestedVirt;
-assert enableVBoxUART -> useKvmNestedVirt; # VirtualBox bug, see above
with import ../lib/testing.nix { inherit system pkgs; };
with pkgs.lib;
@@ -65,9 +58,6 @@ let
"init=${pkgs.writeScript "mini-init.sh" miniInit}"
];
- # XXX: Remove this once TSS location detection has been fixed in VirtualBox
- boot.kernelPackages = pkgs.linuxPackages_4_9;
-
fileSystems."/" = {
device = "vboxshare";
fsType = "vboxsf";
@@ -162,11 +152,9 @@ let
"--register"
];
- vmFlags = mkFlags (
- (optionals enableVBoxUART [
- "--uart1 0x3F8 4"
- "--uartmode1 client /run/virtualbox-log-${name}.sock"
- ]) ++ [
+ vmFlags = mkFlags ([
+ "--uart1 0x3F8 4"
+ "--uartmode1 client /run/virtualbox-log-${name}.sock"
"--memory 768"
"--audio none"
] ++ (attrs.vmFlags or []));
@@ -199,7 +187,7 @@ let
];
in {
machine = {
- systemd.sockets."vboxtestlog-${name}" = mkIf enableVBoxUART {
+ systemd.sockets."vboxtestlog-${name}" = {
description = "VirtualBox Test Machine Log Socket For ${name}";
wantedBy = [ "sockets.target" ];
before = [ "multi-user.target" ];
@@ -207,7 +195,7 @@ let
socketConfig.Accept = true;
};
- systemd.services."vboxtestlog-${name}@" = mkIf enableVBoxUART {
+ systemd.services."vboxtestlog-${name}@" = {
description = "VirtualBox Test Machine Log For ${name}";
serviceConfig.StandardInput = "socket";
serviceConfig.StandardOutput = "syslog";
diff --git a/nixos/tests/wordpress.nix b/nixos/tests/wordpress.nix
index 774ef6293b51..c6acfa6c1f3d 100644
--- a/nixos/tests/wordpress.nix
+++ b/nixos/tests/wordpress.nix
@@ -20,12 +20,6 @@ import ./make-test.nix ({ pkgs, ... }:
};
networking.hosts."127.0.0.1" = [ "site1.local" "site2.local" ];
-
- # required for wordpress-init.service to succeed
- systemd.tmpfiles.rules = [
- "F /var/lib/wordpress/site1.local/secret-keys.php 0440 wordpress wwwrun - -"
- "F /var/lib/wordpress/site2.local/secret-keys.php 0440 wordpress wwwrun - -"
- ];
};
testScript = ''
@@ -37,6 +31,11 @@ import ./make-test.nix ({ pkgs, ... }:
$machine->succeed("curl -L site1.local | grep 'Welcome to the famous'");
$machine->succeed("curl -L site2.local | grep 'Welcome to the famous'");
+
+ $machine->succeed("systemctl --no-pager show wordpress-init-site1.local.service | grep 'ExecStart=.*status=0'");
+ $machine->succeed("systemctl --no-pager show wordpress-init-site2.local.service | grep 'ExecStart=.*status=0'");
+ $machine->succeed("grep -E '^define.*NONCE_SALT.{64,};\$' /var/lib/wordpress/site1.local/secret-keys.php");
+ $machine->succeed("grep -E '^define.*NONCE_SALT.{64,};\$' /var/lib/wordpress/site2.local/secret-keys.php");
'';
})
diff --git a/nixos/tests/xfce.nix b/nixos/tests/xfce.nix
index 12d8a050d47b..7ff623062d93 100644
--- a/nixos/tests/xfce.nix
+++ b/nixos/tests/xfce.nix
@@ -17,6 +17,10 @@ import ./make-test.nix ({ pkgs, ...} : {
services.xserver.desktopManager.xfce.enable = true;
environment.systemPackages = [ pkgs.xorg.xmessage ];
+
+ hardware.pulseaudio.enable = true; # needed for the factl test, /dev/snd/* exists without them but udev doesn't care then
+
+ virtualisation.memorySize = 1024;
};
testScript =
@@ -28,7 +32,7 @@ import ./make-test.nix ({ pkgs, ...} : {
$machine->sleep(10);
# Check that logging in has given the user ownership of devices.
- $machine->succeed("getfacl /dev/snd/timer | grep -q alice");
+ $machine->succeed("getfacl -p /dev/snd/timer | grep -q alice");
$machine->succeed("su - alice -c 'DISPLAY=:0.0 xfce4-terminal &'");
$machine->waitForWindow(qr/Terminal/);
diff --git a/nixos/tests/xfce4-14.nix b/nixos/tests/xfce4-14.nix
new file mode 100644
index 000000000000..d9b87b084376
--- /dev/null
+++ b/nixos/tests/xfce4-14.nix
@@ -0,0 +1,37 @@
+import ./make-test.nix ({ pkgs, ...} : {
+ name = "xfce4-14";
+
+ machine =
+ { pkgs, ... }:
+
+ { imports = [ ./common/user-account.nix ];
+
+ services.xserver.enable = true;
+
+ services.xserver.displayManager.auto.enable = true;
+ services.xserver.displayManager.auto.user = "alice";
+
+ services.xserver.desktopManager.xfce4-14.enable = true;
+
+ hardware.pulseaudio.enable = true; # needed for the factl test, /dev/snd/* exists without them but udev doesn't care then
+
+ virtualisation.memorySize = 1024;
+ };
+
+ testScript =
+ ''
+ $machine->waitForX;
+ $machine->waitForFile("/home/alice/.Xauthority");
+ $machine->succeed("xauth merge ~alice/.Xauthority");
+ $machine->waitForWindow(qr/xfce4-panel/);
+ $machine->sleep(10);
+
+ # Check that logging in has given the user ownership of devices.
+ $machine->succeed("getfacl -p /dev/snd/timer | grep -q alice");
+
+ $machine->succeed("su - alice -c 'DISPLAY=:0.0 xfce4-terminal &'");
+ $machine->waitForWindow(qr/Terminal/);
+ $machine->sleep(10);
+ $machine->screenshot("screen");
+ '';
+})
diff --git a/nixos/tests/xmonad.nix b/nixos/tests/xmonad.nix
index 4d3bc28cd349..79c15ccffecd 100644
--- a/nixos/tests/xmonad.nix
+++ b/nixos/tests/xmonad.nix
@@ -26,7 +26,7 @@ import ./make-test.nix ({ pkgs, ...} : {
$machine->waitForFile("/home/alice/.Xauthority");
$machine->succeed("xauth merge ~alice/.Xauthority");
$machine->sendKeys("alt-ctrl-x");
- $machine->waitForWindow(qr/machine.*alice/);
+ $machine->waitForWindow(qr/alice.*machine/);
$machine->sleep(1);
$machine->screenshot("terminal");
$machine->waitUntilSucceeds("xmonad --restart");
diff --git a/nixos/tests/ejabberd.nix b/nixos/tests/xmpp/ejabberd.nix
similarity index 98%
rename from nixos/tests/ejabberd.nix
rename to nixos/tests/xmpp/ejabberd.nix
index 0691dfe780d2..196a04aca300 100644
--- a/nixos/tests/ejabberd.nix
+++ b/nixos/tests/xmpp/ejabberd.nix
@@ -1,4 +1,4 @@
-import ./make-test.nix ({ pkgs, ... }: {
+import ../make-test.nix ({ pkgs, ... }: {
name = "ejabberd";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ ajs124 ];
@@ -45,8 +45,7 @@ import ./make-test.nix ({ pkgs, ... }: {
ip: "127.0.0.1"
module: ejabberd_service
access: local
- shaper_rule: fast
- ip: "127.0.0.1"
+ shaper: fast
## Disabling digest-md5 SASL authentication. digest-md5 requires plain-text
## password storage (see auth_password_format option).
@@ -181,7 +180,6 @@ import ./make-test.nix ({ pkgs, ... }: {
mod_client_state: {}
mod_configure: {} # requires mod_adhoc
## mod_delegation: {} # for xep0356
- mod_echo: {}
#mod_irc:
# host: "irc.@HOST@"
# default_encoding: "utf-8"
diff --git a/nixos/tests/xmpp/prosody-mysql.nix b/nixos/tests/xmpp/prosody-mysql.nix
new file mode 100644
index 000000000000..62b4a17421e5
--- /dev/null
+++ b/nixos/tests/xmpp/prosody-mysql.nix
@@ -0,0 +1,77 @@
+import ../make-test.nix {
+ name = "prosody-mysql";
+
+ nodes = {
+ client = { nodes, pkgs, ... }: {
+ environment.systemPackages = [
+ (pkgs.callPackage ./xmpp-sendmessage.nix { connectTo = nodes.server.config.networking.primaryIPAddress; })
+ ];
+ };
+ server = { config, pkgs, ... }: {
+ nixpkgs.overlays = [
+ (self: super: {
+ prosody = super.prosody.override {
+ withDBI = true;
+ withExtraLibs = [ pkgs.luaPackages.luadbi-mysql ];
+ };
+ })
+ ];
+ networking.extraHosts = ''
+ ${config.networking.primaryIPAddress} example.com
+ '';
+ networking.firewall.enable = false;
+ services.prosody = {
+ enable = true;
+ # TODO: use a self-signed certificate
+ c2sRequireEncryption = false;
+ extraConfig = ''
+ storage = "sql"
+ sql = {
+ driver = "MySQL";
+ database = "prosody";
+ host = "mysql";
+ port = 3306;
+ username = "prosody";
+ password = "password123";
+ };
+ '';
+ virtualHosts.test = {
+ domain = "example.com";
+ enabled = true;
+ };
+ };
+ };
+ mysql = { config, pkgs, ... }: {
+ networking.firewall.enable = false;
+ services.mysql = {
+ enable = true;
+ initialScript = pkgs.writeText "mysql_init.sql" ''
+ CREATE DATABASE prosody;
+ CREATE USER 'prosody'@'server' IDENTIFIED BY 'password123';
+ GRANT ALL PRIVILEGES ON prosody.* TO 'prosody'@'server';
+ FLUSH PRIVILEGES;
+ '';
+ package = pkgs.mariadb;
+ };
+ };
+ };
+
+ testScript = { nodes, ... }: ''
+ $mysql->waitForUnit('mysql.service');
+ $server->waitForUnit('prosody.service');
+ $server->succeed('prosodyctl status') =~ /Prosody is running/;
+
+ # set password to 'nothunter2' (it's asked twice)
+ $server->succeed('yes nothunter2 | prosodyctl adduser cthon98@example.com');
+ # set password to 'y'
+ $server->succeed('yes | prosodyctl adduser azurediamond@example.com');
+ # correct password to 'hunter2'
+ $server->succeed('yes hunter2 | prosodyctl passwd azurediamond@example.com');
+
+ $client->succeed("send-message");
+
+ $server->succeed('prosodyctl deluser cthon98@example.com');
+ $server->succeed('prosodyctl deluser azurediamond@example.com');
+ '';
+}
+
diff --git a/nixos/tests/xmpp/prosody.nix b/nixos/tests/xmpp/prosody.nix
new file mode 100644
index 000000000000..8331c7b6d331
--- /dev/null
+++ b/nixos/tests/xmpp/prosody.nix
@@ -0,0 +1,46 @@
+import ../make-test.nix {
+ name = "prosody";
+
+ nodes = {
+ client = { nodes, pkgs, ... }: {
+ environment.systemPackages = [
+ (pkgs.callPackage ./xmpp-sendmessage.nix { connectTo = nodes.server.config.networking.primaryIPAddress; })
+ ];
+ };
+ server = { config, pkgs, ... }: {
+ networking.extraHosts = ''
+ ${config.networking.primaryIPAddress} example.com
+ '';
+ networking.firewall.enable = false;
+ services.prosody = {
+ enable = true;
+ # TODO: use a self-signed certificate
+ c2sRequireEncryption = false;
+ extraConfig = ''
+ storage = "sql"
+ '';
+ virtualHosts.test = {
+ domain = "example.com";
+ enabled = true;
+ };
+ };
+ };
+ };
+
+ testScript = { nodes, ... }: ''
+ $server->waitForUnit('prosody.service');
+ $server->succeed('prosodyctl status') =~ /Prosody is running/;
+
+ # set password to 'nothunter2' (it's asked twice)
+ $server->succeed('yes nothunter2 | prosodyctl adduser cthon98@example.com');
+ # set password to 'y'
+ $server->succeed('yes | prosodyctl adduser azurediamond@example.com');
+ # correct password to 'hunter2'
+ $server->succeed('yes hunter2 | prosodyctl passwd azurediamond@example.com');
+
+ $client->succeed("send-message");
+
+ $server->succeed('prosodyctl deluser cthon98@example.com');
+ $server->succeed('prosodyctl deluser azurediamond@example.com');
+ '';
+}
diff --git a/nixos/tests/xmpp-sendmessage.nix b/nixos/tests/xmpp/xmpp-sendmessage.nix
similarity index 100%
rename from nixos/tests/xmpp-sendmessage.nix
rename to nixos/tests/xmpp/xmpp-sendmessage.nix
diff --git a/pkgs/applications/altcoins/bitcoin-unlimited-const-comparators.patch b/pkgs/applications/altcoins/bitcoin-unlimited-const-comparators.patch
deleted file mode 100644
index 1b74a48a84aa..000000000000
--- a/pkgs/applications/altcoins/bitcoin-unlimited-const-comparators.patch
+++ /dev/null
@@ -1,38 +0,0 @@
---- a/src/txmempool.h
-+++ b/src/txmempool.h
-@@ -204,7 +204,7 @@
- class CompareTxMemPoolEntryByDescendantScore
- {
- public:
-- bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b)
-+ bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const
- {
- bool fUseADescendants = UseDescendantScore(a);
- bool fUseBDescendants = UseDescendantScore(b);
-@@ -226,7 +226,7 @@
- }
-
- // Calculate which score to use for an entry (avoiding division).
-- bool UseDescendantScore(const CTxMemPoolEntry &a)
-+ bool UseDescendantScore(const CTxMemPoolEntry &a) const
- {
- double f1 = (double)a.GetModifiedFee() * a.GetSizeWithDescendants();
- double f2 = (double)a.GetModFeesWithDescendants() * a.GetTxSize();
-@@ -241,7 +241,7 @@
- class CompareTxMemPoolEntryByScore
- {
- public:
-- bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b)
-+ bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const
- {
- double f1 = (double)a.GetModifiedFee() * b.GetTxSize();
- double f2 = (double)b.GetModifiedFee() * a.GetTxSize();
-@@ -255,7 +255,7 @@
- class CompareTxMemPoolEntryByEntryTime
- {
- public:
-- bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b)
-+ bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const
- {
- return a.GetTime() < b.GetTime();
- }
diff --git a/pkgs/applications/altcoins/bitcoin-xt.nix b/pkgs/applications/altcoins/bitcoin-xt.nix
deleted file mode 100644
index 499bc4be4c83..000000000000
--- a/pkgs/applications/altcoins/bitcoin-xt.nix
+++ /dev/null
@@ -1,51 +0,0 @@
-{ stdenv, fetchFromGitHub, pkgconfig, autoreconfHook, openssl, db48, boost
-, zlib, miniupnpc, qt4, utillinux, protobuf, qrencode, curl, libevent
-, withGui
-, Foundation, ApplicationServices, AppKit }:
-
-with stdenv.lib;
-stdenv.mkDerivation rec{
-
- name = "bitcoin" + (toString (optional (!withGui) "d")) + "-xt-" + version;
- version = "0.11H";
-
- src = fetchFromGitHub {
- owner = "bitcoinxt";
- repo = "bitcoinxt";
- rev = "v${version}";
- sha256 = "1v43bynmidn2zdpky939km721x3ks91bzyh4200gji61qzsmyg62";
- };
-
- nativeBuildInputs = [ pkgconfig autoreconfHook ];
- buildInputs = [ openssl db48 boost zlib libevent
- miniupnpc utillinux protobuf curl ]
- ++ optionals withGui [ qt4 qrencode ]
- ++ optionals stdenv.isDarwin [ Foundation ApplicationServices AppKit ];
-
- configureFlags = [
- "--with-boost-libdir=${boost.out}/lib"
- "--with-libcurl-headers=${curl.dev}/include"
- ] ++ optionals withGui [ "--with-gui=qt4" ];
-
- enableParallelBuilding = true;
-
- meta = {
- description = "Peer-to-peer electronic cash system (XT client)";
- longDescription= ''
- Bitcoin is a free open source peer-to-peer electronic cash system that is
- completely decentralized, without the need for a central server or trusted
- parties. Users hold the crypto keys to their own money and transact directly
- with each other, with the help of a P2P network to check for double-spending.
-
- Bitcoin XT is an implementation of a Bitcoin full node, based upon the
- source code of Bitcoin Core. It is built by taking the latest stable
- Core release, applying a series of patches, and then doing deterministic
- builds so anyone can check the downloads correspond to the source code.
- '';
- homepage = https://bitcoinxt.software/;
- maintainers = with maintainers; [ jefdaj ];
- license = licenses.mit;
- broken = stdenv.isDarwin;
- platforms = platforms.unix;
- };
-}
diff --git a/pkgs/applications/altcoins/default.nix b/pkgs/applications/altcoins/default.nix
deleted file mode 100644
index 5293c1eefa36..000000000000
--- a/pkgs/applications/altcoins/default.nix
+++ /dev/null
@@ -1,103 +0,0 @@
-{ callPackage, boost155, boost165, openssl_1_1, darwin, libsForQt5, libsForQt59, miniupnpc_2, python3, buildGo110Package }:
-
-rec {
-
- aeon = callPackage ./aeon { };
-
- bitcoin = libsForQt5.callPackage ./bitcoin.nix { miniupnpc = miniupnpc_2; withGui = true; };
- bitcoind = callPackage ./bitcoin.nix { miniupnpc = miniupnpc_2; withGui = false; };
- clightning = callPackage ./clightning.nix { };
-
- bitcoin-abc = libsForQt5.callPackage ./bitcoin-abc.nix { boost = boost165; withGui = true; };
- bitcoind-abc = callPackage ./bitcoin-abc.nix { boost = boost165; withGui = false; };
-
- bitcoin-unlimited = callPackage ./bitcoin-unlimited.nix {
- inherit (darwin.apple_sdk.frameworks) Foundation ApplicationServices AppKit;
- withGui = true;
- };
- bitcoind-unlimited = callPackage ./bitcoin-unlimited.nix {
- inherit (darwin.apple_sdk.frameworks) Foundation ApplicationServices AppKit;
- withGui = false;
- };
-
- bitcoin-classic = libsForQt5.callPackage ./bitcoin-classic.nix { boost = boost165; withGui = true; };
- bitcoind-classic = callPackage ./bitcoin-classic.nix { boost = boost165; withGui = false; };
-
- bitcoin-xt = callPackage ./bitcoin-xt.nix {
- inherit (darwin.apple_sdk.frameworks) Foundation ApplicationServices AppKit;
- boost = boost165; withGui = true;
- };
- bitcoind-xt = callPackage ./bitcoin-xt.nix {
- inherit (darwin.apple_sdk.frameworks) Foundation ApplicationServices AppKit;
- boost = boost165; withGui = false;
- };
-
- btc1 = callPackage ./btc1.nix {
- inherit (darwin.apple_sdk.frameworks) AppKit;
- boost = boost165;
- };
- btc1d = btc1.override { withGui = false; };
-
- cryptop = python3.pkgs.callPackage ./cryptop { };
-
- dashpay = callPackage ./dashpay.nix { };
-
- dcrd = callPackage ./dcrd.nix { };
- dcrwallet = callPackage ./dcrwallet.nix { };
-
- dero = callPackage ./dero.nix { boost = boost165; };
-
- dogecoin = callPackage ./dogecoin.nix { boost = boost165; withGui = true; };
- dogecoind = callPackage ./dogecoin.nix { boost = boost165; withGui = false; };
-
-
- freicoin = callPackage ./freicoin.nix { boost = boost155; };
- go-ethereum = callPackage ./go-ethereum.nix {
- inherit (darwin) libobjc;
- inherit (darwin.apple_sdk.frameworks) IOKit;
- };
- go-ethereum-classic = callPackage ./go-ethereum-classic {
- buildGoPackage = buildGo110Package;
- };
-
- litecoin = callPackage ./litecoin.nix {
- inherit (darwin.apple_sdk.frameworks) AppKit;
- };
- litecoind = litecoin.override { withGui = false; };
-
- lnd = callPackage ./lnd.nix { };
-
- masari = callPackage ./masari.nix { boost = boost165; };
-
- memorycoin = callPackage ./memorycoin.nix { boost = boost165; withGui = true; };
- memorycoind = callPackage ./memorycoin.nix { boost = boost165; withGui = false; };
-
- mist = callPackage ./mist.nix { };
-
- namecoin = callPackage ./namecoin.nix { withGui = true; };
- namecoind = callPackage ./namecoin.nix { withGui = false; };
-
- pivx = libsForQt59.callPackage ./pivx.nix { withGui = true; };
- pivxd = callPackage ./pivx.nix { withGui = false; };
-
- ethabi = callPackage ./ethabi.nix { };
-
- stellar-core = callPackage ./stellar-core.nix { };
-
- sumokoin = callPackage ./sumokoin.nix { boost = boost165; };
-
- wownero = callPackage ./wownero.nix {};
-
- zcash = callPackage ./zcash {
- withGui = false;
- openssl = openssl_1_1;
- };
-
- parity = callPackage ./parity { };
- parity-beta = callPackage ./parity/beta.nix { };
- parity-ui = callPackage ./parity-ui { };
-
- polkadot = callPackage ./polkadot { };
-
- particl-core = callPackage ./particl/particl-core.nix { miniupnpc = miniupnpc_2; };
-}
diff --git a/pkgs/applications/altcoins/go-ethereum-classic/default.nix b/pkgs/applications/altcoins/go-ethereum-classic/default.nix
deleted file mode 100644
index 7461e4c376ab..000000000000
--- a/pkgs/applications/altcoins/go-ethereum-classic/default.nix
+++ /dev/null
@@ -1,24 +0,0 @@
-{ lib, buildGoPackage, fetchgit }:
-
-buildGoPackage rec {
- name = "go-ethereum-classic-${version}";
- version = "4.0.0";
-
- goPackagePath = "github.com/ethereumproject/go-ethereum";
- subPackages = [ "cmd/evm" "cmd/geth" ];
-
- src = fetchgit {
- rev = "v${version}";
- url = "https://github.com/ethereumproject/go-ethereum";
- sha256 = "06f1w7s45q4zva1xjrx92xinsdrixl0m6zhx5hvdjmg3xqcbwr79";
- };
-
- goDeps = ./deps.nix;
-
- meta = {
- description = "Golang implementation of Ethereum Classic";
- homepage = https://github.com/ethereumproject/go-ethereum;
- license = with lib.licenses; [ lgpl3 gpl3 ];
- maintainers = with lib.maintainers; [ sorpaas ];
- };
-}
diff --git a/pkgs/applications/altcoins/go-ethereum-classic/deps.nix b/pkgs/applications/altcoins/go-ethereum-classic/deps.nix
deleted file mode 100644
index 0aa6755ee960..000000000000
--- a/pkgs/applications/altcoins/go-ethereum-classic/deps.nix
+++ /dev/null
@@ -1,39 +0,0 @@
-# This file was generated by https://github.com/kamilchm/go2nix v1.2.0
-[
- {
- goPackagePath = "github.com/maruel/panicparse";
- fetch = {
- type = "git";
- url = "https://github.com/maruel/panicparse";
- rev = "ae43f192cef2add653fe1481a3070ed00a4a6981";
- sha256 = "11q8v4adbrazqvh24235s5nifck0d1083gbwv4dh5lhd10xlwdvr";
- };
- }
- {
- goPackagePath = "github.com/mattn/go-runewidth";
- fetch = {
- type = "git";
- url = "https://github.com/mattn/go-runewidth";
- rev = "97311d9f7767e3d6f422ea06661bc2c7a19e8a5d";
- sha256 = "0dxlrzn570xl7gb11hjy1v4p3gw3r41yvqhrffgw95ha3q9p50cg";
- };
- }
- {
- goPackagePath = "github.com/mitchellh/go-wordwrap";
- fetch = {
- type = "git";
- url = "https://github.com/mitchellh/go-wordwrap";
- rev = "ad45545899c7b13c020ea92b2072220eefad42b8";
- sha256 = "0ny1ddngvwfj3njn7pmqnf3l903lw73ynddw15x8ymp7hidv27v9";
- };
- }
- {
- goPackagePath = "github.com/nsf/termbox-go";
- fetch = {
- type = "git";
- url = "https://github.com/nsf/termbox-go";
- rev = "4163cd39dda1c0dda883a713640bc01e08951c24";
- sha256 = "1vzrhxf8823lrnwf1bfyxwlm52pph5iq2hgr1d0n07v8kjgqkrmx";
- };
- }
-]
diff --git a/pkgs/applications/altcoins/jormungandr/default.nix b/pkgs/applications/altcoins/jormungandr/default.nix
deleted file mode 100644
index d58e05184b63..000000000000
--- a/pkgs/applications/altcoins/jormungandr/default.nix
+++ /dev/null
@@ -1,38 +0,0 @@
-{ stdenv
-, fetchgit
-, rustPlatform
-, openssl
-, pkgconfig
-, protobuf
-, rustup
-}:
-
-rustPlatform.buildRustPackage rec {
- pname = "jormungandr";
- version = "0.3.1";
-
- src = fetchgit {
- url = "https://github.com/input-output-hk/${pname}";
- rev = "v${version}";
- sha256 = "0ys8sw73c7binxnl79dqi7sxva62bgifbhgyzvvjvmjjdxgq4kfp";
- fetchSubmodules = true;
- };
-
- cargoSha256 = "0fphjzz78ym15qbka01idnq6vkyf4asrnhrhvxngwc3bifmnj937";
-
- nativeBuildInputs = [ pkgconfig protobuf rustup ];
- buildInputs = [ openssl ];
-
- PROTOC = "${protobuf}/bin/protoc";
-
- # Disabling integration tests
- doCheck = false;
-
- meta = with stdenv.lib; {
- description = "An aspiring blockchain node";
- homepage = "https://input-output-hk.github.io/jormungandr/";
- license = licenses.mit;
- maintainers = [ maintainers.mmahut ];
- platforms = platforms.all;
- };
-}
diff --git a/pkgs/applications/altcoins/memorycoin.nix b/pkgs/applications/altcoins/memorycoin.nix
deleted file mode 100644
index 944c82250d47..000000000000
--- a/pkgs/applications/altcoins/memorycoin.nix
+++ /dev/null
@@ -1,56 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, openssl, db48, boost
-, zlib, qt4, qmake4Hook, utillinux, protobuf, qrencode
-, withGui }:
-
-with stdenv.lib;
-stdenv.mkDerivation rec{
-
- name = "memorycoin" + (toString (optional (!withGui) "d")) + "-" + version;
- version = "0.8.5";
-
- src = fetchurl {
- url = "https://github.com/memorycoin/memorycoin/archive/v${version}.tar.gz";
- sha256 = "1iyh6dqrg0mirwci5br5n5qw3ghp2cs23wd8ygr56bh9ml4dr1m8";
- };
-
- nativeBuildInputs = [ pkgconfig ];
- buildInputs = [ openssl db48 boost zlib utillinux protobuf ]
- ++ optionals withGui [ qt4 qmake4Hook qrencode ];
-
- qmakeFlags = ["USE_UPNP=-"];
- makeFlags = ["USE_UPNP=-"];
-
- configureFlags = [ "--with-boost-libdir=${boost.out}/lib" ]
- ++ optionals withGui [ "--with-gui=qt4" ];
-
- preBuild = "unset AR;"
- + (toString (optional (!withGui) "cd src; cp makefile.unix Makefile"));
-
- installPhase =
- if withGui
- then "install -D bitcoin-qt $out/bin/memorycoin-qt"
- else "install -D bitcoind $out/bin/memorycoind";
-
- # `make build/version.o`:
- # make: *** No rule to make target 'build/build.h', needed by 'build/version.o'. Stop.
- enableParallelBuilding = false;
-
- meta = {
- description = "Peer-to-peer, CPU-based electronic cash system";
- longDescription= ''
- Memorycoin is a cryptocurrency that aims to empower the
- economically and financially marginalized. It allows individuals
- to participate in the internet economy even when they live in
- countries where credit card companies and PayPal(R) refuse to
- operate. Individuals can store and transfer wealth with just a
- memorized pass phrase.
-
- Memorycoin is based on the Bitcoin code, but with some key
- differences.
- '';
- homepage = http://www.bitcoin.org/;
- maintainers = with maintainers; [ AndersonTorres ];
- license = licenses.mit;
- platforms = [ "x86_64-linux" ];
- };
-}
diff --git a/pkgs/applications/altcoins/monero-gui/move-log-file.patch b/pkgs/applications/altcoins/monero-gui/move-log-file.patch
deleted file mode 100644
index 260c6d9d00f2..000000000000
--- a/pkgs/applications/altcoins/monero-gui/move-log-file.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-diff --git a/main.cpp b/main.cpp
-index a51568d..5a9f683 100644
---- a/main.cpp
-+++ b/main.cpp
-@@ -152,7 +152,9 @@ int main(int argc, char *argv[])
- QCommandLineOption logPathOption(QStringList() << "l" << "log-file",
- QCoreApplication::translate("main", "Log to specified file"),
- QCoreApplication::translate("main", "file"));
--
-+ logPathOption.setDefaultValue(
-+ QStandardPaths::writableLocation(QStandardPaths::CacheLocation)
-+ + "/monero-wallet-gui.log");
- parser.addOption(logPathOption);
- parser.addHelpOption();
- parser.process(app);
-diff --git a/Logger.cpp b/Logger.cpp
-index 6b1daba..c357762 100644
---- a/Logger.cpp
-+++ b/Logger.cpp
-@@ -28,8 +28,8 @@ static const QString defaultLogName = "monero-wallet-gui.log";
- static const QString appFolder = "Library/Logs";
- #else // linux + bsd
- //HomeLocation = "~"
-- static const QString osPath = QStandardPaths::standardLocations(QStandardPaths::HomeLocation).at(0);
-- static const QString appFolder = ".bitmonero";
-+ static const QString osPath = QStandardPaths::standardLocations(QStandardPaths::CacheLocation).at(0);
-+ static const QString appFolder = "bitmonero";
- #endif
-
-
diff --git a/pkgs/applications/altcoins/monero-gui/move-translations-dir.patch b/pkgs/applications/altcoins/monero-gui/move-translations-dir.patch
deleted file mode 100644
index ff17ce5da1c0..000000000000
--- a/pkgs/applications/altcoins/monero-gui/move-translations-dir.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/TranslationManager.cpp b/TranslationManager.cpp
-index e7fc52a..83534cc 100644
---- a/TranslationManager.cpp
-+++ b/TranslationManager.cpp
-@@ -25,7 +25,7 @@ bool TranslationManager::setLanguage(const QString &language)
- return true;
- }
-
-- QString dir = qApp->applicationDirPath() + "/translations";
-+ QString dir = qApp->applicationDirPath() + "/../share/translations";
- QString filename = "monero-core_" + language;
-
- qDebug("%s: loading translation file '%s' from '%s'",
diff --git a/pkgs/applications/altcoins/parity/beta.nix b/pkgs/applications/altcoins/parity/beta.nix
deleted file mode 100644
index cce0b1c64883..000000000000
--- a/pkgs/applications/altcoins/parity/beta.nix
+++ /dev/null
@@ -1,6 +0,0 @@
-let
- version = "2.5.4";
- sha256 = "103kg0lrijf6d0mc1nk4pdgwgkmp9ga51rwfqrkkm133lylrr0lf";
- cargoSha256 = "1w9p43v76igb62mbjk2rl7fynk13l4hpz25jd4f4hk5b2y2wf3r7";
-in
- import ./parity.nix { inherit version sha256 cargoSha256; }
diff --git a/pkgs/applications/altcoins/parity/default.nix b/pkgs/applications/altcoins/parity/default.nix
deleted file mode 100644
index 57b1faf71f70..000000000000
--- a/pkgs/applications/altcoins/parity/default.nix
+++ /dev/null
@@ -1,6 +0,0 @@
-let
- version = "2.4.9";
- sha256 = "0pj3yyjzc3fq0r7g8j22anzqxvm377pbcy27np1g7ygkzapzb2v6";
- cargoSha256 = "1dxn00zxivmgk4a61nxwhjlv7fjsy2ngadyw0br1ssrkgz9k7af2";
-in
- import ./parity.nix { inherit version sha256 cargoSha256; }
diff --git a/pkgs/applications/altcoins/wasabiwallet/default.nix b/pkgs/applications/altcoins/wasabiwallet/default.nix
deleted file mode 100644
index 9eef471adad2..000000000000
--- a/pkgs/applications/altcoins/wasabiwallet/default.nix
+++ /dev/null
@@ -1,44 +0,0 @@
-{ stdenv, fetchurl, makeDesktopItem, openssl_1_1, xorg, curl, fontconfig, krb5, zlib, dotnet-sdk }:
-
-stdenv.mkDerivation rec {
- pname = "wasabiwallet";
- version = "1.1.5";
-
- src = fetchurl {
- url = "https://github.com/zkSNACKs/WalletWasabi/releases/download/v${version}/WasabiLinux-${version}.tar.gz";
- sha256 = "1iq7qkpq073yq1bz8pam4cbm2myznhpjr3g9afblvmxwgbdjxak0";
- };
-
- dontBuild = true;
- dontPatchELF = true;
-
- desktopItem = makeDesktopItem {
- name = "wasabi";
- exec = "wasabiwallet";
- desktopName = "Wasabi";
- genericName = "Bitcoin wallet";
- comment = meta.description;
- categories = "Application;Network;Utility;";
- };
-
- installPhase = ''
- mkdir -p $out/opt/${pname} $out/bin $out/share/applications
- cp -Rv . $out/opt/${pname}
- cd $out/opt/${pname}
- for i in $(find . -type f -name '*.so') wassabee
- do
- patchelf --set-rpath ${stdenv.lib.makeLibraryPath [ openssl_1_1 stdenv.cc.cc.lib xorg.libX11 curl fontconfig.lib krb5 zlib dotnet-sdk ]} $i
- done
- patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" wassabee
- ln -s $out/opt/${pname}/wassabee $out/bin/${pname}
- cp -v $desktopItem/share/applications/* $out/share/applications
- '';
-
- meta = with stdenv.lib; {
- description = "Privacy focused Bitcoin wallet";
- homepage = "https://wasabiwallet.io/";
- license = licenses.mit;
- platforms = [ "x86_64-linux" ];
- maintainers = with maintainers; [ mmahut ];
- };
-}
diff --git a/pkgs/applications/audio/AMB-plugins/default.nix b/pkgs/applications/audio/AMB-plugins/default.nix
index 3ea7b90f84a7..d9a05e0bf660 100644
--- a/pkgs/applications/audio/AMB-plugins/default.nix
+++ b/pkgs/applications/audio/AMB-plugins/default.nix
@@ -2,10 +2,10 @@
}:
stdenv.mkDerivation rec {
- name = "AMB-plugins-${version}";
+ pname = "AMB-plugins";
version = "0.8.1";
src = fetchurl {
- url = "http://kokkinizita.linuxaudio.org/linuxaudio/downloads/${name}.tar.bz2";
+ url = "http://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pname}-${version}.tar.bz2";
sha256 = "0x4blm4visjqj0ndqr0cg776v3b7lvplpc8cgi9n51llhavn0jpl";
};
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
longDescription = ''
Mono and stereo to B-format panning, horizontal rotator, square, hexagon and cube decoders.
'';
- version = "${version}";
+ version = version;
homepage = http://kokkinizita.linuxaudio.org/linuxaudio/ladspa/index.html;
license = stdenv.lib.licenses.gpl2Plus;
maintainers = [ stdenv.lib.maintainers.magnetophon ];
diff --git a/pkgs/applications/audio/FIL-plugins/default.nix b/pkgs/applications/audio/FIL-plugins/default.nix
index b9322c37df00..cf383c1dd495 100644
--- a/pkgs/applications/audio/FIL-plugins/default.nix
+++ b/pkgs/applications/audio/FIL-plugins/default.nix
@@ -2,10 +2,10 @@
}:
stdenv.mkDerivation rec {
- name = "FIL-plugins-${version}";
+ pname = "FIL-plugins";
version = "0.3.0";
src = fetchurl {
- url = "http://kokkinizita.linuxaudio.org/linuxaudio/downloads/${name}.tar.bz2";
+ url = "http://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pname}-${version}.tar.bz2";
sha256 = "1scfv9j7jrp50r565haa4rvxn1vk2ss86xssl5qgcr8r45qz42qw";
};
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
All switches and controls are internally smoothed, so they can be used 'live' whithout any clicks or zipper noises.
This should make this plugin a good candidate for use in systems that allow automation of plugin control ports, such as Ardour, or for stage use.
'';
- version = "${version}";
+ version = version;
homepage = http://kokkinizita.linuxaudio.org/linuxaudio/ladspa/index.html;
license = stdenv.lib.licenses.gpl2Plus;
maintainers = [ stdenv.lib.maintainers.magnetophon ];
diff --git a/pkgs/applications/audio/MMA/default.nix b/pkgs/applications/audio/MMA/default.nix
index ed7a8481f693..92f46abddd5a 100644
--- a/pkgs/applications/audio/MMA/default.nix
+++ b/pkgs/applications/audio/MMA/default.nix
@@ -2,7 +2,7 @@
stdenv.mkDerivation rec {
version = "16.06";
- name = "mma-${version}";
+ pname = "mma";
src = fetchurl {
url = "https://www.mellowood.ca/mma/mma-bin-${version}.tar.gz";
diff --git a/pkgs/applications/audio/a2jmidid/default.nix b/pkgs/applications/audio/a2jmidid/default.nix
index 70709ae4ac4c..283317200484 100644
--- a/pkgs/applications/audio/a2jmidid/default.nix
+++ b/pkgs/applications/audio/a2jmidid/default.nix
@@ -4,8 +4,8 @@
let
inherit (python2Packages) python dbus-python;
-in stdenv.mkDerivation rec {
- name = "a2jmidid-${version}";
+in stdenv.mkDerivation {
+ pname = "a2jmidid";
version = "8";
src = fetchurl {
diff --git a/pkgs/applications/audio/abcde/default.nix b/pkgs/applications/audio/abcde/default.nix
index b602707b3921..adb38d4bbbab 100644
--- a/pkgs/applications/audio/abcde/default.nix
+++ b/pkgs/applications/audio/abcde/default.nix
@@ -6,7 +6,8 @@
let version = "2.9.3";
in
stdenv.mkDerivation {
- name = "abcde-${version}";
+ pname = "abcde";
+ inherit version;
src = fetchurl {
url = "https://abcde.einval.com/download/abcde-${version}.tar.gz";
sha256 = "091ip2iwb6b67bhjsj05l0sxyq2whqjycbzqpkfbpm4dlyxx0v04";
diff --git a/pkgs/applications/audio/aeolus/default.nix b/pkgs/applications/audio/aeolus/default.nix
index 7b80b32331bc..389052d30e1c 100644
--- a/pkgs/applications/audio/aeolus/default.nix
+++ b/pkgs/applications/audio/aeolus/default.nix
@@ -3,11 +3,11 @@
}:
stdenv.mkDerivation rec {
- name = "aeolus-${version}";
+ pname = "aeolus";
version = "0.9.7";
src = fetchurl {
- url = "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/${name}.tar.bz2";
+ url = "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pname}-${version}.tar.bz2";
sha256 = "0lhbr95hmbfj8ynbcpawn7jzjbpvrkm6k2yda39yhqk1bzg38v2k";
};
diff --git a/pkgs/applications/audio/amarok/default.nix b/pkgs/applications/audio/amarok/default.nix
index a4aa64280975..c72815d5ca25 100644
--- a/pkgs/applications/audio/amarok/default.nix
+++ b/pkgs/applications/audio/amarok/default.nix
@@ -6,12 +6,9 @@
, curl, ffmpeg, gdk-pixbuf, libaio, libmtp, loudmouth, lzo, lz4, mysql57, pcre, snappy, taglib, taglib_extras
}:
-let
+mkDerivation rec {
pname = "amarok";
- version = "2.9.0-20180618";
-
-in mkDerivation {
- name = "${pname}-${version}";
+ version = "2.9.0-20190824";
src = fetchgit {
# master has the Qt5 version as of April 2018 but a formal release has not
@@ -19,8 +16,8 @@ in mkDerivation {
# release is out
url = git://anongit.kde.org/amarok.git;
# url = "mirror://kde/stable/${pname}/${version}/src/${name}.tar.xz";
- rev = "5d43efa454b6a6c9c833a6f3d7f8ff3cae738c96";
- sha256 = "0fyrbgldg4wbb2darm4aav5fpzbacxzfjrdqwkhv9xr13j7zsvm3";
+ rev = "457fbda25a85a102bfda92aa7137e7ef5e4c8b00";
+ sha256 = "1ig2mg8pqany6m2zplkrvldcv4ibxwsypnyv5igm7nz7ax82cd5j";
};
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
diff --git a/pkgs/applications/audio/ams-lv2/default.nix b/pkgs/applications/audio/ams-lv2/default.nix
index d6064e80e3ff..0750c38550b1 100644
--- a/pkgs/applications/audio/ams-lv2/default.nix
+++ b/pkgs/applications/audio/ams-lv2/default.nix
@@ -2,7 +2,7 @@
, wafHook }:
stdenv.mkDerivation rec {
- name = "ams-lv2-${version}";
+ pname = "ams-lv2";
version = "1.2.2";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/ario/default.nix b/pkgs/applications/audio/ario/default.nix
index 02d818410df4..4b48f5f1eea2 100644
--- a/pkgs/applications/audio/ario/default.nix
+++ b/pkgs/applications/audio/ario/default.nix
@@ -5,10 +5,10 @@
stdenv.mkDerivation rec {
version = "1.6";
- name = "ario-${version}";
+ pname = "ario";
src = fetchurl {
- url = "mirror://sourceforge/ario-player/${name}.tar.gz";
+ url = "mirror://sourceforge/ario-player/${pname}-${version}.tar.gz";
sha256 = "16nhfb3h5pc7flagfdz7xy0iq6kvgy6h4bfpi523i57rxvlfshhl";
};
diff --git a/pkgs/applications/audio/artyFX/default.nix b/pkgs/applications/audio/artyFX/default.nix
index 91a0a1f140c2..4b76ebdf6053 100644
--- a/pkgs/applications/audio/artyFX/default.nix
+++ b/pkgs/applications/audio/artyFX/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub , cairomm, cmake, libjack2, libpthreadstubs, libXdmcp, libxshmfence, libsndfile, lv2, ntk, pkgconfig }:
stdenv.mkDerivation rec {
- name = "artyFX-${version}";
+ pname = "artyFX";
version = "1.3";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/asunder/default.nix b/pkgs/applications/audio/asunder/default.nix
index 9c42c98ba5e3..e252635e9537 100644
--- a/pkgs/applications/audio/asunder/default.nix
+++ b/pkgs/applications/audio/asunder/default.nix
@@ -12,11 +12,11 @@
with stdenv.lib;
stdenv.mkDerivation rec {
- version = "2.9.3";
- name = "asunder-${version}";
+ version = "2.9.4";
+ pname = "asunder";
src = fetchurl {
- url = "http://littlesvr.ca/asunder/releases/${name}.tar.bz2";
- sha256 = "1630i1df06y840v3fgdf75jxw1s8kwbfn5bhi0686viah0scccw5";
+ url = "http://littlesvr.ca/asunder/releases/${pname}-${version}.tar.bz2";
+ sha256 = "1bwc9v9l1f3kqjd7wis6g2sv6ibc618ybh0gsb8mkkfhadp68w30";
};
nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/applications/audio/audacious/default.nix b/pkgs/applications/audio/audacious/default.nix
index 68660b5d054b..12e8237d4857 100644
--- a/pkgs/applications/audio/audacious/default.nix
+++ b/pkgs/applications/audio/audacious/default.nix
@@ -7,7 +7,7 @@
}:
stdenv.mkDerivation rec {
- name = "audacious-${version}";
+ pname = "audacious";
version = "3.9";
src = fetchurl {
diff --git a/pkgs/applications/audio/audacity/default.nix b/pkgs/applications/audio/audacity/default.nix
index b685fda7683d..6be40a7b93aa 100644
--- a/pkgs/applications/audio/audacity/default.nix
+++ b/pkgs/applications/audio/audacity/default.nix
@@ -8,7 +8,7 @@ with stdenv.lib;
stdenv.mkDerivation rec {
version = "2.3.2";
- name = "audacity-${version}";
+ pname = "audacity";
src = fetchurl {
url = "https://github.com/audacity/audacity/archive/Audacity-${version}.tar.gz";
diff --git a/pkgs/applications/audio/audio-recorder/default.nix b/pkgs/applications/audio/audio-recorder/default.nix
index 7b84cd02a627..534b87e9fa74 100644
--- a/pkgs/applications/audio/audio-recorder/default.nix
+++ b/pkgs/applications/audio/audio-recorder/default.nix
@@ -5,11 +5,11 @@
, pulseaudioSupport ? true, libpulseaudio ? null }:
stdenv.mkDerivation rec {
- name = "audio-recorder-${version}";
+ pname = "audio-recorder";
version = "2.1.3";
src = fetchurl {
- name = "${name}.tar.gz";
+ name = "${pname}-${version}.tar.gz";
url = "${meta.homepage}/+archive/ubuntu/ppa/+files/audio-recorder_${version}%7Ebionic.tar.gz";
sha256 = "160pnmnmc9zwzyclsci3w1qwlgxkfx1y3x5ck6i587w78570an1r";
};
diff --git a/pkgs/applications/audio/avldrums-lv2/default.nix b/pkgs/applications/audio/avldrums-lv2/default.nix
index c49470b76e2d..7ca5d83b48b2 100644
--- a/pkgs/applications/audio/avldrums-lv2/default.nix
+++ b/pkgs/applications/audio/avldrums-lv2/default.nix
@@ -1,7 +1,6 @@
{ stdenv, fetchFromGitHub, pkgconfig, pango, cairo, libGLU, lv2 }:
stdenv.mkDerivation rec {
- name = "${pname}-${version}";
pname = "avldrums.lv2";
version = "0.3.5";
diff --git a/pkgs/applications/audio/axoloti/default.nix b/pkgs/applications/audio/axoloti/default.nix
index e3f1b6acf874..fb9b3c9513f8 100644
--- a/pkgs/applications/audio/axoloti/default.nix
+++ b/pkgs/applications/audio/axoloti/default.nix
@@ -4,12 +4,12 @@
stdenv.mkDerivation rec {
version = "1.0.12-2";
- name = "axoloti-${version}";
+ pname = "axoloti";
src = fetchFromGitHub {
owner = "axoloti";
repo = "axoloti";
- rev = "${version}";
+ rev = version;
sha256 = "1qffis277wshldr3i939b0r2x3a2mlr53samxqmr2nk1sfm2b4w9";
};
diff --git a/pkgs/applications/audio/axoloti/dfu-util.nix b/pkgs/applications/audio/axoloti/dfu-util.nix
index 07a78260991f..e9fa6daecfe3 100644
--- a/pkgs/applications/audio/axoloti/dfu-util.nix
+++ b/pkgs/applications/audio/axoloti/dfu-util.nix
@@ -1,14 +1,14 @@
{ stdenv, fetchurl, pkgconfig, libusb1-axoloti }:
stdenv.mkDerivation rec {
- name="dfu-util-${version}";
+ pname = "dfu-util";
version = "0.8";
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ libusb1-axoloti ];
src = fetchurl {
- url = "http://dfu-util.sourceforge.net/releases/${name}.tar.gz";
+ url = "http://dfu-util.sourceforge.net/releases/${pname}-${version}.tar.gz";
sha256 = "0n7h08avlzin04j93m6hkq9id6hxjiiix7ff9gc2n89aw6dxxjsm";
};
diff --git a/pkgs/applications/audio/baudline/default.nix b/pkgs/applications/audio/baudline/default.nix
index 6827d12b3217..c35df95b24c7 100644
--- a/pkgs/applications/audio/baudline/default.nix
+++ b/pkgs/applications/audio/baudline/default.nix
@@ -7,7 +7,7 @@ let
[ libXmu libXt libX11 libXext libXxf86vm libjack2 ];
in
stdenv.mkDerivation rec {
- name = "baudline-${version}";
+ pname = "baudline";
version = "1.08";
src =
diff --git a/pkgs/applications/audio/bitmeter/default.nix b/pkgs/applications/audio/bitmeter/default.nix
index fbe2c97042f0..6f471f3a0283 100644
--- a/pkgs/applications/audio/bitmeter/default.nix
+++ b/pkgs/applications/audio/bitmeter/default.nix
@@ -1,11 +1,11 @@
{ stdenv, autoreconfHook, fetchurl, libjack2, gtk2, pkgconfig }:
stdenv.mkDerivation rec {
- name = "bitmeter-${version}";
+ pname = "bitmeter";
version = "1.2";
src = fetchurl {
- url = "https://devel.tlrmx.org/audio/source/${name}.tar.gz";
+ url = "https://devel.tlrmx.org/audio/source/${pname}-${version}.tar.gz";
sha256 = "09ck2gxqky701dc1p0ip61rrn16v0pdc7ih2hc2sd63zcw53g2a7";
};
diff --git a/pkgs/applications/audio/bitwig-studio/bitwig-studio1.nix b/pkgs/applications/audio/bitwig-studio/bitwig-studio1.nix
index 31716fce1c21..835868471906 100644
--- a/pkgs/applications/audio/bitwig-studio/bitwig-studio1.nix
+++ b/pkgs/applications/audio/bitwig-studio/bitwig-studio1.nix
@@ -6,7 +6,7 @@
, xdg_utils, zenity, zlib }:
stdenv.mkDerivation rec {
- name = "bitwig-studio-${version}";
+ pname = "bitwig-studio";
version = "1.3.16";
src = fetchurl {
diff --git a/pkgs/applications/audio/bristol/default.nix b/pkgs/applications/audio/bristol/default.nix
index e1ed12b9bd2e..504900d65955 100644
--- a/pkgs/applications/audio/bristol/default.nix
+++ b/pkgs/applications/audio/bristol/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, alsaLib, libjack2, pkgconfig, libpulseaudio, xorg }:
stdenv.mkDerivation rec {
- name = "bristol-${version}";
+ pname = "bristol";
version = "0.60.11";
src = fetchurl {
- url = "mirror://sourceforge/bristol/${name}.tar.gz";
+ url = "mirror://sourceforge/bristol/${pname}-${version}.tar.gz";
sha256 = "1fi2m4gmvxdi260821y09lxsimq82yv4k5bbgk3kyc3x1nyhn7vx";
};
diff --git a/pkgs/applications/audio/bs1770gain/default.nix b/pkgs/applications/audio/bs1770gain/default.nix
index adda92353647..2dee463aeee2 100644
--- a/pkgs/applications/audio/bs1770gain/default.nix
+++ b/pkgs/applications/audio/bs1770gain/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, ffmpeg, sox }:
stdenv.mkDerivation rec {
- name = "bs1770gain-${version}";
+ pname = "bs1770gain";
version = "0.5.2";
src = fetchurl {
- url = "mirror://sourceforge/bs1770gain/${name}.tar.gz";
+ url = "mirror://sourceforge/bs1770gain/${pname}-${version}.tar.gz";
sha256 = "1p6yz5q7czyf9ard65sp4kawdlkg40cfscr3b24znymmhs3p7rbk";
};
diff --git a/pkgs/applications/audio/calf/default.nix b/pkgs/applications/audio/calf/default.nix
index 7d7d25ea88a0..0106e8b45846 100644
--- a/pkgs/applications/audio/calf/default.nix
+++ b/pkgs/applications/audio/calf/default.nix
@@ -2,11 +2,11 @@
, gtk2, libjack2, ladspaH , libglade, lv2, pkgconfig }:
stdenv.mkDerivation rec {
- name = "calf-${version}";
+ pname = "calf";
version = "0.90.3";
src = fetchurl {
- url = "https://calf-studio-gear.org/files/${name}.tar.gz";
+ url = "https://calf-studio-gear.org/files/${pname}-${version}.tar.gz";
sha256 = "17x4hylgq4dn9qycsdacfxy64f5cv57n2qgkvsdp524gnqzw4az3";
};
diff --git a/pkgs/applications/audio/cantata/default.nix b/pkgs/applications/audio/cantata/default.nix
index dc805a8caf93..bdbf6a45a6d4 100644
--- a/pkgs/applications/audio/cantata/default.nix
+++ b/pkgs/applications/audio/cantata/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, cmake, pkgconfig, vlc
+{ mkDerivation, lib, fetchFromGitHub, cmake, pkgconfig, vlc
, qtbase, qtmultimedia, qtsvg, qttools
# Cantata doesn't build with cdparanoia enabled so we disable that
@@ -35,7 +35,7 @@ let
withUdisks = (withTaglib && withDevices);
-in stdenv.mkDerivation rec {
+in mkDerivation {
name = "${pname}-${version}";
src = fetchFromGitHub {
@@ -46,20 +46,20 @@ in stdenv.mkDerivation rec {
};
buildInputs = [ vlc qtbase qtmultimedia qtsvg ]
- ++ stdenv.lib.optionals withTaglib [ taglib taglib_extras ]
- ++ stdenv.lib.optionals withReplaygain [ ffmpeg speex mpg123 ]
- ++ stdenv.lib.optional withCdda cdparanoia
- ++ stdenv.lib.optional withCddb libcddb
- ++ stdenv.lib.optional withLame lame
- ++ stdenv.lib.optional withMtp libmtp
- ++ stdenv.lib.optional withMusicbrainz libmusicbrainz5
- ++ stdenv.lib.optional withUdisks udisks2;
+ ++ lib.optionals withTaglib [ taglib taglib_extras ]
+ ++ lib.optionals withReplaygain [ ffmpeg speex mpg123 ]
+ ++ lib.optional withCdda cdparanoia
+ ++ lib.optional withCddb libcddb
+ ++ lib.optional withLame lame
+ ++ lib.optional withMtp libmtp
+ ++ lib.optional withMusicbrainz libmusicbrainz5
+ ++ lib.optional withUdisks udisks2;
nativeBuildInputs = [ cmake pkgconfig qttools ];
enableParallelBuilding = true;
- cmakeFlags = stdenv.lib.flatten [
+ cmakeFlags = lib.flatten [
(fstats withTaglib [ "TAGLIB" "TAGLIB_EXTRAS" ])
(fstats withReplaygain [ "FFMPEG" "MPG123" "SPEEXDSP" ])
(fstat withCdda "CDPARANOIA")
@@ -76,7 +76,7 @@ in stdenv.mkDerivation rec {
"-DENABLE_HTTPS_SUPPORT=ON"
];
- meta = with stdenv.lib; {
+ meta = with lib; {
homepage = https://github.com/cdrummond/cantata;
description = "A graphical client for MPD";
license = licenses.gpl3;
diff --git a/pkgs/applications/audio/caps/default.nix b/pkgs/applications/audio/caps/default.nix
index 1f53809e9059..eabbf8668375 100644
--- a/pkgs/applications/audio/caps/default.nix
+++ b/pkgs/applications/audio/caps/default.nix
@@ -1,6 +1,6 @@
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
- name = "caps-${version}";
+ pname = "caps";
version = "0.9.26";
src = fetchurl {
url = "http://www.quitte.de/dsp/caps_${version}.tar.bz2";
diff --git a/pkgs/applications/audio/caudec/default.nix b/pkgs/applications/audio/caudec/default.nix
index 04f0f9d30259..1ab39311258b 100644
--- a/pkgs/applications/audio/caudec/default.nix
+++ b/pkgs/applications/audio/caudec/default.nix
@@ -4,8 +4,9 @@ let
version = "1.7.5";
in
-stdenv.mkDerivation rec {
- name = "caudec-${version}";
+stdenv.mkDerivation {
+ pname = "caudec";
+ inherit version;
src = fetchurl {
url = "http://caudec.net/downloads/caudec-${version}.tar.gz";
diff --git a/pkgs/applications/audio/cava/default.nix b/pkgs/applications/audio/cava/default.nix
index 439175b090a8..5c5c262056ec 100644
--- a/pkgs/applications/audio/cava/default.nix
+++ b/pkgs/applications/audio/cava/default.nix
@@ -2,7 +2,7 @@
libpulseaudio, ncurses }:
stdenv.mkDerivation rec {
- name = "cava-${version}";
+ pname = "cava";
version = "0.6.1";
buildInputs = [
diff --git a/pkgs/applications/audio/cd-discid/default.nix b/pkgs/applications/audio/cd-discid/default.nix
index 382d4a1b6675..76f76c1e750d 100644
--- a/pkgs/applications/audio/cd-discid/default.nix
+++ b/pkgs/applications/audio/cd-discid/default.nix
@@ -2,11 +2,11 @@
, IOKit ? null }:
stdenv.mkDerivation rec {
- name = "cd-discid-${version}";
+ pname = "cd-discid";
version = "1.4";
src = fetchurl {
- url = "http://linukz.org/download/${name}.tar.gz";
+ url = "http://linukz.org/download/${pname}-${version}.tar.gz";
sha256 = "0qrcvn7227qaayjcd5rm7z0k5q89qfy5qkdgwr5pd7ih0va8rmpz";
};
diff --git a/pkgs/applications/audio/chuck/default.nix b/pkgs/applications/audio/chuck/default.nix
index da26a7188357..692485d0dcfd 100644
--- a/pkgs/applications/audio/chuck/default.nix
+++ b/pkgs/applications/audio/chuck/default.nix
@@ -4,7 +4,7 @@
stdenv.mkDerivation rec {
version = "1.4.0.0";
- name = "chuck-${version}";
+ pname = "chuck";
src = fetchurl {
url = "http://chuck.cs.princeton.edu/release/files/chuck-${version}.tgz";
diff --git a/pkgs/applications/audio/clementine/default.nix b/pkgs/applications/audio/clementine/default.nix
index 1b0dfebe22c2..0a374c26142a 100644
--- a/pkgs/applications/audio/clementine/default.nix
+++ b/pkgs/applications/audio/clementine/default.nix
@@ -28,6 +28,11 @@ let
url = "https://github.com/clementine-player/Clementine/pull/5630.patch";
sha256 = "0px7xp1m4nvrncx8sga1qlxppk562wrk2qqk19iiry84nxg20mk4";
})
+ (fetchpatch {
+ # Fixes compilation with chromaprint >= 1.4
+ url = "https://github.com/clementine-player/Clementine/commit/d3ea0c8482dfd3f6264a30cfceb456076d76e6cd.patch";
+ sha256 = "1ifrs5aqdzw16jbnf0z1ilir20chdnr9k5n21r99miq9hzjpbh12";
+ })
];
nativeBuildInputs = [ cmake pkgconfig ];
@@ -67,7 +72,8 @@ let
'';
free = stdenv.mkDerivation {
- name = "clementine-free-${version}";
+ pname = "clementine-free";
+ inherit version;
inherit src patches nativeBuildInputs postPatch;
# gst_plugins needed for setup-hooks
@@ -95,7 +101,8 @@ let
# Unfree Spotify blob for Clementine
unfree = stdenv.mkDerivation {
- name = "clementine-blob-${version}";
+ pname = "clementine-blob";
+ inherit version;
# Use the same patches and sources as Clementine
inherit src nativeBuildInputs postPatch;
diff --git a/pkgs/applications/audio/cmus/default.nix b/pkgs/applications/audio/cmus/default.nix
index b574993338de..b88951c0fc5b 100644
--- a/pkgs/applications/audio/cmus/default.nix
+++ b/pkgs/applications/audio/cmus/default.nix
@@ -101,7 +101,7 @@ let
in
stdenv.mkDerivation rec {
- name = "cmus-${version}";
+ pname = "cmus";
version = "2.8.0";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/cmusfm/default.nix b/pkgs/applications/audio/cmusfm/default.nix
index 2147a84f24be..54f1050da466 100644
--- a/pkgs/applications/audio/cmusfm/default.nix
+++ b/pkgs/applications/audio/cmusfm/default.nix
@@ -1,8 +1,8 @@
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, curl, libnotify, gdk-pixbuf }:
-stdenv.mkDerivation rec {
+stdenv.mkDerivation {
version = "2018-10-11";
- name = "cmusfm-unstable-${version}";
+ pname = "cmusfm-unstable";
src = fetchFromGitHub {
owner = "Arkq";
repo = "cmusfm";
diff --git a/pkgs/applications/audio/cozy-audiobooks/default.nix b/pkgs/applications/audio/cozy-audiobooks/default.nix
index f9a53f59e4d4..865bc130db91 100644
--- a/pkgs/applications/audio/cozy-audiobooks/default.nix
+++ b/pkgs/applications/audio/cozy-audiobooks/default.nix
@@ -74,7 +74,7 @@ python3Packages.buildPythonApplication rec {
'';
meta = with stdenv.lib; {
- description = "A modern audio book player for Linux using GTK+ 3";
+ description = "A modern audio book player for Linux using GTK 3";
homepage = https://cozy.geigi.de/;
maintainers = [ maintainers.makefu ];
license = licenses.gpl3;
diff --git a/pkgs/applications/audio/csa/default.nix b/pkgs/applications/audio/csa/default.nix
index c3b3b9441357..0b8afada0206 100644
--- a/pkgs/applications/audio/csa/default.nix
+++ b/pkgs/applications/audio/csa/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
- name = "csa-${version}";
+ pname = "csa";
version = "0.5.100810";
src = fetchurl {
- url = "mirror://sourceforge/csa/${name}.tar.gz";
+ url = "mirror://sourceforge/csa/${pname}-${version}.tar.gz";
sha256 = "1syg81dzdil0dyx1mlx1n7if3qsf2iz243p2zv34a1acfqm509r3";
};
diff --git a/pkgs/applications/audio/csound/csound-manual/default.nix b/pkgs/applications/audio/csound/csound-manual/default.nix
index df0fcb0ee9cd..5cc8d71383b7 100644
--- a/pkgs/applications/audio/csound/csound-manual/default.nix
+++ b/pkgs/applications/audio/csound/csound-manual/default.nix
@@ -4,7 +4,7 @@
libxslt
}:
-stdenv.mkDerivation rec {
+stdenv.mkDerivation {
pname = "csound-manual";
version = "unstable-2019-02-22";
diff --git a/pkgs/applications/audio/csound/csound-qt/default.nix b/pkgs/applications/audio/csound/csound-qt/default.nix
index e97341acbb44..d16d93318216 100644
--- a/pkgs/applications/audio/csound/csound-qt/default.nix
+++ b/pkgs/applications/audio/csound/csound-qt/default.nix
@@ -3,13 +3,13 @@
qtwebengine, qtxmlpatterns, rtmidi, fetchpatch }:
stdenv.mkDerivation rec {
- name = "csound-qt-${version}";
+ pname = "csound-qt";
version = "0.9.6-beta3";
src = fetchFromGitHub {
owner = "CsoundQt";
repo = "CsoundQt";
- rev = "${version}";
+ rev = version;
sha256 = "007jhkh0k6qk52r77i067999dwdiimazix6ggp2hvyc4pj6n5dip";
};
diff --git a/pkgs/applications/audio/csound/default.nix b/pkgs/applications/audio/csound/default.nix
index cb968ee9e00f..758448c2fb33 100644
--- a/pkgs/applications/audio/csound/default.nix
+++ b/pkgs/applications/audio/csound/default.nix
@@ -13,7 +13,7 @@
}:
stdenv.mkDerivation rec {
- name = "csound-${version}";
+ pname = "csound";
# When updating, please check if https://github.com/csound/csound/issues/1078
# has been fixed in the new version so we can use the normal fluidsynth
# version and remove fluidsynth 1.x from nixpkgs again.
diff --git a/pkgs/applications/audio/deadbeef/plugins/headerbar-gtk3.nix b/pkgs/applications/audio/deadbeef/plugins/headerbar-gtk3.nix
index dab3a97f6e73..b26360f0c469 100644
--- a/pkgs/applications/audio/deadbeef/plugins/headerbar-gtk3.nix
+++ b/pkgs/applications/audio/deadbeef/plugins/headerbar-gtk3.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, autoconf, automake, libtool, pkgconfig, libxml2, deadbeef, glib, gtk3 }:
stdenv.mkDerivation rec {
- name = "deadbeef-headerbar-gtk3-plugin-${version}";
+ pname = "deadbeef-headerbar-gtk3-plugin";
version = "1.2";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/deadbeef/plugins/infobar.nix b/pkgs/applications/audio/deadbeef/plugins/infobar.nix
index d2355681b728..8a81101983f7 100644
--- a/pkgs/applications/audio/deadbeef/plugins/infobar.nix
+++ b/pkgs/applications/audio/deadbeef/plugins/infobar.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchurl, pkgconfig, deadbeef, gtk3, libxml2 }:
stdenv.mkDerivation rec {
- name = "deadbeef-infobar-plugin-${version}";
+ pname = "deadbeef-infobar-plugin";
version = "1.4";
src = fetchurl {
diff --git a/pkgs/applications/audio/deadbeef/plugins/lyricbar.nix b/pkgs/applications/audio/deadbeef/plugins/lyricbar.nix
index 97e054bda64c..699f9d86f68d 100644
--- a/pkgs/applications/audio/deadbeef/plugins/lyricbar.nix
+++ b/pkgs/applications/audio/deadbeef/plugins/lyricbar.nix
@@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, pkgconfig, deadbeef, gtkmm3, libxmlxx3 }:
-stdenv.mkDerivation rec {
+stdenv.mkDerivation {
pname = "deadbeef-lyricbar-plugin";
version = "unstable-2019-01-29";
diff --git a/pkgs/applications/audio/deadbeef/plugins/mpris2.nix b/pkgs/applications/audio/deadbeef/plugins/mpris2.nix
index 4d5367087c10..5b27f3c3f323 100644
--- a/pkgs/applications/audio/deadbeef/plugins/mpris2.nix
+++ b/pkgs/applications/audio/deadbeef/plugins/mpris2.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, pkgconfig, deadbeef, glib }:
stdenv.mkDerivation rec {
- name = "deadbeef-mpris2-plugin-${version}";
+ pname = "deadbeef-mpris2-plugin";
version = "1.12";
src = fetchurl {
- url = "https://github.com/Serranya/deadbeef-mpris2-plugin/releases/download/v${version}/${name}.tar.xz";
+ url = "https://github.com/Serranya/deadbeef-mpris2-plugin/releases/download/v${version}/${pname}-${version}.tar.xz";
sha256 = "0s3y4ka4qf38cypc0xspy79q0g5y1kqx6ldad7yr6a45nw6j95jh";
};
diff --git a/pkgs/applications/audio/denemo/default.nix b/pkgs/applications/audio/denemo/default.nix
index 6c1536c0a610..331e3fb96989 100644
--- a/pkgs/applications/audio/denemo/default.nix
+++ b/pkgs/applications/audio/denemo/default.nix
@@ -5,12 +5,12 @@
, portaudio, portmidi, fftw, makeWrapper }:
stdenv.mkDerivation rec {
- name = "denemo-${version}";
- version = "2.2.0";
+ pname = "denemo";
+ version = "2.3.0";
src = fetchurl {
url = "https://ftp.gnu.org/gnu/denemo/denemo-${version}.tar.gz";
- sha256 = "18zcs4xmfj4vpzi15dj7k5bjzzzlr3sjf9xhrrgy4samrrdpqzfh";
+ sha256 = "1blkcl3slbsq9jlhwcf2m9v9g38a0sjfhh9advgi2qr1gxri08by";
};
buildInputs = [
diff --git a/pkgs/applications/audio/dfasma/default.nix b/pkgs/applications/audio/dfasma/default.nix
index d16534b03d32..1785ca60060c 100644
--- a/pkgs/applications/audio/dfasma/default.nix
+++ b/pkgs/applications/audio/dfasma/default.nix
@@ -27,7 +27,7 @@ let
};
in stdenv.mkDerivation rec {
- name = "dfasma-${version}";
+ pname = "dfasma";
version = "1.4.5";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/dirt/default.nix b/pkgs/applications/audio/dirt/default.nix
index 6d56f53bd16f..1fcdda408966 100644
--- a/pkgs/applications/audio/dirt/default.nix
+++ b/pkgs/applications/audio/dirt/default.nix
@@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, libsndfile, libsamplerate, liblo, libjack2 }:
-stdenv.mkDerivation rec {
+stdenv.mkDerivation {
name = "dirt-2018-01-01";
src = fetchFromGitHub {
repo = "Dirt";
diff --git a/pkgs/applications/audio/distrho/default.nix b/pkgs/applications/audio/distrho/default.nix
index 1c41451b08f3..054fc758d645 100644
--- a/pkgs/applications/audio/distrho/default.nix
+++ b/pkgs/applications/audio/distrho/default.nix
@@ -8,7 +8,7 @@ let
else if stdenv.hostPlatform.isWindows then "mingw"
else "linux";
in stdenv.mkDerivation rec {
- name = "distrho-ports-${version}";
+ pname = "distrho-ports";
version = "2018-04-16";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/drumgizmo/default.nix b/pkgs/applications/audio/drumgizmo/default.nix
index e5354b060946..86de7df101d1 100644
--- a/pkgs/applications/audio/drumgizmo/default.nix
+++ b/pkgs/applications/audio/drumgizmo/default.nix
@@ -3,12 +3,12 @@
}:
stdenv.mkDerivation rec {
- version = "0.9.17";
- name = "drumgizmo-${version}";
+ version = "0.9.18";
+ pname = "drumgizmo";
src = fetchurl {
- url = "https://www.drumgizmo.org/releases/${name}/${name}.tar.gz";
- sha256 = "177c27kz9srds7a659zz9yhp58z0zsk0ydwww7l3jkjlylm1p8x1";
+ url = "https://www.drumgizmo.org/releases/${pname}-${version}/${pname}-${version}.tar.gz";
+ sha256 = "1vig9pm0dakpk8wa62m9ajj3bz536h0170r8vb98hxbm4wyys8yj";
};
configureFlags = [ "--enable-lv2" ];
diff --git a/pkgs/applications/audio/drumkv1/default.nix b/pkgs/applications/audio/drumkv1/default.nix
index f8e1db4814cc..604fe4c4ab71 100644
--- a/pkgs/applications/audio/drumkv1/default.nix
+++ b/pkgs/applications/audio/drumkv1/default.nix
@@ -1,12 +1,12 @@
{ stdenv, fetchurl, pkgconfig, libjack2, alsaLib, libsndfile, liblo, lv2, qt5 }:
stdenv.mkDerivation rec {
- name = "drumkv1-${version}";
- version = "0.9.9";
+ pname = "drumkv1";
+ version = "0.9.10";
src = fetchurl {
- url = "mirror://sourceforge/drumkv1/${name}.tar.gz";
- sha256 = "02sa29fdjgwcf7izly685gxvga3bxyyqvskvfiisgm2xg3h9r983";
+ url = "mirror://sourceforge/drumkv1/${pname}-${version}.tar.gz";
+ sha256 = "0h08r6vq23dlnag67fcfcpx83wampx4fag82v4bgkqg2sdh64p3n";
};
buildInputs = [ libjack2 alsaLib libsndfile liblo lv2 qt5.qtbase qt5.qttools ];
diff --git a/pkgs/applications/audio/ecasound/default.nix b/pkgs/applications/audio/ecasound/default.nix
index 1013b8a560ca..6c9cd628a518 100644
--- a/pkgs/applications/audio/ecasound/default.nix
+++ b/pkgs/applications/audio/ecasound/default.nix
@@ -14,7 +14,7 @@
# TODO: fix readline, ncurses, lilv, liblo, liboil and python. See configure log.
stdenv.mkDerivation rec {
- name = "ecasound-${version}";
+ pname = "ecasound";
version = "2.9.2";
src = fetchurl {
diff --git a/pkgs/applications/audio/eflite/default.nix b/pkgs/applications/audio/eflite/default.nix
index 4138a07ec067..2338c0ed376e 100644
--- a/pkgs/applications/audio/eflite/default.nix
+++ b/pkgs/applications/audio/eflite/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, fetchpatch, flite, alsaLib, debug ? false }:
stdenv.mkDerivation rec {
- name = "eflite-${version}";
+ pname = "eflite";
version = "0.4.1";
src = fetchurl {
- url = "https://sourceforge.net/projects/eflite/files/eflite/${version}/${name}.tar.gz";
+ url = "https://sourceforge.net/projects/eflite/files/eflite/${version}/${pname}-${version}.tar.gz";
sha256 = "088p9w816s02s64grfs28gai3lnibzdjb9d1jwxzr8smbs2qbbci";
};
diff --git a/pkgs/applications/audio/ekho/default.nix b/pkgs/applications/audio/ekho/default.nix
index 209ffa05bf28..0e2c950051a5 100644
--- a/pkgs/applications/audio/ekho/default.nix
+++ b/pkgs/applications/audio/ekho/default.nix
@@ -5,7 +5,8 @@
let
version = "5.8.2";
in stdenv.mkDerivation rec {
- name = "ekho-${version}";
+ pname = "ekho";
+ inherit version;
meta = with stdenv.lib; {
description = "Chinese text-to-speech software";
@@ -23,7 +24,7 @@ in stdenv.mkDerivation rec {
};
src = fetchurl {
- url = "mirror://sourceforge/e-guidedog/Ekho/${version}/${name}.tar.xz";
+ url = "mirror://sourceforge/e-guidedog/Ekho/${version}/${pname}-${version}.tar.xz";
sha256 = "0ym6lpcpsvwvsiwlzkl1509a2hljwcw7synngrmqjq1n49ww00nj";
};
diff --git a/pkgs/applications/audio/eq10q/default.nix b/pkgs/applications/audio/eq10q/default.nix
index 651604c71a11..0308fad831d0 100644
--- a/pkgs/applications/audio/eq10q/default.nix
+++ b/pkgs/applications/audio/eq10q/default.nix
@@ -1,10 +1,10 @@
{ stdenv, fetchurl, fetchpatch, cmake, fftw, gtkmm2, libxcb, lv2, pkgconfig
, xorg }:
stdenv.mkDerivation rec {
- name = "eq10q-${version}";
+ pname = "eq10q";
version = "2.2";
src = fetchurl {
- url = "mirror://sourceforge/project/eq10q/${name}.tar.gz";
+ url = "mirror://sourceforge/project/eq10q/${pname}-${version}.tar.gz";
sha256 = "16mhcav8gwkp29k9ki4dlkajlcgh1i2wvldabxb046d37dq4qzrk";
};
diff --git a/pkgs/applications/audio/espeak-ng/default.nix b/pkgs/applications/audio/espeak-ng/default.nix
index 5d0af8cf17ab..043d5b9d2d3a 100644
--- a/pkgs/applications/audio/espeak-ng/default.nix
+++ b/pkgs/applications/audio/espeak-ng/default.nix
@@ -4,7 +4,7 @@
, sonicSupport ? true, sonic }:
stdenv.mkDerivation rec {
- name = "espeak-ng-${version}";
+ pname = "espeak-ng";
version = "1.49.2";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/eteroj.lv2/default.nix b/pkgs/applications/audio/eteroj.lv2/default.nix
index 28e4879efdc0..bbfe1ad5623f 100644
--- a/pkgs/applications/audio/eteroj.lv2/default.nix
+++ b/pkgs/applications/audio/eteroj.lv2/default.nix
@@ -3,7 +3,6 @@
stdenv.mkDerivation rec {
pname = "eteroj.lv2";
version = "0.4.0";
- name = "${pname}-${version}";
src = fetchFromGitHub {
owner = "OpenMusicKontrollers";
diff --git a/pkgs/applications/audio/faust/faust1.nix b/pkgs/applications/audio/faust/faust1.nix
index 6e47d921d345..687608b43524 100644
--- a/pkgs/applications/audio/faust/faust1.nix
+++ b/pkgs/applications/audio/faust/faust1.nix
@@ -25,7 +25,8 @@ let
};
faust = stdenv.mkDerivation {
- name = "faust-${version}";
+ pname = "faust";
+ inherit version;
inherit src;
diff --git a/pkgs/applications/audio/faust/faust2.nix b/pkgs/applications/audio/faust/faust2.nix
index 383d2deb10bb..21cd3fbdb25a 100644
--- a/pkgs/applications/audio/faust/faust2.nix
+++ b/pkgs/applications/audio/faust/faust2.nix
@@ -20,7 +20,7 @@ let
src = fetchFromGitHub {
owner = "grame-cncm";
repo = "faust";
- rev = "${version}";
+ rev = version;
sha256 = "1pci8ac6sqrm3mb3yikmmr3iy35g3nj4iihazif1amqkbdz719rc";
fetchSubmodules = true;
};
@@ -35,7 +35,8 @@ let
faust = stdenv.mkDerivation {
- name = "faust-${version}";
+ pname = "faust";
+ inherit version;
inherit src;
diff --git a/pkgs/applications/audio/faust/faustlive.nix b/pkgs/applications/audio/faust/faustlive.nix
index 754c48070603..3b6ca9e4053f 100644
--- a/pkgs/applications/audio/faust/faustlive.nix
+++ b/pkgs/applications/audio/faust/faustlive.nix
@@ -3,8 +3,8 @@
, bc, coreutils, which
}:
-stdenv.mkDerivation rec {
- name = "faustlive-${version}";
+stdenv.mkDerivation {
+ pname = "faustlive";
version = "2017-12-05";
src = fetchFromGitHub {
owner = "grame-cncm";
diff --git a/pkgs/applications/audio/flac/default.nix b/pkgs/applications/audio/flac/default.nix
index fb5390cb46ef..df3aa987c3fb 100644
--- a/pkgs/applications/audio/flac/default.nix
+++ b/pkgs/applications/audio/flac/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, libogg }:
stdenv.mkDerivation rec {
- name = "flac-1.3.2";
+ name = "flac-1.3.3";
src = fetchurl {
url = "http://downloads.xiph.org/releases/flac/${name}.tar.xz";
- sha256 = "0gymm2j3276kr9nz6vmgfwsdfrq6c449n40a0mzz8h6wc7nw7kwi";
+ sha256 = "0j0p9sf56a2fm2hkjnf7x3py5ir49jyavg4q5zdyd7bcf6yq4gi1";
};
buildInputs = [ libogg ];
diff --git a/pkgs/applications/audio/flac123/default.nix b/pkgs/applications/audio/flac123/default.nix
index f0863bfc50b0..19ed23523556 100644
--- a/pkgs/applications/audio/flac123/default.nix
+++ b/pkgs/applications/audio/flac123/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, autoreconfHook, flac, libao, libogg, popt }:
stdenv.mkDerivation rec {
- name = "flac123-${version}";
+ pname = "flac123";
version = "0.0.12";
src = fetchurl {
- url = "mirror://sourceforge/flac-tools/${name}-release.tar.gz";
+ url = "mirror://sourceforge/flac-tools/${pname}-${version}-release.tar.gz";
sha256 = "0zg4ahkg7v81za518x32wldf42g0rrvlrcqhrg9sv3li9bayyxhr";
};
diff --git a/pkgs/applications/audio/flacon/default.nix b/pkgs/applications/audio/flacon/default.nix
index 2d2d88308cc1..9dd5da4c1a90 100644
--- a/pkgs/applications/audio/flacon/default.nix
+++ b/pkgs/applications/audio/flacon/default.nix
@@ -4,14 +4,14 @@
}:
stdenv.mkDerivation rec {
- name = "flacon-${version}";
- version = "5.4.0";
+ pname = "flacon";
+ version = "5.5.1";
src = fetchFromGitHub {
owner = "flacon";
repo = "flacon";
rev = "v${version}";
- sha256 = "1j8gzk92kn10yb7rmvrnyq0ipda2swnkmsavqsk5ws0z600p3k93";
+ sha256 = "05pvg5xhc2azwzld08m81r4b2krqdbcbm5lmdvg2zkk67xq9pqyd";
};
nativeBuildInputs = [ cmake pkgconfig makeWrapper ];
diff --git a/pkgs/applications/audio/fluidsynth/default.nix b/pkgs/applications/audio/fluidsynth/default.nix
index 404c9cc825e9..8e2895bf8478 100644
--- a/pkgs/applications/audio/fluidsynth/default.nix
+++ b/pkgs/applications/audio/fluidsynth/default.nix
@@ -11,15 +11,15 @@ let
sha256 = "0n75jq3xgq46hfmjkaaxz3gic77shs4fzajq40c8gk043i84xbdh";
};
"2" = {
- fluidsynthVersion = "2.0.5";
- sha256 = "0rv0apxbj0cgm8f8sqf5xr6kdi4q58ph92ip6cg716ha0ca5lr8y";
+ fluidsynthVersion = "2.0.6";
+ sha256 = "0nas9pp9r8rnziznxm65x2yzf1ryg98zr3946g0br3s38sjf8l3a";
};
};
in
with versionMap.${version};
-stdenv.mkDerivation rec {
+stdenv.mkDerivation {
name = "fluidsynth-${fluidsynthVersion}";
version = fluidsynthVersion;
diff --git a/pkgs/applications/audio/fmit/default.nix b/pkgs/applications/audio/fmit/default.nix
index a61f7dc0a905..ee45217e4909 100644
--- a/pkgs/applications/audio/fmit/default.nix
+++ b/pkgs/applications/audio/fmit/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, fftw, qtbase, qtmultimedia, qmake
+{ stdenv, mkDerivation, fetchFromGitHub, fftw, qtbase, qtmultimedia, qmake, itstool, wrapQtAppsHook
, alsaSupport ? true, alsaLib ? null
, jackSupport ? false, libjack2 ? null
, portaudioSupport ? false, portaudio ? null }:
@@ -9,18 +9,18 @@ assert portaudioSupport -> portaudio != null;
with stdenv.lib;
-stdenv.mkDerivation rec {
- name = "fmit-${version}";
- version = "1.1.14";
+mkDerivation rec {
+ pname = "fmit";
+ version = "1.2.13";
src = fetchFromGitHub {
- sha256 = "18gvl8smcnigzldy1acs5h8rscf287b39xi4y2cl5armqbj0y38x";
- rev = "v${version}";
- repo = "fmit";
owner = "gillesdegottex";
+ repo = "fmit";
+ rev = "v${version}";
+ sha256 = "1qyskam053pvlap1av80rgp12pzhr92rs88vqs6s0ia3ypnixcc6";
};
- nativeBuildInputs = [ qmake ];
+ nativeBuildInputs = [ qmake itstool wrapQtAppsHook ];
buildInputs = [ fftw qtbase qtmultimedia ]
++ optionals alsaSupport [ alsaLib ]
++ optionals jackSupport [ libjack2 ]
diff --git a/pkgs/applications/audio/fmsynth/default.nix b/pkgs/applications/audio/fmsynth/default.nix
index 58d095080fe5..5e95d7179689 100644
--- a/pkgs/applications/audio/fmsynth/default.nix
+++ b/pkgs/applications/audio/fmsynth/default.nix
@@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, gtkmm2, lv2, lvtk, pkgconfig }:
-stdenv.mkDerivation rec {
- name = "fmsynth-unstable-${version}";
+stdenv.mkDerivation {
+ pname = "fmsynth-unstable";
version = "2015-02-07";
src = fetchFromGitHub {
owner = "Themaister";
diff --git a/pkgs/applications/audio/fomp/default.nix b/pkgs/applications/audio/fomp/default.nix
index 680fab4ca643..a92d331baadb 100644
--- a/pkgs/applications/audio/fomp/default.nix
+++ b/pkgs/applications/audio/fomp/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, lv2, pkgconfig, python2, wafHook }:
stdenv.mkDerivation rec {
- name = "fomp-${version}";
+ pname = "fomp";
version = "1.0.0";
src = fetchurl {
- url = "https://download.drobilla.net/${name}.tar.bz2";
+ url = "https://download.drobilla.net/${pname}-${version}.tar.bz2";
sha256 = "1hh2xhknanqn3iwp12ihl6bf8p7bqxryms9qk7mh21lixl42b8k5";
};
diff --git a/pkgs/applications/audio/foo-yc20/default.nix b/pkgs/applications/audio/foo-yc20/default.nix
index 28b2cd98e02c..b17561e1567a 100644
--- a/pkgs/applications/audio/foo-yc20/default.nix
+++ b/pkgs/applications/audio/foo-yc20/default.nix
@@ -1,8 +1,8 @@
{ stdenv, fetchFromGitHub, libjack2, gtk2, lv2, faust, pkgconfig }:
-stdenv.mkDerivation rec {
+stdenv.mkDerivation {
version = "git-2015-05-21";
- name = "foo-yc20-${version}";
+ pname = "foo-yc20";
src = fetchFromGitHub {
owner = "sampov2";
repo = "foo-yc20";
diff --git a/pkgs/applications/audio/freewheeling/default.nix b/pkgs/applications/audio/freewheeling/default.nix
index efb832ae625f..a2588093309d 100644
--- a/pkgs/applications/audio/freewheeling/default.nix
+++ b/pkgs/applications/audio/freewheeling/default.nix
@@ -7,7 +7,7 @@ let
in
stdenv.mkDerivation rec {
- name = "freewheeling-${version}";
+ pname = "freewheeling";
version = "0.6.5";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/friture/default.nix b/pkgs/applications/audio/friture/default.nix
new file mode 100644
index 000000000000..eae4b6516858
--- /dev/null
+++ b/pkgs/applications/audio/friture/default.nix
@@ -0,0 +1,45 @@
+{ lib, fetchFromGitHub, python3Packages, wrapQtAppsHook }:
+
+let
+ py = python3Packages;
+in py.buildPythonApplication rec {
+ pname = "friture";
+ version = "0.37";
+
+ src = fetchFromGitHub {
+ owner = "tlecomte";
+ repo = pname;
+ rev = "v${version}";
+ sha256 = "1ivy5qfd90w1s1icsphvvdnnqz563v3fhg5pws2zn4483cgnzc2y";
+ };
+
+ # module imports scipy.misc.factorial, but it has been removed since scipy
+ # 1.3.0; use scipy.special.factorial instead
+ patches = [ ./factorial.patch ];
+
+ nativeBuildInputs = (with py; [ numpy cython scipy ]) ++
+ [ wrapQtAppsHook ];
+
+ propagatedBuildInputs = with py; [
+ sounddevice
+ pyopengl
+ docutils
+ numpy
+ pyqt5
+ appdirs
+ pyrr
+ ];
+
+ postFixup = ''
+ wrapQtApp $out/bin/friture
+ wrapQtApp $out/bin/.friture-wrapped
+ '';
+
+ meta = with lib; {
+ description = "A real-time audio analyzer";
+ homepage = "http://friture.org/";
+ license = licenses.gpl3;
+ platforms = platforms.linux; # fails on Darwin
+ maintainers = [ maintainers.laikq ];
+ };
+}
diff --git a/pkgs/applications/audio/friture/factorial.patch b/pkgs/applications/audio/friture/factorial.patch
new file mode 100644
index 000000000000..de053802932d
--- /dev/null
+++ b/pkgs/applications/audio/friture/factorial.patch
@@ -0,0 +1,13 @@
+diff --git a/friture/filter_design.py b/friture/filter_design.py
+index 9876c43..1cc749a 100644
+--- a/friture/filter_design.py
++++ b/friture/filter_design.py
+@@ -2,7 +2,7 @@
+ from numpy import pi, exp, arange, cos, sin, sqrt, zeros, ones, log, arange, set_printoptions
+ # the three following lines are a workaround for a bug with scipy and py2exe
+ # together. See http://www.pyinstaller.org/ticket/83 for reference.
+-from scipy.misc import factorial
++from scipy.special import factorial
+ import scipy
+ scipy.factorial = factorial
+
diff --git a/pkgs/applications/audio/game-music-emu/default.nix b/pkgs/applications/audio/game-music-emu/default.nix
index a0a79785283c..d95b3eea596d 100644
--- a/pkgs/applications/audio/game-music-emu/default.nix
+++ b/pkgs/applications/audio/game-music-emu/default.nix
@@ -2,10 +2,10 @@
stdenv.mkDerivation rec {
version = "0.6.1";
- name = "game-music-emu-${version}";
+ pname = "game-music-emu";
src = fetchurl {
- url = "https://bitbucket.org/mpyne/game-music-emu/downloads/${name}.tar.bz2";
+ url = "https://bitbucket.org/mpyne/game-music-emu/downloads/${pname}-${version}.tar.bz2";
sha256 = "08fk7zddpn7v93d0fa7fcypx7hvgwx9b5psj9l6m8b87k2hbw4fw";
};
diff --git a/pkgs/applications/audio/gigedit/default.nix b/pkgs/applications/audio/gigedit/default.nix
index e9ce20f6c80a..b8ec2d7116f5 100644
--- a/pkgs/applications/audio/gigedit/default.nix
+++ b/pkgs/applications/audio/gigedit/default.nix
@@ -3,16 +3,14 @@
}:
stdenv.mkDerivation rec {
- name = "gigedit-${version}";
- version = "1.1.0";
+ pname = "gigedit";
+ version = "1.1.1";
src = fetchurl {
- url = "https://download.linuxsampler.org/packages/${name}.tar.bz2";
- sha256 = "087pc919q28r1vw31c7w4m14bqnp4md1i2wbmk8w0vmwv2cbx2ni";
+ url = "https://download.linuxsampler.org/packages/${pname}-${version}.tar.bz2";
+ sha256 = "08db12crwf0dy1dbyrmivqqpg5zicjikqkmf2kb1ywpq0a9hcxrb";
};
- patches = [ ./gigedit-1.1.0-pangomm-2.40.1.patch ];
-
preConfigure = "make -f Makefile.svn";
nativeBuildInputs = [ autoconf automake intltool libtool pkgconfig which ];
diff --git a/pkgs/applications/audio/gigedit/gigedit-1.1.0-pangomm-2.40.1.patch b/pkgs/applications/audio/gigedit/gigedit-1.1.0-pangomm-2.40.1.patch
deleted file mode 100644
index eb00fcc87a24..000000000000
--- a/pkgs/applications/audio/gigedit/gigedit-1.1.0-pangomm-2.40.1.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/src/gigedit/wrapLabel.cc
-+++ b/src/gigedit/wrapLabel.cc
-@@ -64,12 +64,7 @@ WrapLabel::WrapLabel(const Glib::ustring &text) // IN: The label text
- : mWrapWidth(0),
- mWrapHeight(0)
- {
-- // pangomm >= 2.35.1
--#if PANGOMM_MAJOR_VERSION > 2 || (PANGOMM_MAJOR_VERSION == 2 && (PANGOMM_MINOR_VERSION > 35 || (PANGOMM_MINOR_VERSION == 35 && PANGOMM_MICRO_VERSION >= 1)))
-- get_layout()->set_wrap(Pango::WrapMode::WORD_CHAR);
--#else
- get_layout()->set_wrap(Pango::WRAP_WORD_CHAR);
--#endif
- set_alignment(0.0, 0.0);
- set_text(text);
- }
diff --git a/pkgs/applications/audio/gmpc/default.nix b/pkgs/applications/audio/gmpc/default.nix
index 099e4428016e..cae35b625190 100644
--- a/pkgs/applications/audio/gmpc/default.nix
+++ b/pkgs/applications/audio/gmpc/default.nix
@@ -4,7 +4,7 @@
}:
stdenv.mkDerivation rec {
- name = "gmpc-${version}";
+ pname = "gmpc";
version = "11.8.16";
libmpd = stdenv.mkDerivation {
@@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
homepage = https://gmpclient.org;
description = "A GTK2 frontend for Music Player Daemon";
license = licenses.gpl2;
- maintainers = [ maintainers.rickynils ];
+ maintainers = [];
platforms = platforms.linux;
};
}
diff --git a/pkgs/applications/audio/gnome-podcasts/default.nix b/pkgs/applications/audio/gnome-podcasts/default.nix
index 3981bc792769..eeafdc80344d 100644
--- a/pkgs/applications/audio/gnome-podcasts/default.nix
+++ b/pkgs/applications/audio/gnome-podcasts/default.nix
@@ -3,9 +3,9 @@
# TODO: build from git for easier updates
# rustPlatform.buildRustPackage rec {
-stdenv.mkDerivation rec {
+stdenv.mkDerivation {
version = "0.4.6";
- name = "gnome-podcasts-${version}";
+ pname = "gnome-podcasts";
src = fetchurl {
url = https://gitlab.gnome.org/World/podcasts/uploads/e59ac5d618d7daf4c7f33ba72957c466/gnome-podcasts-0.4.6.tar.xz;
diff --git a/pkgs/applications/audio/google-play-music-desktop-player/default.nix b/pkgs/applications/audio/google-play-music-desktop-player/default.nix
index 7716b1e0c355..b51b72f1c8a4 100644
--- a/pkgs/applications/audio/google-play-music-desktop-player/default.nix
+++ b/pkgs/applications/audio/google-play-music-desktop-player/default.nix
@@ -43,7 +43,8 @@ let
in
stdenv.mkDerivation {
- name = "google-play-music-desktop-player-${version}";
+ pname = "google-play-music-desktop-player";
+ inherit version;
src = fetchurl {
url = "https://github.com/MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-/releases/download/v${version}/google-play-music-desktop-player_${version}_amd64.deb";
diff --git a/pkgs/applications/audio/gradio/default.nix b/pkgs/applications/audio/gradio/default.nix
index 3aea07235d8a..487b0a730d83 100644
--- a/pkgs/applications/audio/gradio/default.nix
+++ b/pkgs/applications/audio/gradio/default.nix
@@ -16,16 +16,17 @@
, gst_plugins ? with gst_all_1; [ gst-plugins-good gst-plugins-ugly ]
}:
let
- version = "7.2";
+ version = "7.3";
-in stdenv.mkDerivation rec {
- name = "gradio-${version}";
+in stdenv.mkDerivation {
+ pname = "gradio";
+ inherit version;
src = fetchFromGitHub {
owner = "haecker-felix";
repo = "gradio";
rev = "v${version}";
- sha256 = "0c4vlrfl0ljkiwarpwa8wcfmmihh6a5j4pi4yr0qshyl9xxvxiv3";
+ sha256 = "00982dynl36lpsrx3mkd2a479zsrc8jvwfb8i7pi6w7fzzd8n8bl";
};
nativeBuildInputs = [
diff --git a/pkgs/applications/audio/greg/default.nix b/pkgs/applications/audio/greg/default.nix
index e7a23b6f204c..e027680f5fe6 100644
--- a/pkgs/applications/audio/greg/default.nix
+++ b/pkgs/applications/audio/greg/default.nix
@@ -3,7 +3,6 @@
with pythonPackages; buildPythonApplication rec {
pname = "greg";
version = "0.4.7";
- name = pname + "-" + version;
disabled = !isPy3k;
diff --git a/pkgs/applications/audio/gtkpod/default.nix b/pkgs/applications/audio/gtkpod/default.nix
index e01dbc1d30fe..fd3632ee1552 100644
--- a/pkgs/applications/audio/gtkpod/default.nix
+++ b/pkgs/applications/audio/gtkpod/default.nix
@@ -4,10 +4,10 @@
stdenv.mkDerivation rec {
version = "2.1.5";
- name = "gtkpod-${version}";
+ pname = "gtkpod";
src = fetchurl {
- url = "mirror://sourceforge/gtkpod/${name}.tar.gz";
+ url = "mirror://sourceforge/gtkpod/${pname}-${version}.tar.gz";
sha256 = "0xisrpx069f7bjkyc8vqxb4k0480jmx1wscqxr6cpq1qj6pchzd5";
};
diff --git a/pkgs/applications/audio/guitarix/default.nix b/pkgs/applications/audio/guitarix/default.nix
index 9df4308131eb..91f4b1dcdfe9 100644
--- a/pkgs/applications/audio/guitarix/default.nix
+++ b/pkgs/applications/audio/guitarix/default.nix
@@ -11,7 +11,7 @@ let
in
stdenv.mkDerivation rec {
- name = "guitarix-${version}";
+ pname = "guitarix";
version = "0.38.1";
src = fetchurl {
diff --git a/pkgs/applications/audio/gxplugins-lv2/default.nix b/pkgs/applications/audio/gxplugins-lv2/default.nix
index 04cb57800f95..1f4323eb9d55 100644
--- a/pkgs/applications/audio/gxplugins-lv2/default.nix
+++ b/pkgs/applications/audio/gxplugins-lv2/default.nix
@@ -1,7 +1,6 @@
{ stdenv, fetchFromGitHub, xorg, xorgproto, cairo, lv2, pkgconfig }:
stdenv.mkDerivation rec {
- name = "${pname}-${version}";
pname = "GxPlugins.lv2";
version = "0.7";
diff --git a/pkgs/applications/audio/helm/default.nix b/pkgs/applications/audio/helm/default.nix
index fa76a1a26e82..64de722afe9e 100644
--- a/pkgs/applications/audio/helm/default.nix
+++ b/pkgs/applications/audio/helm/default.nix
@@ -1,9 +1,9 @@
{ stdenv, fetchFromGitHub , xorg, freetype, alsaLib, curl, libjack2
, lv2, pkgconfig, libGLU_combined }:
- stdenv.mkDerivation rec {
+ stdenv.mkDerivation {
version = "0.9.0";
- name = "helm-${version}";
+ pname = "helm";
src = fetchFromGitHub {
owner = "mtytel";
diff --git a/pkgs/applications/audio/hydrogen/default.nix b/pkgs/applications/audio/hydrogen/default.nix
index d68bfbf2ae4e..50093f8a61de 100644
--- a/pkgs/applications/audio/hydrogen/default.nix
+++ b/pkgs/applications/audio/hydrogen/default.nix
@@ -3,7 +3,7 @@
stdenv.mkDerivation rec {
version = "0.9.7";
- name = "hydrogen-${version}";
+ pname = "hydrogen";
src = fetchurl {
url = "https://github.com/hydrogen-music/hydrogen/archive/${version}.tar.gz";
diff --git a/pkgs/applications/audio/i-score/default.nix b/pkgs/applications/audio/i-score/default.nix
index 69fc4b419c06..2cc39e649434 100644
--- a/pkgs/applications/audio/i-score/default.nix
+++ b/pkgs/applications/audio/i-score/default.nix
@@ -27,7 +27,7 @@
stdenv.mkDerivation rec {
version = "1.0.0-b31";
- name = "i-score-${version}";
+ pname = "i-score";
src = fetchFromGitHub {
owner = "OSSIA";
diff --git a/pkgs/applications/audio/iannix/default.nix b/pkgs/applications/audio/iannix/default.nix
index c26980e1bb26..a893390d74ed 100644
--- a/pkgs/applications/audio/iannix/default.nix
+++ b/pkgs/applications/audio/iannix/default.nix
@@ -1,8 +1,8 @@
{ stdenv, fetchFromGitHub, alsaLib, pkgconfig, qtbase, qtscript, qmake
}:
-stdenv.mkDerivation rec {
- name = "iannix-${version}";
+stdenv.mkDerivation {
+ pname = "iannix";
version = "2016-01-31";
src = fetchFromGitHub {
owner = "iannix";
diff --git a/pkgs/applications/audio/id3v2/default.nix b/pkgs/applications/audio/id3v2/default.nix
index d2720fcace67..0fdb3b2a4a14 100644
--- a/pkgs/applications/audio/id3v2/default.nix
+++ b/pkgs/applications/audio/id3v2/default.nix
@@ -1,11 +1,11 @@
{stdenv, fetchurl, id3lib, groff, zlib}:
stdenv.mkDerivation rec {
- name = "id3v2-${version}";
+ pname = "id3v2";
version = "0.1.12";
src = fetchurl {
- url = "mirror://sourceforge/id3v2/${name}.tar.gz";
+ url = "mirror://sourceforge/id3v2/${pname}-${version}.tar.gz";
sha256 = "1gr22w8gar7zh5pyyvdy7cy26i47l57jp1l1nd60xfwx339zl1c1";
};
diff --git a/pkgs/applications/audio/infamousPlugins/default.nix b/pkgs/applications/audio/infamousPlugins/default.nix
index 2b8c041a0740..341c41818421 100644
--- a/pkgs/applications/audio/infamousPlugins/default.nix
+++ b/pkgs/applications/audio/infamousPlugins/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, pkgconfig, cairomm, cmake, lv2, libpthreadstubs, libXdmcp, libXft, ntk, pcre, fftwFloat, zita-resampler }:
stdenv.mkDerivation rec {
- name = "infamousPlugins-${version}";
+ pname = "infamousPlugins";
version = "0.3.0";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/ir.lv2/default.nix b/pkgs/applications/audio/ir.lv2/default.nix
index 84be6b866fae..9d3656a81f97 100644
--- a/pkgs/applications/audio/ir.lv2/default.nix
+++ b/pkgs/applications/audio/ir.lv2/default.nix
@@ -1,13 +1,13 @@
{ stdenv, fetchFromGitHub, fftw, gtk2, lv2, libsamplerate, libsndfile, pkgconfig, zita-convolver }:
stdenv.mkDerivation rec {
- name = "ir.lv2-${version}";
+ pname = "ir.lv2";
version = "1.2.4";
src = fetchFromGitHub {
owner = "tomszilagyi";
repo = "ir.lv2";
- rev = "${version}";
+ rev = version;
sha256 = "1p6makmgr898fakdxzl4agh48qqwgv1k1kwm8cgq187n0mhiknp6";
};
diff --git a/pkgs/applications/audio/jaaa/default.nix b/pkgs/applications/audio/jaaa/default.nix
index 33c74f2b0443..92b2f8ac5153 100644
--- a/pkgs/applications/audio/jaaa/default.nix
+++ b/pkgs/applications/audio/jaaa/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, alsaLib, libclthreads, libclxclient, libX11, libXft, libXrender, fftwFloat, libjack2, zita-alsa-pcmi }:
stdenv.mkDerivation rec {
- name = "jaaa-${version}";
+ pname = "jaaa";
version = "0.9.2";
src = fetchurl {
- url = "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/${name}.tar.bz2";
+ url = "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pname}-${version}.tar.bz2";
sha256 = "1czksxx2g8na07k7g57qlz0vvkkgi5bzajcx7vc7jhb94hwmmxbc";
};
diff --git a/pkgs/applications/audio/jack-capture/default.nix b/pkgs/applications/audio/jack-capture/default.nix
index f11bba34c74c..c62ccc4fc883 100644
--- a/pkgs/applications/audio/jack-capture/default.nix
+++ b/pkgs/applications/audio/jack-capture/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, libjack2, libsndfile, pkgconfig }:
stdenv.mkDerivation rec {
- name = "jack_capture-${version}";
+ pname = "jack_capture";
version = "0.9.73";
src = fetchurl {
- url = "https://archive.notam02.no/arkiv/src/${name}.tar.gz";
+ url = "https://archive.notam02.no/arkiv/src/${pname}-${version}.tar.gz";
sha256 = "1pji0zdwm3kxjrkbzj7fnxhr8ncrc8pyqnwyrh47fhypgqjv1br1";
};
diff --git a/pkgs/applications/audio/jack-oscrolloscope/default.nix b/pkgs/applications/audio/jack-oscrolloscope/default.nix
index 75a8a6a4b1a1..d31bc981e0cb 100644
--- a/pkgs/applications/audio/jack-oscrolloscope/default.nix
+++ b/pkgs/applications/audio/jack-oscrolloscope/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, SDL, libjack2, libGLU_combined, pkgconfig }:
stdenv.mkDerivation rec {
- name = "jack_oscrolloscope-${version}";
+ pname = "jack_oscrolloscope";
version = "0.7";
src = fetchurl {
- url = "http://das.nasophon.de/download/${name}.tar.gz";
+ url = "http://das.nasophon.de/download/${pname}-${version}.tar.gz";
sha256 = "1pl55in0sj7h5r06n1v91im7d18pplvhbjhjm1fdl39zwnyxiash";
};
diff --git a/pkgs/applications/audio/jackmix/default.nix b/pkgs/applications/audio/jackmix/default.nix
index 83644dd5ea51..fe7c83dd56f1 100644
--- a/pkgs/applications/audio/jackmix/default.nix
+++ b/pkgs/applications/audio/jackmix/default.nix
@@ -1,6 +1,6 @@
{ stdenv, fetchurl, pkgconfig, scons, qt4, lash, libjack2, jack ? libjack2 }:
-stdenv.mkDerivation rec {
+stdenv.mkDerivation {
name = "jackmix-0.5.2";
src = fetchurl {
url = https://github.com/kampfschlaefer/jackmix/archive/v0.5.2.tar.gz;
diff --git a/pkgs/applications/audio/jalv/default.nix b/pkgs/applications/audio/jalv/default.nix
index 0f1ed143dddd..a40d5101b34f 100644
--- a/pkgs/applications/audio/jalv/default.nix
+++ b/pkgs/applications/audio/jalv/default.nix
@@ -2,11 +2,11 @@
, serd, sord , sratom, suil, wafHook }:
stdenv.mkDerivation rec {
- name = "jalv-${version}";
+ pname = "jalv";
version = "1.6.2";
src = fetchurl {
- url = "https://download.drobilla.net/${name}.tar.bz2";
+ url = "https://download.drobilla.net/${pname}-${version}.tar.bz2";
sha256 = "13al2hb9s3m7jgbg051x704bmzmcg4wb56cfh8z588kiyh0mxpaa";
};
diff --git a/pkgs/applications/audio/japa/default.nix b/pkgs/applications/audio/japa/default.nix
index 18b7bcd1d568..a9eb15aabf35 100644
--- a/pkgs/applications/audio/japa/default.nix
+++ b/pkgs/applications/audio/japa/default.nix
@@ -2,10 +2,10 @@
stdenv.mkDerivation rec {
version = "0.9.2";
- name = "japa-${version}";
+ pname = "japa";
src = fetchurl {
- url = "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/${name}.tar.bz2";
+ url = "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pname}-${version}.tar.bz2";
sha256 = "1zmi4wg23hwsypg3h6y3qb72cbrihqcs19qrbzgs5a67d13q4897";
};
diff --git a/pkgs/applications/audio/keyfinder-cli/default.nix b/pkgs/applications/audio/keyfinder-cli/default.nix
index 344e6894baf5..4bb1d63a1e71 100644
--- a/pkgs/applications/audio/keyfinder-cli/default.nix
+++ b/pkgs/applications/audio/keyfinder-cli/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, libav, libkeyfinder }:
stdenv.mkDerivation rec {
- name = "keyfinder-cli-${version}";
+ pname = "keyfinder-cli";
version = "2015-09-13";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/keyfinder/default.nix b/pkgs/applications/audio/keyfinder/default.nix
index 55039e8508bc..d47fc3b6190d 100644
--- a/pkgs/applications/audio/keyfinder/default.nix
+++ b/pkgs/applications/audio/keyfinder/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, libav_0_8, libkeyfinder, qtbase, qtxmlpatterns, qmake, taglib }:
stdenv.mkDerivation rec {
- name = "keyfinder-${version}";
+ pname = "keyfinder";
version = "2.2";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/kid3/default.nix b/pkgs/applications/audio/kid3/default.nix
index 04d0349c88f6..75ffd083a5a4 100644
--- a/pkgs/applications/audio/kid3/default.nix
+++ b/pkgs/applications/audio/kid3/default.nix
@@ -8,12 +8,12 @@
stdenv.mkDerivation rec {
- name = "kid3-${version}";
- version = "3.7.1";
+ pname = "kid3";
+ version = "3.8.0";
src = fetchurl {
- url = "mirror://sourceforge/project/kid3/kid3/${version}/${name}.tar.gz";
- sha256 = "0xkrsjrbr3z8cn8hjf623l28r3b755gr11i0clv8d8i3s10vhbd8";
+ url = "mirror://sourceforge/project/kid3/kid3/${version}/${pname}-${version}.tar.gz";
+ sha256 = "1a6ixkkdp1fl3arylx06w73mwf26i0ibyplwwcn2kw5xsfxmbjp6";
};
nativeBuildInputs = [ wrapQtAppsHook ];
diff --git a/pkgs/applications/audio/klick/default.nix b/pkgs/applications/audio/klick/default.nix
index 5e54609f8bf0..f33245d8f1c9 100644
--- a/pkgs/applications/audio/klick/default.nix
+++ b/pkgs/applications/audio/klick/default.nix
@@ -2,11 +2,11 @@
, libsamplerate, libsndfile, liblo, libjack2, boost }:
stdenv.mkDerivation rec {
- name = "klick-${version}";
+ pname = "klick";
version = "0.12.2";
src = fetchurl {
- url = "http://das.nasophon.de/download/${name}.tar.gz";
+ url = "http://das.nasophon.de/download/${pname}-${version}.tar.gz";
sha256 = "1289533c0849b1b66463bf27f7ce5f71736b655cfb7672ef884c7e6eb957ac42";
};
diff --git a/pkgs/applications/audio/ladspa-plugins/default.nix b/pkgs/applications/audio/ladspa-plugins/default.nix
index a60b3db2fb86..44186abc3c46 100644
--- a/pkgs/applications/audio/ladspa-plugins/default.nix
+++ b/pkgs/applications/audio/ladspa-plugins/default.nix
@@ -2,7 +2,7 @@
, perlPackages }:
stdenv.mkDerivation rec {
- name = "swh-plugins-${version}";
+ pname = "swh-plugins";
version = "0.4.17";
diff --git a/pkgs/applications/audio/ladspa-sdk/default.nix b/pkgs/applications/audio/ladspa-sdk/default.nix
index 72bb7010b627..a7779ee8aeea 100644
--- a/pkgs/applications/audio/ladspa-sdk/default.nix
+++ b/pkgs/applications/audio/ladspa-sdk/default.nix
@@ -1,6 +1,6 @@
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
- name = "ladspa-sdk-${version}";
+ pname = "ladspa-sdk";
version = "1.15";
src = fetchurl {
url = "https://www.ladspa.org/download/ladspa_sdk_${version}.tgz";
diff --git a/pkgs/applications/audio/ladspa-sdk/ladspah.nix b/pkgs/applications/audio/ladspa-sdk/ladspah.nix
index b57b7283b850..3fad5de1de59 100644
--- a/pkgs/applications/audio/ladspa-sdk/ladspah.nix
+++ b/pkgs/applications/audio/ladspa-sdk/ladspah.nix
@@ -1,6 +1,6 @@
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
- name = "ladspa.h-${version}";
+ pname = "ladspa.h";
version = "1.15";
src = fetchurl {
url = "https://www.ladspa.org/download/ladspa_sdk_${version}.tgz";
diff --git a/pkgs/applications/audio/lash/default.nix b/pkgs/applications/audio/lash/default.nix
index 7fb5a01e2c80..e96972b0d1b1 100644
--- a/pkgs/applications/audio/lash/default.nix
+++ b/pkgs/applications/audio/lash/default.nix
@@ -4,11 +4,11 @@
assert libuuid != null;
stdenv.mkDerivation rec {
- name = "lash-${version}";
+ pname = "lash";
version = "0.5.4";
src = fetchurl {
- url = "mirror://savannah/lash/${name}.tar.gz";
+ url = "mirror://savannah/lash/${pname}-${version}.tar.gz";
sha256 = "05kc4brcx8mncai0rj2gz4s4bsrsy9q8xlnaddf75i0m8jl7snhh";
};
diff --git a/pkgs/applications/audio/linuxband/default.nix b/pkgs/applications/audio/linuxband/default.nix
index a8e33c23dc0d..b5a99150cb22 100644
--- a/pkgs/applications/audio/linuxband/default.nix
+++ b/pkgs/applications/audio/linuxband/default.nix
@@ -4,10 +4,10 @@ let
inherit (python2Packages) pyGtkGlade pygtksourceview python;
in stdenv.mkDerivation rec {
version = "12.02.1";
- name = "linuxband-${version}";
+ pname = "linuxband";
src = fetchurl {
- url = "http://linuxband.org/assets/sources/${name}.tar.gz";
+ url = "http://linuxband.org/assets/sources/${pname}-${version}.tar.gz";
sha256 = "1r71h4yg775m4gax4irrvygmrsclgn503ykmc2qwjsxa42ri4n2n";
};
diff --git a/pkgs/applications/audio/linuxsampler/default.nix b/pkgs/applications/audio/linuxsampler/default.nix
index f173e41321f0..f13f10d15e82 100644
--- a/pkgs/applications/audio/linuxsampler/default.nix
+++ b/pkgs/applications/audio/linuxsampler/default.nix
@@ -2,12 +2,12 @@
, alsaLib, asio, libjack2, libgig, libsndfile, lv2 }:
stdenv.mkDerivation rec {
- name = "linuxsampler-${version}";
- version = "2.1.0";
+ pname = "linuxsampler";
+ version = "2.1.1";
src = fetchurl {
- url = "https://download.linuxsampler.org/packages/${name}.tar.bz2";
- sha256 = "0fdxpw7jjfi058l95131d6d8538h05z7n94l60i6mhp9xbplj2jf";
+ url = "https://download.linuxsampler.org/packages/${pname}-${version}.tar.bz2";
+ sha256 = "1gijf50x5xbpya5dj3v2mzj7azx4qk9p012csgddp73f0qi0n190";
};
preConfigure = ''
diff --git a/pkgs/applications/audio/lmms/default.nix b/pkgs/applications/audio/lmms/default.nix
index 59e94e0bdad5..d22065eb9fe0 100644
--- a/pkgs/applications/audio/lmms/default.nix
+++ b/pkgs/applications/audio/lmms/default.nix
@@ -4,7 +4,7 @@
, qtbase, qtx11extras, qttools, SDL ? null }:
stdenv.mkDerivation rec {
- name = "lmms-${version}";
+ pname = "lmms";
version = "1.2.0-rc7";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/lollypop/default.nix b/pkgs/applications/audio/lollypop/default.nix
index 464552584a45..df3d788f51f0 100644
--- a/pkgs/applications/audio/lollypop/default.nix
+++ b/pkgs/applications/audio/lollypop/default.nix
@@ -11,17 +11,15 @@
, appstream-glib
, desktop-file-utils
, totem-pl-parser
-, hicolor-icon-theme
, gobject-introspection
, wrapGAppsHook
, lastFMSupport ? true
-, wikipediaSupport ? true
-, youtubeSupport ? true, youtube-dl
+, youtubeSupport ? true
}:
python3.pkgs.buildPythonApplication rec {
pname = "lollypop";
- version = "1.1.4.2";
+ version = "1.1.4.16";
format = "other";
doCheck = false;
@@ -30,7 +28,7 @@ python3.pkgs.buildPythonApplication rec {
url = "https://gitlab.gnome.org/World/lollypop";
rev = "refs/tags/${version}";
fetchSubmodules = true;
- sha256 = "0rn3q7xslqq5hw4wb739ywg5dr99xpkbmyw80y84rsg0wfrwbjlc";
+ sha256 = "1azfxc1vc1j4ph0zrfsgz2gac1vwmbj65j6wjlxx3nr8kia4mccl";
};
nativeBuildInputs = [
@@ -52,7 +50,6 @@ python3.pkgs.buildPythonApplication rec {
gst-plugins-ugly
gstreamer
gtk3
- hicolor-icon-theme
libsoup
totem-pl-parser
] ++ lib.optional lastFMSupport libsecret;
@@ -64,7 +61,6 @@ python3.pkgs.buildPythonApplication rec {
pygobject3
]
++ lib.optional lastFMSupport pylast
- ++ lib.optional wikipediaSupport wikipedia
++ lib.optional youtubeSupport youtube-dl
;
@@ -73,9 +69,8 @@ python3.pkgs.buildPythonApplication rec {
patchShebangs meson_post_install.py
'';
- preFixup = ''
- buildPythonPath "$out $propagatedBuildInputs"
- patchPythonScript "$out/libexec/lollypop-sp"
+ postFixup = ''
+ wrapPythonProgramsIn $out/libexec "$out $propagatedBuildInputs"
'';
# Produce only one wrapper using wrap-python passing
diff --git a/pkgs/applications/audio/lsp-plugins/default.nix b/pkgs/applications/audio/lsp-plugins/default.nix
index c80485734cae..47d8f165ad05 100644
--- a/pkgs/applications/audio/lsp-plugins/default.nix
+++ b/pkgs/applications/audio/lsp-plugins/default.nix
@@ -5,14 +5,13 @@
stdenv.mkDerivation rec {
pname = "lsp-plugins";
- version = "1.1.9";
- name = "${pname}-${version}";
+ version = "1.1.10";
src = fetchFromGitHub {
owner = "sadko4u";
- repo = "${pname}";
- rev = "${name}";
- sha256 = "1dzpl7f354rwp37bkr9h2yyafykcdn6m1qqfshqg77fj0pcsw8r2";
+ repo = pname;
+ rev = "${pname}-${version}";
+ sha256 = "09gmwzh1gq1q2lxn8fc1bpdh02h8vr7r0i040c1nx256wgfsarqb";
};
nativeBuildInputs = [ pkgconfig php expat ];
@@ -155,6 +154,6 @@ stdenv.mkDerivation rec {
homepage = https://lsp-plug.in;
maintainers = with maintainers; [ magnetophon ];
license = licenses.gpl2;
- platforms = platforms.linux;
+ platforms = [ "x86_64-linux" ];
};
}
diff --git a/pkgs/applications/audio/ltc-tools/default.nix b/pkgs/applications/audio/ltc-tools/default.nix
index 81db133ff9ab..c986e3af288e 100644
--- a/pkgs/applications/audio/ltc-tools/default.nix
+++ b/pkgs/applications/audio/ltc-tools/default.nix
@@ -1,7 +1,7 @@
{stdenv, fetchFromGitHub, pkgconfig, libltc, libsndfile, jack2}:
stdenv.mkDerivation rec {
- name = "ltc-tools-${version}";
+ pname = "ltc-tools";
version = "0.7.0";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/lv2bm/default.nix b/pkgs/applications/audio/lv2bm/default.nix
index d3821c51fbc6..f1eddb626245 100644
--- a/pkgs/applications/audio/lv2bm/default.nix
+++ b/pkgs/applications/audio/lv2bm/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, glib, lilv, lv2, pkgconfig, serd, sord, sratom }:
-stdenv.mkDerivation rec {
- name = "lv2bm-${version}";
+stdenv.mkDerivation {
+ pname = "lv2bm";
version = "git-2015-11-29";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/magnetophonDSP/CharacterCompressor/default.nix b/pkgs/applications/audio/magnetophonDSP/CharacterCompressor/default.nix
index f355c540f301..6488d1bd65e5 100644
--- a/pkgs/applications/audio/magnetophonDSP/CharacterCompressor/default.nix
+++ b/pkgs/applications/audio/magnetophonDSP/CharacterCompressor/default.nix
@@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, faust2jaqt, faust2lv2 }:
stdenv.mkDerivation rec {
- name = "CharacterCompressor-${version}";
+ pname = "CharacterCompressor";
version = "0.3.3";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/magnetophonDSP/CompBus/default.nix b/pkgs/applications/audio/magnetophonDSP/CompBus/default.nix
index 90e4eabeef0b..c5728b6e8b7b 100644
--- a/pkgs/applications/audio/magnetophonDSP/CompBus/default.nix
+++ b/pkgs/applications/audio/magnetophonDSP/CompBus/default.nix
@@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, faust2jaqt, faust2lv2 }:
stdenv.mkDerivation rec {
- name = "CompBus-${version}";
+ pname = "CompBus";
version = "1.1.1";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/magnetophonDSP/ConstantDetuneChorus/default.nix b/pkgs/applications/audio/magnetophonDSP/ConstantDetuneChorus/default.nix
index 73dd7b48e9c4..331e58c4bd29 100644
--- a/pkgs/applications/audio/magnetophonDSP/ConstantDetuneChorus/default.nix
+++ b/pkgs/applications/audio/magnetophonDSP/ConstantDetuneChorus/default.nix
@@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, faust2jaqt, faust2lv2 }:
stdenv.mkDerivation rec {
- name = "constant-detune-chorus-${version}";
+ pname = "constant-detune-chorus";
version = "0.1.3";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/magnetophonDSP/LazyLimiter/default.nix b/pkgs/applications/audio/magnetophonDSP/LazyLimiter/default.nix
index 39065db6edeb..046ee70e990c 100644
--- a/pkgs/applications/audio/magnetophonDSP/LazyLimiter/default.nix
+++ b/pkgs/applications/audio/magnetophonDSP/LazyLimiter/default.nix
@@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, faust2jaqt, faust2lv2 }:
stdenv.mkDerivation rec {
- name = "LazyLimiter-${version}";
+ pname = "LazyLimiter";
version = "0.3.2";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/magnetophonDSP/MBdistortion/default.nix b/pkgs/applications/audio/magnetophonDSP/MBdistortion/default.nix
index 362451988d38..aa7da17dafd1 100644
--- a/pkgs/applications/audio/magnetophonDSP/MBdistortion/default.nix
+++ b/pkgs/applications/audio/magnetophonDSP/MBdistortion/default.nix
@@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, faust2jaqt, faust2lv2 }:
stdenv.mkDerivation rec {
- name = "MBdistortion-${version}";
+ pname = "MBdistortion";
version = "1.1.1";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/magnetophonDSP/RhythmDelay/default.nix b/pkgs/applications/audio/magnetophonDSP/RhythmDelay/default.nix
index 3f809aa78474..ae05866e57d0 100644
--- a/pkgs/applications/audio/magnetophonDSP/RhythmDelay/default.nix
+++ b/pkgs/applications/audio/magnetophonDSP/RhythmDelay/default.nix
@@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, faust2jaqt, faust2lv2 }:
stdenv.mkDerivation rec {
- name = "RhythmDelay-${version}";
+ pname = "RhythmDelay";
version = "2.1";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/magnetophonDSP/VoiceOfFaust/default.nix b/pkgs/applications/audio/magnetophonDSP/VoiceOfFaust/default.nix
index 740763889ffd..718bbdaf49ea 100644
--- a/pkgs/applications/audio/magnetophonDSP/VoiceOfFaust/default.nix
+++ b/pkgs/applications/audio/magnetophonDSP/VoiceOfFaust/default.nix
@@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, faust2jack, faust2lv2, helmholtz, mrpeach, puredata-with-plugins }:
stdenv.mkDerivation rec {
- name = "VoiceOfFaust-${version}";
+ pname = "VoiceOfFaust";
version = "1.1.4";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/magnetophonDSP/pluginUtils/default.nix b/pkgs/applications/audio/magnetophonDSP/pluginUtils/default.nix
index 6237628e600c..356e95bf97c8 100644
--- a/pkgs/applications/audio/magnetophonDSP/pluginUtils/default.nix
+++ b/pkgs/applications/audio/magnetophonDSP/pluginUtils/default.nix
@@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, faust2jaqt, faust2lv2 }:
stdenv.mkDerivation rec {
- name = "pluginUtils-${version}";
+ pname = "pluginUtils";
version = "1.1";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/magnetophonDSP/shelfMultiBand/default.nix b/pkgs/applications/audio/magnetophonDSP/shelfMultiBand/default.nix
index cb9247fd3d08..292cd3dfd860 100644
--- a/pkgs/applications/audio/magnetophonDSP/shelfMultiBand/default.nix
+++ b/pkgs/applications/audio/magnetophonDSP/shelfMultiBand/default.nix
@@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, faust2jaqt, faust2lv2 }:
stdenv.mkDerivation rec {
- name = "shelfMultiBand-${version}";
+ pname = "shelfMultiBand";
version = "0.6.1";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/mda-lv2/default.nix b/pkgs/applications/audio/mda-lv2/default.nix
index 26290e5bf888..901be5a23d08 100644
--- a/pkgs/applications/audio/mda-lv2/default.nix
+++ b/pkgs/applications/audio/mda-lv2/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, fftwSinglePrec, lv2, pkgconfig, python, wafHook }:
stdenv.mkDerivation rec {
- name = "mda-lv2-${version}";
+ pname = "mda-lv2";
version = "1.2.2";
src = fetchurl {
- url = "https://download.drobilla.net/${name}.tar.bz2";
+ url = "https://download.drobilla.net/${pname}-${version}.tar.bz2";
sha256 = "0hh40c5d2m0k5gb3vw031l6lqn59dg804an3mkmhkc7qv4gc6xm4";
};
diff --git a/pkgs/applications/audio/meterbridge/default.nix b/pkgs/applications/audio/meterbridge/default.nix
index d16107e4c292..4d2fa0e15b48 100644
--- a/pkgs/applications/audio/meterbridge/default.nix
+++ b/pkgs/applications/audio/meterbridge/default.nix
@@ -3,10 +3,10 @@
stdenv.mkDerivation rec {
version = "0.9.3";
- name = "meterbridge-${version}";
+ pname = "meterbridge";
src = fetchurl {
- url = "http://plugin.org.uk/meterbridge/${name}.tar.gz";
+ url = "http://plugin.org.uk/meterbridge/${pname}-${version}.tar.gz";
sha256 = "0s7n3czfpil94vsd7iblv4xrck9c7zvsz4r3yfbkqcv85pjz1viz";
};
diff --git a/pkgs/applications/audio/mhwaveedit/default.nix b/pkgs/applications/audio/mhwaveedit/default.nix
index db70e59218b3..e4d6c0293df8 100644
--- a/pkgs/applications/audio/mhwaveedit/default.nix
+++ b/pkgs/applications/audio/mhwaveedit/default.nix
@@ -3,7 +3,7 @@
, vorbis-tools }:
stdenv.mkDerivation rec {
- name = "mhwaveedit-${version}";
+ pname = "mhwaveedit";
version = "1.4.24";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/midisheetmusic/default.nix b/pkgs/applications/audio/midisheetmusic/default.nix
index dd8b28fc2d8b..48052fc4ec88 100644
--- a/pkgs/applications/audio/midisheetmusic/default.nix
+++ b/pkgs/applications/audio/midisheetmusic/default.nix
@@ -5,7 +5,8 @@
let
version = "2.6";
in stdenv.mkDerivation {
- name = "midisheetmusic-${version}";
+ pname = "midisheetmusic";
+ inherit version;
src = fetchurl {
url = "mirror://sourceforge/midisheetmusic/MidiSheetMusic-${version}-linux-src.tar.gz";
diff --git a/pkgs/applications/audio/milkytracker/default.nix b/pkgs/applications/audio/milkytracker/default.nix
index 6b3abeb1e23c..7f86e2c20716 100644
--- a/pkgs/applications/audio/milkytracker/default.nix
+++ b/pkgs/applications/audio/milkytracker/default.nix
@@ -3,7 +3,7 @@
stdenv.mkDerivation rec {
version = "1.02.00";
- name = "milkytracker-${version}";
+ pname = "milkytracker";
src = fetchFromGitHub {
owner = "milkytracker";
diff --git a/pkgs/applications/audio/mimic/default.nix b/pkgs/applications/audio/mimic/default.nix
index dcaffe3eb9b4..e91b2c9360de 100644
--- a/pkgs/applications/audio/mimic/default.nix
+++ b/pkgs/applications/audio/mimic/default.nix
@@ -3,7 +3,7 @@
, pulseaudioSupport ? config.pulseaudio or false, libpulseaudio }:
stdenv.mkDerivation rec {
- name = "mimic-${version}";
+ pname = "mimic";
version = "1.2.0.2";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/mixxx/default.nix b/pkgs/applications/audio/mixxx/default.nix
index 9fbcf8b7ac29..5cf9b1b8ab70 100644
--- a/pkgs/applications/audio/mixxx/default.nix
+++ b/pkgs/applications/audio/mixxx/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, makeWrapper, chromaprint
+{ stdenv, mkDerivation, fetchFromGitHub, chromaprint
, fftw, flac, faad2, glibcLocales, mp4v2
, libid3tag, libmad, libopus, libshout, libsndfile, libusb1, libvorbis
, libGLU, libxcb, lilv, lv2, opusfile
@@ -6,19 +6,17 @@
, qtx11extras, rubberband, scons, sqlite, taglib, upower, vampSDK
}:
-stdenv.mkDerivation rec {
- name = "mixxx-${version}";
- version = "2.2.1";
+mkDerivation rec {
+ pname = "mixxx";
+ version = "2.2.2";
src = fetchFromGitHub {
owner = "mixxxdj";
repo = "mixxx";
rev = "release-${version}";
- sha256 = "1q6c2wfpprsx7s7nz1w0mhm2yhikj54jxcv61kwylxx3n5k2na9r";
+ sha256 = "0dmkvcsgq7abxqd4wms8c4w0mr5c53z7n5r8jgzp4swz9nmfjpfg";
};
- nativeBuildInputs = [ makeWrapper ];
-
buildInputs = [
chromaprint fftw flac faad2 glibcLocales mp4v2 libid3tag libmad libopus libshout libsndfile
libusb1 libvorbis libxcb libGLU lilv lv2 opusfile pkgconfig portaudio portmidi protobuf qtbase qtscript qtsvg
@@ -34,10 +32,9 @@ stdenv.mkDerivation rec {
"opus=1"
];
- fixupPhase = ''
- wrapProgram $out/bin/mixxx \
- --set LOCALE_ARCHIVE ${glibcLocales}/lib/locale/locale-archive;
- '';
+ qtWrapperArgs = [
+ "--set LOCALE_ARCHIVE ${glibcLocales}/lib/locale/locale-archive"
+ ];
meta = with stdenv.lib; {
homepage = https://mixxx.org;
diff --git a/pkgs/applications/audio/moc/default.nix b/pkgs/applications/audio/moc/default.nix
index 3ed330cc7437..89d062d584e5 100644
--- a/pkgs/applications/audio/moc/default.nix
+++ b/pkgs/applications/audio/moc/default.nix
@@ -30,7 +30,7 @@ let
in stdenv.mkDerivation rec {
- name = "moc-${version}";
+ pname = "moc";
version = "2.5.2";
src = fetchurl {
diff --git a/pkgs/applications/audio/mod-distortion/default.nix b/pkgs/applications/audio/mod-distortion/default.nix
index c66f78373228..c20f04ec9470 100644
--- a/pkgs/applications/audio/mod-distortion/default.nix
+++ b/pkgs/applications/audio/mod-distortion/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, lv2 }:
-stdenv.mkDerivation rec {
- name = "mod-distortion-git-${version}";
+stdenv.mkDerivation {
+ pname = "mod-distortion-git";
version = "2016-08-19";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/monkeys-audio/default.nix b/pkgs/applications/audio/monkeys-audio/default.nix
index 1b3e89d4885e..58bb4d3e3274 100644
--- a/pkgs/applications/audio/monkeys-audio/default.nix
+++ b/pkgs/applications/audio/monkeys-audio/default.nix
@@ -3,7 +3,6 @@
stdenv.mkDerivation rec {
version = "3.99-u4-b5";
pname = "monkeys-audio";
- name = pname + "-" + version;
patches = [ ./buildfix.diff ];
diff --git a/pkgs/applications/audio/mopidy/default.nix b/pkgs/applications/audio/mopidy/default.nix
index c1379c57fe5b..a5248e2a89ef 100644
--- a/pkgs/applications/audio/mopidy/default.nix
+++ b/pkgs/applications/audio/mopidy/default.nix
@@ -21,7 +21,7 @@ pythonPackages.buildPythonApplication rec {
];
propagatedBuildInputs = with pythonPackages; [
- gst-python pygobject3 pykka tornado_4 requests
+ gst-python pygobject3 pykka tornado_4 requests setuptools
] ++ stdenv.lib.optional (!stdenv.isDarwin) dbus-python;
# There are no tests
@@ -38,7 +38,7 @@ pythonPackages.buildPythonApplication rec {
SoundCloud, Google Play Music, and more
'';
license = licenses.asl20;
- maintainers = with maintainers; [ rickynils fpletz ];
+ maintainers = [ maintainers.fpletz ];
hydraPlatforms = [];
};
}
diff --git a/pkgs/applications/audio/mopidy/iris.nix b/pkgs/applications/audio/mopidy/iris.nix
index 3a663fd33c81..22cef5414f84 100644
--- a/pkgs/applications/audio/mopidy/iris.nix
+++ b/pkgs/applications/audio/mopidy/iris.nix
@@ -2,11 +2,11 @@
pythonPackages.buildPythonApplication rec {
pname = "Mopidy-Iris";
- version = "3.39.0";
+ version = "3.41.1";
src = pythonPackages.fetchPypi {
inherit pname version;
- sha256 = "1d2g66gvm7yaz4nbxlh23lj2xfkhi3hsg2k646m1za510f8dzlag";
+ sha256 = "1bdcxsvb756rchyp9cj1y5x1w0w6p2hp7grgar5c4cyh3kshc2kj";
};
propagatedBuildInputs = [
diff --git a/pkgs/applications/audio/mopidy/moped.nix b/pkgs/applications/audio/mopidy/moped.nix
index 3754bf763b20..d41fb12ae8d3 100644
--- a/pkgs/applications/audio/mopidy/moped.nix
+++ b/pkgs/applications/audio/mopidy/moped.nix
@@ -20,7 +20,7 @@ pythonPackages.buildPythonApplication rec {
homepage = https://github.com/martijnboland/moped;
description = "A web client for Mopidy";
license = licenses.mit;
- maintainers = [ maintainers.rickynils ];
+ maintainers = [];
hydraPlatforms = [];
};
}
diff --git a/pkgs/applications/audio/mopidy/spotify.nix b/pkgs/applications/audio/mopidy/spotify.nix
index 9a6e1bef994c..483852455aa7 100644
--- a/pkgs/applications/audio/mopidy/spotify.nix
+++ b/pkgs/applications/audio/mopidy/spotify.nix
@@ -17,7 +17,7 @@ pythonPackages.buildPythonApplication rec {
homepage = https://www.mopidy.com/;
description = "Mopidy extension for playing music from Spotify";
license = licenses.asl20;
- maintainers = [ maintainers.rickynils ];
+ maintainers = [];
hydraPlatforms = [];
};
}
diff --git a/pkgs/applications/audio/mp3blaster/default.nix b/pkgs/applications/audio/mp3blaster/default.nix
index eb5aa7c036cc..727133be78df 100644
--- a/pkgs/applications/audio/mp3blaster/default.nix
+++ b/pkgs/applications/audio/mp3blaster/default.nix
@@ -3,7 +3,7 @@ stdenv.mkDerivation rec {
version = "3.2.6";
- name = "mp3blaster-${version}";
+ pname = "mp3blaster";
src = fetchFromGitHub {
owner = "stragulus";
diff --git a/pkgs/applications/audio/mp3gain/default.nix b/pkgs/applications/audio/mp3gain/default.nix
index 907d4b8be168..233aebfa1470 100644
--- a/pkgs/applications/audio/mp3gain/default.nix
+++ b/pkgs/applications/audio/mp3gain/default.nix
@@ -1,13 +1,13 @@
-{ stdenv, fetchurl, unzip }:
+{ stdenv, fetchurl, unzip, mpg123 }:
stdenv.mkDerivation {
- name = "mp3gain-1.5.2";
+ name = "mp3gain-1.6.2";
src = fetchurl {
- url = "mirror://sourceforge/mp3gain/mp3gain-1_5_2-src.zip";
- sha256 = "1jkgry59m8cnnfq05b9y1h4x4wpy3iq8j68slb9qffwa3ajcgbfv";
+ url = "mirror://sourceforge/mp3gain/mp3gain-1_6_2-src.zip";
+ sha256 = "0varr6y7k8zarr56b42r0ad9g3brhn5vv3xjg1c0v19jxwr4gh2w";
};
- buildInputs = [ unzip ];
+ buildInputs = [ unzip mpg123 ];
sourceRoot = ".";
diff --git a/pkgs/applications/audio/mp3splt/default.nix b/pkgs/applications/audio/mp3splt/default.nix
index f2922e7eecf9..f067c5af6df3 100644
--- a/pkgs/applications/audio/mp3splt/default.nix
+++ b/pkgs/applications/audio/mp3splt/default.nix
@@ -3,11 +3,10 @@
stdenv.mkDerivation rec {
pname = "mp3splt";
version = "2.6.2";
- name = "${pname}-${version}";
src = fetchurl {
- url = "mirror://sourceforge/${pname}/${name}.tar.gz";
+ url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
sha256 = "1aiv20gypb6r84qabz8gblk8vi42cg3x333vk2pi3fyqvl82phry";
};
diff --git a/pkgs/applications/audio/mp3val/default.nix b/pkgs/applications/audio/mp3val/default.nix
index 7477bea7602c..6c35779f6c4c 100644
--- a/pkgs/applications/audio/mp3val/default.nix
+++ b/pkgs/applications/audio/mp3val/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
- name = "mp3val-${version}";
+ pname = "mp3val";
version = "0.1.8";
src = fetchurl {
- url = "mirror://sourceforge/mp3val/${name}-src.tar.gz";
+ url = "mirror://sourceforge/mp3val/${pname}-${version}-src.tar.gz";
sha256 = "17y3646ghr38r620vkrxin3dksxqig5yb3nn4cfv6arm7kz6x8cm";
};
diff --git a/pkgs/applications/audio/mpc/default.nix b/pkgs/applications/audio/mpc/default.nix
index 220e72b568af..b13e1cc037a0 100644
--- a/pkgs/applications/audio/mpc/default.nix
+++ b/pkgs/applications/audio/mpc/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, mpd_clientlib }:
stdenv.mkDerivation rec {
- name = "mpc-${version}";
+ pname = "mpc";
version = "0.28";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/mpc123/default.nix b/pkgs/applications/audio/mpc123/default.nix
index efaef97257e0..f024e5a6a1d1 100644
--- a/pkgs/applications/audio/mpc123/default.nix
+++ b/pkgs/applications/audio/mpc123/default.nix
@@ -2,10 +2,11 @@
let version = "0.2.4"; in
stdenv.mkDerivation rec {
- name = "mpc123-${version}";
+ pname = "mpc123";
+ inherit version;
src = fetchurl {
- url = "mirror://sourceforge/mpc123/version%20${version}/${name}.tar.gz";
+ url = "mirror://sourceforge/mpc123/version%20${version}/${pname}-${version}.tar.gz";
sha256 = "0sf4pns0245009z6mbxpx7kqy4kwl69bc95wz9v23wgappsvxgy1";
};
diff --git a/pkgs/applications/audio/mpg321/default.nix b/pkgs/applications/audio/mpg321/default.nix
index 3ffc5265f7a0..65dfe3484b66 100644
--- a/pkgs/applications/audio/mpg321/default.nix
+++ b/pkgs/applications/audio/mpg321/default.nix
@@ -5,7 +5,7 @@
}:
stdenv.mkDerivation rec {
- name = "mpg321-${version}";
+ pname = "mpg321";
version = "0.3.2";
src = fetchurl {
diff --git a/pkgs/applications/audio/munt/default.nix b/pkgs/applications/audio/munt/default.nix
index 3d40e4c39f4d..c9a1e9bea808 100644
--- a/pkgs/applications/audio/munt/default.nix
+++ b/pkgs/applications/audio/munt/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, cmake, qtbase, alsaLib, makeDesktopItem }:
+{ stdenv, mkDerivation, fetchFromGitHub, cmake, qtbase, alsaLib, makeDesktopItem }:
let
desktopItem = makeDesktopItem rec {
@@ -8,7 +8,7 @@ let
genericName = "Munt synthesiser";
categories = "Audio;AudioVideo;";
};
-in stdenv.mkDerivation rec {
+in mkDerivation rec {
version = "2.3.0";
pname = "munt";
diff --git a/pkgs/applications/audio/muse/default.nix b/pkgs/applications/audio/muse/default.nix
index b3efa82ead47..02b1d8ea5111 100644
--- a/pkgs/applications/audio/muse/default.nix
+++ b/pkgs/applications/audio/muse/default.nix
@@ -16,8 +16,8 @@
, gitAndTools
}:
-stdenv.mkDerivation rec {
- name = "muse-sequencer-${version}";
+stdenv.mkDerivation {
+ pname = "muse-sequencer";
version = "3.1pre1";
meta = with stdenv.lib; {
diff --git a/pkgs/applications/audio/musescore/darwin.nix b/pkgs/applications/audio/musescore/darwin.nix
index e14594ae3b2d..8b08aed62b8b 100644
--- a/pkgs/applications/audio/musescore/darwin.nix
+++ b/pkgs/applications/audio/musescore/darwin.nix
@@ -8,8 +8,8 @@ in
with lib;
stdenv.mkDerivation rec {
- name = "musescore-darwin-${version}";
- version = "${concatStringsSep "." versionComponents}";
+ pname = "musescore-darwin";
+ version = concatStringsSep "." versionComponents;
src = fetchurl {
url = "ftp://ftp.osuosl.org/pub/musescore/releases/MuseScore-${concatStringsSep "." (take 3 versionComponents)}/MuseScore-${version}.dmg";
diff --git a/pkgs/applications/audio/musescore/default.nix b/pkgs/applications/audio/musescore/default.nix
index 9407a1c26882..5368fcb61656 100644
--- a/pkgs/applications/audio/musescore/default.nix
+++ b/pkgs/applications/audio/musescore/default.nix
@@ -1,16 +1,16 @@
-{ stdenv, lib, fetchzip, cmake, pkgconfig
+{ stdenv, mkDerivation, lib, fetchzip, cmake, pkgconfig
, alsaLib, freetype, libjack2, lame, libogg, libpulseaudio, libsndfile, libvorbis
, portaudio, portmidi, qtbase, qtdeclarative, qtscript, qtsvg, qttools
, qtwebengine, qtxmlpatterns
}:
-stdenv.mkDerivation rec {
- name = "musescore-${version}";
- version = "3.0.5";
+mkDerivation rec {
+ pname = "musescore";
+ version = "3.2.3";
src = fetchzip {
- url = "https://download.musescore.com/releases/MuseScore-${version}/MuseScore-${version}.zip";
- sha256 = "1pbf6v0l3nixxr8k5igwhj09wnqvw92av6q6yjrbb3kyjh5br2d8";
+ url = "https://github.com/musescore/MuseScore/releases/download/v${version}/MuseScore-${version}.zip";
+ sha256 = "17mr0c8whw6vz86lp1j36rams4h8virc4z68fld0q3rpq6g05szs";
stripRoot = false;
};
diff --git a/pkgs/applications/audio/musly/default.nix b/pkgs/applications/audio/musly/default.nix
index 47370d4bc2f7..e7a9e22c2d68 100644
--- a/pkgs/applications/audio/musly/default.nix
+++ b/pkgs/applications/audio/musly/default.nix
@@ -1,5 +1,5 @@
{ stdenv, fetchFromGitHub, cmake, eigen, libav_all }:
-stdenv.mkDerivation rec {
+stdenv.mkDerivation {
pname = "musly";
version = "unstable-2017-04-26";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/ncmpc/default.nix b/pkgs/applications/audio/ncmpc/default.nix
index a35d9c670fe8..4fa9626332be 100644
--- a/pkgs/applications/audio/ncmpc/default.nix
+++ b/pkgs/applications/audio/ncmpc/default.nix
@@ -2,14 +2,14 @@
, mpd_clientlib, gettext, boost }:
stdenv.mkDerivation rec {
- name = "ncmpc-${version}";
- version = "0.34";
+ pname = "ncmpc";
+ version = "0.35";
src = fetchFromGitHub {
owner = "MusicPlayerDaemon";
repo = "ncmpc";
rev = "v${version}";
- sha256 = "0ffby37qdg251c1w0vl6rmd13akbydnf12468z4vrl0ybwfd7fc4";
+ sha256 = "0hhc5snxy5fbg47ynz4b7fkmzdy974zxqr0cqc6kh15yvbr25ikh";
};
buildInputs = [ glib ncurses mpd_clientlib boost ];
diff --git a/pkgs/applications/audio/ncmpcpp/default.nix b/pkgs/applications/audio/ncmpcpp/default.nix
index d35cefb88416..2ba36b4a50d9 100644
--- a/pkgs/applications/audio/ncmpcpp/default.nix
+++ b/pkgs/applications/audio/ncmpcpp/default.nix
@@ -11,11 +11,11 @@ assert taglibSupport -> (taglib != null);
with stdenv.lib;
stdenv.mkDerivation rec {
- name = "ncmpcpp-${version}";
+ pname = "ncmpcpp";
version = "0.8.2";
src = fetchurl {
- url = "https://ncmpcpp.rybczak.net/stable/${name}.tar.bz2";
+ url = "https://ncmpcpp.rybczak.net/stable/${pname}-${version}.tar.bz2";
sha256 = "0m0mjb049sl62vx13h9waavysa30mk0rphacksnvf94n13la62v5";
};
diff --git a/pkgs/applications/audio/ncpamixer/default.nix b/pkgs/applications/audio/ncpamixer/default.nix
index 8b715a24e3cb..53ed9b3297c1 100644
--- a/pkgs/applications/audio/ncpamixer/default.nix
+++ b/pkgs/applications/audio/ncpamixer/default.nix
@@ -2,7 +2,7 @@
stdenv.mkDerivation rec {
- name = "ncpamixer-${version}";
+ pname = "ncpamixer";
version = "1.3.3";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/ncspot/default.nix b/pkgs/applications/audio/ncspot/default.nix
new file mode 100644
index 000000000000..63ae9278c5d3
--- /dev/null
+++ b/pkgs/applications/audio/ncspot/default.nix
@@ -0,0 +1,43 @@
+{ lib, fetchFromGitHub, rustPlatform, pkg-config, ncurses, openssl
+, withALSA ? true, alsaLib ? null
+, withPulseAudio ? false, libpulseaudio ? null
+, withPortAudio ? false, portaudio ? null
+}:
+
+let
+ features = [ "cursive/pancurses-backend" ]
+ ++ lib.optional withALSA "alsa_backend"
+ ++ lib.optional withPulseAudio "pulseaudio_backend"
+ ++ lib.optional withPortAudio "portaudio_backend";
+in
+rustPlatform.buildRustPackage rec {
+ pname = "ncspot-unstable";
+ version = "2019-10-12";
+
+ src = fetchFromGitHub {
+ owner = "hrkfdn";
+ repo = "ncspot";
+ rev = "4defded54646958268a20787917e4721ae96407d";
+ sha256 = "1w3cmilwjzk3pfnq97qgz6hzxgjgi27dm8jq7maw87qyl3v17gyg";
+ };
+
+ cargoSha256 = "1w1fk39pragfy2i2myw99mqf63w6fw4nr2kri8ily2iqc6g9xpgw";
+
+ cargoBuildFlags = [ "--no-default-features" "--features" "${lib.concatStringsSep "," features}" ];
+
+ nativeBuildInputs = [ pkg-config ];
+
+ buildInputs = [ ncurses openssl ]
+ ++ lib.optional withALSA alsaLib
+ ++ lib.optional withPulseAudio libpulseaudio
+ ++ lib.optional withPortAudio portaudio;
+
+ doCheck = false;
+
+ meta = with lib; {
+ description = "Cross-platform ncurses Spotify client written in Rust, inspired by ncmpc and the likes";
+ homepage = "https://github.com/hrkfdn/ncspot";
+ license = licenses.bsd2;
+ maintainers = [ maintainers.marsam ];
+ };
+}
diff --git a/pkgs/applications/audio/non/default.nix b/pkgs/applications/audio/non/default.nix
index 44dd0d2d4ec3..5f8c82b98d04 100644
--- a/pkgs/applications/audio/non/default.nix
+++ b/pkgs/applications/audio/non/default.nix
@@ -2,8 +2,8 @@
, libsndfile, ladspaH, liblrdf, liblo, libsigcxx, wafHook
}:
-stdenv.mkDerivation rec {
- name = "non-${version}";
+stdenv.mkDerivation {
+ pname = "non";
version = "2018-02-15";
src = fetchFromGitHub {
owner = "original-male";
diff --git a/pkgs/applications/audio/normalize/default.nix b/pkgs/applications/audio/normalize/default.nix
index 85c902d38396..490ecc967bbf 100644
--- a/pkgs/applications/audio/normalize/default.nix
+++ b/pkgs/applications/audio/normalize/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, libmad }:
stdenv.mkDerivation rec {
- name = "normalize-${version}";
+ pname = "normalize";
version = "0.7.7";
src = fetchurl {
- url = "mirror://savannah/normalize/${name}.tar.gz";
+ url = "mirror://savannah/normalize/${pname}-${version}.tar.gz";
sha256 = "1n5khss10vjjp6w69q9qcl4kqfkd0pr555lgqghrchn6rjms4mb0";
};
diff --git a/pkgs/applications/audio/nova-filters/default.nix b/pkgs/applications/audio/nova-filters/default.nix
index bb186687c66e..0bb970500bdc 100644
--- a/pkgs/applications/audio/nova-filters/default.nix
+++ b/pkgs/applications/audio/nova-filters/default.nix
@@ -1,8 +1,8 @@
{stdenv, fetchurl, sconsPackages, boost, ladspaH, pkgconfig }:
-stdenv.mkDerivation rec {
+stdenv.mkDerivation {
version = "0.2-2";
- name = "nova-filters-${version}";
+ pname = "nova-filters";
src = fetchurl {
url = https://klingt.org/~tim/nova-filters/nova-filters_0.2-2.tar.gz;
diff --git a/pkgs/applications/audio/openmpt123/default.nix b/pkgs/applications/audio/openmpt123/default.nix
index f8f08369ab93..c9d69b5c7f23 100644
--- a/pkgs/applications/audio/openmpt123/default.nix
+++ b/pkgs/applications/audio/openmpt123/default.nix
@@ -3,8 +3,9 @@
let
version = "0.4.1";
-in stdenv.mkDerivation rec {
- name = "openmpt123-${version}";
+in stdenv.mkDerivation {
+ pname = "openmpt123";
+ inherit version;
src = fetchurl {
url = "https://lib.openmpt.org/files/libopenmpt/src/libopenmpt-${version}+release.autotools.tar.gz";
diff --git a/pkgs/applications/audio/osmid/default.nix b/pkgs/applications/audio/osmid/default.nix
new file mode 100644
index 000000000000..7e49b872a6a5
--- /dev/null
+++ b/pkgs/applications/audio/osmid/default.nix
@@ -0,0 +1,37 @@
+{ stdenv
+, fetchFromGitHub
+, cmake
+, alsaLib
+, libX11
+}:
+
+stdenv.mkDerivation rec {
+ pname = "osmid";
+ version = "0.6.8";
+
+ src = fetchFromGitHub {
+ owner = "llloret";
+ repo = "osmid";
+ rev = "v${version}";
+ sha256 = "1yl25abf343yvd49nfsgxsz7jf956zrsi5n4xyqb5ldlp2hifk15";
+ };
+
+ nativeBuildInputs = [ cmake ];
+
+ buildInputs = [ alsaLib libX11 ];
+
+ installPhase = ''
+ runHook preInstall
+ mkdir -p $out/bin
+ cp {m2o,o2m} $out/bin/
+ runHook postInstall
+ '';
+
+ meta = with stdenv.lib; {
+ homepage = "https://github.com/llloret/osmid";
+ description = "A lightweight, portable, easy to use tool to convert MIDI to OSC and OSC to MIDI";
+ license = licenses.mit;
+ maintainers = with maintainers; [ c0deaddict ];
+ platforms = platforms.linux;
+ };
+}
diff --git a/pkgs/applications/audio/padthv1/default.nix b/pkgs/applications/audio/padthv1/default.nix
index e503793ab39c..49e40bad0be6 100644
--- a/pkgs/applications/audio/padthv1/default.nix
+++ b/pkgs/applications/audio/padthv1/default.nix
@@ -1,12 +1,12 @@
-{ stdenv, fetchurl, pkgconfig, libjack2, alsaLib, libsndfile, liblo, lv2, qt5, fftw }:
+{ stdenv, fetchurl, pkgconfig, libjack2, alsaLib, libsndfile, liblo, lv2, qt5, fftw, mkDerivation }:
-stdenv.mkDerivation rec {
- name = "padthv1-${version}";
- version = "0.9.8";
+mkDerivation rec {
+ pname = "padthv1";
+ version = "0.9.10";
src = fetchurl {
- url = "mirror://sourceforge/padthv1/${name}.tar.gz";
- sha256 = "1k4p2ir12qjcs62knvw2s6qyvb46203yx22fnwp341cjk171cxji";
+ url = "mirror://sourceforge/padthv1/${pname}-${version}.tar.gz";
+ sha256 = "07gpq31a9iwk79yzndqzmw7snap7s4ifnsc4mfwkdga2zx13z0rx";
};
buildInputs = [ libjack2 alsaLib libsndfile liblo lv2 qt5.qtbase qt5.qttools fftw ];
diff --git a/pkgs/applications/audio/pamix/default.nix b/pkgs/applications/audio/pamix/default.nix
index cc4a781ef66c..2507f08e9e59 100644
--- a/pkgs/applications/audio/pamix/default.nix
+++ b/pkgs/applications/audio/pamix/default.nix
@@ -3,7 +3,7 @@
, libpulseaudio, ncurses }:
stdenv.mkDerivation rec {
- name = "pamix-${version}";
+ pname = "pamix";
version = "1.6";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/pamixer/default.nix b/pkgs/applications/audio/pamixer/default.nix
index 322a4e238461..7c4520967850 100644
--- a/pkgs/applications/audio/pamixer/default.nix
+++ b/pkgs/applications/audio/pamixer/default.nix
@@ -1,27 +1,20 @@
{ stdenv, fetchFromGitHub, fetchpatch, boost, libpulseaudio }:
stdenv.mkDerivation rec {
- name = "pamixer-${version}";
- version = "1.3.1";
+ pname = "pamixer";
+ version = "1.4";
src = fetchFromGitHub {
owner = "cdemoulins";
repo = "pamixer";
rev = version;
- sha256 = "15zs2x4hnrpxphqn542b6qqm4ymvhkvbcfyffy69d6cki51chzzw";
+ sha256 = "1i14550n8paijwwnhksv5izgfqm3s5q2773bdfp6vyqybkll55f7";
};
- # Remove after https://github.com/cdemoulins/pamixer/pull/16 gets fixed
- patches = [(fetchpatch {
- url = "https://github.com/oxij/pamixer/commit/dea1cd967aa837940e5c0b04ef7ebc47a7a93d63.patch";
- sha256 = "0s77xmsiwywyyp6f4bjxg1sqdgms1k5fiy7na6ws0aswshfnzfjb";
- })];
-
buildInputs = [ boost libpulseaudio ];
installPhase = ''
- mkdir -p $out/bin
- cp pamixer $out/bin
+ install -Dm755 pamixer -t $out/bin
'';
meta = with stdenv.lib; {
diff --git a/pkgs/applications/audio/paprefs/default.nix b/pkgs/applications/audio/paprefs/default.nix
index 6ad931d4867a..9c59b5466c74 100644
--- a/pkgs/applications/audio/paprefs/default.nix
+++ b/pkgs/applications/audio/paprefs/default.nix
@@ -1,4 +1,14 @@
-{ fetchurl, stdenv, meson, ninja, gettext, pkgconfig, pulseaudioFull, gtkmm3, dbus-glib, wrapGAppsHook }:
+{ fetchurl
+, stdenv
+, meson
+, ninja
+, gettext
+, pkgconfig
+, pulseaudioFull
+, glibmm
+, gtkmm3
+, wrapGAppsHook
+}:
stdenv.mkDerivation rec {
name = "paprefs-1.1";
@@ -8,9 +18,19 @@ stdenv.mkDerivation rec {
sha256 = "189z5p20hk0xv9vwvym293503j4pwl03xqk9hl7cl6dwgv0l7wkf";
};
- nativeBuildInputs = [ meson ninja gettext pkgconfig wrapGAppsHook ];
+ nativeBuildInputs = [
+ meson
+ ninja
+ gettext
+ pkgconfig
+ wrapGAppsHook
+ ];
- buildInputs = [ pulseaudioFull gtkmm3 dbus-glib ];
+ buildInputs = [
+ pulseaudioFull
+ glibmm
+ gtkmm3
+ ];
meta = with stdenv.lib; {
description = "PulseAudio Preferences";
diff --git a/pkgs/applications/audio/parlatype/default.nix b/pkgs/applications/audio/parlatype/default.nix
index 1eb8b416a9aa..fb5fe47f4f2d 100644
--- a/pkgs/applications/audio/parlatype/default.nix
+++ b/pkgs/applications/audio/parlatype/default.nix
@@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "parlatype";
- version = "1.6.1";
+ version = "1.6.2";
src = fetchFromGitHub {
owner = "gkarsay";
repo = pname;
rev = "v${version}";
- sha256 = "0b811lwiylrjirx88gi9az1b1b71j2i5a4a6g56wp9qxln6lzjj2";
+ sha256 = "157423f40l8nd5da6y0qjmg4l3125zailp98w2hda3mxxn1j5ix3";
};
nativeBuildInputs = [
diff --git a/pkgs/applications/audio/patchage/default.nix b/pkgs/applications/audio/patchage/default.nix
index 7f3940e0ae9c..e7c4cab9af18 100644
--- a/pkgs/applications/audio/patchage/default.nix
+++ b/pkgs/applications/audio/patchage/default.nix
@@ -2,8 +2,8 @@
, gtkmm2, libjack2, pkgconfig, python2, wafHook
}:
-stdenv.mkDerivation rec {
- name = "patchage-${version}";
+stdenv.mkDerivation {
+ pname = "patchage";
version = "1.0.1";
src = fetchsvn {
url = http://svn.drobilla.net/lad/trunk/patchage/;
diff --git a/pkgs/applications/audio/paulstretch/default.nix b/pkgs/applications/audio/paulstretch/default.nix
index b2c049c9eeeb..b9a3f39affb1 100644
--- a/pkgs/applications/audio/paulstretch/default.nix
+++ b/pkgs/applications/audio/paulstretch/default.nix
@@ -1,5 +1,7 @@
-{ stdenv, fetchFromGitHub, audiofile, libvorbis, fltk, fftw, fftwFloat,
-minixml, pkgconfig, libmad, libjack2, portaudio, libsamplerate }:
+{ stdenv, fetchFromGitHub, fetchpatch
+, audiofile, libvorbis, fltk, fftw, fftwFloat
+, minixml, pkgconfig, libmad, libjack2, portaudio, libsamplerate
+}:
stdenv.mkDerivation {
pname = "paulstretch";
@@ -27,6 +29,13 @@ stdenv.mkDerivation {
libsamplerate
];
+ patches = [
+ (fetchpatch {
+ url = "https://github.com/paulnasca/paulstretch_cpp/pull/12.patch";
+ sha256 = "0lx1rfrs53afkiz1drp456asqgj5yv6hx3lkc01165cv1jsbw6q4";
+ })
+ ];
+
buildPhase = ''
bash compile_linux_fftw_jack.sh
'';
diff --git a/pkgs/applications/audio/pavucontrol/default.nix b/pkgs/applications/audio/pavucontrol/default.nix
index ce2979a5e530..fee86cb5bcae 100644
--- a/pkgs/applications/audio/pavucontrol/default.nix
+++ b/pkgs/applications/audio/pavucontrol/default.nix
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
description = "PulseAudio Volume Control";
longDescription = ''
- PulseAudio Volume Control (pavucontrol) provides a GTK+
+ PulseAudio Volume Control (pavucontrol) provides a GTK
graphical user interface to connect to a PulseAudio server and
easily control the volume of all clients, sinks, etc.
'';
@@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
license = stdenv.lib.licenses.gpl2Plus;
- maintainers = with maintainers; [ abbradar ];
+ maintainers = with maintainers; [ abbradar globin ];
platforms = platforms.linux;
};
}
diff --git a/pkgs/applications/audio/pd-plugins/cyclone/default.nix b/pkgs/applications/audio/pd-plugins/cyclone/default.nix
index ae43bad5b2c2..6440f6e787ff 100644
--- a/pkgs/applications/audio/pd-plugins/cyclone/default.nix
+++ b/pkgs/applications/audio/pd-plugins/cyclone/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, puredata }:
stdenv.mkDerivation rec {
- name = "cyclone-${version}";
+ pname = "cyclone";
version = "0.3beta-2";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/pd-plugins/helmholtz/default.nix b/pkgs/applications/audio/pd-plugins/helmholtz/default.nix
index faa914e13287..6c7a4b03ef59 100644
--- a/pkgs/applications/audio/pd-plugins/helmholtz/default.nix
+++ b/pkgs/applications/audio/pd-plugins/helmholtz/default.nix
@@ -1,6 +1,6 @@
{ stdenv, fetchurl, unzip, puredata }:
-stdenv.mkDerivation rec {
+stdenv.mkDerivation {
name = "helmholtz";
src = fetchurl {
diff --git a/pkgs/applications/audio/pd-plugins/maxlib/default.nix b/pkgs/applications/audio/pd-plugins/maxlib/default.nix
index 0eb75d77c68c..21ba375200bc 100644
--- a/pkgs/applications/audio/pd-plugins/maxlib/default.nix
+++ b/pkgs/applications/audio/pd-plugins/maxlib/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, puredata }:
stdenv.mkDerivation rec {
- name = "maxlib-${version}";
+ pname = "maxlib";
version = "1.5.7";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/pd-plugins/mrpeach/default.nix b/pkgs/applications/audio/pd-plugins/mrpeach/default.nix
index 972a162b73f4..028a4667cb2d 100644
--- a/pkgs/applications/audio/pd-plugins/mrpeach/default.nix
+++ b/pkgs/applications/audio/pd-plugins/mrpeach/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchurl, puredata }:
-stdenv.mkDerivation rec {
- name = "mrpeach-${version}";
+stdenv.mkDerivation {
+ pname = "mrpeach";
version = "1.1";
# this was to only usable url I could find:
diff --git a/pkgs/applications/audio/pd-plugins/puremapping/default.nix b/pkgs/applications/audio/pd-plugins/puremapping/default.nix
index 37d692a3ab5a..c214d3fcf405 100644
--- a/pkgs/applications/audio/pd-plugins/puremapping/default.nix
+++ b/pkgs/applications/audio/pd-plugins/puremapping/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchurl, unzip, puredata }:
stdenv.mkDerivation rec {
- name = "puremapping-${version}";
+ pname = "puremapping";
version = "20160130";
src = fetchurl {
diff --git a/pkgs/applications/audio/pd-plugins/timbreid/default.nix b/pkgs/applications/audio/pd-plugins/timbreid/default.nix
index f2e54b327fce..fa9660fbbf61 100644
--- a/pkgs/applications/audio/pd-plugins/timbreid/default.nix
+++ b/pkgs/applications/audio/pd-plugins/timbreid/default.nix
@@ -2,7 +2,7 @@
stdenv.mkDerivation rec {
version = "0.7.0";
- name = "timbreid-${version}";
+ pname = "timbreid";
src = fetchurl {
url = "http://williambrent.conflations.com/pd/timbreID-${version}-src.zip";
diff --git a/pkgs/applications/audio/pd-plugins/zexy/default.nix b/pkgs/applications/audio/pd-plugins/zexy/default.nix
index d56462ccc844..cc307417c061 100644
--- a/pkgs/applications/audio/pd-plugins/zexy/default.nix
+++ b/pkgs/applications/audio/pd-plugins/zexy/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, autoconf, automake, puredata }:
stdenv.mkDerivation rec {
- name = "zexy-${version}";
+ pname = "zexy";
version = "2.2.4";
src = fetchurl {
- url = "https://puredata.info/downloads/zexy/releases/${version}/${name}.tar.gz";
+ url = "https://puredata.info/downloads/zexy/releases/${version}/${pname}-${version}.tar.gz";
sha256 = "1xpgl82c2lc6zfswjsa7z10yhv5jb7a4znzh3nc7ffrzm1z8vylp";
};
diff --git a/pkgs/applications/audio/petrifoo/default.nix b/pkgs/applications/audio/petrifoo/default.nix
index d86e5aae2cd4..8bbeffb1f7a3 100644
--- a/pkgs/applications/audio/petrifoo/default.nix
+++ b/pkgs/applications/audio/petrifoo/default.nix
@@ -3,11 +3,11 @@
, pkgconfig, openssl }:
stdenv.mkDerivation rec {
- name = "petri-foo-${version}";
+ pname = "petri-foo";
version = "0.1.87";
src = fetchurl {
- url = "mirror://sourceforge/petri-foo/${name}.tar.bz2";
+ url = "mirror://sourceforge/petri-foo/${pname}-${version}.tar.bz2";
sha256 = "0b25iicgn8c42487fdw32ycfrll1pm2zjgy5djvgw6mfcaa4gizh";
};
diff --git a/pkgs/applications/audio/pianobar/default.nix b/pkgs/applications/audio/pianobar/default.nix
index 40e45a76b4bf..26b94f306bc6 100644
--- a/pkgs/applications/audio/pianobar/default.nix
+++ b/pkgs/applications/audio/pianobar/default.nix
@@ -20,8 +20,8 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; {
description = "A console front-end for Pandora.com";
- homepage = http://6xq.net/projects/pianobar/;
- platforms = platforms.linux;
+ homepage = "https://6xq.net/pianobar/";
+ platforms = platforms.unix;
license = licenses.mit; # expat version
};
}
diff --git a/pkgs/applications/audio/pianobooster/default.nix b/pkgs/applications/audio/pianobooster/default.nix
index 53afcdd2306a..448b219a1afa 100644
--- a/pkgs/applications/audio/pianobooster/default.nix
+++ b/pkgs/applications/audio/pianobooster/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchurl, alsaLib, cmake, libGLU_combined, makeWrapper, qt4 }:
-stdenv.mkDerivation rec {
- name = "pianobooster-${version}";
+stdenv.mkDerivation {
+ pname = "pianobooster";
version = "0.6.4b";
src = fetchurl {
diff --git a/pkgs/applications/audio/picard/default.nix b/pkgs/applications/audio/picard/default.nix
index 1ecb8be09ddf..dc1118f47e04 100644
--- a/pkgs/applications/audio/picard/default.nix
+++ b/pkgs/applications/audio/picard/default.nix
@@ -1,19 +1,19 @@
-{ stdenv, python3Packages, fetchFromGitHub, gettext, chromaprint }:
+{ stdenv, python3Packages, fetchFromGitHub, gettext, chromaprint, qt5 }:
let
pythonPackages = python3Packages;
in pythonPackages.buildPythonApplication rec {
pname = "picard";
- version = "2.1.3";
+ version = "2.2.2";
src = fetchFromGitHub {
owner = "metabrainz";
repo = pname;
rev = "release-${version}";
- sha256 = "1armg8vpvnbpk7rrfk9q7nj5gm56rza00ni9qwdyqpxp1xaz6apj";
+ sha256 = "1iibkvwpj862wcrl0fmyi6qhcgx4q5ay63yr0zyg0bkqgcka0gpr";
};
- nativeBuildInputs = [ gettext ];
+ nativeBuildInputs = [ gettext qt5.wrapQtAppsHook qt5.qtbase ];
propagatedBuildInputs = with pythonPackages; [
pyqt5
@@ -22,15 +22,16 @@ in pythonPackages.buildPythonApplication rec {
discid
];
- installPhase = ''
- python setup.py install --prefix="$out"
- '';
-
prePatch = ''
# Pesky unicode punctuation.
substituteInPlace setup.cfg --replace "‘" "'"
'';
+ installPhase = ''
+ python setup.py install --prefix="$out"
+ wrapQtApp $out/bin/picard
+ '';
+
meta = with stdenv.lib; {
homepage = http://musicbrainz.org/doc/MusicBrainz_Picard;
description = "The official MusicBrainz tagger";
diff --git a/pkgs/applications/audio/pithos/default.nix b/pkgs/applications/audio/pithos/default.nix
index f2c798d1e6e7..5d86e37dec8a 100644
--- a/pkgs/applications/audio/pithos/default.nix
+++ b/pkgs/applications/audio/pithos/default.nix
@@ -1,33 +1,29 @@
-{ fetchFromGitHub, stdenv, pythonPackages, gtk3, gobject-introspection, libnotify
-, gst_all_1, wrapGAppsHook }:
+{ stdenv, fetchFromGitHub, meson, ninja, pkgconfig, appstream-glib
+, wrapGAppsHook, pythonPackages, gtk3, gnome3, gobject-introspection
+, libnotify, libsecret, gst_all_1 }:
pythonPackages.buildPythonApplication rec {
pname = "pithos";
- version = "1.1.2";
+ version = "1.4.1";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = version;
- sha256 = "0zk9clfawsnwmgjbk7y5d526ksxd1pkh09ln6sb06v4ygaiifcxp";
+ sha256 = "0vaw0rfcdh4bsp9b8la9bs36kw0iwia54y5x060byxhff9av6nj4";
};
- # No tests in repo
- doCheck = false;
+ format = "other";
postPatch = ''
- substituteInPlace setup.py --replace "/usr/share" "$out/share"
+ chmod +x meson_post_install.py
+ patchShebangs meson_post_install.py
'';
- postInstall = ''
- mkdir -p $out/share/applications
- cp -v data/pithos.desktop $out/share/applications
- '';
-
- buildInputs = [ wrapGAppsHook ];
+ nativeBuildInputs = [ meson ninja pkgconfig appstream-glib wrapGAppsHook ];
propagatedBuildInputs =
- [ gtk3 gobject-introspection libnotify ] ++
+ [ gtk3 gobject-introspection libnotify libsecret gnome3.adwaita-icon-theme ] ++
(with gst_all_1; [ gstreamer gst-plugins-base gst-plugins-good gst-plugins-ugly gst-plugins-bad ]) ++
(with pythonPackages; [ pygobject3 pylast ]);
diff --git a/pkgs/applications/audio/playbar2/default.nix b/pkgs/applications/audio/playbar2/default.nix
index 16d5eb69cb97..8c21dc8f2ad7 100644
--- a/pkgs/applications/audio/playbar2/default.nix
+++ b/pkgs/applications/audio/playbar2/default.nix
@@ -7,7 +7,7 @@
}:
stdenv.mkDerivation rec {
- name = "playbar2-${version}";
+ pname = "playbar2";
version = "2.5";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/plugin-torture/default.nix b/pkgs/applications/audio/plugin-torture/default.nix
index 5529998803cf..f444ad6cb323 100644
--- a/pkgs/applications/audio/plugin-torture/default.nix
+++ b/pkgs/applications/audio/plugin-torture/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, boost, ladspaH, lilv, lv2, pkgconfig, serd, sord, sratom }:
-stdenv.mkDerivation rec {
- name = "plugin-torture-${version}";
+stdenv.mkDerivation {
+ pname = "plugin-torture";
version = "2016-07-25";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/pmidi/default.nix b/pkgs/applications/audio/pmidi/default.nix
index 9f51d3008259..f9b3fbae2137 100644
--- a/pkgs/applications/audio/pmidi/default.nix
+++ b/pkgs/applications/audio/pmidi/default.nix
@@ -3,7 +3,8 @@
, sourceSha256 ? "051mv6f13c8y13c1iv3279k1hhzpz4fm9sfczhgp9sim2bjdj055"
}:
stdenv.mkDerivation {
- name = "pmidi-${version}";
+ pname = "pmidi";
+ inherit version;
src = fetchurl {
url = "mirror://sourceforge/pmidi/${version}/pmidi-${version}.tar.gz";
diff --git a/pkgs/applications/audio/ponymix/default.nix b/pkgs/applications/audio/ponymix/default.nix
index 5cfbb7bf5a48..6d168ec56618 100644
--- a/pkgs/applications/audio/ponymix/default.nix
+++ b/pkgs/applications/audio/ponymix/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, libpulseaudio, libnotify, pkgconfig }:
stdenv.mkDerivation rec {
- name = "ponymix-${version}";
+ pname = "ponymix";
version = "5";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/praat/default.nix b/pkgs/applications/audio/praat/default.nix
index 5db5035c8352..9414f4211d7a 100644
--- a/pkgs/applications/audio/praat/default.nix
+++ b/pkgs/applications/audio/praat/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchurl, alsaLib, gtk2, pkgconfig }:
stdenv.mkDerivation rec {
- name = "praat-${version}";
+ pname = "praat";
version = "6.0.43";
src = fetchurl {
diff --git a/pkgs/applications/audio/pulseaudio-ctl/default.nix b/pkgs/applications/audio/pulseaudio-ctl/default.nix
index 1ad57efda7a0..6b7d242e1f6d 100644
--- a/pkgs/applications/audio/pulseaudio-ctl/default.nix
+++ b/pkgs/applications/audio/pulseaudio-ctl/default.nix
@@ -7,13 +7,13 @@ let
in stdenv.mkDerivation rec {
name = "${pname}-${version}";
- version = "1.66";
+ version = "1.67";
src = fetchFromGitHub {
owner = "graysky2";
repo = pname;
rev = "v${version}";
- sha256 = "19a24w7y19551ar41q848w7r1imqkl9cpff4dpb7yry7qp1yjg0y";
+ sha256 = "1mf5r7x6aiqmx9mz7gpckrqvvzxnr5gs2q1k4m42rjk6ldkpdb46";
};
postPatch = ''
diff --git a/pkgs/applications/audio/pulseaudio-dlna/default.nix b/pkgs/applications/audio/pulseaudio-dlna/default.nix
index d414cb756114..a9f56cca0015 100644
--- a/pkgs/applications/audio/pulseaudio-dlna/default.nix
+++ b/pkgs/applications/audio/pulseaudio-dlna/default.nix
@@ -17,7 +17,7 @@ assert vorbisSupport -> vorbisTools != null;
let
zeroconf = pythonPackages.callPackage ./zeroconf.nix { };
-in pythonPackages.buildPythonApplication rec {
+in pythonPackages.buildPythonApplication {
pname = "pulseaudio-dlna";
version = "2017-11-01";
diff --git a/pkgs/applications/audio/pulseaudio-modules-bt/default.nix b/pkgs/applications/audio/pulseaudio-modules-bt/default.nix
index f63b828a0a89..b8082c12c644 100644
--- a/pkgs/applications/audio/pulseaudio-modules-bt/default.nix
+++ b/pkgs/applications/audio/pulseaudio-modules-bt/default.nix
@@ -23,14 +23,14 @@ let
'';
in stdenv.mkDerivation rec {
- name = "pulseaudio-modules-bt-${version}";
- version = "1.1.99";
+ pname = "pulseaudio-modules-bt";
+ version = "1.3";
src = fetchFromGitHub {
owner = "EHfive";
repo = "pulseaudio-modules-bt";
rev = "v${version}";
- sha256 = "0x670xbd62r3fs9a8pa5p4ppvxn6m64hvlrqa702gvikcvyrmwcg";
+ sha256 = "00xmidcw4fvpbmg0nsm2gk5zw26fpyjbc0pjk6mzr570zbnyqqbn";
};
patches = [
diff --git a/pkgs/applications/audio/pulseeffects/default.nix b/pkgs/applications/audio/pulseeffects/default.nix
index 0a4c9bebde7c..302dd5c8e697 100644
--- a/pkgs/applications/audio/pulseeffects/default.nix
+++ b/pkgs/applications/audio/pulseeffects/default.nix
@@ -32,7 +32,6 @@
, rubberband
, mda_lv2
, lsp-plugins
-, hicolor-icon-theme
}:
let
@@ -47,13 +46,13 @@ let
];
in stdenv.mkDerivation rec {
pname = "pulseeffects";
- version = "4.6.5";
+ version = "4.6.8";
src = fetchFromGitHub {
owner = "wwmm";
repo = "pulseeffects";
rev = "v${version}";
- sha256 = "11ihr29szpqlk9wkscns00ijihyvn5659bj1p7r1ixwgfv708apq";
+ sha256 = "09crsg73mvqdknvh6lczwx16x73zb2vb3m53bsapqiaq4lmwy3qr";
};
nativeBuildInputs = [
@@ -86,7 +85,6 @@ in stdenv.mkDerivation rec {
dbus
fftwFloat
zita-convolver
- hicolor-icon-theme
];
postPatch = ''
diff --git a/pkgs/applications/audio/puredata/default.nix b/pkgs/applications/audio/puredata/default.nix
index 6ade9042b532..5886a465409a 100644
--- a/pkgs/applications/audio/puredata/default.nix
+++ b/pkgs/applications/audio/puredata/default.nix
@@ -3,7 +3,7 @@
}:
stdenv.mkDerivation rec {
- name = "puredata-${version}";
+ pname = "puredata";
version = "0.49-0";
src = fetchurl {
diff --git a/pkgs/applications/audio/qjackctl/default.nix b/pkgs/applications/audio/qjackctl/default.nix
index fbb2f498c0b1..0b50d3098aa2 100644
--- a/pkgs/applications/audio/qjackctl/default.nix
+++ b/pkgs/applications/audio/qjackctl/default.nix
@@ -1,14 +1,14 @@
-{ stdenv, fetchurl, pkgconfig, alsaLib, libjack2, dbus, qtbase, qttools, qtx11extras }:
+{ stdenv, mkDerivation, fetchurl, pkgconfig, alsaLib, libjack2, dbus, qtbase, qttools, qtx11extras }:
-stdenv.mkDerivation rec {
- version = "0.5.8";
- name = "qjackctl-${version}";
+mkDerivation rec {
+ version = "0.5.9";
+ pname = "qjackctl";
# some dependencies such as killall have to be installed additionally
src = fetchurl {
- url = "mirror://sourceforge/qjackctl/${name}.tar.gz";
- sha256 = "1r5hf3hcr20n93jrrm7xk2zf6yx264pcr4d10cpybhrancxh602n";
+ url = "mirror://sourceforge/qjackctl/${pname}-${version}.tar.gz";
+ sha256 = "1saywsda9m124rmjp7i3n0llryaliabjxhqhvqr6dm983qy7pypk";
};
buildInputs = [
diff --git a/pkgs/applications/audio/qmidinet/default.nix b/pkgs/applications/audio/qmidinet/default.nix
index b596e74a2649..d627f352e734 100644
--- a/pkgs/applications/audio/qmidinet/default.nix
+++ b/pkgs/applications/audio/qmidinet/default.nix
@@ -1,12 +1,12 @@
{ stdenv, fetchurl, pkgconfig, qt5, alsaLib, libjack2 }:
stdenv.mkDerivation rec {
- version = "0.5.4";
- name = "qmidinet-${version}";
+ version = "0.5.5";
+ pname = "qmidinet";
src = fetchurl {
- url = "mirror://sourceforge/qmidinet/${name}.tar.gz";
- sha256 = "1il4b8v3azb33yg4fy78npi56xlkz4n60f17sgvckyxb2yj57jwq";
+ url = "mirror://sourceforge/qmidinet/${pname}-${version}.tar.gz";
+ sha256 = "0az20hh14g7k6h779dk1b6fshxnfj2664sj6ypgllzriwv430x9y";
};
hardeningDisable = [ "format" ];
diff --git a/pkgs/applications/audio/qmidiroute/default.nix b/pkgs/applications/audio/qmidiroute/default.nix
index 7f5191a02c20..2a83d98b6ea3 100644
--- a/pkgs/applications/audio/qmidiroute/default.nix
+++ b/pkgs/applications/audio/qmidiroute/default.nix
@@ -2,10 +2,10 @@
stdenv.mkDerivation rec {
version = "0.4.0";
- name = "qmidiroute-${version}";
+ pname = "qmidiroute";
src = fetchurl {
- url = "mirror://sourceforge/project/alsamodular/QMidiRoute/${version}/${name}.tar.gz";
+ url = "mirror://sourceforge/project/alsamodular/QMidiRoute/${version}/${pname}-${version}.tar.gz";
sha256 = "0vmjwarsxr5540rafhmdcc62yarf0w2l05bjjl9s28zzr5m39z3n";
};
diff --git a/pkgs/applications/audio/qmmp/default.nix b/pkgs/applications/audio/qmmp/default.nix
index 03f6bb1b7936..aee373329ce0 100644
--- a/pkgs/applications/audio/qmmp/default.nix
+++ b/pkgs/applications/audio/qmmp/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, cmake, pkgconfig, xlibsWrapper
+{ stdenv, mkDerivation, fetchurl, cmake, pkgconfig, xlibsWrapper
, qtbase, qttools, qtmultimedia, qtx11extras
# transports
, curl, libmms
@@ -28,12 +28,12 @@
# Qmmp installs working .desktop file(s) all by itself, so we don't need to
# handle that.
-stdenv.mkDerivation rec {
- name = "qmmp-1.3.3";
+mkDerivation rec {
+ name = "qmmp-1.3.4";
src = fetchurl {
url = "http://qmmp.ylsoftware.com/files/${name}.tar.bz2";
- sha256 = "1777kqgvbkshqlawy00gbgwflxflwmjjidqdq29mhqszs76r6727";
+ sha256 = "0j9vgm6216w7arwl919p9rps0a9r6s4415spl3qkpifhwlk90zg0";
};
nativeBuildInputs = [ cmake pkgconfig ];
diff --git a/pkgs/applications/audio/qsampler/default.nix b/pkgs/applications/audio/qsampler/default.nix
index b09aa835c9f2..a878f4edad8f 100644
--- a/pkgs/applications/audio/qsampler/default.nix
+++ b/pkgs/applications/audio/qsampler/default.nix
@@ -2,12 +2,12 @@
, liblscp, libgig, qtbase }:
stdenv.mkDerivation rec {
- name = "qsampler-${version}";
- version = "0.5.5";
+ pname = "qsampler";
+ version = "0.5.6";
src = fetchurl {
- url = "mirror://sourceforge/qsampler/${name}.tar.gz";
- sha256 = "1li2p8zknrdr62wlaassfvgski0rlbr3lvrzywbh32dq8j50w8zf";
+ url = "mirror://sourceforge/qsampler/${pname}-${version}.tar.gz";
+ sha256 = "0lx2mzyajmjckwfvgf8p8bahzpj0n0lflyip41jk32nwd2hzjhbs";
};
nativeBuildInputs = [ autoconf automake libtool pkgconfig qttools ];
diff --git a/pkgs/applications/audio/qsynth/default.nix b/pkgs/applications/audio/qsynth/default.nix
index 82e003b2bea3..09ab372cf276 100644
--- a/pkgs/applications/audio/qsynth/default.nix
+++ b/pkgs/applications/audio/qsynth/default.nix
@@ -1,17 +1,19 @@
-{ stdenv, fetchurl, alsaLib, fluidsynth, libjack2, qt5, autoconf, pkgconfig }:
+{ stdenv, fetchurl, alsaLib, fluidsynth, libjack2, autoconf, pkgconfig
+, mkDerivation, qtbase, qttools, qtx11extras
+}:
-stdenv.mkDerivation rec {
- name = "qsynth-${version}";
+mkDerivation rec {
+ pname = "qsynth";
version = "0.5.7";
src = fetchurl {
- url = "mirror://sourceforge/qsynth/${name}.tar.gz";
+ url = "mirror://sourceforge/qsynth/${pname}-${version}.tar.gz";
sha256 = "18im4w8agj60nkppwbkxqnhpp13z5li3w30kklv4lgs20rvgbvl6";
};
nativeBuildInputs = [ autoconf pkgconfig ];
- buildInputs = [ alsaLib fluidsynth libjack2 qt5.qtbase qt5.qttools qt5.qtx11extras ];
+ buildInputs = [ alsaLib fluidsynth libjack2 qtbase qttools qtx11extras ];
enableParallelBuilding = true;
diff --git a/pkgs/applications/audio/qtractor/default.nix b/pkgs/applications/audio/qtractor/default.nix
index b83804e16be9..2e504a3c9ec2 100644
--- a/pkgs/applications/audio/qtractor/default.nix
+++ b/pkgs/applications/audio/qtractor/default.nix
@@ -1,20 +1,21 @@
{ alsaLib, autoconf, automake, dssi, fetchurl, libjack2
, ladspaH, ladspaPlugins, liblo, libmad, libsamplerate, libsndfile
, libtool, libvorbis, lilv, lv2, pkgconfig, qttools, qtbase, rubberband, serd
-, sord, sratom, stdenv, suil }:
+, sord, sratom, stdenv, suil, wrapQtAppsHook }:
stdenv.mkDerivation rec {
pname = "qtractor";
- version = "0.9.8";
+ version = "0.9.9";
src = fetchurl {
url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
- sha256 = "1llajl450yh7bka32ngm4xdva6a2nnxzjc497ydh07rwkap16smx";
+ sha256 = "0qlbccdxyfy0f09y6qg1xkg12fm67bf2f2c27c22cg8lzk9ang5j";
};
nativeBuildInputs = [
- autoconf automake libtool pkgconfig qttools
+ autoconf automake libtool pkgconfig qttools wrapQtAppsHook
];
+
buildInputs =
[ alsaLib dssi libjack2 ladspaH
ladspaPlugins liblo libmad libsamplerate libsndfile libtool
diff --git a/pkgs/applications/audio/qtscrobbler/default.nix b/pkgs/applications/audio/qtscrobbler/default.nix
index 453da89953e0..68e8e6402acf 100644
--- a/pkgs/applications/audio/qtscrobbler/default.nix
+++ b/pkgs/applications/audio/qtscrobbler/default.nix
@@ -1,7 +1,7 @@
{ stdenv, lib, fetchurl, withMtp ? true, libmtp, pkgconfig, which, qt4, qmake4Hook }:
stdenv.mkDerivation rec {
- name = "qtscrobbler-${version}";
+ pname = "qtscrobbler";
version = "0.11";
src = fetchurl {
diff --git a/pkgs/applications/audio/quodlibet/default.nix b/pkgs/applications/audio/quodlibet/default.nix
index 8db837105f82..573dca518e3a 100644
--- a/pkgs/applications/audio/quodlibet/default.nix
+++ b/pkgs/applications/audio/quodlibet/default.nix
@@ -46,11 +46,11 @@ python3.pkgs.buildPythonApplication rec {
preFixup = stdenv.lib.optionalString (kakasi != null) "gappsWrapperArgs+=(--prefix PATH : ${kakasi}/bin)";
meta = with stdenv.lib; {
- description = "GTK+-based audio player written in Python, using the Mutagen tagging library";
+ description = "GTK-based audio player written in Python, using the Mutagen tagging library";
license = licenses.gpl2Plus;
longDescription = ''
- Quod Libet is a GTK+-based audio player written in Python, using
+ Quod Libet is a GTK-based audio player written in Python, using
the Mutagen tagging library. It's designed around the idea that
you know how to organize your music better than we do. It lets
you make playlists based on regular expressions (don't worry,
@@ -65,5 +65,6 @@ python3.pkgs.buildPythonApplication rec {
maintainers = with maintainers; [ coroa sauyon ];
homepage = https://quodlibet.readthedocs.io/en/latest/;
+ broken = true;
};
}
diff --git a/pkgs/applications/audio/rakarrack/default.nix b/pkgs/applications/audio/rakarrack/default.nix
index ec71cfb427c6..36302458a75b 100644
--- a/pkgs/applications/audio/rakarrack/default.nix
+++ b/pkgs/applications/audio/rakarrack/default.nix
@@ -2,11 +2,11 @@
libXpm, libjpeg, libpng, libsamplerate, libsndfile, zlib }:
stdenv.mkDerivation rec {
- name = "rakarrack-${version}";
+ pname = "rakarrack";
version = "0.6.1";
src = fetchurl {
- url = "mirror://sourceforge/rakarrack/${name}.tar.bz2";
+ url = "mirror://sourceforge/rakarrack/${pname}-${version}.tar.bz2";
sha256 = "1rpf63pdn54c4yg13k7cb1w1c7zsvl97c4qxcpz41c8l91xd55kn";
};
diff --git a/pkgs/applications/audio/reaper/default.nix b/pkgs/applications/audio/reaper/default.nix
index 2e4658a68c98..4a6cdc44f446 100644
--- a/pkgs/applications/audio/reaper/default.nix
+++ b/pkgs/applications/audio/reaper/default.nix
@@ -5,12 +5,12 @@
}:
stdenv.mkDerivation rec {
- name = "reaper-${version}";
- version = "5.980";
+ pname = "reaper";
+ version = "5.983";
src = fetchurl {
url = "https://www.reaper.fm/files/${stdenv.lib.versions.major version}.x/reaper${builtins.replaceStrings ["."] [""] version}_linux_x86_64.tar.xz";
- sha256 = "0ij5cx43gf05q0d57p4slsp7wkq2cdb3ymh2n5iqgqjl9rf26h1q";
+ sha256 = "16xw3gsxgjfdxd1ldm8zxd48qh6lgxacnj9yjryy0brhw51dw1q4";
};
nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
diff --git a/pkgs/applications/audio/redoflacs/default.nix b/pkgs/applications/audio/redoflacs/default.nix
index 1918fa9e3a99..e32fd42af323 100644
--- a/pkgs/applications/audio/redoflacs/default.nix
+++ b/pkgs/applications/audio/redoflacs/default.nix
@@ -2,7 +2,7 @@
, flac, sox }:
stdenv.mkDerivation rec {
- name = "redoflacs-${version}";
+ pname = "redoflacs";
version = "0.30.20150202";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/renoise/default.nix b/pkgs/applications/audio/renoise/default.nix
index ddbefd129ffe..62625aa421d1 100644
--- a/pkgs/applications/audio/renoise/default.nix
+++ b/pkgs/applications/audio/renoise/default.nix
@@ -14,7 +14,7 @@ let
in
stdenv.mkDerivation rec {
- name = "renoise-${version}";
+ pname = "renoise";
version = "3.1.0";
src =
diff --git a/pkgs/applications/audio/rhvoice/default.nix b/pkgs/applications/audio/rhvoice/default.nix
index 6516532df33f..e3eb750496ba 100644
--- a/pkgs/applications/audio/rhvoice/default.nix
+++ b/pkgs/applications/audio/rhvoice/default.nix
@@ -3,8 +3,9 @@
let
version = "unstable-2018-02-10";
-in stdenv.mkDerivation rec {
- name = "rhvoice-${version}";
+in stdenv.mkDerivation {
+ pname = "rhvoice";
+ inherit version;
src = fetchFromGitHub {
owner = "Olga-Yakovleva";
diff --git a/pkgs/applications/audio/rofi-mpd/default.nix b/pkgs/applications/audio/rofi-mpd/default.nix
new file mode 100644
index 000000000000..9def4a292f61
--- /dev/null
+++ b/pkgs/applications/audio/rofi-mpd/default.nix
@@ -0,0 +1,26 @@
+{ lib, python3Packages, fetchFromGitHub }:
+
+python3Packages.buildPythonApplication rec {
+ pname = "rofi-mpd";
+ version = "1.1.0";
+
+ src = fetchFromGitHub {
+ owner = "JakeStanger";
+ repo = "Rofi_MPD";
+ rev = "v${version}";
+ sha256 = "0pdra1idgas3yl9z9v7b002igwg2c1mv0yw2ffb8rsbx88x4gbai";
+ };
+
+ propagatedBuildInputs = with python3Packages; [ mutagen mpd2 ];
+
+ # upstream doesn't contain a test suite
+ doCheck = false;
+
+ meta = with lib; {
+ description = "A rofi menu for interacting with MPD written in Python";
+ homepage = "https://github.com/JakeStanger/Rofi_MPD";
+ license = licenses.mit;
+ maintainers = with maintainers; [ jakestanger ];
+ platforms = platforms.all;
+ };
+}
diff --git a/pkgs/applications/audio/rosegarden/default.nix b/pkgs/applications/audio/rosegarden/default.nix
index 313227f77985..9445bf3723c9 100644
--- a/pkgs/applications/audio/rosegarden/default.nix
+++ b/pkgs/applications/audio/rosegarden/default.nix
@@ -4,10 +4,10 @@
stdenv.mkDerivation (rec {
version = "19.06";
- name = "rosegarden-${version}";
+ pname = "rosegarden";
src = fetchurl {
- url = "mirror://sourceforge/rosegarden/${name}.tar.bz2";
+ url = "mirror://sourceforge/rosegarden/${pname}-${version}.tar.bz2";
sha256 = "169qb58v2s8va59hzkih8nqb2aipsqlrbfs8q39ywqa8w5d60gcc";
};
diff --git a/pkgs/applications/audio/rubyripper/default.nix b/pkgs/applications/audio/rubyripper/default.nix
index 9e0a3712c971..82aa86f795bb 100644
--- a/pkgs/applications/audio/rubyripper/default.nix
+++ b/pkgs/applications/audio/rubyripper/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchurl, ruby, cdparanoia, makeWrapper }:
stdenv.mkDerivation rec {
version = "0.6.2";
- name = "rubyripper-${version}";
+ pname = "rubyripper";
src = fetchurl {
url = "https://rubyripper.googlecode.com/files/rubyripper-${version}.tar.bz2";
sha256 = "1fwyk3y0f45l2vi3a481qd7drsy82ccqdb8g2flakv58m45q0yl1";
diff --git a/pkgs/applications/audio/samplv1/default.nix b/pkgs/applications/audio/samplv1/default.nix
index f9b1fe6afe00..134757079f69 100644
--- a/pkgs/applications/audio/samplv1/default.nix
+++ b/pkgs/applications/audio/samplv1/default.nix
@@ -1,12 +1,12 @@
{ stdenv, fetchurl, pkgconfig, libjack2, alsaLib, liblo, libsndfile, lv2, qt5 }:
stdenv.mkDerivation rec {
- name = "samplv1-${version}";
- version = "0.9.9";
+ pname = "samplv1";
+ version = "0.9.10";
src = fetchurl {
- url = "mirror://sourceforge/samplv1/${name}.tar.gz";
- sha256 = "1y61wb0bzm1cz7y8xxv6hp8mrkfb9zm9irg6zs4g6aanw539r6l8";
+ url = "mirror://sourceforge/samplv1/${pname}-${version}.tar.gz";
+ sha256 = "04p5jkighmc8rf7fzzy8ch6knqbxv03vhjzdfh9dva2mlzw9rvjj";
};
buildInputs = [ libjack2 alsaLib liblo libsndfile lv2 qt5.qtbase qt5.qttools];
diff --git a/pkgs/applications/audio/sayonara/default.nix b/pkgs/applications/audio/sayonara/default.nix
index fbe90c5377df..c4258174500f 100644
--- a/pkgs/applications/audio/sayonara/default.nix
+++ b/pkgs/applications/audio/sayonara/default.nix
@@ -1,45 +1,82 @@
-{ stdenv, fetchurl, cmake, qt5, zlib, taglib, pkgconfig, pcre, gst_all_1 }:
+{ mkDerivation
+, cmake
+, fetchgit
+, gst_all_1
+, lib
+, libpulseaudio
+, ninja
+, pcre
+, pkgconfig
+, qtbase
+, qttools
+, taglib
+, zlib
+}:
-let
- version = "1.1.1-git1-20180828";
-in
-stdenv.mkDerivation {
- name = "sayonara-player-${version}";
+mkDerivation rec {
+ pname = "sayonara-player";
+ version = "1.5.1-stable5";
- src = fetchurl {
- url = "https://sayonara-player.com/sw/sayonara-player-${version}.tar.gz";
- sha256 = "0rvy47qvavrp03zjdrw025dmq9fq5aaii3q1qq8b94byarl0c5kn";
+ src = fetchgit {
+ url = "https://git.sayonara-player.com/sayonara.git";
+ rev = version;
+ sha256 = "13l7r3gaszrkyf4z8rdijfzxvcnilax4ki2mcm30wqk8d4g4qdzj";
};
- nativeBuildInputs = [ cmake pkgconfig ];
- buildInputs = with qt5; with gst_all_1;
- [ gstreamer gst-plugins-base gst-plugins-good gst-plugins-ugly
- pcre qtbase qttools taglib zlib
- ];
-
- # CMake Error at src/GUI/Resources/Icons/cmake_install.cmake:49 (file):
- # file cannot create directory: /usr/share/icons. Maybe need administrative
- # privileges.
- # Call Stack (most recent call first):
- # src/GUI/Resources/cmake_install.cmake:50 (include)
- # src/GUI/cmake_install.cmake:50 (include)
- # src/cmake_install.cmake:59 (include)
- # cmake_install.cmake:42 (include)
+ # all this can go with version 1.5.2
postPatch = ''
- substituteInPlace src/GUI/Resources/Icons/CMakeLists.txt \
- --replace "/usr/share" "$out/share"
+ # if we don't delete this, sayonara will look here instead of the provided taglib
+ rm -r src/3rdParty/taglib
+
+ for f in \
+ src/DBus/DBusNotifications.cpp \
+ src/Gui/Resources/Icons/CMakeLists.txt \
+ src/Utils/Utils.cpp \
+ test/Util/FileHelperTest.cpp \
+ ; do
+
+ substituteInPlace $f --replace /usr $out
+ done
+
+ substituteInPlace src/Components/Shutdown/Shutdown.cpp \
+ --replace /usr/bin/systemctl systemctl
'';
- # [ 65%] Building CXX object src/Components/Engine/CMakeFiles/say_comp_engine.dir/AbstractPipeline.cpp.o
- # /tmp/nix-build-sayonara-player-1.0.0-git5-20180115.drv-0/sayonara-player/src/Components/Engine/AbstractPipeline.cpp:28:32: fatal error: gst/app/gstappsink.h: No such file or directory
- # #include
+ nativeBuildInputs = [ cmake ninja pkgconfig qttools ];
+
+ buildInputs = [
+ libpulseaudio
+ pcre
+ qtbase
+ taglib
+ zlib
+ ]
+ ++ (with gst_all_1; [
+ gstreamer
+ gst-plugins-base
+ gst-plugins-good
+ gst-plugins-bad
+ gst-plugins-ugly
+ ]);
+
+ # we carry the patched taglib 1.11.1 that doesn't break ogg but sayonara just
+ # checks for the version
+ cmakeFlags = [
+ "-DWITH_SYSTEM_TAGLIB=ON"
+ ];
+
+ # gstreamer cannot otherwise be found
NIX_CFLAGS_COMPILE = "-I${gst_all_1.gst-plugins-base.dev}/include/gstreamer-1.0";
- meta = with stdenv.lib;
- { description = "Sayonara music player";
- homepage = https://sayonara-player.com/;
- license = licenses.gpl3;
- platforms = platforms.linux;
- maintainers = [ maintainers.deepfire ];
- };
+ postInstall = ''
+ qtWrapperArgs+=(--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0")
+ '';
+
+ meta = with lib; {
+ description = "Sayonara music player";
+ homepage = "https://sayonara-player.com/";
+ license = licenses.gpl3;
+ maintainers = with maintainers; [ deepfire ];
+ platforms = platforms.unix;
+ };
}
diff --git a/pkgs/applications/audio/schismtracker/default.nix b/pkgs/applications/audio/schismtracker/default.nix
index ab1a6e387383..f902b2dd41b0 100644
--- a/pkgs/applications/audio/schismtracker/default.nix
+++ b/pkgs/applications/audio/schismtracker/default.nix
@@ -2,10 +2,10 @@
stdenv.mkDerivation rec {
version = "20120105";
- name = "schismtracker-${version}";
+ pname = "schismtracker";
src = fetchurl {
- url = "http://schismtracker.org/dl/${name}.tar.bz2";
+ url = "http://schismtracker.org/dl/${pname}-${version}.tar.bz2";
sha256 = "1ny7wv2wxm1av299wvpskall6438wjjpadphmqc7c0h6d0zg5kii";
};
diff --git a/pkgs/applications/audio/seq24/default.nix b/pkgs/applications/audio/seq24/default.nix
index d47ede27ece2..9bab024f021e 100644
--- a/pkgs/applications/audio/seq24/default.nix
+++ b/pkgs/applications/audio/seq24/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, alsaLib, gtkmm2, libjack2, pkgconfig }:
stdenv.mkDerivation rec {
- name = "seq24-${version}";
+ pname = "seq24";
version = "0.9.3";
src = fetchurl {
- url = "https://launchpad.net/seq24/trunk/${version}/+download/${name}.tar.gz";
+ url = "https://launchpad.net/seq24/trunk/${version}/+download/${pname}-${version}.tar.gz";
sha256 = "1qpyb7355s21sgy6gibkybxpzx4ikha57a8w644lca6qy9mhcwi3";
};
diff --git a/pkgs/applications/audio/setbfree/default.nix b/pkgs/applications/audio/setbfree/default.nix
index 1047734a2c18..cd8079e31dce 100644
--- a/pkgs/applications/audio/setbfree/default.nix
+++ b/pkgs/applications/audio/setbfree/default.nix
@@ -1,17 +1,17 @@
-{ stdenv, fetchurl, alsaLib, freetype, ftgl, libjack2, libX11, lv2
+{ stdenv, fetchzip, alsaLib, freetype, ftgl, libjack2, libX11, lv2
, libGLU_combined, pkgconfig, ttf_bitstream_vera
}:
stdenv.mkDerivation rec {
- name = "setbfree-${version}";
- version = "0.8.8";
+ pname = "setbfree";
+ version = "0.8.9";
- src = fetchurl {
+ src = fetchzip {
url = "https://github.com/pantherb/setBfree/archive/v${version}.tar.gz";
- sha256 = "1ldxwds99azingkjh246kz7x3j7307jhr0fls5rjjbcfchpg7v99";
+ sha256 = "097bby2da47zlkaqy2jl8j6q0h5pxaq67lz473ygadqs5ic3nhc1";
};
- patchPhase = ''
+ postPatch = ''
sed 's#/usr/local#$(out)#g' -i common.mak
sed 's#/usr/share/fonts/truetype/ttf-bitstream-vera#${ttf_bitstream_vera}/share/fonts/truetype#g' \
-i b_synth/Makefile
@@ -25,9 +25,9 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; {
description = "A DSP tonewheel organ emulator";
- homepage = http://setbfree.org;
+ homepage = "http://setbfree.org";
license = licenses.gpl2;
- platforms = platforms.linux;
+ platforms = [ "x86_64-linux" "i686-linux" ]; # fails on ARM and Darwin
maintainers = [ maintainers.goibhniu ];
};
}
diff --git a/pkgs/applications/audio/sfxr-qt/default.nix b/pkgs/applications/audio/sfxr-qt/default.nix
index a98d1431d65e..615a8a8c6604 100644
--- a/pkgs/applications/audio/sfxr-qt/default.nix
+++ b/pkgs/applications/audio/sfxr-qt/default.nix
@@ -1,12 +1,15 @@
-{ stdenv, fetchFromGitHub
+{ lib
+, mkDerivation
+, fetchFromGitHub
, cmake
-, qtbase, qtquickcontrols2
+, qtbase
+, qtquickcontrols2
, SDL
, python3
}:
-stdenv.mkDerivation rec {
- name = "sfxr-qt-${version}";
+mkDerivation rec {
+ pname = "sfxr-qt";
version = "1.2.0";
src = fetchFromGitHub {
owner = "agateau";
@@ -17,15 +20,16 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [
cmake
- (python3.withPackages (pp: with pp; [ pyyaml jinja2 ]))
+ (python3.withPackages (pp: with pp; [ pyyaml jinja2 setuptools ]))
];
buildInputs = [
- qtbase qtquickcontrols2
+ qtbase
+ qtquickcontrols2
SDL
];
configurePhase = "cmake . -DCMAKE_INSTALL_PREFIX=$out";
- meta = with stdenv.lib; {
+ meta = with lib; {
homepage = https://github.com/agateau/sfxr-qt;
description = "A sound effect generator, QtQuick port of sfxr";
license = licenses.gpl2;
diff --git a/pkgs/applications/audio/shntool/default.nix b/pkgs/applications/audio/shntool/default.nix
index 8645251b384d..e3bfc60a40a5 100644
--- a/pkgs/applications/audio/shntool/default.nix
+++ b/pkgs/applications/audio/shntool/default.nix
@@ -1,8 +1,8 @@
{ stdenv, fetchurl, flac }:
-stdenv.mkDerivation rec {
+stdenv.mkDerivation {
version = "3.0.10";
- name = "shntool-${version}";
+ pname = "shntool";
src = fetchurl {
url = http://www.etree.org/shnutils/shntool/dist/src/shntool-3.0.10.tar.gz;
diff --git a/pkgs/applications/audio/sidplayfp/default.nix b/pkgs/applications/audio/sidplayfp/default.nix
index b857c5b68358..aff8c173d9f2 100644
--- a/pkgs/applications/audio/sidplayfp/default.nix
+++ b/pkgs/applications/audio/sidplayfp/default.nix
@@ -2,10 +2,10 @@
stdenv.mkDerivation rec {
version = "1.4.4";
- name = "sidplayfp-${version}";
+ pname = "sidplayfp";
src = fetchurl {
- url = "mirror://sourceforge/sidplay-residfp/sidplayfp/1.4/${name}.tar.gz";
+ url = "mirror://sourceforge/sidplay-residfp/sidplayfp/1.4/${pname}-${version}.tar.gz";
sha256 = "0arsrg3f0fsinal22qjmj3r6500bcbgqnx26fsz049ldl716kz1m";
};
diff --git a/pkgs/applications/audio/snapcast/default.nix b/pkgs/applications/audio/snapcast/default.nix
index 5730dec6b994..21a36cecbe54 100644
--- a/pkgs/applications/audio/snapcast/default.nix
+++ b/pkgs/applications/audio/snapcast/default.nix
@@ -32,7 +32,7 @@ let
in
stdenv.mkDerivation rec {
- name = "snapcast-${version}";
+ pname = "snapcast";
version = "0.15.0";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/snd/default.nix b/pkgs/applications/audio/snd/default.nix
index a8896f3945b1..43637ef5dc4b 100644
--- a/pkgs/applications/audio/snd/default.nix
+++ b/pkgs/applications/audio/snd/default.nix
@@ -4,11 +4,11 @@
}:
stdenv.mkDerivation rec {
- name = "snd-19.5";
+ name = "snd-19.7";
src = fetchurl {
url = "mirror://sourceforge/snd/${name}.tar.gz";
- sha256 = "0sk6iyykwi2mm3f1g4r0iqbsrwk3zmyagp6jjqkh8njbq42cjr1y";
+ sha256 = "1pr3l9iadvwinmxfl9a2lsm67yi7w3rhxglidpd41m2ni8jf2rlm";
};
nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/applications/audio/sndpeek/default.nix b/pkgs/applications/audio/sndpeek/default.nix
new file mode 100644
index 000000000000..ecdafdaeaddd
--- /dev/null
+++ b/pkgs/applications/audio/sndpeek/default.nix
@@ -0,0 +1,56 @@
+{ stdenv, fetchurl, libsndfile, freeglut, alsaLib, mesa, libGLU, libX11, libXmu
+, libXext, libXi }:
+
+stdenv.mkDerivation rec {
+ pname = "sndpeek";
+ version = "1.4";
+
+ src = fetchurl {
+ url = "https://soundlab.cs.princeton.edu/software/sndpeek/files/sndpeek-${version}.tgz";
+ sha256 = "2d86cf74854fa00dcdc05a35dd92bc4cf6115e87102b17023be5cba9ead8eedf";
+ };
+ sourceRoot = "sndpeek-${version}/src/sndpeek";
+
+ # this patch adds -lpthread to the list of libraries, without it a
+ # symbol-not-found-error is thrown
+ patches = [ ./pthread.patch ];
+
+ buildInputs = [
+ freeglut
+ alsaLib
+ mesa
+ libGLU
+ libsndfile
+ libX11
+ libXmu
+ libXext
+ libXi
+ ];
+ buildFlags = "linux-alsa";
+
+ installPhase = ''
+ mkdir -p $out/bin
+ mv sndpeek $out/bin
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Real-time 3D animated audio display/playback";
+ longDescription = ''
+ sndpeek is just what it sounds (and looks) like:
+ * real-time 3D animated display/playback
+ * can use mic-input or wav/aiff/snd/raw/mat file (with playback)
+ * time-domain waveform
+ * FFT magnitude spectrum
+ * 3D waterfall plot
+ * lissajous! (interchannel correlation)
+ * rotatable and scalable display
+ * freeze frame! (for didactic purposes)
+ * real-time spectral feature extraction (centroid, rms, flux, rolloff)
+ * available on MacOS X, Linux, and Windows under GPL
+ * part of the sndtools distribution.
+ '';
+ homepage = https://soundlab.cs.princeton.edu/software/sndpeek/;
+ license = licenses.gpl2;
+ maintainers = [ maintainers.laikq ];
+ };
+}
diff --git a/pkgs/applications/audio/sndpeek/pthread.patch b/pkgs/applications/audio/sndpeek/pthread.patch
new file mode 100644
index 000000000000..b2f1d37da6be
--- /dev/null
+++ b/pkgs/applications/audio/sndpeek/pthread.patch
@@ -0,0 +1,13 @@
+diff --git a/makefile.alsa b/makefile.alsa
+index 34fb848..cdaeaec 100644
+--- a/makefile.alsa
++++ b/makefile.alsa
+@@ -4,7 +4,7 @@ CPP=g++
+ INCLUDES=-I../marsyas/
+ MARSYAS_DIR=../marsyas/
+ CFLAGS=-D__LINUX_ALSA__ -D__LITTLE_ENDIAN__ $(INCLUDES) -O3 -c
+-LIBS=-L/usr/X11R6/lib -lglut -lGL -lGLU -lasound -lXmu -lX11 -lXext -lXi -lm -lsndfile
++LIBS=-L/usr/X11R6/lib -lglut -lGL -lGLU -lasound -lXmu -lX11 -lXext -lXi -lm -lsndfile -lpthread
+
+ OBJS=chuck_fft.o RtAudio.o Thread.o sndpeek.o Stk.o \
+ Centroid.o DownSampler.o Flux.o LPC.o MFCC.o RMS.o Rolloff.o \
diff --git a/pkgs/applications/audio/sonata/default.nix b/pkgs/applications/audio/sonata/default.nix
index d5985f097e9f..ce2a4e9d2c80 100644
--- a/pkgs/applications/audio/sonata/default.nix
+++ b/pkgs/applications/audio/sonata/default.nix
@@ -41,7 +41,7 @@ in buildPythonApplication rec {
longDescription = ''
Sonata is an elegant client for the Music Player Daemon.
- Written in Python and using the GTK+ 3 widget set, its features
+ Written in Python and using the GTK 3 widget set, its features
include:
- Expanded and collapsed views
diff --git a/pkgs/applications/audio/sonic-pi/default.nix b/pkgs/applications/audio/sonic-pi/default.nix
index ee72b6cdb1a4..055678b0e35f 100644
--- a/pkgs/applications/audio/sonic-pi/default.nix
+++ b/pkgs/applications/audio/sonic-pi/default.nix
@@ -1,4 +1,6 @@
-{ stdenv
+{ mkDerivation
+, lib
+, qtbase
, fetchFromGitHub
, fftwSinglePrec
, ruby
@@ -6,22 +8,23 @@
, aubio
, cmake
, pkgconfig
-, qt5
-, libsForQt5
, boost
, bash
-, makeWrapper
, jack2Full
+, supercollider
+, qscintilla
+, qwt
}:
let
- supercollider = libsForQt5.callPackage ../../../development/interpreters/supercollider {
- fftw = fftwSinglePrec;
- };
-in stdenv.mkDerivation rec {
+ supercollider_single_prec = supercollider.override { fftw = fftwSinglePrec; };
+
+in
+
+mkDerivation rec {
version = "3.1.0";
- name = "sonic-pi-${version}";
+ pname = "sonic-pi";
src = fetchFromGitHub {
owner = "samaaron";
@@ -33,15 +36,14 @@ in stdenv.mkDerivation rec {
buildInputs = [
bash
cmake
- makeWrapper
pkgconfig
- qt5.qtbase
- libsForQt5.qscintilla
- libsForQt5.qwt
+ qtbase
+ qscintilla
+ qwt
ruby
libffi
aubio
- supercollider
+ supercollider_single_prec
boost
];
@@ -80,20 +82,24 @@ in stdenv.mkDerivation rec {
installPhase = ''
runHook preInstall
-
cp -r . $out
- wrapProgram $out/bin/sonic-pi \
+ runHook postInstall
+ '';
+
+ # $out/bin/sonic-pi is a shell script, and wrapQtAppsHook doesn't wrap them.
+ dontWrapQtApps = true;
+ preFixup = ''
+ wrapQtApp "$out/bin/sonic-pi" \
--prefix PATH : ${ruby}/bin:${bash}/bin:${supercollider}/bin:${jack2Full}/bin \
--set AUBIO_LIB "${aubio}/lib/libaubio.so"
-
- runHook postInstall
'';
meta = {
homepage = http://sonic-pi.net/;
description = "Free live coding synth for everyone originally designed to support computing and music lessons within schools";
- license = stdenv.lib.licenses.mit;
- maintainers = with stdenv.lib.maintainers; [ Phlogistique kamilchm ];
- platforms = stdenv.lib.platforms.linux;
+ license = lib.licenses.mit;
+ maintainers = with lib.maintainers; [ Phlogistique kamilchm ];
+ platforms = lib.platforms.linux;
+ broken = true;
};
}
diff --git a/pkgs/applications/audio/sonic-visualiser/default.nix b/pkgs/applications/audio/sonic-visualiser/default.nix
index d5f613b45945..501d097f29fa 100644
--- a/pkgs/applications/audio/sonic-visualiser/default.nix
+++ b/pkgs/applications/audio/sonic-visualiser/default.nix
@@ -7,11 +7,11 @@
}:
stdenv.mkDerivation rec {
- name = "sonic-visualiser-${version}";
+ pname = "sonic-visualiser";
version = "2.4.1";
src = fetchurl {
- url = "https://code.soundsoftware.ac.uk/attachments/download/1185/${name}.tar.gz";
+ url = "https://code.soundsoftware.ac.uk/attachments/download/1185/${pname}-${version}.tar.gz";
sha256 = "06nlha70kgrby16nyhngrv5q846xagnxdinv608v7ga7vpywwmyb";
};
diff --git a/pkgs/applications/audio/sooperlooper/default.nix b/pkgs/applications/audio/sooperlooper/default.nix
index bf4d96c6fc4e..768b40a11388 100644
--- a/pkgs/applications/audio/sooperlooper/default.nix
+++ b/pkgs/applications/audio/sooperlooper/default.nix
@@ -4,7 +4,7 @@
}:
stdenv.mkDerivation rec {
- name = "sooperlooper-git-${version}";
+ pname = "sooperlooper-git";
version = "2016-07-19";
src = fetchFromGitHub {
@@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
and the engine can be run standalone on a computer without a monitor.
'';
- version = "${version}";
+ version = version;
homepage = http://essej.net/sooperlooper/index.html;
license = stdenv.lib.licenses.gpl2;
maintainers = [ stdenv.lib.maintainers.magnetophon ];
diff --git a/pkgs/applications/audio/sorcer/default.nix b/pkgs/applications/audio/sorcer/default.nix
index cf0b5db81f62..5d8ae0928c90 100644
--- a/pkgs/applications/audio/sorcer/default.nix
+++ b/pkgs/applications/audio/sorcer/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub , boost, cairomm, cmake, libsndfile, lv2, ntk, pkgconfig, python }:
stdenv.mkDerivation rec {
- name = "sorcer-${version}";
+ pname = "sorcer";
version = "1.1.3";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/soundscape-renderer/default.nix b/pkgs/applications/audio/soundscape-renderer/default.nix
index babe4edff9df..30ff41da3695 100644
--- a/pkgs/applications/audio/soundscape-renderer/default.nix
+++ b/pkgs/applications/audio/soundscape-renderer/default.nix
@@ -14,8 +14,8 @@
, libGLU_combined # Needed because help2man basically does a ./ssr-binaural --help and ssr-binaural needs libGL
}:
-stdenv.mkDerivation rec {
- name = "soundscape-renderer-unstable-${version}";
+stdenv.mkDerivation {
+ pname = "soundscape-renderer-unstable";
version = "2016-11-03";
diff --git a/pkgs/applications/audio/spectmorph/default.nix b/pkgs/applications/audio/spectmorph/default.nix
index 9557770418e8..7544a3520c76 100644
--- a/pkgs/applications/audio/spectmorph/default.nix
+++ b/pkgs/applications/audio/spectmorph/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, pkgconfig, libjack2, lv2, glib, qt5, libao, cairo, libsndfile, fftwFloat }:
stdenv.mkDerivation rec {
- name = "spectmorph-${version}";
- version = "0.4.1";
+ pname = "spectmorph";
+ version = "0.5.0";
src = fetchurl {
- url = "http://spectmorph.org/files/releases/${name}.tar.bz2";
- sha256 = "0z00yvv3jl8qsx6bz9msmg09mdnj5r5d4ws5bmnylwxk182whbrv";
+ url = "http://spectmorph.org/files/releases/${pname}-${version}.tar.bz2";
+ sha256 = "003wznv3sy1b4g55vqii9pr3i3bb3zmj7nqvwrz7vjsfn2xyd1bn";
};
buildInputs = [ libjack2 lv2 glib qt5.qtbase libao cairo libsndfile fftwFloat ];
diff --git a/pkgs/applications/audio/spectrojack/default.nix b/pkgs/applications/audio/spectrojack/default.nix
index 6614e3702247..4c1682b1e0b8 100644
--- a/pkgs/applications/audio/spectrojack/default.nix
+++ b/pkgs/applications/audio/spectrojack/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, pkgconfig, libjack2, fftwFloat, gtk2 }:
stdenv.mkDerivation rec {
- name = "spectrojack-${version}";
+ pname = "spectrojack";
version = "0.4.1";
src = fetchurl {
- url = "http://sed.free.fr/spectrojack/${name}.tar.gz";
+ url = "http://sed.free.fr/spectrojack/${pname}-${version}.tar.gz";
sha256 = "1kiwx0kag7kq7rhg0bvckfm8r7pqmbk76ppa39cq2980jb5v8rfp";
};
nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/applications/audio/speech-denoiser/default.nix b/pkgs/applications/audio/speech-denoiser/default.nix
index 2401dc60b09a..6598d24fb07a 100644
--- a/pkgs/applications/audio/speech-denoiser/default.nix
+++ b/pkgs/applications/audio/speech-denoiser/default.nix
@@ -8,7 +8,7 @@ let
sha256 = "189l6lz8sz5vr6bjyzgcsrvksl1w6crqsg0q65r94b5yjsmjnpr4";
};
- rnnoise-nu = stdenv.mkDerivation rec {
+ rnnoise-nu = stdenv.mkDerivation {
pname = "rnnoise-nu";
version = "unstable-07-10-2019";
src = speech-denoiser-src;
@@ -18,7 +18,7 @@ let
installTargets = [ "install-rnnoise-nu" ];
};
in
-stdenv.mkDerivation rec {
+stdenv.mkDerivation {
pname = "speech-denoiser";
version = "unstable-07-10-2019";
diff --git a/pkgs/applications/audio/spek/default.nix b/pkgs/applications/audio/spek/default.nix
index 8af7888f74bb..f4922e388c46 100644
--- a/pkgs/applications/audio/spek/default.nix
+++ b/pkgs/applications/audio/spek/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchzip, autoconf, automake, intltool, pkgconfig, ffmpeg, wxGTK }:
stdenv.mkDerivation rec {
- name = "spek-${version}";
+ pname = "spek";
version = "0.8.3";
src = fetchzip {
- name = "${name}-src";
+ name = "${pname}-${version}-src";
url = "https://github.com/alexkay/spek/archive/v${version}.tar.gz";
sha256 = "0y4hlhswpqkqpsglrhg5xbfy1a6f9fvasgdf336vhwcjqsc3k2xv";
};
diff --git a/pkgs/applications/audio/split2flac/default.nix b/pkgs/applications/audio/split2flac/default.nix
index 372e507ed0e9..3c9565df9199 100644
--- a/pkgs/applications/audio/split2flac/default.nix
+++ b/pkgs/applications/audio/split2flac/default.nix
@@ -18,7 +18,7 @@ let
'';
in stdenv.mkDerivation rec {
- name = "split2flac-${version}";
+ pname = "split2flac";
version = "122";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/spotify-tui/default.nix b/pkgs/applications/audio/spotify-tui/default.nix
new file mode 100644
index 000000000000..5c681eac990c
--- /dev/null
+++ b/pkgs/applications/audio/spotify-tui/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchFromGitHub, rustPlatform, pkgconfig, openssl, Security }:
+
+rustPlatform.buildRustPackage rec {
+ pname = "spotify-tui";
+ version = "0.6.2";
+
+ src = fetchFromGitHub {
+ owner = "Rigellute";
+ repo = "spotify-tui";
+ rev = "v${version}";
+ sha256 = "0ksrdavnvjpph7h0lcc2hvxhygfbn0dmsabq2ilslvpa80ph2c53";
+ };
+
+ cargoSha256 = "029g80mcqvmckszpbzm4hxs5w63n41ah4rc1b93i9c1nzvncd811";
+
+ nativeBuildInputs = [ pkgconfig ];
+ buildInputs = [ openssl ]
+ ++ stdenv.lib.optional stdenv.isDarwin Security;
+
+ meta = with stdenv.lib; {
+ description = "Spotify for the terminal written in Rust";
+ homepage = https://github.com/Rigellute/spotify-tui;
+ license = licenses.mit;
+ maintainers = with maintainers; [ jwijenbergh ];
+ platforms = platforms.all;
+ };
+}
diff --git a/pkgs/applications/audio/spotify/default.nix b/pkgs/applications/audio/spotify/default.nix
index f7b24aa28249..3f99e22a4cbd 100644
--- a/pkgs/applications/audio/spotify/default.nix
+++ b/pkgs/applications/audio/spotify/default.nix
@@ -1,7 +1,7 @@
{ fetchurl, stdenv, squashfsTools, xorg, alsaLib, makeWrapper, openssl, freetype
, glib, pango, cairo, atk, gdk-pixbuf, gtk2, cups, nspr, nss, libpng, libnotify
, libgcrypt, systemd, fontconfig, dbus, expat, ffmpeg_3, curl, zlib, gnome3
-, at-spi2-atk, at-spi2-core, apulse
+, at-spi2-atk
}:
let
@@ -10,22 +10,20 @@ let
# If an update breaks things, one of those might have valuable info:
# https://aur.archlinux.org/packages/spotify/
# https://community.spotify.com/t5/Desktop-Linux
- version = "1.1.10.546.ge08ef575-19";
+ version = "1.0.96.181.gf6bc1b6b-12";
# To get the latest stable revision:
# curl -H 'X-Ubuntu-Series: 16' 'https://api.snapcraft.io/api/v1/snaps/details/spotify?channel=stable' | jq '.download_url,.version,.last_updated'
# To get general information:
# curl -H 'Snap-Device-Series: 16' 'https://api.snapcraft.io/v2/snaps/info/spotify' | jq '.'
# More examples of api usage:
# https://github.com/canonical-websites/snapcraft.io/blob/master/webapp/publisher/snaps/views.py
- rev = "36";
+ rev = "30";
deps = [
alsaLib
- apulse
atk
at-spi2-atk
- at-spi2-core
cairo
cups
curl
@@ -62,7 +60,8 @@ let
in
stdenv.mkDerivation {
- name = "spotify-${version}";
+ pname = "spotify";
+ inherit version;
# fetch from snapcraft instead of the debian repository most repos fetch from.
# That is a bit more cumbersome. But the debian repository only keeps the last
@@ -74,13 +73,11 @@ stdenv.mkDerivation {
# https://community.spotify.com/t5/Desktop-Linux/Redistribute-Spotify-on-Linux-Distributions/td-p/1695334
src = fetchurl {
url = "https://api.snapcraft.io/api/v1/snaps/download/pOBIoZ2LrCB3rDohMxoYGnbN14EHOgD7_${rev}.snap";
- sha512 = "c49f1a86a9b737e64a475bbe62754a36f607669e908eb725a2395f0a0a6b95968e0c8ce27ab2c8b6c92fe8cbacb1ef58de11c79b92dc0f58c2c6d3a140706a1f";
+ sha512 = "859730fbc80067f0828f7e13eee9a21b13b749f897a50e17c2da4ee672785cfd79e1af6336e609529d105e040dc40f61b6189524783ac93d49f991c4ea8b3c56";
};
buildInputs = [ squashfsTools makeWrapper ];
- doConfigure = false;
- doBuild = false;
dontStrip = true;
dontPatchELF = true;
@@ -136,8 +133,6 @@ stdenv.mkDerivation {
librarypath="${stdenv.lib.makeLibraryPath deps}:$libdir"
wrapProgram $out/share/spotify/spotify \
--prefix LD_LIBRARY_PATH : "$librarypath" \
- --prefix LD_LIBRARY_PATH : "${apulse}/lib/apulse" \
- --set APULSE_PLAYBACK_DEVICE plug:dmix \
--prefix PATH : "${gnome3.zenity}/bin"
# fix Icon line in the desktop file (#48062)
@@ -162,7 +157,7 @@ stdenv.mkDerivation {
homepage = https://www.spotify.com/;
description = "Play music from the Spotify music service";
license = licenses.unfree;
- maintainers = with maintainers; [ eelco ftrvxmtrx sheenobu mudri timokau angristan ];
+ maintainers = with maintainers; [ eelco ftrvxmtrx sheenobu mudri timokau ];
platforms = [ "x86_64-linux" ];
};
}
diff --git a/pkgs/applications/audio/spotifyd/default.nix b/pkgs/applications/audio/spotifyd/default.nix
index 5f064cf4e885..d420d1a67095 100644
--- a/pkgs/applications/audio/spotifyd/default.nix
+++ b/pkgs/applications/audio/spotifyd/default.nix
@@ -6,16 +6,16 @@
rustPlatform.buildRustPackage rec {
pname = "spotifyd";
- version = "0.2.11";
+ version = "0.2.19";
src = fetchFromGitHub {
owner = "Spotifyd";
repo = "spotifyd";
- rev = "${version}";
- sha256 = "1iybk9xrrvhrcl2xl5r2xhyn1ydhrgwnnb8ldhsw5c16b32z03q1";
+ rev = "v${version}";
+ sha256 = "063b28ysj224m6ngns9i574i7vnp1x4g07cqjw908ch04yngcg1c";
};
- cargoSha256 = "0879p1h32259schmy8j3xnwpw3sw80f8mrj8s6b5aihi3yyzz521";
+ cargoSha256 = "0pqxqd5dyw9mjclrqkxzfnzsz74xl4bg0b86v5q6kc0a91zd49b9";
cargoBuildFlags = [
"--no-default-features"
@@ -30,11 +30,13 @@ rustPlatform.buildRustPackage rec {
++ stdenv.lib.optional withPulseAudio libpulseaudio
++ stdenv.lib.optional withPortAudio portaudio;
+ doCheck = false;
+
meta = with stdenv.lib; {
description = "An open source Spotify client running as a UNIX daemon";
homepage = "https://github.com/Spotifyd/spotifyd";
license = with licenses; [ gpl3 ];
- maintainers = [ maintainers.anderslundstedt ];
+ maintainers = [ maintainers.anderslundstedt maintainers.marsam ];
platforms = platforms.unix;
};
}
diff --git a/pkgs/applications/audio/spotifywm/default.nix b/pkgs/applications/audio/spotifywm/default.nix
index 64ae9491535a..2380c8e5d9ed 100644
--- a/pkgs/applications/audio/spotifywm/default.nix
+++ b/pkgs/applications/audio/spotifywm/default.nix
@@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, spotify, xorg, runtimeShell }:
-stdenv.mkDerivation rec {
- name = "spotifywm-unstable-${version}";
+stdenv.mkDerivation {
+ pname = "spotifywm-unstable";
version = "2016-11-28";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/ssrc/default.nix b/pkgs/applications/audio/ssrc/default.nix
index 19386b477942..1247bbc19f97 100644
--- a/pkgs/applications/audio/ssrc/default.nix
+++ b/pkgs/applications/audio/ssrc/default.nix
@@ -2,7 +2,6 @@
stdenv.mkDerivation rec {
pname = "ssrc";
- name = "${pname}-${version}";
version = "1.33";
src = fetchFromGitHub {
@@ -33,7 +32,7 @@ stdenv.mkDerivation rec {
without audible degradation.
'';
- version = "${version}";
+ version = version;
homepage = http://shibatch.sourceforge.net/;
license = licenses.gpl2;
maintainers = with maintainers; [ leenaars];
diff --git a/pkgs/applications/audio/strawberry/default.nix b/pkgs/applications/audio/strawberry/default.nix
new file mode 100644
index 000000000000..83455460123c
--- /dev/null
+++ b/pkgs/applications/audio/strawberry/default.nix
@@ -0,0 +1,97 @@
+{ mkDerivation
+, stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, pkgconfig
+, alsaLib
+, boost
+, chromaprint
+, fftw
+, gnutls
+, libcdio
+, libmtp
+, libpthreadstubs
+, libtasn1
+, libXdmcp
+, ninja
+, pcre
+, protobuf
+, sqlite
+, taglib
+, libpulseaudio ? null
+, libselinux ? null
+, libsepol ? null
+, p11_kit ? null
+, utillinux ? null
+, qtbase
+, qtx11extras
+, qttools
+, withGstreamer ? true
+, gst_all_1 ? null
+, withVlc ? true
+, vlc ? null
+}:
+
+mkDerivation rec {
+ pname = "strawberry";
+ version = "0.6.3";
+
+ src = fetchFromGitHub {
+ owner = "jonaski";
+ repo = pname;
+ rev = version;
+ sha256 = "01j5jzzicy895kg9sjy46lbcm5kvf3642d3q5wwb2fyvyq1fbcv0";
+ };
+
+ buildInputs = [
+ alsaLib
+ boost
+ chromaprint
+ fftw
+ gnutls
+ libcdio
+ libmtp
+ libpthreadstubs
+ libtasn1
+ libXdmcp
+ pcre
+ protobuf
+ sqlite
+ taglib
+ qtbase
+ qtx11extras
+ ]
+ ++ lib.optionals stdenv.isLinux [
+ libpulseaudio
+ libselinux
+ libsepol
+ p11_kit
+ utillinux
+ ]
+ ++ lib.optionals withGstreamer (with gst_all_1; [
+ gstreamer
+ gst-plugins-base
+ gst-plugins-good
+ gst-plugins-ugly
+ ])
+ ++ lib.optional withVlc vlc;
+
+ nativeBuildInputs = [ cmake ninja pkgconfig qttools ];
+
+ cmakeFlags = [
+ "-DUSE_SYSTEM_TAGLIB=ON"
+ ];
+
+ postInstall = ''
+ qtWrapperArgs+=(--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0")
+ '';
+
+ meta = with lib; {
+ description = "Music player and music collection organizer";
+ license = licenses.gpl2;
+ maintainers = with maintainers; [ peterhoeg ];
+ # upstream says darwin should work but they lack maintainers as of 0.6.3
+ platforms = platforms.linux;
+ };
+}
diff --git a/pkgs/applications/audio/streamripper/default.nix b/pkgs/applications/audio/streamripper/default.nix
index 39d1c266a373..efa87a2f72cc 100644
--- a/pkgs/applications/audio/streamripper/default.nix
+++ b/pkgs/applications/audio/streamripper/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl , glib, pkgconfig, libogg, libvorbis, libmad }:
stdenv.mkDerivation rec {
- name = "streamripper-${version}";
+ pname = "streamripper";
version = "1.64.6";
src = fetchurl {
- url = "mirror://sourceforge/streamripper/${name}.tar.gz";
+ url = "mirror://sourceforge/streamripper/${pname}-${version}.tar.gz";
sha256 = "0hnyv3206r0rfprn3k7k6a0j959kagsfyrmyjm3gsf3vkhp5zmy1";
};
diff --git a/pkgs/applications/audio/sunvox/default.nix b/pkgs/applications/audio/sunvox/default.nix
index 957ee50ca7ad..1a3d1a96c85d 100644
--- a/pkgs/applications/audio/sunvox/default.nix
+++ b/pkgs/applications/audio/sunvox/default.nix
@@ -12,7 +12,7 @@ let
else "x86";
in
stdenv.mkDerivation rec {
- name = "SunVox-${version}";
+ pname = "SunVox";
version = "1.9.4c";
src = fetchurl {
diff --git a/pkgs/applications/audio/svox/default.nix b/pkgs/applications/audio/svox/default.nix
index 5e26b6c1cdb8..8acd8e0b88b1 100644
--- a/pkgs/applications/audio/svox/default.nix
+++ b/pkgs/applications/audio/svox/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchgit }:
-stdenv.mkDerivation rec {
- name = "svox-${version}";
+stdenv.mkDerivation {
+ pname = "svox";
version = "2017-07-18";
src = fetchgit {
diff --git a/pkgs/applications/audio/swh-lv2/default.nix b/pkgs/applications/audio/swh-lv2/default.nix
index 6fa0eb7f8f2b..b59752d7cc3e 100644
--- a/pkgs/applications/audio/swh-lv2/default.nix
+++ b/pkgs/applications/audio/swh-lv2/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchurl, fftwSinglePrec, libxslt, lv2, pkgconfig }:
stdenv.mkDerivation rec {
- name = "swh-lv2-${version}";
+ pname = "swh-lv2";
version = "1.0.16";
src = fetchurl {
diff --git a/pkgs/applications/audio/synthv1/default.nix b/pkgs/applications/audio/synthv1/default.nix
index d28329b01171..6d650abfb97b 100644
--- a/pkgs/applications/audio/synthv1/default.nix
+++ b/pkgs/applications/audio/synthv1/default.nix
@@ -1,12 +1,12 @@
{ stdenv, fetchurl, pkgconfig, qt5, libjack2, alsaLib, liblo, lv2 }:
stdenv.mkDerivation rec {
- name = "synthv1-${version}";
- version = "0.9.9";
+ pname = "synthv1";
+ version = "0.9.10";
src = fetchurl {
- url = "mirror://sourceforge/synthv1/${name}.tar.gz";
- sha256 = "0cvamqzg74qfr7kzk3skimskmv0j3d1rmmpbpsmfcrg8srvyx9r2";
+ url = "mirror://sourceforge/synthv1/${pname}-${version}.tar.gz";
+ sha256 = "1ssdm7aiaz908ydqwdx9khxnnd0yfacjgvbxg5p9s9xhkbqqc2f2";
};
buildInputs = [ qt5.qtbase qt5.qttools libjack2 alsaLib liblo lv2 ];
diff --git a/pkgs/applications/audio/tambura/default.nix b/pkgs/applications/audio/tambura/default.nix
index a739d72898e2..030bb2c01a72 100644
--- a/pkgs/applications/audio/tambura/default.nix
+++ b/pkgs/applications/audio/tambura/default.nix
@@ -1,12 +1,11 @@
{ stdenv, fetchFromGitHub, faust2jaqt, faust2lv2 }:
stdenv.mkDerivation rec {
pname = "Tambura";
- name = "${pname}-${version}";
version = "1.0";
src = fetchFromGitHub {
owner = "olilarkin";
- repo = "${pname}";
+ repo = pname;
rev = "v${version}";
sha256 = "1w80cmiyzca1wirf5gypg3hcix1ky777id8wnd3k92mn1jf4a24y";
};
diff --git a/pkgs/applications/audio/tetraproc/default.nix b/pkgs/applications/audio/tetraproc/default.nix
index 257963de256f..40362fdd4968 100644
--- a/pkgs/applications/audio/tetraproc/default.nix
+++ b/pkgs/applications/audio/tetraproc/default.nix
@@ -4,11 +4,11 @@
}:
stdenv.mkDerivation rec {
- name = "tetraproc-${version}";
+ pname = "tetraproc";
version = "0.8.6";
src = fetchurl {
- url = "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/${name}.tar.bz2";
+ url = "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pname}-${version}.tar.bz2";
sha256 = "02155ljfwgvfgq9z258fb4z7jrz7qx022d054fj5gr0v007cv0r7";
};
diff --git a/pkgs/applications/audio/tomahawk/default.nix b/pkgs/applications/audio/tomahawk/default.nix
index 78bd43383539..c983123ca383 100644
--- a/pkgs/applications/audio/tomahawk/default.nix
+++ b/pkgs/applications/audio/tomahawk/default.nix
@@ -12,11 +12,11 @@ assert enableKDE -> kdelibs4 != null;
assert enableTelepathy -> telepathy-qt != null;
stdenv.mkDerivation rec {
- name = "tomahawk-${version}";
+ pname = "tomahawk";
version = "0.8.4";
src = fetchurl {
- url = "http://download.tomahawk-player.org/${name}.tar.bz2";
+ url = "http://download.tomahawk-player.org/${pname}-${version}.tar.bz2";
sha256 = "0j84h36wkjfjbsd7ybyji7rcc9wpjdbl0f1xdcc1g7h0nz34pc0g";
};
diff --git a/pkgs/applications/audio/transcribe/default.nix b/pkgs/applications/audio/transcribe/default.nix
index 740790419482..8eb846ac9c56 100644
--- a/pkgs/applications/audio/transcribe/default.nix
+++ b/pkgs/applications/audio/transcribe/default.nix
@@ -2,7 +2,7 @@
, glib, gst_all_1, gtk3, libSM, libX11, libpng12, pango, zlib }:
stdenv.mkDerivation rec {
- name = "transcribe-${version}";
+ pname = "transcribe";
version = "8.72";
src = if stdenv.hostPlatform.system == "i686-linux" then
diff --git a/pkgs/applications/audio/traverso/default.nix b/pkgs/applications/audio/traverso/default.nix
index 0c432acf4afe..9188003ce66d 100644
--- a/pkgs/applications/audio/traverso/default.nix
+++ b/pkgs/applications/audio/traverso/default.nix
@@ -2,8 +2,8 @@
, alsaLib, fftw, flac, lame, libjack2, libmad, libpulseaudio
, libsamplerate, libsndfile, libvorbis, portaudio, qtbase, wavpack
}:
-stdenv.mkDerivation rec {
- name = "traverso-${version}";
+stdenv.mkDerivation {
+ pname = "traverso";
version = "0.49.6";
src = fetchurl {
diff --git a/pkgs/applications/audio/tree-from-tags/default.nix b/pkgs/applications/audio/tree-from-tags/default.nix
index cdee979768cf..521133cb08fc 100644
--- a/pkgs/applications/audio/tree-from-tags/default.nix
+++ b/pkgs/applications/audio/tree-from-tags/default.nix
@@ -7,7 +7,8 @@ let
gemdir = ./.;
};
in stdenv.mkDerivation {
- name = "tree-from-tags-${version}";
+ pname = "tree-from-tags";
+ inherit version;
src = fetchFromGitHub {
owner = "dbrock";
repo = "bongo";
diff --git a/pkgs/applications/audio/uade123/default.nix b/pkgs/applications/audio/uade123/default.nix
index 7db3b7ec2376..844eea11f514 100644
--- a/pkgs/applications/audio/uade123/default.nix
+++ b/pkgs/applications/audio/uade123/default.nix
@@ -2,8 +2,9 @@
let
version = "2.13";
-in stdenv.mkDerivation rec {
- name = "uade123-${version}";
+in stdenv.mkDerivation {
+ pname = "uade123";
+ inherit version;
src = fetchurl {
url = "http://zakalwe.fi/uade/uade2/uade-${version}.tar.bz2";
sha256 = "04nn5li7xy4g5ysyjjngmv5d3ibxppkbb86m10vrvadzxdd4w69v";
diff --git a/pkgs/applications/audio/vcv-rack/default.nix b/pkgs/applications/audio/vcv-rack/default.nix
index 15935751c32a..4322bbcbc438 100644
--- a/pkgs/applications/audio/vcv-rack/default.nix
+++ b/pkgs/applications/audio/vcv-rack/default.nix
@@ -1,17 +1,22 @@
{ stdenv, makeWrapper, fetchFromBitbucket, fetchFromGitHub, pkgconfig
, alsaLib, curl, glew, glfw, gtk2-x11, jansson, libjack2, libXext, libXi
-, libzip, rtaudio, rtmidi, speex }:
+, libzip, rtaudio, rtmidi, speex, libsamplerate }:
let
glfw-git = glfw.overrideAttrs (oldAttrs: rec {
name = "glfw-git-${version}";
- version = "unstable-2018-05-29";
+ version = "2019-06-30";
src = fetchFromGitHub {
- owner = "glfw";
+ owner = "AndrewBelt";
repo = "glfw";
- rev = "0be4f3f75aebd9d24583ee86590a38e741db0904";
- sha256 = "0zbcjgc7ks25yi949k0wjknfl00a4dqmz45mhp00k62vlq2sj0i5";
+ rev = "d9ab59efc781c392128a449361a381fcc93cf6f3";
+ sha256 = "1ykkq6qq8y6j5hlfj2zp1p87kr33vwhywziprz20v5avx1q7rjm8";
};
+ # We patch the source to export a function that was added to the glfw fork
+ # for Rack so it is present when we build glfw as a shared library.
+ # See https://github.com/AndrewBelt/glfw/pull/1 for discussion of this issue
+ # with upstream.
+ patches = [ ./glfw.patch ];
buildInputs = oldAttrs.buildInputs ++ [ libXext libXi ];
});
pfft-source = fetchFromBitbucket {
@@ -22,51 +27,49 @@ let
};
in
with stdenv.lib; stdenv.mkDerivation rec {
- name = "VCV-Rack-${version}";
- version = "0.6.2b";
+ pname = "VCV-Rack";
+ version = "1.1.5";
src = fetchFromGitHub {
owner = "VCVRack";
repo = "Rack";
rev = "v${version}";
- sha256 = "17ynhxcci6dyn1yi871fd8yli4924fh12pmk510djwkcj5crhas6";
+ sha256 = "172v66v2vb6l9dpsq6fb6xn035igwhpjci8w3kz2na3rvmz1bc5w";
fetchSubmodules = true;
};
+ patches = [ ./rack-minimize-vendoring.patch ];
+
prePatch = ''
- ln -s ${pfft-source} dep/jpommier-pffft-source
+ cp -r ${pfft-source} dep/jpommier-pffft-source
mkdir -p dep/include
cp dep/jpommier-pffft-source/*.h dep/include
- cp dep/nanosvg/src/*.h dep/include
+ cp dep/nanosvg/**/*.h dep/include
cp dep/nanovg/src/*.h dep/include
cp dep/osdialog/*.h dep/include
cp dep/oui-blendish/*.h dep/include
substituteInPlace include/audio.hpp --replace "" ""
substituteInPlace compile.mk --replace "-march=nocona" ""
- substituteInPlace Makefile \
- --replace "-Wl,-Bstatic" "" \
- --replace "-lglfw3" "-lglfw"
'';
enableParallelBuilding = true;
nativeBuildInputs = [ makeWrapper pkgconfig ];
- buildInputs = [ glfw-git alsaLib curl glew gtk2-x11 jansson libjack2 libzip rtaudio rtmidi speex ];
+ buildInputs = [ glfw-git alsaLib curl glew gtk2-x11 jansson libjack2 libzip rtaudio rtmidi speex libsamplerate ];
buildFlags = "Rack";
installPhase = ''
install -D -m755 -t $out/bin Rack
- cp -r res $out/
- mkdir -p $out/share/rack
- cp LICENSE.txt LICENSE-dist.txt $out/share/rack
+ mkdir -p $out/share/vcv-rack
+ cp -r res Core.json template.vcv LICENSE* cacert.pem $out/share/vcv-rack
# Override the default global resource file directory
- wrapProgram $out/bin/Rack --add-flags "-g $out"
+ wrapProgram $out/bin/Rack --add-flags "-s $out/share/vcv-rack"
'';
meta = with stdenv.lib; {
@@ -75,7 +78,7 @@ with stdenv.lib; stdenv.mkDerivation rec {
# The source is BSD-3 licensed, some of the art is CC-BY-NC 4.0 or under a
# no-derivatives clause
license = with licenses; [ bsd3 cc-by-nc-40 unfreeRedistributable ];
- maintainers = with maintainers; [ moredread ];
+ maintainers = with maintainers; [ moredread nathyong ];
platforms = platforms.linux;
};
}
diff --git a/pkgs/applications/audio/vcv-rack/glfw.patch b/pkgs/applications/audio/vcv-rack/glfw.patch
new file mode 100644
index 000000000000..77875415160c
--- /dev/null
+++ b/pkgs/applications/audio/vcv-rack/glfw.patch
@@ -0,0 +1,13 @@
+diff --git a/src/init.c b/src/init.c
+index af4a579e..317e25b8 100644
+--- a/src/init.c
++++ b/src/init.c
+@@ -339,7 +339,7 @@ GLFWAPI GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun cbfun)
+
+ char glfwOpenedFilename[1024];
+
+-const char *glfwGetOpenedFilename()
++GLFWAPI const char *glfwGetOpenedFilename()
+ {
+ if (glfwOpenedFilename[0])
+ {
diff --git a/pkgs/applications/audio/vcv-rack/rack-minimize-vendoring.patch b/pkgs/applications/audio/vcv-rack/rack-minimize-vendoring.patch
new file mode 100644
index 000000000000..d310d57835e4
--- /dev/null
+++ b/pkgs/applications/audio/vcv-rack/rack-minimize-vendoring.patch
@@ -0,0 +1,13 @@
+diff -ru a/Makefile b/Makefile
+--- a/Makefile 1970-01-01 01:00:01.000000000 +0100
++++ b/Makefile 1970-01-01 01:00:01.000000000 +0100
+@@ -21,8 +21,8 @@
+ build/dep/osdialog/osdialog_gtk2.c.o: FLAGS += $(shell pkg-config --cflags gtk+-2.0)
+
+ LDFLAGS += -rdynamic \
+- dep/lib/libGLEW.a dep/lib/libglfw3.a dep/lib/libjansson.a dep/lib/libcurl.a dep/lib/libssl.a dep/lib/libcrypto.a dep/lib/libzip.a dep/lib/libz.a dep/lib/libspeexdsp.a dep/lib/libsamplerate.a dep/lib/librtmidi.a dep/lib/librtaudio.a \
++ -lGLEW -lglfw -ljansson -lcurl -lssl -lcrypto -lzip -lz -lspeexdsp -lsamplerate -lrtmidi -lrtaudio \
+ -lpthread -lGL -ldl -lX11 -lasound -ljack \
+ $(shell pkg-config --libs gtk+-2.0)
+ TARGET := Rack
+ endif
diff --git a/pkgs/applications/audio/vimpc/default.nix b/pkgs/applications/audio/vimpc/default.nix
index ce561b5db314..7f02ea9cefec 100644
--- a/pkgs/applications/audio/vimpc/default.nix
+++ b/pkgs/applications/audio/vimpc/default.nix
@@ -3,7 +3,7 @@
stdenv.mkDerivation rec {
version = "0.09.2";
- name = "vimpc-${version}";
+ pname = "vimpc";
src = fetchFromGitHub {
owner = "boysetsfrog";
diff --git a/pkgs/applications/audio/vkeybd/default.nix b/pkgs/applications/audio/vkeybd/default.nix
index b7b0fba2d548..485edaa1ff27 100644
--- a/pkgs/applications/audio/vkeybd/default.nix
+++ b/pkgs/applications/audio/vkeybd/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, alsaLib, libX11, makeWrapper, tcl, tk }:
stdenv.mkDerivation rec {
- name = "vkeybd-${version}";
+ pname = "vkeybd";
version = "0.1.18d";
src = fetchurl {
- url = "ftp://ftp.suse.com/pub/people/tiwai/vkeybd/${name}.tar.bz2";
+ url = "ftp://ftp.suse.com/pub/people/tiwai/vkeybd/${pname}-${version}.tar.bz2";
sha256 = "0107b5j1gf7dwp7qb4w2snj4bqiyps53d66qzl2rwj4jfpakws5a";
};
diff --git a/pkgs/applications/audio/vmpk/default.nix b/pkgs/applications/audio/vmpk/default.nix
index dde96764fe6c..2bc40a78af48 100644
--- a/pkgs/applications/audio/vmpk/default.nix
+++ b/pkgs/applications/audio/vmpk/default.nix
@@ -5,7 +5,8 @@
let
version = "0.5.1";
in stdenv.mkDerivation rec {
- name = "vmpk-${version}";
+ pname = "vmpk";
+ inherit version;
meta = with stdenv.lib; {
description = "Virtual MIDI Piano Keyboard";
@@ -15,7 +16,7 @@ in stdenv.mkDerivation rec {
};
src = fetchurl {
- url = "mirror://sourceforge/vmpk/${version}/${name}.tar.bz2";
+ url = "mirror://sourceforge/vmpk/${version}/${pname}-${version}.tar.bz2";
sha256 = "11fqnxgs9hr9255d93n7lazxzjwn8jpmn23nywdksh0pb1ffvfrc";
};
diff --git a/pkgs/applications/audio/vocal/default.nix b/pkgs/applications/audio/vocal/default.nix
index c4333b09f18f..c26d8b6d3607 100644
--- a/pkgs/applications/audio/vocal/default.nix
+++ b/pkgs/applications/audio/vocal/default.nix
@@ -2,6 +2,7 @@
, fetchFromGitHub
, cmake
, ninja
+, vala
, pkgconfig
, pantheon
, gtk3
@@ -34,7 +35,7 @@ stdenv.mkDerivation rec {
cmake
libxml2
ninja
- pantheon.vala
+ vala
pkgconfig
wrapGAppsHook
];
diff --git a/pkgs/applications/audio/waon/default.nix b/pkgs/applications/audio/waon/default.nix
new file mode 100644
index 000000000000..b27fdbffb7d6
--- /dev/null
+++ b/pkgs/applications/audio/waon/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchFromGitHub, fftw, gtk2, libao, libsamplerate
+, libsndfile, ncurses, pkgconfig
+}:
+
+stdenv.mkDerivation rec {
+ pname = "waon";
+ version = "0.11";
+
+ src = fetchFromGitHub {
+ owner = "kichiki";
+ repo = pname;
+ rev = "v${version}";
+ sha256 = "1xmq8d2rj58xbp4rnyav95y1vnz3r9s9db7xxfa2rd0ilq0ps4y7";
+ };
+
+ nativeBuildInputs = [ pkgconfig ];
+ buildInputs = [ fftw gtk2 libao libsamplerate libsndfile ncurses ];
+
+ installPhase = ''
+ install -Dt $out/bin waon pv gwaon
+ '';
+
+ meta = with stdenv.lib; {
+ description = "A Wave-to-Notes transcriber";
+ homepage = https://kichiki.github.io/WaoN/;
+ license = licenses.gpl2;
+ maintainers = [ maintainers.puckipedia ];
+ platforms = platforms.all;
+ };
+}
diff --git a/pkgs/applications/audio/whipper/default.nix b/pkgs/applications/audio/whipper/default.nix
index 382a1a8b2e21..79801f2e99fa 100644
--- a/pkgs/applications/audio/whipper/default.nix
+++ b/pkgs/applications/audio/whipper/default.nix
@@ -30,7 +30,7 @@ python2.pkgs.buildPythonApplication rec {
];
makeWrapperArgs = [
- "--prefix" "PATH" ":" "${stdenv.lib.makeBinPath [ accuraterip-checksum cdrdao utillinux flac sox ]}"
+ "--prefix" "PATH" ":" (stdenv.lib.makeBinPath [ accuraterip-checksum cdrdao utillinux flac sox ])
];
# some tests require internet access
diff --git a/pkgs/applications/audio/wolf-shaper/default.nix b/pkgs/applications/audio/wolf-shaper/default.nix
index 735e4eb632c2..13bf1d674c7c 100644
--- a/pkgs/applications/audio/wolf-shaper/default.nix
+++ b/pkgs/applications/audio/wolf-shaper/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub , libjack2, lv2, xorg, liblo, libGL, libXcursor, pkgconfig }:
stdenv.mkDerivation rec {
- name = "wolf-shaper-${version}";
+ pname = "wolf-shaper";
version = "0.1.7";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/x42-plugins/default.nix b/pkgs/applications/audio/x42-plugins/default.nix
index 7e43225eedc1..df216fe571d1 100644
--- a/pkgs/applications/audio/x42-plugins/default.nix
+++ b/pkgs/applications/audio/x42-plugins/default.nix
@@ -3,12 +3,12 @@
, libGLU, lv2, gtk2, cairo, pango, fftwFloat, zita-convolver }:
stdenv.mkDerivation rec {
- version = "20190206";
- name = "x42-plugins-${version}";
+ version = "20190820";
+ pname = "x42-plugins";
src = fetchurl {
- url = "https://gareus.org/misc/x42-plugins/${name}.tar.xz";
- sha256 = "0rsp8lm8zr20l410whr98d61401rkphgpl8llbn5p2wsiw0q9aqd";
+ url = "https://gareus.org/misc/x42-plugins/${pname}-${version}.tar.xz";
+ sha256 = "0dqsa5yxm3nx50j9k28iillj4sx2mjndzyspymxx0ghir1qmi4vh";
};
nativeBuildInputs = [ pkgconfig ];
@@ -26,6 +26,8 @@ stdenv.mkDerivation rec {
patchPhase = ''
patchShebangs ./stepseq.lv2/gridgen.sh
+ patchShebangs ./matrixmixer.lv2/genttl.sh #TODO: remove at next update, see https://github.com/x42/matrixmixer.lv2/issues/2
+ patchShebangs ./matrixmixer.lv2/genhead.sh #TODO: remove at next update, see https://github.com/x42/matrixmixer.lv2/issues/2
sed -i 's|/usr/include/zita-convolver.h|${zita-convolver}/include/zita-convolver.h|g' ./convoLV2/Makefile
'';
diff --git a/pkgs/applications/audio/xsynth-dssi/default.nix b/pkgs/applications/audio/xsynth-dssi/default.nix
index a55b47a6c16b..c0803ffa4185 100644
--- a/pkgs/applications/audio/xsynth-dssi/default.nix
+++ b/pkgs/applications/audio/xsynth-dssi/default.nix
@@ -2,11 +2,11 @@
ladspaH, ladspaPlugins, liblo, pkgconfig }:
stdenv.mkDerivation rec {
- name = "xsynth-dssi-${version}";
+ pname = "xsynth-dssi";
version = "0.9.4";
src = fetchurl {
- url = "mirror://sourceforge/dssi/${name}.tar.gz";
+ url = "mirror://sourceforge/dssi/${pname}-${version}.tar.gz";
sha256 = "00nwv2pqjbmxqdc6xdm0cljq6z05lv4y6bibmhz1kih9lm0lklnk";
};
diff --git a/pkgs/applications/audio/yasr/default.nix b/pkgs/applications/audio/yasr/default.nix
index ca6d6240688a..c8902f1dda4b 100644
--- a/pkgs/applications/audio/yasr/default.nix
+++ b/pkgs/applications/audio/yasr/default.nix
@@ -1,12 +1,12 @@
{stdenv,fetchurl}:
stdenv.mkDerivation rec {
- name = "yasr-${version}";
+ pname = "yasr";
version = "0.6.9";
src = fetchurl {
- url = "https://sourceforge.net/projects/yasr/files/yasr/${version}/${name}.tar.gz";
+ url = "https://sourceforge.net/projects/yasr/files/yasr/${version}/${pname}-${version}.tar.gz";
sha256 = "1prv9r9y6jb5ga5578ldiw507fa414m60xhlvjl29278p3x7rwa1";
};
diff --git a/pkgs/applications/audio/ympd/default.nix b/pkgs/applications/audio/ympd/default.nix
index b800df016c9a..7976f7477171 100644
--- a/pkgs/applications/audio/ympd/default.nix
+++ b/pkgs/applications/audio/ympd/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, cmake, pkgconfig, mpd_clientlib, openssl }:
stdenv.mkDerivation rec {
- name = "ympd-${version}";
+ pname = "ympd";
version = "1.3.0";
src = fetchFromGitHub {
diff --git a/pkgs/applications/audio/yoshimi/default.nix b/pkgs/applications/audio/yoshimi/default.nix
index 00a22ac711e7..74a59c0e963f 100644
--- a/pkgs/applications/audio/yoshimi/default.nix
+++ b/pkgs/applications/audio/yoshimi/default.nix
@@ -5,12 +5,12 @@
assert stdenv ? glibc;
stdenv.mkDerivation rec {
- name = "yoshimi-${version}";
- version = "1.5.11.3";
+ pname = "yoshimi";
+ version = "1.6.0.1";
src = fetchurl {
- url = "mirror://sourceforge/yoshimi/${name}.tar.bz2";
- sha256 = "00w0ll94dpss9f1rnaxjmw6mgjx5q2dz8w4mc3wyrk4s4gbd7154";
+ url = "mirror://sourceforge/yoshimi/${pname}-${version}.tar.bz2";
+ sha256 = "140f2k4akj39pny8c7i794q125415gyvmy4rday0il5ncp3glik4";
};
buildInputs = [
diff --git a/pkgs/applications/audio/zam-plugins/default.nix b/pkgs/applications/audio/zam-plugins/default.nix
index 69906b814382..eeeb8ae2ea44 100644
--- a/pkgs/applications/audio/zam-plugins/default.nix
+++ b/pkgs/applications/audio/zam-plugins/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchgit , boost, libX11, libGLU_combined, liblo, libjack2, ladspaH, lv2, pkgconfig, rubberband, libsndfile, fftwFloat, libsamplerate }:
-stdenv.mkDerivation rec {
- name = "zam-plugins-${version}";
+stdenv.mkDerivation {
+ pname = "zam-plugins";
version = "3.11";
src = fetchgit {
diff --git a/pkgs/applications/audio/zita-njbridge/default.nix b/pkgs/applications/audio/zita-njbridge/default.nix
index faa90e684aea..1ec6946cf38c 100644
--- a/pkgs/applications/audio/zita-njbridge/default.nix
+++ b/pkgs/applications/audio/zita-njbridge/default.nix
@@ -2,10 +2,10 @@
stdenv.mkDerivation rec {
version = "0.4.4";
- name = "zita-njbridge-${version}";
+ pname = "zita-njbridge";
src = fetchurl {
- url = "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/${name}.tar.bz2";
+ url = "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pname}-${version}.tar.bz2";
sha256 = "1l8rszdjhp0gq7mr54sdgfs6y6cmw11ssmqb1v9yrkrz5rmwzg8j";
};
diff --git a/pkgs/applications/audio/zynaddsubfx/default.nix b/pkgs/applications/audio/zynaddsubfx/default.nix
index 7bc1c07befa1..e22bf9ed653a 100644
--- a/pkgs/applications/audio/zynaddsubfx/default.nix
+++ b/pkgs/applications/audio/zynaddsubfx/default.nix
@@ -3,7 +3,7 @@
}:
stdenv.mkDerivation rec {
- name = "zynaddsubfx-${version}";
+ pname = "zynaddsubfx";
version = "3.0.5";
src = fetchurl {
diff --git a/pkgs/applications/backup/areca/default.nix b/pkgs/applications/backup/areca/default.nix
index a9647b11eeea..d02aa4b8444f 100644
--- a/pkgs/applications/backup/areca/default.nix
+++ b/pkgs/applications/backup/areca/default.nix
@@ -1,6 +1,6 @@
{ stdenv, fetchurl, ant, jre, jdk, swt, acl, attr }:
-stdenv.mkDerivation rec {
+stdenv.mkDerivation {
name = "areca-7.5";
src = fetchurl {
diff --git a/pkgs/applications/backup/crashplan/CrashPlanDesktop.patch b/pkgs/applications/backup/crashplan/CrashPlanDesktop.patch
deleted file mode 100644
index 7fa68ba4a388..000000000000
--- a/pkgs/applications/backup/crashplan/CrashPlanDesktop.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- ./scripts/CrashPlanDesktop 2016-03-02 21:01:58.000000000 -0500
-+++ ./scripts/CrashPlanDesktop-1 2016-03-18 20:52:10.117686266 -0400
-@@ -11,7 +11,7 @@
- cd ${TARGETDIR}
-
- if [ "_${VERSION_5_UI}" == "_true" ]; then
-- ${TARGETDIR}/electron/crashplan > ${TARGETDIR}/log/ui_output.log 2> ${TARGETDIR}/log/ui_error.log &
-+ ${TARGETDIR}/electron/crashplan &
- else
-- ${JAVACOMMON} ${GUI_JAVA_OPTS} -classpath "./lib/com.backup42.desktop.jar:./lang:./skin" com.backup42.desktop.CPDesktop > ${TARGETDIR}/log/ui_output.log 2> ${TARGETDIR}/log/ui_error.log &
-+ ${JAVACOMMON} ${GUI_JAVA_OPTS} -classpath "./lib/com.backup42.desktop.jar:./lang:./skin" com.backup42.desktop.CPDesktop &
- fi
diff --git a/pkgs/applications/backup/crashplan/CrashPlanEngine.patch b/pkgs/applications/backup/crashplan/CrashPlanEngine.patch
deleted file mode 100644
index de2afe2da684..000000000000
--- a/pkgs/applications/backup/crashplan/CrashPlanEngine.patch
+++ /dev/null
@@ -1,37 +0,0 @@
---- ./scripts/CrashPlanEngine 2014-02-19 23:17:19.000000000 +0000
-+++ ./scripts/CrashPlanEngine.1 2014-07-24 17:36:37.330333581 +0100
-@@ -11,7 +11,7 @@
-
- cd $TARGETDIR
-
-- nice -n 19 $JAVACOMMON $SRV_JAVA_OPTS -classpath $FULL_CP com.backup42.service.CPService > $TARGETDIR/log/engine_output.log 2> $TARGETDIR/log/engine_error.log &
-+ nice -n 19 $JAVACOMMON $SRV_JAVA_OPTS -classpath $FULL_CP com.backup42.service.CPService > $VARDIR/log/engine_output.log 2> $VARDIR/log/engine_error.log &
-
- if [[ $! -gt 0 ]]; then
- echo $! > $PIDFILE
-@@ -26,7 +26,7 @@
-
- echo "Using Ubuntu 9.04 startup"
-
-- start-stop-daemon -v --pidfile $PIDFILE --make-pidfile --background --chdir $TARGETDIR --start --nicelevel 19 --exec $JAVACOMMON -- $SRV_JAVA_OPTS -classpath $FULL_CP com.backup42.service.CPService > $TARGETDIR/log/engine_output.log 2> $TARGETDIR/log/engine_error.log
-+ start-stop-daemon -v --pidfile $PIDFILE --make-pidfile --background --chdir $TARGETDIR --start --nicelevel 19 --exec $JAVACOMMON -- $SRV_JAVA_OPTS -classpath $FULL_CP com.backup42.service.CPService > $VARDIR/log/engine_output.log 2> $VARDIR/log/engine_error.log
-
- # This test isn't as useful as one might like; start-stop-daemon can't accurately report the state of child processes when --background is used.
- # We use this mainly to report the specific error value returned by start-stop-daemon if something goes wrong, but be aware that a return value
-@@ -91,7 +91,6 @@
- DESC="CrashPlan Engine"
- NAME=CrashPlanEngine
- DAEMON=$TARGETDIR/lib/com.backup42.desktop.jar
--PIDFILE="$TARGETDIR/${NAME}.pid"
-
- if [[ -f $TARGETDIR/install.vars ]]; then
- . $TARGETDIR/install.vars
-@@ -100,6 +99,8 @@
- exit 1
- fi
-
-+PIDFILE="$VARDIR/${NAME}.pid"
-+
- if [[ ! -f $DAEMON ]]; then
- echo "Could not find JAR file $DAEMON"
- exit 0
diff --git a/pkgs/applications/backup/crashplan/crashplan-small-business.nix b/pkgs/applications/backup/crashplan/crashplan-small-business.nix
deleted file mode 100644
index 5db4badeb6c0..000000000000
--- a/pkgs/applications/backup/crashplan/crashplan-small-business.nix
+++ /dev/null
@@ -1,103 +0,0 @@
-{ stdenv, fetchurl, makeWrapper, getopt, jre, cpio, gawk, gnugrep, gnused,
- procps, which, gtk2, atk, glib, pango, gdk-pixbuf, cairo, freetype,
- fontconfig, dbus, gconf, nss, nspr, alsaLib, cups, expat, udev,
- libX11, libxcb, libXi, libXcursor, libXdamage, libXrandr, libXcomposite,
- libXext, libXfixes, libXrender, libXtst, libXScrnSaver, nodePackages,
- maxRam ? "1024m" }:
-
-stdenv.mkDerivation rec {
- version = "6.7.0";
- rev = "1512021600670_4503";
- pname = "CrashPlanSmb";
- name = "${pname}_${version}_${rev}";
-
- src = fetchurl {
- url = "https://web-eam-msp.crashplanpro.com/client/installers/${name}_Linux.tgz";
- sha256 = "0f7ykfxaqjlvv4hv12yc5z8y1vjsysdblv53byml7i1fy1r0q26q";
- };
-
- nativeBuildInputs = [ makeWrapper cpio nodePackages.asar ];
- buildInputs = [ getopt which ];
-
- vardir = "/var/lib/crashplan";
- manifestdir = "${vardir}/manifest";
-
- postPatch = ''
- # patch scripts/CrashPlanEngine
- substituteInPlace scripts/CrashPlanEngine \
- --replace /bin/ps ${procps}/bin/ps \
- --replace awk ${gawk}/bin/awk \
- --replace '`sed' '`${gnused}/bin/sed' \
- --replace grep ${gnugrep}/bin/grep \
- --replace TARGETDIR/log VARDIR/log \
- --replace TARGETDIR/\''${NAME} VARDIR/\''${NAME} \
- --replace \$TARGETDIR/bin/run.conf $out/bin/run.conf \
- --replace \$VARDIR ${vardir}
-
- # patch scripts/CrashPlanDesktop
- substituteInPlace scripts/CrashPlanDesktop \
- --replace awk ${gawk}/bin/awk \
- --replace "\"\$SCRIPTDIR/..\"" "$out" \
- --replace "\$(dirname \$SCRIPT)" "$out" \
- --replace "\''${TARGETDIR}/log" ${vardir}/log \
- --replace "\''${TARGETDIR}" "$out"
- '';
-
- installPhase = ''
- mkdir $out
- zcat -v ${pname}_${version}.cpi | (cd $out; cpio -i -d -v --no-preserve-owner)
-
- install -D -m 755 scripts/CrashPlanDesktop $out/bin/CrashPlanDesktop
- install -D -m 755 scripts/CrashPlanEngine $out/bin/CrashPlanEngine
- install -D -m 644 scripts/run.conf $out/bin/run.conf
- install -D -m 644 scripts/CrashPlan.desktop $out/share/applications/CrashPlan.desktop
-
- # unpack, patch and repack app.asar to stop electron from creating /usr/local/crashplan/log to store the ui logs.
- asar e $out/app.asar $out/app.asar-unpacked
- rm -v $out/app.asar
- substituteInPlace $out/app.asar-unpacked/shared_modules/shell/platform_paths.js \
- --replace "getLogFileParentPath();" "\"$vardir/log\";"
- asar p $out/app.asar-unpacked $out/app.asar
-
- mv -v $out/*.asar $out/electron/resources
- chmod 755 "$out/electron/crashplan"
-
- rm -r $out/log
- mv -v $out/conf $out/conf.template
- ln -s $vardir/log $out/log
- ln -s $vardir/cache $out/cache
- ln -s $vardir/conf $out/conf
-
- substituteInPlace $out/bin/run.conf \
- --replace "-Xmx1024m" "-Xmx${maxRam}"
-
- echo "JAVACOMMON=${jre}/bin/java" > $out/install.vars
- echo "APP_BASENAME=CrashPlan" >> $out/install.vars
- echo "TARGETDIR=$out" >> $out/install.vars
- echo "BINSDIR=$out/bin" >> $out/install.vars
- echo "MANIFESTDIR=${manifestdir}" >> $out/install.vars
- echo "VARDIR=${vardir}" >> $out/install.vars
- echo "INITDIR=" >> $out/install.vars
- echo "RUNLVLDIR=" >> $out/install.vars
- echo "INSTALLDATE=" >> $out/install.vars
-
- '';
-
- postFixup = ''
- patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux-x86-64.so.2 $out/electron/crashplan
- wrapProgram $out/bin/CrashPlanDesktop --prefix LD_LIBRARY_PATH ":" "${stdenv.lib.makeLibraryPath [
- stdenv.cc.cc.lib gtk2 atk glib pango gdk-pixbuf cairo freetype
- fontconfig dbus gconf nss nspr alsaLib cups expat udev
- libX11 libxcb libXi libXcursor libXdamage libXrandr libXcomposite
- libXext libXfixes libXrender libXtst libXScrnSaver]}"
- '';
-
- meta = with stdenv.lib; {
- description = "An online backup solution";
- homepage = http://www.crashplan.com/business/;
- license = licenses.unfree;
- platforms = [ "x86_64-linux" ];
- maintainers = with maintainers; [ xvapx ];
- broken = true; # 2018-12-06
- };
-}
diff --git a/pkgs/applications/backup/crashplan/default.nix b/pkgs/applications/backup/crashplan/default.nix
deleted file mode 100644
index 2c76891b3f9e..000000000000
--- a/pkgs/applications/backup/crashplan/default.nix
+++ /dev/null
@@ -1,81 +0,0 @@
-{ stdenv, fetchurl, makeWrapper, jre, cpio, gawk, gnugrep, gnused, procps, gtk2, glib, libXtst }:
-
-stdenv.mkDerivation rec {
- version = "4.8.3";
- rev = "1"; #tracks unversioned changes that occur on download.code42.com from time to time
- name = "crashplan-${version}-r${rev}";
-
- src = fetchurl {
- url = "https://download.code42.com/installs/linux/install/CrashPlan/CrashPlan_${version}_Linux.tgz";
- sha256 = "c25d87ec1d442a396b668547e39b70d66dcfe02250cc57a25916ebb42a407113";
- };
-
- meta = with stdenv.lib; {
- description = "An online/offline backup solution";
- homepage = http://www.crashplan.org;
- license = licenses.unfree;
- maintainers = with maintainers; [ sztupi domenkozar jerith666 ];
- };
-
- buildInputs = [ makeWrapper cpio ];
-
- vardir = "/var/lib/crashplan";
-
- manifestdir = "${vardir}/manifest";
-
- patches = [ ./CrashPlanEngine.patch ./CrashPlanDesktop.patch ];
-
- installPhase = ''
- mkdir $out
- zcat -v CrashPlan_${version}.cpi | (cd $out; cpio -i -d -v --no-preserve-owner)
-
- # sed -i "s|manifest|${manifestdir}|g" $out/conf/default.service.xml
-
- # Fix for encoding troubles (CrashPlan ticket 178827)
- # Make sure the daemon is running using the same localization as
- # the (installing) user
- echo "" >> run.conf
- echo "LC_ALL=en_US.UTF-8" >> run.conf
-
- install -d -m 755 unpacked $out
-
- install -D -m 644 run.conf $out/bin/run.conf
- install -D -m 755 scripts/CrashPlanDesktop $out/bin/CrashPlanDesktop
- install -D -m 755 scripts/CrashPlanEngine $out/bin/CrashPlanEngine
- install -D -m 644 scripts/CrashPlan.desktop $out/share/applications/CrashPlan.desktop
-
- rm -r $out/log
- mv -v $out/conf $out/conf.template
- ln -s $vardir/log $out/log
- ln -s $vardir/cache $out/cache
- ln -s $vardir/backupArchives $out/backupArchives
- ln -s $vardir/conf $out/conf
-
- echo "JAVACOMMON=${jre}/bin/java" > $out/install.vars
- echo "APP_BASENAME=CrashPlan" >> $out/install.vars
- echo "TARGETDIR=${vardir}" >> $out/install.vars
- echo "BINSDIR=$out/bin" >> $out/install.vars
- echo "MANIFESTDIR=${manifestdir}" >> $out/install.vars
- echo "VARDIR=${vardir}" >> $out/install.vars
- echo "INITDIR=" >> $out/install.vars
- echo "RUNLVLDIR=" >> $out/install.vars
- echo "INSTALLDATE=" >> $out/install.vars
- '';
-
- postFixup = ''
- for f in $out/bin/CrashPlanDesktop $out/bin/CrashPlanEngine; do
- echo "substitutions in $f"
- substituteInPlace $f --replace /bin/ps ${procps}/bin/ps
- substituteInPlace $f --replace awk ${gawk}/bin/awk
- substituteInPlace $f --replace sed ${gnused}/bin/sed
- substituteInPlace $f --replace grep ${gnugrep}/bin/grep
- done
-
- substituteInPlace $out/share/applications/CrashPlan.desktop \
- --replace /usr/local $out \
- --replace crashplan/skin skin \
- --replace bin/CrashPlanDesktop CrashPlanDesktop
-
- wrapProgram $out/bin/CrashPlanDesktop --prefix LD_LIBRARY_PATH ":" "${stdenv.lib.makeLibraryPath [ gtk2 glib libXtst ]}"
- '';
-}
diff --git a/pkgs/applications/backup/deja-dup/default.nix b/pkgs/applications/backup/deja-dup/default.nix
index 4f8e520cb9f2..7120a1934f6e 100644
--- a/pkgs/applications/backup/deja-dup/default.nix
+++ b/pkgs/applications/backup/deja-dup/default.nix
@@ -1,5 +1,5 @@
{ stdenv, fetchFromGitLab, substituteAll, meson, ninja, pkgconfig, vala_0_40, gettext
-, gnome3, libnotify, itstool, glib, gtk3, libxml2
+, gnome3, libnotify, itstool, glib, gtk3, libxml2, gnome-online-accounts
, coreutils, libpeas, libsecret, pcre, libxkbcommon, wrapGAppsHook
, libpthreadstubs, libXdmcp, epoxy, at-spi2-core, dbus, libgpgerror
, appstream-glib, desktop-file-utils, duplicity
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
];
postPatch = ''
- substituteInPlace deja-dup/nautilus/NautilusExtension.c --subst-var-by DEJA_DUP_GSETTINGS_PATH $out/share/gsettings-schemas/${pname}-${version}/glib-2.0/schemas
+ substituteInPlace deja-dup/nautilus/NautilusExtension.c --subst-var-by DEJA_DUP_GSETTINGS_PATH ${glib.makeSchemaPath "$out" "${pname}-${version}"}
'';
nativeBuildInputs = [
@@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
buildInputs = [
libnotify libpeas glib gtk3 libsecret
pcre libxkbcommon libpthreadstubs libXdmcp epoxy gnome3.nautilus
- at-spi2-core dbus gnome3.gnome-online-accounts libgpgerror
+ at-spi2-core dbus gnome-online-accounts libgpgerror
];
propagatedUserEnvPkgs = [ duplicity ];
diff --git a/pkgs/applications/backup/vdmfec/default.nix b/pkgs/applications/backup/vdmfec/default.nix
index 3a480f70d4b7..1366bb484a91 100644
--- a/pkgs/applications/backup/vdmfec/default.nix
+++ b/pkgs/applications/backup/vdmfec/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
- name = "vdmfec-${version}";
+ pname = "vdmfec";
version = "1.0";
src = fetchurl {
- url = "http://members.tripod.com/professor_tom/archives/${name}.tgz";
+ url = "http://members.tripod.com/professor_tom/archives/${pname}-${version}.tgz";
sha256 = "0i7q4ylx2xmzzq778anpkj4nqir5gf573n1lbpxnbc10ymsjq2rm";
};
diff --git a/pkgs/applications/altcoins/aeon/default.nix b/pkgs/applications/blockchains/aeon/default.nix
similarity index 96%
rename from pkgs/applications/altcoins/aeon/default.nix
rename to pkgs/applications/blockchains/aeon/default.nix
index 5a09641c70d1..d65889be3ac0 100644
--- a/pkgs/applications/altcoins/aeon/default.nix
+++ b/pkgs/applications/blockchains/aeon/default.nix
@@ -7,7 +7,8 @@ let
version = "0.12.9.0";
in
stdenv.mkDerivation {
- name = "aeon-${version}";
+ pname = "aeon";
+ inherit version;
src = fetchFromGitHub {
owner = "aeonix";
diff --git a/pkgs/applications/altcoins/bitcoin-abc.nix b/pkgs/applications/blockchains/bitcoin-abc.nix
similarity index 94%
rename from pkgs/applications/altcoins/bitcoin-abc.nix
rename to pkgs/applications/blockchains/bitcoin-abc.nix
index 479d175020b7..5bdfc39e0aab 100644
--- a/pkgs/applications/altcoins/bitcoin-abc.nix
+++ b/pkgs/applications/blockchains/bitcoin-abc.nix
@@ -7,13 +7,13 @@ with stdenv.lib;
stdenv.mkDerivation rec {
name = "bitcoin" + (toString (optional (!withGui) "d")) + "-abc-" + version;
- version = "0.19.4";
+ version = "0.20.3";
src = fetchFromGitHub {
owner = "bitcoin-ABC";
repo = "bitcoin-abc";
rev = "v${version}";
- sha256 = "1z4x25ygcw1pqml2ww02vqrvmihlv4f5gnnn1iyfirrjxgpfaxd7";
+ sha256 = "1m0k685czpywmkzhzfa09jc0hvmh7rk5rywwlq2chxz50pzm2m3a";
};
patches = [ ./fix-bitcoin-qt-build.patch ];
diff --git a/pkgs/applications/altcoins/bitcoin-classic.nix b/pkgs/applications/blockchains/bitcoin-classic.nix
similarity index 91%
rename from pkgs/applications/altcoins/bitcoin-classic.nix
rename to pkgs/applications/blockchains/bitcoin-classic.nix
index ad48ea2a6257..ddce5c3f7150 100644
--- a/pkgs/applications/altcoins/bitcoin-classic.nix
+++ b/pkgs/applications/blockchains/bitcoin-classic.nix
@@ -16,15 +16,15 @@ stdenv.mkDerivation rec {
sha256 = "06ij9v7zbdnhxq9429nnxiw655cp8idldj18l7fmj94gqx07n5vh";
};
- patches = [ ./fix-bitcoin-qt-build.patch ];
-
nativeBuildInputs = [ pkgconfig autoreconfHook ];
buildInputs = [ openssl db48 boost zlib
miniupnpc utillinux protobuf libevent ]
++ optionals withGui [ qtbase qttools qrencode ];
configureFlags = [ "--with-boost-libdir=${boost.out}/lib" ]
- ++ optionals withGui [ "--with-gui=qt5" ];
+ ++ optionals withGui [ "--with-gui=qt5"
+ "--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
+ ];
enableParallelBuilding = true;
diff --git a/pkgs/applications/altcoins/bitcoin-unlimited.nix b/pkgs/applications/blockchains/bitcoin-unlimited.nix
similarity index 79%
rename from pkgs/applications/altcoins/bitcoin-unlimited.nix
rename to pkgs/applications/blockchains/bitcoin-unlimited.nix
index 13ec55bb589d..a75b20b39109 100644
--- a/pkgs/applications/altcoins/bitcoin-unlimited.nix
+++ b/pkgs/applications/blockchains/bitcoin-unlimited.nix
@@ -1,34 +1,32 @@
{ stdenv, fetchFromGitHub, pkgconfig, autoreconfHook, openssl, db48, boost
-, zlib, miniupnpc, qt4, utillinux, protobuf, qrencode, libevent
-, withGui
+, zlib, miniupnpc, utillinux, protobuf, qrencode, libevent, python3
+, withGui, wrapQtAppsHook ? null, qtbase ? null, qttools ? null
, Foundation, ApplicationServices, AppKit }:
with stdenv.lib;
stdenv.mkDerivation rec {
-
name = "bitcoin" + (toString (optional (!withGui) "d")) + "-unlimited-" + version;
- version = "1.0.3.0";
+ version = "1.6.0.1";
src = fetchFromGitHub {
owner = "bitcoinunlimited";
repo = "bitcoinunlimited";
- rev = "v${version}";
- sha256 = "0l02a7h502msrp4c02wgm7f3159ap8l61k4890vas99gq7ywxkcx";
+ rev = "bucash${version}";
+ sha256 = "0f0mnal4jf8xdj7w5m4rdlcqkrkbpxi88c006m5k45lmjmj141zr";
};
- nativeBuildInputs = [ pkgconfig autoreconfHook ];
+ nativeBuildInputs = [ pkgconfig autoreconfHook python3 ]
+ ++ optionals withGui [ wrapQtAppsHook qttools ];
buildInputs = [ openssl db48 boost zlib
miniupnpc utillinux protobuf libevent ]
- ++ optionals withGui [ qt4 qrencode ]
+ ++ optionals withGui [ qtbase qttools qrencode ]
++ optionals stdenv.isDarwin [ Foundation ApplicationServices AppKit ];
- patches = [
- ./bitcoin-unlimited-const-comparators.patch
- ];
-
configureFlags = [ "--with-boost-libdir=${boost.out}/lib" ]
- ++ optionals withGui [ "--with-gui=qt4" ];
+ ++ optionals withGui [ "--with-gui=qt5"
+ "--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
+ ];
enableParallelBuilding = true;
meta = {
diff --git a/pkgs/applications/altcoins/bitcoin.nix b/pkgs/applications/blockchains/bitcoin.nix
similarity index 95%
rename from pkgs/applications/altcoins/bitcoin.nix
rename to pkgs/applications/blockchains/bitcoin.nix
index ce0a31dfe68b..b1d84f91251e 100644
--- a/pkgs/applications/altcoins/bitcoin.nix
+++ b/pkgs/applications/blockchains/bitcoin.nix
@@ -5,13 +5,13 @@
with stdenv.lib;
stdenv.mkDerivation rec{
name = "bitcoin" + (toString (optional (!withGui) "d")) + "-" + version;
- version = "0.18.0";
+ version = "0.18.1";
src = fetchurl {
urls = [ "https://bitcoincore.org/bin/bitcoin-core-${version}/bitcoin-${version}.tar.gz"
"https://bitcoin.org/bin/bitcoin-core-${version}/bitcoin-${version}.tar.gz"
];
- sha256 = "5e4e6890e07b620a93fdb24605dae2bb53e8435b2a93d37558e1db1913df405f";
+ sha256 = "5c7d93f15579e37aa2d1dc79e8f5ac675f59045fceddf604ae0f1550eb03bf96";
};
nativeBuildInputs =
diff --git a/pkgs/applications/altcoins/btc1.nix b/pkgs/applications/blockchains/btc1.nix
similarity index 100%
rename from pkgs/applications/altcoins/btc1.nix
rename to pkgs/applications/blockchains/btc1.nix
diff --git a/pkgs/applications/altcoins/clightning.nix b/pkgs/applications/blockchains/clightning.nix
similarity index 77%
rename from pkgs/applications/altcoins/clightning.nix
rename to pkgs/applications/blockchains/clightning.nix
index 481e19c66cdc..b20a6b3e8aa8 100644
--- a/pkgs/applications/altcoins/clightning.nix
+++ b/pkgs/applications/blockchains/clightning.nix
@@ -3,18 +3,20 @@
with stdenv.lib;
stdenv.mkDerivation rec {
- name = "clightning-${version}";
- version = "0.7.1";
+ pname = "clightning";
+ version = "0.7.2.1";
src = fetchurl {
url = "https://github.com/ElementsProject/lightning/releases/download/v${version}/clightning-v${version}.zip";
- sha256 = "557be34410f27a8d55d9f31a40717a8f5e99829f2bd114c24e7ca1dd5f6b7d85";
+ sha256 = "3be716948efc1208b5e6a41e3034e4e4eecc5abbdac769fd1d999a104ac3a2ec";
};
enableParallelBuilding = true;
nativeBuildInputs = [ autoconf autogen automake libtool pkgconfig which unzip ];
- buildInputs = [ sqlite gmp zlib python3 ];
+ buildInputs =
+ let py3 = python3.withPackages (p: [ p.Mako ]);
+ in [ sqlite gmp zlib py3 ];
makeFlags = [ "prefix=$(out) VERSION=v${version}" ];
@@ -23,7 +25,10 @@ stdenv.mkDerivation rec {
'';
postPatch = ''
- patchShebangs tools/generate-wire.py
+ patchShebangs \
+ tools/generate-wire.py \
+ tools/update-mocks.sh \
+ tools/mockup.sh
'';
doCheck = false;
diff --git a/pkgs/applications/altcoins/cryptop/default.nix b/pkgs/applications/blockchains/cryptop/default.nix
similarity index 100%
rename from pkgs/applications/altcoins/cryptop/default.nix
rename to pkgs/applications/blockchains/cryptop/default.nix
diff --git a/pkgs/applications/altcoins/dashpay.nix b/pkgs/applications/blockchains/dashpay.nix
similarity index 97%
rename from pkgs/applications/altcoins/dashpay.nix
rename to pkgs/applications/blockchains/dashpay.nix
index b2f2a457a99d..03dcd6cb54e6 100644
--- a/pkgs/applications/altcoins/dashpay.nix
+++ b/pkgs/applications/blockchains/dashpay.nix
@@ -8,7 +8,7 @@
with stdenv.lib;
stdenv.mkDerivation rec {
- name = "dashpay-${version}";
+ pname = "dashpay";
version = "0.12.2.3";
src = fetchFromGitHub {
diff --git a/pkgs/applications/altcoins/dcrd.nix b/pkgs/applications/blockchains/dcrd.nix
similarity index 96%
rename from pkgs/applications/altcoins/dcrd.nix
rename to pkgs/applications/blockchains/dcrd.nix
index cc3e83befa64..16d39e85da15 100644
--- a/pkgs/applications/altcoins/dcrd.nix
+++ b/pkgs/applications/blockchains/dcrd.nix
@@ -1,7 +1,7 @@
{ stdenv, lib, go, buildGoPackage, dep, fetchgit, git, cacert }:
buildGoPackage rec {
- name = "dcrd-${version}";
+ pname = "dcrd";
version = "1.1.2";
rev = "refs/tags/v${version}";
goPackagePath = "github.com/decred/dcrd";
diff --git a/pkgs/applications/altcoins/dcrwallet.nix b/pkgs/applications/blockchains/dcrwallet.nix
similarity index 96%
rename from pkgs/applications/altcoins/dcrwallet.nix
rename to pkgs/applications/blockchains/dcrwallet.nix
index 8d966684b23c..163ed2615d33 100644
--- a/pkgs/applications/altcoins/dcrwallet.nix
+++ b/pkgs/applications/blockchains/dcrwallet.nix
@@ -1,7 +1,7 @@
{ stdenv, lib, go, buildGoPackage, dep, fetchgit, git, cacert }:
buildGoPackage rec {
- name = "dcrwallet-${version}";
+ pname = "dcrwallet";
version = "1.1.2";
rev = "refs/tags/v${version}";
goPackagePath = "github.com/decred/dcrwallet";
diff --git a/pkgs/applications/altcoins/dero.nix b/pkgs/applications/blockchains/dero.nix
similarity index 96%
rename from pkgs/applications/altcoins/dero.nix
rename to pkgs/applications/blockchains/dero.nix
index 8405ea8f842b..0ab63bb53951 100644
--- a/pkgs/applications/altcoins/dero.nix
+++ b/pkgs/applications/blockchains/dero.nix
@@ -2,7 +2,7 @@
, lmdb, miniupnpc, readline }:
stdenv.mkDerivation rec {
- name = "dero-${version}";
+ pname = "dero";
version = "0.11.6";
src = fetchFromGitHub {
diff --git a/pkgs/applications/altcoins/dogecoin.nix b/pkgs/applications/blockchains/dogecoin.nix
similarity index 85%
rename from pkgs/applications/altcoins/dogecoin.nix
rename to pkgs/applications/blockchains/dogecoin.nix
index 0452f4013345..e5f149a0efe7 100644
--- a/pkgs/applications/altcoins/dogecoin.nix
+++ b/pkgs/applications/blockchains/dogecoin.nix
@@ -1,24 +1,24 @@
{ stdenv , fetchFromGitHub
, pkgconfig, autoreconfHook
-, db5, openssl, boost, zlib, miniupnpc
+, db5, openssl, boost, zlib, miniupnpc, libevent
, protobuf, utillinux, qt4, qrencode
, withGui }:
with stdenv.lib;
stdenv.mkDerivation rec {
name = "dogecoin" + (toString (optional (!withGui) "d")) + "-" + version;
- version = "1.10.0";
+ version = "1.14.1";
src = fetchFromGitHub {
owner = "dogecoin";
repo = "dogecoin";
rev = "v${version}";
- sha256 = "04rddx20d4fps2w3h1jxa2j8iyqpjv2fh897z0z3r06qjvjzf7rr";
+ sha256 = "0nmbi5gmms16baqs3fmdp2xm0yf8wawnyz80gcmca4j5ph2zka1v";
};
nativeBuildInputs = [ pkgconfig autoreconfHook ];
buildInputs = [ openssl db5 openssl utillinux
- protobuf boost zlib miniupnpc ]
+ protobuf boost zlib miniupnpc libevent ]
++ optionals withGui [ qt4 qrencode ];
configureFlags = [ "--with-incompatible-bdb"
diff --git a/pkgs/applications/altcoins/ethabi.nix b/pkgs/applications/blockchains/ethabi.nix
similarity index 95%
rename from pkgs/applications/altcoins/ethabi.nix
rename to pkgs/applications/blockchains/ethabi.nix
index 21d69f14d7f3..5bc81a6daf66 100644
--- a/pkgs/applications/altcoins/ethabi.nix
+++ b/pkgs/applications/blockchains/ethabi.nix
@@ -3,7 +3,7 @@
with rustPlatform;
buildRustPackage rec {
- name = "ethabi-${version}";
+ pname = "ethabi";
version = "7.0.0";
src = fetchFromGitHub {
diff --git a/pkgs/applications/altcoins/exodus/default.nix b/pkgs/applications/blockchains/exodus/default.nix
similarity index 100%
rename from pkgs/applications/altcoins/exodus/default.nix
rename to pkgs/applications/blockchains/exodus/default.nix
diff --git a/pkgs/applications/altcoins/fix-bitcoin-qt-build.patch b/pkgs/applications/blockchains/fix-bitcoin-qt-build.patch
similarity index 100%
rename from pkgs/applications/altcoins/fix-bitcoin-qt-build.patch
rename to pkgs/applications/blockchains/fix-bitcoin-qt-build.patch
diff --git a/pkgs/applications/altcoins/freicoin.nix b/pkgs/applications/blockchains/freicoin.nix
similarity index 87%
rename from pkgs/applications/altcoins/freicoin.nix
rename to pkgs/applications/blockchains/freicoin.nix
index 78ce074eafd3..6cf84f76f919 100644
--- a/pkgs/applications/altcoins/freicoin.nix
+++ b/pkgs/applications/blockchains/freicoin.nix
@@ -2,7 +2,7 @@
stdenv.mkDerivation rec {
version = "0.8.6-2";
- name = "freicoin-${version}";
+ pname = "freicoin";
src = fetchFromGitHub {
owner = "freicoin";
@@ -34,5 +34,8 @@ stdenv.mkDerivation rec {
license = licenses.mit;
maintainers = [ maintainers.viric ];
platforms = platforms.linux;
+
+ # upstream doesn't support newer openssl versions, use 1.0.1 for testing
+ broken = true;
};
}
diff --git a/pkgs/applications/altcoins/go-ethereum.nix b/pkgs/applications/blockchains/go-ethereum.nix
similarity index 90%
rename from pkgs/applications/altcoins/go-ethereum.nix
rename to pkgs/applications/blockchains/go-ethereum.nix
index 9ef348abc50e..a59cffb4b1d2 100644
--- a/pkgs/applications/altcoins/go-ethereum.nix
+++ b/pkgs/applications/blockchains/go-ethereum.nix
@@ -2,7 +2,7 @@
buildGoPackage rec {
pname = "go-ethereum";
- version = "1.9.1";
+ version = "1.9.6";
goPackagePath = "github.com/ethereum/go-ethereum";
@@ -17,7 +17,7 @@ buildGoPackage rec {
owner = "ethereum";
repo = pname;
rev = "v${version}";
- sha256 = "05vnjdjwahdp2j7c6g81jchpdhxmdpbr20mjzpszylp9824v4cba";
+ sha256 = "08k6p7mbszlg8mq8k3vi5xrfnhfbxlh2ynd0nr0j64qdhmhcdnq6";
};
meta = with stdenv.lib; {
diff --git a/pkgs/applications/blockchains/jormungandr/default.nix b/pkgs/applications/blockchains/jormungandr/default.nix
new file mode 100644
index 000000000000..c2789c78542a
--- /dev/null
+++ b/pkgs/applications/blockchains/jormungandr/default.nix
@@ -0,0 +1,56 @@
+{ stdenv
+, lib
+, fetchgit
+, rustPlatform
+, openssl
+, pkgconfig
+, protobuf
+, darwin
+}:
+
+rustPlatform.buildRustPackage rec {
+ pname = "jormungandr";
+ version = "0.6.5";
+
+ src = fetchgit {
+ url = "https://github.com/input-output-hk/${pname}";
+ rev = "v${version}";
+ sha256 = "16s6ks63194w35xlgzbhjdb3h606hkj049bap52sd6qf637bw2p7";
+ fetchSubmodules = true;
+ };
+
+ cargoSha256 = "1kba65rnm2vyqsjhcnfwy1m44x1w3xxlzinykmb89jy6qr8gvp42";
+
+ nativeBuildInputs = [ pkgconfig protobuf ];
+ buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
+
+ patchPhase = ''
+ sed -i "s~SCRIPTPATH=.*~SCRIPTPATH=$out/templates/~g" scripts/bootstrap
+ '';
+
+ installPhase = ''
+ install -d $out/bin $out/templates
+ install -m755 target/*/release/jormungandr $out/bin/
+ install -m755 target/*/release/jcli $out/bin/
+ install -m755 target/*/release/jormungandr-scenario-tests $out/bin/
+ install -m755 scripts/send-transaction $out/templates
+ install -m755 scripts/jcli-helpers $out/bin/
+ install -m755 scripts/bootstrap $out/bin/jormungandr-bootstrap
+ install -m644 scripts/faucet-send-money.shtempl $out/templates/
+ install -m644 scripts/create-account-and-delegate.shtempl $out/templates/
+ install -m644 scripts/faucet-send-certificate.shtempl $out/templates/
+ '';
+
+ PROTOC = "${protobuf}/bin/protoc";
+
+ # Disabling integration tests
+ doCheck = false;
+
+ meta = with stdenv.lib; {
+ description = "An aspiring blockchain node";
+ homepage = "https://input-output-hk.github.io/jormungandr/";
+ license = licenses.mit;
+ maintainers = [ maintainers.mmahut ];
+ platforms = platforms.all;
+ };
+}
diff --git a/pkgs/applications/blockchains/ledger-live-desktop/default.nix b/pkgs/applications/blockchains/ledger-live-desktop/default.nix
new file mode 100644
index 000000000000..09cb3c329b91
--- /dev/null
+++ b/pkgs/applications/blockchains/ledger-live-desktop/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchurl, makeDesktopItem, appimageTools, imagemagick }:
+
+let
+ pname = "ledger-live-desktop";
+ version = "1.15.0";
+ name = "${pname}-${version}";
+
+ src = fetchurl {
+ url = "https://github.com/LedgerHQ/${pname}/releases/download/v${version}/${pname}-${version}-linux-x86_64.AppImage";
+ sha256 = "0r7gm7q7gj39v36jd5xz20931za94nf2fpf3clbghkhlbrm0kbnq";
+ };
+
+ appimageContents = appimageTools.extractType2 {
+ inherit name src;
+ };
+in appimageTools.wrapType2 rec {
+ inherit name src;
+
+ extraInstallCommands = ''
+ mv $out/bin/${name} $out/bin/${pname}
+ install -m 444 -D ${appimageContents}/ledger-live-desktop.desktop $out/share/applications/ledger-live-desktop.desktop
+ install -m 444 -D ${appimageContents}/ledger-live-desktop.png $out/share/icons/hicolor/1024x1024/apps/ledger-live-desktop.png
+ ${imagemagick}/bin/convert ${appimageContents}/ledger-live-desktop.png -resize 512x512 ledger-live-desktop_512.png
+ install -m 444 -D ledger-live-desktop_512.png $out/share/icons/hicolor/512x512/apps/ledger-live-desktop.png
+ substituteInPlace $out/share/applications/ledger-live-desktop.desktop \
+ --replace 'Exec=AppRun' 'Exec=${pname}'
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Wallet app for Ledger Nano S and Ledger Blue";
+ homepage = "https://www.ledger.com/live";
+ license = licenses.mit;
+ maintainers = with maintainers; [ thedavidmeister nyanloutre ];
+ platforms = [ "x86_64-linux" ];
+ };
+}
diff --git a/pkgs/applications/altcoins/litecoin.nix b/pkgs/applications/blockchains/litecoin.nix
similarity index 100%
rename from pkgs/applications/altcoins/litecoin.nix
rename to pkgs/applications/blockchains/litecoin.nix
diff --git a/pkgs/applications/altcoins/lnd.nix b/pkgs/applications/blockchains/lnd.nix
similarity index 71%
rename from pkgs/applications/altcoins/lnd.nix
rename to pkgs/applications/blockchains/lnd.nix
index 7fcaca487b19..27f10c963c0f 100644
--- a/pkgs/applications/altcoins/lnd.nix
+++ b/pkgs/applications/blockchains/lnd.nix
@@ -2,16 +2,16 @@
buildGoModule rec {
pname = "lnd";
- version = "0.7.0-beta";
+ version = "0.7.1-beta";
src = fetchFromGitHub {
owner = "lightningnetwork";
repo = "lnd";
rev = "v${version}";
- sha256 = "0d6m1vfy33rg6d7qmkpydiypav1girxsnxan9njyjz0vhinmq0sx";
+ sha256 = "1c0sm0lavdai4w6d283q54knggw9d42vvqmglnv2h9swbw1l23ry";
};
- modSha256 = "0akxi7xhyz7xx0vc003abidva02sp940cc2gfjg4fmzkc95cajc9";
+ modSha256 = "13hjaf4bswk8g57lyxzdlqqp4a6ddl3qm6n4jja4b1h58mlbil73";
meta = with lib; {
description = "Lightning Network Daemon";
diff --git a/pkgs/applications/altcoins/masari.nix b/pkgs/applications/blockchains/masari.nix
similarity index 96%
rename from pkgs/applications/altcoins/masari.nix
rename to pkgs/applications/blockchains/masari.nix
index 02a6d25df516..dfa005abb6ec 100644
--- a/pkgs/applications/altcoins/masari.nix
+++ b/pkgs/applications/blockchains/masari.nix
@@ -2,7 +2,7 @@
, lmdb, miniupnpc, readline }:
stdenv.mkDerivation rec {
- name = "masari-${version}";
+ pname = "masari";
version = "0.1.4.0";
src = fetchFromGitHub {
diff --git a/pkgs/applications/altcoins/mist.nix b/pkgs/applications/blockchains/mist.nix
similarity index 100%
rename from pkgs/applications/altcoins/mist.nix
rename to pkgs/applications/blockchains/mist.nix
diff --git a/pkgs/applications/altcoins/monero-gui/default.nix b/pkgs/applications/blockchains/monero-gui/default.nix
similarity index 65%
rename from pkgs/applications/altcoins/monero-gui/default.nix
rename to pkgs/applications/blockchains/monero-gui/default.nix
index c10cc34ad44f..92f6f0080219 100644
--- a/pkgs/applications/altcoins/monero-gui/default.nix
+++ b/pkgs/applications/blockchains/monero-gui/default.nix
@@ -1,5 +1,4 @@
-{ stdenv, fetchFromGitHub
-, wrapQtAppsHook, makeDesktopItem
+{ mkDerivation, lib, makeDesktopItem, fetchFromGitHub
, qtbase, qmake, qtmultimedia, qttools
, qtgraphicaleffects, qtdeclarative
, qtlocation, qtquickcontrols, qtquickcontrols2
@@ -9,32 +8,20 @@
, hidapi
}:
-with stdenv.lib;
+with lib;
-let
- qmlPath = qmlLib: "${qmlLib}/${qtbase.qtQmlPrefix}";
-
- qml2ImportPath = concatMapStringsSep ":" qmlPath [
- qtbase.bin qtmultimedia.bin qtgraphicaleffects
- qtdeclarative.bin qtlocation.bin
- qtquickcontrols qtquickcontrols2.bin
- qtwebchannel.bin qtwebengine.bin qtxmlpatterns
- ];
-
-in
-
-stdenv.mkDerivation rec {
- name = "monero-gui-${version}";
- version = "0.14.1.0";
+mkDerivation rec {
+ pname = "monero-gui";
+ version = "0.14.1.2";
src = fetchFromGitHub {
owner = "monero-project";
repo = "monero-gui";
rev = "v${version}";
- sha256 = "0ilx47771faygf97wilm64xnqxgxa3b43q0g9v014npk0qj8pc31";
+ sha256 = "1rm043r6y2mzy8pclnzbjjfxgps8pkfa2b92p66k8y8rdmgq6m1k";
};
- nativeBuildInputs = [ qmake pkgconfig wrapQtAppsHook ];
+ nativeBuildInputs = [ qmake pkgconfig ];
buildInputs = [
qtbase qtmultimedia qtgraphicaleffects
@@ -46,10 +33,7 @@ stdenv.mkDerivation rec {
cppzmq hidapi
];
- patches = [
- ./move-log-file.patch
- ./move-translations-dir.patch
- ];
+ patches = [ ./move-log-file.patch ];
postPatch = ''
echo '
@@ -83,10 +67,6 @@ stdenv.mkDerivation rec {
mkdir -p $out/share/applications
cp ${desktopItem}/share/applications/* $out/share/applications
- # install translations
- mkdir -p $out/share/translations
- cp translations/*.qm $out/share/translations/
-
# install icons
for n in 16 24 32 48 64 96 128 256; do
size=$n"x"$n
@@ -97,10 +77,11 @@ stdenv.mkDerivation rec {
'';
meta = {
- description = "Private, secure, untraceable currency";
- homepage = https://getmonero.org/;
- license = licenses.bsd3;
- platforms = [ "x86_64-linux" ];
- maintainers = with maintainers; [ rnhmjoj ];
+ description = "Private, secure, untraceable currency";
+ homepage = https://getmonero.org/;
+ license = licenses.bsd3;
+ platforms = platforms.all;
+ badPlatforms = platforms.darwin;
+ maintainers = with maintainers; [ rnhmjoj ];
};
}
diff --git a/pkgs/applications/blockchains/monero-gui/move-log-file.patch b/pkgs/applications/blockchains/monero-gui/move-log-file.patch
new file mode 100644
index 000000000000..e540f1960d6c
--- /dev/null
+++ b/pkgs/applications/blockchains/monero-gui/move-log-file.patch
@@ -0,0 +1,15 @@
+diff --git a/main.cpp b/main.cpp
+index a51568d..5a9f683 100644
+--- a/main.cpp
++++ b/main.cpp
+@@ -152,7 +152,9 @@ int main(int argc, char *argv[])
+ QCommandLineOption logPathOption(QStringList() << "l" << "log-file",
+ QCoreApplication::translate("main", "Log to specified file"),
+ QCoreApplication::translate("main", "file"));
+-
++ logPathOption.setDefaultValue(
++ QStandardPaths::writableLocation(QStandardPaths::CacheLocation)
++ + "/monero-wallet-gui.log");
+ parser.addOption(logPathOption);
+ parser.addHelpOption();
+ parser.process(app);
diff --git a/pkgs/applications/altcoins/monero/default.nix b/pkgs/applications/blockchains/monero/default.nix
similarity index 97%
rename from pkgs/applications/altcoins/monero/default.nix
rename to pkgs/applications/blockchains/monero/default.nix
index f351c9fa5043..b6f074528616 100644
--- a/pkgs/applications/altcoins/monero/default.nix
+++ b/pkgs/applications/blockchains/monero/default.nix
@@ -11,7 +11,7 @@ assert stdenv.isDarwin -> IOKit != null;
with stdenv.lib;
stdenv.mkDerivation rec {
- name = "monero-${version}";
+ pname = "monero";
version = "0.14.1.0";
src = fetchgit {
diff --git a/pkgs/applications/altcoins/namecoin.nix b/pkgs/applications/blockchains/namecoin.nix
similarity index 100%
rename from pkgs/applications/altcoins/namecoin.nix
rename to pkgs/applications/blockchains/namecoin.nix
diff --git a/pkgs/applications/altcoins/nano-wallet/CMakeLists.txt.patch b/pkgs/applications/blockchains/nano-wallet/CMakeLists.txt.patch
similarity index 100%
rename from pkgs/applications/altcoins/nano-wallet/CMakeLists.txt.patch
rename to pkgs/applications/blockchains/nano-wallet/CMakeLists.txt.patch
diff --git a/pkgs/applications/altcoins/nano-wallet/default.nix b/pkgs/applications/blockchains/nano-wallet/default.nix
similarity index 74%
rename from pkgs/applications/altcoins/nano-wallet/default.nix
rename to pkgs/applications/blockchains/nano-wallet/default.nix
index 58ab367c020f..2b7ae5d9c6e6 100644
--- a/pkgs/applications/altcoins/nano-wallet/default.nix
+++ b/pkgs/applications/blockchains/nano-wallet/default.nix
@@ -1,15 +1,16 @@
-{lib, stdenv, fetchFromGitHub, cmake, pkgconfig, boost, libGL, qtbase}:
+{ lib, stdenv, fetchFromGitHub, cmake, pkgconfig, wrapQtAppsHook, boost, libGL
+, qtbase}:
stdenv.mkDerivation rec {
- name = "nano-wallet-${version}";
- version = "18.0";
+ pname = "nano-wallet";
+ version = "19.0";
src = fetchFromGitHub {
owner = "nanocurrency";
repo = "raiblocks";
rev = "V${version}";
- sha256 = "03f9g1x7rs7vic9yzsjxsh5ddx9ys78rssbfghbccfw9qrwylh3y";
+ sha256 = "1y5fc4cvfqh33imjkh91sqhy5bb9kh0icwyvdgm1cl564vnjax80";
fetchSubmodules = true;
};
@@ -20,7 +21,7 @@ stdenv.mkDerivation rec {
cmakeFlags = let
options = {
- BOOST_ROOT = "${boost}";
+ BOOST_ROOT = boost;
Boost_USE_STATIC_LIBS = "OFF";
RAIBLOCKS_GUI = "ON";
RAIBLOCKS_TEST = "ON";
@@ -32,13 +33,19 @@ stdenv.mkDerivation rec {
optionToFlag = name: value: "-D${name}=${value}";
in lib.mapAttrsToList optionToFlag options;
- nativeBuildInputs = [ cmake pkgconfig ];
+ nativeBuildInputs = [ cmake pkgconfig wrapQtAppsHook ];
buildInputs = [ boost libGL qtbase ];
buildPhase = ''
make nano_wallet
'';
+ # Move executables under bin directory
+ postInstall = ''
+ mkdir -p $out/bin
+ mv $out/nano* $out/bin/
+ '';
+
checkPhase = ''
./core_test
'';
diff --git a/pkgs/applications/altcoins/parity-ui/default.nix b/pkgs/applications/blockchains/parity-ui/default.nix
similarity index 95%
rename from pkgs/applications/altcoins/parity-ui/default.nix
rename to pkgs/applications/blockchains/parity-ui/default.nix
index c59b2ccb8ac3..0615aed2ca03 100644
--- a/pkgs/applications/altcoins/parity-ui/default.nix
+++ b/pkgs/applications/blockchains/parity-ui/default.nix
@@ -5,13 +5,13 @@ let
uiEnv = pkgs.callPackage ./env.nix { };
in stdenv.mkDerivation rec {
- name = "parity-ui-${version}";
+ pname = "parity-ui";
version = "0.3.4";
src = fetchurl {
url = "https://github.com/parity-js/shell/releases/download/v${version}/parity-ui_${version}_amd64.deb";
sha256 = "1xbd00r9ph8w2d6d2c5xg4b5l74ljzs50rpc6kahfznypmh4kr73";
- name = "${name}.deb";
+ name = "${pname}-${version}.deb";
};
nativeBuildInputs = [ makeWrapper nodePackages.asar ];
diff --git a/pkgs/applications/altcoins/parity-ui/env.nix b/pkgs/applications/blockchains/parity-ui/env.nix
similarity index 100%
rename from pkgs/applications/altcoins/parity-ui/env.nix
rename to pkgs/applications/blockchains/parity-ui/env.nix
diff --git a/pkgs/applications/blockchains/parity/beta.nix b/pkgs/applications/blockchains/parity/beta.nix
new file mode 100644
index 000000000000..a26a1b7cc771
--- /dev/null
+++ b/pkgs/applications/blockchains/parity/beta.nix
@@ -0,0 +1,6 @@
+let
+ version = "2.6.4";
+ sha256 = "11l93w97961zig4gqf345j9l20g0mjp7fayl1mdwdp14hhd5zk5g";
+ cargoSha256 = "1q6cbms7j1h726bvq38npxkjkmz14b5ir9c4z7pb0jcy7gkplyxx";
+in
+ import ./parity.nix { inherit version sha256 cargoSha256; }
diff --git a/pkgs/applications/blockchains/parity/default.nix b/pkgs/applications/blockchains/parity/default.nix
new file mode 100644
index 000000000000..299bb0639b6c
--- /dev/null
+++ b/pkgs/applications/blockchains/parity/default.nix
@@ -0,0 +1,6 @@
+let
+ version = "2.5.9";
+ sha256 = "06gmfw5l8n5i35dimsmj6dn0fxhbp53zjrdvbkff63r5kfqnwnx2";
+ cargoSha256 = "1kdy0bnmyqx4rhpq0a8gliy6mws68n035kfkxrfa6cxr2cn53dyb";
+in
+ import ./parity.nix { inherit version sha256 cargoSha256; }
diff --git a/pkgs/applications/altcoins/parity/parity.nix b/pkgs/applications/blockchains/parity/parity.nix
similarity index 70%
rename from pkgs/applications/altcoins/parity/parity.nix
rename to pkgs/applications/blockchains/parity/parity.nix
index 011a44fe1709..7f28d97bf81a 100644
--- a/pkgs/applications/altcoins/parity/parity.nix
+++ b/pkgs/applications/blockchains/parity/parity.nix
@@ -3,18 +3,19 @@
, cargoSha256
}:
-{ stdenv
+{ lib
, fetchFromGitHub
, rustPlatform
-, pkgconfig
-, openssl
-, systemd
+
, cmake
-, perl
+, openssl
+, pkgconfig
+, systemd
}:
-rustPlatform.buildRustPackage rec {
- name = "parity-${version}";
+rustPlatform.buildRustPackage {
+ pname = "parity";
+ inherit version;
inherit cargoSha256;
src = fetchFromGitHub {
@@ -24,21 +25,20 @@ rustPlatform.buildRustPackage rec {
inherit sha256;
};
- buildInputs = [
- pkgconfig cmake perl
- systemd.lib systemd.dev openssl openssl.dev
- ];
+ nativeBuildInputs = [ cmake pkgconfig ];
+
+ buildInputs = [ openssl systemd ];
cargoBuildFlags = [ "--features final" ];
# test result: FAILED. 80 passed; 12 failed; 0 ignored; 0 measured; 0 filtered out
doCheck = false;
- meta = with stdenv.lib; {
+ meta = with lib; {
description = "Fast, light, robust Ethereum implementation";
homepage = "http://parity.io";
license = licenses.gpl3;
- maintainers = [ maintainers.akru ];
+ maintainers = with maintainers; [ akru xrelkd ];
platforms = platforms.linux;
};
}
diff --git a/pkgs/applications/altcoins/particl/particl-core.nix b/pkgs/applications/blockchains/particl/particl-core.nix
similarity index 97%
rename from pkgs/applications/altcoins/particl/particl-core.nix
rename to pkgs/applications/blockchains/particl/particl-core.nix
index f5efa0bb52c2..613d57cd9c8c 100644
--- a/pkgs/applications/altcoins/particl/particl-core.nix
+++ b/pkgs/applications/blockchains/particl/particl-core.nix
@@ -16,7 +16,7 @@
with stdenv.lib;
stdenv.mkDerivation rec {
- name = "particl-core-${version}";
+ pname = "particl-core";
version = "0.17.1.2";
src = fetchurl {
diff --git a/pkgs/applications/altcoins/pivx.nix b/pkgs/applications/blockchains/pivx.nix
similarity index 68%
rename from pkgs/applications/altcoins/pivx.nix
rename to pkgs/applications/blockchains/pivx.nix
index 995b8deccd95..22fdc7f51c5c 100644
--- a/pkgs/applications/altcoins/pivx.nix
+++ b/pkgs/applications/blockchains/pivx.nix
@@ -1,5 +1,5 @@
-{ fetchFromGitHub, stdenv, pkgconfig, autoreconfHook
-, openssl, db48, boost, zlib, miniupnpc, gmp
+{ fetchFromGitHub, stdenv, pkgconfig, autoreconfHook, wrapQtAppsHook ? null
+, openssl_1_0_2, db48, boost, zlib, miniupnpc, gmp
, qrencode, glib, protobuf, yasm, libevent
, utillinux, qtbase ? null, qttools ? null
, enableUpnp ? false
@@ -10,17 +10,17 @@
with stdenv.lib;
stdenv.mkDerivation rec {
name = "pivx-${version}";
- version = "3.2.0";
+ version = "3.4.0";
src = fetchFromGitHub {
owner = "PIVX-Project";
repo= "PIVX";
rev = "v${version}";
- sha256 = "1sym6254vhq8qqpxq9qhy10m5167v7x93kqaj1gixc1vwwbxyazy";
+ sha256 = "1fqccdqhbwyvix0ihhbgg2w048i6bhfmazr36h2cn4j65n1fgmi2";
};
- nativeBuildInputs = [ pkgconfig autoreconfHook ];
- buildInputs = [ glib gmp openssl db48 yasm boost zlib libevent miniupnpc protobuf utillinux ]
+ nativeBuildInputs = [ pkgconfig autoreconfHook ] ++ optionals withGui [ wrapQtAppsHook ];
+ buildInputs = [ glib gmp openssl_1_0_2 db48 yasm boost zlib libevent miniupnpc protobuf utillinux ]
++ optionals withGui [ qtbase qttools qrencode ];
configureFlags = [ "--with-boost-libdir=${boost.out}/lib" ]
@@ -28,6 +28,7 @@ stdenv.mkDerivation rec {
++ optional disableWallet "--disable-wallet"
++ optional disableDaemon "--disable-daemon"
++ optionals withGui [ "--with-gui=yes"
+ "--with-unsupported-ssl" # TODO remove this ASAP
"--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
];
@@ -39,6 +40,11 @@ stdenv.mkDerivation rec {
cp share/pixmaps/*128.png $out/share/icons/
'';
+ doInstallCheck = true;
+ installCheckPhase = ''
+ $out/bin/test_pivx
+ '';
+
meta = with stdenv.lib; {
description = "An open source crypto-currency focused on fast private transactions";
longDescription = ''
@@ -50,5 +56,9 @@ stdenv.mkDerivation rec {
homepage = https://www.dash.org;
maintainers = with maintainers; [ wucke13 ];
platforms = platforms.unix;
+ # TODO
+ # upstream doesn't support newer openssl versions
+ # https://github.com/PIVX-Project/PIVX/issues/748
+ # openssl_1_0_2 should be replaced with openssl ASAP
};
}
diff --git a/pkgs/applications/altcoins/polkadot/default.nix b/pkgs/applications/blockchains/polkadot/default.nix
similarity index 94%
rename from pkgs/applications/altcoins/polkadot/default.nix
rename to pkgs/applications/blockchains/polkadot/default.nix
index 26c9192ee6fa..681268b4f327 100644
--- a/pkgs/applications/altcoins/polkadot/default.nix
+++ b/pkgs/applications/blockchains/polkadot/default.nix
@@ -6,7 +6,7 @@
}:
rustPlatform.buildRustPackage rec {
- name = "polkadot-${version}";
+ pname = "polkadot";
version = "0.2.17";
src = fetchFromGitHub {
@@ -26,5 +26,6 @@ rustPlatform.buildRustPackage rec {
license = licenses.gpl3;
maintainers = [ maintainers.akru ];
platforms = platforms.linux;
+ broken = true;
};
}
diff --git a/pkgs/applications/altcoins/stellar-core-dirty-version.patch b/pkgs/applications/blockchains/stellar-core-dirty-version.patch
similarity index 100%
rename from pkgs/applications/altcoins/stellar-core-dirty-version.patch
rename to pkgs/applications/blockchains/stellar-core-dirty-version.patch
diff --git a/pkgs/applications/altcoins/stellar-core.nix b/pkgs/applications/blockchains/stellar-core.nix
similarity index 100%
rename from pkgs/applications/altcoins/stellar-core.nix
rename to pkgs/applications/blockchains/stellar-core.nix
diff --git a/pkgs/applications/altcoins/sumokoin.nix b/pkgs/applications/blockchains/sumokoin.nix
similarity index 96%
rename from pkgs/applications/altcoins/sumokoin.nix
rename to pkgs/applications/blockchains/sumokoin.nix
index 026008b2761a..ad65da057aec 100644
--- a/pkgs/applications/altcoins/sumokoin.nix
+++ b/pkgs/applications/blockchains/sumokoin.nix
@@ -2,7 +2,7 @@
, libunwind, lmdb, miniupnpc }:
stdenv.mkDerivation rec {
- name = "sumokoin-${version}";
+ pname = "sumokoin";
version = "0.2.0.0";
src = fetchFromGitHub {
diff --git a/pkgs/applications/blockchains/wasabiwallet/default.nix b/pkgs/applications/blockchains/wasabiwallet/default.nix
new file mode 100644
index 000000000000..6a5532f92c95
--- /dev/null
+++ b/pkgs/applications/blockchains/wasabiwallet/default.nix
@@ -0,0 +1,44 @@
+{ stdenv, fetchurl, makeDesktopItem, openssl, xorg, curl, fontconfig, krb5, zlib, dotnet-sdk }:
+
+stdenv.mkDerivation rec {
+ pname = "wasabiwallet";
+ version = "1.1.9";
+
+ src = fetchurl {
+ url = "https://github.com/zkSNACKs/WalletWasabi/releases/download/v${version}/WasabiLinux-${version}.tar.gz";
+ sha256 = "1dz05ivhadfjfp4yfpz492401yznm3rlnx7g4nqzxwh4cmqzisrm";
+ };
+
+ dontBuild = true;
+ dontPatchELF = true;
+
+ desktopItem = makeDesktopItem {
+ name = "wasabi";
+ exec = "wasabiwallet";
+ desktopName = "Wasabi";
+ genericName = "Bitcoin wallet";
+ comment = meta.description;
+ categories = "Application;Network;Utility;";
+ };
+
+ installPhase = ''
+ mkdir -p $out/opt/${pname} $out/bin $out/share/applications
+ cp -Rv . $out/opt/${pname}
+ cd $out/opt/${pname}
+ for i in $(find . -type f -name '*.so') wassabee
+ do
+ patchelf --set-rpath ${stdenv.lib.makeLibraryPath [ openssl stdenv.cc.cc.lib xorg.libX11 curl fontconfig.lib krb5 zlib dotnet-sdk ]} $i
+ done
+ patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" wassabee
+ ln -s $out/opt/${pname}/wassabee $out/bin/${pname}
+ cp -v $desktopItem/share/applications/* $out/share/applications
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Privacy focused Bitcoin wallet";
+ homepage = "https://wasabiwallet.io/";
+ license = licenses.mit;
+ platforms = [ "x86_64-linux" ];
+ maintainers = with maintainers; [ mmahut ];
+ };
+}
diff --git a/pkgs/applications/altcoins/wownero.nix b/pkgs/applications/blockchains/wownero.nix
similarity index 97%
rename from pkgs/applications/altcoins/wownero.nix
rename to pkgs/applications/blockchains/wownero.nix
index 7aed32978326..365afb5a2411 100644
--- a/pkgs/applications/altcoins/wownero.nix
+++ b/pkgs/applications/blockchains/wownero.nix
@@ -6,7 +6,7 @@
with stdenv.lib;
stdenv.mkDerivation rec {
- name = "wownero-${version}";
+ pname = "wownero";
version = "0.6.1.2";
src = fetchFromGitHub {
diff --git a/pkgs/applications/altcoins/zcash/default.nix b/pkgs/applications/blockchains/zcash/default.nix
similarity index 94%
rename from pkgs/applications/altcoins/zcash/default.nix
rename to pkgs/applications/blockchains/zcash/default.nix
index 6a8fba3c2bb7..1852d72d326f 100644
--- a/pkgs/applications/altcoins/zcash/default.nix
+++ b/pkgs/applications/blockchains/zcash/default.nix
@@ -1,6 +1,6 @@
{ stdenv, libsodium, fetchFromGitHub, wget, pkgconfig, autoreconfHook, openssl, db62, boost
, zlib, gtest, gmock, callPackage, gmp, qt4, utillinux, protobuf, qrencode, libevent
-, withGui }:
+, libsnark, withGui }:
let librustzcash = callPackage ./librustzcash {};
in
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoreconfHook pkgconfig ];
buildInputs = [ gtest gmock gmp openssl wget db62 boost zlib
- protobuf libevent libsodium librustzcash ]
+ protobuf libevent libsodium librustzcash libsnark ]
++ optionals stdenv.isLinux [ utillinux ]
++ optionals withGui [ qt4 qrencode ];
diff --git a/pkgs/applications/altcoins/zcash/librustzcash/default.nix b/pkgs/applications/blockchains/zcash/librustzcash/default.nix
similarity index 94%
rename from pkgs/applications/altcoins/zcash/librustzcash/default.nix
rename to pkgs/applications/blockchains/zcash/librustzcash/default.nix
index 3aeee7e6972f..634d4e8538a1 100644
--- a/pkgs/applications/altcoins/zcash/librustzcash/default.nix
+++ b/pkgs/applications/blockchains/zcash/librustzcash/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, rustPlatform }:
rustPlatform.buildRustPackage rec {
- name = "librustzcash-unstable-${version}";
+ pname = "librustzcash-unstable";
version = "2017-03-17";
src = fetchFromGitHub {
diff --git a/pkgs/applications/display-managers/lightdm-enso-os-greeter/default.nix b/pkgs/applications/display-managers/lightdm-enso-os-greeter/default.nix
index 45fd3cb8cbb7..3128f125cd9e 100644
--- a/pkgs/applications/display-managers/lightdm-enso-os-greeter/default.nix
+++ b/pkgs/applications/display-managers/lightdm-enso-os-greeter/default.nix
@@ -1,10 +1,10 @@
-{ stdenv, fetchgit, pkgconfig
+{ stdenv, fetchgit, pkgconfig, linkFarm, lightdm-enso-os-greeter
, dbus, pcre, epoxy, libXdmcp, at-spi2-core, libxklavier, libxkbcommon, libpthreadstubs
-, gtk3, vala, cmake, libgee, libX11, lightdm, gdk-pixbuf, clutter-gtk }:
+, gtk3, vala, cmake, libgee, libX11, lightdm, gdk-pixbuf, clutter-gtk, wrapGAppsHook, librsvg }:
-stdenv.mkDerivation rec {
+stdenv.mkDerivation {
version = "0.2.1";
- name = "lightdm-enso-os-greeter-${version}";
+ pname = "lightdm-enso-os-greeter";
src = fetchgit {
url = https://github.com/nick92/Enso-OS;
@@ -12,12 +12,21 @@ stdenv.mkDerivation rec {
sha256 = "11jm181jq1vbn83h235avpdxz7pqq6prqyzki5yryy53mkj4kgxz";
};
+ patches = [
+ ./fix-paths.patch
+ ];
+
+ nativeBuildInputs = [
+ cmake
+ pkgconfig
+ vala
+ wrapGAppsHook
+ ];
+
buildInputs = [
dbus
gtk3
pcre
- vala
- cmake
epoxy
libgee
libX11
@@ -29,31 +38,21 @@ stdenv.mkDerivation rec {
at-spi2-core
libxkbcommon
libpthreadstubs
+ librsvg
];
- nativeBuildInputs = [
- pkgconfig
- ];
-
- postPatch = ''
- sed -i "s@\''${CMAKE_INSTALL_PREFIX}/@@" greeter/CMakeLists.txt
- '';
-
preConfigure = ''
cd greeter
'';
- installFlags = [
- "DESTDIR=$(out)"
- ];
-
- preFixup = ''
- mv $out/usr/* $out
- rm -r $out/usr
- '';
+ passthru.xgreeters = linkFarm "enso-os-greeter-xgreeters" [{
+ path = "${lightdm-enso-os-greeter}/share/xgreeters/pantheon-greeter.desktop";
+ name = "pantheon-greeter.desktop";
+ }];
postFixup = ''
- rm -r $out/sbin
+ substituteInPlace $out/share/xgreeters/pantheon-greeter.desktop \
+ --replace "pantheon-greeter" "$out/bin/pantheon-greeter"
'';
meta = with stdenv.lib; {
diff --git a/pkgs/applications/display-managers/lightdm-enso-os-greeter/fix-paths.patch b/pkgs/applications/display-managers/lightdm-enso-os-greeter/fix-paths.patch
new file mode 100644
index 000000000000..ab3ad2b10e41
--- /dev/null
+++ b/pkgs/applications/display-managers/lightdm-enso-os-greeter/fix-paths.patch
@@ -0,0 +1,24 @@
+diff --git a/greeter/CMakeLists.txt b/greeter/CMakeLists.txt
+index 57aebb0..ab50bff 100644
+--- a/greeter/CMakeLists.txt
++++ b/greeter/CMakeLists.txt
+@@ -9,7 +9,6 @@ list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
+ set (CONF_DIR "/etc/lightdm")
+ set (DATADIR "${CMAKE_INSTALL_PREFIX}/share")
+ set (PKGDATADIR "${DATADIR}/enso/greeter")
+-set (CMAKE_INSTALL_PREFIX /usr)
+ set (VERSION "1.0.6")
+
+
+@@ -94,9 +93,9 @@ glib_compile_resources (GLIB_RESOURCES_CSS SOURCE data/css.gresource.xml)
+ add_executable (pantheon-greeter ${VALA_C} ${GLIB_RESOURCES_CSS})
+ target_link_libraries(pantheon-greeter m)
+
+-install (TARGETS pantheon-greeter RUNTIME DESTINATION sbin)
++install (TARGETS pantheon-greeter RUNTIME DESTINATION bin)
+ install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/pantheon-greeter.desktop DESTINATION share/xgreeters)
+-install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/greeter.conf DESTINATION ${CONF_DIR})
++install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/greeter.conf DESTINATION etc/lightdm)
+ install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/fingerprint.svg DESTINATION ${PKGDATADIR})
+ install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/power.svg DESTINATION ${PKGDATADIR})
+ install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/checked.svg DESTINATION ${PKGDATADIR})
diff --git a/pkgs/applications/display-managers/lightdm-mini-greeter/default.nix b/pkgs/applications/display-managers/lightdm-mini-greeter/default.nix
index 91446f73507e..b5b26d7cc430 100644
--- a/pkgs/applications/display-managers/lightdm-mini-greeter/default.nix
+++ b/pkgs/applications/display-managers/lightdm-mini-greeter/default.nix
@@ -1,7 +1,7 @@
-{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, lightdm, gtk3 }:
+{ stdenv, linkFarm, lightdm-mini-greeter, fetchFromGitHub, autoreconfHook, pkgconfig, lightdm, gtk3, glib, gdk-pixbuf, wrapGAppsHook, librsvg }:
stdenv.mkDerivation rec {
- name = "lightdm-mini-greeter-${version}";
+ pname = "lightdm-mini-greeter";
version = "0.3.4";
src = fetchFromGitHub {
@@ -11,17 +11,22 @@ stdenv.mkDerivation rec {
sha256 = "1qi0bsqi8z2zv3303ww0kd7bciz6qx8na5bkvgrqlwyvq31czai5";
};
- nativeBuildInputs = [ autoreconfHook pkgconfig ];
- buildInputs = [ lightdm gtk3 ];
+ nativeBuildInputs = [ autoreconfHook pkgconfig wrapGAppsHook ];
+ buildInputs = [ lightdm gtk3 glib gdk-pixbuf librsvg ];
configureFlags = [ "--sysconfdir=/etc" ];
- makeFlags = [ "configdir=$(out)/etc" ];
+ makeFlags = [ "configdir=${placeholder "out"}/etc" ];
postInstall = ''
substituteInPlace "$out/share/xgreeters/lightdm-mini-greeter.desktop" \
--replace "Exec=lightdm-mini-greeter" "Exec=$out/bin/lightdm-mini-greeter"
'';
+ passthru.xgreeters = linkFarm "lightdm-mini-greeter-xgreeters" [{
+ path = "${lightdm-mini-greeter}/share/xgreeters/lightdm-mini-greeter.desktop";
+ name = "lightdm-mini-greeter.desktop";
+ }];
+
meta = with stdenv.lib; {
description = "A minimal, configurable, single-user GTK3 LightDM greeter";
homepage = https://github.com/prikhi/lightdm-mini-greeter;
diff --git a/pkgs/applications/display-managers/lightdm/default.nix b/pkgs/applications/display-managers/lightdm/default.nix
index 61d65cb64b6b..4d221e970997 100644
--- a/pkgs/applications/display-managers/lightdm/default.nix
+++ b/pkgs/applications/display-managers/lightdm/default.nix
@@ -1,8 +1,32 @@
-{ stdenv, fetchFromGitHub, pam, pkgconfig, autoconf, automake, libtool, libxcb
-, glib, libXdmcp, itstool, intltool, libxklavier, libgcrypt, audit, busybox
-, polkit, accountsservice, gtk-doc, gnome3, gobject-introspection, vala, fetchpatch
-, withQt4 ? false, qt4
-, withQt5 ? false, qtbase
+{ stdenv
+, fetchFromGitHub
+, substituteAll
+, plymouth
+, pam
+, pkgconfig
+, autoconf
+, automake
+, libtool
+, libxcb
+, glib
+, libXdmcp
+, itstool
+, intltool
+, libxklavier
+, libgcrypt
+, audit
+, busybox
+, polkit
+, accountsservice
+, gtk-doc
+, gnome3
+, gobject-introspection
+, vala
+, fetchpatch
+, withQt4 ? false
+, qt4
+, withQt5 ? false
+, qtbase
}:
with stdenv.lib;
@@ -53,6 +77,20 @@ stdenv.mkDerivation rec {
url = "https://src.fedoraproject.org/rpms/lightdm/raw/4cf0d2bed8d1c68970b0322ccd5dbbbb7a0b12bc/f/lightdm-1.25.1-disable_dmrc.patch";
sha256 = "06f7iabagrsiws2l75sx2jyljknr9js7ydn151p3qfi104d1541n";
})
+
+ # Don't use etc/dbus-1/system.d
+ (fetchpatch {
+ url = "https://github.com/canonical/lightdm/commit/a99376f5f51aa147aaf81287d7ce70db76022c47.patch";
+ sha256 = "1zyx1qqajrmqcf9hbsapd39gmdanswd9l78rq7q6rdy4692il3yn";
+ })
+
+ # Hardcode plymouth to fix transitions.
+ # For some reason it can't find `plymouth`
+ # even when it's in PATH in environment.systemPackages.
+ (substituteAll {
+ src = ./fix-paths.patch;
+ plymouth = "${plymouth}/bin/plymouth";
+ })
];
preConfigure = "NOCONFIGURE=1 ./autogen.sh";
@@ -61,13 +99,12 @@ stdenv.mkDerivation rec {
"--localstatedir=/var"
"--sysconfdir=/etc"
"--disable-tests"
- "--disable-static"
"--disable-dmrc"
] ++ optional withQt4 "--enable-liblightdm-qt"
++ optional withQt5 "--enable-liblightdm-qt5";
installFlags = [
- "sysconfdir=${placeholder ''out''}/etc"
+ "sysconfdir=${placeholder "out"}/etc"
"localstatedir=\${TMPDIR}"
];
@@ -79,6 +116,10 @@ stdenv.mkDerivation rec {
--replace /bin/rm ${busybox}/bin/rm
'';
+ postInstall = ''
+ rm -rf $out/etc/apparmor.d $out/etc/init $out/etc/pam.d
+ '';
+
meta = {
homepage = https://github.com/CanonicalLtd/lightdm;
description = "A cross-desktop display manager";
diff --git a/pkgs/applications/display-managers/lightdm/fix-paths.patch b/pkgs/applications/display-managers/lightdm/fix-paths.patch
new file mode 100644
index 000000000000..4498bc4d1a3e
--- /dev/null
+++ b/pkgs/applications/display-managers/lightdm/fix-paths.patch
@@ -0,0 +1,13 @@
+diff --git a/src/plymouth.c b/src/plymouth.c
+index d1ed91f4..318f9409 100644
+--- a/src/plymouth.c
++++ b/src/plymouth.c
+@@ -24,7 +24,7 @@ static gboolean has_active_vt = FALSE;
+ static gboolean
+ plymouth_run_command (const gchar *command, gint *exit_status)
+ {
+- g_autofree gchar *command_line = g_strdup_printf ("plymouth %s", command);
++ g_autofree gchar *command_line = g_strdup_printf ("@plymouth@ %s", command);
+ g_autoptr(GError) error = NULL;
+ gboolean result = g_spawn_command_line_sync (command_line, NULL, NULL, exit_status, &error);
+
diff --git a/pkgs/applications/display-managers/lightdm/gtk-greeter.nix b/pkgs/applications/display-managers/lightdm/gtk-greeter.nix
index 61db182f7446..5b1490a6b3be 100644
--- a/pkgs/applications/display-managers/lightdm/gtk-greeter.nix
+++ b/pkgs/applications/display-managers/lightdm/gtk-greeter.nix
@@ -1,7 +1,18 @@
-{ stdenv, fetchurl, lightdm, pkgconfig, intltool
-, hicolor-icon-theme, makeWrapper
-, useGTK2 ? false, gtk2, gtk3 # gtk3 seems better supported
-, exo, at-spi2-core
+{ stdenv
+, lightdm_gtk_greeter
+, fetchurl
+, lightdm
+, pkgconfig
+, intltool
+, linkFarm
+, wrapGAppsHook
+, useGTK2 ? false
+, gtk2
+, gtk3 # gtk3 seems better supported
+, exo
+, at-spi2-core
+, librsvg
+, hicolor-icon-theme
}:
#ToDo: bad icons with gtk2;
@@ -12,21 +23,23 @@ let
version = "2.0.6";
in
stdenv.mkDerivation rec {
- name = "lightdm-gtk-greeter-${version}";
+ pname = "lightdm-gtk-greeter";
+ inherit version;
src = fetchurl {
- url = "${meta.homepage}/${ver_branch}/${version}/+download/${name}.tar.gz";
+ url = "${meta.homepage}/${ver_branch}/${version}/+download/${pname}-${version}.tar.gz";
sha256 = "1pis5qyg95pg31dvnfqq34bzgj00hg4vs547r8h60lxjk81z8p15";
};
- nativeBuildInputs = [ pkgconfig ];
- buildInputs = [ lightdm exo intltool makeWrapper hicolor-icon-theme ]
+ nativeBuildInputs = [ pkgconfig intltool wrapGAppsHook ];
+ buildInputs = [ lightdm exo librsvg hicolor-icon-theme ]
++ (if useGTK2 then [ gtk2 ] else [ gtk3 ]);
configureFlags = [
"--localstatedir=/var"
"--sysconfdir=/etc"
"--disable-indicator-services-command"
+ "--sbindir=${placeholder "out"}/bin" # for wrapGAppsHook to wrap automatically
] ++ stdenv.lib.optional useGTK2 "--with-gtk2";
preConfigure = ''
@@ -42,11 +55,14 @@ stdenv.mkDerivation rec {
postInstall = ''
substituteInPlace "$out/share/xgreeters/lightdm-gtk-greeter.desktop" \
- --replace "Exec=lightdm-gtk-greeter" "Exec=$out/sbin/lightdm-gtk-greeter"
- wrapProgram "$out/sbin/lightdm-gtk-greeter" \
- --prefix XDG_DATA_DIRS ":" "${hicolor-icon-theme}/share"
+ --replace "Exec=lightdm-gtk-greeter" "Exec=$out/bin/lightdm-gtk-greeter"
'';
+ passthru.xgreeters = linkFarm "lightdm-gtk-greeter-xgreeters" [{
+ path = "${lightdm_gtk_greeter}/share/xgreeters/lightdm-gtk-greeter.desktop";
+ name = "lightdm-gtk-greeter.desktop";
+ }];
+
meta = with stdenv.lib; {
homepage = https://launchpad.net/lightdm-gtk-greeter;
platforms = platforms.linux;
diff --git a/pkgs/applications/display-managers/ly/default.nix b/pkgs/applications/display-managers/ly/default.nix
index e8edcc3f634c..2f0a770bc71c 100644
--- a/pkgs/applications/display-managers/ly/default.nix
+++ b/pkgs/applications/display-managers/ly/default.nix
@@ -1,7 +1,7 @@
{ stdenv, lib, fetchFromGitHub, linux-pam }:
stdenv.mkDerivation rec {
- name = "ly-${version}";
+ pname = "ly";
version = "0.2.1";
src = fetchFromGitHub {
diff --git a/pkgs/applications/display-managers/sddm/default.nix b/pkgs/applications/display-managers/sddm/default.nix
index b5d32493003d..735e83a0842a 100644
--- a/pkgs/applications/display-managers/sddm/default.nix
+++ b/pkgs/applications/display-managers/sddm/default.nix
@@ -1,13 +1,14 @@
{ mkDerivation, lib, fetchFromGitHub
, cmake, extra-cmake-modules, pkgconfig, libxcb, libpthreadstubs
-, libXdmcp, libXau, qtbase, qtdeclarative, qttools, pam, systemd
+, libXdmcp, libXau, qtbase, qtdeclarative, qtquickcontrols2, qttools, pam, systemd
}:
let
version = "0.18.1";
-in mkDerivation rec {
- name = "sddm-${version}";
+in mkDerivation {
+ pname = "sddm";
+ inherit version;
src = fetchFromGitHub {
owner = "sddm";
@@ -29,7 +30,7 @@ in mkDerivation rec {
nativeBuildInputs = [ cmake extra-cmake-modules pkgconfig qttools ];
buildInputs = [
- libxcb libpthreadstubs libXdmcp libXau pam qtbase qtdeclarative systemd
+ libxcb libpthreadstubs libXdmcp libXau pam qtbase qtdeclarative qtquickcontrols2 systemd
];
cmakeFlags = [
@@ -45,6 +46,7 @@ in mkDerivation rec {
"-DQT_IMPORTS_DIR=${placeholder "out"}/${qtbase.qtQmlPrefix}"
"-DCMAKE_INSTALL_SYSCONFDIR=${placeholder "out"}/etc"
"-DSYSTEMD_SYSTEM_UNIT_DIR=${placeholder "out"}/lib/systemd/system"
+ "-DDBUS_CONFIG_DIR=${placeholder "out"}/share/dbus-1/system.d"
];
postInstall = ''
diff --git a/pkgs/applications/editors/aewan/default.nix b/pkgs/applications/editors/aewan/default.nix
index 214b435429ae..1bd73bebe03b 100644
--- a/pkgs/applications/editors/aewan/default.nix
+++ b/pkgs/applications/editors/aewan/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, zlib, ncurses }:
stdenv.mkDerivation rec {
- name = "aewan-${version}";
+ pname = "aewan";
version = "1.0.01";
src = fetchurl {
- url = "mirror://sourceforge/aewan/${name}.tar.gz";
+ url = "mirror://sourceforge/aewan/${pname}-${version}.tar.gz";
sha256 = "5266dec5e185e530b792522821c97dfa5f9e3892d0dca5e881d0c30ceac21817";
};
diff --git a/pkgs/applications/editors/amp/default.nix b/pkgs/applications/editors/amp/default.nix
index 98692de43170..31d0806df8a5 100644
--- a/pkgs/applications/editors/amp/default.nix
+++ b/pkgs/applications/editors/amp/default.nix
@@ -1,4 +1,5 @@
-{ stdenv, fetchFromGitHub, rustPlatform, openssl, pkgconfig, python3, xorg, cmake, libgit2 }:
+{ stdenv, fetchFromGitHub, rustPlatform, openssl, pkgconfig, python3, xorg, cmake, libgit2, darwin
+, curl }:
rustPlatform.buildRustPackage rec {
pname = "amp";
@@ -15,7 +16,8 @@ rustPlatform.buildRustPackage rec {
cargoSha256 = "1bvj2zg19ak4vi47vjkqlybz011kn5zq1j7zznr76zrryacw4lz1";
nativeBuildInputs = [ cmake pkgconfig ];
- buildInputs = [ openssl python3 xorg.libxcb libgit2 ];
+ buildInputs = [ openssl python3 xorg.libxcb libgit2 ] ++ stdenv.lib.optionals stdenv.isDarwin
+ (with darwin.apple_sdk.frameworks; [ curl Security AppKit ]);
# Tests need to write to the theme directory in HOME.
preCheck = "export HOME=`mktemp -d`";
diff --git a/pkgs/applications/editors/android-studio/common.nix b/pkgs/applications/editors/android-studio/common.nix
index 50a752b3eb96..93c9b4c04fb5 100644
--- a/pkgs/applications/editors/android-studio/common.nix
+++ b/pkgs/applications/editors/android-studio/common.nix
@@ -1,8 +1,11 @@
{ channel, pname, version, build, sha256Hash }:
-{ bash
+{ alsaLib
+, bash
, buildFHSUserEnv
, coreutils
+, dbus
+, expat
, fetchurl
, findutils
, file
@@ -19,16 +22,24 @@
, libpulseaudio
, libGL
, libX11
+, libxcb
+, libXcomposite
+, libXcursor
+, libXdamage
, libXext
+, libXfixes
, libXi
, libXrandr
, libXrender
, libXtst
, makeWrapper
+, nspr
+, nss
, pciutils
, pkgsi686Linux
, setxkbmap
, stdenv
+, systemd
, unzip
, which
, runCommand
@@ -40,7 +51,7 @@
let
drvName = "android-studio-${channel}-${version}";
androidStudio = stdenv.mkDerivation {
- name = drvName;
+ name = "${drvName}-unwrapped";
src = fetchurl {
url = "https://dl.google.com/dl/android/studio/ide-zips/${version}/android-studio-ide-${build}-linux.tar.gz";
@@ -99,9 +110,20 @@ let
libXrandr
# For Android emulator
+ alsaLib
+ dbus
+ expat
libpulseaudio
libX11
+ libxcb
+ libXcomposite
+ libXcursor
+ libXdamage
+ libXfixes
libGL
+ nspr
+ nss
+ systemd
# For GTKLookAndFeel
gtk2
@@ -133,7 +155,7 @@ let
multiPkgs = pkgs: [ pkgs.ncurses5 ];
};
in runCommand
- "${drvName}-wrapper"
+ drvName
{
startScript = ''
#!${bash}/bin/bash
diff --git a/pkgs/applications/editors/android-studio/default.nix b/pkgs/applications/editors/android-studio/default.nix
index 63c6d26df8e3..b47f444709bd 100644
--- a/pkgs/applications/editors/android-studio/default.nix
+++ b/pkgs/applications/editors/android-studio/default.nix
@@ -8,21 +8,17 @@ let
inherit (gnome2) GConf gnome_vfs;
};
stableVersion = {
- version = "3.4.2.0"; # "Android Studio 3.4.2"
- build = "183.5692245";
- sha256Hash = "090rc307mfm0yw4h592l9307lq4aas8zq0ci49csn6kxhds8rsrm";
- };
- betaVersion = {
- version = "3.5.0.18"; # "Android Studio 3.5 RC 1"
- build = "191.5717577";
- sha256Hash = "1p0w7xrfk33m1wvwnc3s3s7w9rm8wn9b3bjn566w2qpjv5ngdkn3";
+ version = "3.5.1.0"; # "Android Studio 3.5.1"
+ build = "191.5900203";
+ sha256Hash = "0afxlif8pkrl6m1lhiqri1qv4vf5mfm1yg6qk5rad0442hm3kz4l";
};
+ betaVersion = latestVersion;
latestVersion = { # canary & dev
- version = "3.6.0.3"; # "Android Studio 3.6 Canary 3"
- build = "191.5618338";
- sha256Hash = "0ryf61svn6ra8gh1rvfjqj3j282zmgcvkjvgfvql1wgkjlz21519";
+ version = "3.6.0.13"; # "Android Studio 3.6 Beta 1"
+ build = "192.5916306";
+ sha256Hash = "0kvz3mgpfb3wqr1pw9847d5syswlzls3b4nilzgk6w127k2zmkfy";
};
-in rec {
+in {
# Attributes are named by their corresponding release channels
stable = mkStudio (stableVersion // {
diff --git a/pkgs/applications/editors/aseprite/default.nix b/pkgs/applications/editors/aseprite/default.nix
index 7af3742349a6..170fde7b9caf 100644
--- a/pkgs/applications/editors/aseprite/default.nix
+++ b/pkgs/applications/editors/aseprite/default.nix
@@ -1,17 +1,17 @@
-{ stdenv, lib, fetchFromGitHub, fetchpatch, cmake, pkgconfig
-, curl, freetype, giflib, harfbuzz, libjpeg, libpng, libwebp, pixman, tinyxml, zlib
-, libX11, libXext, libXcursor, libXxf86vm
+{ stdenv, lib, callPackage, fetchFromGitHub, fetchpatch, cmake, ninja, pkgconfig
+, curl, freetype, giflib, libjpeg, libpng, libwebp, pixman, tinyxml, zlib
+, harfbuzzFull, glib, fontconfig, pcre
+, libX11, libXext, libXcursor, libXxf86vm, libGL
, unfree ? false
, cmark
}:
-# Unfree version is not redistributable:
-# https://dev.aseprite.org/2016/09/01/new-source-code-license/
-# Consider supporting the developer: https://aseprite.org/#buy
-
+let
+ skia = callPackage ./skia.nix {};
+in
stdenv.mkDerivation rec {
- name = "aseprite-${version}";
- version = if unfree then "1.2.9" else "1.1.7";
+ pname = "aseprite";
+ version = if unfree then "1.2.11" else "1.1.7";
src = fetchFromGitHub {
owner = "aseprite";
@@ -19,21 +19,27 @@ stdenv.mkDerivation rec {
rev = "v${version}";
fetchSubmodules = true;
sha256 = if unfree
- then "0a9xk163j0984n8nn6pqf27n83gr6w7g25wkiv591zx88pa6cpbd"
+ then "1illr51jpg5g6nx29rav9dllyy5lzyyn7lj2fhrnpz1ysqgaq5p8"
else "0gd49lns2bpzbkwax5jf9x1xmg1j8ij997kcxr2596cwiswnw4di";
};
- nativeBuildInputs = [ cmake pkgconfig ];
+ nativeBuildInputs = [
+ cmake pkgconfig
+ ] ++ lib.optionals unfree [ ninja ];
buildInputs = [
- curl freetype giflib harfbuzz libjpeg libpng libwebp pixman tinyxml zlib
+ curl freetype giflib libjpeg libpng libwebp pixman tinyxml zlib
libX11 libXext libXcursor libXxf86vm
- ] ++ lib.optionals unfree [ cmark harfbuzz ];
+ ] ++ lib.optionals unfree [
+ cmark
+ harfbuzzFull glib fontconfig pcre
+ skia libGL
+ ];
patches = lib.optionals unfree [
(fetchpatch {
- url = "https://github.com/aseprite/aseprite/commit/cfb4dac6feef1f39e161c23c886055a8f9acfd0d.patch";
- sha256 = "1qhjfpngg8b1vvb9w26lhjjfamfx57ih0p31km3r5l96nm85l7f9";
+ url = "https://github.com/lfont/aseprite/commit/f1ebc47012d3fed52306ed5922787b4b98cc0a7b.patch";
+ sha256 = "03xg7x6b9iv7z18vzlqxhcfphmx4v3qhs9f5rgf38ppyklca5jyw";
})
(fetchpatch {
url = "https://github.com/orivej/aseprite/commit/ea87e65b357ad0bd65467af5529183b5a48a8c17.patch";
@@ -67,6 +73,9 @@ stdenv.mkDerivation rec {
"-DENABLE_CAT=OFF"
"-DENABLE_CPIO=OFF"
"-DENABLE_TAR=OFF"
+ # UI backend.
+ "-DLAF_OS_BACKEND=skia"
+ "-DSKIA_DIR=${skia}"
];
postInstall = ''
@@ -87,6 +96,24 @@ stdenv.mkDerivation rec {
homepage = https://www.aseprite.org/;
description = "Animated sprite editor & pixel art tool";
license = if unfree then licenses.unfree else licenses.gpl2;
+ longDescription =
+ ''Aseprite is a program to create animated sprites. Its main features are:
+
+ - Sprites are composed by layers & frames (as separated concepts).
+ - Supported color modes: RGBA, Indexed (palettes up to 256 colors), and Grayscale.
+ - Load/save sequence of PNG files and GIF animations (and FLC, FLI, JPG, BMP, PCX, TGA).
+ - Export/import animations to/from Sprite Sheets.
+ - Tiled drawing mode, useful to draw patterns and textures.
+ - Undo/Redo for every operation.
+ - Real-time animation preview.
+ - Multiple editors support.
+ - Pixel-art specific tools like filled Contour, Polygon, Shading mode, etc.
+ - Onion skinning.
+ '' + lib.optionalString unfree
+ ''
+ This version is not redistributable: https://dev.aseprite.org/2016/09/01/new-source-code-license/
+ Consider supporting the developer: https://aseprite.org/#buy
+ '';
maintainers = with maintainers; [ orivej ];
platforms = platforms.linux;
};
diff --git a/pkgs/applications/editors/aseprite/skia-deps.nix b/pkgs/applications/editors/aseprite/skia-deps.nix
new file mode 100644
index 000000000000..e5655ca8315d
--- /dev/null
+++ b/pkgs/applications/editors/aseprite/skia-deps.nix
@@ -0,0 +1,23 @@
+{ fetchgit }:
+{
+ angle2 = fetchgit {
+ url = "https://chromium.googlesource.com/angle/angle.git";
+ rev = "956ab4d9fab36be9929e63829475d4d69b2c681c";
+ sha256 = "0fcw04wwkn3ixr9l9k0d32n78r9g72p31ii9i5spsq2d0wlylr38";
+ };
+ dng_sdk = fetchgit {
+ url = "https://android.googlesource.com/platform/external/dng_sdk.git";
+ rev = "96443b262250c390b0caefbf3eed8463ba35ecae";
+ sha256 = "1rsr7njhj7c5p87hfznj069fdc3qqhvvnq9sa2rb8c4q849rlzx6";
+ };
+ piex = fetchgit {
+ url = "https://android.googlesource.com/platform/external/piex.git";
+ rev = "bb217acdca1cc0c16b704669dd6f91a1b509c406";
+ sha256 = "05ipmag6k55jmidbyvg5mkqm69zfw03gfkqhi9jnjlmlbg31y412";
+ };
+ sfntly = fetchgit {
+ url = "https://chromium.googlesource.com/external/github.com/googlei18n/sfntly.git";
+ rev = "b18b09b6114b9b7fe6fc2f96d8b15e8a72f66916";
+ sha256 = "0zf1h0dibmm38ldypccg4faacvskmd42vsk6zbxlfcfwjlqm6pp4";
+ };
+}
diff --git a/pkgs/applications/editors/aseprite/skia-make-deps.sh b/pkgs/applications/editors/aseprite/skia-make-deps.sh
new file mode 100755
index 000000000000..5e12c4f5c858
--- /dev/null
+++ b/pkgs/applications/editors/aseprite/skia-make-deps.sh
@@ -0,0 +1,37 @@
+#!/usr/bin/env bash
+
+FILTER=$1
+OUT=skia-deps.nix
+REVISION=89e4ca4352d05adc892f5983b108433f29b2c0c2
+DEPS=$(curl -s https://raw.githubusercontent.com/aseprite/skia/$REVISION/DEPS)
+THIRD_PARTY_DEPS=$(echo "$DEPS" | grep third_party | grep "#" -v | sed 's/"//g')
+
+function write_fetch_defs ()
+{
+ while read -r DEP; do
+ NAME=$(echo "$DEP" | cut -d: -f1 | cut -d/ -f3 | sed 's/ //g')
+ URL=$(echo "$DEP" | cut -d: -f2- | cut -d@ -f1 | sed 's/ //g')
+ REV=$(echo "$DEP" | cut -d: -f2- | cut -d@ -f2 | sed 's/[ ,]//g')
+
+ echo "Fetching $NAME@$REV"
+ PREFETCH=$(nix-prefetch-git --rev "$REV" "$URL")
+
+(
+cat <> "$OUT"
+
+ echo "----------"
+ echo
+ done <<< "$1"
+}
+
+echo "{ fetchgit }:" > "$OUT"
+echo "{" >> "$OUT"
+write_fetch_defs "$(echo "$THIRD_PARTY_DEPS" | grep -E "$FILTER")"
+echo "}" >> "$OUT"
diff --git a/pkgs/applications/editors/aseprite/skia.nix b/pkgs/applications/editors/aseprite/skia.nix
new file mode 100644
index 000000000000..8bf2adf484e2
--- /dev/null
+++ b/pkgs/applications/editors/aseprite/skia.nix
@@ -0,0 +1,68 @@
+{ stdenv, lib, fetchFromGitHub, fetchgit, python2, gn, ninja
+, fontconfig, expat, icu58, libjpeg, libpng, libwebp, zlib
+, mesa, libX11
+}:
+
+let
+ # skia-deps.nix is generated by: ./skia-make-deps.sh 'angle2|dng_sdk|piex|sfntly'
+ depSrcs = import ./skia-deps.nix { inherit fetchgit; };
+in
+stdenv.mkDerivation {
+ name = "skia-aseprite-m71";
+
+ src = fetchFromGitHub {
+ owner = "aseprite";
+ repo = "skia";
+ # latest commit from aseprite-m71 branch
+ rev = "89e4ca4352d05adc892f5983b108433f29b2c0c2";
+ sha256 = "0n3vrkswvi6rib9zv2pzi18h3j5wm7flmgkgaikcm6q7iw4l2c7x";
+ };
+
+ nativeBuildInputs = [ python2 gn ninja ];
+
+ buildInputs = [
+ fontconfig expat icu58 libjpeg libpng libwebp zlib
+ mesa libX11
+ ];
+
+ preConfigure = with depSrcs; ''
+ mkdir -p third_party/externals
+ ln -s ${angle2} third_party/externals/angle2
+ ln -s ${dng_sdk} third_party/externals/dng_sdk
+ ln -s ${piex} third_party/externals/piex
+ ln -s ${sfntly} third_party/externals/sfntly
+ '';
+
+ configurePhase = ''
+ runHook preConfigure
+ gn gen out/Release --args="is_debug=false is_official_build=true"
+ runHook postConfigure
+ '';
+
+ buildPhase = ''
+ runHook preBuild
+ ninja -C out/Release skia
+ runHook postBuild
+ '';
+
+ installPhase = ''
+ mkdir -p $out
+
+ # Glob will match all subdirs.
+ shopt -s globstar
+
+ # All these paths are used in some way when building aseprite.
+ cp -r --parents -t $out/ \
+ include/codec \
+ include/config \
+ include/core \
+ include/effects \
+ include/gpu \
+ include/private \
+ include/utils \
+ out/Release/*.a \
+ src/gpu/**/*.h \
+ third_party/externals/angle2/include \
+ third_party/skcms/**/*.h
+ '';
+}
diff --git a/pkgs/applications/editors/bonzomatic/default.nix b/pkgs/applications/editors/bonzomatic/default.nix
index 9f1db1464482..a12ccd257f8a 100644
--- a/pkgs/applications/editors/bonzomatic/default.nix
+++ b/pkgs/applications/editors/bonzomatic/default.nix
@@ -1,7 +1,6 @@
{ stdenv, makeWrapper, fetchFromGitHub, cmake, alsaLib, mesa_glu, libXcursor, libXinerama, libXrandr, xorgserver }:
stdenv.mkDerivation rec {
- name = "${pname}-${version}";
pname = "bonzomatic";
version = "2018-03-29";
diff --git a/pkgs/applications/editors/brackets/default.nix b/pkgs/applications/editors/brackets/default.nix
index 17ae40521986..439b721632d0 100644
--- a/pkgs/applications/editors/brackets/default.nix
+++ b/pkgs/applications/editors/brackets/default.nix
@@ -8,13 +8,13 @@ let
];
in
stdenv.mkDerivation rec {
- name = "brackets-${version}";
+ pname = "brackets";
version = "1.9";
src = fetchurl {
url = "https://github.com/adobe/brackets/releases/download/release-${version}/Brackets.Release.${version}.64-bit.deb";
sha256 = "0c4l2rr0853xd21kw8hhxlmrx8mqwb7iqa2k24zvwyjp4nnwkgbp";
- name = "${name}.deb";
+ name = "${pname}-${version}.deb";
};
phases = [ "installPhase" "fixupPhase" ];
diff --git a/pkgs/applications/editors/bvi/default.nix b/pkgs/applications/editors/bvi/default.nix
index f5e14ff1e096..2e79b80d6105 100644
--- a/pkgs/applications/editors/bvi/default.nix
+++ b/pkgs/applications/editors/bvi/default.nix
@@ -1,12 +1,12 @@
{ stdenv, fetchurl, ncurses }:
stdenv.mkDerivation rec {
- name = "bvi-${version}";
- version = "1.4.0";
+ pname = "bvi";
+ version = "1.4.1";
src = fetchurl {
- url = "mirror://sourceforge/bvi/${name}.src.tar.gz";
- sha256 = "00pq9rv7s8inqxq2m3xshxi58691i3pxw9smibcrgh6768l3qnh1";
+ url = "mirror://sourceforge/bvi/${pname}-${version}.src.tar.gz";
+ sha256 = "0a0yl0dcyff31k3dr4dpgqmlwygp8iaslnr5gmb6814ylxf2ad9h";
};
buildInputs = [ ncurses ];
diff --git a/pkgs/applications/editors/bviplus/default.nix b/pkgs/applications/editors/bviplus/default.nix
index d08e006ec5b3..2c6b153370e4 100644
--- a/pkgs/applications/editors/bviplus/default.nix
+++ b/pkgs/applications/editors/bviplus/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchurl, ncurses }:
stdenv.mkDerivation rec {
- name = "bviplus-${version}";
+ pname = "bviplus";
version = "0.9.4";
src = fetchurl {
diff --git a/pkgs/applications/editors/deadpixi-sam/default.nix b/pkgs/applications/editors/deadpixi-sam/default.nix
index 4ab11064eae3..65ec43939127 100644
--- a/pkgs/applications/editors/deadpixi-sam/default.nix
+++ b/pkgs/applications/editors/deadpixi-sam/default.nix
@@ -2,7 +2,7 @@
stdenv.mkDerivation rec {
version = "2017-10-27";
- name = "deadpixi-sam-unstable-${version}";
+ pname = "deadpixi-sam-unstable";
src = fetchFromGitHub {
owner = "deadpixi";
diff --git a/pkgs/applications/editors/dhex/default.nix b/pkgs/applications/editors/dhex/default.nix
index f4581c4beceb..efb3a2f9ffab 100644
--- a/pkgs/applications/editors/dhex/default.nix
+++ b/pkgs/applications/editors/dhex/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchurl, ncurses }:
stdenv.mkDerivation rec {
- name = "dhex-${version}";
+ pname = "dhex";
version = "0.69";
src = fetchurl {
diff --git a/pkgs/applications/editors/dit/default.nix b/pkgs/applications/editors/dit/default.nix
index 12ca7a071406..2f83b0b8d992 100644
--- a/pkgs/applications/editors/dit/default.nix
+++ b/pkgs/applications/editors/dit/default.nix
@@ -1,11 +1,11 @@
{ lib, fetchurl, stdenv, libiconv, ncurses, lua }:
stdenv.mkDerivation rec {
- name = "dit-${version}";
+ pname = "dit";
version = "0.5";
src = fetchurl {
- url = "https://hisham.hm/dit/releases/${version}/${name}.tar.gz";
+ url = "https://hisham.hm/dit/releases/${version}/${pname}-${version}.tar.gz";
sha256 = "05vhr1gl3bb5fg49v84xhmjaqdjw6djampvylw10ydvbpnpvjvjc";
};
diff --git a/pkgs/applications/editors/eclipse/default.nix b/pkgs/applications/editors/eclipse/default.nix
index 972a9daded41..13db2d13567d 100644
--- a/pkgs/applications/editors/eclipse/default.nix
+++ b/pkgs/applications/editors/eclipse/default.nix
@@ -13,10 +13,10 @@ assert stdenv ? glibc;
let
platform_major = "4";
- platform_minor = "12";
+ platform_minor = "13";
year = "2019";
- month = "06";
- timestamp = "201906051800";
+ month = "09";
+ timestamp = "201909161045";
in rec {
@@ -34,7 +34,7 @@ in rec {
src =
fetchurl {
url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/${year}-${month}/R/eclipse-cpp-${year}-${month}-R-linux-gtk-x86_64.tar.gz";
- sha512 = "3mfljabrwbwq256vvsp9qjb96hzlbpwgnb3wz806pbyh0ibfq6s1hn8kh5aaa2da5821v0ykcxa12jagj7naqp4g91jqxp1wb1ygz2q";
+ sha512 = "0s9wvxd1bahlcdw7l6cyfi59p78j6gym3a3mn1z6dm6swxgyb2wjjl7hx8bkg0zs8x31bwllpdq22y2vcm6j57h40v53l3xkhy73m8v";
};
};
@@ -46,7 +46,7 @@ in rec {
src =
fetchurl {
url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/${year}-${month}/R/eclipse-modeling-${year}-${month}-R-linux-gtk-x86_64.tar.gz";
- sha512 = "18p6xz6rq4w6j39b2k9kjpz8s1nljfq44g2cmvxqjgjfkq8lk4ij73ssyv1raly4wkm7r22ixacswdjmyj942k5vpv9y11i91hp1scv";
+ sha512 = "09nc7ipv67h0gr7lkxsbxrgj9gn48348asn03ylcvflyrcxghqs8n11a75rwvdj98igdzpw922saicx5lqq5g2flfqiga97lwwhfiz5";
};
};
@@ -58,7 +58,7 @@ in rec {
src =
fetchurl {
url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops${platform_major}/R-${platform_major}.${platform_minor}-${timestamp}/eclipse-platform-${platform_major}.${platform_minor}-linux-gtk-x86_64.tar.gz";
- sha512 = "0qiyk95qhdqcfgg5hgc7pcpbpjy9jnx7l3vb7s4cgijdz2xz0n5psh11lpj3whk2amh4iwkyx7kn8fxdq7lm03rlgx67cbk7p8my16m";
+ sha512 = "2c40wwrc2ip32n0m5cs8ds0g7cs7018acw8gjkd23msa4pr9x9511c3dj6rbnn1hwzf9yjq6vnjmib5qarxd3vly76jwxhf867l1f7v";
};
};
@@ -88,7 +88,7 @@ in rec {
src =
fetchurl {
url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops${platform_major}/R-${platform_major}.${platform_minor}-${timestamp}/eclipse-SDK-${platform_major}.${platform_minor}-linux-gtk-x86_64.tar.gz";
- sha512 = "3bbc8d66ms7nhg6f8gb0bnzjqz26wixpipn4n9qf0azcplrv2j91z8hjw1fx39dx4pqnsf442bkgab4qqhkpks7qq54110l01q6gvy9";
+ sha512 = "2vm646d1crzzzysll3p5pjfljfjzxx4qd37dqcp6xjm91zg8iskli688h0lgla0rmbwz5kj509jp22m4rxkp3cbgd006dd0jr3icdls";
};
};
@@ -100,7 +100,7 @@ in rec {
src =
fetchurl {
url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/${year}-${month}/R/eclipse-java-${year}-${month}-R-linux-gtk-x86_64.tar.gz";
- sha512 = "20qs1aagh4drsycvar3x42zy422zl34yg1p3vhxbqfbf7v3z1d3cxs9ah61x4bdxx9bkfwchasqp1wr15nflch9g0i50bdki3cgng1d";
+ sha512 = "3zyxqd8iwrfgjjg91dfi4bda61rd2717hy53swmbygi48zaaam70swx997yp5qzxwjp3macdslfk6sqhq2qlcdwcdl6dmkry018jh7b";
};
};
diff --git a/pkgs/applications/editors/eclipse/plugins.nix b/pkgs/applications/editors/eclipse/plugins.nix
index cf7980582ff7..b2fdeafd37c3 100644
--- a/pkgs/applications/editors/eclipse/plugins.nix
+++ b/pkgs/applications/editors/eclipse/plugins.nix
@@ -254,12 +254,12 @@ rec {
cdt = buildEclipseUpdateSite rec {
name = "cdt-${version}";
- version = "9.8.1";
+ version = "9.9.0";
src = fetchzip {
stripRoot = false;
- url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/tools/cdt/releases/9.8/${name}/${name}.zip";
- sha256 = "0kxmwz75i8mv4wics9n0hspxhzl3glf5ry2v5mnl5j9gcf73b0nv";
+ url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/tools/cdt/releases/9.9/${name}/${name}.zip";
+ sha256 = "1vgx7ggilfwmx0bjrhk7mwlwg1c8lb141ilj3vzwxivlffihy054";
};
meta = with stdenv.lib; {
@@ -474,12 +474,12 @@ rec {
jdt = buildEclipseUpdateSite rec {
name = "jdt-${version}";
- version = "4.12";
+ version = "4.13";
src = fetchzip {
stripRoot = false;
- url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops4/R-4.12-201906051800/org.eclipse.jdt-4.12.zip;
- sha256 = "0qscvqg69z4554n1yhl0xg1xz8ln3qsbgfzi7cg3xnnwnxfqz9cb";
+ url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops4/R-4.13-201909161045/org.eclipse.jdt-4.13.zip;
+ sha256 = "0sfpxph0cszcx1cihzzjn60qid8sxgl2xyr9x46fld4ian5a7vbr";
};
meta = with stdenv.lib; {
diff --git a/pkgs/applications/editors/edbrowse/default.nix b/pkgs/applications/editors/edbrowse/default.nix
index 0b6e28434f56..0de514233f8e 100644
--- a/pkgs/applications/editors/edbrowse/default.nix
+++ b/pkgs/applications/editors/edbrowse/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, fetchpatch, duktape, curl, pcre, readline, openssl, perl, html-tidy }:
stdenv.mkDerivation rec {
- name = "edbrowse-${version}";
+ pname = "edbrowse";
version = "3.7.4";
buildInputs = [ curl pcre readline openssl duktape perl html-tidy ];
diff --git a/pkgs/applications/editors/edit/default.nix b/pkgs/applications/editors/edit/default.nix
index 17fa75fe6343..27c13c0cb396 100644
--- a/pkgs/applications/editors/edit/default.nix
+++ b/pkgs/applications/editors/edit/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchgit, unzip, pkgconfig, ncurses, libX11, libXft, cwebbin }:
-stdenv.mkDerivation rec {
- name = "edit-nightly-${version}";
+stdenv.mkDerivation {
+ pname = "edit-nightly";
version = "20160425";
src = fetchgit {
diff --git a/pkgs/applications/editors/elvis/default.nix b/pkgs/applications/editors/elvis/default.nix
index 078b8a03b5d9..4b7e4c8a3ca4 100644
--- a/pkgs/applications/editors/elvis/default.nix
+++ b/pkgs/applications/editors/elvis/default.nix
@@ -1,6 +1,6 @@
{ fetchurl, fetchpatch, stdenv, ncurses }:
-stdenv.mkDerivation rec {
+stdenv.mkDerivation {
name = "elvis-2.2_0";
src = fetchurl {
diff --git a/pkgs/applications/editors/emacs-modes/auto-complete/default.nix b/pkgs/applications/editors/emacs-modes/auto-complete/default.nix
deleted file mode 100644
index 40f172316efc..000000000000
--- a/pkgs/applications/editors/emacs-modes/auto-complete/default.nix
+++ /dev/null
@@ -1,30 +0,0 @@
-{ stdenv, fetchurl, emacs }:
-
-stdenv.mkDerivation rec {
- name = "auto-complete-1.3.1";
-
- src = fetchurl {
- url = "http://cx4a.org/pub/auto-complete/${name}.tar.bz2";
- sha256 = "124qxfp0pcphwlmrasbfrci48brxnrzc38h4wcf2sn20x1mvcrlj";
- };
-
- buildInputs = [ emacs ];
-
- preInstall = ''
- install -d $out/share/emacs/site-lisp
- '';
-
- installFlags = "DIR=$(out)/share/emacs/site-lisp";
-
- postInstall = ''
- ln -s javascript-mode $out/share/emacs/site-lisp/ac-dict/js2-mode
- '';
-
- meta = {
- description = "Auto-complete extension for Emacs";
- homepage = http://cx4a.org/software/auto-complete/;
- license = stdenv.lib.licenses.gpl3Plus;
-
- platforms = stdenv.lib.platforms.all;
- };
-}
diff --git a/pkgs/applications/editors/emacs-modes/bbdb/3.nix b/pkgs/applications/editors/emacs-modes/bbdb/3.nix
deleted file mode 100644
index d20ab53bf7e1..000000000000
--- a/pkgs/applications/editors/emacs-modes/bbdb/3.nix
+++ /dev/null
@@ -1,25 +0,0 @@
-{ stdenv, fetchurl, emacs }:
-
-stdenv.mkDerivation rec {
- name = "bbdb-3.1.2";
-
- src = fetchurl {
- url = "https://download.savannah.gnu.org/releases/bbdb/${name}.tar.gz";
- sha256 = "1gs16bbpiiy01w9pyg12868r57kx1v3hnw04gmqsmpc40l1hyy05";
- };
-
- buildInputs = [ emacs ];
-
- # Hack to disable documentation as there is no way to tell bbdb to
- # NOT build pdfs. I really don't want to pull in TexLive here...
- preConfigure = ''
- substituteInPlace ./Makefile.in \
- --replace "SUBDIRS = lisp doc tex" "SUBDIRS = lisp"
- '';
-
- meta = {
- homepage = https://savannah.nongnu.org/projects/bbdb/;
- description = "The Insidious Big Brother Database (BBDB), a contact management utility for Emacs, version 3";
- license = "GPL";
- };
-}
diff --git a/pkgs/applications/editors/emacs-modes/bbdb/default.nix b/pkgs/applications/editors/emacs-modes/bbdb/default.nix
deleted file mode 100644
index 689bcfc9adfd..000000000000
--- a/pkgs/applications/editors/emacs-modes/bbdb/default.nix
+++ /dev/null
@@ -1,35 +0,0 @@
-{stdenv, fetchurl, emacs, texinfo, ctags}:
-
-stdenv.mkDerivation rec {
- name = "bbdb-2.36";
-
- src = fetchurl {
- # not using mirror:// because it produces a different file
- url = "http://bbdb.sourceforge.net/${name}.tar.gz";
- sha256 = "1rmw94l71ahfbynyy0bijfy488q9bl5ksl4zpvg7j9dbmgbh296r";
- };
-
- patches = [ ./install-infodir.patch ];
-
- buildInputs = [emacs texinfo ctags];
- configureFlags = [ "--with-package-dir=$$out/share/emacs/site-lisp" ];
- preInstall = "mkdir -p $out/info";
- installTargets = "install-pkg texinfo";
- postInstall = ''
- mv $out/info $out/share/
- mv "$out/share/emacs/site-lisp/lisp/bbdb/"* $out/share/emacs/site-lisp/
- mv $out/share/emacs/site-lisp/etc/bbdb $out/share/
- rm -rf $out/share/emacs/site-lisp/{lisp,etc}
- mv bits $out/share/bbdb/
- # Make optional modules from bbdb available for import, but symlink
- # them into the site-lisp directory to make it obvious that they are
- # not a genuine part of the distribution.
- ln -s "$out/share/bbdb/bits/"*.el $out/share/emacs/site-lisp/
- '';
-
- meta = {
- homepage = http://bbdb.sourceforge.net/;
- description = "The Insidious Big Brother Database (BBDB), a contact management utility for Emacs";
- license = "GPL";
- };
-}
diff --git a/pkgs/applications/editors/emacs-modes/bbdb/install-infodir.patch b/pkgs/applications/editors/emacs-modes/bbdb/install-infodir.patch
deleted file mode 100644
index 31ae6b266980..000000000000
--- a/pkgs/applications/editors/emacs-modes/bbdb/install-infodir.patch
+++ /dev/null
@@ -1,28 +0,0 @@
---- bbdb-2.35/texinfo/Makefile.in 2001-11-20 09:00:12.000000000 +0100
-+++ bbdb-2.35/texinfo/Makefile.in 2008-02-20 12:07:36.000000000 +0100
-@@ -27,22 +27,22 @@ all: info bbdb.dvi
- install-pkg: uninstall-pkg info
- @if test "x$(SYMLINKS)" = "xno" ; then \
- for i in `ls bbdb.info* ` ; do \
-- $(INSTALL_DATA) $$i $(PACKAGEDIR)/info/ ; \
-+ $(INSTALL_DATA) $$i $(infodir)/ ; \
- done ; \
- else \
- if test "x$(LINKPATH)" = "x" ; then \
- for i in `ls bbdb.info* ` ; do \
-- $(LN_S) `pwd`/$$i $(PACKAGEDIR)/info/$$i ; \
-+ $(LN_S) `pwd`/$$i $(infodir)/$$i ; \
- done ; \
- else \
- for i in `ls bbdb.info* ` ; do \
-- $(LN_S) $(LINKPATH)/texinfo/$$i $(PACKAGEDIR)/info/$$i ; \
-+ $(LN_S) $(LINKPATH)/texinfo/$$i $(infodir)/$$i ; \
- done ; \
- fi ; \
- fi
-
- uninstall-pkg:
-- -$(RM) $(PACKAGEDIR)/info/bbdb.info*
-+ -$(RM) $(infodir)/bbdb.info*
-
- info: bbdb.info
diff --git a/pkgs/applications/editors/emacs-modes/calfw/default.nix b/pkgs/applications/editors/emacs-modes/calfw/default.nix
deleted file mode 100644
index b8c61bb97af6..000000000000
--- a/pkgs/applications/editors/emacs-modes/calfw/default.nix
+++ /dev/null
@@ -1,34 +0,0 @@
-{ fetchgit, stdenv, emacs }:
-
-# TODO: byte-compile in build phase - a buildEmacsPackage that does
-# that would be nice
-
-stdenv.mkDerivation rec {
- name = "calfw-1.3-5-ga9b6615";
-
- src = fetchgit {
- url = "git://github.com/kiwanami/emacs-calfw.git";
- rev = "a9b6615b6666bbebe78257c557fd9a2e3a325d8d";
- sha256 = "524acc8fec7e64ebe0d370ddb1d96eee6a409d650b79011fa910c35225a7f393";
- };
-
- buildInputs = [ emacs ];
-
- installPhase =
- ''
- mkdir -p "$out/share/doc/${name}"
- cp -v readme.md "$out/share/doc/${name}"
-
- mkdir -p "$out/share/emacs/site-lisp/"
- cp *.el "$out/share/emacs/site-lisp/"
- '';
-
- meta = {
- description = "A calendar framework for Emacs";
-
- license = stdenv.lib.licenses.gpl3Plus;
-
- maintainers = with stdenv.lib.maintainers; [ ];
- platforms = stdenv.lib.platforms.unix;
- };
-}
diff --git a/pkgs/applications/editors/emacs-modes/cask/default.nix b/pkgs/applications/editors/emacs-modes/cask/default.nix
deleted file mode 100644
index 34120db6aa70..000000000000
--- a/pkgs/applications/editors/emacs-modes/cask/default.nix
+++ /dev/null
@@ -1,54 +0,0 @@
-{ stdenv, fetchFromGitHub, emacs, python }:
-
-stdenv.mkDerivation rec {
- version = "0.8.4";
- name = "cask-${version}";
-
- src = fetchFromGitHub {
- owner = "cask";
- repo = "cask";
- rev = "v${version}";
- sha256 = "1p37lq8xpyq0rc7phxgsw3b73h8vf9rkpa5959rb5k46w6ps9686";
- };
-
- buildInputs = [ emacs python ];
-
- # byte-compiling emacs files automatically triggers cask's bootstrap
- # mechanism, what we don't want.
- dontBuild = true;
-
- installPhase = ''
- install -d "$out/share/emacs/site-lisp"
- install cask*.el* "$out/share/emacs/site-lisp"
-
- install -d "$out/bin"
- install bin/cask "$out/bin"
-
- # We also need to install cask's templates in order for 'cask
- # init' to work properly.
- install -d "$out/templates"
- install templates/* "$out/templates"
-
- # In order to work with cask's hard coded file paths (during bootstrap),
- # we have to create these links.
- ln -s "$out/share/emacs/site-lisp/"* "$out"
-
- # This file disables cask's self-updating function.
- touch "$out/.no-upgrade"
- '';
-
- meta = with stdenv.lib; {
- description = "Project management tool for Emacs";
- longDescription =
- ''
- Cask is a project management tool for Emacs that helps automate the
- package development cycle; development, dependencies, testing,
- building, packaging and more. Cask can also be used to manage
- dependencies for your local Emacs configuration.
- '';
- homepage = https://github.com/cask/cask;
- license = licenses.gpl3Plus;
- platforms = platforms.all;
- maintainers = [ ];
- };
-}
diff --git a/pkgs/applications/editors/emacs-modes/cedet/default.nix b/pkgs/applications/editors/emacs-modes/cedet/default.nix
index e350dc08e71c..5fbe095c4f35 100644
--- a/pkgs/applications/editors/emacs-modes/cedet/default.nix
+++ b/pkgs/applications/editors/emacs-modes/cedet/default.nix
@@ -44,5 +44,8 @@ stdenv.mkDerivation rec {
license = stdenv.lib.licenses.gpl2Plus;
homepage = http://cedet.sourceforge.net/;
+
+ # Fails with `semantic-idle.el:42:1:Error: Invalid function: class-p`
+ broken = true;
};
}
diff --git a/pkgs/applications/editors/emacs-modes/cedille/default.nix b/pkgs/applications/editors/emacs-modes/cedille/default.nix
index 2d1cbb75981e..3af53cda492f 100644
--- a/pkgs/applications/editors/emacs-modes/cedille/default.nix
+++ b/pkgs/applications/editors/emacs-modes/cedille/default.nix
@@ -1,7 +1,7 @@
{ stdenv, cedille, emacs }:
-stdenv.mkDerivation rec {
- name = "cedille-mode-${version}";
+stdenv.mkDerivation {
+ pname = "cedille-mode";
version = cedille.version;
src = cedille.src;
diff --git a/pkgs/applications/editors/emacs-modes/coffee/default.nix b/pkgs/applications/editors/emacs-modes/coffee/default.nix
deleted file mode 100644
index 495b1aca4b53..000000000000
--- a/pkgs/applications/editors/emacs-modes/coffee/default.nix
+++ /dev/null
@@ -1,30 +0,0 @@
-{ stdenv, fetchgit, emacs }:
-
-stdenv.mkDerivation rec {
- name = "coffee-mode-0.4.1";
-
- src = fetchgit {
- url = "https://github.com/defunkt/coffee-mode.git";
- rev = "c45c5f7a529363bc7aa57db0f3df26389fd233d8";
- sha256 = "36a7792b5ffbcc5a580e8d5b2425494c60a8015cfde0e3f8a946a685da231ce2";
- };
-
- buildInputs = [ emacs ];
-
- buildPhase = ''
- emacs --batch -f batch-byte-compile coffee-mode.el
- '';
-
- installPhase = ''
- install -d $out/share/emacs/site-lisp
- install coffee-mode.el coffee-mode.elc $out/share/emacs/site-lisp
- '';
-
- meta = {
- description = "Emacs major mode for CoffeeScript, unfancy JavaScript";
- homepage = https://github.com/defunkt/coffee-mode;
- license = stdenv.lib.licenses.gpl2Plus;
-
- platforms = stdenv.lib.platforms.all;
- };
-}
diff --git a/pkgs/applications/editors/emacs-modes/color-theme-solarized/default.nix b/pkgs/applications/editors/emacs-modes/color-theme-solarized/default.nix
index 6b51f117ad85..3d34c7a462e3 100644
--- a/pkgs/applications/editors/emacs-modes/color-theme-solarized/default.nix
+++ b/pkgs/applications/editors/emacs-modes/color-theme-solarized/default.nix
@@ -2,7 +2,7 @@
let
commit = "412713a0fcedd520d208a7b783fea03d710bcc61";
in
-stdenv.mkDerivation rec {
+stdenv.mkDerivation {
name = "color-theme-solarized-1.0.0";
src = fetchzip {
@@ -30,5 +30,8 @@ stdenv.mkDerivation rec {
maintainers = [ maintainers.samuelrivas ];
license = licenses.mit;
platforms = platforms.all;
+
+ # Fails with `solarized-definitions.el:786:1:Warning: the function `rotatef' is not known to`
+ broken = true;
};
}
diff --git a/pkgs/applications/editors/emacs-modes/color-theme/default.nix b/pkgs/applications/editors/emacs-modes/color-theme/default.nix
deleted file mode 100644
index 407b9e58f0bf..000000000000
--- a/pkgs/applications/editors/emacs-modes/color-theme/default.nix
+++ /dev/null
@@ -1,26 +0,0 @@
-{stdenv, fetchurl, emacs}:
-
-stdenv.mkDerivation rec {
- name = "color-theme-6.6.0";
-
- src = fetchurl {
- url = "mirror://savannah/color-theme/${name}.tar.gz";
- sha256 = "0yx1ghcjc66s1rl0v3d4r1k88ifw591hf814ly3d73acvh15zlsn";
- };
-
- # patches from http://aur.archlinux.org/packages.php?ID=54883
- patches = [ ./fix-build.patch ./gnus-bug.diff ];
-
- buildInputs = [ emacs ];
-
- installFlags = [ "ELISPDIR=$(out)/share/emacs/site-lisp" ];
- installTargets = "install-bin";
-
- meta = {
- description = "Emacs-lisp mode for skinning your Emacs";
- homepage = https://www.nongnu.org/color-theme;
- license = stdenv.lib.licenses.gpl2Plus;
-
- platforms = stdenv.lib.platforms.all;
- };
-}
diff --git a/pkgs/applications/editors/emacs-modes/color-theme/fix-build.patch b/pkgs/applications/editors/emacs-modes/color-theme/fix-build.patch
deleted file mode 100644
index cfc237c8cdc1..000000000000
--- a/pkgs/applications/editors/emacs-modes/color-theme/fix-build.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- a/Makefile 2009-05-15 18:22:49.000000000 +0200
-+++ b/Makefile 2009-05-16 08:59:36.000000000 +0200
-@@ -15,6 +15,7 @@
- TARGET = $(patsubst %.el,%.elc,$(SPECIAL) $(SOURCE))
- MANUAL = color-theme
- MISC = AUTHORS COPYING ChangeLog Makefile.defs Makefile $(AUTOLOADFILE).in
-+LOADPATH = "$(shell pwd)" "$(shell pwd)/themes"
- #AUTHORS CREDITS HISTORY NEWS README Makefile ChangeLog \
- #ChangeLog.2005 ChangeLog.2004 ChangeLog.2003 ChangeLog.2002 \
- #ChangeLog.2001 servers.pl color-theme-auto.in color-theme.texi
-@@ -47,7 +48,7 @@
-
- %.elc: %.el
- @$(EMACS) $(OPTIONCOMPILE) \
-- --eval '(setq load-path (cons "." load-path))' \
-+ --eval '(setq load-path (append load-path (list $(LOADPATH))))' \
- -f batch-byte-compile $<
-
- %.info: %.texi
diff --git a/pkgs/applications/editors/emacs-modes/color-theme/gnus-bug.diff b/pkgs/applications/editors/emacs-modes/color-theme/gnus-bug.diff
deleted file mode 100644
index 9d227df562e1..000000000000
--- a/pkgs/applications/editors/emacs-modes/color-theme/gnus-bug.diff
+++ /dev/null
@@ -1,28 +0,0 @@
-diff -Naur color-theme-6.6.0.orig/color-theme.el color-theme-6.6.0.new/color-theme.el
---- color-theme-6.6.0.orig/color-theme.el 2011-11-18 01:17:29.000000000 +0100
-+++ color-theme-6.6.0.new/color-theme.el 2011-11-18 01:24:07.000000000 +0100
-@@ -73,9 +73,10 @@
- "Non-nil if running XEmacs.")
-
- ;; Add this since it appears to miss in emacs-2x
--(or (fboundp 'replace-in-string)
-- (defun replace-in-string (target old new)
-- (replace-regexp-in-string old new target)))
-+(if (fboundp 'replace-in-string)
-+ (defalias 'color-theme-replace-in-string 'replace-in-string)
-+ (defsubst color-theme-replace-in-string (target old new &optional literal)
-+ (replace-regexp-in-string old new target nil literal)))
-
- ;; face-attr-construct has a problem in Emacs 20.7 and older when
- ;; dealing with inverse-video faces. Here is a short test to check
-@@ -1626,8 +1627,8 @@
- (add-to-list 'color-themes
- (list ',n
- (upcase-initials
-- (replace-in-string
-- (replace-in-string
-+ (color-theme-replace-in-string
-+ (color-theme-replace-in-string
- (symbol-name ',n) "^color-theme-" "") "-" " "))
- ,author))
- (defun ,n ()
diff --git a/pkgs/applications/editors/emacs-modes/cryptol/default.nix b/pkgs/applications/editors/emacs-modes/cryptol/default.nix
deleted file mode 100644
index 5b408ad7999d..000000000000
--- a/pkgs/applications/editors/emacs-modes/cryptol/default.nix
+++ /dev/null
@@ -1,26 +0,0 @@
-{ stdenv, fetchurl, emacs }:
-
-stdenv.mkDerivation rec {
- name = "cryptol-mode-${version}";
- version = "0.1.0";
-
- src = fetchurl {
- url = "https://github.com/thoughtpolice/cryptol-mode/archive/v${version}.tar.gz";
- sha256 = "1qyrqvfgpg1nyk1clv7v94r3amm02613hrak5732xzn6iak81cc0";
- };
-
- buildInputs = [ emacs ];
-
- installPhase = ''
- install -d $out/share/emacs/site-lisp
- install *.el *.elc $out/share/emacs/site-lisp
- '';
-
- meta = {
- description = "Emacs major mode for Cryptol";
- homepage = "https://thoughtpolice/cryptol-mode";
- license = stdenv.lib.licenses.gpl3Plus;
- platforms = stdenv.lib.platforms.all;
- maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
- };
-}
diff --git a/pkgs/applications/editors/emacs-modes/cua/builder.sh b/pkgs/applications/editors/emacs-modes/cua/builder.sh
deleted file mode 100644
index 6f7bb428c1a6..000000000000
--- a/pkgs/applications/editors/emacs-modes/cua/builder.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-source $stdenv/setup
-
-mkdir -p $out/emacs/site-lisp
-cp $src $out/emacs/site-lisp/cua.el
diff --git a/pkgs/applications/editors/emacs-modes/cua/default.nix b/pkgs/applications/editors/emacs-modes/cua/default.nix
deleted file mode 100644
index 0305be28ad62..000000000000
--- a/pkgs/applications/editors/emacs-modes/cua/default.nix
+++ /dev/null
@@ -1,8 +0,0 @@
-{stdenv, fetchurl}: stdenv.mkDerivation {
- name = "cua-mode-2.10";
- builder = ./builder.sh;
- src = fetchurl {
- url = http://tarballs.nixos.org/cua-mode-2.10.el;
- sha256 = "01877xjbq0v9wrpcbnhvppdn9wxliwkkjg3dr6k795mjgslwhr1b";
- };
-}
diff --git a/pkgs/applications/editors/emacs-modes/d/default.nix b/pkgs/applications/editors/emacs-modes/d/default.nix
deleted file mode 100644
index 28736acded2f..000000000000
--- a/pkgs/applications/editors/emacs-modes/d/default.nix
+++ /dev/null
@@ -1,32 +0,0 @@
-{stdenv, fetchurl, emacs}:
-
-# Note: Don't have a version, using date as fallback.
-let version = "20150111";
-
-in stdenv.mkDerivation {
- name = "emacs-d-${version}";
-
- src = fetchurl {
- url = "https://github.com/Emacs-D-Mode-Maintainers/Emacs-D-Mode/archive/53efec4d83c7cee8227597f010fe7fc400ff05f1.tar.gz";
- sha256 = "0vb0za51lc6qf1qgqisap4vzk36caa5k17zajjn034rhjsqfw0w7";
- };
-
- buildInputs = [ emacs ];
-
- buildPhase = ''
- emacs -L . --batch -f batch-byte-compile *.el
- '';
-
- installPhase = ''
- install -d $out/share/emacs/site-lisp
- install *.el *.elc $out/share/emacs/site-lisp
- '';
-
- meta = {
- description = "Major mode for editing D code";
- homepage = https://github.com/Emacs-D-Mode-Maintainers/Emacs-D-Mode;
- license = stdenv.lib.licenses.gpl2;
- platforms = stdenv.lib.platforms.all;
- };
-
-}
diff --git a/pkgs/applications/editors/emacs-modes/darcsum/darcs_context b/pkgs/applications/editors/emacs-modes/darcsum/darcs_context
deleted file mode 100644
index 7e9de1ed80b5..000000000000
--- a/pkgs/applications/editors/emacs-modes/darcsum/darcs_context
+++ /dev/null
@@ -1,7 +0,0 @@
-
-Context:
-
-[TAG 1.3
-Simon Michael **20131103203640
- Ignore-this: d12bac373e4aa0e5ffe6c390e1dfe269
-]
diff --git a/pkgs/applications/editors/emacs-modes/darcsum/default.nix b/pkgs/applications/editors/emacs-modes/darcsum/default.nix
deleted file mode 100644
index 0a1c2c77b2a2..000000000000
--- a/pkgs/applications/editors/emacs-modes/darcsum/default.nix
+++ /dev/null
@@ -1,34 +0,0 @@
-# To automatically load darcsum when needed, add the following to your emacs init file:
-#
-# (autoload 'darcsum-changes "darcsum" nil t)
-# (autoload 'darcsum-whatsnew "darcsum" nil t)
-# (autoload 'darcsum-view "darcsum" nil t)
-#
-# (These lines were copied from 50darcsum.el in the darcsum repository.)
-
-
-{ fetchdarcs, stdenv }:
-
-stdenv.mkDerivation {
- name = "darcsum-1.3";
-
- src = fetchdarcs {
- url = http://hub.darcs.net/simon/darcsum;
- context = ./darcs_context;
- sha256 = "18dyk2apmnjapd604a5njfqwjri1mc7lgjaajy9phicpibgdrwzh";
- };
-
- phases = [ "unpackPhase" "installPhase" ];
-
- installPhase = ''
- install -d "$out/share/emacs/site-lisp"
- install darcsum.el "$out/share/emacs/site-lisp"
- '';
-
- meta = {
- description = "A pcl-cvs like interface for managing darcs patches";
- homepage = http://hub.darcs.net/simon/darcsum;
- license = stdenv.lib.licenses.gpl2Plus;
- maintainers = [ stdenv.lib.maintainers.falsifian ];
- };
-}
diff --git a/pkgs/applications/editors/emacs-modes/ecb/default.nix b/pkgs/applications/editors/emacs-modes/ecb/default.nix
deleted file mode 100644
index 807bb91f850c..000000000000
--- a/pkgs/applications/editors/emacs-modes/ecb/default.nix
+++ /dev/null
@@ -1,48 +0,0 @@
-{ fetchurl, stdenv, emacs, cedet, jdee, texinfo }:
-
-stdenv.mkDerivation rec {
- name = "ecb-2.40";
-
- src = fetchurl {
- url = "mirror://sourceforge/ecb/${name}.tar.gz";
- sha256 = "0gp56ixfgnyk2j1fps4mk1yv1vpz81kivb3gq9f56jw4kdlhjrjs";
- };
-
- buildInputs = [ emacs ];
- propagatedBuildInputs = [ cedet jdee ];
- propagatedUserEnvPkgs = propagatedBuildInputs;
-
- patchPhase = ''
- sed -i "Makefile" \
- -e 's|CEDET[[:blank:]]*=.*$|CEDET = ${cedet}/share/emacs/site-lisp|g ;
- s|INSTALLINFO[[:blank:]]*=.*$|INSTALLINFO = ${texinfo}/bin/install-info|g ;
- s|MAKEINFO[[:blank:]]*=.*$|MAKEINFO = ${texinfo}/bin/makeinfo|g ;
- s|common/cedet.el|cedet.el|g'
- '';
-
- installPhase = ''
- mkdir -p "$out/share/emacs/site-lisp"
- cp -rv *.el *.elc ecb-images "$out/share/emacs/site-lisp"
-
- mkdir -p "$out/share/info"
- cp -v info-help/*.info* "$out/share/info"
- '';
-
- meta = {
- description = "ECB, the Emacs Code browser";
-
- longDescription = ''
- ECB stands for "Emacs Code Browser". While Emacs already has
- good editing support for many modes, its browsing support is
- somewhat lacking. That's where ECB comes in: it displays a
- number of informational windows that allow for easy source code
- navigation and overview.
- '';
-
- license = stdenv.lib.licenses.gpl2Plus;
-
- homepage = http://ecb.sourceforge.net/;
-
- maintainers = [ ];
- };
-}
diff --git a/pkgs/applications/editors/emacs-modes/elpa-generated.nix b/pkgs/applications/editors/emacs-modes/elpa-generated.nix
index 7f0a318741fc..a8d9a38729f4 100644
--- a/pkgs/applications/editors/emacs-modes/elpa-generated.nix
+++ b/pkgs/applications/editors/emacs-modes/elpa-generated.nix
@@ -30,21 +30,21 @@
license = lib.licenses.free;
};
}) {};
- ada-mode = callPackage ({ cl-lib ? null
- , elpaBuild
+ ada-mode = callPackage ({ elpaBuild
, emacs
, fetchurl
, lib
+ , uniquify-files
, wisi }:
elpaBuild {
pname = "ada-mode";
ename = "ada-mode";
- version = "6.1.0";
+ version = "6.2.1";
src = fetchurl {
- url = "https://elpa.gnu.org/packages/ada-mode-6.1.0.tar";
- sha256 = "1qa4kjv5xxlj50fghg5516cxn8ckv8vlyarcab2isxjnnxnb6g7s";
+ url = "https://elpa.gnu.org/packages/ada-mode-6.2.1.tar";
+ sha256 = "0lg2y28qs8ls70d43ikhy5zcwadh5ddfw4k59p7sqb79w0y3lbnq";
};
- packageRequires = [ cl-lib emacs wisi ];
+ packageRequires = [ emacs uniquify-files wisi ];
meta = {
homepage = "https://elpa.gnu.org/packages/ada-mode.html";
license = lib.licenses.free;
@@ -84,10 +84,10 @@
elpaBuild {
pname = "adjust-parens";
ename = "adjust-parens";
- version = "3.0";
+ version = "3.1";
src = fetchurl {
- url = "https://elpa.gnu.org/packages/adjust-parens-3.0.tar";
- sha256 = "16gmrgdfyqs7i617669f7xy5mds1svbyfv12xhdjk96rbssfngzg";
+ url = "https://elpa.gnu.org/packages/adjust-parens-3.1.tar";
+ sha256 = "059v0njd52vxidr5xwv2jmknm2shnwpj3101069q6lsmz1wq242a";
};
packageRequires = [];
meta = {
@@ -178,10 +178,10 @@
elpaBuild {
pname = "arbitools";
ename = "arbitools";
- version = "0.976";
+ version = "0.977";
src = fetchurl {
- url = "https://elpa.gnu.org/packages/arbitools-0.976.el";
- sha256 = "08lvm921zhm22aghz17pps0b5g4f1xyyrl0qisdvd98kz1ajq7xr";
+ url = "https://elpa.gnu.org/packages/arbitools-0.977.el";
+ sha256 = "0nvdy14lqvy2ca4vw2qlr2kg2vv4y4sr8sa7kqrpf8cg7k9q3mbv";
};
packageRequires = [ cl-lib ];
meta = {
@@ -204,7 +204,7 @@
license = lib.licenses.free;
};
}) {};
- async = callPackage ({ elpaBuild, fetchurl, lib }:
+ async = callPackage ({ cl-lib ? null, elpaBuild, fetchurl, lib, nadvice }:
elpaBuild {
pname = "async";
ename = "async";
@@ -213,7 +213,7 @@
url = "https://elpa.gnu.org/packages/async-1.9.2.tar";
sha256 = "17fnvrj7jww29sav6a6jpizclg4w2962m6h37akpii71gf0vrffw";
};
- packageRequires = [];
+ packageRequires = [ cl-lib nadvice ];
meta = {
homepage = "https://elpa.gnu.org/packages/async.html";
license = lib.licenses.free;
@@ -621,21 +621,6 @@
license = lib.licenses.free;
};
}) {};
- counsel-ebdb = callPackage ({ ebdb, elpaBuild, fetchurl, ivy, lib }:
- elpaBuild {
- pname = "counsel-ebdb";
- ename = "counsel-ebdb";
- version = "1";
- src = fetchurl {
- url = "https://elpa.gnu.org/packages/counsel-ebdb-1.el";
- sha256 = "0p919gq871rxlrn6lpjbwws7h6i2gc9vgcxzj8bzgz8xk5hq9mis";
- };
- packageRequires = [ ebdb ivy ];
- meta = {
- homepage = "https://elpa.gnu.org/packages/counsel-ebdb.html";
- license = lib.licenses.free;
- };
- }) {};
crisp = callPackage ({ elpaBuild, fetchurl, lib }:
elpaBuild {
pname = "crisp";
@@ -651,16 +636,16 @@
license = lib.licenses.free;
};
}) {};
- csv-mode = callPackage ({ elpaBuild, fetchurl, lib }:
+ csv-mode = callPackage ({ cl-lib ? null, elpaBuild, emacs, fetchurl, lib }:
elpaBuild {
pname = "csv-mode";
ename = "csv-mode";
- version = "1.7";
+ version = "1.9";
src = fetchurl {
- url = "https://elpa.gnu.org/packages/csv-mode-1.7.el";
- sha256 = "0r4bip0w3h55i8h6sxh06czf294mrhavybz0zypzrjw91m1bi7z6";
+ url = "https://elpa.gnu.org/packages/csv-mode-1.9.el";
+ sha256 = "0sdnyi9in904k49yy5imapypnmk75lv14k9c1yyjhjpalvvh6br1";
};
- packageRequires = [];
+ packageRequires = [ cl-lib emacs ];
meta = {
homepage = "https://elpa.gnu.org/packages/csv-mode.html";
license = lib.licenses.free;
@@ -735,10 +720,10 @@
elpaBuild {
pname = "debbugs";
ename = "debbugs";
- version = "0.18";
+ version = "0.20";
src = fetchurl {
- url = "https://elpa.gnu.org/packages/debbugs-0.18.tar";
- sha256 = "00kich80zdg7v3v613f9prqddkpwpm1nf9sj10f0n6wh15rzwv07";
+ url = "https://elpa.gnu.org/packages/debbugs-0.20.tar";
+ sha256 = "03mmb1zvbqlsznl5agq8k3xrlcz310vnsa2zn0y8myanm4ra51zm";
};
packageRequires = [ cl-lib emacs soap-client ];
meta = {
@@ -746,7 +731,7 @@
license = lib.licenses.free;
};
}) {};
- delight = callPackage ({ elpaBuild, fetchurl, lib }:
+ delight = callPackage ({ cl-lib ? null, elpaBuild, fetchurl, lib, nadvice }:
elpaBuild {
pname = "delight";
ename = "delight";
@@ -755,7 +740,7 @@
url = "https://elpa.gnu.org/packages/delight-1.5.el";
sha256 = "0kzlvzwmn6zj0874086q2xw0pclyi7wlkq48zh2lkd2796xm8vw7";
};
- packageRequires = [];
+ packageRequires = [ cl-lib nadvice ];
meta = {
homepage = "https://elpa.gnu.org/packages/delight.html";
license = lib.licenses.free;
@@ -780,10 +765,10 @@
elpaBuild {
pname = "diff-hl";
ename = "diff-hl";
- version = "1.8.6";
+ version = "1.8.7";
src = fetchurl {
- url = "https://elpa.gnu.org/packages/diff-hl-1.8.6.tar";
- sha256 = "02hvi5jxv2anf62lw878bdz6xk7xjhjd5q85pqihmadbpj6i6pfq";
+ url = "https://elpa.gnu.org/packages/diff-hl-1.8.7.tar";
+ sha256 = "1qcwicflvm6dxcflnlg891hyzwp2q79fdkdbdwp1440a0j09riam";
};
packageRequires = [ cl-lib emacs ];
meta = {
@@ -870,10 +855,10 @@
elpaBuild {
pname = "djvu";
ename = "djvu";
- version = "1.0.1";
+ version = "1.1";
src = fetchurl {
- url = "https://elpa.gnu.org/packages/djvu-1.0.1.el";
- sha256 = "1am4cm9csc5df3mbdby7j197j8yxv0x0maf6kfmn2ww1iwcyv8x6";
+ url = "https://elpa.gnu.org/packages/djvu-1.1.el";
+ sha256 = "0njgyx09q225hliacsnjk8wallg5i6xkz6bj501pb05nwqfbvfk7";
};
packageRequires = [];
meta = {
@@ -930,10 +915,10 @@
elpaBuild {
pname = "ebdb";
ename = "ebdb";
- version = "0.6.8";
+ version = "0.6.11";
src = fetchurl {
- url = "https://elpa.gnu.org/packages/ebdb-0.6.8.tar";
- sha256 = "0bcs4f2l6cdg6hx3crk0vchhljhgwd1ik8n0p001gs1mk91178jp";
+ url = "https://elpa.gnu.org/packages/ebdb-0.6.11.tar";
+ sha256 = "1ljcp4vy8z5xbcrlf33xgi63a2px4fhx6928qhwr7sy7jwil2s6n";
};
packageRequires = [ cl-lib emacs seq ];
meta = {
@@ -960,10 +945,10 @@
elpaBuild {
pname = "ebdb-i18n-chn";
ename = "ebdb-i18n-chn";
- version = "1.2";
+ version = "1.3";
src = fetchurl {
- url = "https://elpa.gnu.org/packages/ebdb-i18n-chn-1.2.el";
- sha256 = "1qgrlk625mhfd6n1mc0kqfzbisnb61kx3vrrl3bzlz4viq3kcc10";
+ url = "https://elpa.gnu.org/packages/ebdb-i18n-chn-1.3.el";
+ sha256 = "1w7xgagscyjxrw4xl8bz6wf7skvdvk5qdcp5p7kxl4r9nhjffj20";
};
packageRequires = [ ebdb pyim ];
meta = {
@@ -990,10 +975,10 @@
elpaBuild {
pname = "eev";
ename = "eev";
- version = "20190425";
+ version = "20190902";
src = fetchurl {
- url = "https://elpa.gnu.org/packages/eev-20190425.tar";
- sha256 = "0wffwdkk68hcnkggrfmx0ag3pmapdzwzq54sx8y0m68aw0by90y1";
+ url = "https://elpa.gnu.org/packages/eev-20190902.tar";
+ sha256 = "09rk01ykvvmmzadkz8y064iil2sm6ql6qz0rj0jjlnyymi58lj69";
};
packageRequires = [ emacs ];
meta = {
@@ -1030,10 +1015,10 @@
elpaBuild {
pname = "el-search";
ename = "el-search";
- version = "1.12.5";
+ version = "1.12.6.1";
src = fetchurl {
- url = "https://elpa.gnu.org/packages/el-search-1.12.5.tar";
- sha256 = "0q6fnjp2hh8p1l7wj7645szlz6qxdfy71s0xljjrmc2836i32xzc";
+ url = "https://elpa.gnu.org/packages/el-search-1.12.6.1.tar";
+ sha256 = "150f4rirg107hmzpv8ifa32k2mgf07smbf9z44ln5rh8n17xwqah";
};
packageRequires = [ cl-print emacs stream ];
meta = {
@@ -1132,10 +1117,10 @@
elpaBuild {
pname = "excorporate";
ename = "excorporate";
- version = "0.8.1";
+ version = "0.8.3";
src = fetchurl {
- url = "https://elpa.gnu.org/packages/excorporate-0.8.1.tar";
- sha256 = "1k89472x80wsn14y16km5bgynmmd2kbdfhylb3cc17jvdn1xr53y";
+ url = "https://elpa.gnu.org/packages/excorporate-0.8.3.tar";
+ sha256 = "04bsbiwgfbfd501qvwh0iwyk0xh442kjfj73b3876idwj3p8alr5";
};
packageRequires = [ emacs fsm nadvice soap-client url-http-ntlm ];
meta = {
@@ -1147,10 +1132,10 @@
elpaBuild {
pname = "exwm";
ename = "exwm";
- version = "0.22.1";
+ version = "0.23";
src = fetchurl {
- url = "https://elpa.gnu.org/packages/exwm-0.22.1.tar";
- sha256 = "1ggb8vgxxml8c5bvamv9jgz80gs6h9xirjgphq8gwkywwd5xyiq4";
+ url = "https://elpa.gnu.org/packages/exwm-0.23.tar";
+ sha256 = "05w1v3wrp1lzz20zd9lcvr5nhk809kgy6svvkbs15xhnr6x55ad5";
};
packageRequires = [ xelb ];
meta = {
@@ -1207,10 +1192,10 @@
elpaBuild {
pname = "flymake";
ename = "flymake";
- version = "1.0.6";
+ version = "1.0.8";
src = fetchurl {
- url = "https://elpa.gnu.org/packages/flymake-1.0.6.el";
- sha256 = "10n9vnabiz3m5gs3azc76x7y1p9qhc6aspgygw7awq9ff6hhkhbw";
+ url = "https://elpa.gnu.org/packages/flymake-1.0.8.el";
+ sha256 = "1hqxrqb227v4ncjjqx8im3c4mhg8w5yjbz9hpfcm5x8xnr2yd6bp";
};
packageRequires = [ emacs ];
meta = {
@@ -1222,10 +1207,10 @@
elpaBuild {
pname = "fountain-mode";
ename = "fountain-mode";
- version = "2.7.1";
+ version = "2.7.3";
src = fetchurl {
- url = "https://elpa.gnu.org/packages/fountain-mode-2.7.1.el";
- sha256 = "198ls0rvzgpb942mvjyljgbaxp05wjys1a003bfq528przv0vpaz";
+ url = "https://elpa.gnu.org/packages/fountain-mode-2.7.3.el";
+ sha256 = "1sz3qp3y52d05jd006zc99r4ryignpa2jgfk72rw3zfqmikzv15j";
};
packageRequires = [ emacs ];
meta = {
@@ -1252,10 +1237,10 @@
elpaBuild {
pname = "frog-menu";
ename = "frog-menu";
- version = "0.2.8";
+ version = "0.2.10";
src = fetchurl {
- url = "https://elpa.gnu.org/packages/frog-menu-0.2.8.el";
- sha256 = "18f937lvhw2dxwldahim13pr3ppndssjp0dis95iaspiwg9mwc4h";
+ url = "https://elpa.gnu.org/packages/frog-menu-0.2.10.el";
+ sha256 = "050qikvgh9v7kgvhznjsfrpyhs7iq1x63bryqdkrwlf668yhzi1m";
};
packageRequires = [ avy emacs posframe ];
meta = {
@@ -1297,10 +1282,10 @@
elpaBuild {
pname = "gited";
ename = "gited";
- version = "0.5.3";
+ version = "0.6.0";
src = fetchurl {
- url = "https://elpa.gnu.org/packages/gited-0.5.3.tar";
- sha256 = "1bayfclczdzrmay8swszs8lliz5p4nnmjzzz2gh68rc16isjgh2z";
+ url = "https://elpa.gnu.org/packages/gited-0.6.0.tar";
+ sha256 = "187asqrxfpxv53hhnrcid1sy46vcy07qx5yqgnrczi54jpcc57j5";
};
packageRequires = [ cl-lib emacs ];
meta = {
@@ -1342,10 +1327,10 @@
elpaBuild {
pname = "gnorb";
ename = "gnorb";
- version = "1.6.1";
+ version = "1.6.3";
src = fetchurl {
- url = "https://elpa.gnu.org/packages/gnorb-1.6.1.tar";
- sha256 = "0n4460hsmcc3l0y3nb3fysvh33cjwgv0a3mkc26xcx8v85zl7m63";
+ url = "https://elpa.gnu.org/packages/gnorb-1.6.3.tar";
+ sha256 = "14cdldlvq2fx0j9g1bbzb6dq7yp9rw6bv39sls67i2p35h3gc2gd";
};
packageRequires = [ cl-lib ];
meta = {
@@ -1470,21 +1455,6 @@
license = lib.licenses.free;
};
}) {};
- helm-ebdb = callPackage ({ ebdb, elpaBuild, fetchurl, helm, lib }:
- elpaBuild {
- pname = "helm-ebdb";
- ename = "helm-ebdb";
- version = "1";
- src = fetchurl {
- url = "https://elpa.gnu.org/packages/helm-ebdb-1.el";
- sha256 = "17gpna0hywxnhfwc9zsm2r35mskyfi416qqmmdba26r4zmpb9r63";
- };
- packageRequires = [ ebdb helm ];
- meta = {
- homepage = "https://elpa.gnu.org/packages/helm-ebdb.html";
- license = lib.licenses.free;
- };
- }) {};
highlight-escape-sequences = callPackage ({ elpaBuild
, fetchurl
, lib }:
@@ -1596,10 +1566,10 @@
elpaBuild {
pname = "ivy";
ename = "ivy";
- version = "0.11.0";
+ version = "0.12.0";
src = fetchurl {
- url = "https://elpa.gnu.org/packages/ivy-0.11.0.tar";
- sha256 = "1pxapdc7jarqc8lf3a3fsn4nsi4j146dh07f89xkj087psq30v50";
+ url = "https://elpa.gnu.org/packages/ivy-0.12.0.tar";
+ sha256 = "14q9kh48iabrnhwcmhlvgk7sg4a0j5c3zjp0yzj1ijrz5zbdhxxz";
};
packageRequires = [ emacs ];
meta = {
@@ -1746,10 +1716,10 @@
elpaBuild {
pname = "let-alist";
ename = "let-alist";
- version = "1.0.5";
+ version = "1.0.6";
src = fetchurl {
- url = "https://elpa.gnu.org/packages/let-alist-1.0.5.el";
- sha256 = "0r7b9jni50la1m79kklml11syg8d2fmdlr83pv005sv1wh02jszw";
+ url = "https://elpa.gnu.org/packages/let-alist-1.0.6.el";
+ sha256 = "0szj7vnjzz4zci5fvz7xqgcpi4pzdyyf4qi2s8xar2hi7v3yaawr";
};
packageRequires = [ emacs ];
meta = {
@@ -2250,10 +2220,10 @@
elpaBuild {
pname = "org";
ename = "org";
- version = "9.2.3";
+ version = "9.2.6";
src = fetchurl {
- url = "https://elpa.gnu.org/packages/org-9.2.3.tar";
- sha256 = "0hqy4lns9q5p0l1ylgmlckqprn9sbasszhznanmv0rsh0gzhsbyw";
+ url = "https://elpa.gnu.org/packages/org-9.2.6.tar";
+ sha256 = "0ikd78k4yw4sm5x7l3dsbvfcmvnv5qna2mxirr560gvcnzhr0zg4";
};
packageRequires = [];
meta = {
@@ -2366,6 +2336,21 @@
license = lib.licenses.free;
};
}) {};
+ path-iterator = callPackage ({ elpaBuild, emacs, fetchurl, lib }:
+ elpaBuild {
+ pname = "path-iterator";
+ ename = "path-iterator";
+ version = "1.0";
+ src = fetchurl {
+ url = "https://elpa.gnu.org/packages/path-iterator-1.0.tar";
+ sha256 = "0kgl7rhv9x23jyr6ahfy6ql447zpz9fnmfwldkpn69g7jdx6a3cc";
+ };
+ packageRequires = [ emacs ];
+ meta = {
+ homepage = "https://elpa.gnu.org/packages/path-iterator.html";
+ license = lib.licenses.free;
+ };
+ }) {};
peg = callPackage ({ elpaBuild, emacs, fetchurl, lib }:
elpaBuild {
pname = "peg";
@@ -2381,6 +2366,36 @@
license = lib.licenses.free;
};
}) {};
+ persist = callPackage ({ elpaBuild, fetchurl, lib }:
+ elpaBuild {
+ pname = "persist";
+ ename = "persist";
+ version = "0.4";
+ src = fetchurl {
+ url = "https://elpa.gnu.org/packages/persist-0.4.tar";
+ sha256 = "0gpxy41qawzss2526j9a7lys60vqma1lvamn4bfabwza7gfhac0q";
+ };
+ packageRequires = [];
+ meta = {
+ homepage = "https://elpa.gnu.org/packages/persist.html";
+ license = lib.licenses.free;
+ };
+ }) {};
+ phps-mode = callPackage ({ elpaBuild, emacs, fetchurl, lib }:
+ elpaBuild {
+ pname = "phps-mode";
+ ename = "phps-mode";
+ version = "0.3.1";
+ src = fetchurl {
+ url = "https://elpa.gnu.org/packages/phps-mode-0.3.1.tar";
+ sha256 = "1h6s5k156mbbkaysb07vcb13k3izs91pwigzcfh6jvv3lak4azg5";
+ };
+ packageRequires = [ emacs ];
+ meta = {
+ homepage = "https://elpa.gnu.org/packages/phps-mode.html";
+ license = lib.licenses.free;
+ };
+ }) {};
pinentry = callPackage ({ elpaBuild, fetchurl, lib }:
elpaBuild {
pname = "pinentry";
@@ -2415,10 +2430,10 @@
elpaBuild {
pname = "posframe";
ename = "posframe";
- version = "0.4.3";
+ version = "0.5.0";
src = fetchurl {
- url = "https://elpa.gnu.org/packages/posframe-0.4.3.el";
- sha256 = "06q0p4qim6lha2xr9fxaspbzw01xn01ik9gxlld6hdhh19b65cmi";
+ url = "https://elpa.gnu.org/packages/posframe-0.5.0.el";
+ sha256 = "1fjnpwg1fj9j54nymh802vd4viggrg3qnqwh52281n7zv6xfv0qb";
};
packageRequires = [ emacs ];
meta = {
@@ -2556,10 +2571,10 @@
elpaBuild {
pname = "realgud";
ename = "realgud";
- version = "1.5.0";
+ version = "1.5.1";
src = fetchurl {
- url = "https://elpa.gnu.org/packages/realgud-1.5.0.tar";
- sha256 = "0bfshrgkfrfb1d8insnb5n25230xd0scdk6bijhgh34q2phjy2fy";
+ url = "https://elpa.gnu.org/packages/realgud-1.5.1.tar";
+ sha256 = "01155sydricdvxy3djk64w2zc6x0q4j669bvz8m8rd766wsmida8";
};
packageRequires = [ emacs load-relative loc-changes test-simple ];
meta = {
@@ -2710,10 +2725,10 @@
elpaBuild {
pname = "relint";
ename = "relint";
- version = "1.8";
+ version = "1.10";
src = fetchurl {
- url = "https://elpa.gnu.org/packages/relint-1.8.el";
- sha256 = "1bl6m2h7131acbmr0kqfnjjpv2syiv2mxfnm61g874ynnvkmmkm3";
+ url = "https://elpa.gnu.org/packages/relint-1.10.el";
+ sha256 = "1l0lh4pkksw7brmhhbaikwzs4zkgd2962ks1zy7m262dvkhxjfv8";
};
packageRequires = [ xr ];
meta = {
@@ -2971,10 +2986,10 @@
elpaBuild {
pname = "sql-indent";
ename = "sql-indent";
- version = "1.3";
+ version = "1.4";
src = fetchurl {
- url = "https://elpa.gnu.org/packages/sql-indent-1.3.tar";
- sha256 = "0zira8my1q975bad2h76bz4yddjzf0dskvy6x865np86rmzd0c9w";
+ url = "https://elpa.gnu.org/packages/sql-indent-1.4.tar";
+ sha256 = "1nilxfm30nb2la1463729rgbgbma7igkf0z325k8cbapqanb1wgl";
};
packageRequires = [ cl-lib ];
meta = {
@@ -2986,10 +3001,10 @@
elpaBuild {
pname = "ssh-deploy";
ename = "ssh-deploy";
- version = "3.1";
+ version = "3.1.10";
src = fetchurl {
- url = "https://elpa.gnu.org/packages/ssh-deploy-3.1.tar";
- sha256 = "09m1ljp68rribypls5mzffmdv86jkg9wq4bdb7d1qkdjyr3f2hgn";
+ url = "https://elpa.gnu.org/packages/ssh-deploy-3.1.10.tar";
+ sha256 = "0gckc6yhgi8pn3s8vdyzz8x1s2d4wmsw6yjwsaqcr5nra50glbpg";
};
packageRequires = [ emacs ];
meta = {
@@ -3016,10 +3031,10 @@
elpaBuild {
pname = "svg";
ename = "svg";
- version = "0.2";
+ version = "1.0";
src = fetchurl {
- url = "https://elpa.gnu.org/packages/svg-0.2.el";
- sha256 = "14yfi27v3zdzh1chcjiq4l63iwh0vd99wv1z4w7agr33540jybc5";
+ url = "https://elpa.gnu.org/packages/svg-1.0.el";
+ sha256 = "1hh0x7sz2rqb7zdhcm2q9knr8nnwqrsbz1zfp29k8l1318li9f62";
};
packageRequires = [ emacs ];
meta = {
@@ -3046,10 +3061,10 @@
elpaBuild {
pname = "system-packages";
ename = "system-packages";
- version = "1.0.10";
+ version = "1.0.11";
src = fetchurl {
- url = "https://elpa.gnu.org/packages/system-packages-1.0.10.tar";
- sha256 = "1vwf2j0fxrsqmrgc7x5nkkg0vlhwgxppc4w7kb5is6dgrssskpb5";
+ url = "https://elpa.gnu.org/packages/system-packages-1.0.11.tar";
+ sha256 = "0xf2q5bslxpw0wycgi2k983lnfpw182rgdzq0f99f64kb7ifns9y";
};
packageRequires = [ emacs ];
meta = {
@@ -3132,6 +3147,21 @@
license = lib.licenses.free;
};
}) {};
+ tramp = callPackage ({ elpaBuild, emacs, fetchurl, lib }:
+ elpaBuild {
+ pname = "tramp";
+ ename = "tramp";
+ version = "2.4.2.2";
+ src = fetchurl {
+ url = "https://elpa.gnu.org/packages/tramp-2.4.2.2.tar";
+ sha256 = "0bjfnxxyn8xgw10ybnjrza2gfwqifa3q7rh0bp6pidlhg45718p8";
+ };
+ packageRequires = [ emacs ];
+ meta = {
+ homepage = "https://elpa.gnu.org/packages/tramp.html";
+ license = lib.licenses.free;
+ };
+ }) {};
tramp-theme = callPackage ({ elpaBuild, emacs, fetchurl, lib }:
elpaBuild {
pname = "tramp-theme";
@@ -3207,6 +3237,21 @@
license = lib.licenses.free;
};
}) {};
+ uniquify-files = callPackage ({ elpaBuild, emacs, fetchurl, lib }:
+ elpaBuild {
+ pname = "uniquify-files";
+ ename = "uniquify-files";
+ version = "1.0.1";
+ src = fetchurl {
+ url = "https://elpa.gnu.org/packages/uniquify-files-1.0.1.tar";
+ sha256 = "0c4lf25503z71wz9f0v6ag5lmqfxz94lmq65xvzvhmqvkxvsgpm5";
+ };
+ packageRequires = [ emacs ];
+ meta = {
+ homepage = "https://elpa.gnu.org/packages/uniquify-files.html";
+ license = lib.licenses.free;
+ };
+ }) {};
url-http-ntlm = callPackage ({ cl-lib ? null
, elpaBuild
, fetchurl
@@ -3276,6 +3321,23 @@
license = lib.licenses.free;
};
}) {};
+ verilog-mode = callPackage ({ elpaBuild
+ , fetchurl
+ , lib }:
+ elpaBuild {
+ pname = "verilog-mode";
+ ename = "verilog-mode";
+ version = "2019.9.23.4801067";
+ src = fetchurl {
+ url = "https://elpa.gnu.org/packages/verilog-mode-2019.9.23.4801067.el";
+ sha256 = "0jaba2cqiiknjqc7qz6047hpjd87hznl6b154ai1900i52kjbs21";
+ };
+ packageRequires = [];
+ meta = {
+ homepage = "https://elpa.gnu.org/packages/verilog-mode.html";
+ license = lib.licenses.free;
+ };
+ }) {};
vigenere = callPackage ({ elpaBuild, emacs, fetchurl, lib }:
elpaBuild {
pname = "vigenere";
@@ -3358,10 +3420,10 @@
elpaBuild {
pname = "wcheck-mode";
ename = "wcheck-mode";
- version = "2016.1.30";
+ version = "2019.6.17";
src = fetchurl {
- url = "https://elpa.gnu.org/packages/wcheck-mode-2016.1.30.el";
- sha256 = "0hzrxnslfl04h083njy7wp4hhgrqpyz0cnm73v348kr1i4wx9xjq";
+ url = "https://elpa.gnu.org/packages/wcheck-mode-2019.6.17.el";
+ sha256 = "0579a3p9swq0j0fca9s885kzv69y9lhhnqa6m4pzdgrr6pfrirqv";
};
packageRequires = [];
meta = {
@@ -3418,10 +3480,10 @@
elpaBuild {
pname = "websocket";
ename = "websocket";
- version = "1.9";
+ version = "1.11.1";
src = fetchurl {
- url = "https://elpa.gnu.org/packages/websocket-1.9.tar";
- sha256 = "00sd0dawpjcr79w6klya5ywq9r1p86d97z62vqpjij6yg5qv470f";
+ url = "https://elpa.gnu.org/packages/websocket-1.11.1.tar";
+ sha256 = "09s8qyi012djmm3vrj1qg1zqqy0h0cbcfzfkhybvqi4amy4jgliw";
};
packageRequires = [ cl-lib ];
meta = {
@@ -3459,21 +3521,41 @@
license = lib.licenses.free;
};
}) {};
- wisi = callPackage ({ cl-lib ? null, elpaBuild, emacs, fetchurl, lib, seq }:
+ wisi = callPackage ({ elpaBuild, emacs, fetchurl, lib, seq }:
elpaBuild {
pname = "wisi";
ename = "wisi";
- version = "2.1.0";
+ version = "2.2.1";
src = fetchurl {
- url = "https://elpa.gnu.org/packages/wisi-2.1.0.tar";
- sha256 = "143xfdr7agyc52wz9zsx67rvvnjs4rlj7j3cbdhvs6wyl7whyg38";
+ url = "https://elpa.gnu.org/packages/wisi-2.2.1.tar";
+ sha256 = "1qvhx8bpms7gri7y6wniwqd6nmqxj4lip5l3sphbq2kjf4zq4qd4";
};
- packageRequires = [ cl-lib emacs seq ];
+ packageRequires = [ emacs seq ];
meta = {
homepage = "https://elpa.gnu.org/packages/wisi.html";
license = lib.licenses.free;
};
}) {};
+ wisitoken-grammar-mode = callPackage ({ elpaBuild
+ , emacs
+ , fetchurl
+ , lib
+ , mmm-mode
+ , wisi }:
+ elpaBuild {
+ pname = "wisitoken-grammar-mode";
+ ename = "wisitoken-grammar-mode";
+ version = "1.0.3";
+ src = fetchurl {
+ url = "https://elpa.gnu.org/packages/wisitoken-grammar-mode-1.0.3.tar";
+ sha256 = "1vljnhi35vix30xch9mziczg56ss1r615yn2pgdcw8wa8sm14crw";
+ };
+ packageRequires = [ emacs mmm-mode wisi ];
+ meta = {
+ homepage = "https://elpa.gnu.org/packages/wisitoken-grammar-mode.html";
+ license = lib.licenses.free;
+ };
+ }) {};
wpuzzle = callPackage ({ elpaBuild, fetchurl, lib }:
elpaBuild {
pname = "wpuzzle";
@@ -3493,10 +3575,10 @@
elpaBuild {
pname = "xclip";
ename = "xclip";
- version = "1.8";
+ version = "1.9";
src = fetchurl {
- url = "https://elpa.gnu.org/packages/xclip-1.8.el";
- sha256 = "1ymc9dhpwbh92ad7w64p8xlrjdws5c9h90h47ckh6479h8r697xg";
+ url = "https://elpa.gnu.org/packages/xclip-1.9.el";
+ sha256 = "0xbs6fw0dfm5iynhdx62cwixzizjkrwrib6n0fjnsj31kajbkf3y";
};
packageRequires = [];
meta = {
@@ -3508,10 +3590,10 @@
elpaBuild {
pname = "xelb";
ename = "xelb";
- version = "0.17";
+ version = "0.18";
src = fetchurl {
- url = "https://elpa.gnu.org/packages/xelb-0.17.tar";
- sha256 = "0k98580vq253fjdgklgqlwl450saninfw39fbq8lv3xsnp3dcgml";
+ url = "https://elpa.gnu.org/packages/xelb-0.18.tar";
+ sha256 = "1fp5mzl63sh0h3ws4l5p4qgvi7ny8a3fj6k4dhqa98xgw2bx03v7";
};
packageRequires = [ cl-generic emacs ];
meta = {
@@ -3538,10 +3620,10 @@
elpaBuild {
pname = "xr";
ename = "xr";
- version = "1.12";
+ version = "1.13";
src = fetchurl {
- url = "https://elpa.gnu.org/packages/xr-1.12.tar";
- sha256 = "1vv87h0h8ldc1mbsn45w5z1m6jq8j2js4xz23a9ixdby06g60y3g";
+ url = "https://elpa.gnu.org/packages/xr-1.13.tar";
+ sha256 = "1km4x92pii8c4bcimks4xzhmwpypdf183z0zh7raj062jz4jb74r";
};
packageRequires = [];
meta = {
@@ -3586,10 +3668,10 @@
elpaBuild {
pname = "zones";
ename = "zones";
- version = "2019.4.30";
+ version = "2019.7.13";
src = fetchurl {
- url = "https://elpa.gnu.org/packages/zones-2019.4.30.el";
- sha256 = "0f0ryd9wnkg7vh2jv30bqhpzzkaf0gc2ysmib6y36s3m8c2sa9b6";
+ url = "https://elpa.gnu.org/packages/zones-2019.7.13.el";
+ sha256 = "0qp1ba2pkqx9d35g7z8hf8qs2k455krf2a92l4rka3ipsbnmq5k1";
};
packageRequires = [];
meta = {
diff --git a/pkgs/applications/editors/emacs-modes/elpa-packages.nix b/pkgs/applications/editors/emacs-modes/elpa-packages.nix
index 9c08e91af41e..a6bea779eae0 100644
--- a/pkgs/applications/editors/emacs-modes/elpa-packages.nix
+++ b/pkgs/applications/editors/emacs-modes/elpa-packages.nix
@@ -4,45 +4,39 @@
To update the list of packages from MELPA,
-1. Clone https://github.com/ttuegel/emacs2nix.
-2. Run `./elpa-packages.sh` from emacs2nix.
-3. Copy the new `elpa-generated.nix` file into Nixpkgs.
-4. Check for evaluation errors: `nix-instantiate ./. -A emacsPackagesNg.elpaPackages`.
-5. `git add pkgs/applications/editors/emacs-modes/elpa-generated.nix && git commit -m "elpa-packages $(date -Idate)"`
+1. Run `./update-elpa`.
+2. Check for evaluation errors: `nix-instantiate ../../../.. -A emacsPackagesNg.elpaPackages`.
+3. `git commit -m "elpa-packages $(date -Idate)" -- elpa-generated.nix`
*/
{ lib, stdenv, texinfo }:
-self:
+self: let
- let
+ markBroken = pkg: pkg.override {
+ elpaBuild = args: self.elpaBuild (args // {
+ meta = (args.meta or {}) // { broken = true; };
+ });
+ };
- imported = import ./elpa-generated.nix {
+ elpaBuild = import ../../../build-support/emacs/elpa.nix {
+ inherit lib stdenv texinfo;
+ inherit (self) emacs;
+ };
+
+ generateElpa = lib.makeOverridable ({
+ generated ? ./elpa-generated.nix
+ }: let
+
+ imported = import generated {
inherit (self) callPackage;
};
super = removeAttrs imported [ "dash" ];
- elpaBuild = import ../../../build-support/emacs/elpa.nix {
- inherit lib stdenv texinfo;
- inherit (self) emacs;
- };
-
- markBroken = pkg: pkg.override {
- elpaBuild = args: self.elpaBuild (args // {
- meta = (args.meta or {}) // { broken = true; };
- });
- };
-
overrides = {
- # upstream issue: missing footer
- ebdb-i18n-chn = markBroken super.ebdb-i18n-chn;
- el-search = markBroken super.el-search; # requires emacs-25
- iterators = markBroken super.iterators; # requires emacs-25
- midi-kbd = markBroken super.midi-kbd; # requires emacs-25
rcirc-menu = markBroken super.rcirc-menu; # Missing file header
- stream = markBroken super.stream; # requires emacs-25
cl-lib = null; # builtin
tle = null; # builtin
advice = null; # builtin
@@ -50,4 +44,6 @@ self:
elpaPackages = super // overrides;
- in elpaPackages // { inherit elpaBuild elpaPackages; }
+ in elpaPackages // { inherit elpaBuild; });
+
+in generateElpa { }
diff --git a/pkgs/applications/editors/emacs-modes/emacs-clang-complete-async/default.nix b/pkgs/applications/editors/emacs-modes/emacs-clang-complete-async/default.nix
deleted file mode 100644
index 66ac9a3d77e6..000000000000
--- a/pkgs/applications/editors/emacs-modes/emacs-clang-complete-async/default.nix
+++ /dev/null
@@ -1,30 +0,0 @@
-{ clangStdenv, fetchgit, llvmPackages }:
-
-clangStdenv.mkDerivation {
- name = "emacs-clang-complete-async-20130218";
- src = fetchgit {
- url = "git://github.com/Golevka/emacs-clang-complete-async.git";
- rev = "f01488971ec8b5752780d130fb84de0c16a46f31";
- sha256 = "01smjinrvx0w5z847a43fh2hyr6rrq1kaglfakbr6dcr313w89x9";
- };
-
- buildInputs = [ llvmPackages.llvm ];
-
- patches = [ ./fix-build.patch ];
-
- CFLAGS = "-I${llvmPackages.clang}/include";
- LDFLAGS = "-L${llvmPackages.clang}/lib";
-
- installPhase = ''
- mkdir -p $out/bin
- mkdir -p $out/share/emacs/site-lisp
- install -m 755 clang-complete $out/bin
- install -m 644 auto-complete-clang-async.el $out/share/emacs/site-lisp
- '';
-
- meta = {
- homepage = https://github.com/Golevka/emacs-clang-complete-async;
- description = "An emacs plugin to complete C and C++ code using libclang";
- license = clangStdenv.lib.licenses.gpl3Plus;
- };
-}
diff --git a/pkgs/applications/editors/emacs-modes/emacs-clang-complete-async/fix-build.patch b/pkgs/applications/editors/emacs-modes/emacs-clang-complete-async/fix-build.patch
deleted file mode 100644
index 89de339a436b..000000000000
--- a/pkgs/applications/editors/emacs-modes/emacs-clang-complete-async/fix-build.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- old/src/completion.h 2014-11-16 16:58:16.625150124 +0100
-+++ new/src/completion.h 2014-11-16 16:58:28.020207508 +0100
-@@ -3,6 +3,7 @@
-
-
- #include
-+#include
-
-
- typedef struct __completion_Session_struct
diff --git a/pkgs/applications/editors/emacs-modes/emacs-libvterm/default.nix b/pkgs/applications/editors/emacs-modes/emacs-libvterm/default.nix
deleted file mode 100644
index ba54b9404a0c..000000000000
--- a/pkgs/applications/editors/emacs-modes/emacs-libvterm/default.nix
+++ /dev/null
@@ -1,57 +0,0 @@
-{ stdenv, fetchFromGitHub, cmake, emacs, libvterm-neovim }:
-
-let
- emacsSources = stdenv.mkDerivation {
- name = emacs.name + "-sources";
- src = emacs.src;
-
- dontConfigure = true;
- dontBuild = true;
- doCheck = false;
- fixupPhase = ":";
-
- installPhase = ''
- mkdir -p $out
- cp -a * $out
- '';
-
- };
-
- libvterm = libvterm-neovim.overrideAttrs(old: rec {
- pname = "libvterm-neovim";
- version = "2019-04-27";
- name = pname + "-" + version;
- src = fetchFromGitHub {
- owner = "neovim";
- repo = "libvterm";
- rev = "89675ffdda615ffc3f29d1c47a933f4f44183364";
- sha256 = "0l9ixbj516vl41v78fi302ws655xawl7s94gmx1kb3fmfgamqisy";
- };
- });
-
-
-in stdenv.mkDerivation rec {
- name = "emacs-libvterm-${version}";
- version = "unstable-2019-07-22";
-
- src = fetchFromGitHub {
- owner = "akermu";
- repo = "emacs-libvterm";
- rev = "301fe9fdfd5fb2496c8428a11e0812fd8a4c0820";
- sha256 = "0i1hn5gcxayqcbjrnpgczvbicq2vsyn59646ary3crs0mz9wlbpr";
- };
-
- nativeBuildInputs = [ cmake ];
- buildInputs = [ emacs libvterm ];
-
- cmakeFlags = [
- "-DEMACS_SOURCE=${emacsSources}"
- "-DUSE_SYSTEM_LIBVTERM=True"
- ];
-
- installPhase = ''
- install -d $out/share/emacs/site-lisp
- install ../*.el $out/share/emacs/site-lisp
- install ../*.so $out/share/emacs/site-lisp
- '';
-}
diff --git a/pkgs/applications/editors/emacs-modes/emacs-w3m/default.nix b/pkgs/applications/editors/emacs-modes/emacs-w3m/default.nix
deleted file mode 100644
index 8e1d7092e6a1..000000000000
--- a/pkgs/applications/editors/emacs-modes/emacs-w3m/default.nix
+++ /dev/null
@@ -1,61 +0,0 @@
-{ fetchcvs, stdenv, emacs, w3m, imagemagick, texinfo, autoreconfHook }:
-
-let date = "2013-03-21"; in
-stdenv.mkDerivation rec {
- name = "emacs-w3m-cvs${date}";
-
- # Get the source from CVS because the previous release (1.4.4) is old and
- # doesn't work with GNU Emacs 23.
- src = fetchcvs {
- inherit date;
- cvsRoot = ":pserver:anonymous@cvs.namazu.org:/storage/cvsroot";
- module = "emacs-w3m";
- sha256 = "1lmcj8rf83w13q8q68hh7sa1abc2m6j2zmfska92xdp7hslhdgc5";
- };
-
- nativeBuildInputs = [ autoreconfHook ];
- buildInputs = [ emacs w3m texinfo ];
-
- # XXX: Should we do the same for xpdf/evince, gv, gs, etc.?
- patchPhase = ''
- sed -i "w3m.el" \
- -e 's|defcustom w3m-command nil|defcustom w3m-command "${w3m}/bin/w3m"|g ;
- s|(w3m-which-command "display")|"${imagemagick.out}/bin/display"|g'
-
- sed -i "w3m-image.el" \
- -e 's|(w3m-which-command "convert")|"${imagemagick.out}/bin/convert"|g ;
- s|(w3m-which-command "identify")|"${imagemagick.out}/bin/identify"|g'
- '';
-
- configureFlags = [
- "--with-lispdir=$(out)/share/emacs/site-lisp"
- "--with-icondir=$(out)/share/emacs/site-lisp/images/w3m"
- ];
-
- postInstall = ''
- cd "$out/share/emacs/site-lisp"
- for i in ChangeLog*
- do
- mv -v "$i" "w3m-$i"
- done
- '';
-
- meta = {
- description = "Emacs-w3m, a simple Emacs interface to the w3m web browser";
-
- longDescription = ''
- Emacs/W3 used to be known as the most popular WEB browser on Emacs, but
- it worked so slowly that we wanted a simple and speedy alternative.
-
- w3m is a pager with WWW capability, developed by Akinori ITO. Although
- it is a pager, it can be used as a text-mode WWW browser. Then we
- developed a simple Emacs interface to w3m.
- '';
-
- license = stdenv.lib.licenses.gpl2Plus;
-
- homepage = http://emacs-w3m.namazu.org/;
-
- maintainers = [ ];
- };
-}
diff --git a/pkgs/applications/editors/emacs-modes/emacs2nix.nix b/pkgs/applications/editors/emacs-modes/emacs2nix.nix
new file mode 100644
index 000000000000..cedc56e97ceb
--- /dev/null
+++ b/pkgs/applications/editors/emacs-modes/emacs2nix.nix
@@ -0,0 +1,23 @@
+let
+ pkgs = import ../../../.. { };
+
+ src = pkgs.fetchgit {
+ url = "https://github.com/ttuegel/emacs2nix.git";
+ fetchSubmodules = true;
+ rev = "752fe1bd891425cb7a4a53cd7b98c194c1fe4518";
+ sha256 = "0asfdswh8sbnapbqhbz539zzxmv72f1iviha95iys34sgnd5k1nk";
+ };
+
+in pkgs.mkShell {
+
+ buildInputs = [
+ pkgs.bash
+ ];
+
+ EMACS2NIX = src;
+
+ shellHook = ''
+ export PATH=$PATH:${src}
+ '';
+
+}
diff --git a/pkgs/applications/editors/emacs-modes/emms/default.nix b/pkgs/applications/editors/emacs-modes/emms/default.nix
deleted file mode 100644
index f966989b5a30..000000000000
--- a/pkgs/applications/editors/emacs-modes/emms/default.nix
+++ /dev/null
@@ -1,73 +0,0 @@
-{ stdenv, fetchurl, emacs, texinfo
-, mpg321, vorbis-tools, taglib, mp3info, alsaUtils }:
-
-# XXX: EMMS also supports Xine, MPlayer, Jack, etc.
-
-stdenv.mkDerivation rec {
- name = "emms-3.0";
-
- src = fetchurl {
- # These guys don't use ftp.gnu.org...
- url = "https://www.gnu.org/software/emms/download/${name}.tar.gz";
- sha256 = "151mfx97x15lfpd1qc2sqbvhwhvg46axgh15qyqmdy42vh906xav";
- };
-
- buildInputs = [ emacs texinfo ];
-
- configurePhase = ''
- sed -i "Makefile" -e "s|PREFIX *=.*\$|PREFIX = $out|g ;
- s|/usr/sbin/install-info|install-info|g ;
- s|/usr/include/taglib|${taglib}/include/taglib|g ;
- s|/usr/lib|${taglib}/lib|g ;
- s|^all:\(.*\)\$|all:\1 emms-print-metadata|g"
- mkdir -p "$out/share/man/man1"
-
- sed -i "emms-player-mpg321-remote.el" \
- -e 's|emms-player-mpg321-remote-command[[:blank:]]\+"mpg321"|emms-player-mpg321-remote-command "${mpg321}/bin/mpg321"|g'
- sed -i "emms-player-simple.el" \
- -e 's|"ogg123"|"${vorbis-tools}/bin/ogg123"|g'
- sed -i "emms-info-ogginfo.el" \
- -e 's|emms-info-ogginfo-program-name[[:blank:]]\+"ogginfo"|emms-info-ogginfo-program-name "${vorbis-tools}/bin/ogginfo"|g'
- sed -i "emms-info-libtag.el" \
- -e "s|\"emms-print-metadata\"|\"$out/bin/emms-print-metadata\"|g"
- sed -i "emms-volume-amixer.el" \
- -e 's|"amixer"|"${alsaUtils}/bin/amixer"|g'
-
- # Use the libtag info back-end for MP3s since we're building it.
- sed -i "emms-setup.el" \
- -e 's|emms-info-mp3info|emms-info-libtag|g'
-
- # But use mp3info for the tag editor.
- sed -i "emms-info-mp3info.el" \
- -e 's|emms-info-mp3info-program-name[[:blank:]]\+"mp3info"|emms-info-mp3info-program-name "${mp3info}/bin/mp3info"|g'
- sed -i "emms-tag-editor.el" \
- -e 's|"mp3info"|"${mp3info}/bin/mp3info"|g'
- '';
-
- postInstall = ''
- mkdir -p "$out/bin" && cp emms-print-metadata "$out/bin"
- '';
-
- meta = {
- description = "GNU EMMS, The Emacs Multimedia System";
-
- longDescription = ''
- EMMS is the Emacs Multimedia System. It tries to be a clean and
- small application to play multimedia files from Emacs using
- external players. Many of it's ideas are derived from
- MpthreePlayer, but it tries to be more general and cleaner.
-
- The fact that EMMS is based on external players makes it
- powerful, because it supports all formats that those players
- support, with no effort from your side.
- '';
-
- homepage = https://www.gnu.org/software/emms/;
-
- license = stdenv.lib.licenses.gpl3Plus;
-
- maintainers = [ ];
- platforms = stdenv.lib.platforms.unix;
- broken = true;
- };
-}
diff --git a/pkgs/applications/editors/emacs-modes/ensime/default.nix b/pkgs/applications/editors/emacs-modes/ensime/default.nix
deleted file mode 100644
index d776103a6627..000000000000
--- a/pkgs/applications/editors/emacs-modes/ensime/default.nix
+++ /dev/null
@@ -1,22 +0,0 @@
-{ stdenv, fetchurl, emacs, unzip, autoComplete, dash, s, scalaMode2, sbtMode }:
-
-stdenv.mkDerivation {
- name = "emacs-ensime-2014-09-04";
-
- src = fetchurl {
- url = "https://github.com/ensime/ensime-emacs/archive/d3820a3f362975f6e14b817988ec07bfef2b4dad.zip";
- sha256 = "0gwr0r92z2hh2x8g0hpxaar2vvfk1b91cp6v04gaasw0fvl5i7g5";
- };
-
- buildInputs = [ emacs unzip ];
- propagatedUserEnvPkgs = [ autoComplete dash s scalaMode2 sbtMode ];
-
- buildPhase = ''
- emacs -L . -L ${autoComplete}/share/emacs/site-lisp --batch -f batch-byte-compile *.el
- '';
-
- installPhase = ''
- install -d $out/share/emacs/site-lisp
- install *.el *.elc $out/share/emacs/site-lisp
- '';
-}
diff --git a/pkgs/applications/editors/emacs-modes/erlang/default.nix b/pkgs/applications/editors/emacs-modes/erlang/default.nix
deleted file mode 100644
index 463d7fc7e159..000000000000
--- a/pkgs/applications/editors/emacs-modes/erlang/default.nix
+++ /dev/null
@@ -1,25 +0,0 @@
-{ stdenv, erlang }:
-
-stdenv.mkDerivation {
-
- name = "erlang-mode-${erlang.version}";
-
- buildInputs = [ ];
-
- inherit erlang;
-
- buildCommand = ''
- mkdir -p "$out/share/emacs/site-lisp"
- cp "$erlang/lib/erlang/lib/tools"*/emacs/*.el $out/share/emacs/site-lisp/
- '';
-
- # emacs highlighting */
-
- meta = with stdenv.lib; {
- homepage = https://github.com/erlang/otp;
- description = "Erlang mode for Emacs";
- license = licenses.asl20;
- platforms = platforms.unix;
- maintainers = [ maintainers.samuelrivas ];
- };
-}
diff --git a/pkgs/applications/editors/emacs-modes/ess/default.nix b/pkgs/applications/editors/emacs-modes/ess/default.nix
deleted file mode 100644
index ce335a5d4827..000000000000
--- a/pkgs/applications/editors/emacs-modes/ess/default.nix
+++ /dev/null
@@ -1,21 +0,0 @@
-{ stdenv, fetchurl, emacs, texinfo }:
-
-stdenv.mkDerivation rec {
- name = "ess-14.09";
-
- src = fetchurl {
- url = "http://ess.r-project.org/downloads/ess/${name}.tgz";
- sha256 = "0wa507jfmq3k7x0vigd2yzb4j2190ix4wnnpv7ql4bjy0vfvmwdn";
- };
-
- buildInputs = [ emacs texinfo ];
-
- configurePhase = "makeFlags=PREFIX=$out";
-
- meta = {
- description = "Emacs Speaks Statistics";
- homepage = http://ess.r-project.org/;
- license = stdenv.lib.licenses.gpl2Plus;
- hydraPlatforms = stdenv.lib.platforms.linux;
- };
-}
diff --git a/pkgs/applications/editors/emacs-modes/flymake-cursor/default.nix b/pkgs/applications/editors/emacs-modes/flymake-cursor/default.nix
deleted file mode 100644
index eae338d241de..000000000000
--- a/pkgs/applications/editors/emacs-modes/flymake-cursor/default.nix
+++ /dev/null
@@ -1,30 +0,0 @@
-{ stdenv, fetchurl, emacs }:
-
-stdenv.mkDerivation rec {
- name = "flymake-cursor-0.1.5";
-
- src = fetchurl {
- url = "http://www.emacswiki.org/emacs/download/flymake-cursor.el";
- sha256 = "10cpzrd588ya52blghxss5zkn6x8hc7bx1h0qbcdlybbmkjgpkxr";
- };
-
- phases = [ "buildPhase" "installPhase"];
-
- buildInputs = [ emacs ];
-
- buildPhase = ''
- cp $src flymake-cursor.el
- emacs --batch -f batch-byte-compile flymake-cursor.el
- '';
-
- installPhase = ''
- install -d $out/share/emacs/site-lisp
- install flymake-cursor.el flymake-cursor.elc $out/share/emacs/site-lisp
- '';
-
- meta = {
- description = "Displays flymake error msg in minibuffer after delay";
- homepage = http://www.emacswiki.org/emacs/flymake-cursor.el;
- license = stdenv.lib.licenses.publicDomain;
- };
-}
diff --git a/pkgs/applications/editors/emacs-modes/gh/default.nix b/pkgs/applications/editors/emacs-modes/gh/default.nix
deleted file mode 100644
index aa59eace2ae3..000000000000
--- a/pkgs/applications/editors/emacs-modes/gh/default.nix
+++ /dev/null
@@ -1,31 +0,0 @@
-{ stdenv, fetchgit, emacs, pcache, logito }:
-
-stdenv.mkDerivation rec {
- name = "gh-0.5.3";
-
- src = fetchgit {
- url = "https://github.com/sigma/gh.el.git";
- rev = "ef03b63d063ec22f03af449aa955c98dfad7f80e";
- sha256 = "1pciq16vl5l4kvj08q4ib1jzk2bb2y1makcsyaw8k9jblqviw756";
- };
-
- buildInputs = [ emacs ];
- propagatedUserEnvPkgs = [ pcache logito ];
-
- patchPhase = ''
- sed -i Makefile \
- -e "s|^ *EFLAGS *=|& -L ${pcache}/share/emacs/site-lisp -L ${logito}/share/emacs/site-lisp --eval '(setq user-emacs-directory \"./\")'|" \
- -e "s|/usr/local|$out|" \
- -e "s|/site-lisp/\$(PKGNAME)|/site-lisp|"
- '';
-
- buildPhase = "make lisp";
-
- meta = {
- description = "A (very early) GitHub client library for Emacs";
- homepage = https://github.com/sigma/gh.el;
- license = stdenv.lib.licenses.gpl2Plus;
-
- platforms = stdenv.lib.platforms.all;
- };
-}
diff --git a/pkgs/applications/editors/emacs-modes/gist/default.nix b/pkgs/applications/editors/emacs-modes/gist/default.nix
deleted file mode 100644
index 08471247f081..000000000000
--- a/pkgs/applications/editors/emacs-modes/gist/default.nix
+++ /dev/null
@@ -1,36 +0,0 @@
-{ stdenv, fetchgit, emacs, gh, pcache, logito }:
-
-stdenv.mkDerivation rec {
- name = "gist-1.0";
-
- src = fetchgit {
- url = "https://github.com/sigma/gist.el.git";
- rev = "bbb457e4eaaf5f96cfaaa4f63021e3e542bfbfed";
- sha256 = "469f9df52076d0c6038183cff4b9415bca98de66c08814a60b69729b44bdf294";
- };
-
- buildInputs = [ emacs ];
-
- buildPhase = ''
- emacs -L ${gh}/share/emacs/site-lisp \
- -L ${pcache}/share/emacs/site-lisp \
- -L ${logito}/share/emacs/site-lisp \
- --eval '(setq user-emacs-directory "./")' \
- --batch -f batch-byte-compile gist.el
- '';
-
- propagatedUserEnvPkgs = [ gh pcache logito ];
-
- installPhase = ''
- install -d $out/share/emacs/site-lisp
- install gist.el gist.elc $out/share/emacs/site-lisp
- '';
-
- meta = {
- description = "Emacs integration for gist.github.com";
- homepage = https://github.com/sigma/gist.el;
- license = stdenv.lib.licenses.gpl2Plus;
-
- platforms = stdenv.lib.platforms.all;
- };
-}
diff --git a/pkgs/applications/editors/emacs-modes/gn/default.nix b/pkgs/applications/editors/emacs-modes/gn/default.nix
deleted file mode 100644
index 39e7d1abf386..000000000000
--- a/pkgs/applications/editors/emacs-modes/gn/default.nix
+++ /dev/null
@@ -1,20 +0,0 @@
-{ stdenv, fetchgit, emacs }:
-
-stdenv.mkDerivation {
- name = "gn-mode-2017-09-21";
- src = fetchgit {
- url = "https://chromium.googlesource.com/chromium/src/tools/gn";
- rev = "34f2780efb3fe14fe361ec161ad58440de5a6b36";
- sha256 = "10cisqz3l6ny3471yi7y1z8v622lpl65zh0liqr6absvmy63g866";
- };
- buildInputs = [ emacs ];
-
- buildPhase = ''
- emacs --batch -f batch-byte-compile misc/emacs/gn-mode.el
- '';
-
- installPhase = ''
- mkdir -p $out/share/emacs/site-lisp/
- cp misc/emacs/gn-mode.el* $out/share/emacs/site-lisp/
- '';
-}
diff --git a/pkgs/applications/editors/emacs-modes/graphviz-dot/default.nix b/pkgs/applications/editors/emacs-modes/graphviz-dot/default.nix
deleted file mode 100644
index a08f138bed95..000000000000
--- a/pkgs/applications/editors/emacs-modes/graphviz-dot/default.nix
+++ /dev/null
@@ -1,25 +0,0 @@
-{ stdenv, fetchurl, emacs }:
-
-stdenv.mkDerivation rec {
- name = "graphviz-dot-mode-0.3.3";
-
- src = fetchurl {
- url = "http://www.graphviz.org/Misc/graphviz-dot-mode.el";
- sha256 = "6465c18cfaa519a063cf664207613f70b0a17ac5eabcfaa949b3c4c289842953";
- };
-
- buildInputs = [ emacs ];
-
- dontUnpack = true;
-
- installPhase = ''
- mkdir -p "$out/share/emacs/site-lisp"
- cp -v ${src} "$out/share/emacs/site-lisp/graphviz-dot-mode.el"
- emacs -batch --eval '(setq load-path (cons "." load-path))' -f batch-byte-compile "$out/share/emacs/site-lisp/graphviz-dot-mode.el"
- '';
-
- meta = {
- homepage = http://www.graphviz.org/;
- description = "An emacs mode for the DOT Language, used by graphviz";
- };
-}
diff --git a/pkgs/applications/editors/emacs-modes/haskell/default.nix b/pkgs/applications/editors/emacs-modes/haskell/default.nix
deleted file mode 100644
index 6b10766bedb7..000000000000
--- a/pkgs/applications/editors/emacs-modes/haskell/default.nix
+++ /dev/null
@@ -1,42 +0,0 @@
-{ stdenv, fetchFromGitHub, emacs, texinfo }:
-
-# Use "emacsMelpa.haskell-mode" instead.
-
-let
- version = "13.14-169-g0d3569d"; # git describe --tags
-in
-stdenv.mkDerivation {
- name = "haskell-mode-${version}";
-
- src = fetchFromGitHub {
- owner = "haskell";
- repo = "haskell-mode";
- rev = "v${version}";
- sha256 = "0v5iy9wy05hf44wy7qs0c9q0v34m4k6wrqg4kyvji61568k1yx3k";
- };
-
- buildInputs = [ emacs texinfo ];
-
- makeFlags = "VERSION=v${version} GIT_VERSION=v${version}";
-
- installPhase = ''
- mkdir -p $out/share/emacs/site-lisp
- cp *.el *.elc *.hs $out/share/emacs/site-lisp/
- mkdir -p $out/share/info
- cp -v *.info* $out/share/info/
- '';
-
- # The test suite must run *after* copying the generated files to $out
- # because "make check" implies "make clean".
- doInstallCheck = true;
- installCheckTarget = "check";
-
- meta = {
- homepage = https://github.com/haskell/haskell-mode;
- description = "Haskell mode for Emacs";
-
- platforms = stdenv.lib.platforms.unix;
- maintainers = [ stdenv.lib.maintainers.peti ];
- broken = true; # no longer compiles and this package is obsolete anyway
- };
-}
diff --git a/pkgs/applications/editors/emacs-modes/helm-words/default.nix b/pkgs/applications/editors/emacs-modes/helm-words/default.nix
index b28d0ae24a34..c6e1c5a50f4a 100644
--- a/pkgs/applications/editors/emacs-modes/helm-words/default.nix
+++ b/pkgs/applications/editors/emacs-modes/helm-words/default.nix
@@ -1,12 +1,12 @@
{ stdenv, fetchgit }:
stdenv.mkDerivation {
- name = "helm-words-20150413";
+ name = "helm-words-20190917";
src = fetchgit {
url = "https://github.com/pronobis/helm-words.git";
- rev = "637aa3a7e9cfd34e0127472c5b1f993a4da26185";
- sha256 = "19l8vysjygscr1nsddjz2yv0fjhbsswfq40rdny8zsmaa6qhpj35";
+ rev = "e6387ece1940a06695b9d910de3d90252efb8d29";
+ sha256 = "1ly0mbzlgc26fqvf7rxpmy698g0cf9qldrwrx022ar6r68l1h7xf";
};
installPhase = ''
diff --git a/pkgs/applications/editors/emacs-modes/hol_light/default.nix b/pkgs/applications/editors/emacs-modes/hol_light/default.nix
index c32669239f88..255b30d60ed1 100644
--- a/pkgs/applications/editors/emacs-modes/hol_light/default.nix
+++ b/pkgs/applications/editors/emacs-modes/hol_light/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchsvn }:
stdenv.mkDerivation rec {
- name = "hol_light-mode-${version}";
+ pname = "hol_light-mode";
version = "73";
src = fetchsvn {
@@ -22,5 +22,8 @@ stdenv.mkDerivation rec {
license = stdenv.lib.licenses.gpl2Plus;
platforms = stdenv.lib.platforms.all;
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
+
+ # Fails trying to fetch dependencies in build
+ # broken = true;
};
}
diff --git a/pkgs/applications/editors/emacs-modes/hsc3/default.nix b/pkgs/applications/editors/emacs-modes/hsc3/default.nix
index 199a5886e1df..75b72516a3cd 100644
--- a/pkgs/applications/editors/emacs-modes/hsc3/default.nix
+++ b/pkgs/applications/editors/emacs-modes/hsc3/default.nix
@@ -6,7 +6,8 @@
let version = "0.15";
in stdenv.mkDerivation {
- name = "hsc3-mode-${version}";
+ pname = "hsc3-mode";
+ inherit version;
src = fetchurl {
url = mirror://hackage/hsc3-0.15/hsc3-0.15.tar.gz;
sha256 = "2f3b15655419cf8ebe25ab1c6ec22993b2589b4ffca7c3a75ce478ca78a0bde6";
diff --git a/pkgs/applications/editors/emacs-modes/htmlize/default.nix b/pkgs/applications/editors/emacs-modes/htmlize/default.nix
deleted file mode 100644
index c16f449c3a24..000000000000
--- a/pkgs/applications/editors/emacs-modes/htmlize/default.nix
+++ /dev/null
@@ -1,22 +0,0 @@
-{ stdenv, fetchFromGitHub }:
-
-stdenv.mkDerivation {
- name = "htmlize-1.47";
-
- src = fetchFromGitHub {
- owner = "emacsmirror";
- repo = "htmlize";
- rev = "release/1.47";
- name = "htmlize-1.47-src";
- sha256 = "1vkqxgirc82vc44g7xhhr041arf93yirjin3h144kjyfkgkplnkp";
- };
-
- installPhase = ''
- mkdir -p $out/share/emacs/site-lisp
- cp htmlize.el $out/share/emacs/site-lisp/
- '';
-
- meta = {
- description = "Convert buffer text and decorations to HTML";
- };
-}
diff --git a/pkgs/applications/editors/emacs-modes/icicles/default.nix b/pkgs/applications/editors/emacs-modes/icicles/default.nix
index 17cf213a799d..27dcd1063bf2 100644
--- a/pkgs/applications/editors/emacs-modes/icicles/default.nix
+++ b/pkgs/applications/editors/emacs-modes/icicles/default.nix
@@ -21,7 +21,7 @@ let
in
stdenv.mkDerivation rec {
version = "2019-02-22";
- name = "icicles-${version}";
+ pname = "icicles";
srcs = forAll ({name, sha256}: fetchurl { url = "https://www.emacswiki.org/emacs/download/${name}"; inherit sha256; });
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
buildPhase = "emacs --batch -L . -f batch-byte-compile *.el";
- installPhase = "mkdir -p $out/share/emacs/site-lisp/emacswiki/${name}/; cp *.el *.elc $out/share/emacs/site-lisp/emacswiki/${name}/";
+ installPhase = "mkdir -p $out/share/emacs/site-lisp/emacswiki/${pname}-${version}/; cp *.el *.elc $out/share/emacs/site-lisp/emacswiki/${pname}-${version}/";
meta = {
homepage = https://www.emacswiki.org/emacs/Icicles;
diff --git a/pkgs/applications/editors/emacs-modes/ido-ubiquitous/default.nix b/pkgs/applications/editors/emacs-modes/ido-ubiquitous/default.nix
index 3cc8156337e0..eaa0f2c2a5b1 100644
--- a/pkgs/applications/editors/emacs-modes/ido-ubiquitous/default.nix
+++ b/pkgs/applications/editors/emacs-modes/ido-ubiquitous/default.nix
@@ -4,7 +4,8 @@ let
version = "3.6-4-gb659bf8";
in
stdenv.mkDerivation {
- name = "ido-ubiquitous-${version}";
+ pname = "ido-ubiquitous";
+ inherit version;
src = fetchFromGitHub {
owner = "DarwinAwardWinner";
diff --git a/pkgs/applications/editors/emacs-modes/idris/default.nix b/pkgs/applications/editors/emacs-modes/idris/default.nix
deleted file mode 100644
index 2e168b3abf7f..000000000000
--- a/pkgs/applications/editors/emacs-modes/idris/default.nix
+++ /dev/null
@@ -1,31 +0,0 @@
-{ stdenv, fetchurl, emacs }:
-
-stdenv.mkDerivation rec {
- name = "${pname}-${version}";
- pname = "idris-mode";
- version = "0.9.18";
-
- src = fetchurl {
- url = "https://github.com/idris-hackers/${pname}/archive/${version}.tar.gz";
- sha256 = "06rw5lrxqqnw0kni3x9jm73x352d1vb683d41v8x3yzqfa2sxmwg";
- };
-
- buildInputs = [ emacs ];
-
- buildPhase = ''
- emacs -L . --batch -f batch-byte-compile *.el
- '';
-
- installPhase = ''
- install -d $out/share/emacs/site-lisp
- install *.el *.elc $out/share/emacs/site-lisp
- '';
-
- meta = {
- description = "Emacs major mode for Idris";
- homepage = https://github.com/idris-hackers/idris-mode;
- license = stdenv.lib.licenses.gpl3;
-
- platforms = stdenv.lib.platforms.all;
- };
-}
diff --git a/pkgs/applications/editors/emacs-modes/jabber/default.nix b/pkgs/applications/editors/emacs-modes/jabber/default.nix
deleted file mode 100644
index c0ddbc88cf27..000000000000
--- a/pkgs/applications/editors/emacs-modes/jabber/default.nix
+++ /dev/null
@@ -1,23 +0,0 @@
-{ stdenv, fetchurl, emacs }:
-stdenv.mkDerivation rec {
- pname = "emacs-jabber";
- version = "0.8.0";
- name = "${pname}-${version}";
- src = fetchurl {
- url = "mirror://sourceforge/${pname}/${name}.tar.bz2";
- sha256 = "75e3b7853de4783b8ab8270dcbe6a1e4f576224f77f7463116532e11c6498c26";
- };
- buildInputs = [ emacs ];
- meta = with stdenv.lib; {
- description = "A Jabber client for Emacs";
- longDescription = ''
- jabber.el is a Jabber client for Emacs. It may seem strange to have a
- chat client in an editor, but consider that chatting is, after all, just
- a special case of text editing.
- '';
- homepage = http://emacs-jabber.sourceforge.net/;
- license = licenses.gpl2Plus;
- maintainers = with maintainers; [ astsmtl ];
- platforms = platforms.linux;
- };
-}
diff --git a/pkgs/applications/editors/emacs-modes/jade/default.nix b/pkgs/applications/editors/emacs-modes/jade/default.nix
deleted file mode 100644
index 925fa54c735f..000000000000
--- a/pkgs/applications/editors/emacs-modes/jade/default.nix
+++ /dev/null
@@ -1,30 +0,0 @@
-{ stdenv, fetchgit, emacs }:
-
-stdenv.mkDerivation {
- name = "jade-mode-0-20120802";
-
- src = fetchgit {
- url = "https://github.com/brianc/jade-mode.git";
- rev = "275ab149edb0f6bcfae6ac17ba456f3351191604";
- sha256 = "3cd2bebcd66e59d60b8e5e538e65a8ffdfc9a53b86443090a284e8329d7cb09b";
- };
-
- buildInputs = [ emacs ];
-
- buildPhase = ''
- emacs --batch -L . -f batch-byte-compile *.el
- '';
-
- installPhase = ''
- mkdir -p $out/share/emacs/site-lisp
- cp *.el *.elc $out/share/emacs/site-lisp/
- '';
-
- meta = {
- description = "Emacs major mode for jade and stylus";
- homepage = https://github.com/brianc/jade-mode;
- license = stdenv.lib.licenses.gpl2Plus;
-
- platforms = stdenv.lib.platforms.all;
- };
-}
diff --git a/pkgs/applications/editors/emacs-modes/jdee/build-properties.patch b/pkgs/applications/editors/emacs-modes/jdee/build-properties.patch
deleted file mode 100644
index d0a733b912e3..000000000000
--- a/pkgs/applications/editors/emacs-modes/jdee/build-properties.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Make sure `build.properties' is honored.
-
---- jde/build.xml
-+++ jde/build.xml
-@@ -14,6 +14,7 @@
-
-
-
-+
-
-
-
diff --git a/pkgs/applications/editors/emacs-modes/jdee/cedet-paths.patch b/pkgs/applications/editors/emacs-modes/jdee/cedet-paths.patch
deleted file mode 100644
index 8c866e2d1db3..000000000000
--- a/pkgs/applications/editors/emacs-modes/jdee/cedet-paths.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-JDE insists on seeing CEDET's source tree layout, with various
-sub-directories (`common', `eieio', etc.). However, the installed CEDET
-is flat, with everything under ${cedet}/share/emacs/site-lisp.
-
---- jde/config/build.el (revision 90)
-+++ jde/config/build.el (working copy)
-@@ -50,10 +50,5 @@ PATHS are sub directories under CEDET-DI
- (jde-make-autoloads-and-compile (expand-file-name "@{build.lisp.dir}")
- "@{src.lisp.dir}"
- "@{cedet.dir}"
-- '("common"
-- "eieio"
-- "semantic"
-- "semantic/bovine"
-- "speedbar"
-- )
-+ '(".")
- "@{build.lisp.autoload.libname}")
diff --git a/pkgs/applications/editors/emacs-modes/jdee/default.nix b/pkgs/applications/editors/emacs-modes/jdee/default.nix
deleted file mode 100644
index 306fe66823c8..000000000000
--- a/pkgs/applications/editors/emacs-modes/jdee/default.nix
+++ /dev/null
@@ -1,99 +0,0 @@
-{ fetchsvn, stdenv, emacs, cedet, ant }:
-
-let
- revision = "137";
-in
- stdenv.mkDerivation rec {
- name = "jdee-svn${revision}";
-
- # Last release is too old, so use SVN.
- # See http://www.emacswiki.org/emacs/JavaDevelopmentEnvironment .
- src = fetchsvn {
- url = "https://jdee.svn.sourceforge.net/svnroot/jdee/trunk/jdee";
- rev = revision;
- sha256 = "1z1y957glbqm7z3dhah9h4jysw3173pq1gpx5agfwcw614n516xz";
- };
-
- patchFlags = "-p1 --ignore-whitespace";
-
- patches = [
- ./build-properties.patch
- ./cedet-paths.patch ./elib-avltree.patch
- ./java-directory.patch
- ];
-
- configurePhase = ''
- mkdir -p "dist"
- cat > build.properties < /dev/null || git commit -m "elpa-packages: $(date --iso)" -- elpa-generated.nix
+
+curl -s -O https://raw.githubusercontent.com/nix-community/emacs-overlay/master/repos/melpa/recipes-archive-melpa.json
+env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate --show-trace ../../../../ -A emacsPackages.melpaStablePackages
+env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate --show-trace ../../../../ -A emacsPackages.melpaPackages
+git diff --exit-code recipes-archive-melpa.json > /dev/null || git commit -m "melpa-packages: $(date --iso)" -- recipes-archive-melpa.json
diff --git a/pkgs/applications/editors/emacs-modes/update-melpa b/pkgs/applications/editors/emacs-modes/update-melpa
index 2b2af5cb2bbe..5c636416a5e6 100755
--- a/pkgs/applications/editors/emacs-modes/update-melpa
+++ b/pkgs/applications/editors/emacs-modes/update-melpa
@@ -1,8 +1,6 @@
#! /usr/bin/env nix-shell
-#! nix-shell --show-trace -i sh -p git nix nix-prefetch-git nix-prefetch-hg "import ./updater-emacs.nix"
+#! nix-shell --show-trace ./updater-emacs.nix -i bash
-# "with import ../../../.. {}; emacsWithPackages (epkgs: with epkgs.melpaPackages; [ promise semaphore ])"
+SCRIPT_DIR="$( cd "$(dirname "$0")" ; pwd -P )"
-exec emacs --fg-daemon=updater --quick -l update-melpa.el -f run-updater "$@"
-
-# exec emacs update-melpa.el "$@"
+exec emacs --fg-daemon=updater --quick -l $SCRIPT_DIR/update-melpa.el -f run-updater "$@"
diff --git a/pkgs/applications/editors/emacs-modes/update-org b/pkgs/applications/editors/emacs-modes/update-org
new file mode 100755
index 000000000000..2119a1672287
--- /dev/null
+++ b/pkgs/applications/editors/emacs-modes/update-org
@@ -0,0 +1,4 @@
+#! /usr/bin/env nix-shell
+#! nix-shell --show-trace ./emacs2nix.nix -i bash
+
+exec org-packages.sh --names $EMACS2NIX/names.nix -o org-generated.nix
diff --git a/pkgs/applications/editors/emacs-modes/updater-emacs.nix b/pkgs/applications/editors/emacs-modes/updater-emacs.nix
index b64a410e7b40..518ee67e4512 100644
--- a/pkgs/applications/editors/emacs-modes/updater-emacs.nix
+++ b/pkgs/applications/editors/emacs-modes/updater-emacs.nix
@@ -1,29 +1,40 @@
-with import ../../../.. {};
-(emacsPackagesNgFor emacs26).
-emacsWithPackages (epkgs: let
- promise = epkgs.trivialBuild {
- pname = "promise";
- version = "1";
- src = fetchFromGitHub {
- owner = "bendlas";
- repo = "emacs-promise";
- rev = "4da97087c5babbd8429b5ce62a8323b9b03c6022";
- sha256 = "0yin7kj69g4zxs30pvk47cnfygxlaw7jc7chr3b36lz51yqczjsy";
-
+let
+ pkgs = import ../../../.. {};
+
+ emacsEnv = (pkgs.emacsPackagesFor pkgs.emacs26).emacsWithPackages (epkgs: let
+
+ promise = epkgs.trivialBuild {
+ pname = "promise";
+ version = "1";
+ src = pkgs.fetchFromGitHub {
+ owner = "bendlas";
+ repo = "emacs-promise";
+ rev = "4da97087c5babbd8429b5ce62a8323b9b03c6022";
+ sha256 = "0yin7kj69g4zxs30pvk47cnfygxlaw7jc7chr3b36lz51yqczjsy";
+ };
};
- };
- semaphore = epkgs.trivialBuild {
- pname = "semaphore";
- version = "1";
- packageRequires = [ promise ];
- src = fetchFromGitHub {
- owner = "webnf";
- repo = "semaphore.el";
- rev = "93802cb093073bc6a6ccd797328dafffcef248e0";
- sha256 = "09pfyp27m35sv340xarhld7xx2vv5fs5xj4418709iw6l6hpk853";
-
+
+ semaphore = epkgs.trivialBuild {
+ pname = "semaphore";
+ version = "1";
+ packageRequires = [ promise ];
+ src = pkgs.fetchFromGitHub {
+ owner = "webnf";
+ repo = "semaphore.el";
+ rev = "93802cb093073bc6a6ccd797328dafffcef248e0";
+ sha256 = "09pfyp27m35sv340xarhld7xx2vv5fs5xj4418709iw6l6hpk853";
+ };
};
- };
- in [ promise semaphore ]
- # ++ (with epkgs.melpaPackages; [ smex rainbow-delimiters paredit ])
-)
+
+ in [ promise semaphore ]);
+
+in pkgs.mkShell {
+ buildInputs = [
+ pkgs.git
+ pkgs.nix
+ pkgs.bash
+ pkgs.nix-prefetch-git
+ pkgs.nix-prefetch-hg
+ emacsEnv
+ ];
+}
diff --git a/pkgs/applications/editors/emacs-modes/writegood/default.nix b/pkgs/applications/editors/emacs-modes/writegood/default.nix
deleted file mode 100644
index 6d0631a4cb83..000000000000
--- a/pkgs/applications/editors/emacs-modes/writegood/default.nix
+++ /dev/null
@@ -1,30 +0,0 @@
-{stdenv, fetchurl, emacs}:
-
-let version = "2.0.2";
-
-in stdenv.mkDerivation {
- name = "writegood-mode-${version}";
- src = fetchurl {
- url = "https://github.com/bnbeckwith/writegood-mode/archive/v${version}.tar.gz";
- sha256 = "1ilbqj24vzpfh9n1wph7idj0914ga290jkpv9kr1pff3a0v5hf6k";
- };
-
- buildInputs = [ emacs ];
-
- buildPhase = ''
- emacs -L . --batch -f batch-byte-compile *.el
- '';
-
- installPhase = ''
- install -d $out/share/emacs/site-lisp
- install *.el *.elc $out/share/emacs/site-lisp
- '';
-
- meta = {
- description = "Emacs minor mode that aids in finding common writing problems";
- homepage = https://github.com/bnbeckwith/writegood-mode;
- platforms = stdenv.lib.platforms.all;
- maintainers = [ stdenv.lib.maintainers.pSub ];
- license = stdenv.lib.licenses.gpl3;
- };
-}
diff --git a/pkgs/applications/editors/emacs-modes/xml-rpc/default.nix b/pkgs/applications/editors/emacs-modes/xml-rpc/default.nix
deleted file mode 100644
index 661430516b70..000000000000
--- a/pkgs/applications/editors/emacs-modes/xml-rpc/default.nix
+++ /dev/null
@@ -1,32 +0,0 @@
-{stdenv, fetchurl, emacs}:
-
-stdenv.mkDerivation rec {
- name = "xml-rpc-1.6.8";
-
- src = fetchurl {
- url = https://launchpadlibrarian.net/40270196/xml-rpc.el;
- sha256 = "0i8hf90yhrjwqrv7q1f2g1cff6ld8apqkka42fh01wkdys1fbm7b";
- };
-
- phases = [ "buildPhase" "installPhase"];
-
- buildInputs = [ emacs ];
-
- buildPhase = ''
- cp $src xml-rpc.el
- emacs --batch -f batch-byte-compile xml-rpc.el
- '';
-
- installPhase = ''
- install -d $out/share/emacs/site-lisp
- install xml-rpc.el* $out/share/emacs/site-lisp
- '';
-
- meta = {
- description = "Elisp implementation of clientside XML-RPC";
- homepage = https://launchpad.net/xml-rpc-el;
- license = stdenv.lib.licenses.gpl3Plus;
-
- platforms = stdenv.lib.platforms.all;
- };
-}
diff --git a/pkgs/applications/editors/emacs-modes/yaoddmuse/default.nix b/pkgs/applications/editors/emacs-modes/yaoddmuse/default.nix
index e147fd53b229..209a99245ecd 100644
--- a/pkgs/applications/editors/emacs-modes/yaoddmuse/default.nix
+++ b/pkgs/applications/editors/emacs-modes/yaoddmuse/default.nix
@@ -1,6 +1,6 @@
{stdenv, fetchurl, emacs}:
-stdenv.mkDerivation rec {
+stdenv.mkDerivation {
name = "yaoddmuse-0.1.2";
src = fetchurl {
diff --git a/pkgs/applications/editors/emacs/default.nix b/pkgs/applications/editors/emacs/default.nix
index 4c95681c43de..29a6a8773eff 100644
--- a/pkgs/applications/editors/emacs/default.nix
+++ b/pkgs/applications/editors/emacs/default.nix
@@ -31,12 +31,12 @@ let
in
stdenv.mkDerivation rec {
name = "emacs-${version}${versionModifier}";
- version = "26.2";
+ version = "26.3";
versionModifier = "";
src = fetchurl {
url = "mirror://gnu/emacs/${name}.tar.xz";
- sha256 = "13n5m60i47k96mpv5pp6km2ph9rv2m5lmbpzj929v02vpsfyc70m";
+ sha256 = "119ldpk7sgn9jlpyngv5y4z3i7bb8q3xp4p0qqi7i5nq39syd42d";
};
enableParallelBuilding = true;
diff --git a/pkgs/applications/editors/emacs/macport.nix b/pkgs/applications/editors/emacs/macport.nix
index d51391595f47..649997171e9f 100644
--- a/pkgs/applications/editors/emacs/macport.nix
+++ b/pkgs/applications/editors/emacs/macport.nix
@@ -4,19 +4,19 @@
}:
stdenv.mkDerivation rec {
- emacsVersion = "26.2";
+ emacsVersion = "26.3";
emacsName = "emacs-${emacsVersion}";
- macportVersion = "7.6";
+ macportVersion = "7.7";
name = "emacs-mac-${emacsVersion}-${macportVersion}";
src = fetchurl {
url = "mirror://gnu/emacs/${emacsName}.tar.xz";
- sha256 = "13n5m60i47k96mpv5pp6km2ph9rv2m5lmbpzj929v02vpsfyc70m";
+ sha256 = "119ldpk7sgn9jlpyngv5y4z3i7bb8q3xp4p0qqi7i5nq39syd42d";
};
macportSrc = fetchurl {
url = "ftp://ftp.math.s.chiba-u.ac.jp/emacs/${emacsName}-mac-${macportVersion}.tar.gz";
- sha256 = "00szqb74ds89m34sx5mq0gxhsrz64j691sxyvqncj10hw17d0y61";
+ sha256 = "18jadknm47ymbl7skrgc7y8xsdldcbgnlfl7qpgzm1ym8d92as6j";
};
hiresSrc = fetchurl {
diff --git a/pkgs/applications/editors/featherpad/default.nix b/pkgs/applications/editors/featherpad/default.nix
index 6d420599152a..e48fba1551e7 100644
--- a/pkgs/applications/editors/featherpad/default.nix
+++ b/pkgs/applications/editors/featherpad/default.nix
@@ -4,7 +4,7 @@ with qt5;
stdenv.mkDerivation rec {
version = "0.10.0";
- name = "featherpad-${version}";
+ pname = "featherpad";
src = fetchFromGitHub {
owner = "tsujan";
repo = "FeatherPad";
diff --git a/pkgs/applications/editors/flpsed/default.nix b/pkgs/applications/editors/flpsed/default.nix
index 104206a14913..b8b11e5e831e 100644
--- a/pkgs/applications/editors/flpsed/default.nix
+++ b/pkgs/applications/editors/flpsed/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, fltk13, ghostscript }:
stdenv.mkDerivation rec {
- name = "flpsed-${version}";
+ pname = "flpsed";
version = "0.7.3";
src = fetchurl {
- url = "http://www.flpsed.org/${name}.tar.gz";
+ url = "http://www.flpsed.org/${pname}-${version}.tar.gz";
sha256 = "0vngqxanykicabhfdznisv82k5ypkxwg0s93ms9ribvhpm8vf2xp";
};
diff --git a/pkgs/applications/editors/focuswriter/default.nix b/pkgs/applications/editors/focuswriter/default.nix
index ce553fa8b288..b08e3b5fa23c 100644
--- a/pkgs/applications/editors/focuswriter/default.nix
+++ b/pkgs/applications/editors/focuswriter/default.nix
@@ -1,12 +1,12 @@
-{ stdenv, fetchurl, pkgconfig, qmake, qttools, hunspell, qtbase, qtmultimedia }:
+{ stdenv, fetchurl, pkgconfig, qmake, qttools, hunspell, qtbase, qtmultimedia, mkDerivation }:
-stdenv.mkDerivation rec {
- name = "focuswriter-${version}";
- version = "1.7.2";
+mkDerivation rec {
+ pname = "focuswriter";
+ version = "1.7.3";
src = fetchurl {
url = "https://gottcode.org/focuswriter/focuswriter-${version}-src.tar.bz2";
- sha256 = "1qsfcrscm3s0h7wcl6qn8zi0irr70zdacjxsdk73kpk1dhl2j85k";
+ sha256 = "155wf7z1g2yx6fb41w29kcb0m2rhnk9ci5yw882yy86s4x20b1jq";
};
nativeBuildInputs = [ pkgconfig qmake qttools ];
diff --git a/pkgs/applications/editors/geany/default.nix b/pkgs/applications/editors/geany/default.nix
index 0ff56e9145fb..1e1a817f092d 100644
--- a/pkgs/applications/editors/geany/default.nix
+++ b/pkgs/applications/editors/geany/default.nix
@@ -3,15 +3,16 @@
with stdenv.lib;
let
- version = "1.35";
+ version = "1.36";
in
stdenv.mkDerivation rec {
- name = "geany-${version}";
+ pname = "geany";
+ inherit version;
src = fetchurl {
- url = "https://download.geany.org/${name}.tar.bz2";
- sha256 = "179xfnvhcxsv54v2mlrhykqv2j7klniln5sffvqqpjmdvwyivvim";
+ url = "https://download.geany.org/${pname}-${version}.tar.bz2";
+ sha256 = "0gnm17cr4rf3pmkf0axz4a0fxwnvp55ji0q0lzy88yqbshyxv14i";
};
nativeBuildInputs = [ pkgconfig intltool libintl ];
diff --git a/pkgs/applications/editors/geany/with-vte.nix b/pkgs/applications/editors/geany/with-vte.nix
index ac35560c7f63..f7351454fb8c 100644
--- a/pkgs/applications/editors/geany/with-vte.nix
+++ b/pkgs/applications/editors/geany/with-vte.nix
@@ -1,7 +1,7 @@
{ runCommand, makeWrapper, geany, gnome2 }:
let name = builtins.replaceStrings ["geany-"] ["geany-with-vte-"] geany.name;
in
-runCommand "${name}" { nativeBuildInputs = [ makeWrapper ]; inherit (geany.meta); } "
+runCommand name { nativeBuildInputs = [ makeWrapper ]; inherit (geany.meta); } "
mkdir -p $out
ln -s ${geany}/share $out
makeWrapper ${geany}/bin/geany $out/bin/geany --prefix LD_LIBRARY_PATH : ${gnome2.vte}/lib
diff --git a/pkgs/applications/editors/gnome-builder/default.nix b/pkgs/applications/editors/gnome-builder/default.nix
index 748fbfc42d54..6ac2c6d4964c 100644
--- a/pkgs/applications/editors/gnome-builder/default.nix
+++ b/pkgs/applications/editors/gnome-builder/default.nix
@@ -1,4 +1,4 @@
-{ gcc8Stdenv
+{ stdenv
, ctags
, appstream-glib
, desktop-file-utils
@@ -13,7 +13,6 @@
, gtk-doc
, gtk3
, gtksourceview4
-, hicolor-icon-theme
, json-glib
, jsonrpc-glib
, libdazzle
@@ -23,6 +22,7 @@
, ninja
, ostree
, pcre
+, pcre2
, pkgconfig
, python3
, sysprof
@@ -33,20 +33,16 @@
, wrapGAppsHook
, dbus
, xvfb_run
+, glib
}:
-let
- # Does not build with GCC 7
- # https://gitlab.gnome.org/GNOME/gnome-builder/issues/868
- stdenv = gcc8Stdenv;
-in
stdenv.mkDerivation rec {
pname = "gnome-builder";
- version = "3.32.3";
+ version = "3.34.1";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
- sha256 = "1vlr69sgiv3kg2qa3n7aw3913bmvlcpyhy3w8lls13wjrgif4wny";
+ sha256 = "19018pq94cxf6fywd7fsmy98x56by5zfmh140pl530gaaw84cvhb";
};
nativeBuildInputs = [
@@ -56,7 +52,6 @@ stdenv.mkDerivation rec {
docbook_xml_dtd_43
gobject-introspection
gtk-doc
- hicolor-icon-theme
(meson.override ({ inherit stdenv; }))
ninja
pkgconfig
@@ -82,6 +77,7 @@ stdenv.mkDerivation rec {
libxml2
ostree
pcre
+ pcre2
python3
sysprof
template-glib
@@ -100,6 +96,8 @@ stdenv.mkDerivation rec {
patchShebangs build-aux/meson/post_install.py
'';
+ NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0";
+
mesonFlags = [
"-Dpython_libprefix=${python3.libPrefix}"
"-Ddocs=true"
diff --git a/pkgs/applications/editors/gobby/default.nix b/pkgs/applications/editors/gobby/default.nix
index ec05f0f82622..3abe2834db46 100644
--- a/pkgs/applications/editors/gobby/default.nix
+++ b/pkgs/applications/editors/gobby/default.nix
@@ -4,7 +4,7 @@
let
libinf = libinfinity.override { gtkWidgets = true; inherit avahiSupport; };
-in stdenv.mkDerivation rec {
+in stdenv.mkDerivation {
name = "gobby-unstable-2018-04-03";
src = fetchFromGitHub {
owner = "gobby";
diff --git a/pkgs/applications/editors/hecate/default.nix b/pkgs/applications/editors/hecate/default.nix
index 8aea8508aefd..de57fb092157 100644
--- a/pkgs/applications/editors/hecate/default.nix
+++ b/pkgs/applications/editors/hecate/default.nix
@@ -2,7 +2,7 @@
buildGoPackage rec {
version = "0.0.1";
- name = "hecate-${version}";
+ pname = "hecate";
src = fetchFromGitHub {
owner = "evanmiller";
diff --git a/pkgs/applications/editors/heme/default.nix b/pkgs/applications/editors/heme/default.nix
index dce02b568906..4e67fc304b18 100644
--- a/pkgs/applications/editors/heme/default.nix
+++ b/pkgs/applications/editors/heme/default.nix
@@ -1,7 +1,7 @@
{ stdenv, lib, fetchurl, ncurses }:
stdenv.mkDerivation rec {
- name = "heme-${version}";
+ pname = "heme";
version = "0.4.2";
src = fetchurl {
url = "mirror://sourceforge/project/heme/heme/heme-${version}/heme-${version}.tar.gz";
diff --git a/pkgs/applications/editors/hexcurse/default.nix b/pkgs/applications/editors/hexcurse/default.nix
index 22cc4d47e680..a6437f070b98 100644
--- a/pkgs/applications/editors/hexcurse/default.nix
+++ b/pkgs/applications/editors/hexcurse/default.nix
@@ -1,7 +1,7 @@
{ stdenv, lib, fetchFromGitHub, fetchpatch, ncurses }:
stdenv.mkDerivation rec {
- name = "hexcurse-${version}";
+ pname = "hexcurse";
version = "1.60.0";
src = fetchFromGitHub {
diff --git a/pkgs/applications/editors/hexedit/default.nix b/pkgs/applications/editors/hexedit/default.nix
index 4671df77554f..09191b38e1bc 100644
--- a/pkgs/applications/editors/hexedit/default.nix
+++ b/pkgs/applications/editors/hexedit/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, ncurses }:
stdenv.mkDerivation rec {
- name = "hexedit-${version}";
+ pname = "hexedit";
version = "1.2.13";
src = fetchurl {
- url = "http://rigaux.org/${name}.src.tgz";
+ url = "http://rigaux.org/${pname}-${version}.src.tgz";
sha256 = "1mwdp1ikk64cqmagnrrps5jkn3li3n47maiqh2qc1xbp1ains4ka";
};
diff --git a/pkgs/applications/editors/howl/default.nix b/pkgs/applications/editors/howl/default.nix
index e7f200a4c077..5e5f2f8563cb 100644
--- a/pkgs/applications/editors/howl/default.nix
+++ b/pkgs/applications/editors/howl/default.nix
@@ -3,7 +3,7 @@
with stdenv.lib;
stdenv.mkDerivation rec {
- name = "howl-${version}";
+ pname = "howl";
version = "0.6";
# Use the release tarball containing pre-downloaded dependencies sources
diff --git a/pkgs/applications/editors/ht/default.nix b/pkgs/applications/editors/ht/default.nix
index 63864bc581df..fc1fe969bdc0 100644
--- a/pkgs/applications/editors/ht/default.nix
+++ b/pkgs/applications/editors/ht/default.nix
@@ -1,7 +1,7 @@
{ stdenv, lib, fetchurl, ncurses }:
stdenv.mkDerivation rec {
- name = "ht-${version}";
+ pname = "ht";
version = "2.1.0";
src = fetchurl {
diff --git a/pkgs/applications/editors/jedit/default.nix b/pkgs/applications/editors/jedit/default.nix
index 11322e8240c2..21a6a8475182 100644
--- a/pkgs/applications/editors/jedit/default.nix
+++ b/pkgs/applications/editors/jedit/default.nix
@@ -13,7 +13,8 @@ let
in
stdenv.mkDerivation {
- name = "jedit-${version}";
+ pname = "jedit";
+ inherit version;
src = fetchurl {
url = "mirror://sourceforge/jedit/jedit${version}source.tar.bz2";
sha256 = "03wmbh90rl5lsc35d7jwcp9j5qyyzq1nccxf4fal8bmnx8n4si0x";
diff --git a/pkgs/applications/editors/jetbrains/common.nix b/pkgs/applications/editors/jetbrains/common.nix
index be20800cde29..bca85c01016a 100644
--- a/pkgs/applications/editors/jetbrains/common.nix
+++ b/pkgs/applications/editors/jetbrains/common.nix
@@ -1,4 +1,4 @@
-{ stdenv, makeDesktopItem, makeWrapper, patchelf, p7zip
+{ stdenv, lib, makeDesktopItem, makeWrapper, patchelf, p7zip
, coreutils, gnugrep, which, git, unzip, libsecret, libnotify
}:
@@ -28,7 +28,7 @@ with stdenv; lib.makeOverridable mkDerivation rec {
nativeBuildInputs = [ makeWrapper patchelf p7zip unzip ];
- patchPhase = ''
+ patchPhase = lib.optionalString (!stdenv.isDarwin) ''
get_file_size() {
local fname="$1"
echo $(ls -l $fname | cut -d ' ' -f5)
@@ -63,7 +63,7 @@ with stdenv; lib.makeOverridable mkDerivation rec {
item=${desktopItem}
makeWrapper "$out/$name/bin/${loName}.sh" "$out/bin/${execName}" \
- --prefix PATH : "$out/libexec/${name}:${stdenv.lib.makeBinPath [ jdk coreutils gnugrep which git ]}" \
+ --prefix PATH : "$out/libexec/${name}:${lib.optionalString (stdenv.isDarwin) "${jdk}/jdk/Contents/Home/bin:"}${stdenv.lib.makeBinPath [ jdk coreutils gnugrep which git ]}" \
--prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [
# Some internals want libstdc++.so.6
stdenv.cc.cc.lib libsecret
@@ -77,4 +77,6 @@ with stdenv; lib.makeOverridable mkDerivation rec {
ln -s "$item/share/applications" $out/share
'';
+} // stdenv.lib.optionalAttrs (!(meta.license.free or true)) {
+ preferLocalBuild = true;
}
diff --git a/pkgs/applications/editors/jetbrains/default.nix b/pkgs/applications/editors/jetbrains/default.nix
index eb6bbabdea44..16d5609934dd 100644
--- a/pkgs/applications/editors/jetbrains/default.nix
+++ b/pkgs/applications/editors/jetbrains/default.nix
@@ -1,6 +1,6 @@
{ lib, stdenv, callPackage, fetchurl
, python
-, jdk, cmake, libxml2, zlib, python3, ncurses
+, jdk, cmake, libxml2, zlib, python3, ncurses5
}:
with stdenv.lib;
@@ -11,7 +11,7 @@ let
# Sorted alphabetically
buildClion = { name, version, src, license, description, wmClass, ... }:
- lib.overrideDerivation (mkJetBrainsProduct rec {
+ lib.overrideDerivation (mkJetBrainsProduct {
inherit name version src wmClass jdk;
product = "CLion";
meta = with stdenv.lib; {
@@ -34,7 +34,7 @@ let
lldbLibPath=$out/clion-${version}/bin/lldb/linux/lib
interp="$(cat $NIX_CC/nix-support/dynamic-linker)"
- ln -s ${ncurses.out}/lib/libncurses.so $lldbLibPath/libtinfo.so.5
+ ln -s ${ncurses5.out}/lib/libtinfo.so.5 $lldbLibPath/libtinfo.so.5
patchelf --set-interpreter $interp \
--set-rpath "${lib.makeLibraryPath [ libxml2 zlib stdenv.cc.cc.lib ]}:$lldbLibPath" \
@@ -121,7 +121,7 @@ let
});
buildIdea = { name, version, src, license, description, wmClass, ... }:
- (mkJetBrainsProduct rec {
+ (mkJetBrainsProduct {
inherit name version src wmClass jdk;
product = "IDEA";
meta = with stdenv.lib; {
@@ -134,7 +134,7 @@ let
as IntelliJ.
'';
maintainers = with maintainers; [ edwtjo ];
- platforms = platforms.linux;
+ platforms = platforms.linux ++ platforms.darwin;
};
});
@@ -156,7 +156,7 @@ let
});
buildPycharm = { name, version, src, license, description, wmClass, ... }:
- (mkJetBrainsProduct rec {
+ (mkJetBrainsProduct {
inherit name version src wmClass jdk;
product = "PyCharm";
meta = with stdenv.lib; {
@@ -183,7 +183,7 @@ let
};
buildRider = { name, version, src, license, description, wmClass, ... }:
- lib.overrideDerivation (mkJetBrainsProduct rec {
+ lib.overrideDerivation (mkJetBrainsProduct {
inherit name version src wmClass jdk;
product = "Rider";
meta = with stdenv.lib; {
@@ -201,15 +201,15 @@ let
platforms = platforms.linux;
};
}) (attrs: {
- patchPhase = attrs.patchPhase + ''
+ patchPhase = lib.optionalString (!stdenv.isDarwin) (attrs.patchPhase + ''
# Patch built-in mono for ReSharperHost to start successfully
interpreter=$(echo ${stdenv.glibc.out}/lib/ld-linux*.so.2)
patchelf --set-interpreter "$interpreter" lib/ReSharperHost/linux-x64/mono/bin/mono-sgen
- '';
+ '');
});
buildRubyMine = { name, version, src, license, description, wmClass, ... }:
- (mkJetBrainsProduct rec {
+ (mkJetBrainsProduct {
inherit name version src wmClass jdk;
product = "RubyMine";
meta = with stdenv.lib; {
@@ -240,7 +240,7 @@ let
patchPhase = (attrs.patchPhase or "") + optionalString (stdenv.isLinux) ''
# Webstorm tries to use bundled jre if available.
# Lets prevent this for the moment
- rm -r jre64
+ rm -r jbr
'';
});
in
@@ -250,12 +250,12 @@ in
clion = buildClion rec {
name = "clion-${version}";
- version = "2019.1.4"; /* updated by script */
+ version = "2019.2.3"; /* updated by script */
description = "C/C++ IDE. New. Intelligent. Cross-platform";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/cpp/CLion-${version}.tar.gz";
- sha256 = "1ccb7g5nzipfmvx6ycg9cn3s7bykpwws62239hg0frlb6xx9y969"; /* updated by script */
+ sha256 = "0kiqbcx64rlz1pajbn326zwy0d1vxdxpvk5xpqkcj7nva611pdq1"; /* updated by script */
};
wmClass = "jetbrains-clion";
update-channel = "CLion RELEASE"; # channel's id as in http://www.jetbrains.com/updates/updates.xml
@@ -263,12 +263,12 @@ in
datagrip = buildDataGrip rec {
name = "datagrip-${version}";
- version = "2019.1.4"; /* updated by script */
+ version = "2019.2.5"; /* updated by script */
description = "Your Swiss Army Knife for Databases and SQL";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/datagrip/${name}.tar.gz";
- sha256 = "0zjcn71fgngkvsixgimzm5afwjbd8zf14zzm6barap4pwp5xx0hb"; /* updated by script */
+ sha256 = "18frmlchalpvc55j25ig2slf2h33gwmbmm8dvc29jb3kgsl0ny7p"; /* updated by script */
};
wmClass = "jetbrains-datagrip";
update-channel = "DataGrip RELEASE";
@@ -276,12 +276,12 @@ in
goland = buildGoland rec {
name = "goland-${version}";
- version = "2019.1.3"; /* updated by script */
+ version = "2019.2.2"; /* updated by script */
description = "Up and Coming Go IDE";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/go/${name}.tar.gz";
- sha256 = "0nw9s4vc7dbj2daxi88m1hqyl3rbzvahbw4mhp409ngac3l2pqmh"; /* updated by script */
+ sha256 = "1wq1prgfn6wc7lc6qjhiykm62c56yrb5rv0hyylcsgdw0q3ns6z2"; /* updated by script */
};
wmClass = "jetbrains-goland";
update-channel = "GoLand RELEASE";
@@ -289,12 +289,12 @@ in
idea-community = buildIdea rec {
name = "idea-community-${version}";
- version = "2019.1.3"; /* updated by script */
+ version = "2019.2.3"; /* updated by script */
description = "Integrated Development Environment (IDE) by Jetbrains, community edition";
license = stdenv.lib.licenses.asl20;
src = fetchurl {
url = "https://download.jetbrains.com/idea/ideaIC-${version}.tar.gz";
- sha256 = "02ddxqwflqrr5xf27s1gmaz7ai400cxzlbiz2wrs9vqsdcpj9jbr"; /* updated by script */
+ sha256 = "0gy42x49yhdnp4ks6445xbc24dxw2vxnl12hdyx03mszdv0r58ni"; /* updated by script */
};
wmClass = "jetbrains-idea-ce";
update-channel = "IntelliJ IDEA RELEASE";
@@ -302,12 +302,12 @@ in
idea-ultimate = buildIdea rec {
name = "idea-ultimate-${version}";
- version = "2019.1.3"; /* updated by script */
+ version = "2019.2.3"; /* updated by script */
description = "Integrated Development Environment (IDE) by Jetbrains, requires paid license";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/idea/ideaIU-${version}-no-jbr.tar.gz";
- sha256 = "0qhj3wai0jb3bg8ddck27ivx2q60xsbk8pj6ryqp5dh75ja4zx1s"; /* updated by script */
+ sha256 = "0allnibq8van3n1c5y85gscbpls0wshwffa6b2l2andw1jkhc259"; /* updated by script */
};
wmClass = "jetbrains-idea";
update-channel = "IntelliJ IDEA RELEASE";
@@ -315,12 +315,12 @@ in
phpstorm = buildPhpStorm rec {
name = "phpstorm-${version}";
- version = "2019.1.3"; /* updated by script */
+ version = "2019.2.3"; /* updated by script */
description = "Professional IDE for Web and PHP developers";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/webide/PhpStorm-${version}.tar.gz";
- sha256 = "04nrdgnyxywy0yfari26ghc371yni1rx3h0pmc4fw02ibbqx1f1y"; /* updated by script */
+ sha256 = "0pra0hmyczxcxnvsc7rqiwhwj23ckx97c9m1wcyn7ik612xwik1i"; /* updated by script */
};
wmClass = "jetbrains-phpstorm";
update-channel = "PhpStorm RELEASE";
@@ -328,12 +328,12 @@ in
pycharm-community = buildPycharm rec {
name = "pycharm-community-${version}";
- version = "2019.1.3"; /* updated by script */
+ version = "2019.2.3"; /* updated by script */
description = "PyCharm Community Edition";
license = stdenv.lib.licenses.asl20;
src = fetchurl {
url = "https://download.jetbrains.com/python/${name}.tar.gz";
- sha256 = "0acwfxp0ky3014zcvmlsig1732h87jvmf2wwjankamrk6ynmlvgh"; /* updated by script */
+ sha256 = "02fynwi54libibgigwggh6xaf5p4046n0kjsqsck1kjbnrlghp10"; /* updated by script */
};
wmClass = "jetbrains-pycharm-ce";
update-channel = "PyCharm RELEASE";
@@ -341,12 +341,12 @@ in
pycharm-professional = buildPycharm rec {
name = "pycharm-professional-${version}";
- version = "2019.1.3"; /* updated by script */
+ version = "2019.2.3"; /* updated by script */
description = "PyCharm Professional Edition";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/python/${name}.tar.gz";
- sha256 = "0948jlpfz5d4k12mn2xrl8z5kc44a3986kl5znvzr5b8h65xw8l3"; /* updated by script */
+ sha256 = "19i3ll8p69n7jw7psv2nkhjq899gljwmc5ixpqhyl203rykavb7n"; /* updated by script */
};
wmClass = "jetbrains-pycharm";
update-channel = "PyCharm RELEASE";
@@ -354,12 +354,12 @@ in
rider = buildRider rec {
name = "rider-${version}";
- version = "2019.1.2"; /* updated by script */
+ version = "2019.2.2"; /* updated by script */
description = "A cross-platform .NET IDE based on the IntelliJ platform and ReSharper";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/rider/JetBrains.Rider-${version}.tar.gz";
- sha256 = "0b0p18pcq4ml8nds4460a1ml8qjsq38kxwdrsh2ca5s194cbaapq"; /* updated by script */
+ sha256 = "1wv5vhiv3w1dwyklx1pr5javp4psqyiv4naq37cvxxp9zh7hk8rc"; /* updated by script */
};
wmClass = "jetbrains-rider";
update-channel = "Rider RELEASE";
@@ -367,12 +367,12 @@ in
ruby-mine = buildRubyMine rec {
name = "ruby-mine-${version}";
- version = "2019.1.2"; /* updated by script */
+ version = "2019.2.3"; /* updated by script */
description = "The Most Intelligent Ruby and Rails IDE";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/ruby/RubyMine-${version}.tar.gz";
- sha256 = "1zhci8nkywv66bwc6hbyh4h3x61qhv2fbmfb5gkw9znkk1qa0q6v"; /* updated by script */
+ sha256 = "0g8yxsq9xn8l8wnmcm0y5y0ll5081s83mmwrb62k4bldlsr25iba"; /* updated by script */
};
wmClass = "jetbrains-rubymine";
update-channel = "RubyMine RELEASE";
@@ -380,12 +380,12 @@ in
webstorm = buildWebStorm rec {
name = "webstorm-${version}";
- version = "2019.1.3"; /* updated by script */
+ version = "2019.2.3"; /* updated by script */
description = "Professional IDE for Web and JavaScript development";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/webstorm/WebStorm-${version}.tar.gz";
- sha256 = "1bhx2p40r15zvfr6q10bj5y8jaa3i9x9adchczp0irkd3w2jgvy3"; /* updated by script */
+ sha256 = "0l3c3b1d53b3w90d4g99pjw8vmjj716jjaxsv4hy53shh1ncd55g"; /* updated by script */
};
wmClass = "jetbrains-webstorm";
update-channel = "WebStorm RELEASE";
diff --git a/pkgs/applications/editors/joe/default.nix b/pkgs/applications/editors/joe/default.nix
index b2ace8accd8a..6f5839b3d06f 100644
--- a/pkgs/applications/editors/joe/default.nix
+++ b/pkgs/applications/editors/joe/default.nix
@@ -2,10 +2,10 @@
stdenv.mkDerivation rec {
version = "4.6";
- name = "joe-${version}";
+ pname = "joe";
src = fetchurl {
- url = "mirror://sourceforge/joe-editor/${name}.tar.gz";
+ url = "mirror://sourceforge/joe-editor/${pname}-${version}.tar.gz";
sha256 = "1pmr598xxxm9j9dl93kq4dv36zyw0q2dh6d7x07hf134y9hhlnj9";
};
diff --git a/pkgs/applications/editors/jucipp/default.nix b/pkgs/applications/editors/jucipp/default.nix
index 9547b82efa1f..cb9f10281c70 100644
--- a/pkgs/applications/editors/jucipp/default.nix
+++ b/pkgs/applications/editors/jucipp/default.nix
@@ -6,7 +6,7 @@
with stdenv.lib;
stdenv.mkDerivation rec {
- name = "juicipp-${version}";
+ pname = "juicipp";
version = "1.2.3";
meta = {
diff --git a/pkgs/applications/editors/jupp/default.nix b/pkgs/applications/editors/jupp/default.nix
index 5e6406e33f28..4a44b35a0fa7 100644
--- a/pkgs/applications/editors/jupp/default.nix
+++ b/pkgs/applications/editors/jupp/default.nix
@@ -4,7 +4,7 @@
stdenv.mkDerivation rec {
- name = "jupp-${version}";
+ pname = "jupp";
version = "3.1";
srcName = "joe-3.1jupp31";
diff --git a/pkgs/applications/editors/jupyter/kernel.nix b/pkgs/applications/editors/jupyter/kernel.nix
index 4a079625d183..43cea9fcae93 100644
--- a/pkgs/applications/editors/jupyter/kernel.nix
+++ b/pkgs/applications/editors/jupyter/kernel.nix
@@ -8,7 +8,7 @@ let
in {
displayName = "Python 3";
argv = [
- "${env.interpreter}"
+ env.interpreter
"-m"
"ipykernel_launcher"
"-f"
@@ -26,7 +26,7 @@ in
# Definitions is an attribute set.
- create = { definitions ? default }: with lib; stdenv.mkDerivation rec {
+ create = { definitions ? default }: with lib; stdenv.mkDerivation {
name = "jupyter-kernels";
diff --git a/pkgs/applications/editors/kakoune/default.nix b/pkgs/applications/editors/kakoune/default.nix
index 8dfcc4856680..065657d16e2e 100644
--- a/pkgs/applications/editors/kakoune/default.nix
+++ b/pkgs/applications/editors/kakoune/default.nix
@@ -4,12 +4,12 @@ with stdenv.lib;
stdenv.mkDerivation rec {
pname = "kakoune-unwrapped";
- version = "2019.01.20";
+ version = "2019.07.01";
src = fetchFromGitHub {
repo = "kakoune";
owner = "mawww";
rev = "v${version}";
- sha256 = "04ak1jm7b1i03sx10z3fxw08rn692y2fj482jn5kpzfzj91b2ila";
+ sha256 = "0jdkldq5rygzc0wcxr1j4fmp2phciy8602ghhf6xq21a9bq2v639";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ ncurses asciidoc docbook_xsl libxslt ];
@@ -25,6 +25,11 @@ stdenv.mkDerivation rec {
export version="v${version}"
'';
+ doInstallCheckPhase = true;
+ installCheckPhase = ''
+ $out/bin/kak -ui json -E "kill 0"
+ '';
+
meta = {
homepage = http://kakoune.org/;
description = "A vim inspired text editor";
diff --git a/pkgs/applications/editors/kakoune/plugins.nix b/pkgs/applications/editors/kakoune/plugins.nix
deleted file mode 100644
index d2f3607d63cb..000000000000
--- a/pkgs/applications/editors/kakoune/plugins.nix
+++ /dev/null
@@ -1,5 +0,0 @@
-{ parinfer-rust }:
-
-{
- inherit parinfer-rust;
-}
diff --git a/pkgs/applications/editors/kakoune/plugins/default.nix b/pkgs/applications/editors/kakoune/plugins/default.nix
new file mode 100644
index 000000000000..61e2b3a58459
--- /dev/null
+++ b/pkgs/applications/editors/kakoune/plugins/default.nix
@@ -0,0 +1,12 @@
+{ pkgs, parinfer-rust }:
+
+{
+ inherit parinfer-rust;
+
+ kak-ansi = pkgs.callPackage ./kak-ansi.nix { };
+ kak-auto-pairs = pkgs.callPackage ./kak-auto-pairs.nix { };
+ kak-buffers = pkgs.callPackage ./kak-buffers.nix { };
+ kak-fzf = pkgs.callPackage ./kak-fzf.nix { };
+ kak-powerline = pkgs.callPackage ./kak-powerline.nix { };
+ kak-vertical-selection = pkgs.callPackage ./kak-vertical-selection.nix { };
+}
diff --git a/pkgs/applications/editors/kakoune/plugins/kak-ansi.nix b/pkgs/applications/editors/kakoune/plugins/kak-ansi.nix
new file mode 100644
index 000000000000..408cba45fbe6
--- /dev/null
+++ b/pkgs/applications/editors/kakoune/plugins/kak-ansi.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+ name = "kak-ansi";
+ version = "0.2.1";
+
+ src = fetchFromGitHub {
+ owner = "eraserhd";
+ repo = "kak-ansi";
+ rev = "v${version}";
+ sha256 = "0ddjih8hfyf6s4g7y46p1355kklaw1ydzzh61141i0r45wyb2d0d";
+ };
+
+ installPhase = ''
+ mkdir -p $out/bin $out/share/kak/autoload/plugins/
+ cp kak-ansi-filter $out/bin/
+ # Hard-code path of filter and don't try to build when Kakoune boots
+ sed '
+ /^declare-option.* ansi_filter /i\
+declare-option -hidden str ansi_filter %{'"$out"'/bin/kak-ansi-filter}
+ /^declare-option.* ansi_filter /,/^}/d
+ ' rc/ansi.kak >$out/share/kak/autoload/plugins/ansi.kak
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Kakoune support for rendering ANSI code";
+ homepage = "https://github.com/eraserhd/kak-ansi";
+ license = licenses.unlicense;
+ maintainers = with maintainers; [ eraserhd ];
+ platforms = platforms.all;
+ };
+}
diff --git a/pkgs/applications/editors/kakoune/plugins/kak-auto-pairs.nix b/pkgs/applications/editors/kakoune/plugins/kak-auto-pairs.nix
new file mode 100644
index 000000000000..48dc7106b626
--- /dev/null
+++ b/pkgs/applications/editors/kakoune/plugins/kak-auto-pairs.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchFromGitHub }:
+stdenv.mkDerivation {
+ name = "kak-auto-pairs";
+ version = "2019-07-27";
+ src = fetchFromGitHub {
+ owner = "alexherbo2";
+ repo = "auto-pairs.kak";
+ rev = "886449b1a04d43e5deb2f0ef4b1aead6084c7a5f";
+ sha256 = "0knfhdvslzw1f1r1k16733yhkczrg3yijjz6n2qwira84iv3239j";
+ };
+
+ installPhase = ''
+ mkdir -p $out/share/kak/autoload/plugins
+ cp -r rc $out/share/kak/autoload/plugins/auto-pairs
+ '';
+
+ meta = with stdenv.lib;
+ { description = "Kakoune extension to enable automatic closing of pairs";
+ homepage = "https://github.com/alexherbo2/auto-pairs.kak";
+ license = licenses.publicDoman;
+ maintainers = with maintainers; [ nrdxp ];
+ platform = platforms.all;
+ };
+}
diff --git a/pkgs/applications/editors/kakoune/plugins/kak-buffers.nix b/pkgs/applications/editors/kakoune/plugins/kak-buffers.nix
new file mode 100644
index 000000000000..8a2474f07622
--- /dev/null
+++ b/pkgs/applications/editors/kakoune/plugins/kak-buffers.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchFromGitHub }:
+stdenv.mkDerivation {
+ name = "kak-buffers";
+ version = "2019-04-03";
+ src = fetchFromGitHub {
+ owner = "Delapouite";
+ repo = "kakoune-buffers";
+ rev = "3b35b23ac2be661a37c085d34dd04d066450f757";
+ sha256 = "0f3g0v1sjinii3ig9753jjj35v2km4h9bcfw9xgzwz8b10d75bax";
+ };
+
+ installPhase = ''
+ mkdir -p $out/share/kak/autoload/plugins
+ cp -r buffers.kak $out/share/kak/autoload/plugins
+ '';
+
+ meta = with stdenv.lib;
+ { description = "Ease navigation between opened buffers in Kakoune";
+ homepage = "https://github.com/Delapouite/kakoune-buffers";
+ license = licenses.publicDoman;
+ maintainers = with maintainers; [ nrdxp ];
+ platform = platforms.all;
+ };
+}
diff --git a/pkgs/applications/editors/kakoune/plugins/kak-fzf.nix b/pkgs/applications/editors/kakoune/plugins/kak-fzf.nix
new file mode 100644
index 000000000000..9877c72252be
--- /dev/null
+++ b/pkgs/applications/editors/kakoune/plugins/kak-fzf.nix
@@ -0,0 +1,38 @@
+{ stdenv, fetchFromGitHub, fzf }:
+
+assert stdenv.lib.asserts.assertOneOf "fzf" fzf.pname [ "fzf" "skim" ];
+
+stdenv.mkDerivation {
+ name = "kak-fzf";
+ version = "2019-07-16";
+ src = fetchFromGitHub {
+ owner = "andreyorst";
+ repo = "fzf.kak";
+ rev = "ede90d3e02bceb714f997adfcbab8260b42e0a19";
+ sha256 = "18w90j3fpk2ddn68497s33n66aap8phw5636y1r7pqsa641zdxcv";
+ };
+
+ configurePhase = ''
+ if [[ -x "${fzf}/bin/fzf" ]]; then
+ fzfImpl='${fzf}/bin/fzf'
+ else
+ fzfImpl='${fzf}/bin/sk'
+ fi
+
+ substituteInPlace rc/fzf.kak \
+ --replace \'fzf\' \'"$fzfImpl"\'
+ '';
+
+ installPhase = ''
+ mkdir -p $out/share/kak/autoload/plugins
+ cp -r rc $out/share/kak/autoload/plugins/fzf
+ '';
+
+ meta = with stdenv.lib;
+ { description = "Kakoune plugin that brings integration with fzf";
+ homepage = "https://github.com/andreyorst/fzf.kak";
+ license = licenses.publicDoman;
+ maintainers = with maintainers; [ nrdxp ];
+ platform = platforms.all;
+ };
+}
diff --git a/pkgs/applications/editors/kakoune/plugins/kak-powerline.nix b/pkgs/applications/editors/kakoune/plugins/kak-powerline.nix
new file mode 100644
index 000000000000..76af06504ea3
--- /dev/null
+++ b/pkgs/applications/editors/kakoune/plugins/kak-powerline.nix
@@ -0,0 +1,29 @@
+{ stdenv, git, fetchFromGitHub }:
+stdenv.mkDerivation {
+ name = "kak-powerline";
+ version = "2019-07-23";
+ src = fetchFromGitHub {
+ owner = "andreyorst";
+ repo = "powerline.kak";
+ rev = "82b01eb6c97c7380b7da253db1fd484a5de13ea4";
+ sha256 = "1480wp2jc7c84z1wqmpf09lzny6kbnbhiiym2ffaddxrd4ns9i6z";
+ };
+
+ configurePhase = ''
+ substituteInPlace rc/modules/git.kak \
+ --replace \'git\' \'${git}/bin/git\'
+ '';
+
+ installPhase = ''
+ mkdir -p $out/share/kak/autoload/plugins
+ cp -r rc $out/share/kak/autoload/plugins/powerline
+ '';
+
+ meta = with stdenv.lib;
+ { description = "Kakoune modeline, but with passion";
+ homepage = "https://github.com/andreyorst/powerline.kak";
+ license = licenses.publicDoman;
+ maintainers = with maintainers; [ nrdxp ];
+ platform = platforms.all;
+ };
+}
diff --git a/pkgs/applications/editors/kakoune/plugins/kak-vertical-selection.nix b/pkgs/applications/editors/kakoune/plugins/kak-vertical-selection.nix
new file mode 100644
index 000000000000..280fb664b8f4
--- /dev/null
+++ b/pkgs/applications/editors/kakoune/plugins/kak-vertical-selection.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchFromGitHub }:
+stdenv.mkDerivation {
+ name = "kak-vertical-selection";
+ version = "2019-04-11";
+ src = fetchFromGitHub {
+ owner = "occivink";
+ repo = "kakoune-vertical-selection";
+ rev = "c420f8b867ce47375fac303886e31623669a42b7";
+ sha256 = "13jdyd2j45wvgqvxdzw9zww14ly93bqjb6700zzxj7mkbiff6wsb";
+ };
+
+ installPhase = ''
+ mkdir -p $out/share/kak/autoload/plugins
+ cp -r vertical-selection.kak $out/share/kak/autoload/plugins
+ '';
+
+ meta = with stdenv.lib;
+ { description = "Select up and down lines that match the same pattern in Kakoune";
+ homepage = "https://github.com/occivink/kakoune-vertical-selection";
+ license = licenses.publicDoman;
+ maintainers = with maintainers; [ nrdxp ];
+ platform = platforms.all;
+ };
+}
diff --git a/pkgs/applications/editors/kdevelop5/kdev-php.nix b/pkgs/applications/editors/kdevelop5/kdev-php.nix
index e6f95f74011f..e367b586f307 100644
--- a/pkgs/applications/editors/kdevelop5/kdev-php.nix
+++ b/pkgs/applications/editors/kdevelop5/kdev-php.nix
@@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "kdev-php";
- version = "5.3.3";
+ version = "5.4.2";
src = fetchurl {
url = "https://github.com/KDE/${pname}/archive/v${version}.tar.gz";
- sha256 = "0nn3yfbi60h7p7p1w2pvgg098qplbds79rk2iadyvhvl3sjd77wf";
+ sha256 = "1ilazq2y671wifcrh7pa0zf9yqymqxwj1m2kd389ik2p6wm68jx8";
};
nativeBuildInputs = [ cmake extra-cmake-modules ];
diff --git a/pkgs/applications/editors/kdevelop5/kdev-python.nix b/pkgs/applications/editors/kdevelop5/kdev-python.nix
index 099153995c9d..1052c5e1ba34 100644
--- a/pkgs/applications/editors/kdevelop5/kdev-python.nix
+++ b/pkgs/applications/editors/kdevelop5/kdev-python.nix
@@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "kdev-python";
- version = "5.3.3";
+ version = "5.4.2";
src = fetchurl {
url = "https://github.com/KDE/${pname}/archive/v${version}.tar.gz";
- sha256 = "0bqsny2jgi6wi1cz65i2j9r1hiwna2x10mzy7vdk8bz7b4z766yg";
+ sha256 = "1nnspa1mixdb5z0a8m4nbpsk6c4s81iwrirhrl7091hsw02bsx3f";
};
cmakeFlags = [
diff --git a/pkgs/applications/editors/kdevelop5/kdevelop.nix b/pkgs/applications/editors/kdevelop5/kdevelop.nix
index 989432fc65df..4c2011b5b035 100644
--- a/pkgs/applications/editors/kdevelop5/kdevelop.nix
+++ b/pkgs/applications/editors/kdevelop5/kdevelop.nix
@@ -7,16 +7,13 @@
, libksysguard, konsole, llvmPackages, makeWrapper, kpurpose, boost
}:
-let
- qtVersion = "5.${lib.versions.minor qtbase.version}";
-in
mkDerivation rec {
pname = "kdevelop";
- version = "5.3.3";
+ version = "5.4.2";
src = fetchurl {
url = "mirror://kde/stable/${pname}/${version}/src/${pname}-${version}.tar.xz";
- sha256 = "0778587qvi268ab2fgggfl40cv2swgr8q891q1paflp3m1xirpff";
+ sha256 = "1i665m4jd1r5bl77pcfybpn9szxzccrajs4m0prqwhlj93d57qjj";
};
nativeBuildInputs = [
@@ -44,13 +41,6 @@ mkDerivation rec {
dontWrapQtApps = true;
- postPatch = ''
- # FIXME: temporary until https://invent.kde.org/kde/kdevelop/merge_requests/8 is merged
- substituteInPlace kdevplatform/language/backgroundparser/parsejob.cpp --replace \
- 'if (internalFilePath.startsWith(dataPath.canonicalPath() + QStringLiteral("/kdev"))) {' \
- 'if (internalFilePath.startsWith(dataPath.canonicalPath() + QStringLiteral("/kdev")) || localFile.startsWith(path + QStringLiteral("/kdev"))) {'
- '';
-
postInstall = ''
# The kdevelop! script (shell environment) needs qdbus and kioclient5 in PATH.
wrapProgram "$out/bin/kdevelop!" \
diff --git a/pkgs/applications/editors/kodestudio/default.nix b/pkgs/applications/editors/kodestudio/default.nix
index b212773712c2..a106c3166747 100644
--- a/pkgs/applications/editors/kodestudio/default.nix
+++ b/pkgs/applications/editors/kodestudio/default.nix
@@ -20,8 +20,9 @@ let
in
- stdenv.mkDerivation rec {
- name = "kodestudio-${version}";
+ stdenv.mkDerivation {
+ pname = "kodestudio";
+ inherit version;
src = fetchurl {
url = urlStr;
diff --git a/pkgs/applications/editors/leafpad/default.nix b/pkgs/applications/editors/leafpad/default.nix
index c3b46cf61df8..508d2329edc4 100644
--- a/pkgs/applications/editors/leafpad/default.nix
+++ b/pkgs/applications/editors/leafpad/default.nix
@@ -2,9 +2,9 @@
stdenv.mkDerivation rec {
version = "0.8.18.1";
- name = "leafpad-${version}";
+ pname = "leafpad";
src = fetchurl {
- url = "https://download.savannah.gnu.org/releases/leafpad/${name}.tar.gz";
+ url = "https://download.savannah.gnu.org/releases/leafpad/${pname}-${version}.tar.gz";
sha256 = "0b0az2wvqgvam7w0ns1j8xp2llslm1rx6h7zcsy06a7j0yp257cm";
};
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
];
meta = with stdenv.lib; {
- description = "A notepad clone for GTK+ 2.0";
+ description = "A notepad clone for GTK 2.0";
homepage = http://tarot.freeshell.org/leafpad;
platforms = platforms.linux;
maintainers = [ maintainers.flosse ];
diff --git a/pkgs/applications/editors/leo-editor/default.nix b/pkgs/applications/editors/leo-editor/default.nix
index a2274be463ed..bd433436eb02 100644
--- a/pkgs/applications/editors/leo-editor/default.nix
+++ b/pkgs/applications/editors/leo-editor/default.nix
@@ -1,7 +1,7 @@
{ stdenv, python3, fetchFromGitHub, makeWrapper, makeDesktopItem }:
stdenv.mkDerivation rec {
- name = "leo-editor-${version}";
+ pname = "leo-editor";
version = "5.7.3";
src = fetchFromGitHub {
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ makeWrapper python3 ];
propagatedBuildInputs = with python3.pkgs; [ pyqt5 docutils ];
- desktopItem = makeDesktopItem rec {
+ desktopItem = makeDesktopItem {
name = "leo-editor";
exec = "leo %U";
icon = "leoapp32";
diff --git a/pkgs/applications/editors/lighttable/default.nix b/pkgs/applications/editors/lighttable/default.nix
index c3a280aed921..90e8c73e075d 100644
--- a/pkgs/applications/editors/lighttable/default.nix
+++ b/pkgs/applications/editors/lighttable/default.nix
@@ -21,13 +21,13 @@ let
in
stdenv.mkDerivation rec {
- name = "lighttable-${version}";
+ pname = "lighttable";
version = "0.8.1";
src =
fetchurl {
name = "LightTableLinux64.tar.gz";
- url = "https://github.com/LightTable/LightTable/releases/download/${version}/${name}-linux.tar.gz";
+ url = "https://github.com/LightTable/LightTable/releases/download/${version}/${pname}-${version}-linux.tar.gz";
sha256 = "06fj725xfhf3fwrf7dya7ijmxq3v76kfmd4lr2067a92zhlwr5pv";
};
@@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
installPhase = ''
tar xf ${src}
mkdir -p $out/{bin,share/LightTable}
- mv ./${name}-linux/* $out/share/LightTable
+ mv ./${pname}-${version}-linux/* $out/share/LightTable
patchelf \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
diff --git a/pkgs/applications/editors/manuskript/default.nix b/pkgs/applications/editors/manuskript/default.nix
index ecbe7e8b7194..811284491dd7 100644
--- a/pkgs/applications/editors/manuskript/default.nix
+++ b/pkgs/applications/editors/manuskript/default.nix
@@ -1,16 +1,20 @@
-{ stdenv, zlib, fetchFromGitHub, python3Packages }:
+{ stdenv, zlib, fetchFromGitHub, python3Packages, wrapQtAppsHook }:
python3Packages.buildPythonApplication rec {
pname = "manuskript";
- version = "0.9.0";
+ version = "0.10.0";
+
+ format = "other";
src = fetchFromGitHub {
repo = pname;
owner = "olivierkes";
rev = version;
- sha256 = "13y1s0kba1ib6g977n7h920kyr7abdw03kpal512m7iwa9g2kdw8";
+ sha256 = "0q413vym7hzjpyg3krj5y63hwpncdifjkyswqmr76zg5yqnklnh3";
};
+ nativeBuildInputs = [ wrapQtAppsHook ];
+
propagatedBuildInputs = [
python3Packages.pyqt5
python3Packages.lxml
@@ -30,6 +34,10 @@ python3Packages.buildPythonApplication rec {
cp -r sample-projects/ $out/share/${pname}
'';
+ postFixup = ''
+ wrapQtApp $out/bin/manuskript
+ '';
+
doCheck = false;
meta = {
diff --git a/pkgs/applications/editors/mg/default.nix b/pkgs/applications/editors/mg/default.nix
index 4fb8d51b9692..de1a5ce7879f 100644
--- a/pkgs/applications/editors/mg/default.nix
+++ b/pkgs/applications/editors/mg/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, pkgconfig, libbsd, ncurses, buildPackages }:
stdenv.mkDerivation rec {
- name = "mg-${version}";
+ pname = "mg";
version = "20171014";
src = fetchurl {
- url = "http://homepage.boetes.org/software/mg/${name}.tar.gz";
+ url = "http://homepage.boetes.org/software/mg/${pname}-${version}.tar.gz";
sha256 = "0hakfikzsml7z0hja8m8mcahrmfy2piy81bq9nccsjplyfc9clai";
};
diff --git a/pkgs/applications/editors/micro/default.nix b/pkgs/applications/editors/micro/default.nix
index fab3646efdff..e6b93f20c488 100644
--- a/pkgs/applications/editors/micro/default.nix
+++ b/pkgs/applications/editors/micro/default.nix
@@ -1,7 +1,7 @@
{ stdenv, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
- name = "micro-${version}";
+ pname = "micro";
version = "1.4.1";
goPackagePath = "github.com/zyedidia/micro";
diff --git a/pkgs/applications/editors/mindforger/default.nix b/pkgs/applications/editors/mindforger/default.nix
index a027242c5eef..9cfcf95e78b1 100644
--- a/pkgs/applications/editors/mindforger/default.nix
+++ b/pkgs/applications/editors/mindforger/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchurl, qmake, qtbase, qtwebkit }:
stdenv.mkDerivation rec {
- name = "mindforger-${version}";
+ pname = "mindforger";
version = "1.48.2";
src = fetchurl {
diff --git a/pkgs/applications/editors/moe/default.nix b/pkgs/applications/editors/moe/default.nix
index 3f7eba73ca49..4e960524b94f 100644
--- a/pkgs/applications/editors/moe/default.nix
+++ b/pkgs/applications/editors/moe/default.nix
@@ -5,11 +5,11 @@
with stdenv.lib;
stdenv.mkDerivation rec {
- name = "moe-${version}";
+ pname = "moe";
version = "1.10";
src = fetchurl {
- url = "mirror://gnu/moe/${name}.tar.lz";
+ url = "mirror://gnu/moe/${pname}-${version}.tar.lz";
sha256 = "0fymywdiy9xqppcmvgs7mf7d3gfrky3jp5jkxs2l3v93asml9zcc";
};
diff --git a/pkgs/applications/editors/monodevelop/default.nix b/pkgs/applications/editors/monodevelop/default.nix
index c2917aa394f9..3a21eec07f42 100644
--- a/pkgs/applications/editors/monodevelop/default.nix
+++ b/pkgs/applications/editors/monodevelop/default.nix
@@ -7,10 +7,10 @@
stdenv.mkDerivation rec {
version = "5.9.4.5";
revision = "8010a90f6e246b32364e3fb46ef2c9d1be9c9a2b";
- name = "monodevelop-${version}";
+ pname = "monodevelop";
src = fetchurl {
- url = "https://download.mono-project.com/sources/monodevelop/${name}.tar.bz2";
+ url = "https://download.mono-project.com/sources/monodevelop/${pname}-${version}.tar.bz2";
sha256 = "0bim4bfv3zwijafl9g0cx3159zq43dlcv74mnyrda41j4p52w5ji";
};
diff --git a/pkgs/applications/editors/music/tuxguitar/default.nix b/pkgs/applications/editors/music/tuxguitar/default.nix
index 1b1c6eaf9e54..70f99fa749b7 100644
--- a/pkgs/applications/editors/music/tuxguitar/default.nix
+++ b/pkgs/applications/editors/music/tuxguitar/default.nix
@@ -7,10 +7,10 @@ let metadata = assert stdenv.hostPlatform.system == "i686-linux" || stdenv.hostP
{ arch = "x86_64"; sha256 = "12af47jhlrh9aq5b3d13l7cdhlndgnfpy61gz002hajbq7i00ixh"; };
in stdenv.mkDerivation rec {
version = "1.2";
- name = "tuxguitar-${version}";
+ pname = "tuxguitar";
src = fetchurl {
- url = "mirror://sourceforge/tuxguitar/${name}-linux-${metadata.arch}.tar.gz";
+ url = "mirror://sourceforge/tuxguitar/${pname}-${version}-linux-${metadata.arch}.tar.gz";
sha256 = metadata.sha256;
};
diff --git a/pkgs/applications/editors/nano/default.nix b/pkgs/applications/editors/nano/default.nix
index 6bbdaf77a69b..15f251f5b093 100644
--- a/pkgs/applications/editors/nano/default.nix
+++ b/pkgs/applications/editors/nano/default.nix
@@ -19,12 +19,12 @@ let
};
in stdenv.mkDerivation rec {
- name = "nano-${version}";
- version = "3.2";
+ pname = "nano";
+ version = "4.5";
src = fetchurl {
- url = "mirror://gnu/nano/${name}.tar.xz";
- sha256 = "0jb3zq0v84xb0chyynkcp2jhs9660wmpkic294p4p6c96npp69yi";
+ url = "mirror://gnu/nano/${pname}-${version}.tar.xz";
+ sha256 = "0czmz1yq8s5qcxcmfjdxzg9nkhbmlc9q1nz04jvf57fdbs7w7mfy";
};
nativeBuildInputs = [ texinfo ] ++ optional enableNls gettext;
diff --git a/pkgs/applications/editors/nano/nanorc/default.nix b/pkgs/applications/editors/nano/nanorc/default.nix
index fb30036e146f..eab37fba19a7 100644
--- a/pkgs/applications/editors/nano/nanorc/default.nix
+++ b/pkgs/applications/editors/nano/nanorc/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub }:
-stdenv.mkDerivation rec {
- name = "nanorc-${version}";
+stdenv.mkDerivation {
+ pname = "nanorc";
version = "2018-09-05";
src = fetchFromGitHub {
diff --git a/pkgs/applications/editors/ne/default.nix b/pkgs/applications/editors/ne/default.nix
index 9bc6425bc411..3c96ba911651 100644
--- a/pkgs/applications/editors/ne/default.nix
+++ b/pkgs/applications/editors/ne/default.nix
@@ -1,36 +1,36 @@
{ stdenv, fetchFromGitHub, ncurses, texinfo, texlive, perl, ghostscript }:
-
stdenv.mkDerivation rec {
- name = "ne-${version}";
- version = "3.1.2";
+ pname = "ne";
+ version = "3.2.1";
+
src = fetchFromGitHub {
owner = "vigna";
- repo = "ne";
+ repo = pname;
rev = version;
- sha256 = "154grh9gdzydnqn9xxj7zpia9cc5x6a7y1g73vwizr9bkg92l5cc";
+ sha256 = "0h6d08cnwrk96ss83i9bragwwanph6x54sm3ak1z81146dsqsiif";
};
- buildInputs = [ ncurses texlive.combined.scheme-medium texinfo perl ghostscript ];
- dontBuild = true;
- installPhase = ''
- substituteInPlace src/makefile --replace "CC=c99" "cc=gcc"
- substituteInPlace src/makefile --replace "-lcurses" "-lncurses"
+
+ postPatch = ''
substituteInPlace makefile --replace "./version.pl" "perl version.pl"
- cd doc && make && cd ..
- cd src && make && cd ..
- make PREFIX=$out install
+ substituteInPlace src/makefile --replace "-lcurses" "-lncurses"
'';
- meta = {
+ nativeBuildInputs = [ texlive.combined.scheme-medium texinfo perl ghostscript ];
+ buildInputs = [ ncurses ];
+
+ makeFlags = [ "PREFIX=${placeholder "out"}" ];
+
+ meta = with stdenv.lib; {
description = "The nice editor";
- homepage = https://github.com/vigna/ne;
+ homepage = "http://ne.di.unimi.it/";
longDescription = ''
ne is a free (GPL'd) text editor based on the POSIX standard that runs
(we hope) on almost any UN*X machine. ne is easy to use for the beginner,
but powerful and fully configurable for the wizard, and most sparing in its
resource usage. See the manual for some highlights of ne's features.
'';
- license = stdenv.lib.licenses.gpl3;
- platforms = stdenv.lib.platforms.unix;
+ license = licenses.gpl3;
+ platforms = platforms.unix;
};
}
diff --git a/pkgs/applications/editors/nedit/default.nix b/pkgs/applications/editors/nedit/default.nix
index 6fff6df8cdda..4ff8c759a260 100644
--- a/pkgs/applications/editors/nedit/default.nix
+++ b/pkgs/applications/editors/nedit/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, xlibsWrapper, motif, libXpm }:
stdenv.mkDerivation rec {
- name = "nedit-${version}";
+ pname = "nedit";
version = "5.7";
src = fetchurl {
- url = "mirror://sourceforge/nedit/nedit-source/${name}-src.tar.gz";
+ url = "mirror://sourceforge/nedit/nedit-source/${pname}-${version}-src.tar.gz";
sha256 = "0ym1zhjx9976rf2z5nr7dj4mjkxcicimhs686snjhdcpzxwsrndd";
};
@@ -26,7 +26,8 @@ stdenv.mkDerivation rec {
'';
meta = with stdenv.lib; {
- homepage = https://sourceforge.net/projects/nedit;
+ homepage = "https://sourceforge.net/projects/nedit";
+ description = "A fast, compact Motif/X11 plain text editor";
platforms = with platforms; linux ++ darwin;
license = licenses.gpl2;
};
diff --git a/pkgs/applications/editors/neovim/default.nix b/pkgs/applications/editors/neovim/default.nix
index 0d0877015eee..99b04059730d 100644
--- a/pkgs/applications/editors/neovim/default.nix
+++ b/pkgs/applications/editors/neovim/default.nix
@@ -13,21 +13,21 @@ with stdenv.lib;
let
neovimLuaEnv = lua.withPackages(ps:
- (with ps; [ mpack lpeg luabitop ]
+ (with ps; [ lpeg luabitop mpack ]
++ optionals doCheck [
nvim-client luv coxpcall busted luafilesystem penlight inspect
]
));
in
stdenv.mkDerivation rec {
- name = "neovim-unwrapped-${version}";
- version = "0.3.8";
+ pname = "neovim-unwrapped";
+ version = "0.4.2";
src = fetchFromGitHub {
owner = "neovim";
repo = "neovim";
rev = "v${version}";
- sha256 = "15flii3p4g9f65xy9jpkb8liajrvhm5ck4j39z6d6b1nkxr6ghwb";
+ sha256 = "13w446plvgl219lhj29jyimhiqvs1y1byrz4qpdmxgyddmx9xqss";
};
patches = [
@@ -41,14 +41,15 @@ in
enableParallelBuilding = true;
buildInputs = [
+ gperf
libtermkey
libuv
+ libvterm-neovim
+ lua.pkgs.luv.libluv
msgpack
ncurses
- libvterm-neovim
- unibilium
- gperf
neovimLuaEnv
+ unibilium
] ++ optional withJemalloc jemalloc
++ optional stdenv.isDarwin libiconv
++ optionals doCheck [ glibcLocales procps ]
@@ -77,9 +78,12 @@ in
disallowedReferences = [ stdenv.cc ];
cmakeFlags = [
- "-DLUA_PRG=${neovimLuaEnv.interpreter}"
"-DGPERF_PRG=${gperf}/bin/gperf"
+ "-DLUA_PRG=${neovimLuaEnv.interpreter}"
]
+ # FIXME: this is verry messy and strange.
+ ++ optional (!stdenv.isDarwin) "-DLIBLUV_LIBRARY=${lua.pkgs.luv}/lib/lua/${lua.luaversion}/luv.so"
+ ++ optional (stdenv.isDarwin) "-DLIBLUV_LIBRARY=${lua.pkgs.luv.libluv}/lib/lua/${lua.luaversion}/libluv.dylib"
++ optional doCheck "-DBUSTED_PRG=${neovimLuaEnv}/bin/busted"
++ optional (!lua.pkgs.isLuaJIT) "-DPREFER_LUA=ON"
;
diff --git a/pkgs/applications/editors/neovim/gnvim/default.nix b/pkgs/applications/editors/neovim/gnvim/default.nix
new file mode 100644
index 000000000000..764d7004940d
--- /dev/null
+++ b/pkgs/applications/editors/neovim/gnvim/default.nix
@@ -0,0 +1,47 @@
+{ stdenv, rustPlatform, fetchFromGitHub, gtk, webkitgtk }:
+
+rustPlatform.buildRustPackage rec {
+ pname = "gnvim-unwrapped";
+ version = "0.1.5";
+
+ src = fetchFromGitHub {
+ owner = "vhakulinen";
+ repo = "gnvim";
+ rev = version;
+ sha256 = "11gb59lhc1sp5dxj2fdm6072f4nxxay0war3kmchdwsk41nvxlrh";
+ };
+
+ cargoSha256 = "00r5jf5qdw02vcv3522qqrnwj14mip0l58prcncbvyg4pxlm2rb2";
+
+ buildInputs = [ gtk webkitgtk ];
+
+ # The default build script tries to get the version through Git, so we
+ # replace it
+ prePatch = ''
+ cat << EOF > build.rs
+ use std::env;
+ use std::fs::File;
+ use std::io::Write;
+ use std::path::Path;
+
+ fn main() {
+ let out_dir = env::var("OUT_DIR").unwrap();
+ let dest_path = Path::new(&out_dir).join("gnvim_version.rs");
+ let mut f = File::create(&dest_path).unwrap();
+ f.write_all(b"const VERSION: &str = \"${version}\";").unwrap();
+ }
+ EOF
+ '';
+
+ installPhase = ''
+ make install PREFIX="${placeholder "out"}"
+ '';
+
+ meta = with stdenv.lib; {
+ description = "GUI for neovim, without any web bloat";
+ homepage = "https://github.com/vhakulinen/gnvim";
+ license = licenses.mit;
+ maintainers = with maintainers; [ minijackson ];
+ inherit version;
+ };
+}
diff --git a/pkgs/applications/editors/neovim/gnvim/wrapper.nix b/pkgs/applications/editors/neovim/gnvim/wrapper.nix
new file mode 100644
index 000000000000..e16fe8a8adc7
--- /dev/null
+++ b/pkgs/applications/editors/neovim/gnvim/wrapper.nix
@@ -0,0 +1,41 @@
+{ stdenv, gnvim-unwrapped, neovim, makeWrapper }:
+
+stdenv.mkDerivation {
+ pname = "gnvim";
+ version = gnvim-unwrapped.version;
+ buildCommand = if stdenv.isDarwin then ''
+ mkdir -p $out/Applications
+ cp -r ${gnvim-unwrapped}/bin/gnvim.app $out/Applications
+
+ chmod -R a+w "$out/Applications/gnvim.app/Contents/MacOS"
+ wrapProgram "$out/Applications/gnvim.app/Contents/MacOS/gnvim" \
+ --prefix PATH : "${neovim}/bin" \
+ --set GNVIM_RUNTIME_PATH "${gnvim-unwrapped}/share/gnvim/runtime"
+ '' else ''
+ makeWrapper '${gnvim-unwrapped}/bin/gnvim' "$out/bin/gnvim" \
+ --prefix PATH : "${neovim}/bin" \
+ --set GNVIM_RUNTIME_PATH "${gnvim-unwrapped}/share/gnvim/runtime"
+
+ mkdir -p "$out/share"
+ ln -s '${gnvim-unwrapped}/share/icons' "$out/share/icons"
+
+ # copy and fix .desktop file
+ cp -r '${gnvim-unwrapped}/share/applications' "$out/share/applications"
+ # Sed needs a writable directory to do inplace modifications
+ chmod u+rw "$out/share/applications"
+ for file in $out/share/applications/*.desktop; do
+ sed -e "s|Exec=.\\+gnvim\\>|Exec=$out/bin/gnvim|" -i "$file"
+ done
+ '';
+
+ preferLocalBuild = true;
+
+ nativeBuildInputs = [
+ makeWrapper
+ ];
+
+ passthru.unwrapped = gnvim-unwrapped;
+
+ inherit (gnvim-unwrapped) meta;
+}
+
diff --git a/pkgs/applications/editors/neovim/neovim-remote.nix b/pkgs/applications/editors/neovim/neovim-remote.nix
index efece505ab94..18f458fd85c7 100644
--- a/pkgs/applications/editors/neovim/neovim-remote.nix
+++ b/pkgs/applications/editors/neovim/neovim-remote.nix
@@ -4,14 +4,14 @@ with stdenv.lib;
pythonPackages.buildPythonApplication rec {
pname = "neovim-remote";
- version = "2.1.9";
+ version = "2.2.2";
disabled = !pythonPackages.isPy3k;
src = fetchFromGitHub {
owner = "mhinz";
repo = "neovim-remote";
rev = "v${version}";
- sha256 = "1im7jq7vi2sbdrh95kbydbbfwdll6z9zh1w1vzh7ny1sigfphkpm";
+ sha256 = "129yjpwn6480rd5na866h4mcr6rf60rqv651hks5fn3ws112n751";
};
propagatedBuildInputs = with pythonPackages; [ pynvim psutil ];
diff --git a/pkgs/applications/editors/neovim/qt.nix b/pkgs/applications/editors/neovim/qt.nix
index 3004bf544c42..3a46f68e7755 100644
--- a/pkgs/applications/editors/neovim/qt.nix
+++ b/pkgs/applications/editors/neovim/qt.nix
@@ -1,16 +1,16 @@
-{ stdenv, fetchFromGitHub, cmake, doxygen, makeWrapper
+{ stdenv, mkDerivation, fetchFromGitHub, cmake, doxygen, makeWrapper
, msgpack, neovim, pythonPackages, qtbase }:
let
- unwrapped = stdenv.mkDerivation rec {
+ unwrapped = mkDerivation rec {
pname = "neovim-qt-unwrapped";
- version = "0.2.11";
+ version = "0.2.12";
src = fetchFromGitHub {
owner = "equalsraf";
repo = "neovim-qt";
rev = "v${version}";
- sha256 = "0pc1adxc89p2rdvb6nxyqr9sjzqz9zw2dg7a4ardxsl3a8jga1wh";
+ sha256 = "09s3044j0y8nmyi8ykslfii6fx7k9mckmdvb0jn2xmdabpb60i20";
};
cmakeFlags = [
@@ -24,7 +24,7 @@ let
jinja2 python msgpack
]);
- nativeBuildInputs = [ cmake doxygen makeWrapper ];
+ nativeBuildInputs = [ cmake doxygen ];
enableParallelBuilding = true;
@@ -60,8 +60,9 @@ in
--prefix PATH : "${neovim}/bin"
# link .desktop file
- mkdir -p "$out/share"
+ mkdir -p "$out/share/pixmaps"
ln -s '${unwrapped}/share/applications' "$out/share/applications"
+ ln -s '${unwrapped}/share/pixmaps/nvim-qt.png' "$out/share/pixmaps/nvim-qt.png"
'';
preferLocalBuild = true;
diff --git a/pkgs/applications/editors/neovim/wrapper.nix b/pkgs/applications/editors/neovim/wrapper.nix
index aa1e2a6b5bd7..ffe597b00db8 100644
--- a/pkgs/applications/editors/neovim/wrapper.nix
+++ b/pkgs/applications/editors/neovim/wrapper.nix
@@ -75,8 +75,9 @@ let
${optionalString withRuby '' --set GEM_HOME ${rubyEnv}/${rubyEnv.ruby.gemPath}'' }
''
+ optionalString (!stdenv.isDarwin) ''
- # copy and patch the original neovim.desktop file
- mkdir -p $out/share/applications
+ # copy icon and patch the original neovim.desktop file
+ mkdir -p $out/share/{applications,pixmaps}
+ ln -s ${neovim}/share/pixmaps/nvim.png $out/share/pixmaps/nvim.png
substitute ${neovim}/share/applications/nvim.desktop $out/share/applications/nvim.desktop \
--replace 'TryExec=nvim' "TryExec=$out/bin/nvim" \
--replace 'Name=Neovim' 'Name=WrappedNeovim'
@@ -100,7 +101,7 @@ let
# Only display the log on error since it will contain a few normally
# irrelevant messages.
if ! $out/bin/nvim \
- -u ${vimUtils.vimrcFile (configure // { customRC = ""; })} \
+ -u ${vimUtils.vimrcFile (configure // { customRC = ""; beforePlugins = ''filetype indent plugin on | syn on''; })} \
-i NONE -n \
-E -V1rplugins.log -s \
+UpdateRemotePlugins +quit! > outfile 2>&1; then
diff --git a/pkgs/applications/editors/netbeans/default.nix b/pkgs/applications/editors/netbeans/default.nix
index fa547875a175..38b92151b29f 100644
--- a/pkgs/applications/editors/netbeans/default.nix
+++ b/pkgs/applications/editors/netbeans/default.nix
@@ -3,22 +3,23 @@
}:
let
- version = "10.0";
+ version = "11.1";
desktopItem = makeDesktopItem {
name = "netbeans";
exec = "netbeans";
comment = "Integrated Development Environment";
- desktopName = "Netbeans IDE";
+ desktopName = "Apache NetBeans IDE";
genericName = "Integrated Development Environment";
categories = "Application;Development;";
icon = "netbeans";
};
in
stdenv.mkDerivation {
- name = "netbeans-${version}";
+ pname = "netbeans";
+ inherit version;
src = fetchurl {
- url = "mirror://apache/incubator/netbeans/incubating-netbeans/incubating-${version}/incubating-netbeans-${version}-bin.zip";
- sha512 = "ba83575f42c1d5515e2a5336a621bc2b4087b2e0bcacb6edb76f376f8272555609bdd4eefde8beae8ffc6c1a7db2fb721b844638ce27933c3dd78f71cbb41ad8";
+ url = "mirror://apache/netbeans/netbeans/${version}/netbeans-${version}-bin.zip";
+ sha512 = "bb061b9258d524b7b53b3b5ee9aa95111f7a391a5e2c5c0bc949164166af9a03d0cebbde2b47a8853fb765307b4c93ce8389a9c87bef26c92c08cdf446314e4d";
};
buildCommand = ''
@@ -47,7 +48,7 @@ stdenv.mkDerivation {
convert -resize "$size"x"$size" netbeans_1024x1024x32.png $out/share/icons/hicolor/"$size"x"$size"/apps/netbeans.png
fi
done;
-
+
# Create desktop item, so we can pick it from the KDE/GNOME menu
mkdir -pv $out/share/applications
ln -s ${desktopItem}/share/applications/* $out/share/applications
@@ -57,7 +58,7 @@ stdenv.mkDerivation {
meta = {
description = "An integrated development environment for Java, C, C++ and PHP";
- homepage = "https://netbeans.org/";
+ homepage = "https://netbeans.apache.org/";
license = stdenv.lib.licenses.asl20;
maintainers = with stdenv.lib.maintainers; [ sander rszibele ];
platforms = stdenv.lib.platforms.unix;
diff --git a/pkgs/applications/editors/notepadqq/default.nix b/pkgs/applications/editors/notepadqq/default.nix
index ab79c3e780b2..efda2c583604 100644
--- a/pkgs/applications/editors/notepadqq/default.nix
+++ b/pkgs/applications/editors/notepadqq/default.nix
@@ -1,9 +1,8 @@
-{ stdenv, fetchFromGitHub, pkgconfig, which, qtbase, qtsvg, qttools, qtwebkit}:
+{ mkDerivation, lib, fetchFromGitHub, pkgconfig, which, qtbase, qtsvg, qttools, qtwebkit }:
-let
+mkDerivation rec {
+ pname = "notepadqq";
version = "1.4.8";
-in stdenv.mkDerivation {
- name = "notepadqq-${version}";
src = fetchFromGitHub {
owner = "notepadqq";
repo = "notepadqq";
@@ -24,13 +23,19 @@ in stdenv.mkDerivation {
export LRELEASE="lrelease"
'';
+ dontWrapQtApps = true;
+
+ preFixup = ''
+ wrapQtApp $out/bin/notepadqq
+ '';
+
enableParallelBuilding = true;
- meta = {
+ meta = with lib; {
homepage = https://notepadqq.com/;
description = "Notepad++-like editor for the Linux desktop";
- license = stdenv.lib.licenses.gpl3;
- platforms = stdenv.lib.platforms.linux;
- maintainers = with stdenv.lib.maintainers; [ rszibele ];
+ license = licenses.gpl3;
+ platforms = platforms.linux;
+ maintainers = [ maintainers.rszibele ];
};
}
diff --git a/pkgs/applications/editors/nvi/default.nix b/pkgs/applications/editors/nvi/default.nix
index 82c89ebdca6e..a7a6b35a24a0 100644
--- a/pkgs/applications/editors/nvi/default.nix
+++ b/pkgs/applications/editors/nvi/default.nix
@@ -1,6 +1,6 @@
{ fetchurl, stdenv, ncurses }:
-stdenv.mkDerivation rec {
+stdenv.mkDerivation {
name = "nvi-1.79";
src = fetchurl {
diff --git a/pkgs/applications/editors/okteta/default.nix b/pkgs/applications/editors/okteta/default.nix
index 03bdd5e08822..5c7ddfb34d46 100644
--- a/pkgs/applications/editors/okteta/default.nix
+++ b/pkgs/applications/editors/okteta/default.nix
@@ -3,11 +3,11 @@
, qca-qt5, shared-mime-info }:
stdenv.mkDerivation rec {
- name = "okteta-${version}";
+ pname = "okteta";
version = "0.26.2";
src = fetchurl {
- url = "mirror://kde/stable/okteta/${version}/src/${name}.tar.xz";
+ url = "mirror://kde/stable/okteta/${version}/src/${pname}-${version}.tar.xz";
sha256 = "0k38hd9wq6jvzy0225y61rzr7lgwbac1haalhsrfpmyjy6d833dv";
};
@@ -28,6 +28,7 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; {
license = licenses.gpl2;
+ description = "A hex editor";
maintainers = with maintainers; [ peterhoeg bkchr ];
platforms = platforms.linux;
};
diff --git a/pkgs/applications/editors/quilter/default.nix b/pkgs/applications/editors/quilter/default.nix
index 43ff16deb2d2..41a87de2effd 100644
--- a/pkgs/applications/editors/quilter/default.nix
+++ b/pkgs/applications/editors/quilter/default.nix
@@ -1,23 +1,23 @@
-{ stdenv, fetchFromGitHub, pkgconfig, meson, ninja, python3
+{ stdenv, fetchFromGitHub, pkgconfig, meson, ninja, python3, vala
, gtk3, desktop-file-utils, gtksourceview, webkitgtk, gtkspell3, pantheon
, libgee, discount, wrapGAppsHook }:
stdenv.mkDerivation rec {
pname = "quilter";
- version = "1.9.2";
+ version = "2.0.0";
src = fetchFromGitHub {
owner = "lainsce";
repo = pname;
rev = version;
- sha256 = "10r6d695avxj31yghb82ymgnd7f1dawwbqz3gfy0rycjza9dxvv8";
+ sha256 = "1jmgnmpalnl3261wifk0mqa9viag6yvlrycgzqalmnrm1b20pyg4";
};
nativeBuildInputs = [
desktop-file-utils
meson
ninja
- pantheon.vala
+ vala
pkgconfig
python3
wrapGAppsHook
@@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
description = "Focus on your writing - designed for elementary OS";
homepage = https://github.com/lainsce/quilter;
license = licenses.gpl2Plus;
- maintainers = with maintainers; [ worldofpeace ];
+ maintainers = pantheon.maintainers;
platforms = platforms.linux;
};
}
diff --git a/pkgs/applications/editors/rednotebook/default.nix b/pkgs/applications/editors/rednotebook/default.nix
index 11154250e583..11a5b4c7ba34 100644
--- a/pkgs/applications/editors/rednotebook/default.nix
+++ b/pkgs/applications/editors/rednotebook/default.nix
@@ -5,13 +5,13 @@
buildPythonApplication rec {
pname = "rednotebook";
- version = "2.8";
+ version = "2.11.1";
src = fetchFromGitHub {
owner = "jendrikseipp";
repo = "rednotebook";
rev = "v${version}";
- sha256 = "0k75lw3p6jx30ngvn8iipk1763gazkbrsad3fpl3sqppaqaggryj";
+ sha256 = "04c7a0wgmdl88v9386y1052c38ajbkryiwhqps5lx34d4g7r6hm1";
};
# We have not packaged tests.
@@ -30,6 +30,10 @@ buildPythonApplication rec {
"--suffix XDG_DATA_DIRS : $XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH"
];
+ # Until gobject-introspection in nativeBuildInputs is supported.
+ # https://github.com/NixOS/nixpkgs/issues/56943#issuecomment-472568643
+ strictDeps = false;
+
meta = with lib; {
homepage = http://rednotebook.sourceforge.net/;
description = "A modern journal that includes a calendar navigation, customizable templates, export functionality and word clouds";
diff --git a/pkgs/applications/editors/retext/default.nix b/pkgs/applications/editors/retext/default.nix
index a7dc02a9a636..d1028ec6ce8d 100644
--- a/pkgs/applications/editors/retext/default.nix
+++ b/pkgs/applications/editors/retext/default.nix
@@ -8,7 +8,7 @@ let
version = "7.0.4";
python = let
packageOverrides = self: super: {
- markdown = super.markdown.overridePythonAttrs(old: rec {
+ markdown = super.markdown.overridePythonAttrs(old: {
src = super.fetchPypi {
version = "3.0.1";
pname = "Markdown";
@@ -16,7 +16,7 @@ let
};
});
- chardet = super.chardet.overridePythonAttrs(old: rec {
+ chardet = super.chardet.overridePythonAttrs(old: {
src = super.fetchPypi {
version = "2.3.0";
pname = "chardet";
@@ -35,7 +35,7 @@ in python.pkgs.buildPythonApplication {
src = fetchFromGitHub {
owner = "retext-project";
repo = "retext";
- rev = "${version}";
+ rev = version;
sha256 = "1zcapywspc9v5zf5cxqkcy019np9n41gmryqixj66zsvd544c6si";
};
diff --git a/pkgs/applications/editors/rstudio/default.nix b/pkgs/applications/editors/rstudio/default.nix
index 27c956dcd14e..933644cc4717 100644
--- a/pkgs/applications/editors/rstudio/default.nix
+++ b/pkgs/applications/editors/rstudio/default.nix
@@ -4,6 +4,7 @@
, llvmPackages
}:
+with stdenv.lib;
let
verMajor = "1";
verMinor = "2";
@@ -13,7 +14,8 @@ let
gwtVer = "2.8.1";
in
stdenv.mkDerivation rec {
- name = "RStudio-${version}";
+ pname = "RStudio";
+ inherit version;
nativeBuildInputs = [ cmake unzip ant jdk makeWrapper pandoc ];
@@ -46,7 +48,13 @@ stdenv.mkDerivation rec {
sha256 = "19x000m3jwnkqgi6ic81lkzyjvvxcfacw2j0vcfcaknvvagzhyhb";
};
- hunspellDictionaries = with stdenv.lib; filter isDerivation (attrValues hunspellDicts);
+ hunspellDictionaries = filter isDerivation (unique (attrValues hunspellDicts));
+ # These dicts contain identically-named dict files, so we only keep the
+ # -large versions in case of clashes
+ largeDicts = filter (d: hasInfix "-large-wordlist" d) hunspellDictionaries;
+ otherDicts = filter (d: !(hasAttr "dictFileName" d &&
+ elem d.dictFileName (map (d: d.dictFileName) largeDicts))) hunspellDictionaries;
+ dictionaries = largeDicts ++ otherDicts;
mathJaxSrc = fetchurl {
url = https://s3.amazonaws.com/rstudio-buildtools/mathjax-26.zip;
@@ -76,7 +84,7 @@ stdenv.mkDerivation rec {
mv gwt-${gwtVer} $GWT_LIB_DIR/gwt/${gwtVer}
mkdir dependencies/common/dictionaries
- for dict in ${builtins.concatStringsSep " " hunspellDictionaries}; do
+ for dict in ${builtins.concatStringsSep " " dictionaries}; do
for i in "$dict/share/hunspell/"*; do
ln -sv $i dependencies/common/dictionaries/
done
@@ -98,7 +106,7 @@ stdenv.mkDerivation rec {
cmakeFlags = [ "-DRSTUDIO_TARGET=Desktop" "-DQT_QMAKE_EXECUTABLE=$NIX_QT5_TMP/bin/qmake" ];
desktopItem = makeDesktopItem {
- name = name;
+ name = "${pname}-${version}";
exec = "rstudio %F";
icon = "rstudio";
desktopName = "RStudio";
diff --git a/pkgs/applications/editors/scite/default.nix b/pkgs/applications/editors/scite/default.nix
index 2f4693982a9c..78dd0d095414 100644
--- a/pkgs/applications/editors/scite/default.nix
+++ b/pkgs/applications/editors/scite/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchurl, pkgconfig, gtk2 }:
-stdenv.mkDerivation rec {
- name = "scite-${version}";
+stdenv.mkDerivation {
+ pname = "scite";
version = "4.0.5";
src = fetchurl {
diff --git a/pkgs/applications/editors/sigil/default.nix b/pkgs/applications/editors/sigil/default.nix
index 871ca1c671dc..ac171f60ead7 100644
--- a/pkgs/applications/editors/sigil/default.nix
+++ b/pkgs/applications/editors/sigil/default.nix
@@ -1,11 +1,11 @@
-{ stdenv, fetchFromGitHub, cmake, pkgconfig, makeWrapper
+{ stdenv, mkDerivation, fetchFromGitHub, cmake, pkgconfig, makeWrapper
, boost, xercesc
, qtbase, qttools, qtwebkit, qtxmlpatterns
, python3, python3Packages
}:
-stdenv.mkDerivation rec {
- name = "sigil-${version}";
+mkDerivation rec {
+ pname = "sigil";
version = "0.9.14";
src = fetchFromGitHub {
@@ -17,17 +17,18 @@ stdenv.mkDerivation rec {
pythonPath = with python3Packages; [ lxml ];
- propagatedBuildInputs = with python3Packages; [ lxml ];
-
nativeBuildInputs = [ cmake pkgconfig makeWrapper ];
buildInputs = [
boost xercesc qtbase qttools qtwebkit qtxmlpatterns
- python3 python3Packages.lxml ];
+ python3Packages.lxml ];
+
+ dontWrapQtApps = true;
preFixup = ''
wrapProgram "$out/bin/sigil" \
- --prefix PYTHONPATH : $PYTHONPATH:$(toPythonPath ${python3Packages.lxml})
+ --prefix PYTHONPATH : $PYTHONPATH \
+ ''${qtWrapperArgs[@]}
'';
enableParallelBuilding = true;
@@ -36,7 +37,7 @@ stdenv.mkDerivation rec {
description = "Free, open source, multi-platform ebook (ePub) editor";
homepage = https://github.com/Sigil-Ebook/Sigil/;
license = licenses.gpl3;
- maintainers =[ maintainers.ramkromberg ];
+ # currently unmaintained
platforms = platforms.linux;
};
}
diff --git a/pkgs/applications/editors/standardnotes/default.nix b/pkgs/applications/editors/standardnotes/default.nix
index d20f413700e8..5a13d91aef2c 100644
--- a/pkgs/applications/editors/standardnotes/default.nix
+++ b/pkgs/applications/editors/standardnotes/default.nix
@@ -1,21 +1,22 @@
{ stdenv, appimage-run, fetchurl, runtimeShell }:
let
- version = "3.0.6";
+ version = "3.0.15";
plat = {
- "i386-linux" = "i386";
- "x86_64-linux" = "x86_64";
+ i386-linux = "i386";
+ x86_64-linux = "x86_64";
}.${stdenv.hostPlatform.system};
sha256 = {
- "i386-linux" = "0czhlbacjks9x8y2w46nzlvk595psqhqw0vl0bvsq7sz768dk0ni";
- "x86_64-linux" = "0haji9h8rrm9yvqdv6i2y6xdd0yhsssjjj83hmf6cb868lwyigsf";
+ i386-linux = "0v2nsis6vb1lnhmjd28vrfxqwwpycv02j0nvjlfzcgj4b3400j7a";
+ x86_64-linux = "130n586cw0836zsbwqcz3pp3h0d4ny74ngqs4k4cvfb92556r7xh";
}.${stdenv.hostPlatform.system};
in
-stdenv.mkDerivation rec {
- name = "standardnotes-${version}";
+stdenv.mkDerivation {
+ pname = "standardnotes";
+ inherit version;
src = fetchurl {
url = "https://github.com/standardnotes/desktop/releases/download/v${version}/standard-notes-${version}-${plat}.AppImage";
diff --git a/pkgs/applications/editors/sublime/3/packages.nix b/pkgs/applications/editors/sublime/3/packages.nix
index b8fef39d3ea2..d72966e04401 100644
--- a/pkgs/applications/editors/sublime/3/packages.nix
+++ b/pkgs/applications/editors/sublime/3/packages.nix
@@ -3,17 +3,17 @@
let
common = opts: callPackage (import ./common.nix opts);
in
- rec {
+ {
sublime3-dev = common {
- buildVersion = "3208";
+ buildVersion = "3210";
dev = true;
- x32sha256 = "09k04fjryc0dc6173i6nwhi5xaan89n4lp0n083crvkqwp0qlf2i";
- x64sha256 = "12pn3yfm452m75dlyl0lyf82956j8raz2dglv328m81hbafflrj8";
+ x32sha256 = "1ngr4c8h2mafy96mi8dd3g8mg5r9ha1cpcd8p3gz7jwpbypvkkbv";
+ x64sha256 = "0j65a4ylgga1qzc74wf3k5craghahma8hwqg3zs1rgzz601nl693";
} {};
sublime3 = common {
- buildVersion = "3207";
- x32sha256 = "14hfb8x8zb49zjq0pd8s73xk333gmf38h5b7g979czcmbhdxiyqy";
- x64sha256 = "1i1q9592sc8idvlpygksdkclh7h506hsz5l0i02g1814w0flzdmc";
+ buildVersion = "3211";
+ x32sha256 = "0w9hba1nl2hv1mri418n7v0m321b6wqphb1knll23ldv5fb0j1j8";
+ x64sha256 = "1vkldmimyjhbgplcd6r27gvk64rr7cparfd44hy6qdyzwsjqqg0b";
} {};
}
diff --git a/pkgs/applications/editors/supertux-editor/default.nix b/pkgs/applications/editors/supertux-editor/default.nix
index a6d624d4b1ec..6714f917315c 100644
--- a/pkgs/applications/editors/supertux-editor/default.nix
+++ b/pkgs/applications/editors/supertux-editor/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, mono, gtk-sharp-2_0, pkgconfig, makeWrapper, gnome2, gtk2 }:
-stdenv.mkDerivation rec {
+stdenv.mkDerivation {
version = "git-2014-08-20";
- name = "supertux-editor-${version}";
+ pname = "supertux-editor";
src = fetchFromGitHub {
owner = "SuperTux";
diff --git a/pkgs/applications/editors/tecoc/default.nix b/pkgs/applications/editors/tecoc/default.nix
index dd986b346a37..48af4a99dada 100644
--- a/pkgs/applications/editors/tecoc/default.nix
+++ b/pkgs/applications/editors/tecoc/default.nix
@@ -3,7 +3,7 @@
stdenv.mkDerivation rec {
- name = "tecoc-git-${version}";
+ pname = "tecoc-git";
version = "20150606";
src = fetchFromGitHub {
@@ -28,9 +28,9 @@ stdenv.mkDerivation rec {
makeFlags = [ "CC=${stdenv.cc}/bin/cc" "-C src/" ];
installPhase = ''
- mkdir -p $out/bin $out/share/doc/${name} $out/lib/teco/macros
+ mkdir -p $out/bin $out/share/doc/${pname}-${version} $out/lib/teco/macros
cp src/tecoc $out/bin
- cp src/aaout.txt doc/* $out/share/doc/${name}
+ cp src/aaout.txt doc/* $out/share/doc/${pname}-${version}
cp lib/* lib2/* $out/lib/teco/macros
(cd $out/bin
ln -s tecoc Make
diff --git a/pkgs/applications/editors/texmacs/darwin.nix b/pkgs/applications/editors/texmacs/darwin.nix
index dfb2e49e0c8d..5d5843890e14 100644
--- a/pkgs/applications/editors/texmacs/darwin.nix
+++ b/pkgs/applications/editors/texmacs/darwin.nix
@@ -15,7 +15,8 @@ let
};
in
stdenv.mkDerivation {
- name = "TeXmacs-${version}";
+ pname = "TeXmacs";
+ inherit version;
src= fetchurl {
url = "http://www.texmacs.org/Download/ftp/tmftp/source/TeXmacs-${version}-src.tar.gz";
diff --git a/pkgs/applications/editors/texmaker/default.nix b/pkgs/applications/editors/texmaker/default.nix
index 79ece9d62a98..71043cb78fe1 100644
--- a/pkgs/applications/editors/texmaker/default.nix
+++ b/pkgs/applications/editors/texmaker/default.nix
@@ -1,12 +1,11 @@
-{ stdenv, fetchurl, qtbase, qtscript, qmake, zlib, pkgconfig, poppler }:
+{ lib, mkDerivation, fetchurl, qtbase, qtscript, qmake, zlib, pkgconfig, poppler }:
-stdenv.mkDerivation rec {
+mkDerivation rec {
pname = "texmaker";
version = "5.0.3";
- name = "${pname}-${version}";
src = fetchurl {
- url = "http://www.xm1math.net/texmaker/${name}.tar.bz2";
+ url = "http://www.xm1math.net/texmaker/${pname}-${version}.tar.bz2";
sha256 = "0vrj9w5lk3vf6138n5bz8phmy3xp5kv4dq1rgirghcf4hbxdyx30";
};
@@ -14,14 +13,15 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig poppler qmake ];
NIX_CFLAGS_COMPILE="-I${poppler.dev}/include/poppler";
- preConfigure = ''
- qmakeFlags="$qmakeFlags DESKTOPDIR=$out/share/applications ICONDIR=$out/share/pixmaps METAINFODIR=$out/share/metainfo"
- '';
-
+ qmakeFlags = [
+ "DESKTOPDIR=${placeholder "out"}/share/applications"
+ "ICONDIR=${placeholder "out"}/share/pixmaps"
+ "METAINFODIR=${placeholder "out"}/share/metainfo"
+ ];
enableParallelBuilding = true;
- meta = with stdenv.lib; {
+ meta = with lib; {
description = "TeX and LaTeX editor";
longDescription=''
This editor is a full fledged IDE for TeX and
diff --git a/pkgs/applications/editors/texstudio/default.nix b/pkgs/applications/editors/texstudio/default.nix
index 50113dd1566b..04e2cb45e283 100644
--- a/pkgs/applications/editors/texstudio/default.nix
+++ b/pkgs/applications/editors/texstudio/default.nix
@@ -3,7 +3,6 @@
stdenv.mkDerivation rec {
pname = "texstudio";
version = "2.12.16";
- name = "${pname}-${version}";
src = fetchFromGitHub {
owner = "${pname}-org";
diff --git a/pkgs/applications/editors/textadept/default.nix b/pkgs/applications/editors/textadept/default.nix
index 79cad6a9782c..85006e51b663 100644
--- a/pkgs/applications/editors/textadept/default.nix
+++ b/pkgs/applications/editors/textadept/default.nix
@@ -1,7 +1,7 @@
{ lib, stdenv, fetchhg, fetchurl, gtk2, glib, pkgconfig, unzip, ncurses, zip }:
stdenv.mkDerivation rec {
version = "10.2";
- name = "textadept-${version}";
+ pname = "textadept";
nativeBuildInputs = [ pkgconfig ];
buildInputs = [
diff --git a/pkgs/applications/editors/texworks/default.nix b/pkgs/applications/editors/texworks/default.nix
index 86904c11f748..8042363f73c9 100644
--- a/pkgs/applications/editors/texworks/default.nix
+++ b/pkgs/applications/editors/texworks/default.nix
@@ -4,7 +4,7 @@
, withPython ? true, python3 }:
stdenv.mkDerivation rec {
- name = "texworks-${version}";
+ pname = "texworks";
version = "0.6.3";
src = fetchFromGitHub {
diff --git a/pkgs/applications/editors/thonny/default.nix b/pkgs/applications/editors/thonny/default.nix
index 5f87aad8a871..a6179452f4d5 100644
--- a/pkgs/applications/editors/thonny/default.nix
+++ b/pkgs/applications/editors/thonny/default.nix
@@ -4,13 +4,13 @@ with python3.pkgs;
buildPythonApplication rec {
pname = "thonny";
- version = "3.1.2";
+ version = "3.2.0b7";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
- sha256 = "1simqqxm72k5zhavhllkinsyw8ggy6fjs5ppj82g3l5g3919pfna";
+ sha256 = "0p0hi5rj873cszx9rpbjjq51vs6xys3rlq9v1rya710i3fnw0hqh";
};
propagatedBuildInputs = with python3.pkgs; [
diff --git a/pkgs/applications/editors/tiled/default.nix b/pkgs/applications/editors/tiled/default.nix
index 4fa93d78235e..b0b80a4ec001 100644
--- a/pkgs/applications/editors/tiled/default.nix
+++ b/pkgs/applications/editors/tiled/default.nix
@@ -1,7 +1,7 @@
-{ stdenv, fetchFromGitHub, pkgconfig, qmake
+{ stdenv, mkDerivation, fetchFromGitHub, pkgconfig, qmake
, python, qtbase, qttools }:
-stdenv.mkDerivation rec {
+mkDerivation rec {
pname = "tiled";
version = "1.2.4";
diff --git a/pkgs/applications/editors/tweak/default.nix b/pkgs/applications/editors/tweak/default.nix
index aa3b4b99d7a0..6bfce921d0f6 100644
--- a/pkgs/applications/editors/tweak/default.nix
+++ b/pkgs/applications/editors/tweak/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, ncurses }:
stdenv.mkDerivation rec {
- name = "tweak-${version}";
+ pname = "tweak";
version = "3.02";
src = fetchurl {
- url = "https://www.chiark.greenend.org.uk/~sgtatham/tweak/${name}.tar.gz";
+ url = "https://www.chiark.greenend.org.uk/~sgtatham/tweak/${pname}-${version}.tar.gz";
sha256 = "06js54pr5hwpwyxj77zs5s40n5aqvaw48dkj7rid2d47pyqijk2v";
};
diff --git a/pkgs/applications/editors/typora/default.nix b/pkgs/applications/editors/typora/default.nix
index 157204ce1ca3..09baf383f972 100644
--- a/pkgs/applications/editors/typora/default.nix
+++ b/pkgs/applications/editors/typora/default.nix
@@ -1,12 +1,24 @@
-{ stdenv, fetchurl, makeWrapper, electron_3, dpkg, gtk3, glib, gsettings-desktop-schemas, wrapGAppsHook }:
+{ stdenv
+, lib
+, fetchurl
+, makeWrapper
+, electron_5
+, dpkg
+, gtk3
+, glib
+, gsettings-desktop-schemas
+, wrapGAppsHook
+, withPandoc ? false
+, pandoc
+}:
stdenv.mkDerivation rec {
pname = "typora";
- version = "0.9.72";
+ version = "0.9.73";
src = fetchurl {
url = "https://www.typora.io/linux/typora_${version}_amd64.deb";
- sha256 = "0q7fj77pr3ykpwgip87h12qxvpvlzs15mi9w3phqm3p9mmm9rlrs";
+ sha256 = "1fgcb4bx5pw8ah5j30d38gw7qi1cmqarfhvgdns9f2n0d57bvvw3";
};
nativeBuildInputs = [
@@ -39,17 +51,18 @@ stdenv.mkDerivation rec {
'';
postFixup = ''
- makeWrapper ${electron_3}/bin/electron $out/bin/typora \
+ makeWrapper ${electron_5}/bin/electron $out/bin/typora \
--add-flags $out/share/typora \
"''${gappsWrapperArgs[@]}" \
- --prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc ]}"
+ ${lib.optionalString withPandoc ''--prefix PATH : "${lib.makeBinPath [ pandoc ]}"''} \
+ --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc ]}"
'';
- meta = with stdenv.lib; {
+ meta = with lib; {
description = "A minimal Markdown reading & writing app";
homepage = https://typora.io;
license = licenses.unfree;
maintainers = with maintainers; [ jensbin worldofpeace ];
- inherit (electron_3.meta) platforms;
+ platforms = [ "x86_64-linux"];
};
}
diff --git a/pkgs/applications/editors/uemacs/default.nix b/pkgs/applications/editors/uemacs/default.nix
index 551fa67d9863..0a2df6b6d4bb 100644
--- a/pkgs/applications/editors/uemacs/default.nix
+++ b/pkgs/applications/editors/uemacs/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchgit, ncurses }:
-stdenv.mkDerivation rec {
- name = "uemacs-${version}";
+stdenv.mkDerivation {
+ pname = "uemacs";
version = "2014-12-08";
src = fetchgit {
diff --git a/pkgs/applications/editors/vbindiff/default.nix b/pkgs/applications/editors/vbindiff/default.nix
index 8d3a5353c989..d1aa59569e62 100644
--- a/pkgs/applications/editors/vbindiff/default.nix
+++ b/pkgs/applications/editors/vbindiff/default.nix
@@ -1,13 +1,13 @@
{ stdenv, fetchurl, ncurses }:
stdenv.mkDerivation rec {
- name = "vbindiff-${version}";
+ pname = "vbindiff";
version = "3.0_beta5";
buildInputs = [ ncurses ];
src = fetchurl {
- url = "https://www.cjmweb.net/vbindiff/${name}.tar.gz";
+ url = "https://www.cjmweb.net/vbindiff/${pname}-${version}.tar.gz";
sha256 = "1f1kj4jki08bnrwpzi663mjfkrx4wnfpzdfwd2qgijlkx5ysjkgh";
};
diff --git a/pkgs/applications/editors/vim/common.nix b/pkgs/applications/editors/vim/common.nix
index 63d8add3a012..567da2a08f20 100644
--- a/pkgs/applications/editors/vim/common.nix
+++ b/pkgs/applications/editors/vim/common.nix
@@ -1,12 +1,12 @@
{ lib, fetchFromGitHub }:
rec {
- version = "8.1.1547";
+ version = "8.1.1967";
src = fetchFromGitHub {
owner = "vim";
repo = "vim";
rev = "v${version}";
- sha256 = "01v35wq8wjrbzmdf5r02gp0sfa9yyfswsi3fqzn94cd68qhskkpr";
+ sha256 = "0cdfi67jwv8j982i1jxdfqv4aqglig8f0hzadgygk69i0wwkymwk";
};
enableParallelBuilding = true;
diff --git a/pkgs/applications/editors/vim/configurable.nix b/pkgs/applications/editors/vim/configurable.nix
index 4d37b77f61bf..d21d0ad5ee00 100644
--- a/pkgs/applications/editors/vim/configurable.nix
+++ b/pkgs/applications/editors/vim/configurable.nix
@@ -68,12 +68,12 @@ let
in stdenv.mkDerivation rec {
- name = "vim_configurable-${version}";
+ pname = "vim_configurable";
inherit (common) version postPatch hardeningDisable enableParallelBuilding meta;
src = builtins.getAttr source {
- "default" = common.src; # latest release
+ default = common.src; # latest release
};
patches = [ ./cflags-prune.diff ] ++ stdenv.lib.optional ftNixSupport ./ft-nix-support.patch;
diff --git a/pkgs/applications/editors/vim/default.nix b/pkgs/applications/editors/vim/default.nix
index 26cd61d182bd..ae4e9ac8a9c9 100644
--- a/pkgs/applications/editors/vim/default.nix
+++ b/pkgs/applications/editors/vim/default.nix
@@ -12,8 +12,8 @@
let
common = callPackage ./common.nix {};
in
-stdenv.mkDerivation rec {
- name = "vim-${version}";
+stdenv.mkDerivation {
+ pname = "vim";
inherit (common) version src postPatch hardeningDisable enableParallelBuilding meta;
diff --git a/pkgs/applications/editors/vim/macvim.nix b/pkgs/applications/editors/vim/macvim.nix
index ec2d75ffaf66..073cd84890ef 100644
--- a/pkgs/applications/editors/vim/macvim.nix
+++ b/pkgs/applications/editors/vim/macvim.nix
@@ -24,16 +24,16 @@ let
'';
in
-stdenv.mkDerivation rec {
- name = "macvim-${version}";
+stdenv.mkDerivation {
+ pname = "macvim";
- version = "8.1.1517";
+ version = "8.1.1722";
src = fetchFromGitHub {
owner = "macvim-dev";
repo = "macvim";
- rev = "snapshot-156";
- sha256 = "17plmqcn49gqwr1km77mkxflrg0f4sn06r3n0fbxa8zcz9zmb1q2";
+ rev = "snapshot-157";
+ sha256 = "1gmgc4pwaqy78gj4p7iib94n7j52ir0aa03ks595h3vy1hkcwwky";
};
enableParallelBuilding = true;
@@ -48,7 +48,11 @@ stdenv.mkDerivation rec {
# The sparkle patch modified the nibs, so we have to recompile them
postPatch = ''
for nib in MainMenu Preferences; do
- /usr/bin/ibtool --compile src/MacVim/English.lproj/$nib.nib/keyedobjects.nib src/MacVim/English.lproj/$nib.nib
+ # redirect stdin/stdout/stderr to /dev/null because ibtool marks them nonblocking
+ # and not redirecting screws with subsequent commands.
+ # redirecting stderr is unfortunate but I don't know of a reasonable way to remove O_NONBLOCK
+ # from the fds.
+ /usr/bin/ibtool --compile src/MacVim/English.lproj/$nib.nib/keyedobjects.nib src/MacVim/English.lproj/$nib.nib >/dev/null 2>/dev/null &6; }
for path in "${vi_cv_path_mzscheme_pfx}/lib" "${SCHEME_LIB}"; do
diff --git a/pkgs/applications/editors/vis/default.nix b/pkgs/applications/editors/vis/default.nix
index 7825188fea9b..1bda6958206b 100644
--- a/pkgs/applications/editors/vis/default.nix
+++ b/pkgs/applications/editors/vis/default.nix
@@ -4,7 +4,7 @@
}:
stdenv.mkDerivation rec {
- name = "vis-${version}";
+ pname = "vis";
version = "0.5";
src = fetchFromGitHub {
@@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
--prefix VIS_PATH : "\$HOME/.config:$out/share/vis"
'';
- desktopItem = makeDesktopItem rec {
+ desktopItem = makeDesktopItem {
name = "vis";
exec = "vis %U";
type = "Application";
diff --git a/pkgs/applications/editors/vscode/generic.nix b/pkgs/applications/editors/vscode/generic.nix
index e42ca8a0bbf8..bdcf786f61d2 100644
--- a/pkgs/applications/editors/vscode/generic.nix
+++ b/pkgs/applications/editors/vscode/generic.nix
@@ -11,7 +11,7 @@
let
inherit (stdenv.hostPlatform) system;
in
- stdenv.mkDerivation rec {
+ stdenv.mkDerivation {
inherit pname version src sourceRoot;
@@ -69,9 +69,9 @@ in
installPhase =
if system == "x86_64-darwin" then ''
- mkdir -p $out/lib/vscode $out/bin
- cp -r ./* $out/lib/vscode
- ln -s $out/lib/vscode/Contents/Resources/app/bin/${executableName} $out/bin
+ mkdir -p "$out/Applications/${longName}.app" $out/bin
+ cp -r ./* "$out/Applications/${longName}.app"
+ ln -s "$out/Applications/${longName}.app/Contents/Resources/app/bin/code" $out/bin/${executableName}
'' else ''
mkdir -p $out/lib/vscode $out/bin
cp -r ./* $out/lib/vscode
diff --git a/pkgs/applications/editors/vscode/vscode.nix b/pkgs/applications/editors/vscode/vscode.nix
index 438292b7683c..52b9228e7667 100644
--- a/pkgs/applications/editors/vscode/vscode.nix
+++ b/pkgs/applications/editors/vscode/vscode.nix
@@ -4,20 +4,20 @@ let
inherit (stdenv.hostPlatform) system;
plat = {
- "x86_64-linux" = "linux-x64";
- "x86_64-darwin" = "darwin";
+ x86_64-linux = "linux-x64";
+ x86_64-darwin = "darwin";
}.${system};
archive_fmt = if system == "x86_64-darwin" then "zip" else "tar.gz";
sha256 = {
- "x86_64-linux" = "1ck13xpnfklfc81jd8d5md09fcp0gjypacdqj276mzhr5mig29cd";
- "x86_64-darwin" = "0xpzm372swv0by22saxib16fvvvfjr7d68aj3l5dsl5c9a8v23qj";
+ x86_64-linux = "0p4ah1bbz0njl2bk783gq5z1gxfzapa65qzhrkn216v07rba29jm";
+ x86_64-darwin = "162bqdhi2dx74q5f56bhs5phz9az66lb4lvfcj1sdygp51xsb93y";
}.${system};
in
callPackage ./generic.nix rec {
- version = "1.36.1";
+ version = "1.39.2";
pname = "vscode";
executableName = "code" + lib.optionalString isInsiders "-insiders";
diff --git a/pkgs/applications/editors/vscode/vscodium.nix b/pkgs/applications/editors/vscode/vscodium.nix
index fbcc6d0c7374..e2386bc11189 100644
--- a/pkgs/applications/editors/vscode/vscodium.nix
+++ b/pkgs/applications/editors/vscode/vscodium.nix
@@ -4,20 +4,26 @@ let
inherit (stdenv.hostPlatform) system;
plat = {
- "x86_64-linux" = "linux-x64";
- "x86_64-darwin" = "darwin";
+ x86_64-linux = "linux-x64";
+ x86_64-darwin = "darwin";
}.${system};
archive_fmt = if system == "x86_64-darwin" then "zip" else "tar.gz";
sha256 = {
- "x86_64-linux" = "1ay4zvkbln2wf2j1d71mn13b6p2fqvzgz45mzrgaqwsszhbg4xzp";
- "x86_64-darwin" = "17r9krb1qd92ybx078hkw9zlyym6kbnmbl91vjdilsq77bkf9jmw";
+ x86_64-linux = "013jhmc29angqh9qb8jj0jqk4whqb59id61njm8gwz977sdgpf9l";
+ x86_64-darwin = "09jfii132cib1kn3bghwchdlvi4cfjqz5hvw6j5gr53h7j35k37j";
+ }.${system};
+
+ sourceRoot = {
+ x86_64-linux = ".";
+ x86_64-darwin = "";
}.${system};
in
callPackage ./generic.nix rec {
+ inherit sourceRoot;
- version = "1.36.1";
+ version = "1.39.2";
pname = "vscodium";
executableName = "codium";
@@ -29,8 +35,6 @@ in
inherit sha256;
};
- sourceRoot = ".";
-
meta = with stdenv.lib; {
description = ''
Open source source code editor developed by Microsoft for Windows,
diff --git a/pkgs/applications/editors/wily/default.nix b/pkgs/applications/editors/wily/default.nix
index ce67cc2d6484..aab3aecd7d69 100644
--- a/pkgs/applications/editors/wily/default.nix
+++ b/pkgs/applications/editors/wily/default.nix
@@ -2,10 +2,10 @@
stdenv.mkDerivation rec {
version = "0.13.42";
- name = "wily-${version}";
+ pname = "wily";
src = fetchurl {
- url = "mirror://sourceforge/wily/${name}.tar.gz";
+ url = "mirror://sourceforge/wily/${pname}-${version}.tar.gz";
sha256 = "1jy4czk39sh365b0mjpj4d5wmymj98x163vmwzyx3j183jqrhm2z";
};
diff --git a/pkgs/applications/editors/wxhexeditor/default.nix b/pkgs/applications/editors/wxhexeditor/default.nix
index c345e8a95d55..4725d8143b47 100644
--- a/pkgs/applications/editors/wxhexeditor/default.nix
+++ b/pkgs/applications/editors/wxhexeditor/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, fetchpatch, wxGTK, autoconf, automake, libtool, python, gettext }:
stdenv.mkDerivation rec {
- name = "wxHexEditor-${version}";
+ pname = "wxHexEditor";
version = "0.24";
src = fetchFromGitHub {
@@ -26,11 +26,10 @@ stdenv.mkDerivation rec {
url = https://github.com/EUA/wxHexEditor/commit/d0fa3ddc3e9dc9b05f90b650991ef134f74eed01.patch;
sha256 = "1wcb70hrnhq72frj89prcqylpqs74xrfz3kdfdkq84p5qfz9svyj";
})
+ ./missing-semicolon.patch
];
- buildPhase = ''
- make OPTFLAGS="-fopenmp"
- '';
+ makeFlags = [ "OPTFLAGS=-fopenmp" ];
meta = {
description = "Hex Editor / Disk Editor for Huge Files or Devices";
diff --git a/pkgs/applications/editors/wxhexeditor/missing-semicolon.patch b/pkgs/applications/editors/wxhexeditor/missing-semicolon.patch
new file mode 100644
index 000000000000..75722c9c7c55
--- /dev/null
+++ b/pkgs/applications/editors/wxhexeditor/missing-semicolon.patch
@@ -0,0 +1,35 @@
+diff --git a/src/HexDialogs.cpp b/src/HexDialogs.cpp
+index 091a6f9..12e6a78 100644
+--- a/src/HexDialogs.cpp
++++ b/src/HexDialogs.cpp
+@@ -420,7 +420,7 @@ void FindDialog::OnChar( wxKeyEvent& event ){
+ }
+
+ void FindDialog::EventHandler( wxCommandEvent& event ){
+- WX_CLEAR_ARRAY(parent->HighlightArray )
++ WX_CLEAR_ARRAY(parent->HighlightArray );
+ parent->HighlightArray.Shrink();
+
+ if( event.GetId() == btnFind->GetId())
+diff --git a/src/HexEditorCtrl/HexEditorCtrl.cpp b/src/HexEditorCtrl/HexEditorCtrl.cpp
+index 7a3b0e2..f12097f 100644
+--- a/src/HexEditorCtrl/HexEditorCtrl.cpp
++++ b/src/HexEditorCtrl/HexEditorCtrl.cpp
+@@ -64,9 +64,9 @@ HexEditorCtrl::~HexEditorCtrl( void ){
+ Dynamic_Disconnector();
+ Clear();
+
+- WX_CLEAR_ARRAY(MainTagArray)
+- WX_CLEAR_ARRAY(HighlightArray)
+- WX_CLEAR_ARRAY(CompareArray)
++ WX_CLEAR_ARRAY(MainTagArray);
++ WX_CLEAR_ARRAY(HighlightArray);
++ WX_CLEAR_ARRAY(CompareArray);
+
+ MainTagArray.Shrink();
+ HighlightArray.Shrink();
+@@ -1224,4 +1224,3 @@ void wxHugeScrollBar::OnOffsetScroll( wxScrollEvent& event ){
+ #endif
+ event.Skip();
+ }
+-
diff --git a/pkgs/applications/editors/xmlcopyeditor/default.nix b/pkgs/applications/editors/xmlcopyeditor/default.nix
index d91403bc54ff..eeda097db258 100644
--- a/pkgs/applications/editors/xmlcopyeditor/default.nix
+++ b/pkgs/applications/editors/xmlcopyeditor/default.nix
@@ -1,12 +1,12 @@
{ stdenv, fetchurl, aspell, boost, expat, intltool, libxml2, libxslt, pcre, wxGTK, xercesc }:
stdenv.mkDerivation rec {
- name = "xmlcopyeditor-${version}";
+ pname = "xmlcopyeditor";
version = "1.2.1.3";
src = fetchurl {
- name = "${name}.tar.gz";
- url = "mirror://sourceforge/xml-copy-editor/${name}.tar.gz";
+ name = "${pname}-${version}.tar.gz";
+ url = "mirror://sourceforge/xml-copy-editor/${pname}-${version}.tar.gz";
sha256 = "0bwxn89600jbrkvlwyawgc0c0qqxpl453mbgcb9qbbxl8984ns4v";
};
diff --git a/pkgs/applications/editors/yi/wrapper.nix b/pkgs/applications/editors/yi/wrapper.nix
index a90275638dc8..fe5fcc1724b4 100644
--- a/pkgs/applications/editors/yi/wrapper.nix
+++ b/pkgs/applications/editors/yi/wrapper.nix
@@ -8,8 +8,8 @@ let
yiEnv = haskellPackages.ghcWithPackages
(self: [ self.yi ] ++ extraPackages self);
in
-stdenv.mkDerivation rec {
- name = "yi-custom-${version}";
+stdenv.mkDerivation {
+ pname = "yi-custom";
version = "0.0.0.1";
dontUnpack = true;
nativeBuildInputs = [ makeWrapper ];
diff --git a/pkgs/applications/gis/grass/default.nix b/pkgs/applications/gis/grass/default.nix
index 360d94d1b825..562a5e616a32 100644
--- a/pkgs/applications/gis/grass/default.nix
+++ b/pkgs/applications/gis/grass/default.nix
@@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, flex, bison, pkgconfig, zlib, libtiff, libpng, fftw
, cairo, readline, ffmpeg, makeWrapper, wxGTK30, netcdf, blas
-, proj, gdal, geos, sqlite, postgresql, mysql, python2Packages, libLAS, proj-datumgrid
+, proj, gdal, geos, sqlite, postgresql, libmysqlclient, python2Packages, libLAS, proj-datumgrid
}:
stdenv.mkDerivation rec {
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ flex bison zlib proj gdal libtiff libpng fftw sqlite cairo proj
- readline ffmpeg makeWrapper wxGTK30 netcdf geos postgresql mysql.connector-c blas
+ readline ffmpeg makeWrapper wxGTK30 netcdf geos postgresql libmysqlclient blas
libLAS proj-datumgrid ]
++ (with python2Packages; [ python dateutil wxPython30 numpy ]);
@@ -37,8 +37,8 @@ stdenv.mkDerivation rec {
"--with-postgres-libs=${postgresql.lib}/lib/"
# it complains about missing libmysqld but doesn't really seem to need it
"--with-mysql"
- "--with-mysql-includes=${mysql.connector-c}/include/mysql"
- "--with-mysql-libs=${mysql.connector-c}/lib/mysql"
+ "--with-mysql-includes=${libmysqlclient}/include/mysql"
+ "--with-mysql-libs=${libmysqlclient}/lib/mysql"
"--with-blas"
"--with-liblas=${libLAS}/bin/liblas-config"
];
diff --git a/pkgs/applications/gis/openorienteering-mapper/default.nix b/pkgs/applications/gis/openorienteering-mapper/default.nix
index 38aeee6d13ef..244f37b10dff 100644
--- a/pkgs/applications/gis/openorienteering-mapper/default.nix
+++ b/pkgs/applications/gis/openorienteering-mapper/default.nix
@@ -3,7 +3,7 @@
}:
stdenv.mkDerivation rec {
- name = "OpenOrienteering-Mapper-${version}";
+ pname = "OpenOrienteering-Mapper";
version = "0.8.4";
buildInputs = [ gdal qtbase qttools qtlocation qtimageformats
diff --git a/pkgs/applications/gis/qgis/unwrapped.nix b/pkgs/applications/gis/qgis/unwrapped.nix
index a57b180d5b23..bb772db2b6a4 100644
--- a/pkgs/applications/gis/qgis/unwrapped.nix
+++ b/pkgs/applications/gis/qgis/unwrapped.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchFromGitHub, cmake, ninja, flex, bison, proj, geos, xlibsWrapper, sqlite, gsl
+{ mkDerivation, lib, fetchFromGitHub, cmake, ninja, flex, bison, proj, geos, xlibsWrapper, sqlite, gsl
, qwt, fcgi, python3Packages, libspatialindex, libspatialite, postgresql
, txt2tags, openssl, libzip, hdf5, netcdf, exiv2
, qtbase, qtwebkit, qtsensors, qca-qt5, qtkeychain, qscintilla, qtserialport, qtxmlpatterns
@@ -9,8 +9,8 @@ let
pythonBuildInputs = with python3Packages;
[ qscintilla-qt5 gdal jinja2 numpy psycopg2
chardet dateutil pyyaml pytz requests urllib3 pygments pyqt5 sip owslib six ];
-in stdenv.mkDerivation rec {
- version = "3.8.0";
+in mkDerivation rec {
+ version = "3.8.3";
pname = "qgis";
name = "${pname}-unwrapped-${version}";
@@ -18,7 +18,7 @@ in stdenv.mkDerivation rec {
owner = "qgis";
repo = "QGIS";
rev = "final-${lib.replaceStrings ["."] ["_"] version}";
- sha256 = "11jqj6lavpw9piv0rm8vvbgd99zhcxl6yfjg699wlrjlyf71xac5";
+ sha256 = "16axjih48qn8ri3p71d8f7k0y3rd05wghmg1fcbyda871b45b2f8";
};
passthru = {
@@ -29,7 +29,7 @@ in stdenv.mkDerivation rec {
buildInputs = [ openssl proj geos xlibsWrapper sqlite gsl qwt exiv2
fcgi libspatialindex libspatialite postgresql txt2tags libzip hdf5 netcdf
qtbase qtwebkit qtsensors qca-qt5 qtkeychain qscintilla qtserialport qtxmlpatterns] ++
- (stdenv.lib.optional withGrass grass) ++ pythonBuildInputs;
+ (lib.optional withGrass grass) ++ pythonBuildInputs;
nativeBuildInputs = [ cmake flex bison ninja ];
@@ -45,13 +45,13 @@ in stdenv.mkDerivation rec {
cmakeFlags = [ "-DCMAKE_SKIP_BUILD_RPATH=OFF"
"-DPYQT5_SIP_DIR=${python3Packages.pyqt5}/share/sip/PyQt5"
"-DQSCI_SIP_DIR=${python3Packages.qscintilla-qt5}/share/sip/PyQt5" ] ++
- stdenv.lib.optional withGrass "-DGRASS_PREFIX7=${grass}/${grass.name}";
+ lib.optional withGrass "-DGRASS_PREFIX7=${grass}/${grass.name}";
meta = {
description = "A Free and Open Source Geographic Information System";
homepage = http://www.qgis.org;
- license = stdenv.lib.licenses.gpl2Plus;
- platforms = with stdenv.lib.platforms; linux;
- maintainers = with stdenv.lib.maintainers; [ lsix ];
+ license = lib.licenses.gpl2Plus;
+ platforms = with lib.platforms; linux;
+ maintainers = with lib.maintainers; [ lsix ];
};
}
diff --git a/pkgs/applications/gis/saga/default.nix b/pkgs/applications/gis/saga/default.nix
index 7440e2633a33..feb79f444b81 100644
--- a/pkgs/applications/gis/saga/default.nix
+++ b/pkgs/applications/gis/saga/default.nix
@@ -2,10 +2,9 @@
libharu, opencv, vigra, postgresql, Cocoa,
unixODBC , poppler, hdf4, hdf5, netcdf, sqlite, qhull, giflib }:
-stdenv.mkDerivation rec {
+stdenv.mkDerivation {
pname = "saga";
version = "7.3.0";
- name = "${pname}-${version}";
# See https://groups.google.com/forum/#!topic/nix-devel/h_vSzEJAPXs
# for why the have additional buildInputs on darwin
diff --git a/pkgs/applications/gis/whitebox-tools/default.nix b/pkgs/applications/gis/whitebox-tools/default.nix
index d82bdc665498..84d7f3ddb499 100644
--- a/pkgs/applications/gis/whitebox-tools/default.nix
+++ b/pkgs/applications/gis/whitebox-tools/default.nix
@@ -1,18 +1,21 @@
{ stdenv, rustPlatform , fetchFromGitHub, Security }:
rustPlatform.buildRustPackage rec {
- name = "whitebox_tools-${version}";
- version = "0.9.0";
+ pname = "whitebox_tools";
+ version = "0.16.0";
src = fetchFromGitHub {
owner = "jblindsay";
repo = "whitebox-tools";
- rev = "6221cdf327be70f0ee4f2053b76bfa01c3f37caa";
- sha256 = "1423ga964mz7qkl88vkcm8qfprsksx04aq4sz9v5ghnmdzzvl89x";
+ rev = "v${version}";
+ sha256 = "1vs4hf2x3qjnffs9kjx56rzl67kpcy8xvng6p0r9fp9mfnblxg6j";
};
buildInputs = stdenv.lib.optional stdenv.isDarwin Security;
- cargoSha256 = "11m13h9b75xz8dfisfcykar53qsl1crrp3l75s73gkkkvczlfd24";
+ cargoSha256 = "1y3vk8bzsaisx7wrncjxcqdh355f2wk4n59vq5qgj37fph2zpy7f";
+
+ # failures: structures::polyline::test::test_polyline_split
+ doCheck = false;
meta = with stdenv.lib; {
description = "An advanced geospatial data analysis platform";
diff --git a/pkgs/applications/graphics/ImageMagick/7.0.nix b/pkgs/applications/graphics/ImageMagick/7.0.nix
index 2bd2207a97a4..2c8430302c7b 100644
--- a/pkgs/applications/graphics/ImageMagick/7.0.nix
+++ b/pkgs/applications/graphics/ImageMagick/7.0.nix
@@ -13,14 +13,14 @@ let
else throw "ImageMagick is not supported on this platform.";
cfg = {
- version = "7.0.8-53";
- sha256 = "0cgfsng2d14891fqwf7mlclsi576c42v0h5r6i4208bakcr25vzk";
+ version = "7.0.8-68";
+ sha256 = "07p3gdqdfmip7066n8v7ark8kgffg7miiin814lj4zg6p3h0aja7";
patches = [];
};
in
-stdenv.mkDerivation rec {
- name = "imagemagick-${version}";
+stdenv.mkDerivation {
+ pname = "imagemagick";
inherit (cfg) version;
src = fetchFromGitHub {
diff --git a/pkgs/applications/graphics/ImageMagick/default.nix b/pkgs/applications/graphics/ImageMagick/default.nix
index ecc6a5b00dec..8cb20f7944d9 100644
--- a/pkgs/applications/graphics/ImageMagick/default.nix
+++ b/pkgs/applications/graphics/ImageMagick/default.nix
@@ -13,8 +13,8 @@ let
else throw "ImageMagick is not supported on this platform.";
cfg = {
- version = "6.9.9-34";
- sha256 = "0sqrgyfi7i7x1akna95c1qhk9sxxswzm3pkssfi4w6v7bn24g25g";
+ version = "6.9.10-68";
+ sha256 = "0ldkw6j4x0k7l6ykgpx9hz9cs7dmlapz2lv3lbrgz2nn9znqswxk";
patches = [];
}
# Freeze version on mingw so we don't need to port the patch too often.
@@ -31,8 +31,8 @@ let
};
in
-stdenv.mkDerivation rec {
- name = "imagemagick-${version}";
+stdenv.mkDerivation {
+ pname = "imagemagick";
inherit (cfg) version;
src = fetchFromGitHub {
diff --git a/pkgs/applications/graphics/PythonMagick/default.nix b/pkgs/applications/graphics/PythonMagick/default.nix
index 938df76e2572..e35a0190d8bc 100644
--- a/pkgs/applications/graphics/PythonMagick/default.nix
+++ b/pkgs/applications/graphics/PythonMagick/default.nix
@@ -3,7 +3,7 @@
{ stdenv, fetchurl, python, pkgconfig, imagemagick, autoreconfHook }:
stdenv.mkDerivation rec {
- name = "pythonmagick-${version}";
+ pname = "pythonmagick";
version = "0.9.16";
src = fetchurl {
diff --git a/pkgs/applications/graphics/ahoviewer/default.nix b/pkgs/applications/graphics/ahoviewer/default.nix
index 5210af4df7ad..fb06266cdc59 100644
--- a/pkgs/applications/graphics/ahoviewer/default.nix
+++ b/pkgs/applications/graphics/ahoviewer/default.nix
@@ -7,7 +7,7 @@
assert useUnrar -> unrar != null;
stdenv.mkDerivation rec {
- name = "ahoviewer-${version}";
+ pname = "ahoviewer";
version = "1.6.5";
src = fetchFromGitHub {
diff --git a/pkgs/applications/graphics/alchemy/default.nix b/pkgs/applications/graphics/alchemy/default.nix
index 09664889f35b..5132d5950aab 100644
--- a/pkgs/applications/graphics/alchemy/default.nix
+++ b/pkgs/applications/graphics/alchemy/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchurl, jre, runtimeShell }:
stdenv.mkDerivation rec {
- name = "alchemy-${version}";
+ pname = "alchemy";
version = "008";
enableParallelBuilding = true;
diff --git a/pkgs/applications/graphics/animbar/default.nix b/pkgs/applications/graphics/animbar/default.nix
index c918e4b302bb..c4f1b4218d07 100644
--- a/pkgs/applications/graphics/animbar/default.nix
+++ b/pkgs/applications/graphics/animbar/default.nix
@@ -3,10 +3,9 @@
stdenv.mkDerivation rec {
pname = "animbar";
version = "1.2";
- name = "${pname}-${version}";
src = fetchurl {
- url = "mirror://sourceforge/${pname}/${name}.tar.bz2";
+ url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.bz2";
sha256 = "0836nwcpyfdrapyj3hbg3wh149ihc26pc78h01adpc7c0r7d9pr9";
};
diff --git a/pkgs/applications/graphics/antimony/default.nix b/pkgs/applications/graphics/antimony/default.nix
index 0257a109568e..3c39aadda98e 100644
--- a/pkgs/applications/graphics/antimony/default.nix
+++ b/pkgs/applications/graphics/antimony/default.nix
@@ -8,8 +8,8 @@ let
gitBranch = "develop";
gitTag = "0.9.3";
in
- stdenv.mkDerivation rec {
- name = "antimony-${version}";
+ stdenv.mkDerivation {
+ pname = "antimony";
version = "2018-10-20";
src = fetchFromGitHub {
diff --git a/pkgs/applications/graphics/apitrace/default.nix b/pkgs/applications/graphics/apitrace/default.nix
index c98c323fc79c..5ce36f4f10e9 100644
--- a/pkgs/applications/graphics/apitrace/default.nix
+++ b/pkgs/applications/graphics/apitrace/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, cmake, libX11, procps, python2, libdwarf, qtbase, qtwebkit }:
stdenv.mkDerivation rec {
- name = "apitrace-${version}";
+ pname = "apitrace";
version = "7.1-572-g${builtins.substring 0 8 src.rev}";
src = fetchFromGitHub {
diff --git a/pkgs/applications/graphics/autotrace/autofig.nix b/pkgs/applications/graphics/autotrace/autofig.nix
index 31ee0ff0d07b..0f53965786b9 100644
--- a/pkgs/applications/graphics/autotrace/autofig.nix
+++ b/pkgs/applications/graphics/autotrace/autofig.nix
@@ -1,6 +1,6 @@
{ stdenv, fetchurl }:
-stdenv.mkDerivation rec {
+stdenv.mkDerivation {
name = "autofig-0.1";
src = fetchurl {
diff --git a/pkgs/applications/graphics/autotrace/default.nix b/pkgs/applications/graphics/autotrace/default.nix
index cc08dce906c3..57e95dfef106 100644
--- a/pkgs/applications/graphics/autotrace/default.nix
+++ b/pkgs/applications/graphics/autotrace/default.nix
@@ -6,11 +6,11 @@
# libpng16.so.16 rather than libpng12.
stdenv.mkDerivation rec {
- name = "autotrace-${version}";
+ pname = "autotrace";
version = "0.31.1";
src = fetchurl {
- url = "mirror://sourceforge/autotrace/AutoTrace/0.31.1/${name}.tar.gz";
+ url = "mirror://sourceforge/autotrace/AutoTrace/0.31.1/${pname}-${version}.tar.gz";
sha256 = "1xmgja5fv48mdbsa51inf7ksz36nqd6bsaybrk5xgprm6cy946js";
};
diff --git a/pkgs/applications/graphics/avocode/default.nix b/pkgs/applications/graphics/avocode/default.nix
index 52fd3cebec26..20cbd6fc5cf8 100644
--- a/pkgs/applications/graphics/avocode/default.nix
+++ b/pkgs/applications/graphics/avocode/default.nix
@@ -1,19 +1,20 @@
{ stdenv, makeDesktopItem, fetchurl, unzip
, gdk-pixbuf, glib, gtk3, atk, at-spi2-atk, pango, cairo, freetype, fontconfig, dbus, nss, nspr, alsaLib, cups, expat, udev, gnome3
-, xorg, mozjpeg, makeWrapper, wrapGAppsHook, hicolor-icon-theme, libuuid
+, xorg, mozjpeg, makeWrapper, wrapGAppsHook, libuuid, at-spi2-core
}:
stdenv.mkDerivation rec {
- name = "avocode-${version}";
- version = "3.9.0";
+ pname = "avocode";
+ version = "3.9.3";
src = fetchurl {
url = "https://media.avocode.com/download/avocode-app/${version}/avocode-${version}-linux.zip";
- sha256 = "0fk62farnsxz59q82kxagibxmn9p9ckp6ix0wqg297gvasgad31q";
+ sha256 = "1ki2fpn70p1rzf52q8511a90n7y7dqi86fs2a48qhass1abxlpqx";
};
libPath = stdenv.lib.makeLibraryPath (with xorg; [
stdenv.cc.cc.lib
+ at-spi2-core.out
gdk-pixbuf
glib
gtk3
@@ -56,7 +57,7 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [makeWrapper wrapGAppsHook];
- buildInputs = [ unzip gtk3 gnome3.adwaita-icon-theme hicolor-icon-theme ];
+ buildInputs = [ unzip gtk3 gnome3.adwaita-icon-theme ];
# src is producing multiple folder on unzip so we must
# override unpackCmd to extract it into newly created folder
diff --git a/pkgs/applications/graphics/awesomebump/default.nix b/pkgs/applications/graphics/awesomebump/default.nix
index df742645e86b..b827a12f81c8 100644
--- a/pkgs/applications/graphics/awesomebump/default.nix
+++ b/pkgs/applications/graphics/awesomebump/default.nix
@@ -22,8 +22,9 @@ let
install -D bin-linux/QtnPEG $out/bin/QtnPEG
'';
};
-in stdenv.mkDerivation rec {
- name = "awesomebump-${version}";
+in stdenv.mkDerivation {
+ pname = "awesomebump";
+ inherit version;
inherit src;
diff --git a/pkgs/applications/graphics/azpainter/default.nix b/pkgs/applications/graphics/azpainter/default.nix
new file mode 100644
index 000000000000..b2060f5db31e
--- /dev/null
+++ b/pkgs/applications/graphics/azpainter/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, fetchFromGitHub, autoreconfHook
+, libX11, libXext, libXi
+, freetype, fontconfig
+, libpng, libjpeg
+, zlib
+}:
+
+stdenv.mkDerivation rec {
+ pname = "azpainter";
+ version = "2.1.4";
+
+ src = fetchFromGitHub {
+ owner = "Symbian9";
+ repo = pname;
+ rev = "refs/tags/v${version}";
+ sha256 = "1hrr9lhsbjyzar3nxvli6cazr7zhyzh0p8hwpg4g9ga6njs8vi8m";
+ };
+
+ nativeBuildInputs = [ autoreconfHook ];
+
+ buildInputs = [
+ libX11 libXext libXi
+ freetype fontconfig
+ libpng libjpeg
+ zlib
+ ];
+
+ configureFlags = [
+ "--with-freetype-dir=${stdenv.lib.getDev freetype}/include/freetype2"
+ ];
+
+ meta = with stdenv.lib; {
+ description = "Full color painting software for illustration drawing";
+ homepage = "https://osdn.net/projects/azpainter";
+ license = licenses.gpl3Plus;
+ maintainers = with maintainers; [ dtzWill ];
+ };
+}
diff --git a/pkgs/applications/graphics/c3d/default.nix b/pkgs/applications/graphics/c3d/default.nix
index 7e1c6d7c8c4b..ad86e66204b2 100644
--- a/pkgs/applications/graphics/c3d/default.nix
+++ b/pkgs/applications/graphics/c3d/default.nix
@@ -1,7 +1,6 @@
{ stdenv, fetchgit, cmake, itk, Cocoa }:
-stdenv.mkDerivation rec {
- name = "${pname}-${version}";
+stdenv.mkDerivation {
pname = "c3d";
version = "2018-10-04";
diff --git a/pkgs/applications/graphics/darktable/default.nix b/pkgs/applications/graphics/darktable/default.nix
index e16ef45fe1eb..d3c7691ccff9 100644
--- a/pkgs/applications/graphics/darktable/default.nix
+++ b/pkgs/applications/graphics/darktable/default.nix
@@ -8,7 +8,7 @@
stdenv.mkDerivation rec {
version = "2.6.2";
- name = "darktable-${version}";
+ pname = "darktable";
src = fetchurl {
url = "https://github.com/darktable-org/darktable/releases/download/release-${version}/darktable-${version}.tar.xz";
@@ -52,6 +52,6 @@ stdenv.mkDerivation rec {
homepage = https://www.darktable.org;
license = licenses.gpl3Plus;
platforms = platforms.linux ++ platforms.darwin;
- maintainers = with maintainers; [ goibhniu rickynils flosse mrVanDalo ];
+ maintainers = with maintainers; [ goibhniu flosse mrVanDalo ];
};
}
diff --git a/pkgs/applications/graphics/deskew/default.nix b/pkgs/applications/graphics/deskew/default.nix
index 71e2d82ea7ca..c35aaa044aef 100644
--- a/pkgs/applications/graphics/deskew/default.nix
+++ b/pkgs/applications/graphics/deskew/default.nix
@@ -2,7 +2,7 @@
stdenv.mkDerivation rec {
- name = "deskew-${version}";
+ pname = "deskew";
version = "1.25";
src = fetchFromBitbucket {
diff --git a/pkgs/applications/graphics/dia/default.nix b/pkgs/applications/graphics/dia/default.nix
index 0ce160242e56..3984cfc17ca5 100644
--- a/pkgs/applications/graphics/dia/default.nix
+++ b/pkgs/applications/graphics/dia/default.nix
@@ -1,10 +1,10 @@
{ stdenv, fetchgit, autoconf, automake, libtool, gtk2, pkgconfig, perlPackages,
libxml2, gettext, python, libxml2Python, docbook5, docbook_xsl,
-libxslt, intltool, libart_lgpl, withGNOME ? false, libgnomeui, hicolor-icon-theme,
+libxslt, intltool, libart_lgpl, withGNOME ? false, libgnomeui,
gtk-mac-integration-gtk2 }:
-stdenv.mkDerivation rec {
- name = "dia-${version}";
+stdenv.mkDerivation {
+ pname = "dia";
version = "0.97.3.20170622";
src = fetchgit {
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
buildInputs =
[ gtk2 libxml2 gettext python libxml2Python docbook5
- libxslt docbook_xsl libart_lgpl hicolor-icon-theme ]
+ libxslt docbook_xsl libart_lgpl ]
++ stdenv.lib.optional withGNOME libgnomeui
++ stdenv.lib.optional stdenv.isDarwin gtk-mac-integration-gtk2;
diff --git a/pkgs/applications/graphics/digikam/default.nix b/pkgs/applications/graphics/digikam/default.nix
index cf2376b3733d..1fc15af72441 100644
--- a/pkgs/applications/graphics/digikam/default.nix
+++ b/pkgs/applications/graphics/digikam/default.nix
@@ -52,13 +52,13 @@
mkDerivation rec {
pname = "digikam";
- version = "6.1.0";
+ version = "6.2.0";
src = fetchFromGitHub {
owner = "KDE";
repo = "digikam";
rev = "v${version}";
- sha256 = "0h0jqfgpanhxfi3r7cgip58ppypqx79z6c5jj7i7f19hp2zziip8";
+ sha256 = "1l1nb1nwicmip2jxhn5gzr7h60igvns0zs3kzp36r6qf4wvg3v2z";
};
nativeBuildInputs = [ cmake doxygen extra-cmake-modules kdoctools wrapGAppsHook ];
@@ -105,6 +105,8 @@ mkDerivation rec {
threadweaver
];
+ enableParallelBuilding = true;
+
cmakeFlags = [
"-DENABLE_MYSQLSUPPORT=1"
"-DENABLE_INTERNALMYSQL=1"
diff --git a/pkgs/applications/graphics/djview/default.nix b/pkgs/applications/graphics/djview/default.nix
index d90fb41c03ba..4d09f2ad5fe0 100644
--- a/pkgs/applications/graphics/djview/default.nix
+++ b/pkgs/applications/graphics/djview/default.nix
@@ -1,30 +1,74 @@
-{ stdenv, fetchurl, pkgconfig
-, djvulibre, qt4, xorg, libtiff
-, darwin }:
+{ stdenv
+, mkDerivation
+, fetchurl
+, pkgconfig
+, djvulibre
+, qtbase
+, qttools
+, xorg
+, libtiff
+, darwin
+}:
-stdenv.mkDerivation rec {
- name = "djview-${version}";
+mkDerivation rec {
+ pname = "djview";
version = "4.10.6";
src = fetchurl {
- url = "mirror://sourceforge/djvu/${name}.tar.gz";
+ url = "mirror://sourceforge/djvu/${pname}-${version}.tar.gz";
sha256 = "08bwv8ppdzhryfcnifgzgdilb12jcnivl4ig6hd44f12d76z6il4";
};
- nativeBuildInputs = [ pkgconfig ];
+ nativeBuildInputs = [
+ pkgconfig
+ qttools
+ ];
- buildInputs = [ djvulibre qt4 xorg.libXt libtiff ]
- ++ stdenv.lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.AGL ];
+ buildInputs = [
+ djvulibre
+ qtbase
+ xorg.libXt
+ libtiff
+ ] ++ stdenv.lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.AGL;
+
+ configureFlags = [
+ "--disable-silent-rules"
+ "--disable-dependency-tracking"
+ "--with-x"
+ "--with-tiff"
+ # NOTE: 2019-09-19: experimental "--enable-npdjvu" fails
+ ] ++ stdenv.lib.optional stdenv.isDarwin "--enable-mac";
passthru = {
mozillaPlugin = "/lib/mozilla/plugins";
};
meta = with stdenv.lib; {
- homepage = http://djvu.sourceforge.net/djview4.html;
- description = "A portable DjVu viewer and browser plugin";
+ description = "A portable DjVu viewer (Qt5) and browser (nsdejavu) plugin";
+ homepage = "http://djvu.sourceforge.net/djview4.html";
license = licenses.gpl2;
platforms = platforms.unix;
- maintainers = [ ];
+ maintainers = with maintainers; [ Anton-Latukha ];
+ longDescription = ''
+ The portable DjVu viewer (Qt5) and browser (nsdejavu) plugin.
+
+ Djview highlights:
+ - entirely based on the public DjVulibre api.
+ - entirely written in portable Qt5.
+ - works natively under Unix/X11, MS Windows, and macOS X.
+ - continuous scrolling of pages
+ - side-by-side display of pages
+ - ability to specify a url to the djview command
+ - all plugin and cgi options available from the command line
+ - all silly annotations implemented
+ - display thumbnails as a grid
+ - display outlines
+ - page names supported (see djvused command set-page-title)
+ - metadata dialog (see djvused command set-meta)
+ - implemented as reusable Qt widgets
+
+ nsdejavu: browser plugin for DjVu. It internally uses djview.
+ Has CGI-style arguments to configure the view of document (see man).
+ '';
};
}
diff --git a/pkgs/applications/graphics/draftsight/default.nix b/pkgs/applications/graphics/draftsight/default.nix
index 30101bb94770..e59d14f7dd6e 100644
--- a/pkgs/applications/graphics/draftsight/default.nix
+++ b/pkgs/applications/graphics/draftsight/default.nix
@@ -6,7 +6,8 @@
let version = "2018SP2"; in
stdenv.mkDerivation {
- name = "draftsight-${version}";
+ pname = "draftsight";
+ inherit version;
nativeBuildInputs = [ dpkg makeWrapper ];
diff --git a/pkgs/applications/graphics/drawio/default.nix b/pkgs/applications/graphics/drawio/default.nix
index a6c067bc6eba..f29f2a927059 100644
--- a/pkgs/applications/graphics/drawio/default.nix
+++ b/pkgs/applications/graphics/drawio/default.nix
@@ -11,11 +11,11 @@
stdenv.mkDerivation rec {
pname = "drawio";
- version = "10.9.5";
+ version = "12.1.0";
src = fetchurl {
url = "https://github.com/jgraph/drawio-desktop/releases/download/v${version}/draw.io-x86_64-${version}.rpm";
- sha256 = "13687d5bfxj7wlbh5j13pvxvs69whlg820wllk3pb1xb3syynlpn";
+ sha256 = "02gwhnbl9fzgf1z8c9bkm3rxzyncp7v57yqc322r85vg0wxir3f8";
};
nativeBuildInputs = [
@@ -70,18 +70,18 @@ stdenv.mkDerivation rec {
# Application icon
mkdir -p $out/share/icons/hicolor
- cp -r usr/share/icons/hicolor/0x0 $out/share/icons/hicolor/1024x1024
+ cp -r usr/share/icons/hicolor/* $out/share/icons/hicolor/
# XDG desktop item
cp -r usr/share/applications $out/share/applications
# Symlink wrapper
mkdir -p $out/bin
- ln -s $out/share/draw.io/draw.io $out/bin/draw.io
+ ln -s $out/share/draw.io/drawio $out/bin/drawio
# Update binary path
- substituteInPlace $out/share/applications/draw.io.desktop \
- --replace /opt/draw.io/draw.io $out/bin/draw.io
+ substituteInPlace $out/share/applications/drawio.desktop \
+ --replace /opt/draw.io/drawio $out/bin/drawio
'';
meta = with stdenv.lib; {
diff --git a/pkgs/applications/graphics/drawpile/default.nix b/pkgs/applications/graphics/drawpile/default.nix
index eca3740f9758..46bfe64dd030 100644
--- a/pkgs/applications/graphics/drawpile/default.nix
+++ b/pkgs/applications/graphics/drawpile/default.nix
@@ -1,4 +1,5 @@
-{ stdenv
+{ lib
+, mkDerivation
, fetchurl
, cmake
, extra-cmake-modules
@@ -31,7 +32,7 @@
, enableKisTablet ? false # enable improved graphics tablet support
}:
-with stdenv.lib;
+with lib;
let
commonDeps = [
@@ -57,8 +58,8 @@ let
qtx11extras
];
-in stdenv.mkDerivation rec {
- name = "drawpile-${version}";
+in mkDerivation rec {
+ pname = "drawpile";
version = "2.1.11";
src = fetchurl {
diff --git a/pkgs/applications/graphics/exrtools/default.nix b/pkgs/applications/graphics/exrtools/default.nix
index 7980d09fed12..c8928540bb65 100644
--- a/pkgs/applications/graphics/exrtools/default.nix
+++ b/pkgs/applications/graphics/exrtools/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, pkgconfig, openexr, libpng12, libjpeg }:
stdenv.mkDerivation rec {
- name = "exrtools-${version}";
+ pname = "exrtools";
version = "0.4";
src = fetchurl {
- url = "http://scanline.ca/exrtools/${name}.tar.gz";
+ url = "http://scanline.ca/exrtools/${pname}-${version}.tar.gz";
sha256 = "0jpkskqs1yjiighab4s91jy0c0qxcscwadfn94xy2mm2bx2qwp4z";
};
diff --git a/pkgs/applications/graphics/feh/default.nix b/pkgs/applications/graphics/feh/default.nix
index 3eff3360a6c4..fef068eaf0ff 100644
--- a/pkgs/applications/graphics/feh/default.nix
+++ b/pkgs/applications/graphics/feh/default.nix
@@ -5,11 +5,11 @@
with stdenv.lib;
stdenv.mkDerivation rec {
- name = "feh-${version}";
+ pname = "feh";
version = "3.2.1";
src = fetchurl {
- url = "https://feh.finalrewind.org/${name}.tar.bz2";
+ url = "https://feh.finalrewind.org/${pname}-${version}.tar.bz2";
sha256 = "070axq8jpibcabmjfv4fmjmpk3k349vzvh4qhsi4n62bkcwl35wg";
};
@@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
description = "A light-weight image viewer";
homepage = "https://feh.finalrewind.org/";
license = licenses.mit;
- maintainers = [ maintainers.viric maintainers.willibutz ];
+ maintainers = with maintainers; [ viric willibutz globin ];
platforms = platforms.unix;
};
}
diff --git a/pkgs/applications/graphics/fig2dev/default.nix b/pkgs/applications/graphics/fig2dev/default.nix
index 1e54152fff4d..ae38730226a4 100644
--- a/pkgs/applications/graphics/fig2dev/default.nix
+++ b/pkgs/applications/graphics/fig2dev/default.nix
@@ -4,7 +4,8 @@ let
version = "3.2.7a";
in stdenv.mkDerivation {
- name = "fig2dev-${version}";
+ pname = "fig2dev";
+ inherit version;
src = fetchurl {
url = "mirror://sourceforge/mcj/fig2dev-${version}.tar.xz";
diff --git a/pkgs/applications/graphics/fondo/default.nix b/pkgs/applications/graphics/fondo/default.nix
index 920b529d61c3..e4dff59670a1 100644
--- a/pkgs/applications/graphics/fondo/default.nix
+++ b/pkgs/applications/graphics/fondo/default.nix
@@ -2,6 +2,7 @@
, fetchFromGitHub
, fetchpatch
, pantheon
+, vala
, pkgconfig
, meson
, ninja
@@ -31,7 +32,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [
meson
ninja
- pantheon.vala
+ vala
pkgconfig
python3
wrapGAppsHook
diff --git a/pkgs/applications/graphics/fontmatrix/default.nix b/pkgs/applications/graphics/fontmatrix/default.nix
index 8ca093b90c3e..3b8662976032 100644
--- a/pkgs/applications/graphics/fontmatrix/default.nix
+++ b/pkgs/applications/graphics/fontmatrix/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, cmake, qt4 }:
stdenv.mkDerivation rec {
- name = "fontmatrix-${version}";
+ pname = "fontmatrix";
version = "0.6.0";
src = fetchFromGitHub {
diff --git a/pkgs/applications/graphics/freecad/default.nix b/pkgs/applications/graphics/freecad/default.nix
index 8fc39ded6383..ee7586709dcb 100644
--- a/pkgs/applications/graphics/freecad/default.nix
+++ b/pkgs/applications/graphics/freecad/default.nix
@@ -1,31 +1,38 @@
-{ stdenv, fetchurl, cmake, ninja, coin3d, xercesc, ode, eigen, qt5, opencascade-occt, gts
-, hdf5, vtk, medfile, zlib, python3Packages, swig, gfortran, libXmu
-, soqt, libf2c, libGLU, makeWrapper, pkgconfig
-, mpi ? null }:
+{ stdenv, mkDerivation, fetchurl, fetchpatch, cmake, ninja, coin3d, xercesc, ode
+, eigen, qtbase, qttools, qtwebkit, opencascade-occt, gts, hdf5, vtk, medfile
+, zlib, python3Packages, swig, gfortran, libXmu, soqt, libf2c, libGLU
+, makeWrapper, pkgconfig, mpi ? null }:
assert mpi != null;
let
pythonPackages = python3Packages;
-in stdenv.mkDerivation rec {
- name = "freecad-${version}";
- version = "0.18.2";
+in mkDerivation rec {
+ pname = "freecad";
+ version = "0.18.3";
src = fetchurl {
url = "https://github.com/FreeCAD/FreeCAD/archive/${version}.tar.gz";
- sha256 = "1r5rhaiq22yhrfpmcmzx6bflqj6q9asbyjyfja4x4rzfy9yh0a4v";
+ sha256 = "07j7azgnicmd8cqnyskp15y44ykgj5qqz5y3w1jdynrv3yrvk1kz";
};
nativeBuildInputs = [ cmake ninja pkgconfig pythonPackages.pyside2-tools ];
buildInputs = [ cmake coin3d xercesc ode eigen opencascade-occt gts
zlib swig gfortran soqt libf2c makeWrapper mpi vtk hdf5 medfile
- libGLU libXmu
- ] ++ (with qt5; [
- qtbase qttools qtwebkit
- ]) ++ (with pythonPackages; [
+ libGLU libXmu qtbase qttools qtwebkit
+ ] ++ (with pythonPackages; [
matplotlib pycollada shiboken2 pyside2 pyside2-tools pivy python boost
]);
+ # Fix missing app icon on Wayland. Has been upstreamed and should be safe to
+ # remove in versions >= 0.19
+ patches = [
+ (fetchpatch {
+ url = "https://github.com/FreeCAD/FreeCAD/commit/c4d2a358ca125d51d059dfd72dcbfba326196dfc.patch";
+ sha256 = "0yqc9zrxgi2c2xcidm8wh7a9yznkphqvjqm9742qm5fl20p8gl4h";
+ })
+ ];
+
cmakeFlags = [
"-DBUILD_QT5=ON"
"-DSHIBOKEN_INCLUDE_DIR=${pythonPackages.shiboken2}/include"
@@ -46,12 +53,13 @@ in stdenv.mkDerivation rec {
# Their main() removes PYTHONPATH=, and we rely on it.
preConfigure = ''
sed '/putenv("PYTHONPATH/d' -i src/Main/MainGui.cpp
+
+ qtWrapperArgs+=(--prefix PYTHONPATH : "$PYTHONPATH")
'';
- postInstall = ''
- wrapProgram $out/bin/FreeCAD --prefix PYTHONPATH : $PYTHONPATH \
- --set COIN_GL_NO_CURRENT_CONTEXT_CHECK 1
- '';
+ qtWrapperArgs = [
+ "--set COIN_GL_NO_CURRENT_CONTEXT_CHECK 1"
+ ];
postFixup = ''
mv $out/share/doc $out
@@ -59,9 +67,9 @@ in stdenv.mkDerivation rec {
meta = with stdenv.lib; {
description = "General purpose Open Source 3D CAD/MCAD/CAx/CAE/PLM modeler";
- homepage = https://www.freecadweb.org/;
+ homepage = "https://www.freecadweb.org/";
license = licenses.lgpl2Plus;
- maintainers = [ maintainers.viric ];
+ maintainers = with maintainers; [ viric gebner ];
platforms = platforms.linux;
};
}
diff --git a/pkgs/applications/graphics/fstl/default.nix b/pkgs/applications/graphics/fstl/default.nix
index b1437508a509..1d712a63fbdf 100644
--- a/pkgs/applications/graphics/fstl/default.nix
+++ b/pkgs/applications/graphics/fstl/default.nix
@@ -1,6 +1,7 @@
-{stdenv, fetchFromGitHub, qtbase, mesa_glu}:
-stdenv.mkDerivation rec {
- name = "fstl-${version}";
+{ stdenv, fetchFromGitHub, mkDerivation, qtbase, mesa_glu }:
+
+mkDerivation rec {
+ pname = "fstl";
version = "0.9.3";
buildInputs = [qtbase mesa_glu];
diff --git a/pkgs/applications/graphics/gcolor2/default.nix b/pkgs/applications/graphics/gcolor2/default.nix
index 025b3ae65ece..2762748bc1ad 100644
--- a/pkgs/applications/graphics/gcolor2/default.nix
+++ b/pkgs/applications/graphics/gcolor2/default.nix
@@ -2,7 +2,8 @@
let version = "0.4"; in
stdenv.mkDerivation {
- name = "gcolor2-${version}";
+ pname = "gcolor2";
+ inherit version;
arch = if stdenv.hostPlatform.system == "x86_64-linux" then "amd64" else "386";
src = fetchurl {
@@ -25,7 +26,7 @@ stdenv.mkDerivation {
++ (with perlPackages; [ perl XMLParser ]);
meta = {
- description = "Simple GTK+2 color selector";
+ description = "Simple GTK 2 color selector";
homepage = http://gcolor2.sourceforge.net/;
license = stdenv.lib.licenses.gpl2Plus;
maintainers = with stdenv.lib.maintainers; [ notthemessiah ];
diff --git a/pkgs/applications/graphics/gcolor3/default.nix b/pkgs/applications/graphics/gcolor3/default.nix
index 5ad7cb88b03a..67be3ba6782c 100644
--- a/pkgs/applications/graphics/gcolor3/default.nix
+++ b/pkgs/applications/graphics/gcolor3/default.nix
@@ -1,9 +1,11 @@
-{ stdenv, fetchFromGitLab, meson, ninja, gettext, pkgconfig, libxml2, gtk3, hicolor-icon-theme, wrapGAppsHook }:
+{ stdenv, fetchFromGitLab, meson, ninja, gettext, pkgconfig, libxml2, gtk3, hicolor-icon-theme, wrapGAppsHook
+, fetchpatch }:
let
version = "2.3.1";
in stdenv.mkDerivation {
- name = "gcolor3-${version}";
+ pname = "gcolor3";
+ inherit version;
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
@@ -13,6 +15,14 @@ in stdenv.mkDerivation {
sha256 = "10cfzlkflwkb7f51rnrxmgxpfryh1qzvqaydj6lffjq9zvnhigg7";
};
+ patches = [
+ # Remove useage of deprecrated G_PARAM_PRIVATE
+ (fetchpatch {
+ url = "https://gitlab.gnome.org/World/gcolor3/commit/96612cdd6c2cc71e28eb97ee17956004a05e5140.patch";
+ sha256 = "134wv5x15bd7k0fjzifrddwssaq213sx2l38r3xw6x1j625qwzq9";
+ })
+ ];
+
nativeBuildInputs = [ meson ninja gettext pkgconfig libxml2 wrapGAppsHook ];
buildInputs = [ gtk3 hicolor-icon-theme ];
diff --git a/pkgs/applications/graphics/geeqie/default.nix b/pkgs/applications/graphics/geeqie/default.nix
index 08b2757dd6e8..4275c6f0dcfd 100644
--- a/pkgs/applications/graphics/geeqie/default.nix
+++ b/pkgs/applications/graphics/geeqie/default.nix
@@ -4,11 +4,11 @@
}:
stdenv.mkDerivation rec {
- name = "geeqie-${version}";
+ pname = "geeqie";
version = "1.4";
src = fetchurl {
- url = "http://geeqie.org/${name}.tar.xz";
+ url = "http://geeqie.org/${pname}-${version}.tar.xz";
sha256 = "0ciygvcxb78pqg59r6p061mkbpvkgv2rv3r79j3kgv3kalb3ln2w";
};
@@ -46,11 +46,11 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
meta = with stdenv.lib; {
- description = "Lightweight GTK+ based image viewer";
+ description = "Lightweight GTK based image viewer";
longDescription =
''
- Geeqie is a lightweight GTK+ based image viewer for Unix like
+ Geeqie is a lightweight GTK based image viewer for Unix like
operating systems. It features: EXIF, IPTC and XMP metadata
browsing and editing interoperability; easy integration with other
software; geeqie works on files and directories, there is no need to
diff --git a/pkgs/applications/graphics/gimp/plugins/default.nix b/pkgs/applications/graphics/gimp/plugins/default.nix
index 1787b1d9e7fc..2c520f21f848 100644
--- a/pkgs/applications/graphics/gimp/plugins/default.nix
+++ b/pkgs/applications/graphics/gimp/plugins/default.nix
@@ -152,22 +152,24 @@ stdenv.lib.makeScope pkgs.newScope (self: with self; {
installPhase = "installPlugins src/gimp-lqr-plugin";
};
- gmic = pkgs.gmic.gimpPlugin;
+ gmic = pkgs.gmic-qt.override {
+ variant = "gimp";
+ };
ufraw = pkgs.ufraw.gimpPlugin;
gimplensfun = pluginDerivation rec {
- version = "0.2.4";
+ version = "unstable-2018-10-21";
name = "gimplensfun-${version}";
src = fetchFromGitHub {
owner = "seebk";
repo = "GIMP-Lensfun";
- rev = version;
- sha256 = "0zlmp9v732qmzj083mnk5z421s57mnckmpjhiw890wmmwzj2lhxz";
+ rev = "1c5a5c1534b5faf098b7441f8840d22835592f17";
+ sha256 = "1jj3n7spkjc63aipwdqsvq9gi07w13bb1v8iqzvxwzld2kxa3c8w";
};
- buildInputs = with pkgs; [ lensfun exiv2 ];
+ buildInputs = with pkgs; [ lensfun gexiv2 ];
installPhase = "
installPlugins gimp-lensfun
diff --git a/pkgs/applications/graphics/gimp/wrapper.nix b/pkgs/applications/graphics/gimp/wrapper.nix
index 11c1e9ada931..d58dc375cb9b 100644
--- a/pkgs/applications/graphics/gimp/wrapper.nix
+++ b/pkgs/applications/graphics/gimp/wrapper.nix
@@ -1,7 +1,7 @@
{ stdenv, lib, symlinkJoin, gimp, makeWrapper, gimpPlugins, gnome3, plugins ? null}:
let
-allPlugins = lib.filter (pkg: builtins.isAttrs pkg && pkg.type == "derivation" && !pkg.meta.broken or false) (lib.attrValues gimpPlugins);
+allPlugins = lib.filter (pkg: lib.isDerivation pkg && !pkg.meta.broken or false) (lib.attrValues gimpPlugins);
selectedPlugins = if plugins == null then allPlugins else plugins;
extraArgs = map (x: x.wrapArgs or "") selectedPlugins;
versionBranch = stdenv.lib.versions.majorMinor gimp.version;
diff --git a/pkgs/applications/graphics/giv/build.patch b/pkgs/applications/graphics/giv/build.patch
deleted file mode 100644
index f57689fd3fa9..000000000000
--- a/pkgs/applications/graphics/giv/build.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Get the environment propagated to scons forked childs, and correct the dicom plugin about
-a typedef of size_t that failed at least on x86_64-linux.
-
-diff --git a/SConstruct b/SConstruct
-index 9e752d6..f93f27f 100644
---- a/SConstruct
-+++ b/SConstruct
-@@ -9,13 +9,7 @@ else:
-
- commit_id = os.popen('git rev-parse HEAD').read().replace('\n','')
-
--env = Environment(LIBPATH=[],
-- CPPFLAGS = cppflags + ['-Wno-deprecated-declarations',
-- '-Wno-reorder',
-- '-Wno-unused-but-set-variable',
-- '-Wno-unused-function'],
-- CXXFLAGS=['-std=c++1y']
-- )
-+env = Environment(ENV = os.environ)
-
- env['SBOX'] = False
- env['COMMITIDSHORT'] = commit_id[0:6]
diff --git a/pkgs/applications/graphics/giv/default.nix b/pkgs/applications/graphics/giv/default.nix
deleted file mode 100644
index ec708ad971a4..000000000000
--- a/pkgs/applications/graphics/giv/default.nix
+++ /dev/null
@@ -1,34 +0,0 @@
-{ stdenv, fetchFromGitHub, gdk-pixbuf, scons, pkgconfig, gtk2, glib
-, pcre, cfitsio, perl, gob2, vala, libtiff, json-glib }:
-
-stdenv.mkDerivation rec {
- name = "giv-${version}";
- version = "0.9.26";
-
- src = fetchFromGitHub {
- owner = "dov";
- repo = "giv";
- rev = "v${version}";
- sha256 = "1sfm8j3hvqij6z3h8xz724d7hjqqbzljl2a6pp4yjpnnrxksnic2";
- };
-
- hardeningDisable = [ "format" ];
-
- prePatch = ''
- sed -i s,/usr/bin/perl,${perl}/bin/perl, doc/eperl
- sed -i s,/usr/local,$out, SConstruct
- '';
-
- patches = [ ./build.patch ];
-
- nativeBuildInputs = [ scons pkgconfig vala perl gob2 ];
- buildInputs = [ gdk-pixbuf gtk2 glib pcre cfitsio libtiff json-glib ];
-
- meta = with stdenv.lib; {
- description = "Cross platform image and hierarchical vector viewer based";
- homepage = http://giv.sourceforge.net/giv/;
- license = licenses.gpl2Plus;
- maintainers = with maintainers; [ ];
- platforms = with platforms; linux;
- };
-}
diff --git a/pkgs/applications/graphics/glabels/default.nix b/pkgs/applications/graphics/glabels/default.nix
index 6bc59cd7d02b..3bfd51d0370d 100644
--- a/pkgs/applications/graphics/glabels/default.nix
+++ b/pkgs/applications/graphics/glabels/default.nix
@@ -1,6 +1,6 @@
{ stdenv, fetchurl, barcode, gnome3, autoreconfHook
, gtk3, gtk-doc, libxml2, librsvg , libtool, libe-book, gsettings-desktop-schemas
-, intltool, itstool, makeWrapper, pkgconfig, hicolor-icon-theme
+, intltool, itstool, makeWrapper, pkgconfig
}:
stdenv.mkDerivation rec {
@@ -17,7 +17,6 @@ stdenv.mkDerivation rec {
barcode gtk3 gtk-doc gnome3.yelp-tools
gnome3.gnome-common gsettings-desktop-schemas
itstool libxml2 librsvg libe-book libtool
- hicolor-icon-theme
];
preFixup = ''
diff --git a/pkgs/applications/graphics/gnome-photos/default.nix b/pkgs/applications/graphics/gnome-photos/default.nix
new file mode 100644
index 000000000000..0eb4f21e53ca
--- /dev/null
+++ b/pkgs/applications/graphics/gnome-photos/default.nix
@@ -0,0 +1,125 @@
+{ stdenv
+, fetchurl
+, at-spi2-core
+, babl
+, dbus
+, desktop-file-utils
+, dleyna-renderer
+, gdk-pixbuf
+, gegl
+, geocode-glib
+, gettext
+, gexiv2
+, gfbgraph
+, glib
+, gnome-online-accounts
+, gnome3
+, gobject-introspection
+, grilo
+, grilo-plugins
+, gsettings-desktop-schemas
+, gtk3
+, itstool
+, libdazzle
+, libgdata
+, libxml2
+, meson
+, ninja
+, nixosTests
+, pkgconfig
+, python3
+, tracker
+, tracker-miners
+, wrapGAppsHook
+}:
+
+stdenv.mkDerivation rec {
+ pname = "gnome-photos";
+ version = "3.34.0";
+
+ outputs = [ "out" "installedTests" ];
+
+ src = fetchurl {
+ url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+ sha256 = "12j455id5g616cn0nnj73v83aqgpavrsqszw1r5yhbpyc76lg03m";
+ };
+
+ patches = [
+ ./installed-tests-path.patch
+ ];
+
+ nativeBuildInputs = [
+ desktop-file-utils
+ gettext
+ gobject-introspection # for setup hook
+ glib # for setup hook
+ itstool
+ libxml2
+ meson
+ ninja
+ pkgconfig
+ (python3.withPackages (pkgs: with pkgs; [
+ dogtail
+ pygobject3
+ pyatspi
+ ]))
+ wrapGAppsHook
+ ];
+
+ buildInputs = [
+ babl
+ dbus
+ dleyna-renderer
+ gdk-pixbuf
+ gegl
+ geocode-glib
+ gexiv2
+ gfbgraph
+ glib
+ gnome-online-accounts
+ gnome3.adwaita-icon-theme
+ grilo
+ grilo-plugins
+ gsettings-desktop-schemas
+ gtk3
+ libdazzle
+ libgdata
+ tracker
+ tracker-miners # For 'org.freedesktop.Tracker.Miner.Files' GSettings schema
+
+ at-spi2-core # for tests
+ ];
+
+ mesonFlags = [
+ "-Dinstalled_tests=true"
+ "-Dinstalled_test_prefix=${placeholder "installedTests"}"
+ ];
+
+ postPatch = ''
+ chmod +x meson_post_install.py
+ patchShebangs meson_post_install.py
+ patchShebangs tests/basic.py
+ '';
+
+ postFixup = ''
+ wrapGApp "${placeholder "installedTests"}/libexec/installed-tests/gnome-photos/basic.py"
+ '';
+
+ passthru = {
+ updateScript = gnome3.updateScript {
+ packageName = pname;
+ };
+
+ tests = {
+ installed-tests = nixosTests.gnome-photos;
+ };
+ };
+
+ meta = with stdenv.lib; {
+ description = "Access, organize and share your photos";
+ homepage = https://wiki.gnome.org/Apps/Photos;
+ license = licenses.gpl3Plus;
+ maintainers = gnome3.maintainers;
+ platforms = platforms.linux;
+ };
+}
diff --git a/pkgs/applications/graphics/gnome-photos/installed-tests-path.patch b/pkgs/applications/graphics/gnome-photos/installed-tests-path.patch
new file mode 100644
index 000000000000..218108328dd8
--- /dev/null
+++ b/pkgs/applications/graphics/gnome-photos/installed-tests-path.patch
@@ -0,0 +1,23 @@
+diff --git a/meson.build b/meson.build
+index dee932dc..f8851913 100644
+--- a/meson.build
++++ b/meson.build
+@@ -16,8 +16,8 @@
+ photos_docdir = join_paths(photos_datadir, 'doc', meson.project_name())
+ photos_libdir = join_paths(photos_prefix, get_option('libdir'), meson.project_name())
+
+-photos_installed_test_metadir = join_paths(photos_datadir, 'installed-tests', meson.project_name())
+-photos_installed_test_execdir = join_paths(photos_libexecdir, 'installed-tests', meson.project_name())
++photos_installed_test_metadir = join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests', meson.project_name())
++photos_installed_test_execdir = join_paths(get_option('installed_test_prefix'), 'libexec', 'installed-tests', meson.project_name())
+
+ photos_namespace = 'org.gnome.Photos'
+
+diff --git a/meson_options.txt b/meson_options.txt
+index f34b5cc0..8e09970b 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -1,2 +1,3 @@
+ option('dogtail', type: 'boolean', value: true, description: 'test using dogtail')
+ option('installed_tests', type: 'boolean', value: false, description: 'Enable installation of some test cases')
++option('installed_test_prefix', type: 'string', value: '', description: 'Prefix for installed tests')
diff --git a/pkgs/applications/graphics/gnuclad/default.nix b/pkgs/applications/graphics/gnuclad/default.nix
index b3671ead377a..2535f7514f1d 100644
--- a/pkgs/applications/graphics/gnuclad/default.nix
+++ b/pkgs/applications/graphics/gnuclad/default.nix
@@ -2,14 +2,16 @@
}:
stdenv.mkDerivation rec {
- name = "gnuclad-${version}";
+ pname = "gnuclad";
version = "0.2.4";
src = fetchurl {
- url = "https://launchpad.net/gnuclad/trunk/${lib.versions.majorMinor version}/+download/${name}.tar.gz";
+ url = "https://launchpad.net/gnuclad/trunk/${lib.versions.majorMinor version}/+download/${pname}-${version}.tar.gz";
sha256 = "0ka2kscpjff7gflsargv3r9fdaxhkf3nym9mfaln3pnq6q7fwdki";
};
+ NIX_CFLAGS_COMPILE = [ "-Wno-error=catch-value" ];
+
nativeBuildInputs = [ pkgconfig ];
meta = with stdenv.lib; {
diff --git a/pkgs/applications/graphics/goxel/default.nix b/pkgs/applications/graphics/goxel/default.nix
index b25ba8f567df..e4ab5639ba66 100644
--- a/pkgs/applications/graphics/goxel/default.nix
+++ b/pkgs/applications/graphics/goxel/default.nix
@@ -2,7 +2,7 @@
, glfw3, gtk3, libpng12 }:
stdenv.mkDerivation rec {
- name = "goxel-${version}";
+ pname = "goxel";
version = "0.10.0";
src = fetchFromGitHub {
diff --git a/pkgs/applications/graphics/grafx2/default.nix b/pkgs/applications/graphics/grafx2/default.nix
index b1580d73b641..039bb1917d37 100644
--- a/pkgs/applications/graphics/grafx2/default.nix
+++ b/pkgs/applications/graphics/grafx2/default.nix
@@ -3,10 +3,10 @@
stdenv.mkDerivation rec {
version = "2.4.2035";
- name = "grafx2-${version}";
+ pname = "grafx2";
src = fetchurl {
- url = "https://grafx2.googlecode.com/files/${name}-src.tgz";
+ url = "https://grafx2.googlecode.com/files/${pname}-${version}-src.tgz";
sha256 = "0svsy6rqmdj11b400c242i2ixihyz0hds0dgicqz6g6dcgmcl62q";
};
diff --git a/pkgs/applications/graphics/graphicsmagick/compat.nix b/pkgs/applications/graphics/graphicsmagick/compat.nix
index fedcafc59788..9517aa78ee46 100644
--- a/pkgs/applications/graphics/graphicsmagick/compat.nix
+++ b/pkgs/applications/graphics/graphicsmagick/compat.nix
@@ -1,7 +1,7 @@
{ stdenv, graphicsmagick }:
-stdenv.mkDerivation rec {
- name = "graphicsmagick-imagemagick-compat-${version}";
+stdenv.mkDerivation {
+ pname = "graphicsmagick-imagemagick-compat";
inherit (graphicsmagick) version;
dontUnpack = true;
diff --git a/pkgs/applications/graphics/graphicsmagick/default.nix b/pkgs/applications/graphics/graphicsmagick/default.nix
index 84d1450da823..403a5285e150 100644
--- a/pkgs/applications/graphics/graphicsmagick/default.nix
+++ b/pkgs/applications/graphics/graphicsmagick/default.nix
@@ -3,7 +3,7 @@
, libwebp, quantumdepth ? 8, fixDarwinDylibNames }:
stdenv.mkDerivation rec {
- name = "graphicsmagick-${version}";
+ pname = "graphicsmagick";
version = "1.3.32";
src = fetchurl {
diff --git a/pkgs/applications/graphics/gscan2pdf/default.nix b/pkgs/applications/graphics/gscan2pdf/default.nix
index 7ecee8d6d631..b0e76d23dacb 100644
--- a/pkgs/applications/graphics/gscan2pdf/default.nix
+++ b/pkgs/applications/graphics/gscan2pdf/default.nix
@@ -1,17 +1,20 @@
{ stdenv, fetchurl, perlPackages, wrapGAppsHook,
+ # libs
librsvg, sane-backends, sane-frontends,
- imagemagick, libtiff, djvulibre, poppler_utils, ghostscript, unpaper,
- xvfb_run, hicolor-icon-theme, liberation_ttf, file, pdftk }:
+ # runtime dependencies
+ imagemagick, libtiff, djvulibre, poppler_utils, ghostscript, unpaper, pdftk,
+ # test dependencies
+ xvfb_run, liberation_ttf, file, tesseract }:
with stdenv.lib;
perlPackages.buildPerlPackage rec {
pname = "gscan2pdf";
- version = "2.3.0";
+ version = "2.5.6";
src = fetchurl {
url = "mirror://sourceforge/gscan2pdf/${version}/${pname}-${version}.tar.xz";
- sha256 = "0mcsmly0j9pmyzh6py8r6sfa30hc6gv300hqq3dxj4hv653vhkk9";
+ sha256 = "0wp81nsi5jfypabwmjqiamxr739jq5ij79n5fzn5pbw1hg5gcmfz";
};
nativeBuildInputs = [ wrapGAppsHook ];
@@ -66,7 +69,8 @@ perlPackages.buildPerlPackage rec {
--prefix PATH : "${djvulibre}/bin" \
--prefix PATH : "${poppler_utils}/bin" \
--prefix PATH : "${ghostscript}/bin" \
- --prefix PATH : "${unpaper}/bin"
+ --prefix PATH : "${unpaper}/bin" \
+ --prefix PATH : "${pdftk}/bin"
'';
enableParallelBuilding = true;
@@ -76,16 +80,17 @@ perlPackages.buildPerlPackage rec {
outputs = [ "out" "man" ];
checkInputs = [
- xvfb_run
- hicolor-icon-theme
imagemagick
libtiff
djvulibre
poppler_utils
ghostscript
- file
- pdftk
unpaper
+ pdftk
+
+ xvfb_run
+ file
+ tesseract # tests are expecting tesseract 3.x precisely
];
checkPhase = ''
@@ -97,7 +102,6 @@ perlPackages.buildPerlPackage rec {
description = "A GUI to produce PDFs or DjVus from scanned documents";
homepage = http://gscan2pdf.sourceforge.net/;
license = licenses.gpl3;
- maintainers = [ maintainers.pacien ];
+ maintainers = with maintainers; [ pacien ];
};
}
-
diff --git a/pkgs/applications/graphics/gthumb/default.nix b/pkgs/applications/graphics/gthumb/default.nix
index 6bcee18651b0..d7c0f0e0a0cf 100644
--- a/pkgs/applications/graphics/gthumb/default.nix
+++ b/pkgs/applications/graphics/gthumb/default.nix
@@ -33,11 +33,11 @@
stdenv.mkDerivation rec {
pname = "gthumb";
- version = "3.8.0";
+ version = "3.8.1";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
- sha256 = "1l2s1facq1r6yvqjqc34aqfzlvb3nhkhn79xisxbbdlgrrxdq52f";
+ sha256 = "184zn79w4s9y1zy42ar31p3jsg8rmkxy8k6iry51nz8aizbcs7jb";
};
nativeBuildInputs = [
@@ -103,6 +103,6 @@ stdenv.mkDerivation rec {
description = "Image browser and viewer for GNOME";
platforms = platforms.linux;
license = licenses.gpl2Plus;
- maintainers = [ maintainers.mimadrid ];
+ maintainers = [ maintainers.mimame ];
};
}
diff --git a/pkgs/applications/graphics/guetzli/default.nix b/pkgs/applications/graphics/guetzli/default.nix
index 061dc2b69a61..d7b964259683 100644
--- a/pkgs/applications/graphics/guetzli/default.nix
+++ b/pkgs/applications/graphics/guetzli/default.nix
@@ -3,7 +3,8 @@ let
version = "1.0.1";
in
stdenv.mkDerivation {
- name = "guetzli-${version}";
+ pname = "guetzli";
+ inherit version;
src = fetchFromGitHub {
owner = "google";
repo = "guetzli";
diff --git a/pkgs/applications/graphics/ideogram/default.nix b/pkgs/applications/graphics/ideogram/default.nix
new file mode 100644
index 000000000000..61b45ce16032
--- /dev/null
+++ b/pkgs/applications/graphics/ideogram/default.nix
@@ -0,0 +1,69 @@
+{ stdenv
+, fetchFromGitHub
+, fetchpatch
+, vala
+, pkgconfig
+, python3
+, glib
+, gtk3
+, meson
+, ninja
+, libgee
+, pantheon
+, desktop-file-utils
+, xorg
+, wrapGAppsHook
+}:
+
+stdenv.mkDerivation rec {
+ pname = "ideogram";
+ version = "1.2.2";
+
+ src = fetchFromGitHub {
+ owner = "cassidyjames";
+ repo = pname;
+ rev = version;
+ sha256 = "1qakgg3y4n2vcnykk2004ndvwmjbk2yy0p4j30mlb7p14dxscif6";
+ };
+
+ nativeBuildInputs = [
+ desktop-file-utils
+ meson
+ ninja
+ vala
+ pkgconfig
+ python3
+ wrapGAppsHook
+ ];
+
+ buildInputs = [
+ glib
+ gtk3
+ libgee
+ pantheon.granite
+ xorg.libX11
+ xorg.libXtst
+ ];
+
+ patches = [
+ # See: https://github.com/cassidyjames/ideogram/issues/26
+ (fetchpatch {
+ url = "https://github.com/cassidyjames/ideogram/commit/65994ee11bd21f8316b057cec01afbf50639a708.patch";
+ sha256 = "12vrvvggpqq53dmhbm7gbbbigncn19m1fjln9wxaady21m0w776c";
+ })
+ ];
+
+ postPatch = ''
+ chmod +x meson/post_install.py
+ patchShebangs meson/post_install.py
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Insert emoji anywhere, even in non-native apps - designed for elementary OS";
+ homepage = https://github.com/cassidyjames/ideogram;
+ license = licenses.gpl2Plus;
+ maintainers = pantheon.maintainers;
+ platforms = platforms.linux;
+ };
+
+}
diff --git a/pkgs/applications/graphics/imagej/default.nix b/pkgs/applications/graphics/imagej/default.nix
index 0bbd543a3076..6472712bcb40 100644
--- a/pkgs/applications/graphics/imagej/default.nix
+++ b/pkgs/applications/graphics/imagej/default.nix
@@ -7,8 +7,8 @@
# on linux systems, but we here do not attempt to fix it.)
let
- imagej150 = stdenv.mkDerivation rec {
- name = "imagej-${version}";
+ imagej150 = stdenv.mkDerivation {
+ pname = "imagej";
version = "150";
src = fetchurl {
diff --git a/pkgs/applications/graphics/imlibsetroot/default.nix b/pkgs/applications/graphics/imlibsetroot/default.nix
index a881c0fc1f93..49868bbd831f 100644
--- a/pkgs/applications/graphics/imlibsetroot/default.nix
+++ b/pkgs/applications/graphics/imlibsetroot/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchurl, libX11, libXinerama, imlib2 }:
-stdenv.mkDerivation rec {
- name = "imlibsetroot-${version}";
+stdenv.mkDerivation {
+ pname = "imlibsetroot";
version = "1.2";
src = fetchurl {
url = "https://robotmonkeys.net/wp-content/uploads/2010/03/imlibsetroot-12.tar.gz";
diff --git a/pkgs/applications/graphics/imv/default.nix b/pkgs/applications/graphics/imv/default.nix
index 89712d4d1f7a..5f06feb7c622 100644
--- a/pkgs/applications/graphics/imv/default.nix
+++ b/pkgs/applications/graphics/imv/default.nix
@@ -1,27 +1,53 @@
-{ stdenv, fetchFromGitHub, SDL2, SDL2_ttf
+{ stdenv, fetchFromGitHub
, freeimage, fontconfig, pkgconfig
, asciidoc, docbook_xsl, libxslt, cmocka
-, librsvg
+, librsvg, pango, libxkbcommon, wayland
+, libGLU
}:
stdenv.mkDerivation rec {
- name = "imv-${version}";
- version = "3.1.2";
+ pname = "imv";
+ version = "4.0.1";
src = fetchFromGitHub {
owner = "eXeC64";
repo = "imv";
rev = "v${version}";
- sha256 = "0gg362x2f7hli6cr6s7dmlanh4cqk7fd2pmk4zs9438jvqklf4cl";
+ sha256 = "sha256:01fbkbwwsyr00k3mwans8jfb9p4gl02v6z62vgx0pkgrzxjkcz07";
};
+ preBuild = ''
+ # Version is 4.0.1, but Makefile was not updated
+ sed -i 's/echo v4\.0\.0/echo v4.0.1/' Makefile
+ '';
+
+ nativeBuildInputs = [
+ asciidoc
+ cmocka
+ docbook_xsl
+ libxslt
+ ];
+
buildInputs = [
- SDL2 SDL2_ttf freeimage fontconfig pkgconfig
- asciidoc docbook_xsl libxslt cmocka librsvg
+ freeimage
+ libGLU
+ librsvg
+ libxkbcommon
+ pango
+ pkgconfig
+ wayland
];
installFlags = [ "PREFIX=$(out)" "CONFIGPREFIX=$(out)/etc" ];
+ postFixup = ''
+ # The `bin/imv` script assumes imv-wayland or imv-x11 in PATH,
+ # so we have to fix those to the binaries we installed into the /nix/store
+
+ sed -i "s|\bimv-wayland\b|$out/bin/imv-wayland|" $out/bin/imv
+ sed -i "s|\bimv-x11\b|$out/bin/imv-x11|" $out/bin/imv
+ '';
+
doCheck = true;
meta = with stdenv.lib; {
diff --git a/pkgs/applications/graphics/inkscape/default.nix b/pkgs/applications/graphics/inkscape/default.nix
index 1729f3c5cdab..ed1f61b98d3a 100644
--- a/pkgs/applications/graphics/inkscape/default.nix
+++ b/pkgs/applications/graphics/inkscape/default.nix
@@ -2,7 +2,8 @@
, libpng, zlib, popt, boehmgc, libxml2, libxslt, glib, gtkmm2
, glibmm, libsigcxx, lcms, boost, gettext, makeWrapper
, gsl, python2, poppler, imagemagick, libwpg, librevenge
-, libvisio, libcdr, libexif, potrace, cmake, hicolor-icon-theme
+, libvisio, libcdr, libexif, potrace, cmake
+, librsvg, wrapGAppsHook
}:
let
@@ -40,13 +41,15 @@ stdenv.mkDerivation rec {
--replace '"python-interpreter", "python"' '"python-interpreter", "${python2Env}/bin/python"'
'';
- nativeBuildInputs = [ pkgconfig cmake makeWrapper python2Env ]
+ nativeBuildInputs = [ pkgconfig cmake makeWrapper python2Env wrapGAppsHook ]
++ (with perlPackages; [ perl XMLParser ]);
buildInputs = [
libXft libpng zlib popt boehmgc
libxml2 libxslt glib gtkmm2 glibmm libsigcxx lcms boost gettext
gsl poppler imagemagick libwpg librevenge
- libvisio libcdr libexif potrace hicolor-icon-theme
+ libvisio libcdr libexif potrace
+
+ librsvg # for loading icons
python2Env perlPackages.perl
];
diff --git a/pkgs/applications/graphics/ipe/default.nix b/pkgs/applications/graphics/ipe/default.nix
index d4a7e396cb05..0cb09ecb6430 100644
--- a/pkgs/applications/graphics/ipe/default.nix
+++ b/pkgs/applications/graphics/ipe/default.nix
@@ -3,16 +3,16 @@
}:
stdenv.mkDerivation rec {
- name = "ipe-7.2.12";
+ name = "ipe-7.2.13";
src = fetchurl {
url = "https://dl.bintray.com/otfried/generic/ipe/7.2/${name}-src.tar.gz";
- sha256 = "1qw1cmwzi3wxk4x916i9y4prhi9brnwl14i9a1cbw23x1sr7i6kw";
+ sha256 = "1a6a88r7j5z01z6k1z72a8g3n6lxdjjxxkdrzrfdd6df2gbs6g5g";
};
sourceRoot = "${name}/src";
- IPEPREFIX="${placeholder "out"}";
+ IPEPREFIX=placeholder "out";
URWFONTDIR="${texlive}/texmf-dist/fonts/type1/urw/";
LUA_PACKAGE = "lua";
diff --git a/pkgs/applications/graphics/jbrout/default.nix b/pkgs/applications/graphics/jbrout/default.nix
index 42ed667dee98..4eb7518cc102 100644
--- a/pkgs/applications/graphics/jbrout/default.nix
+++ b/pkgs/applications/graphics/jbrout/default.nix
@@ -3,7 +3,7 @@
let
inherit (pythonPackages) python;
in pythonPackages.buildPythonApplication rec {
- name = "jbrout-${version}";
+ pname = "jbrout";
version = "338";
src = fetchsvn {
diff --git a/pkgs/applications/graphics/jpeg-archive/default.nix b/pkgs/applications/graphics/jpeg-archive/default.nix
index ed583490c90d..97c15d2eec09 100644
--- a/pkgs/applications/graphics/jpeg-archive/default.nix
+++ b/pkgs/applications/graphics/jpeg-archive/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, mozjpeg, makeWrapper, coreutils, parallel, findutils }:
-stdenv.mkDerivation rec {
- name = "jpeg-archive-${version}";
+stdenv.mkDerivation {
+ pname = "jpeg-archive";
version = "2.2.0"; # can be found here https://github.com/danielgtaylor/jpeg-archive/blob/master/src/util.c#L15
# update with
diff --git a/pkgs/applications/graphics/jpeginfo/default.nix b/pkgs/applications/graphics/jpeginfo/default.nix
index f438bf6f7ed8..e15aedd77e1c 100644
--- a/pkgs/applications/graphics/jpeginfo/default.nix
+++ b/pkgs/applications/graphics/jpeginfo/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, libjpeg }:
stdenv.mkDerivation rec {
- name = "jpeginfo-${version}";
+ pname = "jpeginfo";
version = "1.6.1";
src = fetchurl {
- url = "https://www.kokkonen.net/tjko/src/${name}.tar.gz";
+ url = "https://www.kokkonen.net/tjko/src/${pname}-${version}.tar.gz";
sha256 = "0lvn3pnylyj56158d3ix9w1gas1s29klribw9bz1xym03p7k37k2";
};
diff --git a/pkgs/applications/graphics/jpegoptim/default.nix b/pkgs/applications/graphics/jpegoptim/default.nix
index b24b14698e6a..cc1ca3a0ff2a 100644
--- a/pkgs/applications/graphics/jpegoptim/default.nix
+++ b/pkgs/applications/graphics/jpegoptim/default.nix
@@ -2,10 +2,10 @@
stdenv.mkDerivation rec {
version = "1.4.6";
- name = "jpegoptim-${version}";
+ pname = "jpegoptim";
src = fetchurl {
- url = "https://www.kokkonen.net/tjko/src/${name}.tar.gz";
+ url = "https://www.kokkonen.net/tjko/src/${pname}-${version}.tar.gz";
sha256 = "1dss7907fclfl8zsw0bl4qcw0hhz6fqgi3867w0jyfm3q9jfpcc8";
};
diff --git a/pkgs/applications/graphics/k3d/default.nix b/pkgs/applications/graphics/k3d/default.nix
index 301dc902dce9..1487fb8adbac 100644
--- a/pkgs/applications/graphics/k3d/default.nix
+++ b/pkgs/applications/graphics/k3d/default.nix
@@ -5,11 +5,11 @@
stdenv.mkDerivation rec {
version = "0.8.0.6";
- name = "k3d-${version}";
+ pname = "k3d";
src = fetchFromGitHub {
owner = "K-3D";
repo = "k3d";
- rev = name;
+ rev = "${pname}-${version}";
sha256 = "0vdjjg6h8mxm2n8mvkkg2mvd27jn2xx90hnmx23cbd35mpz9p4aa";
};
diff --git a/pkgs/applications/graphics/kcc/default.nix b/pkgs/applications/graphics/kcc/default.nix
new file mode 100644
index 000000000000..da3589189725
--- /dev/null
+++ b/pkgs/applications/graphics/kcc/default.nix
@@ -0,0 +1,38 @@
+{ lib
+, mkDerivationWith
+, python3Packages
+, p7zip
+, archiveSupport ? true
+}:
+
+mkDerivationWith python3Packages.buildPythonApplication rec {
+ pname = "kcc";
+ version = "5.5.1";
+
+ src = python3Packages.fetchPypi {
+ inherit version;
+ pname = "KindleComicConverter";
+ sha256 = "5dbee5dc5ee06a07316ae5ebaf21ffa1970094dbae5985ad735e2807ef112644";
+ };
+
+ propagatedBuildInputs = with python3Packages ; [
+ pillow
+ pyqt5
+ psutil
+ python-slugify
+ raven
+ ];
+
+ qtWrapperArgs = lib.optional archiveSupport [ "--prefix" "PATH" ":" "${ lib.makeBinPath [ p7zip ] }" ];
+
+ postFixup = ''
+ wrapProgram $out/bin/kcc "''${qtWrapperArgs[@]}"
+ '';
+
+ meta = with lib; {
+ description = "Python app to convert comic/manga files or folders to EPUB, Panel View MOBI or E-Ink optimized CBZ";
+ homepage = "https://kcc.iosphe.re";
+ license = licenses.isc;
+ maintainers = with maintainers; [ dawidsowa ];
+ };
+}
diff --git a/pkgs/applications/graphics/kgraphviewer/default.nix b/pkgs/applications/graphics/kgraphviewer/default.nix
index e70fafa24b60..9b96b30c62b1 100644
--- a/pkgs/applications/graphics/kgraphviewer/default.nix
+++ b/pkgs/applications/graphics/kgraphviewer/default.nix
@@ -5,11 +5,11 @@
}:
mkDerivation rec {
- name = "kgraphviewer-${version}";
+ pname = "kgraphviewer";
version = "2.4.3";
src = fetchurl {
- url = "mirror://kde/stable/kgraphviewer/${version}/${name}.tar.xz";
+ url = "mirror://kde/stable/kgraphviewer/${version}/${pname}-${version}.tar.xz";
sha256 = "1h6pgg89gvxl8gw7wmkabyqqrzad5pxyv5lsmn1fl4ir8lcc5q2l";
};
diff --git a/pkgs/applications/graphics/kipi-plugins/default.nix b/pkgs/applications/graphics/kipi-plugins/default.nix
deleted file mode 100644
index de51422d1da6..000000000000
--- a/pkgs/applications/graphics/kipi-plugins/default.nix
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- stdenv, fetchurl,
- extra-cmake-modules,
- karchive, kconfig, ki18n, kiconthemes, kio, kservice, kwindowsystem, kxmlgui,
- libkipi, qtbase, qtsvg, qtxmlpatterns
-}:
-
-stdenv.mkDerivation rec {
- pname = "kipi-plugins";
- version = "5.9.1";
-
- src = fetchurl {
- url = "http://download.kde.org/stable/${pname}/${pname}-${version}.tar.xz";
- sha256 = "0hjm05nkz0w926sn4lav5258rda6zkd6gfnqd8hh3fa2q0dd7cq4";
- };
-
- nativeBuildInputs = [ extra-cmake-modules ];
- buildInputs = [
- karchive kconfig ki18n kiconthemes kio kservice kwindowsystem kxmlgui libkipi
- qtbase qtsvg qtxmlpatterns
- ];
-
- meta = {
- description = "Plugins for KDE-based image applications";
- license = stdenv.lib.licenses.gpl2;
- homepage = https://www.digikam.org;
- maintainers = with stdenv.lib.maintainers; [ ttuegel ];
- platforms = stdenv.lib.platforms.linux;
- };
-}
diff --git a/pkgs/applications/graphics/kodelife/default.nix b/pkgs/applications/graphics/kodelife/default.nix
new file mode 100644
index 000000000000..961b0175da9f
--- /dev/null
+++ b/pkgs/applications/graphics/kodelife/default.nix
@@ -0,0 +1,53 @@
+{ stdenv
+, fetchzip
+, alsaLib
+, glib
+, gst_all_1
+, libGLU_combined
+, xorg
+}:
+
+stdenv.mkDerivation rec {
+ pname = "kodelife";
+ version = "0.8.6.101";
+
+ src = fetchzip {
+ url = "https://hexler.net/pub/${pname}/${pname}-${version}-linux-x86_64.zip";
+ sha256 = "1ldab1famdcby2djfys657g85d46s8k96m6mr71riw4v336ar238";
+ };
+
+ dontConfigure = true;
+ dontBuild = true;
+ dontStrip = true;
+ dontPatchELF = true;
+
+ installPhase = ''
+ mkdir -p $out/bin
+ mv KodeLife $out/bin
+ '';
+
+ preFixup = let
+ libPath = stdenv.lib.makeLibraryPath [
+ stdenv.cc.cc.lib
+ alsaLib
+ glib
+ gst_all_1.gstreamer
+ gst_all_1.gst-plugins-base
+ libGLU_combined
+ xorg.libX11
+ ];
+ in ''
+ patchelf \
+ --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
+ --set-rpath "${libPath}" \
+ $out/bin/KodeLife
+ '';
+
+ meta = with stdenv.lib; {
+ homepage = "https://hexler.net/products/kodelife";
+ description = "Real-time GPU shader editor";
+ license = licenses.unfree;
+ maintainers = with maintainers; [ prusnak ];
+ platforms = [ "x86_64-linux" ];
+ };
+}
diff --git a/pkgs/applications/graphics/krita/default.nix b/pkgs/applications/graphics/krita/default.nix
index cc46ac2d3bb4..52397ac33c4f 100644
--- a/pkgs/applications/graphics/krita/default.nix
+++ b/pkgs/applications/graphics/krita/default.nix
@@ -10,11 +10,11 @@
mkDerivation rec {
pname = "krita";
- version = "4.2.2";
+ version = "4.2.7.1";
src = fetchurl {
- url = "https://download.kde.org/stable/${pname}/${version}/${pname}-${version}.tar.gz";
- sha256 = "1pzk5bqp3kh22djhvsvmsc7ybirs4hsnkpg1y9677m2gxwbqnnps";
+ url = "https://download.kde.org/stable/${pname}/${version}/${pname}-${version}.tar.xz";
+ sha256 = "1sx4j4brk71bas3cpqzk4bd8bknyl3x4fdg5pv4r7pcfd3vpq2vy";
};
nativeBuildInputs = [ cmake extra-cmake-modules python3Packages.sip makeWrapper ];
diff --git a/pkgs/applications/graphics/leocad/default.nix b/pkgs/applications/graphics/leocad/default.nix
index 4f86e5736899..201a4fe113e3 100644
--- a/pkgs/applications/graphics/leocad/default.nix
+++ b/pkgs/applications/graphics/leocad/default.nix
@@ -6,7 +6,7 @@ set the variable LEOCAD_LIB=/path/to/libs/ or use option -l /path/to/libs/
{ stdenv, fetchFromGitHub, qt4, qmake4Hook, zlib }:
stdenv.mkDerivation rec {
- name = "leocad-${version}";
+ pname = "leocad";
version = "19.07.1";
src = fetchFromGitHub {
diff --git a/pkgs/applications/graphics/mcomix/default.nix b/pkgs/applications/graphics/mcomix/default.nix
index eea0e501cb8e..7130d21b8ef4 100644
--- a/pkgs/applications/graphics/mcomix/default.nix
+++ b/pkgs/applications/graphics/mcomix/default.nix
@@ -9,7 +9,7 @@ python27Packages.buildPythonApplication rec {
sha256 = "0fzsf9pklhfs1rzwzj64c0v30b74nk94p93h371rpg45qnfiahvy";
};
- propagatedBuildInputs = with python27Packages; [ pygtk pillow ];
+ propagatedBuildInputs = with python27Packages; [ pygtk pillow setuptools ];
doCheck = false;
@@ -19,7 +19,7 @@ python27Packages.buildPythonApplication rec {
MComix is an user-friendly, customizable image viewer. It is specifically
designed to handle comic books, but also serves as a generic viewer.
It reads images in ZIP, RAR, 7Zip or tar archives as well as plain image
- files. It is written in Python and uses GTK+ through the PyGTK bindings,
+ files. It is written in Python and uses GTK through the PyGTK bindings,
and runs on both Linux and Windows.
MComix is a fork of the Comix project, and aims to add bug fixes and
diff --git a/pkgs/applications/graphics/meh/default.nix b/pkgs/applications/graphics/meh/default.nix
index c25c1277ee0b..7ad8c388a203 100644
--- a/pkgs/applications/graphics/meh/default.nix
+++ b/pkgs/applications/graphics/meh/default.nix
@@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, libX11, libXext, libjpeg, libpng, giflib }:
-stdenv.mkDerivation rec {
+stdenv.mkDerivation {
name = "meh-unstable-2015-04-11";
src = fetchFromGitHub {
diff --git a/pkgs/applications/graphics/meme/default.nix b/pkgs/applications/graphics/meme/default.nix
index 2fddc39e0d07..5f8a0bb6eed3 100644
--- a/pkgs/applications/graphics/meme/default.nix
+++ b/pkgs/applications/graphics/meme/default.nix
@@ -1,7 +1,7 @@
{ stdenv, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
- name = "meme-unstable-${version}";
+ pname = "meme-unstable";
version = "2017-09-10";
owner = "nomad-software";
diff --git a/pkgs/applications/graphics/mirage/default.nix b/pkgs/applications/graphics/mirage/default.nix
index 515b834b41ea..fbe8f10c72f7 100644
--- a/pkgs/applications/graphics/mirage/default.nix
+++ b/pkgs/applications/graphics/mirage/default.nix
@@ -1,16 +1,18 @@
{ stdenv, fetchurl, pythonPackages, libX11, gettext }:
pythonPackages.buildPythonApplication rec {
- name = "mirage-${version}";
+ pname = "mirage";
version = "0.9.5.2";
src = fetchurl {
- url = "mirror://sourceforge/mirageiv/${name}.tar.bz2";
+ url = "mirror://sourceforge/mirageiv/${pname}-${version}.tar.bz2";
sha256 = "d214a1b6d99d1d1e83da5848a2cef181f6781e0990e93f7ebff5880b0c43f43c";
};
doCheck = false;
+ nativeBuildInputs = [ gettext ];
+
buildInputs = [ stdenv libX11 gettext ];
patchPhase = ''
diff --git a/pkgs/applications/graphics/mozjpeg/default.nix b/pkgs/applications/graphics/mozjpeg/default.nix
index b48fd891a6ac..63cc4a3a8d35 100644
--- a/pkgs/applications/graphics/mozjpeg/default.nix
+++ b/pkgs/applications/graphics/mozjpeg/default.nix
@@ -2,7 +2,7 @@
stdenv.mkDerivation rec {
version = "3.3.1";
- name = "mozjpeg-${version}";
+ pname = "mozjpeg";
src = fetchFromGitHub {
owner = "mozilla";
diff --git a/pkgs/applications/graphics/mtpaint/default.nix b/pkgs/applications/graphics/mtpaint/default.nix
index 8a2a218d9891..7274bdacd9d0 100644
--- a/pkgs/applications/graphics/mtpaint/default.nix
+++ b/pkgs/applications/graphics/mtpaint/default.nix
@@ -22,9 +22,9 @@ stdenv.mkDerivation rec {
];
meta = {
- description = "A simple GTK+1/2 painting program";
+ description = "A simple GTK painting program";
longDescription = ''
- mtPaint is a simple GTK+1/2 painting program designed for
+ mtPaint is a simple GTK painting program designed for
creating icons and pixel based artwork. It can edit indexed palette
or 24 bit RGB images and offers basic painting and palette manipulation
tools. It also has several other more powerful features such as channels,
diff --git a/pkgs/applications/graphics/mypaint/default.nix b/pkgs/applications/graphics/mypaint/default.nix
index 466ab3e26fb8..c08bbbea7668 100644
--- a/pkgs/applications/graphics/mypaint/default.nix
+++ b/pkgs/applications/graphics/mypaint/default.nix
@@ -1,10 +1,10 @@
-{ stdenv, fetchFromGitHub, gtk3, intltool, json_c, lcms2, libpng, librsvg, gobject-introspection, hicolor-icon-theme
+{ stdenv, fetchFromGitHub, gtk3, intltool, json_c, lcms2, libpng, librsvg, gobject-introspection
, gdk-pixbuf, pkgconfig, python2Packages, scons, swig, wrapGAppsHook }:
let
inherit (python2Packages) python pycairo pygobject3 numpy;
-in stdenv.mkDerivation rec {
- name = "mypaint-${version}";
+in stdenv.mkDerivation {
+ pname = "mypaint";
version = "1.2.1";
src = fetchFromGitHub {
@@ -21,7 +21,7 @@ in stdenv.mkDerivation rec {
];
buildInputs = [
- gtk3 gdk-pixbuf json_c lcms2 libpng librsvg pycairo pygobject3 python hicolor-icon-theme
+ gtk3 gdk-pixbuf json_c lcms2 libpng librsvg pycairo pygobject3 python
];
propagatedBuildInputs = [ numpy ];
diff --git a/pkgs/applications/graphics/nomacs/default.nix b/pkgs/applications/graphics/nomacs/default.nix
index d0838070262a..62fae518b929 100644
--- a/pkgs/applications/graphics/nomacs/default.nix
+++ b/pkgs/applications/graphics/nomacs/default.nix
@@ -1,9 +1,8 @@
{ stdenv
+, mkDerivation
, fetchFromGitHub
, cmake
, pkgconfig
-, wrapGAppsHook
-, gsettings-desktop-schemas
, qtbase
, qttools
@@ -16,8 +15,8 @@
, quazip
}:
-stdenv.mkDerivation rec {
- name = "nomacs-${version}";
+mkDerivation rec {
+ pname = "nomacs";
version = "3.12";
src = fetchFromGitHub {
@@ -38,8 +37,7 @@ stdenv.mkDerivation rec {
'';
nativeBuildInputs = [cmake
- pkgconfig
- wrapGAppsHook];
+ pkgconfig];
buildInputs = [qtbase
qttools
@@ -48,13 +46,13 @@ stdenv.mkDerivation rec {
opencv
libraw
libtiff
- quazip
- gsettings-desktop-schemas];
+ quazip];
cmakeFlags = ["-DENABLE_OPENCV=ON"
"-DENABLE_RAW=ON"
"-DENABLE_TIFF=ON"
"-DENABLE_QUAZIP=ON"
+ "-DENABLE_TRANSLATIONS=ON"
"-DUSE_SYSTEM_QUAZIP=ON"];
meta = with stdenv.lib; {
diff --git a/pkgs/applications/graphics/openimageio/2.x.nix b/pkgs/applications/graphics/openimageio/2.x.nix
index 837446190fb2..69cc323b40f4 100644
--- a/pkgs/applications/graphics/openimageio/2.x.nix
+++ b/pkgs/applications/graphics/openimageio/2.x.nix
@@ -14,13 +14,13 @@
stdenv.mkDerivation rec {
pname = "openimageio";
- version = "2.0.9";
+ version = "2.0.11";
src = fetchFromGitHub {
owner = "OpenImageIO";
repo = "oiio";
rev = "Release-${version}";
- sha256 = "17diyfk586hll54cl476kbhbcm3nihw6cb4bgjkjxxzxbd3wx839";
+ sha256 = "1kasp9as81wjvys9qrx10mgdf9bjbdgryhdgjqn05zdmv2rs95nc";
};
outputs = [ "bin" "out" "dev" "doc" ];
@@ -45,8 +45,6 @@ stdenv.mkDerivation rec {
"-DUSE_PYTHON=OFF"
"-DUSE_QT=OFF"
# GNUInstallDirs
- "-DCMAKE_INSTALL_BINDIR=${placeholder "bin"}/bin"
- "-DCMAKE_INSTALL_INCLUDEDIR=${placeholder "dev"}/include"
"-DCMAKE_INSTALL_LIBDIR=lib" # needs relative path for pkgconfig
];
diff --git a/pkgs/applications/graphics/openimageio/default.nix b/pkgs/applications/graphics/openimageio/default.nix
index 00b33b652164..7225efadebd9 100644
--- a/pkgs/applications/graphics/openimageio/default.nix
+++ b/pkgs/applications/graphics/openimageio/default.nix
@@ -23,8 +23,6 @@ stdenv.mkDerivation rec {
cmakeFlags = [
"-DUSE_PYTHON=OFF"
- # GNUInstallDirs
- "-DCMAKE_INSTALL_BINDIR=${placeholder "bin"}/bin"
];
makeFlags = [
diff --git a/pkgs/applications/graphics/paraview/default.nix b/pkgs/applications/graphics/paraview/default.nix
index cf13c6fb05e9..13a00991265f 100644
--- a/pkgs/applications/graphics/paraview/default.nix
+++ b/pkgs/applications/graphics/paraview/default.nix
@@ -5,7 +5,7 @@ stdenv, fetchFromGitHub, cmake, makeWrapper
}:
stdenv.mkDerivation rec {
- name = "paraview-${version}";
+ pname = "paraview";
version = "5.6.0";
# fetching from GitHub instead of taking an "official" source
diff --git a/pkgs/applications/graphics/pbrt/default.nix b/pkgs/applications/graphics/pbrt/default.nix
index 3cc7166b4e46..78f6d8bcbaff 100644
--- a/pkgs/applications/graphics/pbrt/default.nix
+++ b/pkgs/applications/graphics/pbrt/default.nix
@@ -1,9 +1,9 @@
{stdenv, fetchFromGitHub, flex, bison, cmake, git, zlib}:
-stdenv.mkDerivation rec {
+stdenv.mkDerivation {
version = "2018-08-15";
- name = "pbrt-v3-${version}";
+ pname = "pbrt-v3";
src = fetchFromGitHub {
rev = "86b5821308088deea70b207bc8c22219d0103d65";
diff --git a/pkgs/applications/graphics/pdfcpu/default.nix b/pkgs/applications/graphics/pdfcpu/default.nix
index 56c823993f76..3d6d04db5539 100644
--- a/pkgs/applications/graphics/pdfcpu/default.nix
+++ b/pkgs/applications/graphics/pdfcpu/default.nix
@@ -2,16 +2,16 @@
buildGoModule rec {
pname = "pdfcpu";
- version = "0.2.1";
+ version = "0.2.5";
src = fetchFromGitHub {
- owner = "hhrutter";
+ owner = "pdfcpu";
repo = pname;
rev = "v${version}";
- sha256 = "0cg17nph3qv1ca86j3wcd33vqs6clkzi6y2nrajmk7dq5vbzr6nn";
+ sha256 = "0fgdq8byb9pp9wiq3dm0vxw32kbspczqnk41agxpzjf303zmv75y";
};
- modSha256 = "0cz4gs88s9z2yv1gc9ap92vv2j93ab6kr25zjgl2r7z6clbl5fzp";
+ modSha256 = "1nagb3k2ghfw27g4vcmn7v8s5flg387jpf1l18gw6c44a1xjcivs";
subPackages = [ "cmd/pdfcpu" ];
diff --git a/pkgs/applications/graphics/pencil/default.nix b/pkgs/applications/graphics/pencil/default.nix
index f622d3f388e2..37857fc459ea 100644
--- a/pkgs/applications/graphics/pencil/default.nix
+++ b/pkgs/applications/graphics/pencil/default.nix
@@ -7,7 +7,7 @@
stdenv.mkDerivation rec {
version = "3.0.4";
- name = "pencil-${version}";
+ pname = "pencil";
src = fetchurl {
url = "http://pencil.evolus.vn/dl/V${version}/Pencil_${version}_amd64.deb";
diff --git a/pkgs/applications/graphics/photivo/default.nix b/pkgs/applications/graphics/photivo/default.nix
index 6bd2fa98b1bb..09b5bd378397 100644
--- a/pkgs/applications/graphics/photivo/default.nix
+++ b/pkgs/applications/graphics/photivo/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchhg, fetchpatch, cmake, qt4, fftw, graphicsmagick_q16,
lcms2, lensfun, pkgconfig, libjpeg, exiv2, liblqr1 }:
-stdenv.mkDerivation rec {
+stdenv.mkDerivation {
name = "photivo-2014-01-25";
src = fetchhg {
diff --git a/pkgs/applications/graphics/photoflow/default.nix b/pkgs/applications/graphics/photoflow/default.nix
index db41ee0566fe..78d16e692261 100644
--- a/pkgs/applications/graphics/photoflow/default.nix
+++ b/pkgs/applications/graphics/photoflow/default.nix
@@ -51,6 +51,6 @@ stdenv.mkDerivation {
license = licenses.gpl3Plus;
maintainers = [ maintainers.MtP ];
platforms = platforms.linux;
- broken = stdenv.isAarch64;
+ broken = true;
};
}
diff --git a/pkgs/applications/graphics/phototonic/default.nix b/pkgs/applications/graphics/phototonic/default.nix
index 7da1d4b612f9..5e7fb5cf7a0a 100644
--- a/pkgs/applications/graphics/phototonic/default.nix
+++ b/pkgs/applications/graphics/phototonic/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, qtbase, qmake, exiv2 }:
stdenv.mkDerivation rec {
- name = "phototonic-${version}";
+ pname = "phototonic";
version = "2.1";
src = fetchFromGitHub {
diff --git a/pkgs/applications/graphics/potrace/default.nix b/pkgs/applications/graphics/potrace/default.nix
index 132136da658b..35ab27bcbf63 100644
--- a/pkgs/applications/graphics/potrace/default.nix
+++ b/pkgs/applications/graphics/potrace/default.nix
@@ -1,18 +1,21 @@
{ stdenv, fetchurl, zlib }:
stdenv.mkDerivation rec {
- name = "potrace-${version}";
- version = "1.15";
+ pname = "potrace";
+ version = "1.16";
src = fetchurl {
url = "http://potrace.sourceforge.net/download/${version}/potrace-${version}.tar.gz";
- sha256 = "17ajildjp14shsy339xarh1lw1p0k60la08ahl638a73mh23kcx9";
+ sha256 = "1k3sxgjqq0jnpk9xxys05q32sl5hbf1lbk1gmfxcrmpdgnhli0my";
};
configureFlags = [ "--with-libpotrace" ];
buildInputs = [ zlib ];
+ enableParallelBuilding = true;
+ doCheck = true;
+
meta = with stdenv.lib; {
homepage = http://potrace.sourceforge.net/;
description = "A tool for tracing a bitmap, which means, transforming a bitmap into a smooth, scalable image";
diff --git a/pkgs/applications/graphics/pqiv/default.nix b/pkgs/applications/graphics/pqiv/default.nix
index ec4ce69d5e87..1ad51e92d472 100644
--- a/pkgs/applications/graphics/pqiv/default.nix
+++ b/pkgs/applications/graphics/pqiv/default.nix
@@ -3,7 +3,7 @@
}:
stdenv.mkDerivation (rec {
- name = "pqiv-${version}";
+ pname = "pqiv";
version = "2.11";
src = fetchFromGitHub {
diff --git a/pkgs/applications/graphics/processing3/default.nix b/pkgs/applications/graphics/processing/default.nix
similarity index 80%
rename from pkgs/applications/graphics/processing3/default.nix
rename to pkgs/applications/graphics/processing/default.nix
index 6f90131db12a..9972ea757098 100644
--- a/pkgs/applications/graphics/processing3/default.nix
+++ b/pkgs/applications/graphics/processing/default.nix
@@ -1,14 +1,14 @@
{ stdenv, fetchFromGitHub, fetchurl, xmlstarlet, makeWrapper, ant, jdk, rsync, javaPackages, libXxf86vm, gsettings-desktop-schemas }:
stdenv.mkDerivation rec {
- version = "3.4";
- name = "processing3-${version}";
+ pname = "processing";
+ version = "3.5.3";
src = fetchFromGitHub {
owner = "processing";
repo = "processing";
- rev = "processing-0265-${version}";
- sha256 = "12wpxgn2wd5vbasx9584w5yb1s319smq1zh8m7dvp7gkqw9plwp4";
+ rev = "processing-0269-${version}";
+ sha256 = "0ajniy3a0i0rx7is46r85yh3ah4zm4ra1gbllmihw9pmnfjgfajn";
};
nativeBuildInputs = [ ant rsync makeWrapper ];
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
${xmlstarlet}/bin/xmlstarlet ed --inplace -P -d '//get[@src="http://download.processing.org/reference.zip"]' build/build.xml
install -D -m0444 ${fetchurl {
url = http://download.processing.org/reference.zip;
- sha256 = "0ai0cr62gc7n6y22ki3qibyj1qnlaxv1miqxmmahfk3hpbyfqz9n";
+ sha256 = "198bpk8mzns6w5h0zdf50wr6iv7sgdi6v7jznj5rbsnpgyilxz35";
}
} ./java/reference.zip
@@ -39,16 +39,16 @@ stdenv.mkDerivation rec {
installPhase = ''
mkdir $out
- cp -dpR build/linux/work $out/${name}
+ cp -dpR build/linux/work $out/${pname}
- rmdir $out/${name}/java
- ln -s ${jdk} $out/${name}/java
+ rmdir $out/${pname}/java
+ ln -s ${jdk} $out/${pname}/java
- makeWrapper $out/${name}/processing $out/bin/processing \
+ makeWrapper $out/${pname}/processing $out/bin/processing \
--prefix XDG_DATA_DIRS : ${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name} \
--prefix _JAVA_OPTIONS " " -Dawt.useSystemAAFontSettings=lcd \
--prefix LD_LIBRARY_PATH : ${libXxf86vm}/lib
- makeWrapper $out/${name}/processing-java $out/bin/processing-java \
+ makeWrapper $out/${pname}/processing-java $out/bin/processing-java \
--prefix XDG_DATA_DIRS : ${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name} \
--prefix _JAVA_OPTIONS " " -Dawt.useSystemAAFontSettings=lcd \
--prefix LD_LIBRARY_PATH : ${libXxf86vm}/lib
diff --git a/pkgs/applications/graphics/qcomicbook/default.nix b/pkgs/applications/graphics/qcomicbook/default.nix
index c37e21ec898a..4d416a7c106d 100644
--- a/pkgs/applications/graphics/qcomicbook/default.nix
+++ b/pkgs/applications/graphics/qcomicbook/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, pkgconfig, cmake, qtbase, qttools, qtx11extras, poppler }:
stdenv.mkDerivation rec {
- name = "qcomicbook-${version}";
+ pname = "qcomicbook";
version = "0.9.1";
src = fetchFromGitHub {
diff --git a/pkgs/applications/graphics/qiv/default.nix b/pkgs/applications/graphics/qiv/default.nix
index ce08e2b1be92..750217d99188 100644
--- a/pkgs/applications/graphics/qiv/default.nix
+++ b/pkgs/applications/graphics/qiv/default.nix
@@ -2,10 +2,10 @@
stdenv.mkDerivation (rec {
version = "2.3.2";
- name = "qiv-${version}";
+ pname = "qiv";
src = fetchurl {
- url = "https://spiegl.de/qiv/download/${name}.tgz";
+ url = "https://spiegl.de/qiv/download/${pname}-${version}.tgz";
sha256 = "1mc0f2nnas4q0d7zc9r6g4z93i32xlx0p9hl4fn5zkyml24a1q28";
};
diff --git a/pkgs/applications/graphics/rapcad/default.nix b/pkgs/applications/graphics/rapcad/default.nix
index b300c0071fae..7e9547c1067c 100644
--- a/pkgs/applications/graphics/rapcad/default.nix
+++ b/pkgs/applications/graphics/rapcad/default.nix
@@ -4,7 +4,7 @@
stdenv.mkDerivation rec {
version = "0.9.8";
- name = "rapcad-${version}";
+ pname = "rapcad";
src = fetchFromGitHub {
owner = "gilesbathgate";
diff --git a/pkgs/applications/graphics/rapid-photo-downloader/default.nix b/pkgs/applications/graphics/rapid-photo-downloader/default.nix
index 5991a3351ee1..4279af4cb78b 100644
--- a/pkgs/applications/graphics/rapid-photo-downloader/default.nix
+++ b/pkgs/applications/graphics/rapid-photo-downloader/default.nix
@@ -1,16 +1,16 @@
-{ stdenv, fetchurl, python3Packages
+{ stdenv, mkDerivationWith, fetchurl, python3Packages
, file, intltool, gobject-introspection, libgudev
, udisks, gexiv2, gst_all_1, libnotify
, exiftool, gdk-pixbuf, libmediainfo, vmtouch
}:
-python3Packages.buildPythonApplication rec {
+mkDerivationWith python3Packages.buildPythonApplication rec {
pname = "rapid-photo-downloader";
- version = "0.9.14";
+ version = "0.9.17";
src = fetchurl {
url = "https://launchpad.net/rapid/pyqt/${version}/+download/${pname}-${version}.tar.gz";
- sha256 = "1nywkkyxlpzq3s9anza9k67j5689pfclfha218frih36qdb0j258";
+ sha256 = "10vqbi9rcg8r0jxpx2kn8xmahwgdcal28wpix2fg6nkp5rfwxnr6";
};
# Disable version check and fix install tests
@@ -64,6 +64,7 @@ python3Packages.buildPythonApplication rec {
requests
colorlog
pyprind
+ tenacity
];
makeWrapperArgs = [
@@ -72,6 +73,7 @@ python3Packages.buildPythonApplication rec {
"--prefix PATH : ${stdenv.lib.makeBinPath [ exiftool vmtouch ]}"
"--prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [ libmediainfo ]}"
"--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : \"$GST_PLUGIN_SYSTEM_PATH_1_0\""
+ "\${qtWrapperArgs[@]}"
];
meta = with stdenv.lib; {
diff --git a/pkgs/applications/graphics/renderdoc/default.nix b/pkgs/applications/graphics/renderdoc/default.nix
index 3fd4521d7cd8..594429503a35 100644
--- a/pkgs/applications/graphics/renderdoc/default.nix
+++ b/pkgs/applications/graphics/renderdoc/default.nix
@@ -13,7 +13,7 @@ let
in
stdenv.mkDerivation rec {
version = "1.4";
- name = "renderdoc-${version}";
+ pname = "renderdoc";
src = fetchFromGitHub {
owner = "baldurk";
diff --git a/pkgs/applications/graphics/runwayml/default.nix b/pkgs/applications/graphics/runwayml/default.nix
new file mode 100644
index 000000000000..c527ce2b229a
--- /dev/null
+++ b/pkgs/applications/graphics/runwayml/default.nix
@@ -0,0 +1,45 @@
+{ lib
+, fetchurl
+, appimageTools
+, symlinkJoin
+}:
+
+let
+ pname = "runwayml";
+ version = "0.9.0";
+ name = "${pname}-${version}";
+
+ src = fetchurl {
+ url = "https://runway-releases.s3.amazonaws.com/Runway%20${version}.AppImage";
+ sha256 = "0rg7ipp7kx0l4qgcymfg5d3saz0c6d2j0c6rf28rwqgbm92gbjjq";
+ name="${pname}-${version}.AppImage";
+ };
+
+ binary = appimageTools.wrapType2 {
+ name = pname;
+ inherit src;
+ };
+ # we only use this to extract the icon
+ appimage-contents = appimageTools.extractType2 {
+ inherit name src;
+ };
+
+in
+ symlinkJoin {
+ inherit name;
+ paths = [ binary ];
+
+ postBuild = ''
+ mkdir -p $out/share/pixmaps/ $out/share/applications
+ cp ${appimage-contents}/usr/share/icons/hicolor/1024x1024/apps/runway.png $out/share/pixmaps/runway.png
+ sed 's:Exec=AppRun:Exec=runwayml:' ${appimage-contents}/runway.desktop > $out/share/applications/runway.desktop
+ '';
+
+ meta = with lib; {
+ description = "Machine learning for creators";
+ homepage = https://runwayml.com/;
+ license = licenses.unfree;
+ maintainers = with maintainers; [ prusnak ];
+ platforms = [ "x86_64-linux" ];
+ };
+}
diff --git a/pkgs/applications/graphics/sane/backends/dsseries/default.nix b/pkgs/applications/graphics/sane/backends/dsseries/default.nix
index 01c203b407c1..d4165be3784f 100644
--- a/pkgs/applications/graphics/sane/backends/dsseries/default.nix
+++ b/pkgs/applications/graphics/sane/backends/dsseries/default.nix
@@ -1,18 +1,18 @@
{ stdenv, fetchurl, rpmextract }:
stdenv.mkDerivation rec {
- name = "libsane-dsseries-${version}";
+ pname = "libsane-dsseries";
version = "1.0.5-1";
src = fetchurl {
- url = "https://download.brother.com/welcome/dlf100974/${name}.x86_64.rpm";
+ url = "https://download.brother.com/welcome/dlf100974/${pname}-${version}.x86_64.rpm";
sha256 = "1wfdbfbf51cc7njzikdg48kwpnpc0pg5s6p0s0y3z0q7y59x2wbq";
};
nativeBuildInputs = [ rpmextract ];
unpackCmd = ''
- mkdir ${name} && pushd ${name}
+ mkdir ${pname}-${version} && pushd ${pname}-${version}
rpmextract $curSrc
popd
'';
diff --git a/pkgs/applications/graphics/sane/backends/generic.nix b/pkgs/applications/graphics/sane/backends/generic.nix
index 0f47c82f0325..92cec3ca82c2 100644
--- a/pkgs/applications/graphics/sane/backends/generic.nix
+++ b/pkgs/applications/graphics/sane/backends/generic.nix
@@ -57,6 +57,9 @@ stdenv.mkDerivation {
substituteInPlace $out/lib/libsane.la \
--replace "-ljpeg" "-L${libjpeg.out}/lib -ljpeg"
+
+ # net.conf conflicts with the file generated by the nixos module
+ rm -f $out/etc/sane.d/net.conf
'' + stdenv.lib.concatStrings (builtins.map installFirmware compatFirmware);
meta = with stdenv.lib; {
diff --git a/pkgs/applications/graphics/sane/frontends.nix b/pkgs/applications/graphics/sane/frontends.nix
index f6994db81e4b..66473c4a155f 100644
--- a/pkgs/applications/graphics/sane/frontends.nix
+++ b/pkgs/applications/graphics/sane/frontends.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, sane-backends, libX11, gtk2, pkgconfig, libusb ? null }:
stdenv.mkDerivation rec {
- name = "sane-frontends-${version}";
+ pname = "sane-frontends";
version = "1.0.14";
src = fetchurl {
- url = "https://alioth.debian.org/frs/download.php/latestfile/175/${name}.tar.gz";
+ url = "https://alioth.debian.org/frs/download.php/latestfile/175/${pname}-${version}.tar.gz";
sha256 = "1ad4zr7rcxpda8yzvfkq1rfjgx9nl6lan5a628wvpdbh3fn9v0z7";
};
diff --git a/pkgs/applications/graphics/scantailor/advanced.nix b/pkgs/applications/graphics/scantailor/advanced.nix
index d55441e39fa5..63f16f688acd 100644
--- a/pkgs/applications/graphics/scantailor/advanced.nix
+++ b/pkgs/applications/graphics/scantailor/advanced.nix
@@ -3,7 +3,7 @@
, qtbase, qttools }:
stdenv.mkDerivation rec {
- name = "scantailor-advanced-${version}";
+ pname = "scantailor-advanced";
version = "1.0.16";
src = fetchFromGitHub {
diff --git a/pkgs/applications/graphics/scantailor/default.nix b/pkgs/applications/graphics/scantailor/default.nix
index 395179ff70ae..14efe48f30db 100644
--- a/pkgs/applications/graphics/scantailor/default.nix
+++ b/pkgs/applications/graphics/scantailor/default.nix
@@ -1,6 +1,6 @@
{stdenv, fetchurl, qt4, cmake, libjpeg, libtiff, boost }:
-stdenv.mkDerivation rec {
+stdenv.mkDerivation {
name = "scantailor-0.9.12.1";
src = fetchurl {
diff --git a/pkgs/applications/graphics/screencloud/default.nix b/pkgs/applications/graphics/screencloud/default.nix
index 292ae9c8faa8..88bbbd9d8646 100644
--- a/pkgs/applications/graphics/screencloud/default.nix
+++ b/pkgs/applications/graphics/screencloud/default.nix
@@ -2,7 +2,7 @@
with stdenv.lib;
stdenv.mkDerivation rec {
- name = "screencloud-${version}";
+ pname = "screencloud";
version = "1.2.0";
# API Keys. According to the author of the AUR package, these are only used
diff --git a/pkgs/applications/graphics/shutter/default.nix b/pkgs/applications/graphics/shutter/default.nix
index 527a21f93fe3..957692b4ba17 100644
--- a/pkgs/applications/graphics/shutter/default.nix
+++ b/pkgs/applications/graphics/shutter/default.nix
@@ -13,7 +13,7 @@ let
EncodeLocale TryTiny TypesSerialiser LWPMediaTypes
];
in
-stdenv.mkDerivation rec {
+stdenv.mkDerivation {
name = "shutter-0.94.3";
src = fetchurl {
diff --git a/pkgs/applications/graphics/swingsane/default.nix b/pkgs/applications/graphics/swingsane/default.nix
index d0f2a48c589d..f56646e5aedd 100644
--- a/pkgs/applications/graphics/swingsane/default.nix
+++ b/pkgs/applications/graphics/swingsane/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchurl, makeDesktopItem, unzip, jre, runtimeShell }:
stdenv.mkDerivation rec {
- name = "swingsane-${version}";
+ pname = "swingsane";
version = "0.2";
src = fetchurl {
diff --git a/pkgs/applications/graphics/synfigstudio/default.nix b/pkgs/applications/graphics/synfigstudio/default.nix
index b399dd2d2284..188f7cb29343 100644
--- a/pkgs/applications/graphics/synfigstudio/default.nix
+++ b/pkgs/applications/graphics/synfigstudio/default.nix
@@ -6,7 +6,7 @@
let
version = "1.0.2";
- ETL = stdenv.mkDerivation rec {
+ ETL = stdenv.mkDerivation {
name = "ETL-0.04.19";
src = fetchFromGitHub {
@@ -21,8 +21,9 @@ let
nativeBuildInputs = [ autoreconfHook ];
};
- synfig = stdenv.mkDerivation rec {
- name = "synfig-${version}";
+ synfig = stdenv.mkDerivation {
+ pname = "synfig";
+ inherit version;
src = fetchFromGitHub {
repo = "synfig";
@@ -46,8 +47,9 @@ let
meta.broken = true;
};
in
-stdenv.mkDerivation rec {
- name = "synfigstudio-${version}";
+stdenv.mkDerivation {
+ pname = "synfigstudio";
+ inherit version;
src = fetchFromGitHub {
repo = "synfig";
diff --git a/pkgs/applications/graphics/tesseract/tesseract3.nix b/pkgs/applications/graphics/tesseract/tesseract3.nix
index 23713271c409..157c0b9742bf 100644
--- a/pkgs/applications/graphics/tesseract/tesseract3.nix
+++ b/pkgs/applications/graphics/tesseract/tesseract3.nix
@@ -2,7 +2,7 @@
, leptonica, libpng, libtiff, icu, pango, opencl-headers }:
stdenv.mkDerivation rec {
- name = "tesseract-${version}";
+ pname = "tesseract";
version = "3.05.00";
src = fetchFromGitHub {
diff --git a/pkgs/applications/graphics/tesseract/tesseract4.nix b/pkgs/applications/graphics/tesseract/tesseract4.nix
index af0063301f1a..548f58a50fb1 100644
--- a/pkgs/applications/graphics/tesseract/tesseract4.nix
+++ b/pkgs/applications/graphics/tesseract/tesseract4.nix
@@ -2,7 +2,7 @@
, leptonica, libpng, libtiff, icu, pango, opencl-headers }:
stdenv.mkDerivation rec {
- name = "tesseract-${version}";
+ pname = "tesseract";
version = "4.1.0";
src = fetchFromGitHub {
diff --git a/pkgs/applications/graphics/timelapse-deflicker/default.nix b/pkgs/applications/graphics/timelapse-deflicker/default.nix
index b4ddb1436856..8355545e8dd6 100644
--- a/pkgs/applications/graphics/timelapse-deflicker/default.nix
+++ b/pkgs/applications/graphics/timelapse-deflicker/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, makeWrapper, perl, perlPackages }:
stdenv.mkDerivation rec {
- name = "timelapse-deflicker-${version}";
+ pname = "timelapse-deflicker";
version = "0.1.0";
src = fetchFromGitHub {
diff --git a/pkgs/applications/graphics/ufraw/default.nix b/pkgs/applications/graphics/ufraw/default.nix
index 50cd9485a3e8..131d83f0d58e 100644
--- a/pkgs/applications/graphics/ufraw/default.nix
+++ b/pkgs/applications/graphics/ufraw/default.nix
@@ -1,38 +1,70 @@
-{ fetchurl, stdenv, pkgconfig, gtk2, gettext, bzip2, zlib
-, withGimpPlugin ? true, gimp ? null
-, libjpeg, libtiff, cfitsio, exiv2, lcms2, gtkimageview, lensfun }:
+{ stdenv
+, fetchFromGitHub
+
+, autoconf
+, automake
+, autoreconfHook
+, bzip2
+, cfitsio
+, exiv2
+, gettext
+, gimp ? null
+, gtk2
+, gtkimageview
+, lcms2
+, lensfun
+, libjpeg
+, libtiff
+, perl
+, pkgconfig
+, zlib
+
+, withGimpPlugin ? true
+}:
assert withGimpPlugin -> gimp != null;
-stdenv.mkDerivation rec {
- name = "ufraw-0.22";
+stdenv.mkDerivation {
+ pname = "ufraw";
+ version = "unstable-2019-06-12";
- src = fetchurl {
- # XXX: These guys appear to mutate uploaded tarballs!
- url = "mirror://sourceforge/ufraw/${name}.tar.gz";
- sha256 = "0pm216pg0vr44gwz9vcvq3fsf8r5iayljhf5nis2mnw7wn6d5azp";
+ # The original ufraw repo is unmaintained and broken;
+ # this is a fork that collects patches
+ src = fetchFromGitHub {
+ owner = "sergiomb2";
+ repo = "ufraw";
+ rev = "c65b4237dcb430fb274e4778afaf5df9a18e04e6";
+ sha256 = "02icn67bsinvgliy62qa6v7gmwgp2sh15jvm8iiz3c7g1h74f0b7";
};
outputs = [ "out" ] ++ stdenv.lib.optional withGimpPlugin "gimpPlugin";
- nativeBuildInputs = [ pkgconfig gettext ];
+ nativeBuildInputs = [ autoconf automake autoreconfHook gettext perl pkgconfig ];
+
buildInputs = [
- gtk2 gtkimageview bzip2 zlib
- libjpeg libtiff cfitsio exiv2 lcms2 lensfun
+ bzip2
+ cfitsio
+ exiv2
+ gtk2
+ gtkimageview
+ lcms2
+ lensfun
+ libjpeg
+ libtiff
+ zlib
] ++ stdenv.lib.optional withGimpPlugin gimp;
configureFlags = [
- "--enable-extras"
- "--enable-dst-correction"
"--enable-contrast"
+ "--enable-dst-correction"
] ++ stdenv.lib.optional withGimpPlugin "--with-gimp";
postInstall = stdenv.lib.optionalString withGimpPlugin ''
moveToOutput "lib/gimp" "$gimpPlugin"
'';
- meta = {
- homepage = http://ufraw.sourceforge.net/;
+ meta = with stdenv.lib; {
+ homepage = https://github.com/sergiomb2/ufraw;
description = "Utility to read and manipulate raw images from digital cameras";
@@ -46,9 +78,9 @@ stdenv.mkDerivation rec {
the camera's tone curves.
'';
- license = stdenv.lib.licenses.gpl2Plus;
+ license = licenses.gpl2Plus;
- maintainers = [ ];
- platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.linux; # needs GTK+
+ maintainers = with maintainers; [ gloaming ];
+ platforms = with platforms; all;
};
}
diff --git a/pkgs/applications/graphics/unigine-valley/default.nix b/pkgs/applications/graphics/unigine-valley/default.nix
index 3a139f3740cc..09abfc60a528 100644
--- a/pkgs/applications/graphics/unigine-valley/default.nix
+++ b/pkgs/applications/graphics/unigine-valley/default.nix
@@ -27,7 +27,8 @@ let
in
stdenv.mkDerivation rec {
- name = "unigine-valley-${version}";
+ pname = "unigine-valley";
+ inherit version;
src = fetchurl {
url = "http://assets.unigine.com/d/Unigine_Valley-${version}.run";
diff --git a/pkgs/applications/graphics/viewnior/default.nix b/pkgs/applications/graphics/viewnior/default.nix
index 48930ccbbb96..a80e89e72bcd 100644
--- a/pkgs/applications/graphics/viewnior/default.nix
+++ b/pkgs/applications/graphics/viewnior/default.nix
@@ -2,13 +2,13 @@
, intltool, gettext, shared-mime-info, glib, gdk-pixbuf, perl}:
stdenv.mkDerivation rec {
- name = "viewnior-${version}";
+ pname = "viewnior";
version = "1.6";
src = fetchFromGitHub {
owner = "xsisqox";
repo = "Viewnior";
- rev = name;
+ rev = "${pname}-${version}";
sha256 = "06ppv3r85l3id4ij6h4y5fgm3nib2587fdrdv9fccyi75zk7fs0p";
};
@@ -18,10 +18,6 @@ stdenv.mkDerivation rec {
shared-mime-info glib gdk-pixbuf perl
];
- preFixup = ''
- rm $out/share/icons/*/icon-theme.cache
- '';
-
meta = {
description = "Fast and simple image viewer";
longDescription =
diff --git a/pkgs/applications/graphics/vimiv/default.nix b/pkgs/applications/graphics/vimiv/default.nix
index 5fc7e309f4df..fab85052df3b 100644
--- a/pkgs/applications/graphics/vimiv/default.nix
+++ b/pkgs/applications/graphics/vimiv/default.nix
@@ -1,5 +1,5 @@
{ lib, python3Packages, fetchFromGitHub, imagemagick, librsvg, gtk3, jhead
-, hicolor-icon-theme, gnome3
+, gnome3
# Test requirements
, dbus, xvfb_run, xdotool
@@ -38,7 +38,7 @@ python3Packages.buildPythonApplication rec {
'';
checkInputs = [ python3Packages.nose dbus.daemon xvfb_run xdotool ];
- buildInputs = [ hicolor-icon-theme gnome3.adwaita-icon-theme librsvg ];
+ buildInputs = [ gnome3.adwaita-icon-theme librsvg ];
propagatedBuildInputs = with python3Packages; [ pillow pygobject3 gtk3 ];
makeWrapperArgs = [
diff --git a/pkgs/applications/graphics/write_stylus/default.nix b/pkgs/applications/graphics/write_stylus/default.nix
index e11bc3dd5bb9..232eeeb01153 100644
--- a/pkgs/applications/graphics/write_stylus/default.nix
+++ b/pkgs/applications/graphics/write_stylus/default.nix
@@ -1,6 +1,6 @@
{ stdenv, lib, qtbase, qtsvg, libglvnd, fetchurl, makeDesktopItem }:
stdenv.mkDerivation rec {
- name = "write_stylus-${version}";
+ pname = "write_stylus";
version = "209";
desktopItem = makeDesktopItem {
diff --git a/pkgs/applications/graphics/xaos/default.nix b/pkgs/applications/graphics/xaos/default.nix
index 182f68f3112c..e80362c386b9 100644
--- a/pkgs/applications/graphics/xaos/default.nix
+++ b/pkgs/applications/graphics/xaos/default.nix
@@ -2,11 +2,11 @@
, libXt, zlib, gettext, intltool, perl }:
stdenv.mkDerivation rec {
- name = "xaos-${version}";
+ pname = "xaos";
version = "3.6";
src = fetchurl {
- url = "mirror://sourceforge/xaos/${name}.tar.gz";
+ url = "mirror://sourceforge/xaos/${pname}-${version}.tar.gz";
sha256 = "15cd1cx1dyygw6g2nhjqq3bsfdj8sj8m4va9n75i0f3ryww3x7wq";
};
diff --git a/pkgs/applications/graphics/xfig/default.nix b/pkgs/applications/graphics/xfig/default.nix
index 429af12b9bb3..fe5a13703329 100644
--- a/pkgs/applications/graphics/xfig/default.nix
+++ b/pkgs/applications/graphics/xfig/default.nix
@@ -6,7 +6,8 @@ let
version = "3.2.7a";
in stdenv.mkDerivation {
- name = "xfig-${version}";
+ pname = "xfig";
+ inherit version;
src = fetchurl {
url = "mirror://sourceforge/mcj/xfig-${version}.tar.xz";
diff --git a/pkgs/applications/graphics/xfractint/default.nix b/pkgs/applications/graphics/xfractint/default.nix
index 2269f1c18f14..ae4765fc9e76 100644
--- a/pkgs/applications/graphics/xfractint/default.nix
+++ b/pkgs/applications/graphics/xfractint/default.nix
@@ -1,6 +1,5 @@
{stdenv, fetchurl, libX11, libXft}:
stdenv.mkDerivation rec {
- name = "${pname}-${version}";
pname = "xfractint";
version = "20.04p14";
# or fetchFromGitHub(owner,repo,rev) or fetchgit(rev)
diff --git a/pkgs/applications/graphics/xournalpp/default.nix b/pkgs/applications/graphics/xournalpp/default.nix
index 2487b093148a..3597b97fae63 100644
--- a/pkgs/applications/graphics/xournalpp/default.nix
+++ b/pkgs/applications/graphics/xournalpp/default.nix
@@ -10,7 +10,6 @@
, glib
, gsettings-desktop-schemas
, gtk3
-, hicolor-icon-theme
, libsndfile
, libxml2
, libzip
@@ -23,14 +22,14 @@
}:
stdenv.mkDerivation rec {
- name = "xournalpp-${version}";
- version = "1.0.12";
+ pname = "xournalpp";
+ version = "1.0.15";
src = fetchFromGitHub {
owner = "xournalpp";
- repo = "xournalpp";
+ repo = pname;
rev = version;
- sha256 = "0yg70hsx58s3wb5kzccivrqa7kvmdapygxmif1j64hddah2rqcn9";
+ sha256 = "1q716hn2ajkxfba0dxp7vcnqfa31hx36ax09yz4d13sdw43rfjf4";
};
nativeBuildInputs = [ cmake gettext pkgconfig wrapGAppsHook ];
@@ -38,7 +37,6 @@ stdenv.mkDerivation rec {
[ glib
gsettings-desktop-schemas
gtk3
- hicolor-icon-theme
libsndfile
libxml2
libzip
diff --git a/pkgs/applications/graphics/xzgv/default.nix b/pkgs/applications/graphics/xzgv/default.nix
index 69ab67dffb73..de3f3a78988b 100644
--- a/pkgs/applications/graphics/xzgv/default.nix
+++ b/pkgs/applications/graphics/xzgv/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchurl, gtk2, libexif, pkgconfig, texinfo }:
stdenv.mkDerivation rec {
- name = "xzgv-${version}";
+ pname = "xzgv";
version = "0.9.2";
src = fetchurl {
url = "mirror://sourceforge/xzgv/xzgv-${version}.tar.gz";
diff --git a/pkgs/applications/graphics/yacreader/default.nix b/pkgs/applications/graphics/yacreader/default.nix
index 3cf42343658c..e545dd5a7230 100644
--- a/pkgs/applications/graphics/yacreader/default.nix
+++ b/pkgs/applications/graphics/yacreader/default.nix
@@ -3,11 +3,11 @@
}:
stdenv.mkDerivation rec {
- name = "yacreader-${version}";
+ pname = "yacreader";
version = "9.5.0";
src = fetchurl {
- url = "https://github.com/YACReader/yacreader/releases/download/${version}/${name}-src.tar.xz";
+ url = "https://github.com/YACReader/yacreader/releases/download/${version}/${pname}-${version}-src.tar.xz";
sha256 = "0cv5y76kjvsqsv4fp99j8np5pm4m76868i1nn40q6hy573dmxwm6";
};
diff --git a/pkgs/applications/graphics/yed/default.nix b/pkgs/applications/graphics/yed/default.nix
index 799ceef1beda..0038d41475fb 100644
--- a/pkgs/applications/graphics/yed/default.nix
+++ b/pkgs/applications/graphics/yed/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchzip, makeWrapper, unzip, jre }:
stdenv.mkDerivation rec {
- name = "yEd-${version}";
+ pname = "yEd";
version = "3.19";
src = fetchzip {
- url = "https://www.yworks.com/resources/yed/demo/${name}.zip";
+ url = "https://www.yworks.com/resources/yed/demo/${pname}-${version}.zip";
sha256 = "0l70pc7wl2ghfkjab9w2mbx7crwha7xwkrpmspsi5c6q56dw7s33";
};
diff --git a/pkgs/applications/graphics/zgrviewer/default.nix b/pkgs/applications/graphics/zgrviewer/default.nix
index ac3d303a7a60..db07b9e1db4e 100644
--- a/pkgs/applications/graphics/zgrviewer/default.nix
+++ b/pkgs/applications/graphics/zgrviewer/default.nix
@@ -2,9 +2,8 @@
stdenv.mkDerivation rec {
version = "0.9.0";
pname = "zgrviewer";
- name="${pname}-${version}";
src = fetchurl {
- url = "mirror://sourceforge/zvtm/${pname}/${version}/${name}.zip";
+ url = "mirror://sourceforge/zvtm/${pname}/${version}/${pname}-${version}.zip";
sha256 = "1yg2rck81sqqrgfi5kn6c1bz42dr7d0zqpcsdjhicssi1y159f23";
};
buildInputs = [jre unzip];
diff --git a/pkgs/applications/graphics/zgv/default.nix b/pkgs/applications/graphics/zgv/default.nix
index 7a49e5b2cb7f..8ef705f7ef4b 100644
--- a/pkgs/applications/graphics/zgv/default.nix
+++ b/pkgs/applications/graphics/zgv/default.nix
@@ -1,10 +1,10 @@
{ stdenv, fetchurl, fetchpatch, pkgconfig, SDL, SDL_image, libjpeg, libpng, libtiff }:
stdenv.mkDerivation rec {
- name = "zgv-${version}";
+ pname = "zgv";
version = "5.9";
src = fetchurl {
- url = "https://www.svgalib.org/rus/zgv/${name}.tar.gz";
+ url = "https://www.svgalib.org/rus/zgv/${pname}-${version}.tar.gz";
sha256 = "1fk4i9x0cpnpn3llam0zy2pkmhlr2hy3iaxhxg07v9sizd4dircj";
};
diff --git a/pkgs/applications/kde/akonadi/0001-Revert-Make-Akonadi-installation-properly-relocatabl.patch b/pkgs/applications/kde/akonadi/0001-Revert-Make-Akonadi-installation-properly-relocatabl.patch
index 24ed20fd83fb..c3964c5c05b5 100644
--- a/pkgs/applications/kde/akonadi/0001-Revert-Make-Akonadi-installation-properly-relocatabl.patch
+++ b/pkgs/applications/kde/akonadi/0001-Revert-Make-Akonadi-installation-properly-relocatabl.patch
@@ -9,11 +9,11 @@ This reverts commit b2bb55f13f2ac783f89cc414de8c39f62fa2096a.
KF5AkonadiConfig.cmake.in | 6 +++---
2 files changed, 3 insertions(+), 6 deletions(-)
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 9788bea94..15bad00fd 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -285,9 +285,6 @@ configure_package_config_file(
+Index: akonadi-19.08.0/CMakeLists.txt
+===================================================================
+--- akonadi-19.08.0.orig/CMakeLists.txt
++++ akonadi-19.08.0/CMakeLists.txt
+@@ -306,9 +306,6 @@ configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/KF5AkonadiConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/KF5AkonadiConfig.cmake"
INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
@@ -23,13 +23,13 @@ index 9788bea94..15bad00fd 100644
)
install(FILES
-diff --git a/KF5AkonadiConfig.cmake.in b/KF5AkonadiConfig.cmake.in
-index 75abede50..10f039376 100644
---- a/KF5AkonadiConfig.cmake.in
-+++ b/KF5AkonadiConfig.cmake.in
-@@ -13,8 +13,8 @@ find_dependency(KF5ConfigWidgets "@KF5_VERSION@")
- find_dependency(Qt5DBus "@QT_REQUIRED_VERSION@")
- find_dependency(Qt5Network "@QT_REQUIRED_VERSION@")
+Index: akonadi-19.08.0/KF5AkonadiConfig.cmake.in
+===================================================================
+--- akonadi-19.08.0.orig/KF5AkonadiConfig.cmake.in
++++ akonadi-19.08.0/KF5AkonadiConfig.cmake.in
+@@ -26,8 +26,8 @@ if(BUILD_TESTING)
+ find_dependency(Qt5Test "@QT_REQUIRED_VERSION@")
+ endif()
-set_and_check(AKONADI_DBUS_INTERFACES_DIR "@PACKAGE_AKONADI_DBUS_INTERFACES_INSTALL_DIR@")
-set_and_check(AKONADI_INCLUDE_DIR "@PACKAGE_AKONADI_INCLUDE_DIR@")
@@ -38,15 +38,12 @@ index 75abede50..10f039376 100644
find_dependency(Boost "@Boost_MINIMUM_VERSION@")
-@@ -22,7 +22,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/KF5AkonadiTargets.cmake)
+@@ -35,7 +35,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/KF5Ako
include(${CMAKE_CURRENT_LIST_DIR}/KF5AkonadiMacros.cmake)
# The directory where akonadi-xml.xsd and kcfg2dbus.xsl are installed
-set(KF5Akonadi_DATA_DIR "@PACKAGE_KF5Akonadi_DATA_DIR@")
+set(KF5Akonadi_DATA_DIR "@KF5Akonadi_DATA_DIR@")
-
+
####################################################################################
# CMAKE_AUTOMOC
---
-2.15.1
-
diff --git a/pkgs/applications/kde/akonadi/akonadi-paths.patch b/pkgs/applications/kde/akonadi/akonadi-paths.patch
index fcbbbbb72eb3..ba6bbedeeae7 100644
--- a/pkgs/applications/kde/akonadi/akonadi-paths.patch
+++ b/pkgs/applications/kde/akonadi/akonadi-paths.patch
@@ -1,8 +1,8 @@
-diff --git a/src/akonadicontrol/agentmanager.cpp b/src/akonadicontrol/agentmanager.cpp
-index d85c1a79b..8df02710c 100644
---- a/src/akonadicontrol/agentmanager.cpp
-+++ b/src/akonadicontrol/agentmanager.cpp
-@@ -78,12 +78,12 @@ AgentManager::AgentManager(bool verbose, QObject *parent)
+Index: akonadi-19.08.0/src/akonadicontrol/agentmanager.cpp
+===================================================================
+--- akonadi-19.08.0.orig/src/akonadicontrol/agentmanager.cpp
++++ akonadi-19.08.0/src/akonadicontrol/agentmanager.cpp
+@@ -78,12 +78,12 @@ AgentManager::AgentManager(bool verbose,
mStorageController = new Akonadi::ProcessControl;
mStorageController->setShutdownTimeout(15 * 1000); // the server needs more time for shutdown if we are using an internal mysqld
connect(mStorageController, &Akonadi::ProcessControl::unableToStart, this, &AgentManager::serverFailure);
@@ -17,11 +17,11 @@ index d85c1a79b..8df02710c 100644
}
}
-diff --git a/src/akonadicontrol/agentprocessinstance.cpp b/src/akonadicontrol/agentprocessinstance.cpp
-index be1cc4afb..6d0c1d7e5 100644
---- a/src/akonadicontrol/agentprocessinstance.cpp
-+++ b/src/akonadicontrol/agentprocessinstance.cpp
-@@ -62,7 +62,7 @@ bool AgentProcessInstance::start(const AgentType &agentInfo)
+Index: akonadi-19.08.0/src/akonadicontrol/agentprocessinstance.cpp
+===================================================================
+--- akonadi-19.08.0.orig/src/akonadicontrol/agentprocessinstance.cpp
++++ akonadi-19.08.0/src/akonadicontrol/agentprocessinstance.cpp
+@@ -62,7 +62,7 @@ bool AgentProcessInstance::start(const A
} else {
Q_ASSERT(agentInfo.launchMethod == AgentType::Launcher);
const QStringList arguments = QStringList() << executable << identifier();
@@ -30,11 +30,11 @@ index be1cc4afb..6d0c1d7e5 100644
mController->start(agentLauncherExec, arguments);
}
return true;
-diff --git a/src/server/storage/dbconfigmysql.cpp b/src/server/storage/dbconfigmysql.cpp
-index dfff6fc29..419e54a5b 100644
---- a/src/server/storage/dbconfigmysql.cpp
-+++ b/src/server/storage/dbconfigmysql.cpp
-@@ -82,7 +82,6 @@ bool DbConfigMysql::init(QSettings &settings)
+Index: akonadi-19.08.0/src/server/storage/dbconfigmysql.cpp
+===================================================================
+--- akonadi-19.08.0.orig/src/server/storage/dbconfigmysql.cpp
++++ akonadi-19.08.0/src/server/storage/dbconfigmysql.cpp
+@@ -83,7 +83,6 @@ bool DbConfigMysql::init(QSettings &sett
// determine default settings depending on the driver
QString defaultHostName;
QString defaultOptions;
@@ -42,7 +42,7 @@ index dfff6fc29..419e54a5b 100644
QString defaultCleanShutdownCommand;
#ifndef Q_OS_WIN
-@@ -90,16 +89,7 @@ bool DbConfigMysql::init(QSettings &settings)
+@@ -92,16 +91,7 @@ bool DbConfigMysql::init(QSettings &sett
#endif
const bool defaultInternalServer = true;
@@ -59,8 +59,8 @@ index dfff6fc29..419e54a5b 100644
+ const QString mysqladminPath = QLatin1String(NIXPKGS_MYSQL_MYSQLADMIN);
if (!mysqladminPath.isEmpty()) {
#ifndef Q_OS_WIN
- defaultCleanShutdownCommand = QStringLiteral("%1 --defaults-file=%2/mysql.conf --socket=%3/mysql.socket shutdown")
-@@ -109,10 +99,10 @@ bool DbConfigMysql::init(QSettings &settings)
+ defaultCleanShutdownCommand = QStringLiteral("%1 --defaults-file=%2/mysql.conf --socket=%3/%4 shutdown")
+@@ -111,10 +101,10 @@ bool DbConfigMysql::init(QSettings &sett
#endif
}
@@ -73,7 +73,7 @@ index dfff6fc29..419e54a5b 100644
qCDebug(AKONADISERVER_LOG) << "Found mysqlcheck: " << mMysqlCheckPath;
mInternalServer = settings.value(QStringLiteral("QMYSQL/StartServer"), defaultInternalServer).toBool();
-@@ -129,7 +119,7 @@ bool DbConfigMysql::init(QSettings &settings)
+@@ -131,7 +121,7 @@ bool DbConfigMysql::init(QSettings &sett
mUserName = settings.value(QStringLiteral("User")).toString();
mPassword = settings.value(QStringLiteral("Password")).toString();
mConnectionOptions = settings.value(QStringLiteral("Options"), defaultOptions).toString();
@@ -82,7 +82,7 @@ index dfff6fc29..419e54a5b 100644
mCleanServerShutdownCommand = settings.value(QStringLiteral("CleanServerShutdownCommand"), defaultCleanShutdownCommand).toString();
settings.endGroup();
-@@ -139,9 +129,6 @@ bool DbConfigMysql::init(QSettings &settings)
+@@ -141,9 +131,6 @@ bool DbConfigMysql::init(QSettings &sett
// intentionally not namespaced as we are the only one in this db instance when using internal mode
mDatabaseName = QStringLiteral("akonadi");
}
@@ -92,7 +92,7 @@ index dfff6fc29..419e54a5b 100644
qCDebug(AKONADISERVER_LOG) << "Using mysqld:" << mMysqldPath;
-@@ -150,9 +137,6 @@ bool DbConfigMysql::init(QSettings &settings)
+@@ -152,9 +139,6 @@ bool DbConfigMysql::init(QSettings &sett
settings.setValue(QStringLiteral("Name"), mDatabaseName);
settings.setValue(QStringLiteral("Host"), mHostName);
settings.setValue(QStringLiteral("Options"), mConnectionOptions);
@@ -102,7 +102,7 @@ index dfff6fc29..419e54a5b 100644
settings.setValue(QStringLiteral("StartServer"), mInternalServer);
settings.endGroup();
settings.sync();
-@@ -206,7 +190,7 @@ bool DbConfigMysql::startInternalServer()
+@@ -209,7 +193,7 @@ bool DbConfigMysql::startInternalServer(
#endif
// generate config file
@@ -111,56 +111,35 @@ index dfff6fc29..419e54a5b 100644
const QString localConfig = StandardDirs::locateResourceFile("config", QStringLiteral("mysql-local.conf"));
const QString actualConfig = StandardDirs::saveDir("data") + QLatin1String("/mysql.conf");
if (globalConfig.isEmpty()) {
-diff --git a/src/server/storage/dbconfigpostgresql.cpp b/src/server/storage/dbconfigpostgresql.cpp
-index 6b50ae50e..f94a8c5eb 100644
---- a/src/server/storage/dbconfigpostgresql.cpp
-+++ b/src/server/storage/dbconfigpostgresql.cpp
-@@ -58,7 +58,6 @@ bool DbConfigPostgresql::init(QSettings &settings)
+Index: akonadi-19.08.0/src/server/storage/dbconfigpostgresql.cpp
+===================================================================
+--- akonadi-19.08.0.orig/src/server/storage/dbconfigpostgresql.cpp
++++ akonadi-19.08.0/src/server/storage/dbconfigpostgresql.cpp
+@@ -140,9 +140,7 @@ bool DbConfigPostgresql::init(QSettings
// determine default settings depending on the driver
QString defaultHostName;
QString defaultOptions;
- QString defaultServerPath;
QString defaultInitDbPath;
+- QString defaultPgUpgradePath;
QString defaultPgData;
-@@ -70,35 +69,7 @@ bool DbConfigPostgresql::init(QSettings &settings)
+ #ifndef Q_WS_WIN // We assume that PostgreSQL is running as service on Windows
+@@ -153,12 +151,8 @@ bool DbConfigPostgresql::init(QSettings
mInternalServer = settings.value(QStringLiteral("QPSQL/StartServer"), defaultInternalServer).toBool();
if (mInternalServer) {
-- QStringList postgresSearchPath;
+- const auto paths = postgresSearchPaths(QStringLiteral("/usr/lib/postgresql"));
-
--#ifdef POSTGRES_PATH
-- const QString dir(QStringLiteral(POSTGRES_PATH));
-- if (QDir(dir).exists()) {
-- postgresSearchPath << QStringLiteral(POSTGRES_PATH);
-- }
--#endif
-- postgresSearchPath << QStringLiteral("/usr/bin")
-- << QStringLiteral("/usr/sbin")
-- << QStringLiteral("/usr/local/sbin");
-- // Locale all versions in /usr/lib/postgresql (i.e. /usr/lib/postgresql/X.Y) in reversed
-- // sorted order, so we search from the newest one to the oldest.
-- QStringList postgresVersionedSearchPaths;
-- QDir versionedDir(QStringLiteral("/usr/lib/postgresql"));
-- if (versionedDir.exists()) {
-- const auto versionedDirs = versionedDir.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name | QDir::Reversed);
-- for (const auto &path : versionedDirs) {
-- // Don't break once PostgreSQL 10 is released, but something more future-proof will be needed
-- if (path.fileName().startsWith(QLatin1String("10."))) {
-- postgresVersionedSearchPaths.prepend(path.absoluteFilePath() + QStringLiteral("/bin"));
-- } else {
-- postgresVersionedSearchPaths.append(path.absoluteFilePath() + QStringLiteral("/bin"));
-- }
-- }
-- }
-- postgresSearchPath.append(postgresVersionedSearchPaths);
-- defaultServerPath = QStandardPaths::findExecutable(QStringLiteral("pg_ctl"), postgresSearchPath);
-- defaultInitDbPath = QStandardPaths::findExecutable(QStringLiteral("initdb"), postgresSearchPath);
+- defaultServerPath = QStandardPaths::findExecutable(QStringLiteral("pg_ctl"), paths);
+- defaultInitDbPath = QStandardPaths::findExecutable(QStringLiteral("initdb"), paths);
+ defaultInitDbPath = QLatin1String(NIXPKGS_POSTGRES_INITDB);
defaultHostName = Utils::preferredSocketDirectory(StandardDirs::saveDir("data", QStringLiteral("db_misc")));
+- defaultPgUpgradePath = QStandardPaths::findExecutable(QStringLiteral("pg_upgrade"), paths);
defaultPgData = StandardDirs::saveDir("data", QStringLiteral("db_data"));
}
-@@ -118,10 +89,7 @@ bool DbConfigPostgresql::init(QSettings &settings)
+
+@@ -177,20 +171,14 @@ bool DbConfigPostgresql::init(QSettings
mUserName = settings.value(QStringLiteral("User")).toString();
mPassword = settings.value(QStringLiteral("Password")).toString();
mConnectionOptions = settings.value(QStringLiteral("Options"), defaultOptions).toString();
@@ -172,7 +151,18 @@ index 6b50ae50e..f94a8c5eb 100644
qCDebug(AKONADISERVER_LOG) << "Found pg_ctl:" << mServerPath;
mInitDbPath = settings.value(QStringLiteral("InitDbPath"), defaultInitDbPath).toString();
if (mInternalServer && mInitDbPath.isEmpty()) {
-@@ -142,7 +110,6 @@ bool DbConfigPostgresql::init(QSettings &settings)
+ mInitDbPath = defaultInitDbPath;
+ }
+ qCDebug(AKONADISERVER_LOG) << "Found initdb:" << mServerPath;
+- mPgUpgradePath = settings.value(QStringLiteral("UpgradePath"), defaultPgUpgradePath).toString();
+- if (mInternalServer && mPgUpgradePath.isEmpty()) {
+- mPgUpgradePath = defaultPgUpgradePath;
+- }
++ mPgUpgradePath = QLatin1String(NIXPKGS_POSTGRES_PG_UPGRADE);
+ qCDebug(AKONADISERVER_LOG) << "Found pg_upgrade:" << mPgUpgradePath;
+ mPgData = settings.value(QStringLiteral("PgData"), defaultPgData).toString();
+ if (mPgData.isEmpty()) {
+@@ -206,7 +194,6 @@ bool DbConfigPostgresql::init(QSettings
settings.setValue(QStringLiteral("Port"), mHostPort);
}
settings.setValue(QStringLiteral("Options"), mConnectionOptions);
@@ -180,6 +170,3 @@ index 6b50ae50e..f94a8c5eb 100644
settings.setValue(QStringLiteral("InitDbPath"), mInitDbPath);
settings.setValue(QStringLiteral("StartServer"), mInternalServer);
settings.endGroup();
---
-2.18.1
-
diff --git a/pkgs/applications/kde/akonadi/akonadi-timestamps.patch b/pkgs/applications/kde/akonadi/akonadi-timestamps.patch
index 25a835f5ba24..e299a6991f05 100644
--- a/pkgs/applications/kde/akonadi/akonadi-timestamps.patch
+++ b/pkgs/applications/kde/akonadi/akonadi-timestamps.patch
@@ -1,8 +1,8 @@
-Index: akonadi-17.04.0/src/server/storage/dbconfigmysql.cpp
+Index: akonadi-19.08.0/src/server/storage/dbconfigmysql.cpp
===================================================================
---- akonadi-17.04.0.orig/src/server/storage/dbconfigmysql.cpp
-+++ akonadi-17.04.0/src/server/storage/dbconfigmysql.cpp
-@@ -229,8 +229,7 @@ bool DbConfigMysql::startInternalServer(
+--- akonadi-19.08.0.orig/src/server/storage/dbconfigmysql.cpp
++++ akonadi-19.08.0/src/server/storage/dbconfigmysql.cpp
+@@ -235,8 +235,7 @@ bool DbConfigMysql::startInternalServer(
bool confUpdate = false;
QFile actualFile(actualConfig);
// update conf only if either global (or local) is newer than actual
diff --git a/pkgs/applications/kde/akonadi/default.nix b/pkgs/applications/kde/akonadi/default.nix
index cba0b1e59e3a..b9a96394a674 100644
--- a/pkgs/applications/kde/akonadi/default.nix
+++ b/pkgs/applications/kde/akonadi/default.nix
@@ -25,6 +25,7 @@ mkDerivation {
''-DNIXPKGS_MYSQL_MYSQL_INSTALL_DB=\"${lib.getBin mysql}/bin/mysql_install_db\"''
''-DNIXPKGS_MYSQL_MYSQLCHECK=\"${lib.getBin mysql}/bin/mysqlcheck\"''
''-DNIXPKGS_POSTGRES_PG_CTL=\"\"''
+ ''-DNIXPKGS_POSTGRES_PG_UPGRADE=\"\"''
''-DNIXPKGS_POSTGRES_INITDB=\"\"''
];
preConfigure = ''
diff --git a/pkgs/applications/kde/default.nix b/pkgs/applications/kde/default.nix
index 01df2bd26316..70a716a760c6 100644
--- a/pkgs/applications/kde/default.nix
+++ b/pkgs/applications/kde/default.nix
@@ -38,7 +38,7 @@ let
let
inherit (args) name;
sname = args.sname or name;
- inherit (srcs."${sname}") src version;
+ inherit (srcs.${sname}) src version;
mkDerivation =
libsForQt5.callPackage ({ mkDerivation }: mkDerivation) {};
in
@@ -60,7 +60,7 @@ let
inherit mkDerivation;
# Team of maintainers assigned to the KDE PIM suite
- kdepimTeam = with lib.maintainers; [ ttuegel vandenoever ];
+ kdepimTeam = with lib.maintainers; [ ttuegel vandenoever nyanloutre ];
};
in {
akonadi = callPackage ./akonadi {};
@@ -116,6 +116,7 @@ let
kidentitymanagement = callPackage ./kidentitymanagement.nix {};
kig = callPackage ./kig.nix {};
kimap = callPackage ./kimap.nix {};
+ kipi-plugins = callPackage ./kipi-plugins.nix {};
kitinerary = callPackage ./kitinerary.nix {};
kio-extras = callPackage ./kio-extras.nix {};
kldap = callPackage ./kldap.nix {};
@@ -128,6 +129,7 @@ let
kmix = callPackage ./kmix.nix {};
kmplot = callPackage ./kmplot.nix {};
knotes = callPackage ./knotes.nix {};
+ kolf = callPackage ./kolf.nix {};
kolourpaint = callPackage ./kolourpaint.nix {};
kompare = callPackage ./kompare.nix {};
konsole = callPackage ./konsole.nix {};
@@ -170,7 +172,9 @@ let
pim-data-exporter = callPackage ./pim-data-exporter.nix {};
pim-sieve-editor = callPackage ./pim-sieve-editor.nix {};
print-manager = callPackage ./print-manager.nix {};
+ rocs = callPackage ./rocs.nix {};
spectacle = callPackage ./spectacle.nix {};
+ yakuake = callPackage ./yakuake.nix {};
# Okteta was removed from kde applications and will now be released independently
# Lets keep an alias for compatibility reasons
inherit okteta;
diff --git a/pkgs/applications/kde/dolphin.nix b/pkgs/applications/kde/dolphin.nix
index 241bb71983a0..76d4e989e8c3 100644
--- a/pkgs/applications/kde/dolphin.nix
+++ b/pkgs/applications/kde/dolphin.nix
@@ -15,6 +15,7 @@ mkDerivation {
maintainers = [ lib.maintainers.ttuegel ];
};
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
+ propagatedUserEnvPkgs = [ baloo ];
propagatedBuildInputs = [
baloo baloo-widgets kactivities kbookmarks kcmutils kcompletion kconfig
kcoreaddons kdelibs4support kdbusaddons kfilemetadata ki18n kiconthemes
diff --git a/pkgs/applications/kde/fetch.sh b/pkgs/applications/kde/fetch.sh
index bd96cb966933..083debb1c99d 100644
--- a/pkgs/applications/kde/fetch.sh
+++ b/pkgs/applications/kde/fetch.sh
@@ -1 +1 @@
-WGET_ARGS=( https://download.kde.org/stable/applications/19.04.1/ )
+WGET_ARGS=( https://download.kde.org/stable/applications/19.08.2/ )
diff --git a/pkgs/applications/kde/gwenview.nix b/pkgs/applications/kde/gwenview.nix
index ceb928acdf2f..3d03d1dea3e7 100644
--- a/pkgs/applications/kde/gwenview.nix
+++ b/pkgs/applications/kde/gwenview.nix
@@ -3,7 +3,7 @@
extra-cmake-modules, kdoctools,
exiv2, lcms2,
baloo, kactivities, kdelibs4support, kio, kipi-plugins, libkdcraw, libkipi,
- phonon, qtimageformats, qtsvg, qtx11extras, kinit, fetchpatch
+ phonon, qtimageformats, qtsvg, qtx11extras, kinit
}:
mkDerivation {
@@ -18,12 +18,4 @@ mkDerivation {
qtimageformats qtsvg qtx11extras
];
propagatedUserEnvPkgs = [ kipi-plugins libkipi (lib.getBin kinit) ];
-
- # Fixes build with exiv2-0.27.1. Drop in 19.04.2
- patches = [
- (fetchpatch {
- url = "https://github.com/KDE/gwenview/commit/172560b845460b6121154f88221c855542219943.patch";
- sha256 = "0y1l34h2s7rhfknvg6ggcc389jfzhpq69wf0s3xd5ccwfw7c0ycq";
- })
- ];
}
diff --git a/pkgs/applications/kde/kate.nix b/pkgs/applications/kde/kate.nix
index e6b4f6b6bdd4..f01a57a55d4d 100644
--- a/pkgs/applications/kde/kate.nix
+++ b/pkgs/applications/kde/kate.nix
@@ -13,9 +13,10 @@ mkDerivation {
license = with lib.licenses; [ gpl3 lgpl3 lgpl2 ];
maintainers = [ lib.maintainers.ttuegel ];
};
+
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
- buildInputs = [ libgit2 ];
- propagatedBuildInputs = [
+ buildInputs = [
+ libgit2
kactivities ki18n kio ktexteditor kwindowsystem plasma-framework
qtscript kconfig kcrash kguiaddons kiconthemes kinit kjobwidgets kparts
kxmlgui kdbusaddons kwallet kitemmodels knotifications threadweaver
diff --git a/pkgs/applications/kde/kcalc.nix b/pkgs/applications/kde/kcalc.nix
index 3cb89cb4daa6..4e2a308b17f5 100644
--- a/pkgs/applications/kde/kcalc.nix
+++ b/pkgs/applications/kde/kcalc.nix
@@ -2,7 +2,7 @@
mkDerivation, lib,
extra-cmake-modules, kdoctools,
gmp, kconfig, kconfigwidgets, kcrash, kguiaddons, ki18n, kinit,
- knotifications, kxmlgui,
+ knotifications, kxmlgui, mpfr,
}:
mkDerivation {
@@ -14,6 +14,6 @@ mkDerivation {
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
buildInputs = [
gmp kconfig kconfigwidgets kcrash kguiaddons ki18n kinit knotifications
- kxmlgui
+ kxmlgui mpfr
];
}
diff --git a/pkgs/applications/kde/kdenlive.nix b/pkgs/applications/kde/kdenlive.nix
index a42210e6e403..b7c691e9594b 100644
--- a/pkgs/applications/kde/kdenlive.nix
+++ b/pkgs/applications/kde/kdenlive.nix
@@ -1,6 +1,8 @@
{ mkDerivation
, lib
, extra-cmake-modules
+, breeze-icons
+, breeze-qt5
, kdoctools
, kconfig
, kcrash
@@ -19,7 +21,8 @@
, shared-mime-info
, libv4l
, kfilemetadata
-, ffmpeg
+, ffmpeg-full
+, frei0r
, phonon-backend-gstreamer
, qtdeclarative
, qtquickcontrols
@@ -37,6 +40,8 @@ mkDerivation {
kdoctools
];
buildInputs = [
+ breeze-icons
+ breeze-qt5
kconfig
kcrash
kdbusaddons
@@ -59,15 +64,19 @@ mkDerivation {
qtwebkit
shared-mime-info
libv4l
- ffmpeg
+ ffmpeg-full
+ frei0r
rttr
kpurpose
kdeclarative
];
+ patches = [ ./mlt-path.patch ];
+ inherit mlt;
postPatch =
# Module Qt5::Concurrent must be included in `find_package` before it is used.
''
sed -i CMakeLists.txt -e '/find_package(Qt5 REQUIRED/ s|)| Concurrent)|'
+ substituteAllInPlace src/kdenlivesettings.kcfg
'';
meta = {
license = with lib.licenses; [ gpl2Plus ];
diff --git a/pkgs/applications/kde/kdepim-addons.nix b/pkgs/applications/kde/kdepim-addons.nix
index 75c1bf5be8bf..0fe33ea017da 100644
--- a/pkgs/applications/kde/kdepim-addons.nix
+++ b/pkgs/applications/kde/kdepim-addons.nix
@@ -5,7 +5,7 @@
incidenceeditor, kcalcore, kcalutils, kconfig, kdbusaddons, kdeclarative,
kdepim-apps-libs, kholidays, ki18n, kmime, ktexteditor, ktnef, libgravatar,
libksieve, mailcommon, mailimporter, messagelib, poppler, prison, kpkpass,
- kitinerary
+ kitinerary, kontactinterface
}:
mkDerivation {
@@ -20,6 +20,6 @@ mkDerivation {
incidenceeditor kcalcore kcalutils kconfig kdbusaddons kdeclarative
kdepim-apps-libs kholidays ki18n kmime ktexteditor ktnef libgravatar
libksieve mailcommon mailimporter messagelib poppler prison kpkpass
- kitinerary
+ kitinerary kontactinterface
];
}
diff --git a/pkgs/applications/kde/kipi-plugins.nix b/pkgs/applications/kde/kipi-plugins.nix
new file mode 100644
index 000000000000..5fb953acbd62
--- /dev/null
+++ b/pkgs/applications/kde/kipi-plugins.nix
@@ -0,0 +1,23 @@
+{
+ mkDerivation, lib,
+ extra-cmake-modules,
+ karchive, kconfig, ki18n, kiconthemes, kio, kservice, kwindowsystem, kxmlgui,
+ libkipi, qtbase, qtsvg, qtxmlpatterns
+}:
+
+mkDerivation {
+ name = "kipi-plugins";
+
+ nativeBuildInputs = [ extra-cmake-modules ];
+ buildInputs = [
+ karchive kconfig ki18n kiconthemes kio kservice kwindowsystem kxmlgui libkipi
+ qtbase qtsvg qtxmlpatterns
+ ];
+
+ meta = {
+ description = "Plugins for KDE-based image applications";
+ license = lib.licenses.gpl2;
+ homepage = https://cgit.kde.org/kipi-plugins.git;
+ maintainers = with lib.maintainers; [ ttuegel ];
+ };
+}
diff --git a/pkgs/applications/kde/kmail.nix b/pkgs/applications/kde/kmail.nix
index a58b3b8c45d8..ab24f15a14bc 100644
--- a/pkgs/applications/kde/kmail.nix
+++ b/pkgs/applications/kde/kmail.nix
@@ -7,7 +7,7 @@
kmail-account-wizard, kmailtransport, knotifications, knotifyconfig,
kontactinterface, kparts, kpty, kservice, ktextwidgets, ktnef, kwallet,
kwidgetsaddons, kwindowsystem, kxmlgui, libgravatar, libksieve, mailcommon,
- messagelib, pim-sieve-editor, qtscript, qtwebengine,
+ messagelib, pim-sieve-editor, qtscript, qtwebengine, akonadi
}:
mkDerivation {
@@ -25,6 +25,6 @@ mkDerivation {
ktextwidgets ktnef kwidgetsaddons kwindowsystem kxmlgui libgravatar
libksieve mailcommon messagelib pim-sieve-editor qtscript qtwebengine
];
- propagatedUserEnvPkgs = [ kdepim-runtime kwallet ];
+ propagatedUserEnvPkgs = [ kdepim-runtime kwallet akonadi ];
patches = [ ./kmail.patch ];
}
diff --git a/pkgs/applications/kde/kolf.nix b/pkgs/applications/kde/kolf.nix
new file mode 100644
index 000000000000..f9fa31b665b2
--- /dev/null
+++ b/pkgs/applications/kde/kolf.nix
@@ -0,0 +1,16 @@
+{ lib
+, mkDerivation
+, extra-cmake-modules
+, kdoctools
+, libkdegames, kconfig, kio, ktextwidgets
+}:
+
+mkDerivation {
+ name = "kolf";
+ nativeBuildInputs = [ extra-cmake-modules kdoctools ];
+ buildInputs = [ libkdegames kio ktextwidgets ];
+ meta = {
+ license = with lib.licenses; [ gpl2 ];
+ maintainers = with lib.maintainers; [ peterhoeg ];
+ };
+}
diff --git a/pkgs/applications/kde/konsole.nix b/pkgs/applications/kde/konsole.nix
index 004fc1c37ae2..1be5b0b4a894 100644
--- a/pkgs/applications/kde/konsole.nix
+++ b/pkgs/applications/kde/konsole.nix
@@ -1,5 +1,5 @@
{
- mkDerivation, lib, makeWrapper,
+ mkDerivation, lib,
extra-cmake-modules, kdoctools,
kbookmarks, kcompletion, kconfig, kconfigwidgets, kcoreaddons, kguiaddons,
ki18n, kiconthemes, kinit, kdelibs4support, kio, knotifications,
@@ -18,12 +18,7 @@ mkDerivation {
kbookmarks kcompletion kconfig kconfigwidgets kcoreaddons kdelibs4support
kguiaddons ki18n kiconthemes kinit kio knotifications knotifyconfig kparts kpty
kservice ktextwidgets kwidgetsaddons kwindowsystem kxmlgui qtscript knewstuff
- makeWrapper
];
- postInstall = ''
- wrapProgram $out/bin/konsole --prefix XDG_DATA_DIRS ":" $out/share
- '';
-
propagatedUserEnvPkgs = [ (lib.getBin kinit) ];
}
diff --git a/pkgs/applications/kde/ktouch.nix b/pkgs/applications/kde/ktouch.nix
index 64179f2e64dc..7e300ea7157e 100644
--- a/pkgs/applications/kde/ktouch.nix
+++ b/pkgs/applications/kde/ktouch.nix
@@ -3,7 +3,8 @@
, kconfig, kconfigwidgets, kcoreaddons, kdeclarative, ki18n
, kitemviews, kcmutils, kio, knewstuff, ktexteditor, kwidgetsaddons
, kwindowsystem, kxmlgui, qtscript, qtdeclarative, kqtquickcharts
-, qtx11extras, qtgraphicaleffects, qtxmlpatterns, xorg
+, qtx11extras, qtgraphicaleffects, qtxmlpatterns, qtquickcontrols2
+, xorg
}:
@@ -19,7 +20,7 @@
kconfig kconfigwidgets kcoreaddons kdeclarative ki18n
kitemviews kcmutils kio knewstuff ktexteditor kwidgetsaddons
kwindowsystem kxmlgui qtscript qtdeclarative kqtquickcharts
- qtx11extras qtgraphicaleffects qtxmlpatterns
+ qtx11extras qtgraphicaleffects qtxmlpatterns qtquickcontrols2
xorg.libxkbfile xorg.libxcb
];
diff --git a/pkgs/applications/kde/mlt-path.patch b/pkgs/applications/kde/mlt-path.patch
new file mode 100644
index 000000000000..9bfb66c1a839
--- /dev/null
+++ b/pkgs/applications/kde/mlt-path.patch
@@ -0,0 +1,22 @@
+diff -ruN old/src/kdenlivesettings.kcfg new/src/kdenlivesettings.kcfg
+--- old/src/kdenlivesettings.kcfg 2019-09-10 23:20:27.555392353 -0400
++++ new/src/kdenlivesettings.kcfg 2019-09-10 23:25:47.533964155 -0400
+@@ -378,14 +378,14 @@
+
+
+
+-
++
+
+-
++ @mlt@/share/mlt/profiles
+
+
+-
++
+
+-
++ @mlt@/bin/melt
+
+
+
diff --git a/pkgs/applications/kde/pim-data-exporter.nix b/pkgs/applications/kde/pim-data-exporter.nix
index d17ffb3c0444..9f2117b41fb4 100644
--- a/pkgs/applications/kde/pim-data-exporter.nix
+++ b/pkgs/applications/kde/pim-data-exporter.nix
@@ -1,10 +1,10 @@
{
mkDerivation, lib, kdepimTeam,
extra-cmake-modules, kdoctools,
- akonadi, kcmutils, kcrash, kdbusaddons, kidentitymanagement, kldap,
- kmailtransport, knewstuff, knotifications, knotifyconfig, kparts, kross, ktexteditor,
- kwallet, libkdepim, libkleo, pimcommon, qttools,
- karchive, mailcommon, messagelib
+ akonadi, akonadi-notes, kcalcore, kcmutils, kcrash, kdbusaddons,
+ kidentitymanagement, kldap, kmailtransport, knewstuff, knotifications,
+ knotifyconfig, kparts, kross, ktexteditor, kwallet, libkdepim, libkleo,
+ pimcommon, qttools, karchive, mailcommon, messagelib
}:
mkDerivation {
@@ -15,8 +15,9 @@ mkDerivation {
};
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
buildInputs = [
- akonadi kcmutils kcrash kdbusaddons kidentitymanagement kldap kmailtransport
- knewstuff knotifications knotifyconfig kparts kross ktexteditor kwallet libkdepim
- libkleo pimcommon qttools karchive mailcommon messagelib
+ akonadi akonadi-notes kcalcore kcmutils kcrash kdbusaddons
+ kidentitymanagement kldap kmailtransport knewstuff knotifications
+ knotifyconfig kparts kross ktexteditor kwallet libkdepim libkleo pimcommon
+ qttools karchive mailcommon messagelib
];
}
diff --git a/pkgs/applications/kde/pimcommon.nix b/pkgs/applications/kde/pimcommon.nix
index bbbcca13d980..cd9ff2528fac 100644
--- a/pkgs/applications/kde/pimcommon.nix
+++ b/pkgs/applications/kde/pimcommon.nix
@@ -4,7 +4,7 @@
akonadi, akonadi-contacts, akonadi-mime, grantlee, karchive, kcodecs,
kcompletion, kconfig, kconfigwidgets, kcontacts, kdbusaddons,
kiconthemes, kimap, kio, kitemmodels, kjobwidgets, knewstuff, kpimtextedit,
- kwallet, kwindowsystem, libkdepim, qtwebengine
+ kpurpose, kwallet, kwindowsystem, libkdepim, qtwebengine
}:
mkDerivation {
@@ -17,7 +17,7 @@ mkDerivation {
buildInputs = [
akonadi-mime grantlee karchive kcodecs kcompletion kconfigwidgets
kdbusaddons kiconthemes kio kitemmodels kjobwidgets knewstuff kpimtextedit
- kwallet kwindowsystem libkdepim qtwebengine
+ kpurpose kwallet kwindowsystem libkdepim qtwebengine
];
propagatedBuildInputs = [
akonadi akonadi-contacts kconfig kcontacts kimap
diff --git a/pkgs/applications/kde/rocs.nix b/pkgs/applications/kde/rocs.nix
new file mode 100644
index 000000000000..feae7ca81dec
--- /dev/null
+++ b/pkgs/applications/kde/rocs.nix
@@ -0,0 +1,25 @@
+{
+ mkDerivation, lib,
+ extra-cmake-modules, boost,
+ qtbase, qtscript, qtquickcontrols, qtwebkit, qtxmlpatterns, grantlee,
+ kdoctools, karchive, kxmlgui, kcrash, kdeclarative, ktexteditor, kguiaddons
+}:
+
+mkDerivation {
+ name = "rocs";
+
+ meta = with lib; {
+ homepage = "https://edu.kde.org/rocs/";
+ description = "A graph theory IDE.";
+ license = with licenses; [ gpl2 lgpl21 fdl12 ];
+ platforms = lib.platforms.linux;
+ maintainers = with maintainers; [ knairda ];
+ };
+
+ nativeBuildInputs = [ extra-cmake-modules kdoctools ];
+ buildInputs = [
+ boost
+ qtbase qtscript qtquickcontrols qtwebkit qtxmlpatterns grantlee
+ kxmlgui kcrash kdeclarative karchive ktexteditor kguiaddons
+ ];
+}
diff --git a/pkgs/applications/kde/spectacle.nix b/pkgs/applications/kde/spectacle.nix
index 58eb288f6cc2..2d46b3cdaab3 100644
--- a/pkgs/applications/kde/spectacle.nix
+++ b/pkgs/applications/kde/spectacle.nix
@@ -4,7 +4,7 @@
ki18n, xcb-util-cursor,
kconfig, kcoreaddons, kdbusaddons, kdeclarative, kio, kipi-plugins,
knotifications, kscreen, kwidgetsaddons, kwindowsystem, kxmlgui, libkipi,
- qtx11extras, knewstuff, qttools
+ qtx11extras, knewstuff, kwayland, qttools
}:
mkDerivation {
@@ -14,7 +14,7 @@ mkDerivation {
buildInputs = [
kconfig kcoreaddons kdbusaddons kdeclarative ki18n kio knotifications
kscreen kwidgetsaddons kwindowsystem kxmlgui libkipi qtx11extras xcb-util-cursor
- knewstuff
+ knewstuff kwayland
];
postPatch = ''
substituteInPlace desktop/org.kde.spectacle.desktop \
diff --git a/pkgs/applications/kde/srcs.nix b/pkgs/applications/kde/srcs.nix
index 43deb08c39f5..400dfcd7cec1 100644
--- a/pkgs/applications/kde/srcs.nix
+++ b/pkgs/applications/kde/srcs.nix
@@ -3,1723 +3,1739 @@
{
akonadi = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/akonadi-19.04.1.tar.xz";
- sha256 = "b157c4199e3b913c4f684f56ed9d76bef67b3c120c319c88ae24bded6fc927bc";
- name = "akonadi-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/akonadi-19.08.2.tar.xz";
+ sha256 = "f67f0fac07d480739b2d6715862ee47a93fd38f057ac7ef888ed8ddfdc99934f";
+ name = "akonadi-19.08.2.tar.xz";
};
};
akonadi-calendar = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/akonadi-calendar-19.04.1.tar.xz";
- sha256 = "6ef352dc20998416b8d379b085edfcfba5bcf6a5f448e11a4e51aca6b3241e48";
- name = "akonadi-calendar-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/akonadi-calendar-19.08.2.tar.xz";
+ sha256 = "5beba24af485c8dae96944e4b5bd570460eb2868ba069580c2e5d784be38a3c8";
+ name = "akonadi-calendar-19.08.2.tar.xz";
};
};
akonadi-calendar-tools = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/akonadi-calendar-tools-19.04.1.tar.xz";
- sha256 = "6a8eb905d0e5a1602ce59d5cf28322d844dc178c4daf98db1cf9e0c95eeb3531";
- name = "akonadi-calendar-tools-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/akonadi-calendar-tools-19.08.2.tar.xz";
+ sha256 = "a352c2bf8659ad7939f31009b8e35e8b1e629162f681a70999e5e88f9aaf6cbb";
+ name = "akonadi-calendar-tools-19.08.2.tar.xz";
};
};
akonadiconsole = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/akonadiconsole-19.04.1.tar.xz";
- sha256 = "33846348b0308eaf4ca81e8d577ce0eb6c17d49632e034607506413e86531262";
- name = "akonadiconsole-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/akonadiconsole-19.08.2.tar.xz";
+ sha256 = "273b8f3d56ea65bd71a51103867b0e718d883478432bb971a262df1ea4c6df6c";
+ name = "akonadiconsole-19.08.2.tar.xz";
};
};
akonadi-contacts = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/akonadi-contacts-19.04.1.tar.xz";
- sha256 = "4c58a73db7924250e47fb030657dc768fe44405806ec2d94ee00a264b414febc";
- name = "akonadi-contacts-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/akonadi-contacts-19.08.2.tar.xz";
+ sha256 = "eafeb550faea91a56109821864eedfbd619dc7850887746d31c1724ea7561920";
+ name = "akonadi-contacts-19.08.2.tar.xz";
};
};
akonadi-import-wizard = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/akonadi-import-wizard-19.04.1.tar.xz";
- sha256 = "2699ca57ea6a04228875dd795255fd32a1120e2e5c4834290aea3270c43403e7";
- name = "akonadi-import-wizard-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/akonadi-import-wizard-19.08.2.tar.xz";
+ sha256 = "038713e7d30686eb1b8e49c595ec853ffa52d335e435a5b0bdf2f2a2448cae45";
+ name = "akonadi-import-wizard-19.08.2.tar.xz";
};
};
akonadi-mime = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/akonadi-mime-19.04.1.tar.xz";
- sha256 = "4572aa7c953cc641a98ae3c2685dcdf259d621dcbbab1ccb7d11e2748c67b1a8";
- name = "akonadi-mime-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/akonadi-mime-19.08.2.tar.xz";
+ sha256 = "16f8034d7990828c50a85474fe16641dfa46e22d00f49d8045d3483c61815264";
+ name = "akonadi-mime-19.08.2.tar.xz";
};
};
akonadi-notes = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/akonadi-notes-19.04.1.tar.xz";
- sha256 = "e503101e8806485ecf6ef22d1bafd8c299676ca75a388499e5418b8641604277";
- name = "akonadi-notes-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/akonadi-notes-19.08.2.tar.xz";
+ sha256 = "64684c50d06664d8ccda098f8bfa536e861e4938c8f27688ef97653f7788fdde";
+ name = "akonadi-notes-19.08.2.tar.xz";
};
};
akonadi-search = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/akonadi-search-19.04.1.tar.xz";
- sha256 = "8438876407e9fd8fa08afe6942ab8dd3677202bc2ff1eba4fd7a49dd926f26d6";
- name = "akonadi-search-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/akonadi-search-19.08.2.tar.xz";
+ sha256 = "75c9713b84a03c60a68ff36652decbf57f4f56a0fb39579f53e7ed80a5ee8525";
+ name = "akonadi-search-19.08.2.tar.xz";
};
};
akregator = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/akregator-19.04.1.tar.xz";
- sha256 = "b2e731a3eac0a68865a90b71f17307c3aea8db304bf6663b551bc95907a490f1";
- name = "akregator-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/akregator-19.08.2.tar.xz";
+ sha256 = "cefc0785f40508a80fbf4534eef4d1164e349cfd50455483cef044945d1888c4";
+ name = "akregator-19.08.2.tar.xz";
};
};
analitza = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/analitza-19.04.1.tar.xz";
- sha256 = "b96da492805a48faff72e93e1b8b211c468b041fe217489eb097d554773d3381";
- name = "analitza-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/analitza-19.08.2.tar.xz";
+ sha256 = "cbd51fd14d5ba74a7a3590ddca18ed688cbf724cd40f21c87b905f12fadf9399";
+ name = "analitza-19.08.2.tar.xz";
};
};
ark = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/ark-19.04.1.tar.xz";
- sha256 = "6d348b2b9566ce0b8a1ba1b56d0a8c5d434d4748c479c5a853fdcdecfec753e6";
- name = "ark-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/ark-19.08.2.tar.xz";
+ sha256 = "63fcec0a32d806cfc82fb1c136b5e037bfe75459b148ac08c00be7e45ac70c50";
+ name = "ark-19.08.2.tar.xz";
};
};
artikulate = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/artikulate-19.04.1.tar.xz";
- sha256 = "11a54ef7abf001bd3debcaf46bc60764af55a2dbda6320c3c220461374f74432";
- name = "artikulate-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/artikulate-19.08.2.tar.xz";
+ sha256 = "b2b0778f18f04096b84caf72c28dd4bdfdbbc8f0a22ef118b8d18dba19a3f85b";
+ name = "artikulate-19.08.2.tar.xz";
};
};
audiocd-kio = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/audiocd-kio-19.04.1.tar.xz";
- sha256 = "fad61ea586db7a4ce202fbb16854f69a20e8e16518dd60c27112447a904edb98";
- name = "audiocd-kio-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/audiocd-kio-19.08.2.tar.xz";
+ sha256 = "383c0e9055b0093661b589395288bb8d173372572490a4ba4960d214b2746b3a";
+ name = "audiocd-kio-19.08.2.tar.xz";
};
};
baloo-widgets = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/baloo-widgets-19.04.1.tar.xz";
- sha256 = "7f7f0b3ba1bbdb3a47cdfa85830295b4b91fa5ac6c87b41d1cf29c354d8a4cf6";
- name = "baloo-widgets-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/baloo-widgets-19.08.2.tar.xz";
+ sha256 = "529f3b587098eb9b7d1aaa8b311f98c58d16ed88384fa0900f9fb9f8e242c070";
+ name = "baloo-widgets-19.08.2.tar.xz";
};
};
blinken = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/blinken-19.04.1.tar.xz";
- sha256 = "87fbf14568692885e7a496a8dae0c4f53a2837d1a824f9c7cf1038a7e8c861ca";
- name = "blinken-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/blinken-19.08.2.tar.xz";
+ sha256 = "7f9d909bb845c365dbf49388b79687e7491c271dd7d2f9481a20397153a670f6";
+ name = "blinken-19.08.2.tar.xz";
};
};
bomber = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/bomber-19.04.1.tar.xz";
- sha256 = "1359ebcaab26acd2dfa738160f9dd7a86e5bfa3d3b2f8a86c656ee187ad6c3fe";
- name = "bomber-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/bomber-19.08.2.tar.xz";
+ sha256 = "26285fe9e510cd334bb933281c615c2971084bfa787618ba0190175c36ada741";
+ name = "bomber-19.08.2.tar.xz";
};
};
bovo = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/bovo-19.04.1.tar.xz";
- sha256 = "46b5286349ba7765b81edf92f834c3e8e5c0ecd65466deb5fa593477e76f0763";
- name = "bovo-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/bovo-19.08.2.tar.xz";
+ sha256 = "63f7a3860de2344be69366f636e841cd3db19743a8a29c42e14402256ed3122b";
+ name = "bovo-19.08.2.tar.xz";
};
};
calendarsupport = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/calendarsupport-19.04.1.tar.xz";
- sha256 = "9b44e868a24494c3ce595dc71e8981f97a8ce75dc4646e1417ebde973ee5f535";
- name = "calendarsupport-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/calendarsupport-19.08.2.tar.xz";
+ sha256 = "9ae448463ca60e075f1ea9a22489f0acf6ea672c00f9bd7b49027e548e82c2af";
+ name = "calendarsupport-19.08.2.tar.xz";
};
};
cantor = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/cantor-19.04.1.tar.xz";
- sha256 = "95ce049f38182f9c0f7fb749c0940c24a51cc88053d218148ac82e925d9dfbb1";
- name = "cantor-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/cantor-19.08.2.tar.xz";
+ sha256 = "039bb1e61b996ab3776502db9367ed1f7fb7e674292647f1b28f5bd9b1c1b9cb";
+ name = "cantor-19.08.2.tar.xz";
};
};
cervisia = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/cervisia-19.04.1.tar.xz";
- sha256 = "fe72361330b055922e4ae66edb2e6958897b7c443ab3066ab7bbef1b8fd9d41b";
- name = "cervisia-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/cervisia-19.08.2.tar.xz";
+ sha256 = "7cbff9d32e2721f6f594a84b42feef6dd76f830e2cc27c6d442d9b6ccbe7fceb";
+ name = "cervisia-19.08.2.tar.xz";
};
};
dolphin = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/dolphin-19.04.1.tar.xz";
- sha256 = "72cab4d9f49ac05d3e0e8e1ff67cf29c0cacbe2c3a43506eca4c849ea878370a";
- name = "dolphin-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/dolphin-19.08.2.tar.xz";
+ sha256 = "0c56515737fc0f96020b3c157a93023095d1a1e23637e7670e068c6c286bbc3b";
+ name = "dolphin-19.08.2.tar.xz";
};
};
dolphin-plugins = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/dolphin-plugins-19.04.1.tar.xz";
- sha256 = "dc528e93d3f7809b8480da5134ead3886205a172a85b25ffdd5720ec67892105";
- name = "dolphin-plugins-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/dolphin-plugins-19.08.2.tar.xz";
+ sha256 = "da2114bd8ed0a70fba3c3cba82a5543cce2f91af7e1dc12bc7457eeffc03099d";
+ name = "dolphin-plugins-19.08.2.tar.xz";
};
};
dragon = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/dragon-19.04.1.tar.xz";
- sha256 = "f8acfc09aeec180850345f8881f963c19a3956cd7e07e42463bbe95ff2227ab8";
- name = "dragon-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/dragon-19.08.2.tar.xz";
+ sha256 = "3924dba504f370415c0d68cb5079acfc941aa761e9d9d2df2ea48b302ef9ce61";
+ name = "dragon-19.08.2.tar.xz";
};
};
eventviews = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/eventviews-19.04.1.tar.xz";
- sha256 = "1fae8263d17a802393e5b1ece80879b66303f4d5bc8cc040cf142d6d5e8cc763";
- name = "eventviews-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/eventviews-19.08.2.tar.xz";
+ sha256 = "48da7f85c86bcc7a64d475c5bbcbb531471e70cfc9f4bda76030280f0671132d";
+ name = "eventviews-19.08.2.tar.xz";
};
};
ffmpegthumbs = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/ffmpegthumbs-19.04.1.tar.xz";
- sha256 = "76f912f09c01698ed020bce2109f7cb893a9ca3ca7c014b118c0f97b4b4982ae";
- name = "ffmpegthumbs-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/ffmpegthumbs-19.08.2.tar.xz";
+ sha256 = "deba57ff10525efdf404401f6b605c1be0f02ec0bfe00465e080b42dc379d570";
+ name = "ffmpegthumbs-19.08.2.tar.xz";
};
};
filelight = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/filelight-19.04.1.tar.xz";
- sha256 = "7595efbff5cbbe59b3fc4f6af69b9557107bc8661f38951577947503ac7883bd";
- name = "filelight-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/filelight-19.08.2.tar.xz";
+ sha256 = "313ff23fceb427509b37efa012535e651618d42bde35c62cdc7732e463c346a6";
+ name = "filelight-19.08.2.tar.xz";
};
};
granatier = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/granatier-19.04.1.tar.xz";
- sha256 = "372dd577805457425bb9c35b5f434089aa2bb7c1e6f54908b2be60d4dda2cb22";
- name = "granatier-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/granatier-19.08.2.tar.xz";
+ sha256 = "81a0c288edd0be6d7c994a8ad1469679b7e78174d641f9c4f90d31613bad4b47";
+ name = "granatier-19.08.2.tar.xz";
};
};
grantlee-editor = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/grantlee-editor-19.04.1.tar.xz";
- sha256 = "b07f3c3179010b1d9a9170bc6e2b85517c3dfbd277336316882f4503823e076a";
- name = "grantlee-editor-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/grantlee-editor-19.08.2.tar.xz";
+ sha256 = "8e65ca3d949dcdd2b6c2edd582351b123eef49eb104a2dd6c027028315c2d502";
+ name = "grantlee-editor-19.08.2.tar.xz";
};
};
grantleetheme = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/grantleetheme-19.04.1.tar.xz";
- sha256 = "fdcf77c996123daea0559cc2ac4251b330e2c4388104ee95f814af770fc33d8b";
- name = "grantleetheme-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/grantleetheme-19.08.2.tar.xz";
+ sha256 = "a9d4e70089debdfaffb4af881cf2064ba68a0ad3fe007985c8e5997f0cf0e836";
+ name = "grantleetheme-19.08.2.tar.xz";
};
};
gwenview = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/gwenview-19.04.1.tar.xz";
- sha256 = "636498100284be86194d328c40ed70166cc96a5fc7665090e4a1ca9538b2f13c";
- name = "gwenview-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/gwenview-19.08.2.tar.xz";
+ sha256 = "fa49352a208c9472c911d3579f7601fb915831ad42caf74a053ed749bf5bb1fb";
+ name = "gwenview-19.08.2.tar.xz";
};
};
incidenceeditor = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/incidenceeditor-19.04.1.tar.xz";
- sha256 = "f0f5191e4246068fb941fde10df87b76b5ca1d6f491d864e4b7e4acacebcae58";
- name = "incidenceeditor-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/incidenceeditor-19.08.2.tar.xz";
+ sha256 = "f2f7bf3a12af21e6f9e4a5f2ba93346e06a6988366af7b452d6268ac9fb4fc3d";
+ name = "incidenceeditor-19.08.2.tar.xz";
};
};
juk = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/juk-19.04.1.tar.xz";
- sha256 = "f141c0e33eccd931438a1b1fe37810951ab177b3fe853d6dd387f28f59382e51";
- name = "juk-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/juk-19.08.2.tar.xz";
+ sha256 = "b3f0e006d6defa58e0724088a1c99c1c412bc5764f8d1bebadf31b5f331d51d3";
+ name = "juk-19.08.2.tar.xz";
};
};
k3b = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/k3b-19.04.1.tar.xz";
- sha256 = "8de611bec14deee5b5c2b340fa4b32d22a7df93a72b657979118b510396f0942";
- name = "k3b-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/k3b-19.08.2.tar.xz";
+ sha256 = "a16796a873018bc5fd9f562297fea56d3f6d32a1e903a3e145814ea7d9be5209";
+ name = "k3b-19.08.2.tar.xz";
};
};
kaccounts-integration = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kaccounts-integration-19.04.1.tar.xz";
- sha256 = "0e37dc9b7b1520ea16afc7209da3cbaab1d43c3909896eba2f0422fb23f15433";
- name = "kaccounts-integration-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kaccounts-integration-19.08.2.tar.xz";
+ sha256 = "b422c23eb3eefc3a79c4ccb9360ae6269a86982575e981bb949c0782f1f813ce";
+ name = "kaccounts-integration-19.08.2.tar.xz";
};
};
kaccounts-providers = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kaccounts-providers-19.04.1.tar.xz";
- sha256 = "006ccdc20738b8f77155e849b83987b9c9eeb50acf4e88d2fb948060c5f51011";
- name = "kaccounts-providers-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kaccounts-providers-19.08.2.tar.xz";
+ sha256 = "d5ad6882ff151d2f0cff2b76a83e38cf37c72a0dbdf4a0aff64420903266a309";
+ name = "kaccounts-providers-19.08.2.tar.xz";
};
};
kaddressbook = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kaddressbook-19.04.1.tar.xz";
- sha256 = "15e84e6785e20e4f48020c093555e6c28930fcd946aa3421c56956564eba84fd";
- name = "kaddressbook-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kaddressbook-19.08.2.tar.xz";
+ sha256 = "4d67480ebf8ee96fcde85e66f8ad32119b006e36c87f4e4ac20ecfa967599260";
+ name = "kaddressbook-19.08.2.tar.xz";
};
};
kajongg = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kajongg-19.04.1.tar.xz";
- sha256 = "5139ec428d4951b8e3dca8d30134002bc06b186c5c63c69831b3a98b49198475";
- name = "kajongg-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kajongg-19.08.2.tar.xz";
+ sha256 = "08c80ea5d44ee25812de9d9e95d7800cc84c1c02006f59eb08e54f2a0d4c756b";
+ name = "kajongg-19.08.2.tar.xz";
};
};
kalarm = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kalarm-19.04.1.tar.xz";
- sha256 = "e8a58584e765c1d98beb4b6bcac0ab835dcb1f1c1bab8cf1c01fa01a2a56bbfd";
- name = "kalarm-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kalarm-19.08.2.tar.xz";
+ sha256 = "54d61b469042d27b8df903c5fc95dd68c1d108218f1402a733d974ab02576d24";
+ name = "kalarm-19.08.2.tar.xz";
};
};
kalarmcal = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kalarmcal-19.04.1.tar.xz";
- sha256 = "69a265ad7e82034974a47c795b81ee8768873dcb76018dc794a9905365111646";
- name = "kalarmcal-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kalarmcal-19.08.2.tar.xz";
+ sha256 = "4dc6e1cd8a9cbf6e3f8e593e68ef6fa912819ece56efa64852ab33e3f582e6b7";
+ name = "kalarmcal-19.08.2.tar.xz";
};
};
kalgebra = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kalgebra-19.04.1.tar.xz";
- sha256 = "689d65f1a62623fc67d5de0a551aef03b241d85b105f31e91bd873d3b818c74f";
- name = "kalgebra-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kalgebra-19.08.2.tar.xz";
+ sha256 = "351a0df1bf637b14683d1a38d8f1eff0153596c5f93723f28f799aead6ee0757";
+ name = "kalgebra-19.08.2.tar.xz";
};
};
kalzium = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kalzium-19.04.1.tar.xz";
- sha256 = "80798b3dca98cdd5ae24bbe7f077ecbe8def6bb96ad02a66ff69cb5312a459f5";
- name = "kalzium-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kalzium-19.08.2.tar.xz";
+ sha256 = "e63d88526c86dd67ab133694dc23b6a35fd5514643bd7a7f1790db8c2a8490d9";
+ name = "kalzium-19.08.2.tar.xz";
};
};
kamera = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kamera-19.04.1.tar.xz";
- sha256 = "3d5f97ac4b454c1512762f4039003d5745372aafa4fda4f293bda885ee70984f";
- name = "kamera-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kamera-19.08.2.tar.xz";
+ sha256 = "2db474afa6201f330631640e04e1bd6ebb96838ce4c16d37617a10063b1fa757";
+ name = "kamera-19.08.2.tar.xz";
};
};
kamoso = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kamoso-19.04.1.tar.xz";
- sha256 = "72f31d26319aed86daf200db7cc0bbe1e6ad77d891b644001ffd4c992a68e796";
- name = "kamoso-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kamoso-19.08.2.tar.xz";
+ sha256 = "2b84b3b3fb7f423bbe69716114563f018e02d63ce7b9b85084d098123e4e29b8";
+ name = "kamoso-19.08.2.tar.xz";
};
};
kanagram = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kanagram-19.04.1.tar.xz";
- sha256 = "70b0f7b20f2ebd951e3a10097990f9232cd1e3e6c11441d93513d435a7cb7f38";
- name = "kanagram-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kanagram-19.08.2.tar.xz";
+ sha256 = "251d08a8b73e85af4b90ed429d873b17f56c1e094c4a62116eee3b6bffc96388";
+ name = "kanagram-19.08.2.tar.xz";
};
};
kapman = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kapman-19.04.1.tar.xz";
- sha256 = "7714a0cbd8e24f3ce46679d1f16d690c8bc62a988f0b3175095e0f0c23ce1400";
- name = "kapman-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kapman-19.08.2.tar.xz";
+ sha256 = "240d7b0c611728bd1974230227c669bdcfe80081cff2ddae6278d5393bab7a4e";
+ name = "kapman-19.08.2.tar.xz";
};
};
kapptemplate = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kapptemplate-19.04.1.tar.xz";
- sha256 = "5985705081aa94d282d173277e5717eede6f923eef4ed2d99182c46fbd1c9fd3";
- name = "kapptemplate-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kapptemplate-19.08.2.tar.xz";
+ sha256 = "2b719cf75bf8e9b495a8d9aa8288ddb528617c2e76bd1312cfdb2a43b27d6208";
+ name = "kapptemplate-19.08.2.tar.xz";
};
};
kate = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kate-19.04.1.tar.xz";
- sha256 = "af55513f00af1712a39631352e393dbd2f63ec6bd471831b44853a16d4bfbe8f";
- name = "kate-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kate-19.08.2.tar.xz";
+ sha256 = "9897f652996e3ebca8a749562cc2d609d704c80b08ec4716622def38f5980b47";
+ name = "kate-19.08.2.tar.xz";
};
};
katomic = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/katomic-19.04.1.tar.xz";
- sha256 = "2addfb86ec0043ab81046d64862e8fbeb3b4dd3b8d18f618ac8c39d995a05ce5";
- name = "katomic-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/katomic-19.08.2.tar.xz";
+ sha256 = "822963024107e122a3f53f55ae6863a10d92ca59eef5966cded6c9daf5f989b3";
+ name = "katomic-19.08.2.tar.xz";
};
};
kbackup = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kbackup-19.04.1.tar.xz";
- sha256 = "29bed4258ec218edf05702808d0cfbff757016b7f3a80eb99e18610ab398036f";
- name = "kbackup-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kbackup-19.08.2.tar.xz";
+ sha256 = "1678ac00c1930f430d620f542dc7913bf1575106654cc9d4b534aed65e023fb8";
+ name = "kbackup-19.08.2.tar.xz";
};
};
kblackbox = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kblackbox-19.04.1.tar.xz";
- sha256 = "9b5d57d0058c2458b7e24bd885d164cc1523d0c45827082e55af6ce669992431";
- name = "kblackbox-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kblackbox-19.08.2.tar.xz";
+ sha256 = "4ed8e2fe00e4d2ce0b194f85491f46ceaeec28114ff2dc667c0b112f8237a9ca";
+ name = "kblackbox-19.08.2.tar.xz";
};
};
kblocks = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kblocks-19.04.1.tar.xz";
- sha256 = "0ae62f1aa9aeaa58f6e5fd62d6281159ef8a2bbee28d84b9d7a2ab207ec95390";
- name = "kblocks-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kblocks-19.08.2.tar.xz";
+ sha256 = "8b52c949e2d446a4ccf81b09818fc90234f2f55d8722c385491ee67e1f2abf93";
+ name = "kblocks-19.08.2.tar.xz";
};
};
kblog = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kblog-19.04.1.tar.xz";
- sha256 = "6c162cd25a67c4fddbdc1063942fdfad1bbb239c714f205ae4f89585c2f65e93";
- name = "kblog-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kblog-19.08.2.tar.xz";
+ sha256 = "f4d9017d38746b9669efebf5b6cfdc5ebf1cbaf1bbf45ab331530ade3c21cbb5";
+ name = "kblog-19.08.2.tar.xz";
};
};
kbounce = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kbounce-19.04.1.tar.xz";
- sha256 = "729662f29e1b5b17b775bfa6895088cf3a7ee4ce3d4f2bc3db4f69ab0f07ca12";
- name = "kbounce-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kbounce-19.08.2.tar.xz";
+ sha256 = "8436ba58bb88360b08c2d220c1a92c924b15587769103f04881ac17583cc93c8";
+ name = "kbounce-19.08.2.tar.xz";
};
};
kbreakout = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kbreakout-19.04.1.tar.xz";
- sha256 = "9f40bb1c2d2e29a1098e371ffd0e97595d8e23cc7af2111fd143b67fac1393ad";
- name = "kbreakout-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kbreakout-19.08.2.tar.xz";
+ sha256 = "9550d3ee6f6d412816bd12686272c3f0f0b5b9194242f9b22e2085c39d9720a9";
+ name = "kbreakout-19.08.2.tar.xz";
};
};
kbruch = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kbruch-19.04.1.tar.xz";
- sha256 = "ab9033b6b8758803a87f046d05c9f6a5d247d1929bad147628cb6c2e5ba65b00";
- name = "kbruch-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kbruch-19.08.2.tar.xz";
+ sha256 = "a2cead23cab880b21769e41086505b50de659630860d056b6a8504caafd4dcf0";
+ name = "kbruch-19.08.2.tar.xz";
};
};
kcachegrind = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kcachegrind-19.04.1.tar.xz";
- sha256 = "4b862becaa415601dc33391814637d8f089f2e2732192111ec029beb89991ac2";
- name = "kcachegrind-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kcachegrind-19.08.2.tar.xz";
+ sha256 = "baf17a5c11f21deb7b019a7e3a9819348ec8d20af5c8c4a6108b96266e425b46";
+ name = "kcachegrind-19.08.2.tar.xz";
};
};
kcalc = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kcalc-19.04.1.tar.xz";
- sha256 = "46d992a9e746231b57398b9bcdbe3933f6601e3cee7e3932ccc2e312779a4c91";
- name = "kcalc-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kcalc-19.08.2.tar.xz";
+ sha256 = "94a6d004266813449b6b9efbe0e3b0da3e5368059134668277a344a720f65fd9";
+ name = "kcalc-19.08.2.tar.xz";
};
};
kcalcore = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kcalcore-19.04.1.tar.xz";
- sha256 = "d14bf2f8270c0072e415cf8fe87c0fb8eefad1b95a8713e184bba3e3ae6002f9";
- name = "kcalcore-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kcalcore-19.08.2.tar.xz";
+ sha256 = "f7d33ec65cf954a0460258694ecb2e14bf6c00cee5ea9fdc3e015e78947d896a";
+ name = "kcalcore-19.08.2.tar.xz";
};
};
kcalutils = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kcalutils-19.04.1.tar.xz";
- sha256 = "8856a1e812f81848f1e2adc179182349acfac9e189b55f29afeb020c148909ec";
- name = "kcalutils-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kcalutils-19.08.2.tar.xz";
+ sha256 = "3f789a18348152f9fc70965dbc2e9a8bd0ba872968c3d0631afacd0e78d3ce13";
+ name = "kcalutils-19.08.2.tar.xz";
};
};
kcharselect = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kcharselect-19.04.1.tar.xz";
- sha256 = "c54570a6f968b2ccbe42c0a8dbaecb1f263fbd392f67b2d735ade492553ff9ec";
- name = "kcharselect-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kcharselect-19.08.2.tar.xz";
+ sha256 = "ff2a8c78fc4a12dd727e8ad8677216d5a480a8c82aff97269397ee8ae01e36df";
+ name = "kcharselect-19.08.2.tar.xz";
};
};
kcolorchooser = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kcolorchooser-19.04.1.tar.xz";
- sha256 = "bfc2cdafd709d8829e19367151f59725152af2f4a80c583df671a9df1378e57a";
- name = "kcolorchooser-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kcolorchooser-19.08.2.tar.xz";
+ sha256 = "4eb50f314b190f1980e73212a45fe86db39f278f789288cd76cb0763f3176edc";
+ name = "kcolorchooser-19.08.2.tar.xz";
};
};
kcontacts = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kcontacts-19.04.1.tar.xz";
- sha256 = "1773a5ddcec46dbf72cef2bbcc8c3143a0ba18ce6fa462ba642011b36b9cc088";
- name = "kcontacts-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kcontacts-19.08.2.tar.xz";
+ sha256 = "0677177d6810047876a219445232c0bf91dc1cdba3cbe4133a0a7eda98c381e8";
+ name = "kcontacts-19.08.2.tar.xz";
};
};
kcron = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kcron-19.04.1.tar.xz";
- sha256 = "a58e8c99072e10a0b0a6acfecbbadef822c6f2818202bbaccdbee6b2a5b7e951";
- name = "kcron-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kcron-19.08.2.tar.xz";
+ sha256 = "270ee81cba5ef9d92158a3fc71cf8c50c658468018eb0415c9d3d0bc7abea5e5";
+ name = "kcron-19.08.2.tar.xz";
};
};
kdav = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kdav-19.04.1.tar.xz";
- sha256 = "356e59f904f075521df60499b7f84d7868dbb78968b04fd15be6d359c154e737";
- name = "kdav-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kdav-19.08.2.tar.xz";
+ sha256 = "8572a77ee3d0f8a7e09e4975fcf0420394c16e908c4a19aecc409415770595f9";
+ name = "kdav-19.08.2.tar.xz";
};
};
kdebugsettings = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kdebugsettings-19.04.1.tar.xz";
- sha256 = "f04334f954d48fbd5a7bf41327563081966fb31950c131a943cf0a1a86281aa2";
- name = "kdebugsettings-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kdebugsettings-19.08.2.tar.xz";
+ sha256 = "2823e53da647dec2bd780a3029c6b093917faad3db973147ef74eb8f1c1733df";
+ name = "kdebugsettings-19.08.2.tar.xz";
};
};
kde-dev-scripts = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kde-dev-scripts-19.04.1.tar.xz";
- sha256 = "aa039d08b0e151703b6be0571d254d3656589d0b8422214110c460bd1f2aa6c2";
- name = "kde-dev-scripts-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kde-dev-scripts-19.08.2.tar.xz";
+ sha256 = "9a47b048cec42eedcec05602eb84d4124a1f67d451c22095e688cb24f7057327";
+ name = "kde-dev-scripts-19.08.2.tar.xz";
};
};
kde-dev-utils = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kde-dev-utils-19.04.1.tar.xz";
- sha256 = "9bca818e44f80ece758c0430aebcaf56252bbdffed6c8f65d04ccb4d019f2d9b";
- name = "kde-dev-utils-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kde-dev-utils-19.08.2.tar.xz";
+ sha256 = "30bbcfa632cbf76a2b3a27f1044ff9708509921882b91a5623cc2a30d40acb32";
+ name = "kde-dev-utils-19.08.2.tar.xz";
};
};
kdeedu-data = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kdeedu-data-19.04.1.tar.xz";
- sha256 = "751ec4df18d4ec3e7498a279bb891d6eb9a835fd786c8dd77ee883c9b55a0c30";
- name = "kdeedu-data-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kdeedu-data-19.08.2.tar.xz";
+ sha256 = "0ead96a7a10ecbf98c88464f9987e7d8e2efdf7879782e5262b5cda694f3e343";
+ name = "kdeedu-data-19.08.2.tar.xz";
};
};
kdegraphics-mobipocket = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kdegraphics-mobipocket-19.04.1.tar.xz";
- sha256 = "345be42b0fb4f2040ce1430c872c0d20b0abaa266159a19beac1b067b2723821";
- name = "kdegraphics-mobipocket-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kdegraphics-mobipocket-19.08.2.tar.xz";
+ sha256 = "9621b0b3564ce7fcd6890c15c48e11d00c1cf2d3b408b255ec590bd6d113439f";
+ name = "kdegraphics-mobipocket-19.08.2.tar.xz";
};
};
kdegraphics-thumbnailers = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kdegraphics-thumbnailers-19.04.1.tar.xz";
- sha256 = "e82515177c1c465c1d499095ff51d71caf286505a0fd3b9bfd2f1cdc1744706e";
- name = "kdegraphics-thumbnailers-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kdegraphics-thumbnailers-19.08.2.tar.xz";
+ sha256 = "12e2b096d65c5dfde6d16bc2c35b236343ce02ba1ef1b3b68b11257250da02c8";
+ name = "kdegraphics-thumbnailers-19.08.2.tar.xz";
};
};
kdenetwork-filesharing = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kdenetwork-filesharing-19.04.1.tar.xz";
- sha256 = "5f3ae681f58a9877c7133778ff44c7be2a96cf26afbff10465984dae033251bd";
- name = "kdenetwork-filesharing-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kdenetwork-filesharing-19.08.2.tar.xz";
+ sha256 = "ceffdaabd3417db306c05ecd6a62b521d0b3eb5996d320d65ae5c51ea46bfdda";
+ name = "kdenetwork-filesharing-19.08.2.tar.xz";
};
};
kdenlive = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kdenlive-19.04.1.tar.xz";
- sha256 = "feb3202ee1aa0f47acc12ad7d6ca78977a4c9af0d705f8792ca2f8e3e6defbe5";
- name = "kdenlive-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kdenlive-19.08.2.tar.xz";
+ sha256 = "5ca3b7a2457d2aa355309bc7471791f691edd8774af9a19cbfc8fac39ad53c78";
+ name = "kdenlive-19.08.2.tar.xz";
};
};
kdepim-addons = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kdepim-addons-19.04.1.tar.xz";
- sha256 = "d4e36a6d0043ad0ed5e3c427559bfaa29523578f99b613c82c3aaef16b2a7882";
- name = "kdepim-addons-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kdepim-addons-19.08.2.tar.xz";
+ sha256 = "1e7d647689d2bfa243a2f4583df7030238409fb05bbcda5b168ef024e6accc89";
+ name = "kdepim-addons-19.08.2.tar.xz";
};
};
kdepim-apps-libs = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kdepim-apps-libs-19.04.1.tar.xz";
- sha256 = "c3530a810a1eddfa06a27f24b723f971e7e2e144bbb2dac7ff30e7dec948a15d";
- name = "kdepim-apps-libs-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kdepim-apps-libs-19.08.2.tar.xz";
+ sha256 = "d542b1d532d3ce3d9f1c63f4455175c7e855cd1e095a1addf1322074afc11923";
+ name = "kdepim-apps-libs-19.08.2.tar.xz";
};
};
kdepim-runtime = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kdepim-runtime-19.04.1.tar.xz";
- sha256 = "1587eca5a206768917443bd5274c03d8cbb2cbc6dcbe60449110c326b1aa0744";
- name = "kdepim-runtime-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kdepim-runtime-19.08.2.tar.xz";
+ sha256 = "9b98980003d2d107596e9acc9482dfc3ea26a2485c75a700bd82b53b9be72ebf";
+ name = "kdepim-runtime-19.08.2.tar.xz";
};
};
kdesdk-kioslaves = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kdesdk-kioslaves-19.04.1.tar.xz";
- sha256 = "80bbbdc91bc6a2b0c47a47044fdb2e107b89c63dd358b694c1c3f8e7cd1bbb16";
- name = "kdesdk-kioslaves-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kdesdk-kioslaves-19.08.2.tar.xz";
+ sha256 = "308bdbbd484f60d14bd4f75e72af1e3308c497696a5f7b011b18bc0f203fd7e5";
+ name = "kdesdk-kioslaves-19.08.2.tar.xz";
};
};
kdesdk-thumbnailers = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kdesdk-thumbnailers-19.04.1.tar.xz";
- sha256 = "554d291605ac8827a2a4f6513a2230d9f9b0b8fcd6a37b0acd41c4db81fa3442";
- name = "kdesdk-thumbnailers-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kdesdk-thumbnailers-19.08.2.tar.xz";
+ sha256 = "d607f956e9c62ee9e9aa000d5444d33e68621e0741072d0d8c14e52bd4cc96be";
+ name = "kdesdk-thumbnailers-19.08.2.tar.xz";
};
};
kdf = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kdf-19.04.1.tar.xz";
- sha256 = "835881e8f829c3c64ca529019f599ce89b95139d502673d5e6fb560a98eedce5";
- name = "kdf-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kdf-19.08.2.tar.xz";
+ sha256 = "f0a27bbf25d5791272cc8598561e53afed9840d38bf08ed3146f36701dfb7b04";
+ name = "kdf-19.08.2.tar.xz";
};
};
kdialog = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kdialog-19.04.1.tar.xz";
- sha256 = "48e77dc4827af2445f8ac583bef319b7fd274f9b84a19635bf673801e96b259a";
- name = "kdialog-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kdialog-19.08.2.tar.xz";
+ sha256 = "7aef7b5a5f340cc0066e02572ec8cef8b227bc6c7f5b066677ef6422632db95a";
+ name = "kdialog-19.08.2.tar.xz";
};
};
kdiamond = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kdiamond-19.04.1.tar.xz";
- sha256 = "a7588f21e7151c1053787f75a17c1062a9c0b43611b824632ed1b8689f4996f3";
- name = "kdiamond-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kdiamond-19.08.2.tar.xz";
+ sha256 = "e0e6104a34711864bc00d12acc5d4ac0143acfaefc5fec8a7f9ec5f7242d32e7";
+ name = "kdiamond-19.08.2.tar.xz";
};
};
keditbookmarks = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/keditbookmarks-19.04.1.tar.xz";
- sha256 = "05788d55020f330b52bd8641e47990c90c7585871489993888ce0f40fa1686db";
- name = "keditbookmarks-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/keditbookmarks-19.08.2.tar.xz";
+ sha256 = "6a22c3ccdd89d07ad13b34b89704afcc9bf3b5a177d4dc137dcb5eaf1580f6dd";
+ name = "keditbookmarks-19.08.2.tar.xz";
};
};
kfind = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kfind-19.04.1.tar.xz";
- sha256 = "496dd642473bfaa881387d2fb3a3507a9bf8c84b8a6874525221b561a50ef9fd";
- name = "kfind-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kfind-19.08.2.tar.xz";
+ sha256 = "7ce5255fa4ef3e98db937eb23e8cdc89bd6b5e5429ccb5fea769e99da2bc424a";
+ name = "kfind-19.08.2.tar.xz";
};
};
kfloppy = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kfloppy-19.04.1.tar.xz";
- sha256 = "bde5c16c679a34aa6c74844caeea5e1746629ac7d35dfac0493e9d8f7d78aa75";
- name = "kfloppy-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kfloppy-19.08.2.tar.xz";
+ sha256 = "743f9043bdc24855bb597d3f7cf2bbf4793c58be22eb73cd72ff1e3f8cff2f69";
+ name = "kfloppy-19.08.2.tar.xz";
};
};
kfourinline = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kfourinline-19.04.1.tar.xz";
- sha256 = "9ba39703ccf64b76a0b9a2705d65b7c6c2067db795cfed298f0e3a2eac48b973";
- name = "kfourinline-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kfourinline-19.08.2.tar.xz";
+ sha256 = "14d1cd1be7f1524758697f79d55c0c40e8e6359f2039929349e017a97acdc4dc";
+ name = "kfourinline-19.08.2.tar.xz";
};
};
kgeography = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kgeography-19.04.1.tar.xz";
- sha256 = "44e7297243a2f5ebd6c8e18e3380b7c66b3d085f64952937abf1683ddcb9d502";
- name = "kgeography-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kgeography-19.08.2.tar.xz";
+ sha256 = "ca535319e5dd3938e572d9d4f4a216a29a5435546742bb6616d2a716f1a1dfcc";
+ name = "kgeography-19.08.2.tar.xz";
};
};
kget = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kget-19.04.1.tar.xz";
- sha256 = "a7dff0134d0ce6643fbde1ddfb73ce7d3300b927373a0907aec510f29d0d1629";
- name = "kget-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kget-19.08.2.tar.xz";
+ sha256 = "e93795eec8f51cac2719ab31cfa6f5f4f642b166ffbb3f876ab3c866a4cd7df1";
+ name = "kget-19.08.2.tar.xz";
};
};
kgoldrunner = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kgoldrunner-19.04.1.tar.xz";
- sha256 = "11db3aecf77b7097b7d3d626dba4a3b4bcd3d5ab02a1e04cf7f6932b0b73a760";
- name = "kgoldrunner-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kgoldrunner-19.08.2.tar.xz";
+ sha256 = "fc719386cd1f0784c9be9813326e3fded8eb2951096abf7fcc4d577e5ed5501a";
+ name = "kgoldrunner-19.08.2.tar.xz";
};
};
kgpg = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kgpg-19.04.1.tar.xz";
- sha256 = "2c9c64491592db79397be3769413fae657ca991dd45d02690bbe533c1cba0ceb";
- name = "kgpg-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kgpg-19.08.2.tar.xz";
+ sha256 = "90795c649cd32b65b6030ed965e0db5b0570719afa36abb5d4893268461aa841";
+ name = "kgpg-19.08.2.tar.xz";
};
};
khangman = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/khangman-19.04.1.tar.xz";
- sha256 = "5d35620bc048ecabd21b20cadfa8df07e72f195bdc5b9ad2c7e86e17d27afe27";
- name = "khangman-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/khangman-19.08.2.tar.xz";
+ sha256 = "dfa7d2f19ab7cd7aa90d91bab1818d48e6df88ddebf729732cca8d6aca15d1f3";
+ name = "khangman-19.08.2.tar.xz";
};
};
khelpcenter = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/khelpcenter-19.04.1.tar.xz";
- sha256 = "3436502f6fae659b930aa63e5ace088e0982804386cf1b24b042328796549114";
- name = "khelpcenter-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/khelpcenter-19.08.2.tar.xz";
+ sha256 = "22b9f5225dfb9e8ad85becb7c2986cbee2a1366f84257fcbf76d5d7292dccdd9";
+ name = "khelpcenter-19.08.2.tar.xz";
};
};
kidentitymanagement = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kidentitymanagement-19.04.1.tar.xz";
- sha256 = "5216d26aef0c483f3dff51564e8b1526821b25279d7c5e9c21c87a5d5e20822a";
- name = "kidentitymanagement-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kidentitymanagement-19.08.2.tar.xz";
+ sha256 = "8f93f9546d570c8f7b2602a3a171641d488595ec8da3c47b0a08ef4f5083e884";
+ name = "kidentitymanagement-19.08.2.tar.xz";
};
};
kig = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kig-19.04.1.tar.xz";
- sha256 = "37684e2d1893c2f3a412add1edd73047d3ae8ff501b035943a9793b94d468a79";
- name = "kig-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kig-19.08.2.tar.xz";
+ sha256 = "60bab2ccdf69df8ebaed672dc9201e468563d78761f191c43ee5673f9a54246a";
+ name = "kig-19.08.2.tar.xz";
};
};
kigo = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kigo-19.04.1.tar.xz";
- sha256 = "5b5cae565a79309dc23b26acf2f596d36fd62950af58405094e4fa9a38e5e4ad";
- name = "kigo-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kigo-19.08.2.tar.xz";
+ sha256 = "c53a85b312e4acfcc35905a7e5602f3d623e45227fbd3644410b3fd962a9f1a0";
+ name = "kigo-19.08.2.tar.xz";
};
};
killbots = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/killbots-19.04.1.tar.xz";
- sha256 = "8829dba8a3af320b03e21cd356e53fef0e70c10831ffeb6a70b722dde9877938";
- name = "killbots-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/killbots-19.08.2.tar.xz";
+ sha256 = "c4407bf534dc9de604d6c169cf278b8cb9ca03055d96b71cbfe3916dbafea479";
+ name = "killbots-19.08.2.tar.xz";
};
};
kimagemapeditor = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kimagemapeditor-19.04.1.tar.xz";
- sha256 = "d85d2f3d043a29e56f4234ce24dd75545e06c2812d5fe45cafde4c3dbe280533";
- name = "kimagemapeditor-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kimagemapeditor-19.08.2.tar.xz";
+ sha256 = "3be222d94bad94adf4d589fb98c9556af0f0e6c66106a217ee3b9ab031412597";
+ name = "kimagemapeditor-19.08.2.tar.xz";
};
};
kimap = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kimap-19.04.1.tar.xz";
- sha256 = "ff933fba7ce8412fd64439e5f4c5a7be3a06fd39c79f520acfc648923819aa1f";
- name = "kimap-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kimap-19.08.2.tar.xz";
+ sha256 = "250479c78517610aab810f54184d8826fb981438ec9f0d5c423ad781a796ee00";
+ name = "kimap-19.08.2.tar.xz";
};
};
kio-extras = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kio-extras-19.04.1.tar.xz";
- sha256 = "ddf389a50142211566124ba902bb9f6b2988b1b94fefed7620a6ec421e3ff0bd";
- name = "kio-extras-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kio-extras-19.08.2.tar.xz";
+ sha256 = "a0b8f08ab8f9d36cfdc950470f75726e90e9fba159bc2035931cfa6efbfe4394";
+ name = "kio-extras-19.08.2.tar.xz";
+ };
+ };
+ kipi-plugins = {
+ version = "19.08.2";
+ src = fetchurl {
+ url = "${mirror}/stable/applications/19.08.2/src/kipi-plugins-19.08.2.tar.xz";
+ sha256 = "2894f50989a14f7fd4be0035efec3cb14583d2285ff11729605b641af0fed192";
+ name = "kipi-plugins-19.08.2.tar.xz";
};
};
kirigami-gallery = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kirigami-gallery-19.04.1.tar.xz";
- sha256 = "ed7390a015a77f8285b4db4185533fa327a142a191c27afa7c2ce963ae6ad7e2";
- name = "kirigami-gallery-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kirigami-gallery-19.08.2.tar.xz";
+ sha256 = "db6cf765cd3c7126d9e4d94cacf66478711fe8b676c9505c22604863092d975e";
+ name = "kirigami-gallery-19.08.2.tar.xz";
};
};
kiriki = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kiriki-19.04.1.tar.xz";
- sha256 = "131c6b5bd8f2b014a28bd5cb9985111f63991974b672dcfbc0266d32f069954b";
- name = "kiriki-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kiriki-19.08.2.tar.xz";
+ sha256 = "8aa1749e2b14dbb4b508515a0b1f5164243ee793141ec2af7bfc6be1f6eb67da";
+ name = "kiriki-19.08.2.tar.xz";
};
};
kiten = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kiten-19.04.1.tar.xz";
- sha256 = "be904abd0386a9ac6d622178f37e55d5a05f5eaa31c6a5cd661959ee4b03d2d4";
- name = "kiten-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kiten-19.08.2.tar.xz";
+ sha256 = "e35552dd49507c66574ae7fc22fe75597a954044a09522652cc1e457d3425edc";
+ name = "kiten-19.08.2.tar.xz";
};
};
kitinerary = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kitinerary-19.04.1.tar.xz";
- sha256 = "4053e16e847f0e234ffba2bb0533e947eae7b315304677a784279d03f13c0318";
- name = "kitinerary-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kitinerary-19.08.2.tar.xz";
+ sha256 = "d814a2f1deaadce5fec85b1122aab6ff926c53ca8f020aadc99401bd31597eaa";
+ name = "kitinerary-19.08.2.tar.xz";
};
};
kjumpingcube = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kjumpingcube-19.04.1.tar.xz";
- sha256 = "13d6a138e09c9088ce38fe9a124bd600386dc097b929f6f85416bc1da0012ab1";
- name = "kjumpingcube-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kjumpingcube-19.08.2.tar.xz";
+ sha256 = "7ff90a22670818eee7d02fd8119923761e003e059d0666873d5299cd31c96eb3";
+ name = "kjumpingcube-19.08.2.tar.xz";
};
};
kldap = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kldap-19.04.1.tar.xz";
- sha256 = "638e62d39fbe935b1df3c03f9617acbe5ade4ad617245bc590ca07b7fd0b723b";
- name = "kldap-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kldap-19.08.2.tar.xz";
+ sha256 = "79c540693b85c138ae7bf4f72213dfad6dfa48dfc0ab414004d93f15d2ffac6e";
+ name = "kldap-19.08.2.tar.xz";
};
};
kleopatra = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kleopatra-19.04.1.tar.xz";
- sha256 = "bc8895a506164df0fa0f7fc317fe8b961cb75d8c67f04474e1c12e25be358c67";
- name = "kleopatra-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kleopatra-19.08.2.tar.xz";
+ sha256 = "7d0667b71796f8cbf9081c74c80def1e6618366400d4fbe56e690bb7049e4085";
+ name = "kleopatra-19.08.2.tar.xz";
};
};
klettres = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/klettres-19.04.1.tar.xz";
- sha256 = "d0db0773513fa35d1224e90cf5b09ac75b7b8f559d1080ee6026ba74df0f0847";
- name = "klettres-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/klettres-19.08.2.tar.xz";
+ sha256 = "919fc2b5d722bfdd741f0b1202f31c9aefc5d240ceb88ab785c2acd98a1b8284";
+ name = "klettres-19.08.2.tar.xz";
};
};
klickety = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/klickety-19.04.1.tar.xz";
- sha256 = "d4ae4d002f008200a6ce920f2aff6841d9ad58b22c392d7eefac7867b32340af";
- name = "klickety-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/klickety-19.08.2.tar.xz";
+ sha256 = "97e165d250d88a5a9f00fc5e111f641c43bed8e1445fd9d7c59f986cf5517271";
+ name = "klickety-19.08.2.tar.xz";
};
};
klines = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/klines-19.04.1.tar.xz";
- sha256 = "2ca4ad74fefa87bbf3a38ea90b55025ab8554bfdc47d7e4323e0906e9e1c8962";
- name = "klines-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/klines-19.08.2.tar.xz";
+ sha256 = "1e7f5600b32a43ed4e5b7490430fb20309837e35aceb6b9b904951f23beec86f";
+ name = "klines-19.08.2.tar.xz";
};
};
kmag = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kmag-19.04.1.tar.xz";
- sha256 = "aa5ec91dcffc1a2f1037332aeacb096ab55388624c844c7fa311ca38a5e40874";
- name = "kmag-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kmag-19.08.2.tar.xz";
+ sha256 = "6e8ecfab87dca12804a5a8d0a8adf1545e9e17039e0f9667b10a8f2832512e71";
+ name = "kmag-19.08.2.tar.xz";
};
};
kmahjongg = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kmahjongg-19.04.1.tar.xz";
- sha256 = "75dbcfb5747530a3b69574fdc87b532067516415f962e7943feef97549237c99";
- name = "kmahjongg-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kmahjongg-19.08.2.tar.xz";
+ sha256 = "8b2c4b0e3cb9bb85fa6d5f0fc5c55fcca96149e510cde25be2bcd688834a8d08";
+ name = "kmahjongg-19.08.2.tar.xz";
};
};
kmail = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kmail-19.04.1.tar.xz";
- sha256 = "62fcd78318d35848e5ae461f7ebd3b6f202c57c51008c71d7e2a1d1c3d58f2c5";
- name = "kmail-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kmail-19.08.2.tar.xz";
+ sha256 = "0ad2a5439da7f255923eeb4c4cf267ece721619aa046a04439f56763aeabac85";
+ name = "kmail-19.08.2.tar.xz";
};
};
kmail-account-wizard = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kmail-account-wizard-19.04.1.tar.xz";
- sha256 = "c6714c425daa3d79dfb47b5d18cff26b10b1b087e4472f627738494f06d04ab8";
- name = "kmail-account-wizard-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kmail-account-wizard-19.08.2.tar.xz";
+ sha256 = "769b151d0de47d49e41eaeca501526de41c174f9df99b46418e955163c38e9a8";
+ name = "kmail-account-wizard-19.08.2.tar.xz";
};
};
kmailtransport = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kmailtransport-19.04.1.tar.xz";
- sha256 = "b8c0cf5cb8f7ad93bb3d1b2adab68fbc2470bc14160650fb45d1c4d40e8549fa";
- name = "kmailtransport-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kmailtransport-19.08.2.tar.xz";
+ sha256 = "c545fb5546e82f7dfcea4c6e1a8b565ad04e34851c33876c9bf74c9fbc3165c7";
+ name = "kmailtransport-19.08.2.tar.xz";
};
};
kmbox = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kmbox-19.04.1.tar.xz";
- sha256 = "701eda3a4831ed0daf9bd14a93ff845f42e4f93c6ca16d83ebda958c27021fc0";
- name = "kmbox-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kmbox-19.08.2.tar.xz";
+ sha256 = "82e2f64b90a1386100e13f9b2afea5d71952a1cb9547f965ddcdb3b8c59c35b1";
+ name = "kmbox-19.08.2.tar.xz";
};
};
kmime = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kmime-19.04.1.tar.xz";
- sha256 = "25ee2e49ea62d32fcd09a710f971c6fcdc5434c6fdf711e93c19fc4baa325775";
- name = "kmime-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kmime-19.08.2.tar.xz";
+ sha256 = "f153332bb71de9d4451b8d28135a914059f5156fc8dda33f6375671603477771";
+ name = "kmime-19.08.2.tar.xz";
};
};
kmines = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kmines-19.04.1.tar.xz";
- sha256 = "98a3860113a51e215a42791e3eb845978cda51fb5001b8e8bb41fe9182765d12";
- name = "kmines-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kmines-19.08.2.tar.xz";
+ sha256 = "735a3b7b844fbfc970187ddc9d4fe312a5dd6c037e8ad87712388578482d12d8";
+ name = "kmines-19.08.2.tar.xz";
};
};
kmix = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kmix-19.04.1.tar.xz";
- sha256 = "ca02ed8db5e4a3a58622b10668efb4c4a828de584b9f57116fee802e136352ea";
- name = "kmix-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kmix-19.08.2.tar.xz";
+ sha256 = "5d852df8b54d3abca98db4aa2b259973231fed0a597d511d54fb41c6389ce61a";
+ name = "kmix-19.08.2.tar.xz";
};
};
kmousetool = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kmousetool-19.04.1.tar.xz";
- sha256 = "fd0fcebda4d7303a9c6f1117c08e091d96bfddf92a64e1cde2dc6b555daa0624";
- name = "kmousetool-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kmousetool-19.08.2.tar.xz";
+ sha256 = "7cdc327e82548bf70c4ef4feab7a30938f3aefa1e80fccb343ce0d5ca8976ccb";
+ name = "kmousetool-19.08.2.tar.xz";
};
};
kmouth = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kmouth-19.04.1.tar.xz";
- sha256 = "9a8d0f9b1f09f1363d38b2a942ffe515521ffc410f869ed1a875ff1059ef8068";
- name = "kmouth-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kmouth-19.08.2.tar.xz";
+ sha256 = "7a71d9d15d6a5f72c86f41e874f7cb3b45d8edaae2b3bd5409b20bd7bad4a0d3";
+ name = "kmouth-19.08.2.tar.xz";
};
};
kmplot = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kmplot-19.04.1.tar.xz";
- sha256 = "c2e0855182d1ab0977b96669999976fb84c2f4b2645fcee0cb35b839bc1da206";
- name = "kmplot-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kmplot-19.08.2.tar.xz";
+ sha256 = "62017429db210c5b8f99301a6768a6eb10becd0f1f6af6d886a539657d8518a0";
+ name = "kmplot-19.08.2.tar.xz";
};
};
knavalbattle = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/knavalbattle-19.04.1.tar.xz";
- sha256 = "f7b5ad956e4b1c06b04fec2d6f39331e81f2c44c716c2e666ef75b9d786982bc";
- name = "knavalbattle-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/knavalbattle-19.08.2.tar.xz";
+ sha256 = "31f25b5397c36434c1910bf8968f92548019ad172b4d5399e6c01939389915ba";
+ name = "knavalbattle-19.08.2.tar.xz";
};
};
knetwalk = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/knetwalk-19.04.1.tar.xz";
- sha256 = "e762415b6891c4098febc090bc80e5698cd3fb9ac2b8f4988aaf096816e3b62b";
- name = "knetwalk-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/knetwalk-19.08.2.tar.xz";
+ sha256 = "057b8571f165a716a6cc13ec6489e7b5f9b4c14fa72080180a2098fa0fa028a1";
+ name = "knetwalk-19.08.2.tar.xz";
};
};
knights = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/knights-19.04.1.tar.xz";
- sha256 = "d722fad8e835ea402337ffe1e6b8d1a5bda5a0e1c36ee3a89a6782b666a8534e";
- name = "knights-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/knights-19.08.2.tar.xz";
+ sha256 = "2b70338d1cb2b770157a5b061a797620d8dd7dd8c6da0bcb7e2a9db375e71a07";
+ name = "knights-19.08.2.tar.xz";
};
};
knotes = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/knotes-19.04.1.tar.xz";
- sha256 = "b5cc805c657622e8cc4ab0ea07f30ea0258e767a87e525bc02fbc7d6ee9d7ec9";
- name = "knotes-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/knotes-19.08.2.tar.xz";
+ sha256 = "aa0aa4d215507750b055e9af91f552e723aee8163b36f65a3dd19786cf327cf3";
+ name = "knotes-19.08.2.tar.xz";
};
};
kolf = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kolf-19.04.1.tar.xz";
- sha256 = "92a56f5e5602a898537f87e12968e47cfe6f76d10daac6240e9f60e6751d06d7";
- name = "kolf-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kolf-19.08.2.tar.xz";
+ sha256 = "88b9a58885eda34bf5b349db5e84c20df9beb1462922ed6e973a61bd95d853e8";
+ name = "kolf-19.08.2.tar.xz";
};
};
kollision = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kollision-19.04.1.tar.xz";
- sha256 = "2c243790feb8d7a7760fcadff6b06b21aea930218d0915664b420dccdc1c7de9";
- name = "kollision-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kollision-19.08.2.tar.xz";
+ sha256 = "f2e7d851181033ce39d43a038601ca70c608ae9d0cb0e88228512ca1dbd0cf19";
+ name = "kollision-19.08.2.tar.xz";
};
};
kolourpaint = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kolourpaint-19.04.1.tar.xz";
- sha256 = "a2f78f1a2f99fa8176980ecd224ccfd8848ff8357e3434b463d4f83bcc7b5e46";
- name = "kolourpaint-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kolourpaint-19.08.2.tar.xz";
+ sha256 = "e8bde8d516159ae93dfe56565eea2919d2154606fd1814202f30caf21f659cda";
+ name = "kolourpaint-19.08.2.tar.xz";
};
};
kompare = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kompare-19.04.1.tar.xz";
- sha256 = "ca270cde7c77fb44b40779ee22d556f14b9e0720e865ad6e3cf5cebbba4d7261";
- name = "kompare-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kompare-19.08.2.tar.xz";
+ sha256 = "b14f23ac6eb72622a06e2e489fc2d684124f520ad13e032338397fef342659eb";
+ name = "kompare-19.08.2.tar.xz";
};
};
konqueror = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/konqueror-19.04.1.tar.xz";
- sha256 = "b5f3c5a005b71886bfa2318bf13f14e6bab8fb84e1db54192409769bc3bf0e92";
- name = "konqueror-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/konqueror-19.08.2.tar.xz";
+ sha256 = "336da877ea44fb100ca5396bc843994d77d0939fe3c969ad8fa85f0e1644d111";
+ name = "konqueror-19.08.2.tar.xz";
};
};
konquest = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/konquest-19.04.1.tar.xz";
- sha256 = "cac10983efbc026d5c8cd3330c94865b43b1a229ff9bb76077ab25d734133aab";
- name = "konquest-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/konquest-19.08.2.tar.xz";
+ sha256 = "3dda62a480e37d97aabdc4670a8ac1cf209605ed274c872ee3575ff1ecff6936";
+ name = "konquest-19.08.2.tar.xz";
};
};
konsole = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/konsole-19.04.1.tar.xz";
- sha256 = "711c67c5d43eb2c02be177e9d1157c142ab99ac5b808f951ab9a70e2397119d8";
- name = "konsole-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/konsole-19.08.2.tar.xz";
+ sha256 = "4702fe52279c99e7d8da313285ace26955776669a78bdcb6dac7aec76cabe5ed";
+ name = "konsole-19.08.2.tar.xz";
};
};
kontact = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kontact-19.04.1.tar.xz";
- sha256 = "d60cc3165460a3e395778e4709ff55cbfbb80cc3536edb43d5d2335c70bd4714";
- name = "kontact-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kontact-19.08.2.tar.xz";
+ sha256 = "d24023381304fbe388a0840921599d13c86912a1285acfc0a7d607962e37c5cf";
+ name = "kontact-19.08.2.tar.xz";
};
};
kontactinterface = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kontactinterface-19.04.1.tar.xz";
- sha256 = "034dcf0b2740273037a40ce2c1dd0d4eb17aac1eba608eca81f7e905a336cbc2";
- name = "kontactinterface-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kontactinterface-19.08.2.tar.xz";
+ sha256 = "cbd34915ddf6fbcf02395f7c876050f2b732f3769627489f04979e419cfdc869";
+ name = "kontactinterface-19.08.2.tar.xz";
};
};
kopete = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kopete-19.04.1.tar.xz";
- sha256 = "27586d90bd47abe6d8d6eddd7e41dbb6e3b3736984186cd24f84eee216e98b85";
- name = "kopete-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kopete-19.08.2.tar.xz";
+ sha256 = "cf4e4f6ff6dcd6e42a1c3d5339be4a65ed0379ef786155c12cf13f8af339e022";
+ name = "kopete-19.08.2.tar.xz";
};
};
korganizer = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/korganizer-19.04.1.tar.xz";
- sha256 = "cb5c06d13f9f6eb4191ef6b86dab72ecde92fe6d9c8b6d9a4396645c94f83b67";
- name = "korganizer-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/korganizer-19.08.2.tar.xz";
+ sha256 = "969930b66a445873a28bfe2e67876388259e35e89ffce45607583b4a668d9194";
+ name = "korganizer-19.08.2.tar.xz";
};
};
kpat = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kpat-19.04.1.tar.xz";
- sha256 = "2c0b29e5d372d55d77ceced098b8262b11a431518e818eec052d867c21ad6896";
- name = "kpat-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kpat-19.08.2.tar.xz";
+ sha256 = "6322d86e12996da3d95f6d4afd1d2e70cfd1771698bab393aaf987fd4fe0ef67";
+ name = "kpat-19.08.2.tar.xz";
};
};
kpimtextedit = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kpimtextedit-19.04.1.tar.xz";
- sha256 = "2fb2dc59a016dd70424c0fbad45ca1d750c2578f539e79d89bcace85bafd24d1";
- name = "kpimtextedit-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kpimtextedit-19.08.2.tar.xz";
+ sha256 = "e565774d77f310165fc44c8b109ef835aae82a2f763d89d1ffb6e5b820cd850d";
+ name = "kpimtextedit-19.08.2.tar.xz";
};
};
kpkpass = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kpkpass-19.04.1.tar.xz";
- sha256 = "fb3554b04d00b326d5f5e14af9c0272c020092d3329808a6177fb0714f6a1cb7";
- name = "kpkpass-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kpkpass-19.08.2.tar.xz";
+ sha256 = "daf4da30fd5c834915e6210bf64609adc116e5c6919365d000a400b6cd5f3e26";
+ name = "kpkpass-19.08.2.tar.xz";
};
};
kqtquickcharts = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kqtquickcharts-19.04.1.tar.xz";
- sha256 = "7e05638f534257e901e02b6fa377747efa7881760dd66484b5a882c65e778e72";
- name = "kqtquickcharts-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kqtquickcharts-19.08.2.tar.xz";
+ sha256 = "3341f99ba3a35e9c4fd70911faebaf4312d7700a342edd242de2118f9a77c9fb";
+ name = "kqtquickcharts-19.08.2.tar.xz";
};
};
krdc = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/krdc-19.04.1.tar.xz";
- sha256 = "8238b6969352d896751d28baeef770705feb5a0866e7b950e9eb0b377c098b19";
- name = "krdc-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/krdc-19.08.2.tar.xz";
+ sha256 = "c5e6193115afe742f25365bacb55aea21428acf38407659f77636217c589d8ff";
+ name = "krdc-19.08.2.tar.xz";
};
};
kreversi = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kreversi-19.04.1.tar.xz";
- sha256 = "c8bce72bff0bd8b452335c158900d41a419ce3e62afd996f67a4b77abf38cdc9";
- name = "kreversi-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kreversi-19.08.2.tar.xz";
+ sha256 = "345c72ad38b9bd759f7569c7c0541c08a2cdad5ab92d08c1db8b6cf8ffaf1ce2";
+ name = "kreversi-19.08.2.tar.xz";
};
};
krfb = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/krfb-19.04.1.tar.xz";
- sha256 = "73dee235940cb0512cd218d88f90e6d2d62f232a6553f327b07e54c114c8480b";
- name = "krfb-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/krfb-19.08.2.tar.xz";
+ sha256 = "08877020abf6b7ac38e393443c34e7791456fc5bea8c43c552551148fd67b67e";
+ name = "krfb-19.08.2.tar.xz";
};
};
kross-interpreters = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kross-interpreters-19.04.1.tar.xz";
- sha256 = "d745f844ebe6ecefbf0d234e1e972cc7d7933a9ef75999839a709ba008ec55fe";
- name = "kross-interpreters-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kross-interpreters-19.08.2.tar.xz";
+ sha256 = "e0c63d73441c08c1b5b6627e9c02172c72f079ac0baeb596849a49ad38f8723c";
+ name = "kross-interpreters-19.08.2.tar.xz";
};
};
kruler = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kruler-19.04.1.tar.xz";
- sha256 = "fdbff79128c8f4cb51f39dbb6f173726404d25c743aa68313651bb7a51addb53";
- name = "kruler-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kruler-19.08.2.tar.xz";
+ sha256 = "2a3c51a60f503807694cf49796b3bf82c6992ec4c0c15cf38adae92a8dbc24cc";
+ name = "kruler-19.08.2.tar.xz";
};
};
kshisen = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kshisen-19.04.1.tar.xz";
- sha256 = "a9e0e7324bb1bcad6c9427c0563236e557de85ad9724a52cfc917b43726b1aa6";
- name = "kshisen-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kshisen-19.08.2.tar.xz";
+ sha256 = "3c18bc546f2dadcff03af2a25b6f468357967560b7fddf916aea2b27d22c2364";
+ name = "kshisen-19.08.2.tar.xz";
};
};
ksirk = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/ksirk-19.04.1.tar.xz";
- sha256 = "170cc0f9dea3f35e15de5d1090e8e3fa2b2ed16fa1722dfeaef47339667f322e";
- name = "ksirk-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/ksirk-19.08.2.tar.xz";
+ sha256 = "6016d929de52d6e03ae1c1ba483e5e505542f16edfbd37c8dfbb9d0913e7f7f8";
+ name = "ksirk-19.08.2.tar.xz";
};
};
ksmtp = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/ksmtp-19.04.1.tar.xz";
- sha256 = "965f5f1c44cd64f9899ff5919372fe449e0f8b63e492f566017c9b8d5eb324bb";
- name = "ksmtp-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/ksmtp-19.08.2.tar.xz";
+ sha256 = "0d1308fd01f7261e78bedb465983be2ccf5a1514cfa31125e0a3488f67ab6590";
+ name = "ksmtp-19.08.2.tar.xz";
};
};
ksnakeduel = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/ksnakeduel-19.04.1.tar.xz";
- sha256 = "89de9e20e71ac8225e94d406cd3d25f057df35c96d4a3b7d418ffe5e6b0ef046";
- name = "ksnakeduel-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/ksnakeduel-19.08.2.tar.xz";
+ sha256 = "bb13aa91d0e75c1099a57606e0ea1f567a3ffe8f4efbf6a94420bd372ff10289";
+ name = "ksnakeduel-19.08.2.tar.xz";
};
};
kspaceduel = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kspaceduel-19.04.1.tar.xz";
- sha256 = "388eaf152c996bd7326f0a4cd18fafb2600659513750d0aadd98b780eb6ec8b7";
- name = "kspaceduel-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kspaceduel-19.08.2.tar.xz";
+ sha256 = "3e2af55afcf78f74ca1fa67ea46da2db4cbc6fd9f522a94d3adb9bed6b518aa8";
+ name = "kspaceduel-19.08.2.tar.xz";
};
};
ksquares = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/ksquares-19.04.1.tar.xz";
- sha256 = "3c9b0cb0921d1c29c6c451a22b318151010a3321350292d0d5fc26cc16618773";
- name = "ksquares-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/ksquares-19.08.2.tar.xz";
+ sha256 = "f16fa641f02a6462085d291ed8d3262891cdeeeff8bbbde4e0aabfdac3dc7bc9";
+ name = "ksquares-19.08.2.tar.xz";
};
};
ksudoku = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/ksudoku-19.04.1.tar.xz";
- sha256 = "4f95ccd1b162c7fb7cad2b04e08e3a29cfc98ad27b87e6e76e389418d09c0f7b";
- name = "ksudoku-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/ksudoku-19.08.2.tar.xz";
+ sha256 = "4630117e12c10c2f326a4e55dceed7f19d183b597eadc3d4308aecf5a5455156";
+ name = "ksudoku-19.08.2.tar.xz";
};
};
ksystemlog = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/ksystemlog-19.04.1.tar.xz";
- sha256 = "c8e6cb81803b8754d394d9365d3a6533706c742c822a5ef9d46bdc2def356db4";
- name = "ksystemlog-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/ksystemlog-19.08.2.tar.xz";
+ sha256 = "742bff9c71cc42d7a57a7732f039a944f60fe4dd70cf71c32f37ba914b57b5de";
+ name = "ksystemlog-19.08.2.tar.xz";
};
};
kteatime = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kteatime-19.04.1.tar.xz";
- sha256 = "68a23aa6a8bc575586966388315f403e464b43e1b2f4b669689f3161db1669f0";
- name = "kteatime-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kteatime-19.08.2.tar.xz";
+ sha256 = "075470af370b7913fdb085dd6984da91f863b6c03a4b713854e85437e6f9cdbe";
+ name = "kteatime-19.08.2.tar.xz";
};
};
ktimer = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/ktimer-19.04.1.tar.xz";
- sha256 = "7ec4ebbdb8fc388763d832f8601bc7a32848836edc235f4c877bfb6d1726d809";
- name = "ktimer-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/ktimer-19.08.2.tar.xz";
+ sha256 = "81be41497e14f5fb72150e238805744c9b09463ac261cf5d7d2ca011a41a05a0";
+ name = "ktimer-19.08.2.tar.xz";
};
};
ktnef = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/ktnef-19.04.1.tar.xz";
- sha256 = "6f9449307d83a7bf0dc30022c36e3d854a06b370af18e44ca6e2eab684b97c93";
- name = "ktnef-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/ktnef-19.08.2.tar.xz";
+ sha256 = "d8efabe72eedd5e89f3de9637a1a6d68ce670ec071e031470aa6852f9ad8561d";
+ name = "ktnef-19.08.2.tar.xz";
};
};
ktouch = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/ktouch-19.04.1.tar.xz";
- sha256 = "09aa2ef862fffcdfc580b4aefff96a0591d99f470055365a90a41b25a3c6dcf2";
- name = "ktouch-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/ktouch-19.08.2.tar.xz";
+ sha256 = "d36659c21d05465c7a77330dbfbbab09946093eac1db6c02147d81a838eba636";
+ name = "ktouch-19.08.2.tar.xz";
};
};
ktp-accounts-kcm = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/ktp-accounts-kcm-19.04.1.tar.xz";
- sha256 = "c4ecda8ca35438e45b48b9b86415bea1a44eeb2b2cd9af11ab1739f7ceeff045";
- name = "ktp-accounts-kcm-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/ktp-accounts-kcm-19.08.2.tar.xz";
+ sha256 = "7995813bc983c80b200cddf6b0f55fa8c48be3297ee03e3e0a7601cbc86b8dd8";
+ name = "ktp-accounts-kcm-19.08.2.tar.xz";
};
};
ktp-approver = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/ktp-approver-19.04.1.tar.xz";
- sha256 = "e12421c0e79692532497dbd6db6b09faba010d99c57db1893eae3e59f7df47cd";
- name = "ktp-approver-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/ktp-approver-19.08.2.tar.xz";
+ sha256 = "74670d519578486e05237f5085a51fe0a8ce833be413c06702f38b27b27913ec";
+ name = "ktp-approver-19.08.2.tar.xz";
};
};
ktp-auth-handler = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/ktp-auth-handler-19.04.1.tar.xz";
- sha256 = "8d06e90a7e73b034c6087079b510e0ac1c27728c885e9aa2e8baef463a892d65";
- name = "ktp-auth-handler-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/ktp-auth-handler-19.08.2.tar.xz";
+ sha256 = "b13304909d8e66adc2a0658081fd41e72b0ef7513e041b9a8f3261a8ffd7bb22";
+ name = "ktp-auth-handler-19.08.2.tar.xz";
};
};
ktp-call-ui = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/ktp-call-ui-19.04.1.tar.xz";
- sha256 = "ad2efd84dc45cf55366dbc182d9301816129335ec4dc021dbbcc097c52656a0f";
- name = "ktp-call-ui-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/ktp-call-ui-19.08.2.tar.xz";
+ sha256 = "0d735c34f937a436e82e994c9d60b851473d31b3dc07f1d2ec7eeeab63b83658";
+ name = "ktp-call-ui-19.08.2.tar.xz";
};
};
ktp-common-internals = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/ktp-common-internals-19.04.1.tar.xz";
- sha256 = "041e5971071a060cef24abe68f699b5fcc657ba15a1e77feb227312fb1c13fd1";
- name = "ktp-common-internals-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/ktp-common-internals-19.08.2.tar.xz";
+ sha256 = "b08cb6dc05e325c80f9d1753db23d1969fc6c2defc571401e7b2e87772721f7e";
+ name = "ktp-common-internals-19.08.2.tar.xz";
};
};
ktp-contact-list = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/ktp-contact-list-19.04.1.tar.xz";
- sha256 = "7d8f7d841142d75036dc9dc4e31aefe8ff8906de6205b0e348b48e57da1400d9";
- name = "ktp-contact-list-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/ktp-contact-list-19.08.2.tar.xz";
+ sha256 = "ab5778049e1351bc5cec29e3bfd98588f24b9877d385e787eb1f68715d624d34";
+ name = "ktp-contact-list-19.08.2.tar.xz";
};
};
ktp-contact-runner = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/ktp-contact-runner-19.04.1.tar.xz";
- sha256 = "68580e429fe0c9472a924af4f71df2da74684c5c11374464c110b9faca28c66f";
- name = "ktp-contact-runner-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/ktp-contact-runner-19.08.2.tar.xz";
+ sha256 = "6ec9fd151b98c2f48d1ef4361c063e83fe51562fc34868c032d39495ab38fb85";
+ name = "ktp-contact-runner-19.08.2.tar.xz";
};
};
ktp-desktop-applets = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/ktp-desktop-applets-19.04.1.tar.xz";
- sha256 = "1114d5bcbc5a20c2d4822b1e2ad07d5d493ceace0a75b77575e978c30dc5fa75";
- name = "ktp-desktop-applets-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/ktp-desktop-applets-19.08.2.tar.xz";
+ sha256 = "96975cf9208d215da1844619e2792be0919238a03ede71073813584042d6c774";
+ name = "ktp-desktop-applets-19.08.2.tar.xz";
};
};
ktp-filetransfer-handler = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/ktp-filetransfer-handler-19.04.1.tar.xz";
- sha256 = "3e53fc28f4a1a8dd0dd2cb63b0a287061176a5c6e1db6480d50ebc70e2d8f189";
- name = "ktp-filetransfer-handler-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/ktp-filetransfer-handler-19.08.2.tar.xz";
+ sha256 = "cd2a8fb944e76b6a1ea4f8c956db2d9914a0d5bd472c3fac2e9b568144bf87ab";
+ name = "ktp-filetransfer-handler-19.08.2.tar.xz";
};
};
ktp-kded-module = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/ktp-kded-module-19.04.1.tar.xz";
- sha256 = "fe5fc292618b28d11dddec435e86a89899c52b074b7c729aefe951b0b7697a66";
- name = "ktp-kded-module-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/ktp-kded-module-19.08.2.tar.xz";
+ sha256 = "340bffd880fee602868cb44bc4c5474db1c34be62375298affedf3cc7eb1579f";
+ name = "ktp-kded-module-19.08.2.tar.xz";
};
};
ktp-send-file = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/ktp-send-file-19.04.1.tar.xz";
- sha256 = "8d3100de23666e3cb449663db376ed20e38647758371d37d721385af2b0d8d7a";
- name = "ktp-send-file-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/ktp-send-file-19.08.2.tar.xz";
+ sha256 = "30a4a27b4c37c8ca75ebc407c6070395197b9b88ba8e422d7055eee93ec0ae9d";
+ name = "ktp-send-file-19.08.2.tar.xz";
};
};
ktp-text-ui = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/ktp-text-ui-19.04.1.tar.xz";
- sha256 = "dfc51070d1a25edde7c0f33d4eb83185738a70e6feb40a8b385403e833cca0b5";
- name = "ktp-text-ui-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/ktp-text-ui-19.08.2.tar.xz";
+ sha256 = "a0b7d8469b12ae6820541cc38dd57fad8866ad6e236c4864b7cf94629ca0cc33";
+ name = "ktp-text-ui-19.08.2.tar.xz";
};
};
ktuberling = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/ktuberling-19.04.1.tar.xz";
- sha256 = "f8146ecbe3a1005871a589054b996d059e5ff08b9d7fdeaa06591ae0ab05b8cb";
- name = "ktuberling-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/ktuberling-19.08.2.tar.xz";
+ sha256 = "e6cfcd7175c7ed081ecd743c2fdd845f88b25d6cb4d46f9e6d58e35eb11c66ad";
+ name = "ktuberling-19.08.2.tar.xz";
};
};
kturtle = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kturtle-19.04.1.tar.xz";
- sha256 = "f932a56d8f380cc422215e580d8c4d51eabd189f2b4ca3b4205e617d52e6e10d";
- name = "kturtle-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kturtle-19.08.2.tar.xz";
+ sha256 = "1f1245c444aba511aea0630f80953171dd11334f55f6b9547a844e25293cf833";
+ name = "kturtle-19.08.2.tar.xz";
};
};
kubrick = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kubrick-19.04.1.tar.xz";
- sha256 = "636080a8cac2f689f5af8de9aacef9e90029eafaaf7f1867b8a53a8a558e94c7";
- name = "kubrick-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kubrick-19.08.2.tar.xz";
+ sha256 = "89c181f8c82db143cd671fe78105e95a229e43fd64cab17ccdb80774b4ca8638";
+ name = "kubrick-19.08.2.tar.xz";
};
};
kwalletmanager = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kwalletmanager-19.04.1.tar.xz";
- sha256 = "793a3a335e53b6af36272398d7933ff0cc77918860799db2b5688ee249ce215d";
- name = "kwalletmanager-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kwalletmanager-19.08.2.tar.xz";
+ sha256 = "5c0cd648d6bf4515cd71b4575ab8051004dcf505c2bfe502fb42b7ba01cb51b2";
+ name = "kwalletmanager-19.08.2.tar.xz";
};
};
kwave = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kwave-19.04.1.tar.xz";
- sha256 = "1fd7e256a5d9b77ef691642891b2423357ef4aea7f40ae64304ec922e5930fd6";
- name = "kwave-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kwave-19.08.2.tar.xz";
+ sha256 = "7836b7737d3f578f6d44b40dddf8b3abae53eaa84b3352bfed242eb6ef3d5604";
+ name = "kwave-19.08.2.tar.xz";
};
};
kwordquiz = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/kwordquiz-19.04.1.tar.xz";
- sha256 = "970381004a7382f4f24dad61eda8a386e138735d78c2609c92603e14acbe0158";
- name = "kwordquiz-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/kwordquiz-19.08.2.tar.xz";
+ sha256 = "9bb9abc4058b8520a9229317d7da6cbbddb8a715549ca487c04af5f9eb425019";
+ name = "kwordquiz-19.08.2.tar.xz";
};
};
libgravatar = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/libgravatar-19.04.1.tar.xz";
- sha256 = "7d4af799effc13af4f4b056d21b188bd67cd503d1528a7ff37e19d228619b522";
- name = "libgravatar-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/libgravatar-19.08.2.tar.xz";
+ sha256 = "393370a9d7d4a74627469b2e67bb3f7a0ef73dac8b11a3ab5af6c384c20a0de5";
+ name = "libgravatar-19.08.2.tar.xz";
};
};
libkcddb = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/libkcddb-19.04.1.tar.xz";
- sha256 = "6773266408c0a68c128b08aca2df594249c210ff9b8fb3553b2bb82c591a2f51";
- name = "libkcddb-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/libkcddb-19.08.2.tar.xz";
+ sha256 = "f3e4c650b0abe10f281037bd6c805243a656fecdfc046a8586324c760ba90e48";
+ name = "libkcddb-19.08.2.tar.xz";
};
};
libkcompactdisc = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/libkcompactdisc-19.04.1.tar.xz";
- sha256 = "146d842741c24a379a0e134b8c0cbef916f5bd94fb8c6102703e5c764bf9b0ee";
- name = "libkcompactdisc-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/libkcompactdisc-19.08.2.tar.xz";
+ sha256 = "e185f528a4c6fea1b789186fe64a183197afc447c8cb939c9b6b9957f60d04e0";
+ name = "libkcompactdisc-19.08.2.tar.xz";
};
};
libkdcraw = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/libkdcraw-19.04.1.tar.xz";
- sha256 = "54576a803929a0adb3d25e239395b541c0820fecd633f09ea40677882c82e42c";
- name = "libkdcraw-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/libkdcraw-19.08.2.tar.xz";
+ sha256 = "735ab40633efec394c6265d83f86ad7caf278f63d1dd33cc6edf572da4925fcb";
+ name = "libkdcraw-19.08.2.tar.xz";
};
};
libkdegames = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/libkdegames-19.04.1.tar.xz";
- sha256 = "a16baa2818ab6f553d9c2635b252530538812787c50f9fbc0d18781943150e5c";
- name = "libkdegames-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/libkdegames-19.08.2.tar.xz";
+ sha256 = "83456cec44502a1f79c0be00c983090e32fd8aea5fec1461fbfbd37b5f8866ac";
+ name = "libkdegames-19.08.2.tar.xz";
};
};
libkdepim = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/libkdepim-19.04.1.tar.xz";
- sha256 = "28217ce30663955168d39eaa4e0c7efb47a437f59df77971f3e98efea99adc45";
- name = "libkdepim-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/libkdepim-19.08.2.tar.xz";
+ sha256 = "67578e4c98e7e5d94249144e3720ae5fbc17231d4ecc46cb0e1be6e7ced4a71b";
+ name = "libkdepim-19.08.2.tar.xz";
};
};
libkeduvocdocument = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/libkeduvocdocument-19.04.1.tar.xz";
- sha256 = "c0b5e23a677cea13a2e15989a5b2240ddab2948b00be67e6306cf916e7ca2e59";
- name = "libkeduvocdocument-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/libkeduvocdocument-19.08.2.tar.xz";
+ sha256 = "74338cb3fcb9346a981585484f758aabd372d1a43afe9facd93d94c229424250";
+ name = "libkeduvocdocument-19.08.2.tar.xz";
};
};
libkexiv2 = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/libkexiv2-19.04.1.tar.xz";
- sha256 = "138e1bf75cbbf16c46b6ba35f25e700ad93fa8a2134d0ad4c344174c7701cbae";
- name = "libkexiv2-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/libkexiv2-19.08.2.tar.xz";
+ sha256 = "abdafabe834862e157356f2686ae871f00302d82ae639dbf89030d19ccc54b1b";
+ name = "libkexiv2-19.08.2.tar.xz";
};
};
libkgapi = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/libkgapi-19.04.1.tar.xz";
- sha256 = "a9d499fe1f5371112ceb94b3b03f8e2b1a1faa4ee69722b4c1c9ba28e8f9052e";
- name = "libkgapi-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/libkgapi-19.08.2.tar.xz";
+ sha256 = "b220908dd4a21e589a25b964b7786f1154f63ca98bf90c43ced3120adf4fb0a6";
+ name = "libkgapi-19.08.2.tar.xz";
};
};
libkgeomap = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/libkgeomap-19.04.1.tar.xz";
- sha256 = "519345f30e46fc95816d145177347547c9c9eb440eab017c5ee928fa0ef8cf5a";
- name = "libkgeomap-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/libkgeomap-19.08.2.tar.xz";
+ sha256 = "145692b900d87a84b74507b53ddc05947e6c1cce46381d8960559b5907296219";
+ name = "libkgeomap-19.08.2.tar.xz";
};
};
libkipi = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/libkipi-19.04.1.tar.xz";
- sha256 = "1f1a8b881f61c9fc151a2f0b98c6ba07baa0fe1ca8a0f77d7502e81c08a84020";
- name = "libkipi-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/libkipi-19.08.2.tar.xz";
+ sha256 = "fcaf576afb961d9a36c1f69c034c43b9f0991cbd0726ea684c2c49096f36d5c6";
+ name = "libkipi-19.08.2.tar.xz";
};
};
libkleo = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/libkleo-19.04.1.tar.xz";
- sha256 = "a75084129e44028ff3f7742cdcb1800df94845d8c6ace38389da317144fa0529";
- name = "libkleo-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/libkleo-19.08.2.tar.xz";
+ sha256 = "0acf296ffb0144096071e47ce1365b9e5b07b59cad4700f89c875c7bee4573bd";
+ name = "libkleo-19.08.2.tar.xz";
};
};
libkmahjongg = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/libkmahjongg-19.04.1.tar.xz";
- sha256 = "7a1df5a03e1da1b801ca4530be3b9008b92cb4872ce8ec0038f2686ac325efbb";
- name = "libkmahjongg-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/libkmahjongg-19.08.2.tar.xz";
+ sha256 = "8699949fae90c0e92dd046b904b0624f79c37fecaa46557c808f20f24e215947";
+ name = "libkmahjongg-19.08.2.tar.xz";
};
};
libkomparediff2 = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/libkomparediff2-19.04.1.tar.xz";
- sha256 = "2ab1a9cb25996bd6fb80bf556ba4b91a07385e62688249e9415b1ead8b3ad1b3";
- name = "libkomparediff2-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/libkomparediff2-19.08.2.tar.xz";
+ sha256 = "c5738f96dbda3d7272ad08ff9518722ae9b7ee737ab7e27c9e88cedb418371d7";
+ name = "libkomparediff2-19.08.2.tar.xz";
};
};
libksane = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/libksane-19.04.1.tar.xz";
- sha256 = "c89039afa641640cbc65b01ae735ee9b70bd3283095d6b034665ddb048d33417";
- name = "libksane-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/libksane-19.08.2.tar.xz";
+ sha256 = "97e05423f4a9205b9db0bbce5111615d6bf8e8d53a391d3398275babccd91aa0";
+ name = "libksane-19.08.2.tar.xz";
};
};
libksieve = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/libksieve-19.04.1.tar.xz";
- sha256 = "23cca1dfc1d79242f24dd95e8817a9672629276bced3a9ee56067570ef69ccff";
- name = "libksieve-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/libksieve-19.08.2.tar.xz";
+ sha256 = "5c5bb9182e53a2a928d70985f6dd514c8b308891c4899b942784e80d221318f6";
+ name = "libksieve-19.08.2.tar.xz";
};
};
lokalize = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/lokalize-19.04.1.tar.xz";
- sha256 = "1e68faa5af9079e691e5d207b0397c0250fb6e1209b370e9762bfa949c35dce1";
- name = "lokalize-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/lokalize-19.08.2.tar.xz";
+ sha256 = "3fe3af9f647bcda7f89eab5c3ebb7bce4e9ceb0b7cfb5206c2f6ecdf9cdbe3ee";
+ name = "lokalize-19.08.2.tar.xz";
};
};
lskat = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/lskat-19.04.1.tar.xz";
- sha256 = "f83f9df9e4786a8d6d8d197defb8ac7f40b8bed8e88578673b2660c14c7a4edf";
- name = "lskat-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/lskat-19.08.2.tar.xz";
+ sha256 = "3ae219b92cbc4c9acfacbb16e262e82b03cd5ddba024820e82d8de7312327a9c";
+ name = "lskat-19.08.2.tar.xz";
};
};
mailcommon = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/mailcommon-19.04.1.tar.xz";
- sha256 = "37b06e85e74d6ef1801485b8d99529fde5ca11bb446c231a6f5406e99f9c4d0f";
- name = "mailcommon-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/mailcommon-19.08.2.tar.xz";
+ sha256 = "39df1544c0278600d5a1a57697835828358ae44203087e29430ce1bd0c355e20";
+ name = "mailcommon-19.08.2.tar.xz";
};
};
mailimporter = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/mailimporter-19.04.1.tar.xz";
- sha256 = "e77c5c43f20f821664a3a559b929eb2f97ba5105e000875b1642516a6f298696";
- name = "mailimporter-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/mailimporter-19.08.2.tar.xz";
+ sha256 = "27780c381919ebc9e6fc0de7021cd03277dd3962d4c4c15770fcf44cd6126814";
+ name = "mailimporter-19.08.2.tar.xz";
};
};
marble = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/marble-19.04.1.tar.xz";
- sha256 = "acd9c15c4758684f6eff6c2318fc4dd88fd68dd41336de9458cad4d5f6832c61";
- name = "marble-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/marble-19.08.2.tar.xz";
+ sha256 = "4add63522a51fdea7b425f29bd3d35c558a0b881336ff6a90bfc07483acbf6a6";
+ name = "marble-19.08.2.tar.xz";
};
};
mbox-importer = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/mbox-importer-19.04.1.tar.xz";
- sha256 = "3fcd5c6b3824dea9ff4145dde6bf7b472675e3927ce91258d89cbfe4d0ebb77a";
- name = "mbox-importer-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/mbox-importer-19.08.2.tar.xz";
+ sha256 = "644175d6fcb66b878309de899f4a3e060e29d4f31ce337d44ee6e1af5901044f";
+ name = "mbox-importer-19.08.2.tar.xz";
};
};
messagelib = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/messagelib-19.04.1.tar.xz";
- sha256 = "7e4d0e2f2d6dfcb235408af0e4af235ab10dc8a8c4f1e169a672f03b37b180ad";
- name = "messagelib-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/messagelib-19.08.2.tar.xz";
+ sha256 = "d761e94d2fa71c2de6a52e0c1756f52f0006ada35711189b343eccdafe0a0390";
+ name = "messagelib-19.08.2.tar.xz";
};
};
minuet = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/minuet-19.04.1.tar.xz";
- sha256 = "5f2e3692c0b7ae9496fa7952bfd02045aa87ba5ee10c6ef84fb4557abe83d0f0";
- name = "minuet-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/minuet-19.08.2.tar.xz";
+ sha256 = "1713ac758388443bbd1e2f5158cba594c35c3afdc5122a993fc66d70b07eb904";
+ name = "minuet-19.08.2.tar.xz";
};
};
okular = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/okular-19.04.1.tar.xz";
- sha256 = "7145b1eea61c56a5b413e960e5b24038c7af5d3cb583a524deca344dae3a0e0e";
- name = "okular-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/okular-19.08.2.tar.xz";
+ sha256 = "ff3d2eac444a110a611add71c30b0556085f5aaccdd821a80bd070a646c9f6b3";
+ name = "okular-19.08.2.tar.xz";
};
};
palapeli = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/palapeli-19.04.1.tar.xz";
- sha256 = "dc661c88dcf6e3a17b9a2a403cac1ba9bd8f7144ff2c01ff3c286564159f796b";
- name = "palapeli-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/palapeli-19.08.2.tar.xz";
+ sha256 = "bae810595c7ba7bdac0fa5c27e6c2a3a9bb1bbdae3521cfc036ec0cdcd9ef1a7";
+ name = "palapeli-19.08.2.tar.xz";
};
};
parley = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/parley-19.04.1.tar.xz";
- sha256 = "c52746417d32e31f66c1165fd08ab87696d5ef4b5a020a175fe00e60474bc73f";
- name = "parley-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/parley-19.08.2.tar.xz";
+ sha256 = "1201945d55657d6b89e309220edb1a60a61debf0bbf59b508d1c0a21a8dc407e";
+ name = "parley-19.08.2.tar.xz";
};
};
picmi = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/picmi-19.04.1.tar.xz";
- sha256 = "10abab6e48f48e1e1308fbd2a687bb4c5051c6ae2a670b737d6974432fdef30c";
- name = "picmi-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/picmi-19.08.2.tar.xz";
+ sha256 = "ecfa211043327991a0927be852c185223adebe5f15cdc39e79e31022802f904b";
+ name = "picmi-19.08.2.tar.xz";
};
};
pimcommon = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/pimcommon-19.04.1.tar.xz";
- sha256 = "bc4612711775ea4665c0827c7935397503b5cf82f906bcf22a64b3ab1eaaaa72";
- name = "pimcommon-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/pimcommon-19.08.2.tar.xz";
+ sha256 = "ccdf2624a055a9db31b0b8109c791776d111ae91438f41ed50dcb9faca287e4c";
+ name = "pimcommon-19.08.2.tar.xz";
};
};
pim-data-exporter = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/pim-data-exporter-19.04.1.tar.xz";
- sha256 = "0fa9e20ef67f64d5a9c967f4ea32a476438b23ab8405774035cd4584e6100ebd";
- name = "pim-data-exporter-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/pim-data-exporter-19.08.2.tar.xz";
+ sha256 = "e4703d7a10935814738394a38c5ad54f9923c58e43c397e2e78a4b1b1176f4c2";
+ name = "pim-data-exporter-19.08.2.tar.xz";
};
};
pim-sieve-editor = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/pim-sieve-editor-19.04.1.tar.xz";
- sha256 = "3a8ce54140233fa7ae618fc05ae9d882cab6e56835e9fdb29e2242885ce50e10";
- name = "pim-sieve-editor-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/pim-sieve-editor-19.08.2.tar.xz";
+ sha256 = "ae9f7de78ab9adffe2575bf1367b1ae4928afee1fd299bb91ca2d26b3bb86c03";
+ name = "pim-sieve-editor-19.08.2.tar.xz";
};
};
poxml = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/poxml-19.04.1.tar.xz";
- sha256 = "d8439996821ded53dea321f84619f3754cc677b5fa08b5fd37aabb09b8dac2f9";
- name = "poxml-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/poxml-19.08.2.tar.xz";
+ sha256 = "c5e36bd10d3a8d0474f903eebd45e026ca306beb74829c43a1e7be4ed34ca9e8";
+ name = "poxml-19.08.2.tar.xz";
};
};
print-manager = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/print-manager-19.04.1.tar.xz";
- sha256 = "33d553bb048959ecfc5e404f3a1e118b0ed78305d96b3a6042ffd576a164e9fa";
- name = "print-manager-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/print-manager-19.08.2.tar.xz";
+ sha256 = "c0702208b6f485e2e44337aaf203b9e391adda22d6526bf0dd34b31230e0fb05";
+ name = "print-manager-19.08.2.tar.xz";
};
};
rocs = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/rocs-19.04.1.tar.xz";
- sha256 = "5c0740d68ed26f7291e114faa811a2ae104ee682181f5ebed381865dd7d8db61";
- name = "rocs-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/rocs-19.08.2.tar.xz";
+ sha256 = "4e61226334f79a260f0ccc7789a099a91c7643d9fdfcdd052b002f2fe6f64885";
+ name = "rocs-19.08.2.tar.xz";
};
};
signon-kwallet-extension = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/signon-kwallet-extension-19.04.1.tar.xz";
- sha256 = "658bbae2534896e13a7aced654f38164130ee3c748349d044000d0d7dcaa1c38";
- name = "signon-kwallet-extension-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/signon-kwallet-extension-19.08.2.tar.xz";
+ sha256 = "2521cd2c4f25717f5caf9915474f75614be7dec7053f1e94c1429fac7045cc29";
+ name = "signon-kwallet-extension-19.08.2.tar.xz";
};
};
spectacle = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/spectacle-19.04.1.tar.xz";
- sha256 = "6f420fc6a660e25a08449cfb6d2795e07a37f8dca25f1862d857121b43f9262c";
- name = "spectacle-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/spectacle-19.08.2.tar.xz";
+ sha256 = "4cf2f0903cec2787a03a8bbdbd219acc29ac412f352a4ff94ef50ae9a6eb459e";
+ name = "spectacle-19.08.2.tar.xz";
};
};
step = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/step-19.04.1.tar.xz";
- sha256 = "4fafff95339473e6449e9a45e273fe15758daf743e8697ff73f16129eb1dca05";
- name = "step-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/step-19.08.2.tar.xz";
+ sha256 = "dede94c073b2903fa4fa6806623cb980ebe93d15cc76376aadac4ca8cd61a96c";
+ name = "step-19.08.2.tar.xz";
};
};
svgpart = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/svgpart-19.04.1.tar.xz";
- sha256 = "3e30eb3b0f95073639697c73f1cc1d4689e53921cc87fe23cd0ec04ef6835624";
- name = "svgpart-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/svgpart-19.08.2.tar.xz";
+ sha256 = "6c6510b604bba3aebbeca136ec9534c416bc0ba55125227bdd0af2a86052855c";
+ name = "svgpart-19.08.2.tar.xz";
};
};
sweeper = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/sweeper-19.04.1.tar.xz";
- sha256 = "70ccd7a1d8d81ee2a54df724a1ad908157672bb20e80c81aff8db946241b6637";
- name = "sweeper-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/sweeper-19.08.2.tar.xz";
+ sha256 = "da65cbfc952d8b63ddfbcba373d9a828ef5acefc68196ddd4c2c602c672cbb5f";
+ name = "sweeper-19.08.2.tar.xz";
};
};
umbrello = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/umbrello-19.04.1.tar.xz";
- sha256 = "42f9ba60320558439a1d5c68cc4d730c6b17e0b2b8a57b4686031bbecb3ab3c2";
- name = "umbrello-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/umbrello-19.08.2.tar.xz";
+ sha256 = "69a721d27ecedbe694d232e04469002dcf2319dd320982aacc2a02e32430c382";
+ name = "umbrello-19.08.2.tar.xz";
+ };
+ };
+ yakuake = {
+ version = "19.08.2";
+ src = fetchurl {
+ url = "${mirror}/stable/applications/19.08.2/src/yakuake-19.08.2.tar.xz";
+ sha256 = "3ebf477069c85a8705302b6b51902a74af7bb92349fab41000f71484a4de5aee";
+ name = "yakuake-19.08.2.tar.xz";
};
};
zeroconf-ioslave = {
- version = "19.04.1";
+ version = "19.08.2";
src = fetchurl {
- url = "${mirror}/stable/applications/19.04.1/src/zeroconf-ioslave-19.04.1.tar.xz";
- sha256 = "e59c8a4b6ff93ead29b322fb40c94a3584d5c463077d58575720fcba2c511d87";
- name = "zeroconf-ioslave-19.04.1.tar.xz";
+ url = "${mirror}/stable/applications/19.08.2/src/zeroconf-ioslave-19.08.2.tar.xz";
+ sha256 = "19e31534d1a4503d1dd4bd8ef60cfb48a91ee167dd4b0db99e53b318a355dae0";
+ name = "zeroconf-ioslave-19.08.2.tar.xz";
};
};
}
diff --git a/pkgs/applications/kde/yakuake.nix b/pkgs/applications/kde/yakuake.nix
new file mode 100644
index 000000000000..6f9c8df30012
--- /dev/null
+++ b/pkgs/applications/kde/yakuake.nix
@@ -0,0 +1,32 @@
+{
+ mkDerivation, lib, kdoctools, extra-cmake-modules,
+ karchive, kcrash, kdbusaddons, ki18n, kiconthemes, knewstuff, knotifications,
+ knotifyconfig, konsole, kparts, kwindowsystem, qtx11extras
+}:
+
+mkDerivation {
+ name = "yakuake";
+
+ buildInputs = [
+ karchive kcrash kdbusaddons ki18n kiconthemes knewstuff knotifications
+ knotifyconfig kparts kwindowsystem qtx11extras
+ ];
+
+ propagatedBuildInputs = [
+ karchive kcrash kdbusaddons ki18n kiconthemes knewstuff knotifications
+ knotifyconfig kparts kwindowsystem
+ ];
+
+ propagatedUserEnvPkgs = [ konsole ];
+
+ nativeBuildInputs = [
+ extra-cmake-modules kdoctools
+ ];
+
+ meta = {
+ homepage = https://yakuake.kde.org;
+ description = "Quad-style terminal emulator for KDE";
+ maintainers = with lib.maintainers; [ fridh ];
+ license = lib.licenses.gpl2;
+ };
+}
diff --git a/pkgs/applications/misc/1password/default.nix b/pkgs/applications/misc/1password/default.nix
index 79c3a6d7302f..5895990e80ed 100644
--- a/pkgs/applications/misc/1password/default.nix
+++ b/pkgs/applications/misc/1password/default.nix
@@ -2,24 +2,24 @@
stdenv.mkDerivation rec {
pname = "1password";
- version = "0.5.7";
+ version = "0.6.2";
src =
if stdenv.hostPlatform.system == "i686-linux" then
fetchzip {
url = "https://cache.agilebits.com/dist/1P/op/pkg/v${version}/op_linux_386_v${version}.zip";
- sha256 = "1193lq6cvqkv2cy07l6wzb25gb5vb3s3pxm534q3izhzrrz6lisz";
+ sha256 = "08ha4qr064jyivsp8z3q2cwmmm6klqyicc1i9vpf7zd9xmmx72rd";
stripRoot = false;
}
else if stdenv.hostPlatform.system == "x86_64-linux" then
fetchzip {
url = "https://cache.agilebits.com/dist/1P/op/pkg/v${version}/op_linux_amd64_v${version}.zip";
- sha256 = "0hlw1jasxzg31293d2n3ydzj62q7ji7nig7aaighcvzi3c9j7v51";
+ sha256 = "1fjhn1k9h6rlrgin5czvpig8h70dh14i5k20g77jvxq24bf0sn9m";
stripRoot = false;
}
else if stdenv.hostPlatform.system == "x86_64-darwin" then
fetchzip {
url = "https://cache.agilebits.com/dist/1P/op/pkg/v${version}/op_darwin_amd64_v${version}.zip";
- sha256 = "05z5k63fza6v0vhydyiq4sh9xhxnd9rcfxyym7jihv6b3fv3fnx3";
+ sha256 = "1x7pj41a4wra3ws09cyc063ai5isf12qbkm2hxiiiq5glnacpvpl";
stripRoot = false;
}
else throw "Architecture not supported";
@@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
description = "1Password command-line tool";
homepage = https://support.1password.com/command-line/;
downloadPage = https://app-updates.agilebits.com/product_history/CLI;
- maintainers = with maintainers; [ joelburget ];
+ maintainers = with maintainers; [ joelburget marsam ];
license = licenses.unfree;
platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ];
};
diff --git a/pkgs/applications/misc/airtame/default.nix b/pkgs/applications/misc/airtame/default.nix
index 50582d94ff4a..465c72d73f5c 100644
--- a/pkgs/applications/misc/airtame/default.nix
+++ b/pkgs/applications/misc/airtame/default.nix
@@ -14,7 +14,6 @@ let libPath = lib.makeLibraryPath [
in stdenv.mkDerivation rec {
pname = "airtame";
version = "3.3.0";
- name = "${pname}-${version}";
longName = "${pname}-application";
src = fetchurl {
diff --git a/pkgs/applications/misc/alacritty/default.nix b/pkgs/applications/misc/alacritty/default.nix
index dddf8d93412d..24f788ef4687 100644
--- a/pkgs/applications/misc/alacritty/default.nix
+++ b/pkgs/applications/misc/alacritty/default.nix
@@ -22,6 +22,7 @@
libxcb,
libxkbcommon,
wayland,
+ xdg_utils,
# Darwin Frameworks
AppKit,
@@ -75,6 +76,10 @@ in buildRustPackage rec {
++ lib.optionals stdenv.isDarwin [ AppKit CoreGraphics CoreServices CoreText Foundation OpenGL ];
outputs = [ "out" "terminfo" ];
+ postPatch = ''
+ substituteInPlace alacritty_terminal/src/config/mouse.rs \
+ --replace xdg-open ${xdg_utils}/bin/xdg-open
+ '';
postBuild = lib.optionalString stdenv.isDarwin "make app";
diff --git a/pkgs/applications/misc/almanah/default.nix b/pkgs/applications/misc/almanah/default.nix
index 4997a9c7f2ac..06321d9d6218 100644
--- a/pkgs/applications/misc/almanah/default.nix
+++ b/pkgs/applications/misc/almanah/default.nix
@@ -1,19 +1,59 @@
-{ stdenv, fetchurl, pkgconfig, intltool
-, libxml2, desktop-file-utils, wrapGAppsHook, evolution-data-server, gtkspell3, gpgme, libcryptui
-, glib, gtk3, gtksourceview3, sqlite, cairo, atk, gcr, gnome3 }:
+{ stdenv
+, fetchurl
+, atk
+, cairo
+, desktop-file-utils
+, evolution-data-server
+, gcr
+, gettext
+, glib
+, gnome3
+, gpgme
+, gtk3
+, gtksourceview3
+, gtkspell3
+, libcryptui
+, libxml2
+, meson
+, ninja
+, pkgconfig
+, sqlite
+, wrapGAppsHook
+}:
stdenv.mkDerivation rec {
pname = "almanah";
- version = "0.11.1";
+ version = "0.12.0";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
- sha256 = "1g0fyykq8bs3x1xqc0l0bk9zazcrxja784m68myymv1zfqqnp9h0";
+ sha256 = "09rxx4s4c34d1axza6ayss33v78p44r9bpx058shllh1sf5avpcb";
};
- nativeBuildInputs = [ pkgconfig intltool libxml2 desktop-file-utils wrapGAppsHook ];
+ nativeBuildInputs = [
+ desktop-file-utils
+ gettext
+ libxml2
+ meson
+ ninja
+ pkgconfig
+ wrapGAppsHook
+ ];
- buildInputs = [ glib gtk3 gtksourceview3 sqlite cairo atk gcr gtkspell3 evolution-data-server gnome3.evolution gpgme libcryptui ];
+ buildInputs = [
+ atk
+ cairo
+ evolution-data-server
+ gcr
+ glib
+ gnome3.evolution
+ gpgme
+ gtk3
+ gtksourceview3
+ gtkspell3
+ libcryptui
+ sqlite
+ ];
passthru = {
updateScript = gnome3.updateScript {
diff --git a/pkgs/applications/misc/aminal/default.nix b/pkgs/applications/misc/aminal/default.nix
index 8cb014bb0214..8c5aded5ed9b 100644
--- a/pkgs/applications/misc/aminal/default.nix
+++ b/pkgs/applications/misc/aminal/default.nix
@@ -10,7 +10,7 @@
}:
buildGoPackage rec {
- name = "aminal-${version}";
+ pname = "aminal";
version = "0.8.6";
goPackagePath = "github.com/liamg/aminal";
diff --git a/pkgs/applications/misc/antfs-cli/default.nix b/pkgs/applications/misc/antfs-cli/default.nix
index f21438dfcec5..8108b9e4ddb4 100644
--- a/pkgs/applications/misc/antfs-cli/default.nix
+++ b/pkgs/applications/misc/antfs-cli/default.nix
@@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, python3Packages }:
-python3Packages.buildPythonApplication rec {
+python3Packages.buildPythonApplication {
pname = "antfs-cli";
version = "unstable-2017-02-11";
diff --git a/pkgs/applications/misc/ape/clex.nix b/pkgs/applications/misc/ape/clex.nix
index 37d140e19ba3..c680ffe96783 100644
--- a/pkgs/applications/misc/ape/clex.nix
+++ b/pkgs/applications/misc/ape/clex.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
- name = "attempto-clex-${version}";
+ pname = "attempto-clex";
version = "5133afe";
src = fetchFromGitHub {
diff --git a/pkgs/applications/misc/ape/default.nix b/pkgs/applications/misc/ape/default.nix
index e78ba2df9993..0d8ebccb3d02 100644
--- a/pkgs/applications/misc/ape/default.nix
+++ b/pkgs/applications/misc/ape/default.nix
@@ -1,33 +1,33 @@
{ stdenv, swiProlog, makeWrapper,
fetchFromGitHub,
- lexicon ? "lexicon/clex_lexicon.pl",
+ lexicon ? "prolog/lexicon/clex_lexicon.pl",
pname ? "ape",
description ? "Parser for Attempto Controlled English (ACE)",
license ? with stdenv.lib; licenses.lgpl3
}:
stdenv.mkDerivation rec {
- name = "${pname}-${version}";
- version = "6.7-131003";
+ inherit pname;
+ version = "2019-08-10";
buildInputs = [ swiProlog makeWrapper ];
src = fetchFromGitHub {
owner = "Attempto";
repo = "APE";
- rev = version;
- sha256 = "0cw47qjg4896kw3vps6rfs02asvscsqvcfdiwgfmqb3hvykb1sdx";
+ rev = "113b81621262d7a395779465cb09397183e6f74c";
+ sha256 = "0xyvna2fbr18hi5yvm0zwh77q02dfna1g4g53z9mn2rmlfn2mhjh";
};
patchPhase = ''
# We move the file first to avoid "same file" error in the default case
cp ${lexicon} new_lexicon.pl
- rm lexicon/clex_lexicon.pl
- cp new_lexicon.pl lexicon/clex_lexicon.pl
+ rm prolog/lexicon/clex_lexicon.pl
+ cp new_lexicon.pl prolog/lexicon/clex_lexicon.pl
'';
buildPhase = ''
- make build
+ make SHELL=${stdenv.shell} build
'';
installPhase = ''
diff --git a/pkgs/applications/misc/appeditor/default.nix b/pkgs/applications/misc/appeditor/default.nix
index 0530ec9c1b80..398e14a9c252 100644
--- a/pkgs/applications/misc/appeditor/default.nix
+++ b/pkgs/applications/misc/appeditor/default.nix
@@ -1,5 +1,6 @@
{ stdenv
, fetchFromGitHub
+, vala
, meson
, ninja
, pkgconfig
@@ -8,7 +9,6 @@
, gettext
, glib
, gtk3
-, hicolor-icon-theme
, libgee
, wrapGAppsHook }:
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
gettext
meson
ninja
- pantheon.vala
+ vala
pkgconfig
python3
wrapGAppsHook
@@ -36,7 +36,6 @@ stdenv.mkDerivation rec {
buildInputs = [
glib
gtk3
- hicolor-icon-theme
pantheon.granite
libgee
];
diff --git a/pkgs/applications/misc/apvlv/default.nix b/pkgs/applications/misc/apvlv/default.nix
index 2da0de9ead8c..b5af1af91f36 100644
--- a/pkgs/applications/misc/apvlv/default.nix
+++ b/pkgs/applications/misc/apvlv/default.nix
@@ -4,7 +4,7 @@
stdenv.mkDerivation rec {
version = "0.1.5";
- name = "apvlv-${version}";
+ pname = "apvlv";
src = fetchFromGitHub {
owner = "naihe2010";
diff --git a/pkgs/applications/misc/artha/default.nix b/pkgs/applications/misc/artha/default.nix
index 202c1669f858..b03d2aa208b5 100644
--- a/pkgs/applications/misc/artha/default.nix
+++ b/pkgs/applications/misc/artha/default.nix
@@ -1,7 +1,7 @@
{ stdenv, autoreconfHook, fetchurl, dbus-glib, gtk2, pkgconfig, wordnet }:
-stdenv.mkDerivation rec {
- name = "artha-${version}";
+stdenv.mkDerivation {
+ pname = "artha";
version = "1.0.3";
src = fetchurl {
diff --git a/pkgs/applications/misc/asciiquarium/default.nix b/pkgs/applications/misc/asciiquarium/default.nix
index 3c18d70d6c26..0e524ede0912 100644
--- a/pkgs/applications/misc/asciiquarium/default.nix
+++ b/pkgs/applications/misc/asciiquarium/default.nix
@@ -2,7 +2,8 @@
let version = "1.1";
in stdenv.mkDerivation {
- name = "asciiquarium-${version}";
+ pname = "asciiquarium";
+ inherit version;
src = fetchurl {
url = "https://robobunny.com/projects/asciiquarium/asciiquarium_${version}.tar.gz";
sha256 = "0qfkr5b7sxzi973nh0h84blz2crvmf28jkkgaj3mxrr56mhwc20v";
diff --git a/pkgs/applications/misc/autospotting/default.nix b/pkgs/applications/misc/autospotting/default.nix
index 2dd151c1a6c1..b00686fb24f6 100644
--- a/pkgs/applications/misc/autospotting/default.nix
+++ b/pkgs/applications/misc/autospotting/default.nix
@@ -1,7 +1,7 @@
{ stdenv, buildGoPackage, fetchFromGitHub }:
-buildGoPackage rec {
- name = "autospotting-${version}";
+buildGoPackage {
+ pname = "autospotting";
version = "unstable-2018-11-17";
goPackagePath = "github.com/AutoSpotting/AutoSpotting";
diff --git a/pkgs/applications/misc/avrdudess/default.nix b/pkgs/applications/misc/avrdudess/default.nix
index 4227b4155acf..165bee76b69b 100644
--- a/pkgs/applications/misc/avrdudess/default.nix
+++ b/pkgs/applications/misc/avrdudess/default.nix
@@ -1,6 +1,6 @@
{ stdenv, runtimeShell, fetchurl, unzip, mono, avrdude, gtk2, xdg_utils }:
-stdenv.mkDerivation rec {
+stdenv.mkDerivation {
name = "avrdudess-2.2.20140102";
src = fetchurl {
diff --git a/pkgs/applications/misc/barrier/default.nix b/pkgs/applications/misc/barrier/default.nix
index 5d3564f38e6a..d8325e19e266 100644
--- a/pkgs/applications/misc/barrier/default.nix
+++ b/pkgs/applications/misc/barrier/default.nix
@@ -4,13 +4,13 @@
mkDerivation rec {
pname = "barrier";
- version = "2.3.0";
+ version = "2.3.2";
src = fetchFromGitHub {
owner = "debauchee";
repo = pname;
rev = "v${version}";
- sha256 = "1fy7xjwqyisapf8wv50gwpbgbv5b4ldf7766w453h5iw10d18kh0";
+ sha256 = "1gbg3p7c0vcsdzsjj1ssx6k8xpj3rpyvais12266f0xvnbvihczd";
};
buildInputs = [ cmake curl xorg.libX11 xorg.libXext xorg.libXtst avahiWithLibdnssdCompat qtbase ];
diff --git a/pkgs/applications/misc/bashSnippets/default.nix b/pkgs/applications/misc/bashSnippets/default.nix
index fc5fa4d03006..b0af34ec7606 100644
--- a/pkgs/applications/misc/bashSnippets/default.nix
+++ b/pkgs/applications/misc/bashSnippets/default.nix
@@ -12,7 +12,8 @@ let
];
in
stdenv.mkDerivation {
- name = "bashSnippets-${version}";
+ pname = "bashSnippets";
+ inherit version;
src = fetchFromGitHub {
owner = "alexanderepstein";
diff --git a/pkgs/applications/misc/batti/default.nix b/pkgs/applications/misc/batti/default.nix
index abb3eb33536e..8b994c55de3f 100644
--- a/pkgs/applications/misc/batti/default.nix
+++ b/pkgs/applications/misc/batti/default.nix
@@ -7,11 +7,11 @@ let
inherit (pythonPackages) dbus-python pygtk python;
in stdenv.mkDerivation rec {
- name = "batti-${version}";
+ pname = "batti";
version = "0.3.8";
src = fetchurl {
- url = "https://batti-gtk.googlecode.com/files/${name}.tar.gz";
+ url = "https://batti-gtk.googlecode.com/files/${pname}-${version}.tar.gz";
sha256 = "072d92gpsiiin631589nj77i2w1425p6db0qxyml7myscfy9jgx6";
};
diff --git a/pkgs/applications/misc/bb/default.nix b/pkgs/applications/misc/bb/default.nix
index f085e4bd7dd5..06df1df9f769 100644
--- a/pkgs/applications/misc/bb/default.nix
+++ b/pkgs/applications/misc/bb/default.nix
@@ -1,11 +1,11 @@
{ stdenv, lib, fetchurl, darwin, aalib, ncurses, xorg, libmikmod }:
stdenv.mkDerivation rec {
- name = "bb-${version}";
+ pname = "bb";
version = "1.3rc1";
src = fetchurl {
- url = "mirror://sourceforge/aa-project/bb/${version}/${name}.tar.gz";
+ url = "mirror://sourceforge/aa-project/bb/${version}/${pname}-${version}.tar.gz";
sha256 = "1i411glxh7g4pfg4gw826lpwngi89yrbmxac8jmnsfvrfb48hgbr";
};
diff --git a/pkgs/applications/misc/bemenu/default.nix b/pkgs/applications/misc/bemenu/default.nix
index 89c32668be9c..8945ffbb384f 100644
--- a/pkgs/applications/misc/bemenu/default.nix
+++ b/pkgs/applications/misc/bemenu/default.nix
@@ -9,7 +9,7 @@ assert ncursesSupport -> ncurses != null;
assert waylandSupport -> wayland != null;
assert x11Support -> xlibs != null && xorg != null;
-stdenv.mkDerivation rec {
+stdenv.mkDerivation {
pname = "bemenu";
version = "0.1.0";
diff --git a/pkgs/applications/misc/bibletime/default.nix b/pkgs/applications/misc/bibletime/default.nix
index 41184d6e9492..a3f0a3b84f23 100644
--- a/pkgs/applications/misc/bibletime/default.nix
+++ b/pkgs/applications/misc/bibletime/default.nix
@@ -4,10 +4,10 @@ stdenv.mkDerivation rec {
version = "2.10.1";
- name = "bibletime-${version}";
+ pname = "bibletime";
src = fetchurl {
- url = "mirror://sourceforge/bibletime/${name}.tar.xz";
+ url = "mirror://sourceforge/bibletime/${pname}-${version}.tar.xz";
sha256 = "14fayy5h1ffjxin669q56fflxn4ij1irgn60cygwx2y02cwxbll6";
};
diff --git a/pkgs/applications/misc/bitcoinarmory/default.nix b/pkgs/applications/misc/bitcoinarmory/default.nix
index 9c99dcee2b3c..090cb2f519e1 100644
--- a/pkgs/applications/misc/bitcoinarmory/default.nix
+++ b/pkgs/applications/misc/bitcoinarmory/default.nix
@@ -10,7 +10,8 @@ let
in buildPythonApplication {
- name = "bitcoinarmory-${version}";
+ pname = "bitcoinarmory";
+ inherit version;
src = fetchFromGitHub {
owner = "goatpig";
diff --git a/pkgs/applications/misc/blender/default.nix b/pkgs/applications/misc/blender/default.nix
index 5445c7efb59b..3b98114c7107 100644
--- a/pkgs/applications/misc/blender/default.nix
+++ b/pkgs/applications/misc/blender/default.nix
@@ -1,7 +1,7 @@
{ config, stdenv, lib, fetchurl, boost, cmake, ffmpeg, gettext, glew
, ilmbase, libXi, libX11, libXext, libXrender
, libjpeg, libpng, libsamplerate, libsndfile
-, libtiff, libGLU_combined, openal, opencolorio, openexr, openimageio, openjpeg_1, pythonPackages
+, libtiff, libGLU_combined, openal, opencolorio, openexr, openimageio, openjpeg_1, python3Packages
, zlib, fftw, opensubdiv, freetype, jemalloc, ocl-icd, addOpenGLRunpath
, jackaudioSupport ? false, libjack2
, cudaSupport ? config.cudaSupport or false, cudatoolkit
@@ -11,14 +11,15 @@
with lib;
-let python = pythonPackages.python; in
+let python = python3Packages.python; in
stdenv.mkDerivation rec {
- name = "blender-2.79b";
+ pname = "blender";
+ version = "2.80";
src = fetchurl {
- url = "https://download.blender.org/source/${name}.tar.gz";
- sha256 = "1g4kcdqmf67srzhi3hkdnr4z1ph4h9sza1pahz38mrj998q4r52c";
+ url = "https://download.blender.org/source/${pname}-${version}.tar.gz";
+ sha256 = "1h550jisdbis50hxwk5kxrvrk1a6sh2fsri3yyj66vhzbi87x7fd";
};
nativeBuildInputs = [ cmake ] ++ optional cudaSupport addOpenGLRunpath;
@@ -36,7 +37,6 @@ stdenv.mkDerivation rec {
postPatch =
''
- substituteInPlace doc/manpage/blender.1.py --replace /usr/bin/python ${python}/bin/python3
substituteInPlace extern/clew/src/clew.c --replace '"libOpenCL.so"' '"${ocl-icd}/lib/libOpenCL.so"'
'';
@@ -47,10 +47,7 @@ stdenv.mkDerivation rec {
"-DWITH_INSTALL_PORTABLE=OFF"
"-DWITH_FFTW3=ON"
#"-DWITH_SDL=ON"
- "-DWITH_GAMEENGINE=ON"
"-DWITH_OPENCOLORIO=ON"
- "-DWITH_SYSTEM_OPENJPEG=ON"
- "-DWITH_PLAYER=ON"
"-DWITH_OPENSUBDIV=ON"
"-DPYTHON_LIBRARY=${python.libPrefix}m"
"-DPYTHON_LIBPATH=${python}/lib"
@@ -58,13 +55,10 @@ stdenv.mkDerivation rec {
"-DPYTHON_VERSION=${python.pythonVersion}"
"-DWITH_PYTHON_INSTALL=OFF"
"-DWITH_PYTHON_INSTALL_NUMPY=OFF"
+ "-DPYTHON_NUMPY_PATH=${python3Packages.numpy}/${python.sitePackages}"
]
++ optional jackaudioSupport "-DWITH_JACK=ON"
- ++ optionals cudaSupport
- [ "-DWITH_CYCLES_CUDA_BINARIES=ON"
- # Disable architectures before sm_30 to support new CUDA toolkits.
- "-DCYCLES_CUDA_BINARIES_ARCH=sm_30;sm_35;sm_37;sm_50;sm_52;sm_60;sm_61"
- ]
+ ++ optional cudaSupport "-DWITH_CYCLES_CUDA_BINARIES=ON"
++ optional colladaSupport "-DWITH_OPENCOLLADA=ON";
NIX_CFLAGS_COMPILE = "-I${ilmbase.dev}/include/OpenEXR -I${python}/include/${python.libPrefix}";
@@ -78,7 +72,7 @@ stdenv.mkDerivation rec {
postInstall = optionalString enableNumpy
''
wrapProgram $out/bin/blender \
- --prefix PYTHONPATH : ${pythonPackages.numpy}/${python.sitePackages}
+ --prefix PYTHONPATH : ${python3Packages.numpy}/${python.sitePackages}
'';
# Set RUNPATH so that libcuda and libnvrtc in /run/opengl-driver(-32)/lib can be
diff --git a/pkgs/applications/misc/calcurse/default.nix b/pkgs/applications/misc/calcurse/default.nix
index a15814082014..8f8934cb084b 100644
--- a/pkgs/applications/misc/calcurse/default.nix
+++ b/pkgs/applications/misc/calcurse/default.nix
@@ -1,12 +1,12 @@
{ stdenv, fetchurl, ncurses, gettext, python3, python3Packages, makeWrapper }:
stdenv.mkDerivation rec {
- name = "calcurse-${version}";
- version = "4.5.0";
+ pname = "calcurse";
+ version = "4.5.1";
src = fetchurl {
- url = "https://calcurse.org/files/${name}.tar.gz";
- sha256 = "1vjwcmp51h7dsvwn0qx93w9chp3wp970v7d9mjhk7jyamcbfywn3";
+ url = "https://calcurse.org/files/${pname}-${version}.tar.gz";
+ sha256 = "0cgkd285x5pk62lmdx9fjxl46c5lj8wj2cqbxq7d99yb4il5fdjk";
};
buildInputs = [ ncurses gettext python3 python3Packages.wrapPython ];
diff --git a/pkgs/applications/misc/calibre/default.nix b/pkgs/applications/misc/calibre/default.nix
index 6b4ca4e03550..dd85156b3ef0 100644
--- a/pkgs/applications/misc/calibre/default.nix
+++ b/pkgs/applications/misc/calibre/default.nix
@@ -1,16 +1,16 @@
-{ stdenv, fetchurl, poppler_utils, pkgconfig, libpng
+{ stdenv, mkDerivation, fetchurl, poppler_utils, pkgconfig, libpng
, imagemagick, libjpeg, fontconfig, podofo, qtbase, qmake, icu, sqlite
-, makeWrapper, unrarSupport ? false, chmlib, python2Packages, libusb1, libmtp
+, unrarSupport ? false, chmlib, python2Packages, libusb1, libmtp
, xdg_utils, makeDesktopItem, wrapGAppsHook, removeReferencesTo, qt5
}:
-stdenv.mkDerivation rec {
- version = "3.45.2";
- name = "calibre-${version}";
+mkDerivation rec {
+ pname = "calibre";
+ version = "3.47.1";
src = fetchurl {
- url = "https://download.calibre-ebook.com/${version}/${name}.tar.xz";
- sha256 = "1379g375s3h0fgv9qg43hrg16knd76ym7qkffpn1qyc7kkhv8a05";
+ url = "https://download.calibre-ebook.com/${version}/${pname}-${version}.tar.xz";
+ sha256 = "17lz6rawlv268vv8i5kj59rswsipq3c14066adaz1paw54zr62dk";
};
patches = [
@@ -35,11 +35,11 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
- nativeBuildInputs = [ makeWrapper pkgconfig qmake removeReferencesTo qt5.wrapQtAppsHook ];
+ nativeBuildInputs = [ pkgconfig qmake removeReferencesTo wrapGAppsHook ];
buildInputs = [
poppler_utils libpng imagemagick libjpeg
- fontconfig podofo qtbase chmlib icu sqlite libusb1 libmtp xdg_utils wrapGAppsHook
+ fontconfig podofo qtbase chmlib icu sqlite libusb1 libmtp xdg_utils
] ++ (with python2Packages; [
apsw cssselect css-parser dateutil dnspython html5-parser lxml mechanize netifaces pillow
python pyqt5_with_qtwebkit sip
@@ -48,11 +48,6 @@ stdenv.mkDerivation rec {
odfpy
]);
- qtWrapperArgs = [
- "--prefix PYTHONPATH: $PYTHONPATH"
- "--prefix PATH: ${poppler_utils.out}/bin}"
- ];
-
installPhase = ''
runHook preInstall
@@ -75,10 +70,6 @@ stdenv.mkDerivation rec {
sed -i "s/env python[0-9.]*/python/" $PYFILES
sed -i "2i import sys; sys.argv[0] = 'calibre'" $out/bin/calibre
- for program in $out/bin/*; do
- wrapQtApp $program
- done
-
# Replace @out@ by the output path.
mkdir -p $out/share/applications/
cp {$calibreDesktopItem,$ebookEditDesktopItem,$ebookViewerDesktopItem}/share/applications/* $out/share/applications/
@@ -92,21 +83,29 @@ stdenv.mkDerivation rec {
runHook postInstall
'';
+ # Wrap manually
+ dontWrapQtApps = true;
+ dontWrapGApps = true;
+
# Remove some references to shrink the closure size. This reference (as of
# 2018-11-06) was a single string like the following:
# /nix/store/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-podofo-0.9.6-dev/include/podofo/base/PdfVariant.h
preFixup = ''
remove-references-to -t ${podofo.dev} $out/lib/calibre/calibre/plugins/podofo.so
- '';
-
- postFixup = ''
+ for program in $out/bin/*; do
+ wrapProgram $program \
+ ''${qtWrapperArgs[@]} \
+ ''${gappsWrapperArgs[@]} \
+ --prefix PYTHONPATH : $PYTHONPATH \
+ --prefix PATH : ${poppler_utils.out}/bin
+ done
'';
disallowedReferences = [ podofo.dev ];
calibreDesktopItem = makeDesktopItem {
- name = "calibre";
+ name = "calibre-gui";
desktopName = "calibre";
exec = "@out@/bin/calibre --detach %F";
genericName = "E-book library management";
@@ -152,7 +151,7 @@ stdenv.mkDerivation rec {
};
ebookEditDesktopItem = makeDesktopItem {
- name = "calibre-edit-ebook";
+ name = "calibre-edit-book";
desktopName = "Edit E-book";
genericName = "E-book Editor";
comment = "Edit e-books";
diff --git a/pkgs/applications/misc/candle/default.nix b/pkgs/applications/misc/candle/default.nix
index 35aa681df4ba..77cabc409c74 100644
--- a/pkgs/applications/misc/candle/default.nix
+++ b/pkgs/applications/misc/candle/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, qtbase, qtserialport, qmake }:
stdenv.mkDerivation rec {
- name = "candle-${version}";
+ pname = "candle";
version = "1.1";
src = fetchFromGitHub {
diff --git a/pkgs/applications/misc/cardpeek/default.nix b/pkgs/applications/misc/cardpeek/default.nix
index a0e5c8149968..40dbfea9801b 100644
--- a/pkgs/applications/misc/cardpeek/default.nix
+++ b/pkgs/applications/misc/cardpeek/default.nix
@@ -4,7 +4,8 @@ let
version = "0.8.4";
in
stdenv.mkDerivation {
- name = "cardpeek-${version}";
+ pname = "cardpeek";
+ inherit version;
src = fetchFromGitHub {
owner = "L1L1";
diff --git a/pkgs/applications/misc/cataract/build.nix b/pkgs/applications/misc/cataract/build.nix
index e48b32a783d7..1c33a92987c1 100644
--- a/pkgs/applications/misc/cataract/build.nix
+++ b/pkgs/applications/misc/cataract/build.nix
@@ -10,9 +10,9 @@
, sha256
, rev }:
-stdenv.mkDerivation rec {
+stdenv.mkDerivation {
inherit version;
- name = "cataract-${version}";
+ pname = "cataract";
src = fetchgit {
url = "git://git.bzatek.net/cataract";
@@ -22,17 +22,21 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoreconfHook pkgconfig ];
buildInputs = [ glib libxml2 exiv2 imagemagick ];
+ prePatch = ''
+ sed -i 's|#include |#include |' src/jpeg-utils.cpp
+ '';
+
installPhase = ''
mkdir $out/{bin,share} -p
cp src/cgg{,-dirgen} $out/bin/
'';
- meta = {
- homepage = http://cgg.bzatek.net/;
- description = "a simple static web photo gallery, designed to be clean and easily usable";
- license = stdenv.lib.licenses.gpl2;
- maintainers = [ stdenv.lib.maintainers.matthiasbeyer ];
- platforms = with stdenv.lib.platforms; linux ++ darwin;
+ meta = with stdenv.lib; {
+ homepage = "http://cgg.bzatek.net/";
+ description = "A simple static web photo gallery, designed to be clean and easily usable";
+ license = licenses.gpl2;
+ maintainers = [ maintainers.matthiasbeyer ];
+ platforms = with platforms; linux ++ darwin;
};
}
diff --git a/pkgs/applications/misc/catclock/default.nix b/pkgs/applications/misc/catclock/default.nix
index 75f5ab406fe0..09c36f9eb2f1 100644
--- a/pkgs/applications/misc/catclock/default.nix
+++ b/pkgs/applications/misc/catclock/default.nix
@@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, xlibsWrapper, motif }:
-stdenv.mkDerivation rec {
+stdenv.mkDerivation {
name = "catclock-2015-10-04";
src = fetchFromGitHub {
diff --git a/pkgs/applications/misc/cbatticon/default.nix b/pkgs/applications/misc/cbatticon/default.nix
index 44612644359c..e506829b575e 100644
--- a/pkgs/applications/misc/cbatticon/default.nix
+++ b/pkgs/applications/misc/cbatticon/default.nix
@@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "cbatticon";
- version = "1.6.9";
+ version = "1.6.10";
src = fetchFromGitHub {
owner = "valr";
repo = pname;
rev = version;
- sha256 = "0kw09d678sd3m18fmi4380sl4a2m5lkfmq0kps16cdmq7z80rvaf";
+ sha256 = "0ivm2dzhsa9ir25ry418r2qg2llby9j7a6m3arbvq5c3kaj8m9jr";
};
nativeBuildInputs = [ pkgconfig gettext ];
diff --git a/pkgs/applications/misc/cdrtools/fix-paths.patch b/pkgs/applications/misc/cdrtools/fix-paths.patch
deleted file mode 100644
index f4a541210880..000000000000
--- a/pkgs/applications/misc/cdrtools/fix-paths.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-diff -ru3 cdrtools-3.01-old/DEFAULTS/Defaults.linux cdrtools-3.01/DEFAULTS/Defaults.linux
---- cdrtools-3.01-old/DEFAULTS/Defaults.linux 2015-12-11 17:37:21.505848835 +0300
-+++ cdrtools-3.01/DEFAULTS/Defaults.linux 2015-12-11 17:37:32.155828925 +0300
-@@ -57,7 +57,8 @@
- # Installation config stuff
- #
- ###########################################################################
--INS_BASE= /opt/schily
-+#INS_BASE= /opt/schily
-+INS_BASE= $(out)
- INS_KBASE= /
- INS_RBASE= /
- #
-Only in cdrtools-3.01/DEFAULTS: Defaults.linux.orig
-diff -ru3 cdrtools-3.01-old/RULES/rules.prg cdrtools-3.01/RULES/rules.prg
---- cdrtools-3.01-old/RULES/rules.prg 2015-12-11 17:37:21.500848844 +0300
-+++ cdrtools-3.01/RULES/rules.prg 2015-12-11 17:38:29.890720987 +0300
-@@ -43,10 +43,10 @@
- #
- #SHELL= /bin/sh
-
--LN= /bin/ln
--SYMLINK= /bin/ln -s
--RM= /bin/rm
--MV= /bin/mv
-+LN= ln
-+SYMLINK= ln -s
-+RM= rm
-+MV= mv
- LORDER= lorder
- TSORT= tsort
- CTAGS= vctags
diff --git a/pkgs/applications/misc/cgminer/default.nix b/pkgs/applications/misc/cgminer/default.nix
index 9d63b5aedcb7..c05c7423d9a5 100644
--- a/pkgs/applications/misc/cgminer/default.nix
+++ b/pkgs/applications/misc/cgminer/default.nix
@@ -1,9 +1,9 @@
{ fetchgit, stdenv, pkgconfig, libtool, autoconf, automake
, curl, ncurses, ocl-icd, opencl-headers, xorg, jansson }:
-stdenv.mkDerivation rec {
+stdenv.mkDerivation {
version = "3.7.2";
- name = "cgminer-${version}";
+ pname = "cgminer";
src = fetchgit {
url = "https://github.com/ckolivas/cgminer.git";
diff --git a/pkgs/applications/misc/cheat/default.nix b/pkgs/applications/misc/cheat/default.nix
index 41660bc7f2b0..357dd9bcb8a7 100644
--- a/pkgs/applications/misc/cheat/default.nix
+++ b/pkgs/applications/misc/cheat/default.nix
@@ -2,7 +2,6 @@
with python3.pkgs;
buildPythonApplication rec {
- name = "${pname}-${version}";
pname = "cheat";
version = "2.5.1";
diff --git a/pkgs/applications/misc/cherrytree/default.nix b/pkgs/applications/misc/cherrytree/default.nix
index 0578393dfca0..4e734aa849f6 100644
--- a/pkgs/applications/misc/cherrytree/default.nix
+++ b/pkgs/applications/misc/cherrytree/default.nix
@@ -3,12 +3,12 @@
with stdenv.lib;
stdenv.mkDerivation rec {
- name = "cherrytree-${version}";
- version = "0.38.8";
+ pname = "cherrytree";
+ version = "0.38.9";
src = fetchurl {
- url = "https://www.giuspen.com/software/${name}.tar.xz";
- sha256 = "1ns87xl2sgrf3nha4xkhp0xcxlycqszlp6xdrn95lg6vzm0fa8dg";
+ url = "https://www.giuspen.com/software/${pname}-${version}.tar.xz";
+ sha256 = "0xal09ijgxbzvp003s40xbrfnpq3ald1fw8nnpqq3yg7h6g6c5pw";
};
buildInputs = with pythonPackages;
diff --git a/pkgs/applications/misc/cipher/default.nix b/pkgs/applications/misc/cipher/default.nix
new file mode 100644
index 000000000000..ef47e3e03586
--- /dev/null
+++ b/pkgs/applications/misc/cipher/default.nix
@@ -0,0 +1,58 @@
+{ stdenv
+, fetchFromGitHub
+, meson
+, ninja
+, vala
+, pkgconfig
+, pantheon
+, python3
+, gettext
+, glib
+, gtk3
+, libgee
+, xdg_utils
+, wrapGAppsHook }:
+
+stdenv.mkDerivation rec {
+ pname = "cipher";
+ version = "2.0.0";
+
+ src = fetchFromGitHub {
+ owner = "arshubham";
+ repo = "cipher";
+ rev = version;
+ sha256 = "0n5aigcyxnl4k52mdmavbxx6afc1ixymn3k3l2ryhyzi5q31x0x3";
+ };
+
+ nativeBuildInputs = [
+ gettext
+ meson
+ ninja
+ vala
+ pkgconfig
+ python3
+ wrapGAppsHook
+ ];
+
+ buildInputs = [
+ glib
+ gtk3
+ pantheon.granite
+ libgee
+ ];
+
+ postPatch = ''
+ substituteInPlace data/com.github.arshubham.cipher.desktop.in \
+ --replace xdg-open ${xdg_utils}/bin/xdg-open
+ chmod +x post_install.py
+ patchShebangs post_install.py
+ '';
+
+ meta = with stdenv.lib; {
+ description = "A simple application for encoding and decoding text, designed for elementary OS";
+ homepage = "https://github.com/arshubham/cipher";
+ maintainers = with maintainers; [ kjuvi ] ++ pantheon.maintainers;
+ platforms = platforms.linux;
+ license = licenses.gpl3Plus;
+ };
+}
diff --git a/pkgs/applications/misc/cli-visualizer/default.nix b/pkgs/applications/misc/cli-visualizer/default.nix
index 6602adb2f2ab..4986661e2f63 100644
--- a/pkgs/applications/misc/cli-visualizer/default.nix
+++ b/pkgs/applications/misc/cli-visualizer/default.nix
@@ -2,7 +2,7 @@
stdenv.mkDerivation rec {
version = "1.8";
- name = "cli-visualizer-${version}";
+ pname = "cli-visualizer";
src = fetchFromGitHub {
owner = "dpayne";
diff --git a/pkgs/applications/misc/clight/clightd.nix b/pkgs/applications/misc/clight/clightd.nix
new file mode 100644
index 000000000000..43ff1d73f78f
--- /dev/null
+++ b/pkgs/applications/misc/clight/clightd.nix
@@ -0,0 +1,75 @@
+{ lib, stdenv, fetchFromGitHub
+, dbus, cmake, pkgconfig
+, glib, udev, polkit, libmodule
+, pcre, libXdmcp, utillinux, libpthreadstubs
+, enableDdc ? true, ddcutil
+, enableDpms ? true, libXext
+, enableGamma ? true, libXrandr
+, enableScreen ? true }:
+
+stdenv.mkDerivation rec {
+ pname = "clightd";
+ version = "3.4";
+
+ src = fetchFromGitHub {
+ owner = "FedeDP";
+ repo = "Clightd";
+ rev = version;
+ sha256 = "0g6kawizwfhvigkwm7rbfq6rg872xn8igy8n355w4d7mmcxk0jf8";
+ };
+
+ # dbus-1.pc has datadir=/etc
+ SYSTEM_BUS_DIR = "${placeholder "out"}/share/dbus-1/system-services";
+ # systemd.pc has prefix=${systemd.out}
+ MODULE_LOAD_DIR = "${placeholder "out"}/lib/modules-load.d";
+ # polkit-gobject-1.pc has prefix=${polkit.out}
+ POLKIT_ACTION_DIR = "${placeholder "out"}/share/polkit-1/actions";
+
+ postPatch = ''
+ sed -i "s@/etc@$out\0@" CMakeLists.txt
+ sed -i "s@pkg_get_variable(SYSTEM_BUS_DIR.*@set(SYSTEM_BUS_DIR $SYSTEM_BUS_DIR)@" CMakeLists.txt
+ sed -i "s@pkg_get_variable(MODULE_LOAD_DIR.*@set(MODULE_LOAD_DIR $MODULE_LOAD_DIR)@" CMakeLists.txt
+ sed -i "s@pkg_get_variable(POLKIT_ACTION_DIR.*@set(POLKIT_ACTION_DIR $POLKIT_ACTION_DIR)@" CMakeLists.txt
+ '';
+
+ cmakeFlags = with lib;
+ optional enableDdc "-DENABLE_DDC=1"
+ ++ optional enableDpms "-DENABLE_DPMS=1"
+ ++ optional enableGamma "-DENABLE_GAMMA=1"
+ ++ optional enableScreen "-DENABLE_SCREEN=1";
+
+ nativeBuildInputs = [
+ dbus
+ cmake
+ pkgconfig
+ ];
+
+ buildInputs = with lib; [
+ glib
+ udev
+ polkit
+ libmodule
+
+ pcre
+ libXdmcp
+ utillinux
+ libpthreadstubs
+ ] ++ optional enableDdc ddcutil
+ ++ optional enableDpms libXext
+ ++ optional enableGamma libXrandr;
+
+ postInstall = ''
+ mkdir -p $out/bin
+ ln -svT $out/lib/clightd/clightd $out/bin/clightd
+ '';
+
+ meta = with lib; {
+ description = "Linux bus interface that changes screen brightness/temperature";
+ homepage = https://github.com/FedeDP/Clightd;
+ platforms = platforms.linux;
+ license = licenses.gpl3;
+ maintainers = with maintainers; [
+ eadwu
+ ];
+ };
+}
diff --git a/pkgs/applications/misc/clight/default.nix b/pkgs/applications/misc/clight/default.nix
new file mode 100644
index 000000000000..829fd4e12231
--- /dev/null
+++ b/pkgs/applications/misc/clight/default.nix
@@ -0,0 +1,57 @@
+{ lib, stdenv, fetchFromGitHub
+, dbus, cmake, pkgconfig, bash-completion
+, gsl, popt, clightd, systemd, libconfig
+, withGeoclue ? true, geoclue2
+, withUpower ? true, upower }:
+
+stdenv.mkDerivation rec {
+ pname = "clight";
+ version = "3.1";
+
+ src = fetchFromGitHub {
+ owner = "FedeDP";
+ repo = "Clight";
+ rev = version;
+ sha256 = "0rzcr1x9h4llnmklhgzs9r7xwhsrw1qkqvfffkp8fs90nycaqx81";
+ };
+
+ # bash-completion.pc completionsdir=${bash-completion.out}
+ COMPLETIONS_DIR = "${placeholder "out"}/share/bash-completions/completions";
+ # dbus-1.pc has datadir=/etc
+ SESSION_BUS_DIR = "${placeholder "out"}/share/dbus-1/services";
+
+ postPatch = ''
+ sed -i "s@/usr@$out@" CMakeLists.txt
+ sed -i "s@/etc@$out\0@" CMakeLists.txt
+ sed -i "s@pkg_get_variable(COMPLETIONS_DIR.*@set(COMPLETIONS_DIR $COMPLETIONS_DIR)@" CMakeLists.txt
+ sed -i "s@pkg_get_variable(SESSION_BUS_DIR.*@set(SESSION_BUS_DIR $SESSION_BUS_DIR)@" CMakeLists.txt
+ '';
+
+ nativeBuildInputs = [
+ dbus
+ cmake
+ pkgconfig
+ bash-completion
+ ];
+
+ buildInputs = with lib; [
+ gsl
+ popt
+ upower
+ clightd
+ systemd
+ geoclue2
+ libconfig
+ ] ++ optional withGeoclue geoclue2
+ ++ optional withUpower upower;
+
+ meta = with lib; {
+ description = "A C daemon that turns your webcam into a light sensor";
+ homepage = https://github.com/FedeDP/Clight;
+ platforms = platforms.linux;
+ license = licenses.gpl3;
+ maintainers = with maintainers; [
+ eadwu
+ ];
+ };
+}
diff --git a/pkgs/applications/misc/clipit/default.nix b/pkgs/applications/misc/clipit/default.nix
index 4477cbbcc06a..129516a44982 100644
--- a/pkgs/applications/misc/clipit/default.nix
+++ b/pkgs/applications/misc/clipit/default.nix
@@ -1,19 +1,19 @@
-{ fetchurl, stdenv, intltool, pkgconfig, gtk2, xdotool, hicolor-icon-theme }:
+{ fetchurl, stdenv, intltool, pkgconfig, gtk2, xdotool }:
stdenv.mkDerivation rec {
- name = "clipit-${version}";
+ pname = "clipit";
version = "1.4.2";
src = fetchurl {
- url = "https://github.com/downloads/shantzu/ClipIt/${name}.tar.gz";
+ url = "https://github.com/downloads/shantzu/ClipIt/${pname}-${version}.tar.gz";
sha256 = "0jrwn8qfgb15rwspdp1p8hb1nc0ngmpvgr87d4k3lhlvqg2cfqva";
};
nativeBuildInputs = [ pkgconfig ];
- buildInputs = [ intltool gtk2 xdotool hicolor-icon-theme ];
+ buildInputs = [ intltool gtk2 xdotool ];
meta = with stdenv.lib; {
- description = "Lightweight GTK+ Clipboard Manager";
+ description = "Lightweight GTK Clipboard Manager";
homepage = "http://clipit.rspwn.com";
license = licenses.gpl3;
platforms = platforms.linux;
diff --git a/pkgs/applications/misc/clipmenu/default.nix b/pkgs/applications/misc/clipmenu/default.nix
index e6e4ede6ac14..7577c0a3db99 100644
--- a/pkgs/applications/misc/clipmenu/default.nix
+++ b/pkgs/applications/misc/clipmenu/default.nix
@@ -3,7 +3,7 @@ let
runtimePath = lib.makeBinPath [ clipnotify xsel dmenu utillinux gawk ];
in
stdenv.mkDerivation rec {
- name = "clipmenu-${version}";
+ pname = "clipmenu";
version = "5.6.0";
src = fetchFromGitHub {
diff --git a/pkgs/applications/misc/cmatrix/default.nix b/pkgs/applications/misc/cmatrix/default.nix
index 28f14cc1435f..cc57e58c56a4 100644
--- a/pkgs/applications/misc/cmatrix/default.nix
+++ b/pkgs/applications/misc/cmatrix/default.nix
@@ -1,25 +1,25 @@
-{ stdenv, fetchurl, pkgconfig, ncurses }:
+{ stdenv, fetchFromGitHub, autoreconfHook, ncurses }:
-let
- version = "1.2a";
-in with stdenv.lib;
stdenv.mkDerivation rec {
+ pname = "cmatrix";
+ version = "2.0";
- name = "cmatrix-${version}";
-
- src = fetchurl{
- url = "http://www.asty.org/cmatrix/dist/${name}.tar.gz";
- sha256 = "0k06fw2n8nzp1pcdynhajp5prba03gfgsbj91bknyjr5xb5fd9hz";
+ src = fetchFromGitHub {
+ owner = "abishekvashok";
+ repo = "cmatrix";
+ rev = "v${version}";
+ sha256 = "1h9jz4m4s5l8c3figaq46ja0km1gimrkfxm4dg7mf4s84icmasbm";
};
- nativeBuildInputs = [ pkgconfig ];
+ nativeBuildInputs = [ autoreconfHook ];
buildInputs = [ ncurses ];
- meta = {
+ meta = with stdenv.lib; {
description = "Simulates the falling characters theme from The Matrix movie";
+ license = licenses.gpl3;
longDescription = ''
CMatrix simulates the display from "The Matrix" and is based
- on the screensaver from the movie's website.
+ on the screensaver from the movie's website.
'';
homepage = http://www.asty.org/cmatrix/;
platforms = ncurses.meta.platforms;
diff --git a/pkgs/applications/misc/cointop/default.nix b/pkgs/applications/misc/cointop/default.nix
index c29d8684c902..099b06c078d4 100644
--- a/pkgs/applications/misc/cointop/default.nix
+++ b/pkgs/applications/misc/cointop/default.nix
@@ -1,6 +1,6 @@
-{ lib, buildGoModule, fetchFromGitHub }:
+{ lib, buildGoPackage, fetchFromGitHub }:
-buildGoModule rec {
+buildGoPackage rec {
pname = "cointop";
version = "1.3.4";
@@ -11,7 +11,7 @@ buildGoModule rec {
sha256 = "0nw6vzp0c5r8bwnlvgzj4hzdah44p5pp03d2bcr1lkw8np8fy65n";
};
- modSha256 = "1fg5h689s6r79qa9qsmd8hcvyihfyzlvqrhhk0qyfl528ipi1zwg";
+ goPackagePath = "github.com/miguelmota/cointop";
meta = with lib; {
description = "The fastest and most interactive terminal based UI application for tracking cryptocurrencies";
diff --git a/pkgs/applications/misc/confclerk/default.nix b/pkgs/applications/misc/confclerk/default.nix
index 3851730c4596..b07e0fb8c520 100644
--- a/pkgs/applications/misc/confclerk/default.nix
+++ b/pkgs/applications/misc/confclerk/default.nix
@@ -2,7 +2,8 @@
let version = "0.6.4"; in
stdenv.mkDerivation {
- name = "confclerk-${version}";
+ pname = "confclerk";
+ inherit version;
src = fetchurl {
url = "https://www.toastfreeware.priv.at/tarballs/confclerk/confclerk-${version}.tar.gz";
diff --git a/pkgs/applications/misc/cool-retro-term/default.nix b/pkgs/applications/misc/cool-retro-term/default.nix
index bd49323b03f1..c9dcc97d5cd1 100644
--- a/pkgs/applications/misc/cool-retro-term/default.nix
+++ b/pkgs/applications/misc/cool-retro-term/default.nix
@@ -3,7 +3,7 @@
mkDerivation rec {
version = "1.1.1";
- name = "cool-retro-term-${version}";
+ pname = "cool-retro-term";
src = fetchFromGitHub {
owner = "Swordfish90";
diff --git a/pkgs/applications/misc/copyq/default.nix b/pkgs/applications/misc/copyq/default.nix
index 3ee357ce151b..825053483a4b 100644
--- a/pkgs/applications/misc/copyq/default.nix
+++ b/pkgs/applications/misc/copyq/default.nix
@@ -1,26 +1,26 @@
-{ stdenv, fetchFromGitHub, cmake, qtbase, qtscript, qtwebkit, libXfixes, libXtst
-, qtx11extras, git
+{ lib, mkDerivation, fetchFromGitHub, cmake
+, qtbase, qtscript, qtwebkit, libXfixes, libXtst, qtx11extras, git
, webkitSupport ? true
}:
-stdenv.mkDerivation rec {
- name = "CopyQ-${version}";
- version = "3.9.0";
+mkDerivation rec {
+ pname = "CopyQ";
+ version = "3.9.2";
src = fetchFromGitHub {
owner = "hluk";
repo = "CopyQ";
rev = "v${version}";
- sha256 = "1l9f0hg2ggy944sjlyiyglln5mjm9fvgmvwp3pnvmmc6mfbmslq3";
+ sha256 = "02zs444i7hnqishs1i6vp8ffjxlxk3xkrw935pdwnwppv9s9v202";
};
nativeBuildInputs = [ cmake ];
buildInputs = [
git qtbase qtscript libXfixes libXtst qtx11extras
- ] ++ stdenv.lib.optional webkitSupport qtwebkit;
+ ] ++ lib.optional webkitSupport qtwebkit;
- meta = with stdenv.lib; {
+ meta = with lib; {
homepage = https://hluk.github.io/CopyQ;
description = "Clipboard Manager with Advanced Features";
license = licenses.gpl3;
diff --git a/pkgs/applications/misc/cpp-ethereum/default.nix b/pkgs/applications/misc/cpp-ethereum/default.nix
index 4d9975192461..0e9ff40cffa4 100644
--- a/pkgs/applications/misc/cpp-ethereum/default.nix
+++ b/pkgs/applications/misc/cpp-ethereum/default.nix
@@ -17,7 +17,7 @@
, extraCmakeFlags ? []
}:
stdenv.mkDerivation rec {
- name = "cpp-ethereum-${version}";
+ pname = "cpp-ethereum";
version = "1.3.0";
src = fetchFromGitHub {
diff --git a/pkgs/applications/misc/ctodo/default.nix b/pkgs/applications/misc/ctodo/default.nix
index 0123e0c38d74..72918a40733b 100644
--- a/pkgs/applications/misc/ctodo/default.nix
+++ b/pkgs/applications/misc/ctodo/default.nix
@@ -1,7 +1,7 @@
{ stdenv, cmake, fetchurl, ncurses, readline }:
stdenv.mkDerivation rec {
- name = "ctodo-${version}";
+ pname = "ctodo";
version = "1.3";
src = fetchurl {
diff --git a/pkgs/applications/misc/cura/default.nix b/pkgs/applications/misc/cura/default.nix
index 290801ea5781..702a9c585a31 100644
--- a/pkgs/applications/misc/cura/default.nix
+++ b/pkgs/applications/misc/cura/default.nix
@@ -1,21 +1,21 @@
{ mkDerivation, lib, fetchFromGitHub, cmake, python3, qtbase, qtquickcontrols2, qtgraphicaleffects, curaengine, plugins ? [] }:
mkDerivation rec {
- name = "cura-${version}";
- version = "4.1.0";
+ pname = "cura";
+ version = "4.3.0";
src = fetchFromGitHub {
owner = "Ultimaker";
repo = "Cura";
rev = version;
- sha256 = "1mfpnjrh3splpkadgml3v71k939g56zb9hbmzghwfjwlrf8valmz";
+ sha256 = "1wf60qr0wqsci5skp55qr8h56s3x5s2icxbn58ia9s4a5hhvnsmf";
};
materials = fetchFromGitHub {
owner = "Ultimaker";
repo = "fdm_materials";
rev = version;
- sha256 = "0yp2162msxfwpixzvassn23p7r3swjpwk4nhsjka5w6fm8pv0wpl";
+ sha256 = "141cv1f2pv2pznhgj32zg8bw3kmw9002g6rx16jq7lhclr0x3xls";
};
buildInputs = [ qtbase qtquickcontrols2 qtgraphicaleffects ];
@@ -29,6 +29,11 @@ mkDerivation rec {
"-DCURA_VERSION=${version}"
];
+ makeWrapperArgs = [
+ # hacky workaround for https://github.com/NixOS/nixpkgs/issues/59901
+ "--set OMP_NUM_THREADS 1"
+ ];
+
postPatch = ''
sed -i 's,/python''${PYTHON_VERSION_MAJOR}/dist-packages,/python''${PYTHON_VERSION_MAJOR}.''${PYTHON_VERSION_MINOR}/site-packages,g' CMakeLists.txt
sed -i 's, executable_name = .*, executable_name = "${curaengine}/bin/CuraEngine",' plugins/CuraEngineBackend/CuraEngineBackend.py
@@ -45,6 +50,7 @@ mkDerivation rec {
postFixup = ''
wrapPythonPrograms
+ wrapQtApp $out/bin/cura
'';
meta = with lib; {
@@ -52,6 +58,6 @@ mkDerivation rec {
homepage = https://github.com/Ultimaker/Cura;
license = licenses.lgpl3Plus;
platforms = platforms.linux;
- maintainers = with maintainers; [ abbradar ];
+ maintainers = with maintainers; [ abbradar gebner ];
};
}
diff --git a/pkgs/applications/misc/cura/lulzbot.nix b/pkgs/applications/misc/cura/lulzbot.nix
deleted file mode 100644
index f3f1972f6e6e..000000000000
--- a/pkgs/applications/misc/cura/lulzbot.nix
+++ /dev/null
@@ -1,58 +0,0 @@
-{ stdenv, fetchurl, dpkg, bash, python27Packages }:
-
-let
- py = python27Packages;
-in
-stdenv.mkDerivation rec {
- name = "cura-lulzbot-${version}";
- version = "15.02.1-1.03-5064";
-
- src =
- if stdenv.hostPlatform.system == "x86_64-linux" then
- fetchurl {
- url = "https://download.alephobjects.com/ao/aodeb/dists/jessie/main/binary-amd64/cura_${version}_amd64.deb";
- sha256 = "1gsfidg3gim5pjbl82vkh0cw4ya253m4p7nirm8nr6yjrsirkzxg";
- }
- else if stdenv.hostPlatform.system == "i686-linux" then
- fetchurl {
- url = "http://download.alephobjects.com/ao/aodeb/dists/jessie/main/binary-i386/cura_${version}_i386.deb";
- sha256 = "0xd3df6bxq4rijgvsqvps454jkc1nzhxbdzzj6j2w317ppsbhyc1";
- }
- else throw "${name} is not supported on ${stdenv.hostPlatform.system}";
-
- python_deps = with py; [ pyopengl pyserial numpy wxPython30 power setuptools ];
- pythonPath = python_deps;
- propagatedBuildInputs = python_deps;
- buildInputs = [ dpkg bash py.wrapPython ];
-
- phases = [ "unpackPhase" "installPhase" ];
- unpackPhase = "dpkg-deb -x ${src} ./";
-
- installPhase = ''
- mkdir -p $out/bin
- cp -r usr/share $out/share
- find $out/share -type f -exec sed -i 's|/usr/share/cura|$out/share/cura|g' "{}" \;
-
- cat < $out/bin/cura
- #!${bash}/bin/bash
- PYTHONPATH=$PYTHONPATH:$out/share/cura ${py.python}/bin/python $out/share/cura/cura.py "\$@"
- EOT
-
- chmod 555 $out/bin/cura
- '';
-
- meta = with stdenv.lib; {
- description = "3D printing host software for the Lulzbot";
-
- longDescription = ''
- Cura LulzBot Edition is a fork of the 3D printing/slicing
- software from Ultimaker, with changes to support 3D printers
- from Aleph Objects.
- '';
-
- homepage = https://www.lulzbot.com/cura/;
- license = licenses.agpl3;
- platforms = platforms.linux;
- maintainers = with maintainers; [ pjones ];
- };
-}
diff --git a/pkgs/applications/misc/cura/lulzbot/curaengine.nix b/pkgs/applications/misc/cura/lulzbot/curaengine.nix
new file mode 100644
index 000000000000..90f5f307d853
--- /dev/null
+++ b/pkgs/applications/misc/cura/lulzbot/curaengine.nix
@@ -0,0 +1,26 @@
+{ stdenv, callPackage, fetchgit, fetchpatch, cmake, libarcusLulzbot, stb, protobuf }:
+
+stdenv.mkDerivation rec {
+ pname = "curaengine-lulzBot";
+ version = "3.6.18";
+
+ src = fetchgit {
+ url = https://code.alephobjects.com/source/curaengine-lulzbot.git;
+ rev = "ec6a1a0f0aa387ef97e5c106633cf8d7fb9cd00d";
+ sha256 = "0wdkvg1hmqp1gaym804lw09x4ngf5ffasd861jhflpy7djbmkfn8";
+ };
+
+ nativeBuildInputs = [ cmake ];
+ buildInputs = [ libarcusLulzbot stb protobuf ];
+
+ cmakeFlags = [ "-DCURA_ENGINE_VERSION=${version}" ];
+
+ meta = with stdenv.lib; {
+ description = "A powerful, fast and robust engine for processing 3D models into 3D printing instruction";
+ homepage = https://code.alephobjects.com/source/curaengine-lulzbot/;
+ license = licenses.agpl3;
+ platforms = platforms.linux;
+ maintainers = with maintainers; [ chaduffy ];
+ };
+}
+
diff --git a/pkgs/applications/misc/cura/lulzbot/default.nix b/pkgs/applications/misc/cura/lulzbot/default.nix
new file mode 100644
index 000000000000..2d32d1895f9b
--- /dev/null
+++ b/pkgs/applications/misc/cura/lulzbot/default.nix
@@ -0,0 +1,78 @@
+{ lib, callPackage, fetchgit, cmake, jq, python3Packages, qtbase, qtquickcontrols2 }:
+
+let
+ # admittedly, we're using (printer firmware) blobs when we could compile them ourselves.
+ curaBinaryDataVersion = "3.6.18"; # Marlin v2.0.0.144. Keep this accurate wrt. the below.
+ curaBinaryData = fetchgit {
+ url = https://code.alephobjects.com/diffusion/CBD/cura-binary-data.git;
+ rev = "cdc046494bbfe1f65bfb34659a257eef9a0100a0";
+ sha256 = "0v0s036gxdjiglas2yzw95alv60sw3pq5k1zrrhmw9mxr4irrblb";
+ };
+
+ libarcusLulzbot = callPackage ./libarcus.nix {
+ inherit (python3Packages) buildPythonPackage sip pythonOlder;
+ };
+ libsavitarLulzbot = callPackage ./libsavitar.nix {
+ inherit (python3Packages) buildPythonPackage sip pythonOlder;
+ };
+
+ inherit (python3Packages) buildPythonPackage pyqt5 numpy scipy shapely pythonOlder;
+ curaengine = callPackage ./curaengine.nix {
+ inherit libarcusLulzbot;
+ };
+ uraniumLulzbot = callPackage ./uranium.nix {
+ inherit callPackage libarcusLulzbot;
+ inherit (python3Packages) buildPythonPackage pyqt5 numpy scipy shapely pythonOlder;
+ };
+in
+python3Packages.buildPythonApplication rec {
+ name = "cura-lulzbot-${version}";
+ version = "3.6.18";
+
+ src = fetchgit {
+ url = https://code.alephobjects.com/source/cura-lulzbot.git;
+ rev = "71f1ac5a2b9f535175a3858a565930348358a9ca";
+ sha256 = "0by06fpxvdgy858lwhsccbmvkdq67j2s1cz8v6jnrnjrsxk7vzka";
+ };
+
+ format = "other"; # using cmake to build
+ buildInputs = [ qtbase qtquickcontrols2 ];
+ # numpy-stl temporarily disabled due to https://code.alephobjects.com/T8415
+ propagatedBuildInputs = with python3Packages; [ pyserial requests zeroconf ] ++ [ libsavitarLulzbot uraniumLulzbot libarcusLulzbot ]; # numpy-stl
+ nativeBuildInputs = [ cmake python3Packages.wrapPython ];
+
+ cmakeFlags = [
+ "-DURANIUM_DIR=${uraniumLulzbot.src}"
+ "-DCURA_VERSION=${version}"
+ ];
+
+ postPatch = ''
+ sed -i 's,/python''${PYTHON_VERSION_MAJOR}/dist-packages,/python''${PYTHON_VERSION_MAJOR}.''${PYTHON_VERSION_MINOR}/site-packages,g' CMakeLists.txt
+ sed -i 's, executable_name = .*, executable_name = "${curaengine}/bin/CuraEngine",' plugins/CuraEngineBackend/CuraEngineBackend.py
+ '';
+
+ preFixup = ''
+ substituteInPlace "$out/bin/cura-lulzbot" --replace 'import cura.CuraApplication' 'import Savitar; import cura.CuraApplication'
+ ln -sT "${curaBinaryData}/cura/resources/firmware" "$out/share/cura/resources/firmware"
+ ln -sT "${uraniumLulzbot}/share/uranium" "$out/share/uranium"
+ ${jq}/bin/jq --arg out "$out" '.build=$out' >"$out/version.json" <<'EOF'
+ ${builtins.toJSON {
+ cura = version;
+ cura_version = version;
+ binarydata = curaBinaryDataVersion;
+ engine = curaengine.version;
+ libarcus = libarcusLulzbot.version;
+ libsavitar = libsavitarLulzbot.version;
+ uranium = uraniumLulzbot.version;
+ }}
+ EOF
+ '';
+
+ meta = with lib; {
+ description = "3D printer / slicing GUI built on top of the Uranium framework";
+ homepage = https://code.alephobjects.com/diffusion/CURA/;
+ license = licenses.agpl3; # a partial relicense to LGPL has happened, but not certain that all AGPL bits are expunged
+ platforms = platforms.linux;
+ maintainers = with maintainers; [ chaduffy ];
+ };
+}
diff --git a/pkgs/applications/misc/cura/lulzbot/libarcus.nix b/pkgs/applications/misc/cura/lulzbot/libarcus.nix
new file mode 100644
index 000000000000..4d32328af8b2
--- /dev/null
+++ b/pkgs/applications/misc/cura/lulzbot/libarcus.nix
@@ -0,0 +1,33 @@
+{ stdenv, buildPythonPackage, fetchgit, fetchurl, cmake, sip, protobuf, pythonOlder }:
+
+buildPythonPackage {
+ pname = "libarcus";
+ version = "3.6.18";
+ format = "other";
+
+ src = fetchgit {
+ url = https://code.alephobjects.com/source/arcus.git;
+ rev = "c795c0644591703ce04e1fd799fc97b1539031aa";
+ sha256 = "1yap9wbqxbjx3kqyqcsldny4mlcm33ywiwpdjlfgs0wjahfg4ip0";
+ };
+
+ disabled = pythonOlder "3.4.0";
+
+ propagatedBuildInputs = [ sip ];
+ nativeBuildInputs = [ cmake ];
+ buildInputs = [ protobuf ];
+
+ postPatch = ''
+ # To workaround buggy SIP detection which overrides PYTHONPATH
+ sed -i '/SET(ENV{PYTHONPATH}/d' cmake/FindSIP.cmake
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Communication library between internal components for Ultimaker software";
+ homepage = https://code.alephobjects.com/source/arcus/;
+ license = licenses.lgpl3Plus;
+ platforms = platforms.linux;
+ maintainers = with maintainers; [ chaduffy ];
+ };
+}
+
diff --git a/pkgs/applications/misc/cura/lulzbot/libsavitar.nix b/pkgs/applications/misc/cura/lulzbot/libsavitar.nix
new file mode 100644
index 000000000000..f8ffbf041bda
--- /dev/null
+++ b/pkgs/applications/misc/cura/lulzbot/libsavitar.nix
@@ -0,0 +1,33 @@
+{ stdenv, buildPythonPackage, pythonOlder, fetchgit, cmake, sip }:
+
+buildPythonPackage {
+ pname = "libsavitar-lulzbot";
+ name = "libsavitar-lulzbot";
+ version = "3.6.18";
+ format = "other";
+
+ src = fetchgit {
+ url = https://code.alephobjects.com/source/savitar.git;
+ rev = "988a26d35b2a1d042f8c38938ccda77ab146af7d";
+ sha256 = "146agw3a92azkgs5ahmn2rrck4an78m2r3pcss6ihmb60lx165k7";
+ };
+
+ postPatch = ''
+ # To workaround buggy SIP detection which overrides PYTHONPATH
+ sed -i '/SET(ENV{PYTHONPATH}/d' cmake/FindSIP.cmake
+ '';
+
+ nativeBuildInputs = [ cmake ];
+
+ propagatedBuildInputs = [ sip ];
+
+ disabled = pythonOlder "3.4.0";
+
+ meta = with stdenv.lib; {
+ description = "C++ implementation of 3mf loading with SIP python bindings";
+ homepage = https://github.com/Ultimaker/libSavitar;
+ license = licenses.lgpl3Plus;
+ platforms = platforms.unix;
+ maintainers = with maintainers; [ chaduffy ];
+ };
+}
diff --git a/pkgs/applications/misc/cura/lulzbot/uranium-qt512-support.patch b/pkgs/applications/misc/cura/lulzbot/uranium-qt512-support.patch
new file mode 100644
index 000000000000..2c666a98c8f7
--- /dev/null
+++ b/pkgs/applications/misc/cura/lulzbot/uranium-qt512-support.patch
@@ -0,0 +1,16 @@
+diff --git a/UM/Qt/Bindings/i18nCatalogProxy.py b/UM/Qt/Bindings/i18nCatalogProxy.py
+index 7e2bb16c..cec70dd6 100644
+--- a/UM/Qt/Bindings/i18nCatalogProxy.py
++++ b/UM/Qt/Bindings/i18nCatalogProxy.py
+@@ -86,9 +86,9 @@ class i18nCatalogProxy(QObject): # [CodeStyle: Ultimaker code style requires cla
+ # \todo Move this to a more generic place so more things can use it.
+ def _wrapFunction(self, engine, this_object, function):
+ # JavaScript code that wraps the Python method call in a closure
+- wrap_js = """function(this_object) {{
++ wrap_js = """(function(this_object) {{
+ return function({args}) {{ return this_object.{function}({args}) }}
+- }}"""
++ }})"""
+
+ # Get the function name and argument list.
+ function_name = function.__name__
diff --git a/pkgs/applications/misc/cura/lulzbot/uranium.nix b/pkgs/applications/misc/cura/lulzbot/uranium.nix
new file mode 100644
index 000000000000..1ad755cdfbdd
--- /dev/null
+++ b/pkgs/applications/misc/cura/lulzbot/uranium.nix
@@ -0,0 +1,41 @@
+{ stdenv, callPackage, fetchurl, fetchgit, buildPythonPackage, fetchFromGitHub, python, cmake
+, pyqt5, numpy, scipy, shapely, libarcusLulzbot, doxygen, gettext, pythonOlder }:
+
+buildPythonPackage {
+ version = "3.6.18";
+ pname = "uranium";
+ name = "uraniumLulzbot";
+ format = "other";
+
+ src = fetchgit {
+ url = https://code.alephobjects.com/diffusion/U/uranium.git;
+ rev = "33df88a7414375ac924ac761113baa48d2ced2b4";
+ sha256 = "109cbv7y105crbrzfp70lmcr9n20ap5c97i5qd46fmxbx86yj7f8";
+ };
+
+ disabled = pythonOlder "3.5.0";
+
+ buildInputs = [ python gettext ];
+ propagatedBuildInputs = [ pyqt5 numpy scipy shapely libarcusLulzbot ];
+ nativeBuildInputs = [ cmake doxygen ];
+
+ # Qt 5.12+ support; see https://code.alephobjects.com/rU70b73ba0a270799b9eacf78e400aa8b8ab3fb2ee
+ patches = [ ./uranium-qt512-support.patch ];
+
+ postPatch = ''
+ sed -i 's,/python''${PYTHON_VERSION_MAJOR}/dist-packages,/python''${PYTHON_VERSION_MAJOR}.''${PYTHON_VERSION_MINOR}/site-packages,g' CMakeLists.txt
+ sed -i \
+ -e "s,Resources.addSearchPath(os.path.join(os.path.abspath(os.path.dirname(__file__)).*,Resources.addSearchPath(\"$out/share/uranium/resources\")," \
+ -e "s,self._plugin_registry.addPluginLocation(os.path.join(os.path.abspath(os.path.dirname(__file__)).*,self._plugin_registry.addPluginLocation(\"$out/lib/uranium/plugins\")," \
+ UM/Application.py
+ '';
+
+ meta = with stdenv.lib; {
+ description = "A Python framework for building Desktop applications";
+ homepage = https://code.alephobjects.com/diffusion/U/;
+ license = licenses.lgpl3Plus;
+ platforms = platforms.linux;
+ maintainers = with maintainers; [ chaduffy ];
+ };
+}
+
diff --git a/pkgs/applications/misc/cura/plugins.nix b/pkgs/applications/misc/cura/plugins.nix
index a5a196a78100..bdbf8f24136e 100644
--- a/pkgs/applications/misc/cura/plugins.nix
+++ b/pkgs/applications/misc/cura/plugins.nix
@@ -6,13 +6,13 @@ let
octoprint = stdenv.mkDerivation rec {
pname = "Cura-OctoPrintPlugin";
- version = "3.5.5";
+ version = "3.5.8";
src = fetchFromGitHub {
owner = "fieldOfView";
repo = pname;
- rev = "d05a9a4c1a01c584d5cec4f4b7d170077235467a";
- sha256 = "0ik69g3kbn7rz2wh0cfq9ww8x222kagd8jvsd4xlqgq4yrf0jk7x";
+ rev = "46548cbb8d32d10fe3aee12f272d5d8f34271738";
+ sha256 = "0pllba8qx1746pnf5ccbkqn2j6f8hhknpgyrrv244ykvigrlczx0";
};
nativeBuildInputs = [ cmake ];
diff --git a/pkgs/applications/misc/cura/stable.nix b/pkgs/applications/misc/cura/stable.nix
index a53b001b0e98..1972042f805e 100644
--- a/pkgs/applications/misc/cura/stable.nix
+++ b/pkgs/applications/misc/cura/stable.nix
@@ -4,7 +4,8 @@ let
version = "15.04";
in
stdenv.mkDerivation rec {
- name = "cura-${version}";
+ pname = "cura";
+ inherit version;
src = fetchurl {
url = "https://github.com/daid/Cura/archive/${version}.tar.gz";
diff --git a/pkgs/applications/misc/curabydagoma/default.nix b/pkgs/applications/misc/curabydagoma/default.nix
index 4e620425d5c3..a367efaaef38 100644
--- a/pkgs/applications/misc/curabydagoma/default.nix
+++ b/pkgs/applications/misc/curabydagoma/default.nix
@@ -14,7 +14,7 @@
# If, however, someone needs it, we certainly can find a solution.
stdenv.mkDerivation rec {
- name = "curabydagoma-${version}";
+ pname = "curabydagoma";
# Version is the date, UNIX format
version = "1520506579";
# Hash of the user's choice: os, arch, package type...
diff --git a/pkgs/applications/misc/curaengine/default.nix b/pkgs/applications/misc/curaengine/default.nix
index a7339acddee2..06c5d1585652 100644
--- a/pkgs/applications/misc/curaengine/default.nix
+++ b/pkgs/applications/misc/curaengine/default.nix
@@ -1,14 +1,14 @@
{ stdenv, fetchFromGitHub, cmake, libarcus, stb, protobuf }:
stdenv.mkDerivation rec {
- name = "curaengine-${version}";
- version = "4.1.0";
+ pname = "curaengine";
+ version = "4.3.0";
src = fetchFromGitHub {
owner = "Ultimaker";
repo = "CuraEngine";
rev = version;
- sha256 = "14zy9ir46vndsi4l8kapm6byw02fimm7ava2rfi0kvcckf5yq9w8";
+ sha256 = "074qcaj1v2ri9wppx9lr066nlidkrsp9m1rrrk2hs2b61x0340ff";
};
nativeBuildInputs = [ cmake ];
@@ -21,6 +21,6 @@ stdenv.mkDerivation rec {
homepage = https://github.com/Ultimaker/CuraEngine;
license = licenses.agpl3;
platforms = platforms.linux;
- maintainers = with maintainers; [ abbradar ];
+ maintainers = with maintainers; [ abbradar gebner ];
};
}
diff --git a/pkgs/applications/misc/curaengine/stable.nix b/pkgs/applications/misc/curaengine/stable.nix
index ce743a008798..41f110e9ee10 100644
--- a/pkgs/applications/misc/curaengine/stable.nix
+++ b/pkgs/applications/misc/curaengine/stable.nix
@@ -3,7 +3,8 @@ let
version = "15.04.6";
in
stdenv.mkDerivation {
- name = "curaengine-${version}";
+ pname = "curaengine";
+ inherit version;
src = fetchurl {
url = "https://github.com/Ultimaker/CuraEngine/archive/${version}.tar.gz";
diff --git a/pkgs/applications/misc/dbeaver/default.nix b/pkgs/applications/misc/dbeaver/default.nix
index 3e1a87a641b4..191c6a31972b 100644
--- a/pkgs/applications/misc/dbeaver/default.nix
+++ b/pkgs/applications/misc/dbeaver/default.nix
@@ -6,8 +6,8 @@
# See `pkgs/applications/editors/eclipse/*.nix`
stdenv.mkDerivation rec {
- name = "dbeaver-ce-${version}";
- version = "6.1.3";
+ pname = "dbeaver-ce";
+ version = "6.2.3";
desktopItem = makeDesktopItem {
name = "dbeaver";
@@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "https://dbeaver.io/files/${version}/dbeaver-ce-${version}-linux.gtk.x86_64.tar.gz";
- sha256 = "1ngfypx0wbq98rv791zls07h46rnj69qixpslw0xn9bb3ky4snbf";
+ sha256 = "1v4sllzvaz4fj8s14ddzw11wczlghbdppv8fl5jg6xglg687sgaj";
};
installPhase = ''
@@ -65,6 +65,6 @@ stdenv.mkDerivation rec {
'';
license = licenses.asl20;
platforms = [ "x86_64-linux" ];
- maintainers = [ maintainers.samueldr ];
+ maintainers = [ maintainers.jojosch ];
};
}
diff --git a/pkgs/applications/misc/ddgr/default.nix b/pkgs/applications/misc/ddgr/default.nix
index b010e5401b80..9b877c2594b3 100644
--- a/pkgs/applications/misc/ddgr/default.nix
+++ b/pkgs/applications/misc/ddgr/default.nix
@@ -1,20 +1,26 @@
{stdenv, fetchFromGitHub, python3}:
stdenv.mkDerivation rec {
- version = "1.6";
- name = "ddgr-${version}";
+ version = "1.7";
+ pname = "ddgr";
src = fetchFromGitHub {
owner = "jarun";
repo = "ddgr";
rev = "v${version}";
- sha256 = "04ybbjsf9hpn2p5cjjm15cwvv0mwrmdi19iifrym6ps3rmll0p3c";
+ sha256 = "0kcl8z9w8iwn3pxay1pfahhw6vs2l1dp60yfv3i19in4ac9va7m0";
};
buildInputs = [ python3 ];
makeFlags = "PREFIX=$(out)";
+ preBuild = ''
+ # Version 1.7 was released as 1.6
+ # https://github.com/jarun/ddgr/pull/95
+ sed -i "s/_VERSION_ = '1.6'/_VERSION_ = '1.7'/" ddgr
+ '';
+
postInstall = ''
mkdir -p "$out/share/bash-completion/completions/"
cp "auto-completion/bash/ddgr-completion.bash" "$out/share/bash-completion/completions/"
diff --git a/pkgs/applications/misc/deco/default.nix b/pkgs/applications/misc/deco/default.nix
index 7f4629100d5d..a1fdabd8ccb1 100644
--- a/pkgs/applications/misc/deco/default.nix
+++ b/pkgs/applications/misc/deco/default.nix
@@ -3,7 +3,6 @@
stdenv.mkDerivation rec {
pname = "deco";
version = "0.0.2";
- name = "${pname}-${version}";
src = fetchFromGitHub {
owner = "ebzzry";
diff --git a/pkgs/applications/misc/devilspie2/default.nix b/pkgs/applications/misc/devilspie2/default.nix
index 4fb9ca5fa713..5699396a0840 100644
--- a/pkgs/applications/misc/devilspie2/default.nix
+++ b/pkgs/applications/misc/devilspie2/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchurl, intltool, pkgconfig, glib, gtk, lua, libwnck3 }:
stdenv.mkDerivation rec {
- name = "devilspie2-${version}";
+ pname = "devilspie2";
version = "0.43";
src = fetchurl {
diff --git a/pkgs/applications/misc/dfilemanager/default.nix b/pkgs/applications/misc/dfilemanager/default.nix
index eeb7a8ccf526..1bfb6bbfeaf3 100644
--- a/pkgs/applications/misc/dfilemanager/default.nix
+++ b/pkgs/applications/misc/dfilemanager/default.nix
@@ -1,10 +1,11 @@
-{ stdenv, fetchgit, cmake, file, qtbase, qttools, solid }:
+{ stdenv, mkDerivation, fetchgit, cmake, file, qtbase, qttools, solid }:
let
version = "git-2016-01-10";
in
-stdenv.mkDerivation {
- name = "dfilemanager-${version}";
+mkDerivation {
+ pname = "dfilemanager";
+ inherit version;
src = fetchgit {
url = "git://git.code.sf.net/p/dfilemanager/code";
rev = "2c5078b05e0ad74c037366be1ab3e6a03492bde4";
@@ -13,7 +14,7 @@ stdenv.mkDerivation {
buildInputs = [ cmake qtbase qttools file solid ];
- cmakeFlags = "-DQT5BUILD=true";
+ cmakeFlags = [ "-DQT5BUILD=true" ];
meta = {
homepage = http://dfilemanager.sourceforge.net/;
diff --git a/pkgs/applications/misc/diff-pdf/default.nix b/pkgs/applications/misc/diff-pdf/default.nix
index 467c2b3c2d59..af47afcc601d 100644
--- a/pkgs/applications/misc/diff-pdf/default.nix
+++ b/pkgs/applications/misc/diff-pdf/default.nix
@@ -8,14 +8,14 @@ let
[ wxGTK ];
in
stdenv.mkDerivation rec {
- name = "diff-pdf-${version}";
- version = "2017-12-30";
+ pname = "diff-pdf";
+ version = "0.3";
src = fetchFromGitHub {
owner = "vslavik";
repo = "diff-pdf";
- rev = "c4d67226ec4c29b30a7399e75f80636ff8a6f9fc";
- sha256 = "1c3ig7ckrg37p5vzvgjnsfdzdad328wwsx0r31lbs1d8pkjkgq3m";
+ rev = "v${version}";
+ sha256 = "0vzvyjpk6m89zs6j1dq85f93n2b1i6akn2g0z9qhagjd2pds920i";
};
nativeBuildInputs = [ autoconf automake pkgconfig ];
@@ -24,9 +24,10 @@ stdenv.mkDerivation rec {
preConfigure = "./bootstrap";
meta = with stdenv.lib; {
- homepage = http://vslavik.github.io/diff-pdf;
+ homepage = "https://vslavik.github.io/diff-pdf/";
description = "Simple tool for visually comparing two PDF files";
license = licenses.gpl2;
+ platforms = platforms.all;
maintainers = with maintainers; [ dtzWill ];
};
}
diff --git a/pkgs/applications/misc/diffpdf/default.nix b/pkgs/applications/misc/diffpdf/default.nix
index daea20835c8a..37ed8eb23fb6 100644
--- a/pkgs/applications/misc/diffpdf/default.nix
+++ b/pkgs/applications/misc/diffpdf/default.nix
@@ -2,10 +2,10 @@
stdenv.mkDerivation rec {
version = "2.1.3";
- name = "diffpdf-${version}";
+ pname = "diffpdf";
src = fetchurl {
- url = "http://www.qtrac.eu/${name}.tar.gz";
+ url = "http://www.qtrac.eu/${pname}-${version}.tar.gz";
sha256 = "0cr468fi0d512jjj23r5flfzx957vibc9c25gwwhi0d773h2w566";
};
@@ -31,9 +31,9 @@ stdenv.mkDerivation rec {
install -Dpm755 -D diffpdf $out/bin/diffpdf
install -Dpm644 -D diffpdf.1 $out/share/man/man1/diffpdf.1
- install -dpm755 $out/share/doc/${name} $out/share/licenses/${name} $out/share/icons $out/share/pixmaps $out/share/applications
- install -Dpm644 CHANGES README help.html $out/share/doc/${name}/
- install -Dpm644 gpl-2.0.txt $out/share/licenses/${name}/
+ install -dpm755 $out/share/doc/${pname}-${version} $out/share/licenses/${pname}-${version} $out/share/icons $out/share/pixmaps $out/share/applications
+ install -Dpm644 CHANGES README help.html $out/share/doc/${pname}-${version}/
+ install -Dpm644 gpl-2.0.txt $out/share/licenses/${pname}-${version}/
install -Dpm644 images/icon.png $out/share/icons/diffpdf.png
install -Dpm644 images/icon.png $out/share/pixmaps/diffpdf.png
diff --git a/pkgs/applications/misc/digitalbitbox/default.nix b/pkgs/applications/misc/digitalbitbox/default.nix
index 58bc483d43f3..a6ae45306552 100644
--- a/pkgs/applications/misc/digitalbitbox/default.nix
+++ b/pkgs/applications/misc/digitalbitbox/default.nix
@@ -47,7 +47,7 @@ let
copyUdevRuleToOutput = name: rule:
"cp ${writeText name rule} $out/etc/udev/rules.d/${name}";
in stdenv.mkDerivation rec {
- name = "digitalbitbox-${version}";
+ pname = "digitalbitbox";
version = "2.2.2";
src = fetchFromGitHub {
@@ -81,7 +81,7 @@ in stdenv.mkDerivation rec {
LUPDATE="${qttools.dev}/bin/lupdate";
LRELEASE="${qttools.dev}/bin/lrelease";
MOC="${qtbase.dev}/bin/moc";
- QTDIR="${qtbase.dev}";
+ QTDIR=qtbase.dev;
RCC="${qtbase.dev}/bin/rcc";
UIC="${qtbase.dev}/bin/uic";
@@ -138,5 +138,6 @@ in stdenv.mkDerivation rec {
vidbina
];
platforms = platforms.linux;
+ broken = true;
};
}
diff --git a/pkgs/applications/misc/direwolf/default.nix b/pkgs/applications/misc/direwolf/default.nix
index f1e33ea53571..8f7dbd2d2eda 100644
--- a/pkgs/applications/misc/direwolf/default.nix
+++ b/pkgs/applications/misc/direwolf/default.nix
@@ -5,7 +5,7 @@
with stdenv.lib;
stdenv.mkDerivation rec {
- name = "direwolf-${version}";
+ pname = "direwolf";
version = "1.4";
src = fetchFromGitHub {
diff --git a/pkgs/applications/misc/djvulibre/default.nix b/pkgs/applications/misc/djvulibre/default.nix
index 0b685e04a6fc..182ab51dbc2c 100644
--- a/pkgs/applications/misc/djvulibre/default.nix
+++ b/pkgs/applications/misc/djvulibre/default.nix
@@ -1,22 +1,34 @@
-{ stdenv, fetchurl, libjpeg, libtiff, librsvg, libiconv }:
+{ stdenv
+, fetchurl
+, libjpeg
+, libtiff
+, librsvg
+, libiconv
+}:
stdenv.mkDerivation rec {
- name = "djvulibre-3.5.27";
+ pname = "djvulibre";
+ version = "3.5.27";
src = fetchurl {
- url = "mirror://sourceforge/djvu/${name}.tar.gz";
+ url = "mirror://sourceforge/djvu/${pname}-${version}.tar.gz";
sha256 = "0psh3zl9dj4n4r3lx25390nx34xz0bg0ql48zdskhq354ljni5p6";
};
outputs = [ "bin" "dev" "out" ];
- buildInputs = [ libjpeg libtiff librsvg libiconv ];
+ buildInputs = [
+ libjpeg
+ libtiff
+ librsvg
+ libiconv
+ ];
meta = with stdenv.lib; {
- description = "A library and viewer for the DJVU file format for scanned images";
- homepage = http://djvu.sourceforge.net;
+ description = "The big set of CLI tools to make/modify/optimize/show/export DJVU files";
+ homepage = "http://djvu.sourceforge.net";
license = licenses.gpl2;
- maintainers = with maintainers; [ ];
+ maintainers = with maintainers; [ Anton-Latukha ];
platforms = platforms.all;
};
}
diff --git a/pkgs/applications/misc/dmenu/default.nix b/pkgs/applications/misc/dmenu/default.nix
index 26a297481d04..8d13ac42e1fc 100644
--- a/pkgs/applications/misc/dmenu/default.nix
+++ b/pkgs/applications/misc/dmenu/default.nix
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
description = "A generic, highly customizable, and efficient menu for the X Window System";
homepage = https://tools.suckless.org/dmenu;
license = licenses.mit;
- maintainers = with maintainers; [ pSub ];
+ maintainers = with maintainers; [ pSub globin ];
platforms = platforms.all;
};
}
diff --git a/pkgs/applications/misc/doing/default.nix b/pkgs/applications/misc/doing/default.nix
index 20c802a1cbdf..d72a5b848261 100644
--- a/pkgs/applications/misc/doing/default.nix
+++ b/pkgs/applications/misc/doing/default.nix
@@ -1,7 +1,7 @@
{ lib, bundlerEnv, ruby, bundlerUpdateScript
}:
-bundlerEnv rec {
+bundlerEnv {
pname = "doing";
version = (import ./gemset.nix).doing.version;
diff --git a/pkgs/applications/misc/doomseeker/default.nix b/pkgs/applications/misc/doomseeker/default.nix
index fd08ed9c3916..1332b265d54c 100644
--- a/pkgs/applications/misc/doomseeker/default.nix
+++ b/pkgs/applications/misc/doomseeker/default.nix
@@ -1,7 +1,7 @@
{ stdenv, cmake, fetchFromBitbucket, pkgconfig, qtbase, qttools, qtmultimedia, zlib, bzip2, xxd }:
-stdenv.mkDerivation rec {
- name = "doomseeker-${version}";
+stdenv.mkDerivation {
+ pname = "doomseeker";
version = "2018-03-05";
src = fetchFromBitbucket {
diff --git a/pkgs/applications/misc/dotfiles/default.nix b/pkgs/applications/misc/dotfiles/default.nix
index 1d3c405b7038..5150f13fb80c 100644
--- a/pkgs/applications/misc/dotfiles/default.nix
+++ b/pkgs/applications/misc/dotfiles/default.nix
@@ -2,7 +2,6 @@
pythonPackages.buildPythonApplication rec {
pname = "dotfiles";
- name = "${pname}-${version}";
version = "0.6.4";
src = pythonPackages.fetchPypi {
diff --git a/pkgs/applications/misc/dozenal/default.nix b/pkgs/applications/misc/dozenal/default.nix
index b5ae9fb567ca..226bdea03013 100644
--- a/pkgs/applications/misc/dozenal/default.nix
+++ b/pkgs/applications/misc/dozenal/default.nix
@@ -2,7 +2,7 @@
stdenv.mkDerivation rec {
version = "12010904";
- name = "dozenal-${version}";
+ pname = "dozenal";
src = fetchFromGitHub {
owner = "dgoodmaniii";
repo = "dozenal";
diff --git a/pkgs/applications/misc/eaglemode/default.nix b/pkgs/applications/misc/eaglemode/default.nix
index 6c802e683ce9..ae83802a7b44 100644
--- a/pkgs/applications/misc/eaglemode/default.nix
+++ b/pkgs/applications/misc/eaglemode/default.nix
@@ -2,11 +2,11 @@
librsvg, glib, gtk2, libXext, libXxf86vm, poppler, xineLib, ghostscript, makeWrapper }:
stdenv.mkDerivation rec {
- name = "eaglemode-${version}";
+ pname = "eaglemode";
version = "0.94.1";
src = fetchurl {
- url = "mirror://sourceforge/eaglemode/${name}.tar.bz2";
+ url = "mirror://sourceforge/eaglemode/${pname}-${version}.tar.bz2";
sha256 = "0mpnk0fzy02jxbafipkdkj48m6k38h42j599gw4sdnag7ymlms89";
};
diff --git a/pkgs/applications/misc/electron-cash/default.nix b/pkgs/applications/misc/electron-cash/default.nix
index 9607f428ab9e..d0429d135d75 100644
--- a/pkgs/applications/misc/electron-cash/default.nix
+++ b/pkgs/applications/misc/electron-cash/default.nix
@@ -2,13 +2,13 @@
python3Packages.buildPythonApplication rec {
pname = "electron-cash";
- version = "4.0.7";
+ version = "4.0.10";
src = fetchurl {
url = "https://electroncash.org/downloads/${version}/win-linux/Electron-Cash-${version}.tar.gz";
# Verified using official SHA-1 and signature from
# https://github.com/fyookball/keys-n-hashes
- sha256 = "d63ef2d52cff0b821b745067d752fd0c7f2902fa23eaf8e9392c54864cae5c77";
+ sha256 = "48270e12956a2f4ef4d2b0cb60611e47f136b734a3741dab176542a32ae59ee5";
};
propagatedBuildInputs = with python3Packages; [
@@ -56,6 +56,10 @@ python3Packages.buildPythonApplication rec {
--replace "Exec=electron-cash" "Exec=$out/bin/electron-cash"
'';
+ postFixup = ''
+ wrapQtApp $out/bin/electron-cash
+ '';
+
doInstallCheck = true;
installCheckPhase = ''
$out/bin/electron-cash help >/dev/null
diff --git a/pkgs/applications/misc/electrum/dash.nix b/pkgs/applications/misc/electrum/dash.nix
index 98ed10b0c7cc..8ba562de1cb7 100644
--- a/pkgs/applications/misc/electrum/dash.nix
+++ b/pkgs/applications/misc/electrum/dash.nix
@@ -2,7 +2,7 @@
python2Packages.buildPythonApplication rec {
version = "2.9.3.1";
- name = "electrum-dash-${version}";
+ pname = "electrum-dash";
src = fetchurl {
url = "https://github.com/akhavr/electrum-dash/releases/download/${version}/Electrum-DASH-${version}.tar.gz";
diff --git a/pkgs/applications/misc/electrum/default.nix b/pkgs/applications/misc/electrum/default.nix
index 5233aaf8fcdb..0ebeb1beffa1 100644
--- a/pkgs/applications/misc/electrum/default.nix
+++ b/pkgs/applications/misc/electrum/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, fetchFromGitHub, python3, python3Packages, zbar, secp256k1
+{ stdenv, fetchurl, fetchFromGitHub, wrapQtAppsHook, python3, python3Packages, zbar, secp256k1
, enableQt ? !stdenv.isDarwin
@@ -40,7 +40,7 @@ let
};
in
-python3Packages.buildPythonApplication rec {
+python3Packages.buildPythonApplication {
pname = "electrum";
inherit version;
@@ -54,6 +54,8 @@ python3Packages.buildPythonApplication rec {
cp -ar ${tests} $sourceRoot/electrum/tests
'';
+ nativeBuildInputs = stdenv.lib.optionals enableQt [ wrapQtAppsHook ];
+
propagatedBuildInputs = with python3Packages; [
aiorpcx
aiohttp
@@ -86,7 +88,7 @@ python3Packages.buildPythonApplication rec {
--replace ${libsecp256k1_name} ${secp256k1}/lib/libsecp256k1${stdenv.hostPlatform.extensions.sharedLibrary}
'' + (if enableQt then ''
substituteInPlace ./electrum/qrscanner.py \
- --replace ${libzbar_name} ${zbar}/lib/libzbar${stdenv.hostPlatform.extensions.sharedLibrary}
+ --replace ${libzbar_name} ${zbar.lib}/lib/libzbar${stdenv.hostPlatform.extensions.sharedLibrary}
'' else ''
sed -i '/qdarkstyle/d' contrib/requirements/requirements.txt
'');
@@ -102,6 +104,11 @@ python3Packages.buildPythonApplication rec {
"Exec=$out/bin/electrum %u" \
--replace 'Exec=sh -c "PATH=\"\\$HOME/.local/bin:\\$PATH\"; electrum --testnet %u"' \
"Exec=$out/bin/electrum --testnet %u"
+
+ '';
+
+ postFixup = stdenv.lib.optionalString enableQt ''
+ wrapQtApp $out/bin/electrum
'';
checkInputs = with python3Packages; [ pytest ];
diff --git a/pkgs/applications/misc/electrum/ltc.nix b/pkgs/applications/misc/electrum/ltc.nix
index a5e4bd74a6eb..88f44c6cc853 100644
--- a/pkgs/applications/misc/electrum/ltc.nix
+++ b/pkgs/applications/misc/electrum/ltc.nix
@@ -5,7 +5,7 @@
python3Packages.buildPythonApplication rec {
pname = "electrum-ltc";
- version = "3.1.3.1";
+ version = "3.3.8.1";
src = fetchurl {
url = "https://electrum-ltc.org/download/Electrum-LTC-${version}.tar.gz";
@@ -51,7 +51,7 @@ python3Packages.buildPythonApplication rec {
homepage = https://electrum-ltc.org/;
license = licenses.mit;
platforms = platforms.linux;
- maintainers = with maintainers; [ asymmetric ];
+ maintainers = with maintainers; [ ];
};
}
diff --git a/pkgs/applications/misc/emem/default.nix b/pkgs/applications/misc/emem/default.nix
index d447e7f50d52..62358d41cc53 100644
--- a/pkgs/applications/misc/emem/default.nix
+++ b/pkgs/applications/misc/emem/default.nix
@@ -3,7 +3,6 @@
stdenv.mkDerivation rec {
pname = "emem";
version = "0.2.50";
- name = "${pname}-${version}";
inherit jdk;
diff --git a/pkgs/applications/misc/epdfview/default.nix b/pkgs/applications/misc/epdfview/default.nix
index b6c10dbebcad..de922bb39900 100644
--- a/pkgs/applications/misc/epdfview/default.nix
+++ b/pkgs/applications/misc/epdfview/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchurl, fetchpatch, pkgconfig, gtk2, poppler }:
stdenv.mkDerivation rec {
- name = "epdfview-${version}";
+ pname = "epdfview";
version = "0.1.8";
src = fetchurl {
@@ -28,11 +28,11 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; {
homepage = https://packages.debian.org/wheezy/epdfview;
- description = "A lightweight PDF document viewer using Poppler and GTK+";
+ description = "A lightweight PDF document viewer using Poppler and GTK";
longDescription = ''
- ePDFView is a free lightweight PDF document viewer using Poppler and
- GTK+ libraries. The aim of ePDFView is to make a simple PDF document
- viewer, in the lines of Evince but without using the Gnome libraries.
+ ePDFView is a free lightweight PDF document viewer using Poppler and
+ GTK libraries. The aim of ePDFView is to make a simple PDF document
+ viewer, in the lines of Evince but without using the Gnome libraries.
'';
license = licenses.gpl2;
maintainers = [ maintainers.astsmtl ];
diff --git a/pkgs/applications/misc/et/default.nix b/pkgs/applications/misc/et/default.nix
index bf1ae3037fc4..d8b355efe86d 100644
--- a/pkgs/applications/misc/et/default.nix
+++ b/pkgs/applications/misc/et/default.nix
@@ -1,13 +1,13 @@
{ stdenv, fetchFromGitHub, pkgconfig, libnotify, gdk-pixbuf }:
stdenv.mkDerivation rec {
- name = "et-${version}";
+ pname = "et";
version = "0.1.1";
src = fetchFromGitHub {
owner = "geistesk";
repo = "et";
- rev = "${version}";
+ rev = version;
sha256 = "167w9qwfpd63rgy0xmkkkh5krmd91q42c3ijy3j099krgdfbb9bc";
};
diff --git a/pkgs/applications/misc/eterm/default.nix b/pkgs/applications/misc/eterm/default.nix
index 98b47990314d..56cac7ca9185 100644
--- a/pkgs/applications/misc/eterm/default.nix
+++ b/pkgs/applications/misc/eterm/default.nix
@@ -3,7 +3,7 @@
, pkgconfig, imlib2, libast }:
stdenv.mkDerivation rec {
- name = "eterm-${version}";
+ pname = "eterm";
version = "0.9.6";
srcName = "Eterm-${version}";
diff --git a/pkgs/applications/misc/eureka-editor/default.nix b/pkgs/applications/misc/eureka-editor/default.nix
index b8bd0a59bea2..e9d1317390ed 100644
--- a/pkgs/applications/misc/eureka-editor/default.nix
+++ b/pkgs/applications/misc/eureka-editor/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchzip, fltk, zlib, xdg_utils, xorg, libjpeg, libGL }:
stdenv.mkDerivation rec {
- name = "eureka-editor-${version}";
+ pname = "eureka-editor";
version = "1.21";
shortver = "121";
diff --git a/pkgs/applications/misc/evilvte/default.nix b/pkgs/applications/misc/evilvte/default.nix
index 4746f4ead1bb..984ade077a8a 100644
--- a/pkgs/applications/misc/evilvte/default.nix
+++ b/pkgs/applications/misc/evilvte/default.nix
@@ -3,8 +3,8 @@
configH ? ""
}:
-stdenv.mkDerivation rec {
- name = "evilvte-${version}";
+stdenv.mkDerivation {
+ pname = "evilvte";
version = "0.5.2-20140827";
src = fetchgit {
diff --git a/pkgs/applications/misc/evtest-qt/default.nix b/pkgs/applications/misc/evtest-qt/default.nix
index de75c7b68a8f..86f2d0070923 100644
--- a/pkgs/applications/misc/evtest-qt/default.nix
+++ b/pkgs/applications/misc/evtest-qt/default.nix
@@ -1,6 +1,6 @@
-{ stdenv, qtbase, cmake, fetchFromGitHub }:
+{ mkDerivation, lib, qtbase, cmake, fetchFromGitHub }:
-stdenv.mkDerivation rec {
+mkDerivation rec {
pname = "evtest-qt";
version = "0.2.0";
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
buildInputs = [ qtbase ];
- meta = with stdenv.lib; {
+ meta = with lib; {
description = "Simple input device tester for linux with Qt GUI";
homepage = "https://github.com/Grumbel/evtest-qt";
maintainers = with maintainers; [ alexarice ];
diff --git a/pkgs/applications/misc/evtest/default.nix b/pkgs/applications/misc/evtest/default.nix
index 3d715a1d16bd..d6d20367b060 100644
--- a/pkgs/applications/misc/evtest/default.nix
+++ b/pkgs/applications/misc/evtest/default.nix
@@ -1,14 +1,15 @@
{ stdenv, fetchgit, autoreconfHook, pkgconfig, libxml2 }:
stdenv.mkDerivation rec {
- name = "evtest-1.33";
+ pname = "evtest";
+ version = "1.34";
nativeBuildInputs = [ autoreconfHook pkgconfig ];
buildInputs = [ libxml2 ];
src = fetchgit {
- url = "git://anongit.freedesktop.org/evtest";
- rev = "refs/tags/evtest-1.33";
+ url = "git://anongit.freedesktop.org/${pname}";
+ rev = "refs/tags/${pname}-${version}";
sha256 = "168gdhzj11f4nk94a6z696sm8v1njzwww69bn6wr97l17897913g";
};
diff --git a/pkgs/applications/misc/exercism/default.nix b/pkgs/applications/misc/exercism/default.nix
index 21fed2e28def..ebc582730e52 100644
--- a/pkgs/applications/misc/exercism/default.nix
+++ b/pkgs/applications/misc/exercism/default.nix
@@ -1,19 +1,19 @@
-{ stdenv, buildGoPackage, fetchFromGitHub }:
+{ stdenv, buildGoModule, fetchFromGitHub }:
-buildGoPackage rec {
- name = "exercism-${version}";
- version = "3.0.11";
-
- goPackagePath = "github.com/exercism/cli";
+buildGoModule rec {
+ pname = "exercism";
+ version = "3.0.12";
src = fetchFromGitHub {
owner = "exercism";
repo = "cli";
rev = "v${version}";
- sha256 = "1wg23bvibsk6j4iqwyw35wl9plfwdqxiql81zci7r1x4d5cp26av";
+ sha256 = "1xvxcl7j5izx5lgmjd97zd28lg2sydwgbgn2cnisz5r0d27pj3ra";
};
- goDeps = ./deps.nix;
+ modSha256 = "0pg0hxrr6jjd03wbjn5y65x02md3h352mnm1gr6vyiv7hn4ws14m";
+
+ subPackages = [ "./exercism" ];
meta = with stdenv.lib; {
inherit (src.meta) homepage;
diff --git a/pkgs/applications/misc/exercism/deps.nix b/pkgs/applications/misc/exercism/deps.nix
deleted file mode 100644
index 10a6baa2241b..000000000000
--- a/pkgs/applications/misc/exercism/deps.nix
+++ /dev/null
@@ -1,201 +0,0 @@
-# file generated from Gopkg.lock using dep2nix (https://github.com/nixcloud/dep2nix)
-[
- {
- goPackagePath = "github.com/blang/semver";
- fetch = {
- type = "git";
- url = "https://github.com/blang/semver";
- rev = "2ee87856327ba09384cabd113bc6b5d174e9ec0f";
- sha256 = "13ws259bwcibkclbr82ilhk6zadm63kxklxhk12wayklj8ghhsmy";
- };
- }
- {
- goPackagePath = "github.com/davecgh/go-spew";
- fetch = {
- type = "git";
- url = "https://github.com/davecgh/go-spew";
- rev = "346938d642f2ec3594ed81d874461961cd0faa76";
- sha256 = "0d4jfmak5p6lb7n2r6yvf5p1zcw0l8j74kn55ghvr7zr7b7axm6c";
- };
- }
- {
- goPackagePath = "github.com/fsnotify/fsnotify";
- fetch = {
- type = "git";
- url = "https://github.com/fsnotify/fsnotify";
- rev = "629574ca2a5df945712d3079857300b5e4da0236";
- sha256 = "06wfg1mmzjj04z7d0q1x2fai9k6hm957brngsaf02fa9a3qqanv3";
- };
- }
- {
- goPackagePath = "github.com/hashicorp/hcl";
- fetch = {
- type = "git";
- url = "https://github.com/hashicorp/hcl";
- rev = "392dba7d905ed5d04a5794ba89f558b27e2ba1ca";
- sha256 = "1rfm67kma2hpakabf7hxlj196jags4rpjpcirwg4kan4g9b6j0kb";
- };
- }
- {
- goPackagePath = "github.com/inconshreveable/go-update";
- fetch = {
- type = "git";
- url = "https://github.com/inconshreveable/go-update";
- rev = "8152e7eb6ccf8679a64582a66b78519688d156ad";
- sha256 = "07czhspakpi7al004rm669cmf4h5l0vnygsm11280nkfn2zxqdi3";
- };
- }
- {
- goPackagePath = "github.com/inconshreveable/mousetrap";
- fetch = {
- type = "git";
- url = "https://github.com/inconshreveable/mousetrap";
- rev = "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75";
- sha256 = "1mn0kg48xkd74brf48qf5hzp0bc6g8cf5a77w895rl3qnlpfw152";
- };
- }
- {
- goPackagePath = "github.com/magiconair/properties";
- fetch = {
- type = "git";
- url = "https://github.com/magiconair/properties";
- rev = "be5ece7dd465ab0765a9682137865547526d1dfb";
- sha256 = "0spk58x9b0hj29cw6wy6rlvc6s9xk4r0gmlxgsc194pkzqcg1my8";
- };
- }
- {
- goPackagePath = "github.com/mitchellh/mapstructure";
- fetch = {
- type = "git";
- url = "https://github.com/mitchellh/mapstructure";
- rev = "d0303fe809921458f417bcf828397a65db30a7e4";
- sha256 = "1fjwi5ghc1ibyx93apz31n4hj6gcq1hzismpdfbg2qxwshyg0ya8";
- };
- }
- {
- goPackagePath = "github.com/pelletier/go-buffruneio";
- fetch = {
- type = "git";
- url = "https://github.com/pelletier/go-buffruneio";
- rev = "c37440a7cf42ac63b919c752ca73a85067e05992";
- sha256 = "0l83p1gg6g5mmhmxjisrhfimhbm71lwn1r2w7d6siwwqm9q08sd2";
- };
- }
- {
- goPackagePath = "github.com/pelletier/go-toml";
- fetch = {
- type = "git";
- url = "https://github.com/pelletier/go-toml";
- rev = "5ccdfb18c776b740aecaf085c4d9a2779199c279";
- sha256 = "1jl44j58y62rhnwkzw3mvcj725gdyzs45pq4ga81qqxwqxs3czsq";
- };
- }
- {
- goPackagePath = "github.com/pmezard/go-difflib";
- fetch = {
- type = "git";
- url = "https://github.com/pmezard/go-difflib";
- rev = "792786c7400a136282c1664665ae0a8db921c6c2";
- sha256 = "0c1cn55m4rypmscgf0rrb88pn58j3ysvc2d0432dp3c6fqg6cnzw";
- };
- }
- {
- goPackagePath = "github.com/spf13/afero";
- fetch = {
- type = "git";
- url = "https://github.com/spf13/afero";
- rev = "9be650865eab0c12963d8753212f4f9c66cdcf12";
- sha256 = "12dhh6d07304lsjv7c4p95hkip0hnshqhwivdw39pbypgg0p8y34";
- };
- }
- {
- goPackagePath = "github.com/spf13/cast";
- fetch = {
- type = "git";
- url = "https://github.com/spf13/cast";
- rev = "acbeb36b902d72a7a4c18e8f3241075e7ab763e4";
- sha256 = "0w25s6gjbbwv47b9208hysyqqphd6pib3d2phg24mjy4wigkm050";
- };
- }
- {
- goPackagePath = "github.com/spf13/cobra";
- fetch = {
- type = "git";
- url = "https://github.com/spf13/cobra";
- rev = "b26b538f693051ac6518e65672de3144ce3fbedc";
- sha256 = "0pm3qlw35xygz9zz7hizlmin76wrfac8vsxvsd9i0zpnijbkmjv6";
- };
- }
- {
- goPackagePath = "github.com/spf13/jwalterweatherman";
- fetch = {
- type = "git";
- url = "https://github.com/spf13/jwalterweatherman";
- rev = "0efa5202c04663c757d84f90f5219c1250baf94f";
- sha256 = "1sfd72zvw9lrzfc8haswhqf93bzm20q4yhbynm6n5fnnc56zn4gs";
- };
- }
- {
- goPackagePath = "github.com/spf13/pflag";
- fetch = {
- type = "git";
- url = "https://github.com/spf13/pflag";
- rev = "e57e3eeb33f795204c1ca35f56c44f83227c6e66";
- sha256 = "13mhx4i913jil32j295m3a36jzvq1y64xig0naadiz7q9ja011r2";
- };
- }
- {
- goPackagePath = "github.com/spf13/viper";
- fetch = {
- type = "git";
- url = "https://github.com/spf13/viper";
- rev = "15738813a09db5c8e5b60a19d67d3f9bd38da3a4";
- sha256 = "1mjfzg8zvnxckaq6l8gw99i2msrfqn9yr04dc3b7kd5bpxi6zr4v";
- };
- }
- {
- goPackagePath = "github.com/stretchr/testify";
- fetch = {
- type = "git";
- url = "https://github.com/stretchr/testify";
- rev = "69483b4bd14f5845b5a1e55bca19e954e827f1d0";
- sha256 = "11lzrwkdzdd8yyag92akncc008h2f9d1bpc489mxiwp0jrmz4ivb";
- };
- }
- {
- goPackagePath = "golang.org/x/net";
- fetch = {
- type = "git";
- url = "https://go.googlesource.com/net";
- rev = "f5079bd7f6f74e23c4d65efa0f4ce14cbd6a3c0f";
- sha256 = "0sck2mq4bwyh5iv51jpbywzwhc47ci1q5yd7pqr68xnsz7b3b55k";
- };
- }
- {
- goPackagePath = "golang.org/x/sys";
- fetch = {
- type = "git";
- url = "https://go.googlesource.com/sys";
- rev = "d8f5ea21b9295e315e612b4bcf4bedea93454d4d";
- sha256 = "1gy2y20glqqqcmmrcx2wrvk4h74h8im1nxvzi91i1mxjk7p185mv";
- };
- }
- {
- goPackagePath = "golang.org/x/text";
- fetch = {
- type = "git";
- url = "https://go.googlesource.com/text";
- rev = "3bd178b88a8180be2df394a1fbb81313916f0e7b";
- sha256 = "137pp3gz8ll08q0q434dn6472bbkv81h72qqqm9idhf7cc6f51w9";
- };
- }
- {
- goPackagePath = "gopkg.in/yaml.v2";
- fetch = {
- type = "git";
- url = "https://github.com/go-yaml/yaml";
- rev = "25c4ec802a7d637f88d584ab26798e94ad14c13b";
- sha256 = "053mknsl3xhjscmd552005xnwbfcg0z2iphvbvj3wi0w3pvmlw44";
- };
- }
-]
\ No newline at end of file
diff --git a/pkgs/applications/misc/extract_url/default.nix b/pkgs/applications/misc/extract_url/default.nix
index 2b7888c9cd04..f96d3f0f57c7 100644
--- a/pkgs/applications/misc/extract_url/default.nix
+++ b/pkgs/applications/misc/extract_url/default.nix
@@ -10,7 +10,7 @@ let
++ lib.optional uriFindSupport perlPackages.URIFind;
in stdenv.mkDerivation rec {
- name = "extract_url-${version}";
+ pname = "extract_url";
version = "1.6.2";
src = fetchFromGitHub {
diff --git a/pkgs/applications/misc/fetchmail/default.nix b/pkgs/applications/misc/fetchmail/default.nix
index e9d194666094..bbbf1a0aff9b 100644
--- a/pkgs/applications/misc/fetchmail/default.nix
+++ b/pkgs/applications/misc/fetchmail/default.nix
@@ -4,7 +4,8 @@ let
version = "6.3.26";
in
stdenv.mkDerivation {
- name="fetchmail-${version}";
+ pname = "fetchmail";
+ inherit version;
src = fetchurl {
url = "mirror://sourceforge/fetchmail.berlios/fetchmail-${version}.tar.bz2";
diff --git a/pkgs/applications/misc/firestarter/default.nix b/pkgs/applications/misc/firestarter/default.nix
new file mode 100644
index 000000000000..e93d0ab69a7b
--- /dev/null
+++ b/pkgs/applications/misc/firestarter/default.nix
@@ -0,0 +1,39 @@
+{ stdenv, fetchFromGitHub, python3, cudatoolkit,
+ withCuda ? true
+}:
+
+with stdenv.lib;
+stdenv.mkDerivation rec {
+ pname = "firestarter";
+ version = "1.7.3";
+
+ src = fetchFromGitHub {
+ owner = "tud-zih-energy";
+ repo = "FIRESTARTER";
+ rev = "v${version}";
+ sha256 = "1gc7kmzx9nw22lyfmpyz72p974jf1hvw5nvszcaq7x6h8cz9ip15";
+ };
+
+ nativeBuildInputs = [ python3 ];
+ buildInputs = optionals withCuda [ cudatoolkit ];
+ preBuild = ''
+ mkdir -p build
+ cd build
+ python ../code-generator.py ${optionalString withCuda "--enable-cuda"}
+ '';
+ makeFlags = optionals withCuda [ "LINUX_CUDA_PATH=${cudatoolkit}" ];
+ enableParallelBuilding = true;
+
+ installPhase = ''
+ mkdir -p $out/bin
+ cp FIRESTARTER $out/bin/firestarter
+ '';
+
+ meta = with stdenv.lib; {
+ homepage = https://tu-dresden.de/zih/forschung/projekte/firestarter;
+ description = "Processor Stress Test Utility";
+ platforms = platforms.linux;
+ maintainers = with maintainers; [ astro ];
+ license = licenses.gpl3;
+ };
+}
diff --git a/pkgs/applications/misc/flamerobin/default.nix b/pkgs/applications/misc/flamerobin/default.nix
index f70042884a8a..06cf3c06ffa6 100644
--- a/pkgs/applications/misc/flamerobin/default.nix
+++ b/pkgs/applications/misc/flamerobin/default.nix
@@ -2,7 +2,7 @@
stdenv.mkDerivation rec {
version = "0.9.3.1";
- name = "flamerobin-${version}";
+ pname = "flamerobin";
src = fetchFromGitHub {
owner = "mariuz";
diff --git a/pkgs/applications/misc/fme/default.nix b/pkgs/applications/misc/fme/default.nix
index 4e786bfb36f8..2ca059820ef0 100644
--- a/pkgs/applications/misc/fme/default.nix
+++ b/pkgs/applications/misc/fme/default.nix
@@ -3,7 +3,7 @@
stdenv.mkDerivation rec{
- name = "fme-${version}";
+ pname = "fme";
version = "1.1.3";
src = fetchurl {
diff --git a/pkgs/applications/misc/font-manager/default.nix b/pkgs/applications/misc/font-manager/default.nix
index f0da4e883517..dad954900124 100644
--- a/pkgs/applications/misc/font-manager/default.nix
+++ b/pkgs/applications/misc/font-manager/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, meson, ninja, gettext, python3,
+{ stdenv, fetchFromGitHub, meson, ninja, gettext, python3, fetchpatch,
pkgconfig, libxml2, json-glib , sqlite, itstool, librsvg,
vala, gtk3, gnome3, desktop-file-utils, wrapGAppsHook, gobject-introspection
}:
@@ -42,6 +42,15 @@ stdenv.mkDerivation rec {
"-Ddisable_pycompile=true"
];
+ patches = [
+ # fix build with Vala 0.46
+ (fetchpatch {
+ url = "https://github.com/FontManager/font-manager/commit/c73b40de11f376f4515a0edfe97fb3721a264b35.patch";
+ sha256 = "0lacwsifgvda2r3z6j2a0svdqr6mgav7zkvih35xa8155y8wfpnw";
+ excludes = [ "fedora/font-manager.spec" ];
+ })
+ ];
+
postPatch = ''
chmod +x meson_post_install.py
patchShebangs meson_post_install.py
@@ -49,18 +58,17 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; {
homepage = https://fontmanager.github.io/;
- description = "Simple font management for GTK+ desktop environments";
+ description = "Simple font management for GTK desktop environments";
longDescription = ''
Font Manager is intended to provide a way for average users to
easily manage desktop fonts, without having to resort to command
line tools or editing configuration files by hand. While designed
primarily with the Gnome Desktop Environment in mind, it should
- work well with other Gtk+ desktop environments.
+ work well with other GTK desktop environments.
Font Manager is NOT a professional-grade font management solution.
'';
license = licenses.gpl3;
- repositories.git = https://github.com/FontManager/master;
platforms = platforms.unix;
maintainers = [ maintainers.romildo ];
};
diff --git a/pkgs/applications/misc/formatter/default.nix b/pkgs/applications/misc/formatter/default.nix
new file mode 100644
index 000000000000..d81e21f73ed9
--- /dev/null
+++ b/pkgs/applications/misc/formatter/default.nix
@@ -0,0 +1,71 @@
+{ stdenv
+, fetchFromGitHub
+, meson
+, ninja
+, vala
+, pkgconfig
+, pantheon
+, python3
+, substituteAll
+, glib
+, gtk3
+, dosfstools
+, e2fsprogs
+, exfat
+, hfsprogs
+, ntfs3g
+, libgee
+, wrapGAppsHook
+}:
+
+stdenv.mkDerivation rec {
+ pname = "formatter";
+ version = "0.3.0";
+
+ src = fetchFromGitHub {
+ owner = "Djaler";
+ repo = "Formatter";
+ rev = version;
+ sha256 = "145742dk16736zxj30rzn61h4k0xpggfsbqkxllxd302mgbmxlzq";
+ };
+
+ patches = [
+ (substituteAll {
+ src = ./fix-paths.patch;
+ ext4 = "${e2fsprogs}/bin/mkfs.ext4";
+ exfat = "${exfat}/bin/mkfs.exfat";
+ fat = "${dosfstools}/bin/mkfs.fat";
+ ntfs = "${ntfs3g}/bin/mkfs.ntfs";
+ hfsplus = "${hfsprogs}/bin/mkfs.hfsplus";
+ })
+ ];
+
+ nativeBuildInputs = [
+ meson
+ ninja
+ vala
+ pkgconfig
+ python3
+ wrapGAppsHook
+ ];
+
+ buildInputs = [
+ glib
+ gtk3
+ libgee
+ pantheon.granite
+ ];
+
+ postPatch = ''
+ chmod +x meson/post_install.py
+ patchShebangs meson/post_install.py
+ '';
+
+ meta = with stdenv.lib; {
+ description = "A simple formatter designed for elementary OS";
+ homepage = "https://github.com/Djaler/Formatter";
+ maintainers = with maintainers; [ kjuvi ] ++ pantheon.maintainers;
+ platforms = platforms.linux;
+ license = licenses.lgpl2Plus;
+ };
+}
diff --git a/pkgs/applications/misc/formatter/fix-paths.patch b/pkgs/applications/misc/formatter/fix-paths.patch
new file mode 100644
index 000000000000..67c1d2b43ccc
--- /dev/null
+++ b/pkgs/applications/misc/formatter/fix-paths.patch
@@ -0,0 +1,53 @@
+diff --git a/src/Objects/DeviceFormatter.vala b/src/Objects/DeviceFormatter.vala
+index cf6a3b8..0de10a9 100644
+--- a/src/Objects/DeviceFormatter.vala
++++ b/src/Objects/DeviceFormatter.vala
+@@ -62,42 +62,42 @@ namespace Formatter {
+ string drive_identifier = drive.get_identifier ("unix-device");
+ switch (filesystem) {
+ case Formatter.Filesystems.EXT4:
+- spawn_args = {"pkexec", "mkfs.ext4", drive_identifier, "-F"};
++ spawn_args = {"pkexec", "@ext4@", drive_identifier, "-F"};
+ if (label != "") {
+ spawn_args += "-L";
+ spawn_args += label;
+ }
+ break;
+ case Formatter.Filesystems.EXFAT:
+- spawn_args = {"pkexec", "mkfs.exfat", drive_identifier};
++ spawn_args = {"pkexec", "@exfat@", drive_identifier};
+ if (label != "") {
+ spawn_args += "-n";
+ spawn_args += label;
+ }
+ break;
+ case Formatter.Filesystems.FAT16:
+- spawn_args = {"pkexec", "mkfs.fat", "-F16", "-I", drive_identifier};
++ spawn_args = {"pkexec", "@fat@", "-F16", "-I", drive_identifier};
+ if (label != "") {
+ spawn_args += "-n";
+ spawn_args += label;
+ }
+ break;
+ case Formatter.Filesystems.FAT32:
+- spawn_args = {"pkexec", "mkfs.fat", "-F32", "-I", drive_identifier};
++ spawn_args = {"pkexec", "@fat@", "-F32", "-I", drive_identifier};
+ if (label != "") {
+ spawn_args += "-n";
+ spawn_args += label;
+ }
+ break;
+ case Formatter.Filesystems.NTFS:
+- spawn_args = {"pkexec", "mkfs.ntfs", drive_identifier, "-f", "-F"};
++ spawn_args = {"pkexec", "@ntfs@", drive_identifier, "-f", "-F"};
+ if (label != "") {
+ spawn_args += "-L";
+ spawn_args += label;
+ }
+ break;
+ case Formatter.Filesystems.HFS_PLUS:
+- spawn_args = {"pkexec", "mkfs.hfsplus", drive_identifier};
++ spawn_args = {"pkexec", "@hfsplus@", drive_identifier};
+ if (label != "") {
+ spawn_args += "-v";
+ spawn_args += label;
diff --git a/pkgs/applications/misc/freemind/default.nix b/pkgs/applications/misc/freemind/default.nix
index 5152c8aa3f7c..aee3937689b3 100644
--- a/pkgs/applications/misc/freemind/default.nix
+++ b/pkgs/applications/misc/freemind/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchurl, jdk, jre, ant }:
stdenv.mkDerivation rec {
- name = "freemind-${version}";
+ pname = "freemind";
version = "1.0.1";
src = fetchurl {
diff --git a/pkgs/applications/misc/gImageReader/default.nix b/pkgs/applications/misc/gImageReader/default.nix
index 062bca5b215e..67d4bd65a9f9 100644
--- a/pkgs/applications/misc/gImageReader/default.nix
+++ b/pkgs/applications/misc/gImageReader/default.nix
@@ -15,14 +15,14 @@ let
pythonEnv = python3.withPackages( ps: with ps;[ pygobject3 ] );
in
stdenv.mkDerivation rec {
- name = "gImageReader-${version}";
- version = "3.3.0";
+ pname = "gImageReader";
+ version = "3.3.1";
src = fetchFromGitHub {
owner= "manisandro";
repo = "gImageReader";
rev = "v${version}";
- sha256 = "0pjk4kr7bc5q4hi1xf7na2zln9fyqdazgzq62r3bg41nzy7fakcz";
+ sha256 = "17hz2dgxx2j7hsk0lx3riidqvlsg0ylnicjd2gphsi3yp7w20zdj";
};
nativeBuildInputs = [
diff --git a/pkgs/applications/misc/galculator/default.nix b/pkgs/applications/misc/galculator/default.nix
index 44071b328758..ecf8ae9da8d4 100644
--- a/pkgs/applications/misc/galculator/default.nix
+++ b/pkgs/applications/misc/galculator/default.nix
@@ -3,7 +3,7 @@
, gtk, pkgconfig, flex }:
stdenv.mkDerivation rec {
- name = "galculator-${version}";
+ pname = "galculator";
version = "2.1.4";
src = fetchFromGitHub {
diff --git a/pkgs/applications/misc/gallery-dl/default.nix b/pkgs/applications/misc/gallery-dl/default.nix
index cb04be4b6ea9..b1cd6a36e085 100644
--- a/pkgs/applications/misc/gallery-dl/default.nix
+++ b/pkgs/applications/misc/gallery-dl/default.nix
@@ -2,11 +2,11 @@
python3Packages.buildPythonApplication rec {
pname = "gallery_dl";
- version = "1.8.6";
+ version = "1.10.6";
src = python3Packages.fetchPypi {
inherit pname version;
- sha256 = "0in47v6c82a6mqg4wzxrji7wd8a9qh5386rsr77s3a8613am1n2x";
+ sha256 = "0jbfp072rnb3pkqp10xds57bnlcn87vqjaz68nhpzkwvwhs3hr4w";
};
doCheck = false;
diff --git a/pkgs/applications/misc/gammu/default.nix b/pkgs/applications/misc/gammu/default.nix
index 739df59b31c5..fb6902634da8 100644
--- a/pkgs/applications/misc/gammu/default.nix
+++ b/pkgs/applications/misc/gammu/default.nix
@@ -7,7 +7,7 @@
with stdenv.lib;
stdenv.mkDerivation rec {
- name = "gammu-${version}";
+ pname = "gammu";
version = "1.40.0";
src = fetchFromGitHub {
diff --git a/pkgs/applications/misc/ganttproject-bin/default.nix b/pkgs/applications/misc/ganttproject-bin/default.nix
index dd0a5c9a4f60..96d3d34046e1 100644
--- a/pkgs/applications/misc/ganttproject-bin/default.nix
+++ b/pkgs/applications/misc/ganttproject-bin/default.nix
@@ -3,7 +3,7 @@
}:
stdenv.mkDerivation rec {
- name = "ganttproject-bin-${version}";
+ pname = "ganttproject-bin";
version = "2.8.10";
src = let build = "r2364"; in fetchzip {
diff --git a/pkgs/applications/misc/gcal/default.nix b/pkgs/applications/misc/gcal/default.nix
index a3aebf227339..f5eb6e188b7a 100644
--- a/pkgs/applications/misc/gcal/default.nix
+++ b/pkgs/applications/misc/gcal/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, ncurses }:
stdenv.mkDerivation rec {
- name = "gcal-${version}";
+ pname = "gcal";
version = "4.1";
src = fetchurl {
- url = "mirror://gnu/gcal/${name}.tar.xz";
+ url = "mirror://gnu/gcal/${pname}-${version}.tar.xz";
sha256 = "1av11zkfirbixn05hyq4xvilin0ncddfjqzc4zd9pviyp506rdci";
};
diff --git a/pkgs/applications/misc/gcalcli/default.nix b/pkgs/applications/misc/gcalcli/default.nix
index 6f380114a276..8381f182e5d3 100644
--- a/pkgs/applications/misc/gcalcli/default.nix
+++ b/pkgs/applications/misc/gcalcli/default.nix
@@ -5,13 +5,13 @@ with python3.pkgs;
buildPythonApplication rec {
pname = "gcalcli";
- version = "4.1.1";
+ version = "4.2.0";
src = fetchFromGitHub {
owner = "insanum";
repo = pname;
rev = "v${version}";
- sha256 = "1qlmslywm4dfimggly4p0ckn2gj165mq1p0wkry9jpb3sg1m5fdf";
+ sha256 = "0746vmhfclkpkqnyaidxid2z20mlv86hv0pjxy1qglrja91vkd72";
};
postPatch = lib.optionalString stdenv.isLinux ''
diff --git a/pkgs/applications/misc/getxbook/default.nix b/pkgs/applications/misc/getxbook/default.nix
index a77f87f6f1f1..b2a992b850e1 100644
--- a/pkgs/applications/misc/getxbook/default.nix
+++ b/pkgs/applications/misc/getxbook/default.nix
@@ -1,14 +1,16 @@
{ stdenv, fetchurl, openssl }:
stdenv.mkDerivation rec {
- name = "getxbook-${version}";
+ pname = "getxbook";
version = "1.2";
src = fetchurl {
- url = "https://njw.me.uk/getxbook/${name}.tar.xz";
+ url = "https://njw.me.uk/getxbook/${pname}-${version}.tar.xz";
sha256 = "0ihwrx4gspj8l7fc8vxch6dpjrw1lvv9z3c19f0wxnmnxhv1cjvs";
};
+ NIX_CFLAGS_COMPILE = [ "-Wno-error=format-truncation" "-Wno-error=deprecated-declarations" ];
+
buildInputs = [ openssl ];
makeFlags = [ "PREFIX=$(out)" ];
diff --git a/pkgs/applications/misc/girara/default.nix b/pkgs/applications/misc/girara/default.nix
index 4d990c69b4a3..6bfb4907807a 100644
--- a/pkgs/applications/misc/girara/default.nix
+++ b/pkgs/applications/misc/girara/default.nix
@@ -3,13 +3,13 @@
stdenv.mkDerivation rec {
pname = "girara";
- version = "0.3.2";
+ version = "0.3.3";
outputs = [ "out" "dev" ];
src = fetchurl {
- url = "https://pwmt.org/projects/girara/download/${pname}-${version}.tar.xz";
- sha256 = "1kc6n1mxjxa7wvwnqy94qfg8l9jvx9qrvrr2kc7m4g0z20x3a00p";
+ url = "https://git.pwmt.org/pwmt/${pname}/-/archive/${version}/${pname}-${version}.tar.gz";
+ sha256 = "13vr62kkkqs2xsrmsn114n6c6084ix1qyjksczqsc3s2y3bdsmj4";
};
nativeBuildInputs = [ meson ninja pkgconfig gettext check dbus xvfb_run ];
@@ -30,10 +30,10 @@ stdenv.mkDerivation rec {
'';
meta = with stdenv.lib; {
- homepage = https://pwmt.org/projects/girara/;
+ homepage = "https://git.pwmt.org/pwmt/girara";
description = "User interface library";
longDescription = ''
- girara is a library that implements a GTK+ based VIM-like user interface
+ girara is a library that implements a GTK based VIM-like user interface
that focuses on simplicity and minimalism.
'';
license = licenses.zlib;
diff --git a/pkgs/applications/misc/gkrellm/default.nix b/pkgs/applications/misc/gkrellm/default.nix
index b4fac899f66f..f44cdd0bad72 100644
--- a/pkgs/applications/misc/gkrellm/default.nix
+++ b/pkgs/applications/misc/gkrellm/default.nix
@@ -4,11 +4,11 @@
with stdenv.lib;
stdenv.mkDerivation rec {
- name = "gkrellm-2.3.10";
+ name = "gkrellm-2.3.11";
src = fetchurl {
url = "http://gkrellm.srcbox.net/releases/${name}.tar.bz2";
- sha256 = "0rnpzjr0ys0ypm078y63q4aplcgdr5nshjzhmz330n6dmnxci7lb";
+ sha256 = "01lccz4fga40isv09j8rjgr0qy10rff9vj042n6gi6gdv4z69q0y";
};
nativeBuildInputs = [ pkgconfig which ];
diff --git a/pkgs/applications/misc/gksu/default.nix b/pkgs/applications/misc/gksu/default.nix
index 4af776674e63..4a806cbb183d 100644
--- a/pkgs/applications/misc/gksu/default.nix
+++ b/pkgs/applications/misc/gksu/default.nix
@@ -5,10 +5,9 @@
stdenv.mkDerivation rec {
version = "2.0.2";
pname = "gksu";
- name = "${pname}-${version}";
src = fetchurl {
- url = "http://people.debian.org/~kov/gksu/${name}.tar.gz";
+ url = "http://people.debian.org/~kov/gksu/${pname}-${version}.tar.gz";
sha256 = "0npfanlh28daapkg25q4fncxd89rjhvid5fwzjaw324x0g53vpm1";
};
@@ -40,7 +39,7 @@ stdenv.mkDerivation rec {
meta = {
description = "A graphical frontend for libgksu";
longDescription = ''
- GKSu is a library that provides a Gtk+ frontend to su and sudo.
+ GKSu is a library that provides a GTK frontend to su and sudo.
It supports login shells and preserving environment when acting as
a su frontend. It is useful to menu items or other graphical
programs that need to ask a user's password to run another program
diff --git a/pkgs/applications/misc/glava/default.nix b/pkgs/applications/misc/glava/default.nix
index 3831780c7919..6f5146161a6d 100644
--- a/pkgs/applications/misc/glava/default.nix
+++ b/pkgs/applications/misc/glava/default.nix
@@ -21,7 +21,7 @@ let
'';
in
stdenv.mkDerivation rec {
- name = "glava-${version}";
+ pname = "glava";
version = "1.6.3";
src = fetchFromGitHub {
diff --git a/pkgs/applications/misc/gmrun/default.nix b/pkgs/applications/misc/gmrun/default.nix
index 47fb50242c1d..50dda9510b91 100644
--- a/pkgs/applications/misc/gmrun/default.nix
+++ b/pkgs/applications/misc/gmrun/default.nix
@@ -5,10 +5,11 @@ let
in
stdenv.mkDerivation rec {
- name = "gmrun-${version}";
+ pname = "gmrun";
+ inherit version;
src = fetchurl {
- url = "mirror://sourceforge/gmrun/${name}.tar.gz";
+ url = "mirror://sourceforge/gmrun/${pname}-${version}.tar.gz";
sha256 = "180z6hbax1qypy5cyy2z6nn7fzxla4ib47ck8mqwr714ag77na8p";
};
@@ -29,7 +30,7 @@ stdenv.mkDerivation rec {
description = "Gnome Completion-Run Utility";
longDescription = ''
A simple program which provides a "run program" window, featuring a bash-like TAB completion.
- It uses GTK+ interface.
+ It uses GTK interface.
Also, supports CTRL-R / CTRL-S / "!" for searching through history.
Running commands in a terminal with CTRL-Enter. URL handlers.
'';
diff --git a/pkgs/applications/misc/gmtp/default.nix b/pkgs/applications/misc/gmtp/default.nix
index bb1556c7c4dc..c8bbcf2aa7f3 100644
--- a/pkgs/applications/misc/gmtp/default.nix
+++ b/pkgs/applications/misc/gmtp/default.nix
@@ -5,7 +5,8 @@
let version = "1.3.11"; in
stdenv.mkDerivation {
- name = "gmtp-${version}";
+ pname = "gmtp";
+ inherit version;
src = fetchurl {
url = "mirror://sourceforge/gmtp/gMTP-${version}/gmtp-${version}.tar.gz";
diff --git a/pkgs/applications/misc/gnome-firmware-updater/default.nix b/pkgs/applications/misc/gnome-firmware-updater/default.nix
new file mode 100644
index 000000000000..f05c5fd210c4
--- /dev/null
+++ b/pkgs/applications/misc/gnome-firmware-updater/default.nix
@@ -0,0 +1,76 @@
+{ stdenv
+, fetchFromGitLab
+, fetchpatch
+, appstream-glib
+, desktop-file-utils
+, fwupd
+, gettext
+, glib
+, gnome3
+, gtk3
+, libsoup
+, libxmlb
+, meson
+, ninja
+, pkgconfig
+, systemd
+, help2man
+, wrapGAppsHook
+}:
+
+stdenv.mkDerivation rec {
+ pname = "gnome-firmware-updater";
+ version = "3.34.0";
+
+ src = fetchFromGitLab {
+ domain = "gitlab.gnome.org";
+ owner = "hughsie";
+ repo = "gnome-firmware-updater";
+ rev = version;
+ sha256 = "04pll0fzf4nr276kfw89r0524s6ppmls5rz4vq2j8c8gb50g0b6l";
+ };
+
+ patches = [
+ # Fixes manual build
+ (fetchpatch {
+ url = "https://gitlab.gnome.org/hughsie/gnome-firmware-updater/commit/006b64dcb401d8c81a33222bc4be8274c23f3c9c.patch";
+ sha256 = "02303ip4ri5pv1bls8c0njb00qhn0jd0d8rmvsrig0fmacwfvc06";
+ })
+ (fetchpatch {
+ url = "https://gitlab.gnome.org/hughsie/gnome-firmware-updater/commit/c4f076f2c902080618e0c27dec924fd0019f68a3.patch";
+ sha256 = "1yfxd7qsg3gwpamg0m2sbcfrgks59w70r9728arrc4pwx1hia2q1";
+ })
+ ];
+
+ nativeBuildInputs = [
+ appstream-glib # for ITS rules
+ desktop-file-utils
+ gettext
+ help2man
+ meson
+ ninja
+ pkgconfig
+ wrapGAppsHook
+ ];
+
+ buildInputs = [
+ fwupd
+ glib
+ gtk3
+ libsoup
+ libxmlb
+ systemd
+ ];
+
+ mesonFlags = [
+ "-Dconsolekit=false"
+ ];
+
+ meta = with stdenv.lib; {
+ homepage = "https://gitlab.gnome.org/hughsie/gnome-firmware-updater";
+ description = "Tool for installing firmware on devices";
+ license = licenses.gpl2Plus;
+ maintainers = gnome3.maintainers;
+ platforms = platforms.linux;
+ };
+}
diff --git a/pkgs/applications/misc/gnome-multi-writer/default.nix b/pkgs/applications/misc/gnome-multi-writer/default.nix
new file mode 100644
index 000000000000..11bfbaaacd07
--- /dev/null
+++ b/pkgs/applications/misc/gnome-multi-writer/default.nix
@@ -0,0 +1,62 @@
+{ stdenv
+, fetchurl
+, appstream-glib
+, desktop-file-utils
+, gettext
+, glib
+, gnome3
+, gtk3
+, gusb
+, libcanberra-gtk3
+, libgudev
+, meson
+, ninja
+, pkgconfig
+, wrapGAppsHook
+, polkit
+, udisks
+}:
+
+stdenv.mkDerivation rec {
+ pname = "gnome-multi-writer";
+ version = "3.32.1";
+
+ src = fetchurl {
+ url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+ sha256 = "1apdd8yi12zagf82k376a9wmdm27wzwdxpm2wf2pnwkaf786rmdw";
+ };
+
+ nativeBuildInputs = [
+ appstream-glib
+ desktop-file-utils
+ gettext
+ meson
+ ninja
+ pkgconfig
+ wrapGAppsHook
+ ];
+
+ buildInputs = [
+ glib
+ gtk3
+ gusb
+ libcanberra-gtk3
+ libgudev
+ polkit
+ udisks
+ ];
+
+ passthru = {
+ updateScript = gnome3.updateScript {
+ packageName = pname;
+ };
+ };
+
+ meta = with stdenv.lib; {
+ description = "Tool for writing an ISO file to multiple USB devices at once";
+ homepage = https://wiki.gnome.org/Apps/MultiWriter;
+ license = licenses.gpl2Plus;
+ maintainers = gnome3.maintainers;
+ platforms = platforms.linux;
+ };
+}
diff --git a/pkgs/applications/misc/gnome-usage/default.nix b/pkgs/applications/misc/gnome-usage/default.nix
index eecf9bbd88f7..7484998ab205 100644
--- a/pkgs/applications/misc/gnome-usage/default.nix
+++ b/pkgs/applications/misc/gnome-usage/default.nix
@@ -13,15 +13,16 @@
, libgtop
, libdazzle
, gnome3
+, tracker
}:
stdenv.mkDerivation rec {
pname = "gnome-usage";
- version = "3.32.0";
+ version = "3.33.2";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
- sha256 = "0bgszckddfpd3czyb9fddx4pgv5yv44sxc45dfk2kgqyy169gjih";
+ sha256 = "0w3ppfaf15il8mad64qyc9hj1rmlvzs5dyzrxhq7r50k4kyiwmk4";
};
nativeBuildInputs = [
@@ -41,6 +42,7 @@ stdenv.mkDerivation rec {
gtk3
libdazzle
libgtop
+ tracker
];
postPatch = ''
diff --git a/pkgs/applications/misc/gnome15/default.nix b/pkgs/applications/misc/gnome15/default.nix
index e2cf8245ce67..41d535b35106 100644
--- a/pkgs/applications/misc/gnome15/default.nix
+++ b/pkgs/applications/misc/gnome15/default.nix
@@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, python2, gnome_python, gnome_python_desktop }:
-stdenv.mkDerivation rec {
+stdenv.mkDerivation {
name = "gnome15-2016-06-10";
src = fetchFromGitHub {
@@ -28,6 +28,9 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; {
description = "A set of tools for configuring the Logitech G15 keyboard";
+ # Doesn't work with new `keyring` library which is Python 3-only now.
+ # https://github.com/Gnome15/gnome15/issues/29
+ broken = true;
license = licenses.gpl3;
homepage = https://gnome15.org/;
platforms = platforms.linux;
diff --git a/pkgs/applications/misc/go-jira/default.nix b/pkgs/applications/misc/go-jira/default.nix
index b80ddb8f303f..f8da250dbc79 100644
--- a/pkgs/applications/misc/go-jira/default.nix
+++ b/pkgs/applications/misc/go-jira/default.nix
@@ -2,7 +2,7 @@
{ stdenv, buildGoPackage, fetchgit }:
buildGoPackage rec {
- name = "go-jira-${version}";
+ pname = "go-jira";
version = "1.0.17";
goPackagePath = "gopkg.in/Netflix-Skunkworks/go-jira.v1";
diff --git a/pkgs/applications/misc/golden-cheetah/default.nix b/pkgs/applications/misc/golden-cheetah/default.nix
index edf16f806a6b..7fba1d49d747 100644
--- a/pkgs/applications/misc/golden-cheetah/default.nix
+++ b/pkgs/applications/misc/golden-cheetah/default.nix
@@ -1,5 +1,6 @@
-{ stdenv, fetchurl
-, qtbase, qtsvg, qtserialport, qtwebkit, qtmultimedia, qttools, qtconnectivity
+{ stdenv, fetchFromGitHub, mkDerivation
+, qtbase, qtsvg, qtserialport, qtwebkit, qtmultimedia, qttools
+, qtconnectivity, qtcharts
, yacc, flex, zlib, qmake, makeDesktopItem, makeWrapper
}:
@@ -13,34 +14,39 @@ let
comment = "Performance software for cyclists, runners and triathletes";
categories = "Application;Utility;";
};
-in stdenv.mkDerivation rec {
- name = "golden-cheetah-${version}";
- version = "3.4";
- src = fetchurl {
- name = "${name}.tar.gz";
- url = "https://github.com/GoldenCheetah/GoldenCheetah/archive/V${version}.tar.gz";
- sha256 = "0fiz2pj155cd357kph50lc6rjyzwp045glfv4y68qls9j7m9ayaf";
+in mkDerivation rec {
+ pname = "golden-cheetah";
+ version = "3.5-DEV1903";
+
+ src = fetchFromGitHub {
+ owner = "GoldenCheetah";
+ repo = "GoldenCheetah";
+ rev = "v${version}";
+ sha256 = "130b0hm04i0hf97rs1xrdfhbal5vjsknj3x4cdxjh7rgbg2p1sm3";
};
+
buildInputs = [
qtbase qtsvg qtserialport qtwebkit qtmultimedia qttools zlib
- qtconnectivity
+ qtconnectivity qtcharts
];
nativeBuildInputs = [ flex makeWrapper qmake yacc ];
- NIX_LDFLAGS = [
- "-lz"
- ];
+
+ NIX_LDFLAGS = [ "-lz" ];
+
+ qtWrapperArgs = [ "--set LD_LIBRARY_PATH ${zlib.out}/lib" ];
+
preConfigure = ''
cp src/gcconfig.pri.in src/gcconfig.pri
cp qwt/qwtconfig.pri.in qwt/qwtconfig.pri
echo 'QMAKE_LRELEASE = ${qttools.dev}/bin/lrelease' >> src/gcconfig.pri
sed -i -e '21,23d' qwt/qwtconfig.pri # Removed forced installation to /usr/local
'';
+
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp src/GoldenCheetah $out/bin
- wrapProgram $out/bin/GoldenCheetah --set LD_LIBRARY_PATH "${zlib.out}/lib"
install -Dm644 "${desktopItem}/share/applications/"* -t $out/share/applications/
install -Dm644 src/Resources/images/gc.png $out/share/pixmaps/goldencheetah.png
diff --git a/pkgs/applications/misc/goldendict/default.nix b/pkgs/applications/misc/goldendict/default.nix
index 42d5d83f7bdb..e917cc024d5b 100644
--- a/pkgs/applications/misc/goldendict/default.nix
+++ b/pkgs/applications/misc/goldendict/default.nix
@@ -1,25 +1,29 @@
-{ stdenv, fetchFromGitHub, pkgconfig, libXtst, libvorbis, hunspell
-, libao, ffmpeg, libeb, lzo, xz, libtiff
+{ mkDerivation, lib, fetchFromGitHub, pkgconfig, libXtst, libvorbis, hunspell
+, libao, ffmpeg, libeb, lzo, xz, libtiff, opencc
, qtbase, qtsvg, qtwebkit, qtx11extras, qttools, qmake }:
-stdenv.mkDerivation rec {
+mkDerivation {
- name = "goldendict-2018-06-13";
+ name = "goldendict-2019-08-01";
src = fetchFromGitHub {
owner = "goldendict";
repo = "goldendict";
- rev = "48e850c7ec11d83cba7499f7fdce377ef3849bbb";
- sha256 = "0i4q4waqjv45hgwillvjik97pg26kwlmz4925djjkx8s6hxgjlq9";
+ rev = "0f951b06a55f3a201891cf645a556e773bda5f52";
+ sha256 = "1d1hn95vhvsmbq9q96l5adn90g0hg25dl01knb4y4v6v9x4yrl2x";
};
nativeBuildInputs = [ pkgconfig qmake ];
buildInputs = [
qtbase qtsvg qtwebkit qtx11extras qttools
- libXtst libvorbis hunspell libao ffmpeg libeb lzo xz libtiff
+ libXtst libvorbis hunspell libao ffmpeg libeb lzo xz libtiff opencc
];
- qmakeFlags = [ "CONFIG+=zim_support" ];
+ qmakeFlags = [
+ "goldendict.pro"
+ "CONFIG+=zim_support"
+ "CONFIG+=chinese_conversion_support"
+ ];
- meta = with stdenv.lib; {
+ meta = with lib; {
homepage = http://goldendict.org/;
description = "A feature-rich dictionary lookup program";
platforms = platforms.linux;
diff --git a/pkgs/applications/misc/gollum/Gemfile.lock b/pkgs/applications/misc/gollum/Gemfile.lock
index 9a12ba2bfd55..6cd77318754c 100644
--- a/pkgs/applications/misc/gollum/Gemfile.lock
+++ b/pkgs/applications/misc/gollum/Gemfile.lock
@@ -36,7 +36,7 @@ GEM
mime-types-data (3.2019.0331)
mini_portile2 (2.4.0)
mustache (0.99.8)
- nokogiri (1.10.3)
+ nokogiri (1.10.4)
mini_portile2 (~> 2.4.0)
posix-spawn (0.3.13)
rack (1.6.11)
diff --git a/pkgs/applications/misc/gollum/default.nix b/pkgs/applications/misc/gollum/default.nix
index 62f2d7a069d9..e9a177ee1937 100644
--- a/pkgs/applications/misc/gollum/default.nix
+++ b/pkgs/applications/misc/gollum/default.nix
@@ -2,7 +2,6 @@
, git }:
stdenv.mkDerivation rec {
- name = "${pname}-${version}";
pname = "gollum";
# nix-shell -p bundix icu zlib
version = (import ./gemset.nix).gollum.version;
@@ -10,7 +9,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ makeWrapper ];
env = bundlerEnv {
- name = "${name}-gems";
+ name = "${pname}-${version}-gems";
inherit pname ruby;
gemdir = ./.;
};
diff --git a/pkgs/applications/misc/gollum/gemset.nix b/pkgs/applications/misc/gollum/gemset.nix
index 6de5553ac7cf..f9bdf94db179 100644
--- a/pkgs/applications/misc/gollum/gemset.nix
+++ b/pkgs/applications/misc/gollum/gemset.nix
@@ -151,10 +151,10 @@
platforms = [];
source = {
remotes = ["https://rubygems.org"];
- sha256 = "02bjydih0j515szfv9mls195cvpyidh6ixm7dwbl3s2sbaxxk5s4";
+ sha256 = "0nmdrqqz1gs0fwkgzxjl4wr554gr8dc1fkrqjc2jpsvwgm41rygv";
type = "gem";
};
- version = "1.10.3";
+ version = "1.10.4";
};
posix-spawn = {
groups = ["default"];
diff --git a/pkgs/applications/misc/googleearth/default.nix b/pkgs/applications/misc/googleearth/default.nix
index 0fccf83acf76..961efe4b0576 100644
--- a/pkgs/applications/misc/googleearth/default.nix
+++ b/pkgs/applications/misc/googleearth/default.nix
@@ -40,7 +40,8 @@ let
];
in
stdenv.mkDerivation rec {
- name = "googleearth-${version}";
+ pname = "googleearth";
+ inherit version;
src = fetchurl {
url = "https://dl.google.com/linux/earth/deb/pool/main/g/google-earth-stable/google-earth-stable_${version}-r0_${arch}.deb";
inherit sha256;
diff --git a/pkgs/applications/misc/googler/default.nix b/pkgs/applications/misc/googler/default.nix
index 3dcbcaf38b87..12eb8839b8a8 100644
--- a/pkgs/applications/misc/googler/default.nix
+++ b/pkgs/applications/misc/googler/default.nix
@@ -2,7 +2,7 @@
stdenv.mkDerivation rec {
version = "3.9";
- name = "googler-${version}";
+ pname = "googler";
src = fetchFromGitHub {
owner = "jarun";
diff --git a/pkgs/applications/misc/gosmore/default.nix b/pkgs/applications/misc/gosmore/default.nix
index 464e0ba53346..41cdf267f5de 100644
--- a/pkgs/applications/misc/gosmore/default.nix
+++ b/pkgs/applications/misc/gosmore/default.nix
@@ -11,7 +11,7 @@ stdenv.mkDerivation {
src = fetchsvn {
url = http://svn.openstreetmap.org/applications/rendering/gosmore;
sha256 = "0qsckpqx7i7f8gkqhkzdamr65250afk1rpnh3nbman35kdv3dsxi";
- rev = "${version}";
+ rev = version;
ignoreExternals = true;
};
diff --git a/pkgs/applications/misc/gpg-mdp/default.nix b/pkgs/applications/misc/gpg-mdp/default.nix
index 4143f6fde559..9954ff660adc 100644
--- a/pkgs/applications/misc/gpg-mdp/default.nix
+++ b/pkgs/applications/misc/gpg-mdp/default.nix
@@ -3,7 +3,8 @@
let version = "0.7.4";
in stdenv.mkDerivation {
# mdp renamed to gpg-mdp because there is a mdp package already.
- name = "gpg-mdp-${version}";
+ pname = "gpg-mdp";
+ inherit version;
meta = {
homepage = https://tamentis.com/projects/mdp/;
license = [stdenv.lib.licenses.isc];
diff --git a/pkgs/applications/misc/gphoto2/gphotofs.nix b/pkgs/applications/misc/gphoto2/gphotofs.nix
index 7b23fca2121e..c1c2a44bd7f2 100644
--- a/pkgs/applications/misc/gphoto2/gphotofs.nix
+++ b/pkgs/applications/misc/gphoto2/gphotofs.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchurl, libtool, pkgconfig, libgphoto2, fuse, glib }:
stdenv.mkDerivation rec {
- name = "gphoto2fs-${version}";
+ pname = "gphoto2fs";
version = "0.5.0";
src = fetchurl {
url="mirror://sourceforge/gphoto/gphotofs/${version}/gphotofs-0.5.tar.bz2";
diff --git a/pkgs/applications/misc/gpsbabel/default.nix b/pkgs/applications/misc/gpsbabel/default.nix
index aa0ed5f64632..9d244ca18f32 100644
--- a/pkgs/applications/misc/gpsbabel/default.nix
+++ b/pkgs/applications/misc/gpsbabel/default.nix
@@ -1,7 +1,7 @@
{ lib, stdenv, fetchFromGitHub, fetchpatch, zlib, which, IOKit, qtbase }:
stdenv.mkDerivation rec {
- name = "gpsbabel-${version}";
+ pname = "gpsbabel";
version = "1.6.0";
src = fetchFromGitHub {
diff --git a/pkgs/applications/misc/gpscorrelate/default.nix b/pkgs/applications/misc/gpscorrelate/default.nix
index 5bcaccb43bcf..bf7bec38afb5 100644
--- a/pkgs/applications/misc/gpscorrelate/default.nix
+++ b/pkgs/applications/misc/gpscorrelate/default.nix
@@ -3,15 +3,17 @@
stdenv.mkDerivation rec {
pname = "gpscorrelate";
- version = "unstable-2019-06-05";
+ version = "unstable-2019-09-03";
src = fetchFromGitHub {
owner = "dfandrich";
repo = pname;
- rev = "80b14fe7c10c1cc8f62c13f517c062577ce88c85";
- sha256 = "1gaan0nd7ai0bwilfnkza7lg5mz87804mvlygj0gjc672izr37r6";
+ rev = "e1dd44a34f67b1ab7201440e60a840258ee448d2";
+ sha256 = "0gjwwdqh9dprzylmmnk3gm41khka9arkij3i9amd8y7d49pm9rlv";
};
+ patches = [ ./fix-localedir.diff ];
+
nativeBuildInputs = [
desktop-file-utils
docbook_xml_dtd_42
@@ -27,15 +29,16 @@ stdenv.mkDerivation rec {
];
makeFlags = [
- "prefix=${placeholder ''out''}"
+ "prefix=${placeholder "out"}"
"GTK=3"
"CC=cc"
"CXX=c++"
+ "CFLAGS=-DENABLE_NLS"
];
doCheck = true;
- installTargets = [ "install" "install-desktop-file" ];
+ installTargets = [ "install" "install-po" "install-desktop-file" ];
meta = with stdenv.lib; {
description = "A GPS photo correlation tool, to add EXIF geotags";
@@ -59,5 +62,6 @@ stdenv.mkDerivation rec {
license = licenses.gpl2Plus;
homepage = "https://github.com/dfandrich/gpscorrelate";
platforms = platforms.linux;
+ maintainers = with maintainers; [ sikmir ];
};
}
diff --git a/pkgs/applications/misc/gpscorrelate/fix-localedir.diff b/pkgs/applications/misc/gpscorrelate/fix-localedir.diff
new file mode 100644
index 000000000000..5f9cb296ecd5
--- /dev/null
+++ b/pkgs/applications/misc/gpscorrelate/fix-localedir.diff
@@ -0,0 +1,27 @@
+diff --git i/Makefile w/Makefile
+index 47919ca..408fd68 100644
+--- i/Makefile
++++ w/Makefile
+@@ -33,8 +33,9 @@ datadir = $(prefix)/share
+ mandir = $(datadir)/man
+ docdir = $(datadir)/doc/gpscorrelate
+ applicationsdir = $(datadir)/applications
++localedir = ${datadir}/locale
+
+-DEFS = -DPACKAGE_VERSION=\"$(PACKAGE_VERSION)\"
++DEFS = -DPACKAGE_VERSION=\"$(PACKAGE_VERSION)\" -DPACKAGE_LOCALE_DIR=\"$(localedir)\"
+
+ TARGETS = gpscorrelate-gui$(EXEEXT) gpscorrelate$(EXEEXT) doc/gpscorrelate.1 doc/gpscorrelate.html
+
+diff --git i/main-gui.c w/main-gui.c
+index fdace6f..8a6197b 100644
+--- i/main-gui.c
++++ w/main-gui.c
+@@ -40,6 +40,7 @@
+ int main(int argc, char* argv[])
+ {
+ /* Initialize gettext (gtk_init initializes the locale) */
++ (void) bindtextdomain(TEXTDOMAIN, PACKAGE_LOCALE_DIR);
+ (void) textdomain(TEXTDOMAIN);
+ (void) bind_textdomain_codeset(TEXTDOMAIN, "UTF-8");
+
diff --git a/pkgs/applications/misc/gpsprune/default.nix b/pkgs/applications/misc/gpsprune/default.nix
index 4f0c1864677c..9c0dc48d42ee 100644
--- a/pkgs/applications/misc/gpsprune/default.nix
+++ b/pkgs/applications/misc/gpsprune/default.nix
@@ -1,7 +1,7 @@
{ fetchurl, stdenv, makeDesktopItem, makeWrapper, unzip, jre8 }:
stdenv.mkDerivation rec {
- name = "gpsprune-${version}";
+ pname = "gpsprune";
version = "19.2";
src = fetchurl {
diff --git a/pkgs/applications/misc/gpx-viewer/default.nix b/pkgs/applications/misc/gpx-viewer/default.nix
index 735818171e80..04ab062c1a1b 100644
--- a/pkgs/applications/misc/gpx-viewer/default.nix
+++ b/pkgs/applications/misc/gpx-viewer/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, intltool, libxml2, pkgconfig, gnome3, libchamplain, gdl, shared-mime-info, desktop-file-utils, wrapGAppsHook }:
stdenv.mkDerivation rec {
- name = "gpx-viewer-${version}";
+ pname = "gpx-viewer";
version = "0.4.0";
src = fetchurl {
- url = "https://launchpad.net/gpx-viewer/trunk/${version}/+download/${name}.tar.gz";
+ url = "https://launchpad.net/gpx-viewer/trunk/${version}/+download/${pname}-${version}.tar.gz";
sha256 = "956acfaf870ac436300cd9953dece630df7fd7dff8e4ae2577a6002884466f80";
};
diff --git a/pkgs/applications/misc/gpx/default.nix b/pkgs/applications/misc/gpx/default.nix
index 9fef93819492..a341a212a37f 100644
--- a/pkgs/applications/misc/gpx/default.nix
+++ b/pkgs/applications/misc/gpx/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, autoreconfHook }:
stdenv.mkDerivation rec {
- name = "gpx-${version}";
+ pname = "gpx";
version = "2.5.2";
nativeBuildInputs = [ autoreconfHook ];
diff --git a/pkgs/applications/misc/gpxsee/default.nix b/pkgs/applications/misc/gpxsee/default.nix
index e326e9c10087..ef84b8a4e6d7 100644
--- a/pkgs/applications/misc/gpxsee/default.nix
+++ b/pkgs/applications/misc/gpxsee/default.nix
@@ -2,13 +2,13 @@
mkDerivation rec {
pname = "gpxsee";
- version = "7.11";
+ version = "7.15";
src = fetchFromGitHub {
owner = "tumic0";
repo = "GPXSee";
rev = version;
- sha256 = "1b4ky7m990h3rmam9lb1w6vns1mxd8ri6is3a8qgdl8kd6xcl5d7";
+ sha256 = "036g17479nqy3kvy3dy3cn7yi7r57rsp28gkcay0qhf9h0az76p3";
};
nativeBuildInputs = [ qmake ];
@@ -28,7 +28,7 @@ mkDerivation rec {
all common GPS log file formats.
'';
license = licenses.gpl3;
- maintainers = [ maintainers.womfoo ];
+ maintainers = with maintainers; [ womfoo sikmir ];
platforms = platforms.linux;
};
}
diff --git a/pkgs/applications/misc/gramps/default.nix b/pkgs/applications/misc/gramps/default.nix
index e9026ded4702..84be50ccb5e5 100644
--- a/pkgs/applications/misc/gramps/default.nix
+++ b/pkgs/applications/misc/gramps/default.nix
@@ -10,7 +10,7 @@ let
inherit (pythonPackages) python buildPythonApplication;
in buildPythonApplication rec {
version = "5.0.1";
- name = "gramps-${version}";
+ pname = "gramps";
nativeBuildInputs = [ wrapGAppsHook gettext ];
buildInputs = [ intltool gtk3 gobject-introspection pango gnome3.gexiv2 ]
@@ -48,7 +48,7 @@ in buildPythonApplication rec {
eapth="$out/lib/${python.libPrefix}"/site-packages/easy-install.pth
if [ -e "$eapth" ]; then
# move colliding easy_install.pth to specifically named one
- mv "$eapth" $(dirname "$eapth")/${name}.pth
+ mv "$eapth" $(dirname "$eapth")/${pname}-${version}.pth
fi
rm -f "$out/lib/${python.libPrefix}"/site-packages/site.py*
diff --git a/pkgs/applications/misc/green-pdfviewer/default.nix b/pkgs/applications/misc/green-pdfviewer/default.nix
index cb4f4748eec1..d86db7adb9d0 100644
--- a/pkgs/applications/misc/green-pdfviewer/default.nix
+++ b/pkgs/applications/misc/green-pdfviewer/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, poppler, pkgconfig, gdk-pixbuf, SDL, gtk2 }:
-stdenv.mkDerivation rec {
- name = "green-pdfviewer-${version}";
+stdenv.mkDerivation {
+ pname = "green-pdfviewer";
version = "nightly-2014-04-22";
src = fetchFromGitHub {
diff --git a/pkgs/applications/misc/gremlin-console/default.nix b/pkgs/applications/misc/gremlin-console/default.nix
index 9274c2d05216..87e636b9c030 100644
--- a/pkgs/applications/misc/gremlin-console/default.nix
+++ b/pkgs/applications/misc/gremlin-console/default.nix
@@ -1,7 +1,7 @@
{ fetchzip, stdenv, makeWrapper, openjdk }:
stdenv.mkDerivation rec {
- name = "gremlin-console-${version}";
+ pname = "gremlin-console";
version = "3.3.4";
src = fetchzip {
url = "http://www-eu.apache.org/dist/tinkerpop/${version}/apache-tinkerpop-gremlin-console-${version}-bin.zip";
diff --git a/pkgs/applications/misc/grip/default.nix b/pkgs/applications/misc/grip/default.nix
index cb407fca66cb..b7df9b49fb3f 100644
--- a/pkgs/applications/misc/grip/default.nix
+++ b/pkgs/applications/misc/grip/default.nix
@@ -2,11 +2,11 @@
, curl, cdparanoia, libid3tag, ncurses, libtool }:
stdenv.mkDerivation rec {
- name = "grip-3.3.1";
+ name = "grip-3.10.2";
src = fetchurl {
url = "mirror://sourceforge/grip/${name}.tar.gz";
- sha256 = "1zb6zpq7qmn6bflbgfwisyg3vrjr23yi1c1kqvwndl1f0shr8qyl";
+ sha256 = "1wngrvw0zkrd2xw7c6w0qmq38jxishp5q9xvm6qlycza2czb4p36";
};
nativeBuildInputs = [ pkgconfig ];
@@ -15,8 +15,11 @@ stdenv.mkDerivation rec {
hardeningDisable = [ "format" ];
+ # glib-2.62 deprecations
+ NIX_CFLAGS_COMPILE = [ "-DGLIB_DISABLE_DEPRECATION_WARNINGS" ];
+
meta = {
- description = "GTK+-based audio CD player/ripper";
+ description = "GTK-based audio CD player/ripper";
homepage = http://nostatic.org/grip;
license = stdenv.lib.licenses.gpl2;
diff --git a/pkgs/applications/misc/gsctl/default.nix b/pkgs/applications/misc/gsctl/default.nix
new file mode 100644
index 000000000000..b84053b94adc
--- /dev/null
+++ b/pkgs/applications/misc/gsctl/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, buildGoPackage, fetchFromGitHub }:
+
+buildGoPackage rec {
+ pname = "gsctl";
+ version = "0.15.4";
+
+ goPackagePath = "github.com/giantswarm/gsctl";
+
+ src = fetchFromGitHub {
+ owner = "giantswarm";
+ repo = pname;
+ rev = version;
+ sha256 = "0s5bli08wfd9xszx3kc90k51vlgjc00r0qg4mikb6qdc4pxpgsxj";
+ };
+
+ meta = with stdenv.lib; {
+ description = "The Giant Swarm command line interface";
+ homepage = https://github.com/giantswarm/gsctl;
+ license = licenses.asl20;
+ maintainers = with maintainers; [ joesalisbury ];
+ };
+}
diff --git a/pkgs/applications/misc/gsimplecal/default.nix b/pkgs/applications/misc/gsimplecal/default.nix
index 7f3b3a8d6dc5..ea78331e4764 100644
--- a/pkgs/applications/misc/gsimplecal/default.nix
+++ b/pkgs/applications/misc/gsimplecal/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchurl, automake, autoconf, pkgconfig, gtk3 }:
stdenv.mkDerivation rec {
- name = "gsimplecal-${version}";
+ pname = "gsimplecal";
version = "2.1";
src = fetchurl {
diff --git a/pkgs/applications/misc/gtk2fontsel/default.nix b/pkgs/applications/misc/gtk2fontsel/default.nix
index 8f683272e120..9b8d6a7f976b 100644
--- a/pkgs/applications/misc/gtk2fontsel/default.nix
+++ b/pkgs/applications/misc/gtk2fontsel/default.nix
@@ -2,10 +2,10 @@
stdenv.mkDerivation rec {
version = "0.1";
- name = "gtk2fontsel-${version}";
+ pname = "gtk2fontsel";
src = fetchurl {
- url = "mirror://sourceforge/gtk2fontsel/${name}.tar.gz";
+ url = "mirror://sourceforge/gtk2fontsel/${pname}-${version}.tar.gz";
sha256 = "0s2sj19n8ys92q9832hkn36ld91bb4qavicc6nygkry6qdpkkmjw";
};
@@ -15,9 +15,9 @@ stdenv.mkDerivation rec {
preferLocalBuild = true;
meta = with stdenv.lib; {
- description = "A font selection program for X11 using the GTK2 toolkit";
+ description = "A font selection program for X11 using the GTK 2 toolkit";
longDescription = ''
- Font selection tool similar to xfontsel implemented using GTK+ 2.
+ Font selection tool similar to xfontsel implemented using GTK 2.
Trivial, but useful nonetheless.
'';
homepage = http://gtk2fontsel.sourceforge.net/;
diff --git a/pkgs/applications/misc/guake/default.nix b/pkgs/applications/misc/guake/default.nix
index 37352915cb84..97303c43fb1a 100644
--- a/pkgs/applications/misc/guake/default.nix
+++ b/pkgs/applications/misc/guake/default.nix
@@ -3,7 +3,7 @@
let
version = "3.6.3";
-in python3.pkgs.buildPythonApplication rec {
+in python3.pkgs.buildPythonApplication {
name = "guake-${version}";
format = "other";
diff --git a/pkgs/applications/misc/gummi/default.nix b/pkgs/applications/misc/gummi/default.nix
index 1e237923d054..273be11ac63a 100644
--- a/pkgs/applications/misc/gummi/default.nix
+++ b/pkgs/applications/misc/gummi/default.nix
@@ -5,12 +5,12 @@
stdenv.mkDerivation rec {
version = "0.6.6";
- name = "gummi-${version}";
+ pname = "gummi";
src = pkgs.fetchFromGitHub {
owner = "alexandervdm";
repo = "gummi";
- rev = "${version}";
+ rev = version;
sha256 = "1vw8rhv8qj82l6l22kpysgm9mxilnki2kjmvxsnajbqcagr6s7cn";
};
diff --git a/pkgs/applications/misc/gxmessage/default.nix b/pkgs/applications/misc/gxmessage/default.nix
index a9e6d905c284..ce0a6963ea99 100644
--- a/pkgs/applications/misc/gxmessage/default.nix
+++ b/pkgs/applications/misc/gxmessage/default.nix
@@ -1,16 +1,16 @@
-{ stdenv, fetchurl, gtk3, intltool, pkgconfig, texinfo, hicolor-icon-theme }:
+{ stdenv, fetchurl, gtk3, intltool, pkgconfig, texinfo }:
stdenv.mkDerivation rec {
- name = "gxmessage-${version}";
+ pname = "gxmessage";
version = "3.4.3";
src = fetchurl {
- url = "http://homepages.ihug.co.nz/~trmusson/stuff/${name}.tar.gz";
+ url = "http://homepages.ihug.co.nz/~trmusson/stuff/${pname}-${version}.tar.gz";
sha256 = "db4e1655fc58f31e5770a17dfca4e6c89028ad8b2c8e043febc87a0beedeef05";
};
nativeBuildInputs = [ pkgconfig ];
- buildInputs = [ intltool gtk3 texinfo hicolor-icon-theme ];
+ buildInputs = [ intltool gtk3 texinfo ];
meta = {
description = "A GTK enabled dropin replacement for xmessage";
diff --git a/pkgs/applications/misc/gxneur/default.nix b/pkgs/applications/misc/gxneur/default.nix
index 7d19a9cb1108..6e6145e79086 100644
--- a/pkgs/applications/misc/gxneur/default.nix
+++ b/pkgs/applications/misc/gxneur/default.nix
@@ -8,7 +8,8 @@ stdenv.mkDerivation {
sha256 = "0avmhdcj0hpr55fc0iih8fjykmdhn34c8mwdnqvl8jh4nhxxchxr";
};
- NIX_CFLAGS_COMPILE = "-Wno-deprecated-declarations";
+ # glib-2.62 deprecations
+ NIX_CFLAGS_COMPILE = [ "-DGLIB_DISABLE_DEPRECATION_WARNINGS" ];
nativeBuildInputs = [ pkgconfig intltool ];
buildInputs = [
diff --git a/pkgs/applications/misc/hdate/default.nix b/pkgs/applications/misc/hdate/default.nix
index e2f5f653d47c..989dfb886ec3 100644
--- a/pkgs/applications/misc/hdate/default.nix
+++ b/pkgs/applications/misc/hdate/default.nix
@@ -2,7 +2,7 @@
stdenv.mkDerivation rec {
version = "1.6.02";
- name = "hdate-${version}";
+ pname = "hdate";
src = fetchurl {
url = "https://sourceforge.net/projects/libhdate/files/libhdate/libhdate-${version}/libhdate-${version}.tar.bz2";
sha256 = "3c930a8deb57c01896dc37f0d7804e5a330ee8e88c4ff610b71f9d2b02c17762";
diff --git a/pkgs/applications/misc/hello-unfree/default.nix b/pkgs/applications/misc/hello-unfree/default.nix
index 1647a09edfd6..a5a9187ab0f2 100644
--- a/pkgs/applications/misc/hello-unfree/default.nix
+++ b/pkgs/applications/misc/hello-unfree/default.nix
@@ -1,7 +1,7 @@
{ stdenv, runtimeShell }:
-stdenv.mkDerivation rec {
- name = "example-unfree-package-${version}";
+stdenv.mkDerivation {
+ pname = "example-unfree-package";
version = "1.0";
phases = [ "installPhase" "fixupPhase" ];
diff --git a/pkgs/applications/misc/hello/default.nix b/pkgs/applications/misc/hello/default.nix
index 63a8af99f7cf..8bae8ce373c7 100644
--- a/pkgs/applications/misc/hello/default.nix
+++ b/pkgs/applications/misc/hello/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
- name = "hello-${version}";
+ pname = "hello";
version = "2.10";
src = fetchurl {
- url = "mirror://gnu/hello/${name}.tar.gz";
+ url = "mirror://gnu/hello/${pname}-${version}.tar.gz";
sha256 = "0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i";
};
diff --git a/pkgs/applications/misc/hivemind/default.nix b/pkgs/applications/misc/hivemind/default.nix
index 0431f35057be..84f5bad24d21 100644
--- a/pkgs/applications/misc/hivemind/default.nix
+++ b/pkgs/applications/misc/hivemind/default.nix
@@ -1,7 +1,7 @@
{ stdenv, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
- name = "hivemind-${version}";
+ pname = "hivemind";
version = "1.0.4";
goPackagePath = "github.com/DarthSim/hivemind";
diff --git a/pkgs/applications/misc/houdini/default.nix b/pkgs/applications/misc/houdini/default.nix
index 607dff293189..ce35e91d9278 100644
--- a/pkgs/applications/misc/houdini/default.nix
+++ b/pkgs/applications/misc/houdini/default.nix
@@ -2,7 +2,7 @@
let
houdini-runtime = callPackage ./runtime.nix { };
-in buildFHSUserEnv rec {
+in buildFHSUserEnv {
name = "houdini-${houdini-runtime.version}";
extraBuildCommands = ''
diff --git a/pkgs/applications/misc/houdini/runtime.nix b/pkgs/applications/misc/houdini/runtime.nix
index 500f1df36a0c..88c87eaca871 100644
--- a/pkgs/applications/misc/houdini/runtime.nix
+++ b/pkgs/applications/misc/houdini/runtime.nix
@@ -30,7 +30,7 @@ let
in
stdenv.mkDerivation rec {
version = "17.0.352";
- name = "houdini-runtime-${version}";
+ pname = "houdini-runtime";
src = requireFile rec {
name = "houdini-${version}-linux_x86_64_gcc6.3.tar.gz";
sha256 = "0cl5fkgaplb0cvv7mli06ffc9j4ngpy8hl5zqabj3d645gcgafjg";
diff --git a/pkgs/applications/misc/hr/default.nix b/pkgs/applications/misc/hr/default.nix
index 2fd56e3c5552..437c42b03317 100644
--- a/pkgs/applications/misc/hr/default.nix
+++ b/pkgs/applications/misc/hr/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
- name = "hr-${version}";
+ pname = "hr";
version = "1.2";
src = fetchFromGitHub {
diff --git a/pkgs/applications/misc/hstr/default.nix b/pkgs/applications/misc/hstr/default.nix
index 1eae8c57fc4e..0d25d3d686c9 100644
--- a/pkgs/applications/misc/hstr/default.nix
+++ b/pkgs/applications/misc/hstr/default.nix
@@ -1,15 +1,29 @@
-{ stdenv, fetchurl, readline, ncurses }:
+{ stdenv, fetchFromGitHub, readline, ncurses
+, autoreconfHook, pkgconfig, gettext }:
stdenv.mkDerivation rec {
- name = "hstr-${version}";
- version = "1.25";
+ pname = "hstr";
+ version = "2.0";
- src = fetchurl {
- url = "https://github.com/dvorka/hstr/releases/download/${version}/hh-${version}-src.tgz";
- sha256 = "10njj0a3s5czv497wk3whka3gxr7vmhabs12vaw7kgb07h4ssnhg";
+ src = fetchFromGitHub {
+ owner = "dvorka";
+ repo = "hstr";
+ rev = version;
+ sha256 = "1y9vsfbg07gbic0daqy569d9pb9i1d07fym3q7a0a99hbng85s20";
};
- buildInputs = [ readline ncurses ];
+ nativeBuildInputs = [ autoreconfHook pkgconfig ];
+ buildInputs = [ readline ncurses gettext ];
+
+ configurePhase = ''
+ autoreconf -fvi
+ ./configure
+ '';
+
+ installPhase = ''
+ mkdir -p $out/bin/
+ mv src/hstr $out/bin/
+ '';
meta = {
homepage = https://github.com/dvorka/hstr;
diff --git a/pkgs/applications/misc/hubstaff/default.nix b/pkgs/applications/misc/hubstaff/default.nix
index acdeec10d300..b2997ece5d56 100644
--- a/pkgs/applications/misc/hubstaff/default.nix
+++ b/pkgs/applications/misc/hubstaff/default.nix
@@ -17,7 +17,8 @@ let
in
stdenv.mkDerivation {
- name = "hubstaff-${version}";
+ pname = "hubstaff";
+ inherit version;
src = fetchurl { inherit sha256 url; };
diff --git a/pkgs/applications/misc/hubstaff/revision.json b/pkgs/applications/misc/hubstaff/revision.json
index 513e5bef442a..64cad5c02928 100644
--- a/pkgs/applications/misc/hubstaff/revision.json
+++ b/pkgs/applications/misc/hubstaff/revision.json
@@ -1,5 +1,5 @@
{
- "url": "https://hubstaff-production.s3.amazonaws.com/downloads/HubstaffClient/Builds/Release/1.4.9-86828309/Hubstaff-1.4.9-86828309.sh",
- "version": "1.4.9-86828309",
- "sha256": "0p9b7s2damzxmbrm8m97bj06g0faslbjw51dmxq8icz6ldbqsspx"
+ "url": "https://hubstaff-production.s3.amazonaws.com/downloads/HubstaffClient/Builds/Release/1.4.11-a12e5bad/Hubstaff-1.4.11-a12e5bad.sh",
+ "version": "1.4.11-a12e5bad",
+ "sha256": "0nqmw02spplqppvz2jniq5p5y69l8n5xp9wji4032kn4qsba33jn"
}
diff --git a/pkgs/applications/misc/hugo/default.nix b/pkgs/applications/misc/hugo/default.nix
index 0bb3f15fdc18..840f4c32e52a 100644
--- a/pkgs/applications/misc/hugo/default.nix
+++ b/pkgs/applications/misc/hugo/default.nix
@@ -1,19 +1,19 @@
{ stdenv, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
- name = "hugo-${version}";
- version = "0.55.4";
+ pname = "hugo";
+ version = "0.58.3";
goPackagePath = "github.com/gohugoio/hugo";
src = fetchFromGitHub {
owner = "gohugoio";
- repo = "hugo";
+ repo = pname;
rev = "v${version}";
- sha256 = "0hbkl8dhhdic0admrkvlp1h1bmfrrwfnvipx27clyk0f88jcvb7y";
+ sha256 = "00dhb6xilkwr9yhncpyc6alzqw77ch3vd85dc7lzsmhw1c80n0lc";
};
- modSha256 = "0yrwkaaasj9ihjjfbywnzkppix1y2znagg3dkyikk21sl5n0nz23";
+ modSha256 = "0d6zc7hxb246zsvwsjz4ds6gdd2m95x6l3djh3mmciwfg9cd7prx";
buildFlags = "-tags extended";
diff --git a/pkgs/applications/misc/hyper/default.nix b/pkgs/applications/misc/hyper/default.nix
index f8d808a49c29..f21675e60b2d 100644
--- a/pkgs/applications/misc/hyper/default.nix
+++ b/pkgs/applications/misc/hyper/default.nix
@@ -12,7 +12,7 @@ let
in
stdenv.mkDerivation rec {
version = "2.1.2";
- name = "hyper-${version}";
+ pname = "hyper";
src = fetchurl {
url = "https://github.com/zeit/hyper/releases/download/${version}/hyper_${version}_amd64.deb";
sha256 = "1n4qlbk7q9zkhhg72mdks95g15xgyrc6ixf882ghvrqghd4zxplm";
diff --git a/pkgs/applications/misc/icesl/default.nix b/pkgs/applications/misc/icesl/default.nix
index c0c1faef09d2..c197e1a8fd38 100644
--- a/pkgs/applications/misc/icesl/default.nix
+++ b/pkgs/applications/misc/icesl/default.nix
@@ -3,7 +3,7 @@ let
lpath = stdenv.lib.makeLibraryPath [ libXmu libXi libX11 freeglut libICE libGLU_combined libSM libXext ];
in
stdenv.mkDerivation rec {
- name = "iceSL-${version}";
+ pname = "iceSL";
version = "2.1.10";
src = if stdenv.hostPlatform.system == "x86_64-linux" then fetchzip {
diff --git a/pkgs/applications/misc/ipmicfg/default.nix b/pkgs/applications/misc/ipmicfg/default.nix
index d9bccee889ab..7daa2704e22b 100644
--- a/pkgs/applications/misc/ipmicfg/default.nix
+++ b/pkgs/applications/misc/ipmicfg/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchzip }:
stdenv.mkDerivation rec {
- name = "ipmicfg-${version}";
+ pname = "ipmicfg";
version = "1.29.0";
buildVersion = "181029";
diff --git a/pkgs/applications/misc/ipmiview/default.nix b/pkgs/applications/misc/ipmiview/default.nix
index b5fa9143ddbb..e46df5d59e0e 100644
--- a/pkgs/applications/misc/ipmiview/default.nix
+++ b/pkgs/applications/misc/ipmiview/default.nix
@@ -1,33 +1,72 @@
-{ stdenv, fetchurl, patchelf, makeWrapper, xorg, gcc, gcc-unwrapped }:
+{ stdenv
+, fetchurl
+, makeDesktopItem
+, makeWrapper
+, patchelf
+, fontconfig
+, freetype
+, gcc
+, gcc-unwrapped
+, iputils
+, psmisc
+, xorg }:
stdenv.mkDerivation rec {
- name = "IPMIView-${version}";
- version = "2.14.0";
- buildVersion = "180213";
+ pname = "IPMIView";
+ version = "2.16.0";
+ buildVersion = "190815";
- src = fetchurl {
- url = "ftp://ftp.supermicro.com/utility/IPMIView/Linux/IPMIView_${version}_build.${buildVersion}_bundleJRE_Linux_x64.tar.gz";
- sha256 = "1wp22wm7smlsb25x0cck4p660cycfczxj381930crd1qrf68mw4h";
+ src = fetchurl {
+ url = "https://www.supermicro.com/wftp/utility/IPMIView/Linux/IPMIView_${version}_build.${buildVersion}_bundleJRE_Linux_x64.tar.gz";
+ sha256 = "0qw9zfnj0cyvab7ndamlw2y0gpczjhh1jkz8340kl42r2xmhkvpl";
};
- nativeBuildInputs = [ patchelf makeWrapper ];
+ nativeBuildInputs = [ patchelf makeWrapper ];
+ buildPhase = with xorg;
+ let
+ stunnelBinary = if stdenv.hostPlatform.system == "x86_64-linux" then "linux/stunnel64"
+ else if stdenv.hostPlatform.system == "i686-linux" then "linux/stunnel32"
+ else throw "IPMIView is not supported on this platform";
+ in
+ ''
+ patchelf --set-rpath "${stdenv.lib.makeLibraryPath [ libX11 libXext libXrender libXtst libXi ]}" ./jre/lib/amd64/libawt_xawt.so
+ patchelf --set-rpath "${stdenv.lib.makeLibraryPath [ freetype ]}" ./jre/lib/amd64/libfontmanager.so
+ patchelf --set-rpath "${gcc-unwrapped.lib}/lib" ./libiKVM64.so
+ patchelf --set-rpath "${gcc.cc}/lib:$out/jre/lib/amd64/jli" --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" ./jre/bin/java
+ patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" ./BMCSecurity/${stunnelBinary}
+ '';
- buildPhase = with xorg; ''
- patchelf --set-rpath "${stdenv.lib.makeLibraryPath [ libX11 libXext libXrender libXtst libXi ]}" ./jre/lib/amd64/xawt/libmawt.so
- patchelf --set-rpath "${gcc-unwrapped.lib}/lib" ./libiKVM64.so
- patchelf --set-rpath "${stdenv.lib.makeLibraryPath [ libXcursor libX11 libXext libXrender libXtst libXi ]}" --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" ./jre/bin/javaws
- patchelf --set-rpath "${gcc.cc}/lib:$out/jre/lib/amd64/jli" --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" ./jre/bin/java
- '';
+ desktopItem = makeDesktopItem rec {
+ name = "IPMIView";
+ exec = "IPMIView";
+ desktopName = name;
+ genericName = "Supermicro BMC manager";
+ categories = "Network;Configuration";
+ };
- installPhase = ''
- mkdir -p $out/bin
- cp -R . $out/
- makeWrapper $out/jre/bin/java $out/bin/IPMIView \
- --prefix PATH : "$out/jre/bin" \
- --add-flags "-jar $out/IPMIView20.jar"
- '';
+ installPhase = ''
+ mkdir -p $out/bin
+ cp -R . $out/
- meta = with stdenv.lib; {
+ ln -s ${desktopItem}/share $out/share
+
+ # LD_LIBRARY_PATH: fontconfig is used from java code
+ # PATH: iputils is used for ping, and psmisc is for killall
+ # WORK_DIR: unfortunately the ikvm related binaries are loaded from
+ # and user configuration is written to files in the CWD
+ makeWrapper $out/jre/bin/java $out/bin/IPMIView \
+ --set LD_LIBRARY_PATH "${stdenv.lib.makeLibraryPath [ fontconfig ]}" \
+ --prefix PATH : "$out/jre/bin:${iputils}/bin:${psmisc}/bin" \
+ --add-flags "-jar $out/IPMIView20.jar" \
+ --run 'WORK_DIR=''${XDG_DATA_HOME:-~/.local/share}/ipmiview
+ mkdir -p $WORK_DIR
+ ln -snf '$out'/iKVM.jar '$out'/libiKVM* '$out'/libSharedLibrary* $WORK_DIR
+ cd $WORK_DIR'
+ '';
+
+ meta = with stdenv.lib; {
license = licenses.unfree;
- };
- }
+ maintainers = with maintainers; [ vlaci ];
+ platforms = [ "x86_64-linux" "i686-linux" ];
+ };
+}
diff --git a/pkgs/applications/misc/iterm2/default.nix b/pkgs/applications/misc/iterm2/default.nix
index e493226be60a..d63576d5cbd0 100644
--- a/pkgs/applications/misc/iterm2/default.nix
+++ b/pkgs/applications/misc/iterm2/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
- name = "iterm2-${version}";
+ pname = "iterm2";
version = "3.0.14";
src = fetchFromGitHub {
diff --git a/pkgs/applications/misc/jbidwatcher/default.nix b/pkgs/applications/misc/jbidwatcher/default.nix
index 5939d7789b4e..c8951059d4c8 100644
--- a/pkgs/applications/misc/jbidwatcher/default.nix
+++ b/pkgs/applications/misc/jbidwatcher/default.nix
@@ -4,8 +4,6 @@ stdenv.mkDerivation rec {
pname = "jbidwatcher";
version = "2.5.6";
- name = "${pname}-${version}";
-
src = fetchurl {
url = "http://www.jbidwatcher.com/download/JBidwatcher-${version}.jar";
sha256 = "1cw59wh72w1zzibs8x64dma3jc4hry64wjksqs52nc3vpnf0fzfr";
diff --git a/pkgs/applications/misc/jekyll/basic/Gemfile b/pkgs/applications/misc/jekyll/basic/Gemfile
index 2d3446a81134..c4ba46e2ac6a 100644
--- a/pkgs/applications/misc/jekyll/basic/Gemfile
+++ b/pkgs/applications/misc/jekyll/basic/Gemfile
@@ -1,8 +1,6 @@
source "https://rubygems.org"
gem "jekyll"
# jekyll alone might be enough for most use-cases
-gem "rouge"
-gem "activesupport", "~> 4.2"
gem "jekyll-avatar"
gem "jekyll-mentions"
gem "jekyll-seo-tag"
diff --git a/pkgs/applications/misc/jekyll/basic/Gemfile.lock b/pkgs/applications/misc/jekyll/basic/Gemfile.lock
index 7954b6dc03ed..54c703bb8592 100644
--- a/pkgs/applications/misc/jekyll/basic/Gemfile.lock
+++ b/pkgs/applications/misc/jekyll/basic/Gemfile.lock
@@ -1,11 +1,12 @@
GEM
remote: https://rubygems.org/
specs:
- activesupport (4.2.11.1)
- i18n (~> 0.7)
+ activesupport (6.0.0)
+ concurrent-ruby (~> 1.0, >= 1.0.2)
+ i18n (>= 0.7, < 2)
minitest (~> 5.1)
- thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
+ zeitwerk (~> 2.1, >= 2.1.8)
addressable (2.6.0)
public_suffix (>= 2.0.2, < 4.0)
colorator (1.1.0)
@@ -17,43 +18,47 @@ GEM
ffi (1.11.1)
forwardable-extended (2.6.0)
gemoji (3.0.1)
- html-pipeline (2.11.0)
+ html-pipeline (2.12.0)
activesupport (>= 2)
nokogiri (>= 1.4)
http_parser.rb (0.6.0)
- i18n (0.9.5)
+ i18n (1.6.0)
concurrent-ruby (~> 1.0)
- jekyll (3.8.6)
+ jekyll (4.0.0)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
- i18n (~> 0.7)
- jekyll-sass-converter (~> 1.0)
+ i18n (>= 0.9.5, < 2)
+ jekyll-sass-converter (~> 2.0)
jekyll-watch (~> 2.0)
- kramdown (~> 1.14)
+ kramdown (~> 2.1)
+ kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
- rouge (>= 1.7, < 4)
+ rouge (~> 3.0)
safe_yaml (~> 1.0)
- jekyll-avatar (0.6.0)
- jekyll (~> 3.0)
+ terminal-table (~> 1.8)
+ jekyll-avatar (0.7.0)
+ jekyll (>= 3.0, < 5.0)
jekyll-mentions (1.5.1)
html-pipeline (~> 2.3)
jekyll (>= 3.7, < 5.0)
- jekyll-sass-converter (1.5.2)
- sass (~> 3.4)
+ jekyll-sass-converter (2.0.0)
+ sassc (> 2.0.1, < 3.0)
jekyll-seo-tag (2.6.1)
jekyll (>= 3.3, < 5.0)
jekyll-sitemap (1.3.1)
jekyll (>= 3.7, < 5.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
- jemoji (0.11.0)
+ jemoji (0.11.1)
gemoji (~> 3.0)
html-pipeline (~> 2.2)
jekyll (>= 3.0, < 5.0)
- kramdown (1.17.0)
+ kramdown (2.1.0)
+ kramdown-parser-gfm (1.1.0)
+ kramdown (~> 2.0)
liquid (4.0.3)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
@@ -62,7 +67,7 @@ GEM
mercenary (0.3.6)
mini_portile2 (2.4.0)
minitest (5.11.3)
- nokogiri (1.10.3)
+ nokogiri (1.10.4)
mini_portile2 (~> 2.4.0)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
@@ -70,30 +75,29 @@ GEM
rb-fsevent (0.10.3)
rb-inotify (0.10.0)
ffi (~> 1.0)
- rouge (3.5.1)
+ rouge (3.9.0)
ruby_dep (1.5.0)
safe_yaml (1.0.5)
- sass (3.7.4)
- sass-listen (~> 4.0.0)
- sass-listen (4.0.0)
- rb-fsevent (~> 0.9, >= 0.9.4)
- rb-inotify (~> 0.9, >= 0.9.7)
+ sassc (2.1.0)
+ ffi (~> 1.9)
+ terminal-table (1.8.0)
+ unicode-display_width (~> 1.1, >= 1.1.1)
thread_safe (0.3.6)
tzinfo (1.2.5)
thread_safe (~> 0.1)
+ unicode-display_width (1.6.0)
+ zeitwerk (2.1.9)
PLATFORMS
ruby
DEPENDENCIES
- activesupport (~> 4.2)
jekyll
jekyll-avatar
jekyll-mentions
jekyll-seo-tag
jekyll-sitemap
jemoji
- rouge
BUNDLED WITH
1.17.2
diff --git a/pkgs/applications/misc/jekyll/basic/gemset.nix b/pkgs/applications/misc/jekyll/basic/gemset.nix
index 741b5e2a0691..41e599c02020 100644
--- a/pkgs/applications/misc/jekyll/basic/gemset.nix
+++ b/pkgs/applications/misc/jekyll/basic/gemset.nix
@@ -1,14 +1,14 @@
{
activesupport = {
- dependencies = ["i18n" "minitest" "thread_safe" "tzinfo"];
+ dependencies = ["concurrent-ruby" "i18n" "minitest" "tzinfo" "zeitwerk"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
- sha256 = "1vbq7a805bfvyik2q3kl9s3r418f5qzvysqbz2cwy4hr7m2q4ir6";
+ sha256 = "0b24ch7zmrdb4h6aismahk9785lc4ij30lmdr6ydv19kkljsjq5v";
type = "gem";
};
- version = "4.2.11.1";
+ version = "6.0.0";
};
addressable = {
dependencies = ["public_suffix"];
@@ -98,10 +98,10 @@
platforms = [];
source = {
remotes = ["https://rubygems.org"];
- sha256 = "14659ap360gzmrxl8mb28ys6mld7xw3q4q7pqy0l1cn67szdq779";
+ sha256 = "0f7x70p3fda7i5wfjjljjgjgqwx8m12345bs4xpnh7fhnis42fkk";
type = "gem";
};
- version = "2.11.0";
+ version = "2.12.0";
};
"http_parser.rb" = {
groups = ["default"];
@@ -119,21 +119,21 @@
platforms = [];
source = {
remotes = ["https://rubygems.org"];
- sha256 = "038qvz7kd3cfxk8bvagqhakx68pfbnmghpdkx7573wbf0maqp9a3";
+ sha256 = "1hfxnlyr618s25xpafw9mypa82qppjccbh292c4l3bj36az7f6wl";
type = "gem";
};
- version = "0.9.5";
+ version = "1.6.0";
};
jekyll = {
- dependencies = ["addressable" "colorator" "em-websocket" "i18n" "jekyll-sass-converter" "jekyll-watch" "kramdown" "liquid" "mercenary" "pathutil" "rouge" "safe_yaml"];
+ dependencies = ["addressable" "colorator" "em-websocket" "i18n" "jekyll-sass-converter" "jekyll-watch" "kramdown" "kramdown-parser-gfm" "liquid" "mercenary" "pathutil" "rouge" "safe_yaml" "terminal-table"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
- sha256 = "1ph1jjjl25vmzif7bvxzviq7azjm384pm7ba4k24cah94285bzhz";
+ sha256 = "0fpckw5nf4hfr5vhhdlmaxxp5lkdmc1vyqnmijwvy9fmjn4c87aa";
type = "gem";
};
- version = "3.8.6";
+ version = "4.0.0";
};
jekyll-avatar = {
dependencies = ["jekyll"];
@@ -141,10 +141,10 @@
platforms = [];
source = {
remotes = ["https://rubygems.org"];
- sha256 = "124624r83pmn7sp2idnsph9m1bbdiha5jnza4ypna8w2inpih51p";
+ sha256 = "03bys2pl60vq92skfhlfqr2j68zhfjc86jffpg32f94wzjk8n0wk";
type = "gem";
};
- version = "0.6.0";
+ version = "0.7.0";
};
jekyll-mentions = {
dependencies = ["html-pipeline" "jekyll"];
@@ -158,15 +158,15 @@
version = "1.5.1";
};
jekyll-sass-converter = {
- dependencies = ["sass"];
+ dependencies = ["sassc"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
- sha256 = "008ikh5fk0n6ri54mylcl8jn0mq8p2nfyfqif2q3pp0lwilkcxsk";
+ sha256 = "0fbc25p8vqyzmg8wpmgacqjkk3jhrr6kz9y45m43ygck74h2cad2";
type = "gem";
};
- version = "1.5.2";
+ version = "2.0.0";
};
jekyll-seo-tag = {
dependencies = ["jekyll"];
@@ -207,20 +207,31 @@
platforms = [];
source = {
remotes = ["https://rubygems.org"];
- sha256 = "0x463l6a8ikaf6pzap0dgh4gfvlkx56g6kdasj9jfb1ld3fvl99k";
+ sha256 = "1yd77r5jvh9chf5qcp6z63gg40yp5n1sr7nv1hlmbq3xjzlhs6h6";
type = "gem";
};
- version = "0.11.0";
+ version = "0.11.1";
};
kramdown = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
- sha256 = "1n1c4jmrh5ig8iv1rw81s4mw4xsp4v97hvf8zkigv4hn5h542qjq";
+ sha256 = "1dl840bvx8d9nq6lg3mxqyvbiqnr6lk3jfsm6r8zhz7p5srmd688";
type = "gem";
};
- version = "1.17.0";
+ version = "2.1.0";
+ };
+ kramdown-parser-gfm = {
+ dependencies = ["kramdown"];
+ groups = ["default"];
+ platforms = [];
+ source = {
+ remotes = ["https://rubygems.org"];
+ sha256 = "0a8pb3v951f4x7h968rqfsa19c8arz21zw1vaj42jza22rap8fgv";
+ type = "gem";
+ };
+ version = "1.1.0";
};
liquid = {
groups = ["default"];
@@ -279,10 +290,10 @@
platforms = [];
source = {
remotes = ["https://rubygems.org"];
- sha256 = "02bjydih0j515szfv9mls195cvpyidh6ixm7dwbl3s2sbaxxk5s4";
+ sha256 = "0nmdrqqz1gs0fwkgzxjl4wr554gr8dc1fkrqjc2jpsvwgm41rygv";
type = "gem";
};
- version = "1.10.3";
+ version = "1.10.4";
};
pathutil = {
dependencies = ["forwardable-extended"];
@@ -331,10 +342,10 @@
platforms = [];
source = {
remotes = ["https://rubygems.org"];
- sha256 = "0yfhazlhjc4abgzhkgq8zqmdphvkh52211widkl4zhsbhqh8wg2q";
+ sha256 = "1cn6fin40ngrasqi6qis85mqwx6phnbkzhkkd93acm9vrcf3rkl3";
type = "gem";
};
- version = "3.5.1";
+ version = "3.9.0";
};
ruby_dep = {
groups = ["default"];
@@ -356,27 +367,27 @@
};
version = "1.0.5";
};
- sass = {
- dependencies = ["sass-listen"];
+ sassc = {
+ dependencies = ["ffi"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
- sha256 = "0p95lhs0jza5l7hqci1isflxakz83xkj97lkvxl919is0lwhv2w0";
+ sha256 = "06kwfqvpwf33cvkvbv1l9g5ln3q721hz5d3dyasq0k9d28x9w4fs";
type = "gem";
};
- version = "3.7.4";
+ version = "2.1.0";
};
- sass-listen = {
- dependencies = ["rb-fsevent" "rb-inotify"];
+ terminal-table = {
+ dependencies = ["unicode-display_width"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
- sha256 = "0xw3q46cmahkgyldid5hwyiwacp590zj2vmswlll68ryvmvcp7df";
+ sha256 = "1512cngw35hsmhvw4c05rscihc59mnj09m249sm9p3pik831ydqk";
type = "gem";
};
- version = "4.0.0";
+ version = "1.8.0";
};
thread_safe = {
groups = ["default"];
@@ -399,4 +410,24 @@
};
version = "1.2.5";
};
+ unicode-display_width = {
+ groups = ["default"];
+ platforms = [];
+ source = {
+ remotes = ["https://rubygems.org"];
+ sha256 = "08kfiniak1pvg3gn5k6snpigzvhvhyg7slmm0s2qx5zkj62c1z2w";
+ type = "gem";
+ };
+ version = "1.6.0";
+ };
+ zeitwerk = {
+ groups = ["default"];
+ platforms = [];
+ source = {
+ remotes = ["https://rubygems.org"];
+ sha256 = "0gaiqg207j99cvqpgmn4ps6a14hz1rrh5zaxfdkiiavapbc5vpzw";
+ type = "gem";
+ };
+ version = "2.1.9";
+ };
}
\ No newline at end of file
diff --git a/pkgs/applications/misc/jekyll/default.nix b/pkgs/applications/misc/jekyll/default.nix
index 9ae9ab254e80..4d4dd248bc53 100644
--- a/pkgs/applications/misc/jekyll/default.nix
+++ b/pkgs/applications/misc/jekyll/default.nix
@@ -21,7 +21,7 @@ let
# Else: Don't modify the arguments:
exec ${ruby}/bin/ruby "$@"
'';
-in bundlerApp rec {
+in bundlerApp {
pname = "jekyll";
exes = [ "jekyll" ];
diff --git a/pkgs/applications/misc/jekyll/full/Gemfile b/pkgs/applications/misc/jekyll/full/Gemfile
index aba5e06e3769..8e7499bad61a 100644
--- a/pkgs/applications/misc/jekyll/full/Gemfile
+++ b/pkgs/applications/misc/jekyll/full/Gemfile
@@ -1,30 +1,27 @@
source "https://rubygems.org"
+
gem "jekyll"
-gem "rouge"
-gem "activesupport", "~> 4.2"
+
gem "jekyll-avatar"
gem "jekyll-mentions"
gem "jekyll-seo-tag"
gem "jekyll-sitemap"
gem "jemoji"
+
# Optional dependencies:
-gem "coderay", "~> 1.1.0"
gem "jekyll-coffeescript"
#gem "jekyll-docs"
gem "jekyll-feed", "~> 0.9"
gem "jekyll-gist"
gem "jekyll-paginate"
gem "jekyll-redirect-from"
-gem "kramdown", "~> 1.14"
+gem "kramdown-syntax-coderay"
gem "mime-types", "~> 3.0"
-gem "rdoc", RUBY_VERSION >= "2.2.2" ? "~> 6.0" : "~> 5.1"
+gem "rdoc", "~> 6.0"
gem "tomlrb", "~> 1.2"
platform :ruby, :mswin, :mingw, :x64_mingw do
- gem "classifier-reborn", "~> 2.2.0"
- gem "liquid-c", "~> 3.0"
- gem "pygments.rb", "~> 1.0"
- gem "rdiscount", "~> 2.0"
- gem "redcarpet", "~> 3.2", ">= 3.2.3"
- gem "yajl-ruby", "~> 1.3.1"
+ gem "classifier-reborn", "~> 2.2"
+ gem "liquid-c", "~> 4.0"
+ gem "yajl-ruby", "~> 1.4"
end
diff --git a/pkgs/applications/misc/jekyll/full/Gemfile.lock b/pkgs/applications/misc/jekyll/full/Gemfile.lock
index 7baf6a45fc54..6410b885ea47 100644
--- a/pkgs/applications/misc/jekyll/full/Gemfile.lock
+++ b/pkgs/applications/misc/jekyll/full/Gemfile.lock
@@ -1,11 +1,12 @@
GEM
remote: https://rubygems.org/
specs:
- activesupport (4.2.11.1)
- i18n (~> 0.7)
+ activesupport (6.0.0)
+ concurrent-ruby (~> 1.0, >= 1.0.2)
+ i18n (>= 0.7, < 2)
minitest (~> 5.1)
- thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
+ zeitwerk (~> 2.1, >= 2.1.8)
addressable (2.6.0)
public_suffix (>= 2.0.2, < 4.0)
classifier-reborn (2.2.0)
@@ -28,27 +29,29 @@ GEM
ffi (1.11.1)
forwardable-extended (2.6.0)
gemoji (3.0.1)
- html-pipeline (2.11.0)
+ html-pipeline (2.12.0)
activesupport (>= 2)
nokogiri (>= 1.4)
http_parser.rb (0.6.0)
- i18n (0.9.5)
+ i18n (1.6.0)
concurrent-ruby (~> 1.0)
- jekyll (3.8.6)
+ jekyll (4.0.0)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
- i18n (~> 0.7)
- jekyll-sass-converter (~> 1.0)
+ i18n (>= 0.9.5, < 2)
+ jekyll-sass-converter (~> 2.0)
jekyll-watch (~> 2.0)
- kramdown (~> 1.14)
+ kramdown (~> 2.1)
+ kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
- rouge (>= 1.7, < 4)
+ rouge (~> 3.0)
safe_yaml (~> 1.0)
- jekyll-avatar (0.6.0)
- jekyll (~> 3.0)
+ terminal-table (~> 1.8)
+ jekyll-avatar (0.7.0)
+ jekyll (>= 3.0, < 5.0)
jekyll-coffeescript (1.2.2)
coffee-script (~> 2.2)
coffee-script-source (~> 1.12)
@@ -62,21 +65,26 @@ GEM
jekyll-paginate (1.1.0)
jekyll-redirect-from (0.15.0)
jekyll (>= 3.3, < 5.0)
- jekyll-sass-converter (1.5.2)
- sass (~> 3.4)
+ jekyll-sass-converter (2.0.0)
+ sassc (> 2.0.1, < 3.0)
jekyll-seo-tag (2.6.1)
jekyll (>= 3.3, < 5.0)
jekyll-sitemap (1.3.1)
jekyll (>= 3.7, < 5.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
- jemoji (0.11.0)
+ jemoji (0.11.1)
gemoji (~> 3.0)
html-pipeline (~> 2.2)
jekyll (>= 3.0, < 5.0)
- kramdown (1.17.0)
+ kramdown (2.1.0)
+ kramdown-parser-gfm (1.1.0)
+ kramdown (~> 2.0)
+ kramdown-syntax-coderay (1.0.1)
+ coderay (~> 1.1)
+ kramdown (~> 2.0)
liquid (4.0.3)
- liquid-c (3.0.0)
+ liquid-c (4.0.0)
liquid (>= 3.0.0)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
@@ -88,47 +96,41 @@ GEM
mime-types-data (3.2019.0331)
mini_portile2 (2.4.0)
minitest (5.11.3)
- multi_json (1.13.1)
multipart-post (2.1.1)
- nokogiri (1.10.3)
+ nokogiri (1.10.4)
mini_portile2 (~> 2.4.0)
octokit (4.14.0)
sawyer (~> 0.8.0, >= 0.5.3)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (3.1.1)
- pygments.rb (1.2.1)
- multi_json (>= 1.0.0)
rb-fsevent (0.10.3)
rb-inotify (0.10.0)
ffi (~> 1.0)
- rdiscount (2.2.0.1)
rdoc (6.1.1)
- redcarpet (3.4.0)
- rouge (3.5.1)
+ rouge (3.9.0)
ruby_dep (1.5.0)
safe_yaml (1.0.5)
- sass (3.7.4)
- sass-listen (~> 4.0.0)
- sass-listen (4.0.0)
- rb-fsevent (~> 0.9, >= 0.9.4)
- rb-inotify (~> 0.9, >= 0.9.7)
+ sassc (2.1.0)
+ ffi (~> 1.9)
sawyer (0.8.2)
addressable (>= 2.3.5)
faraday (> 0.8, < 2.0)
+ terminal-table (1.8.0)
+ unicode-display_width (~> 1.1, >= 1.1.1)
thread_safe (0.3.6)
tomlrb (1.2.8)
tzinfo (1.2.5)
thread_safe (~> 0.1)
- yajl-ruby (1.3.1)
+ unicode-display_width (1.6.0)
+ yajl-ruby (1.4.1)
+ zeitwerk (2.1.9)
PLATFORMS
ruby
DEPENDENCIES
- activesupport (~> 4.2)
- classifier-reborn (~> 2.2.0)
- coderay (~> 1.1.0)
+ classifier-reborn (~> 2.2)
jekyll
jekyll-avatar
jekyll-coffeescript
@@ -140,16 +142,12 @@ DEPENDENCIES
jekyll-seo-tag
jekyll-sitemap
jemoji
- kramdown (~> 1.14)
- liquid-c (~> 3.0)
+ kramdown-syntax-coderay
+ liquid-c (~> 4.0)
mime-types (~> 3.0)
- pygments.rb (~> 1.0)
- rdiscount (~> 2.0)
rdoc (~> 6.0)
- redcarpet (~> 3.2, >= 3.2.3)
- rouge
tomlrb (~> 1.2)
- yajl-ruby (~> 1.3.1)
+ yajl-ruby (~> 1.4)
BUNDLED WITH
1.17.2
diff --git a/pkgs/applications/misc/jekyll/full/gemset.nix b/pkgs/applications/misc/jekyll/full/gemset.nix
index 63209d4ff45a..80d67022e7af 100644
--- a/pkgs/applications/misc/jekyll/full/gemset.nix
+++ b/pkgs/applications/misc/jekyll/full/gemset.nix
@@ -1,14 +1,14 @@
{
activesupport = {
- dependencies = ["i18n" "minitest" "thread_safe" "tzinfo"];
+ dependencies = ["concurrent-ruby" "i18n" "minitest" "tzinfo" "zeitwerk"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
- sha256 = "1vbq7a805bfvyik2q3kl9s3r418f5qzvysqbz2cwy4hr7m2q4ir6";
+ sha256 = "0b24ch7zmrdb4h6aismahk9785lc4ij30lmdr6ydv19kkljsjq5v";
type = "gem";
};
- version = "4.2.11.1";
+ version = "6.0.0";
};
addressable = {
dependencies = ["public_suffix"];
@@ -195,10 +195,10 @@
platforms = [];
source = {
remotes = ["https://rubygems.org"];
- sha256 = "14659ap360gzmrxl8mb28ys6mld7xw3q4q7pqy0l1cn67szdq779";
+ sha256 = "0f7x70p3fda7i5wfjjljjgjgqwx8m12345bs4xpnh7fhnis42fkk";
type = "gem";
};
- version = "2.11.0";
+ version = "2.12.0";
};
"http_parser.rb" = {
groups = ["default"];
@@ -216,21 +216,21 @@
platforms = [];
source = {
remotes = ["https://rubygems.org"];
- sha256 = "038qvz7kd3cfxk8bvagqhakx68pfbnmghpdkx7573wbf0maqp9a3";
+ sha256 = "1hfxnlyr618s25xpafw9mypa82qppjccbh292c4l3bj36az7f6wl";
type = "gem";
};
- version = "0.9.5";
+ version = "1.6.0";
};
jekyll = {
- dependencies = ["addressable" "colorator" "em-websocket" "i18n" "jekyll-sass-converter" "jekyll-watch" "kramdown" "liquid" "mercenary" "pathutil" "rouge" "safe_yaml"];
+ dependencies = ["addressable" "colorator" "em-websocket" "i18n" "jekyll-sass-converter" "jekyll-watch" "kramdown" "kramdown-parser-gfm" "liquid" "mercenary" "pathutil" "rouge" "safe_yaml" "terminal-table"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
- sha256 = "1ph1jjjl25vmzif7bvxzviq7azjm384pm7ba4k24cah94285bzhz";
+ sha256 = "0fpckw5nf4hfr5vhhdlmaxxp5lkdmc1vyqnmijwvy9fmjn4c87aa";
type = "gem";
};
- version = "3.8.6";
+ version = "4.0.0";
};
jekyll-avatar = {
dependencies = ["jekyll"];
@@ -238,10 +238,10 @@
platforms = [];
source = {
remotes = ["https://rubygems.org"];
- sha256 = "124624r83pmn7sp2idnsph9m1bbdiha5jnza4ypna8w2inpih51p";
+ sha256 = "03bys2pl60vq92skfhlfqr2j68zhfjc86jffpg32f94wzjk8n0wk";
type = "gem";
};
- version = "0.6.0";
+ version = "0.7.0";
};
jekyll-coffeescript = {
dependencies = ["coffee-script" "coffee-script-source"];
@@ -309,15 +309,15 @@
version = "0.15.0";
};
jekyll-sass-converter = {
- dependencies = ["sass"];
+ dependencies = ["sassc"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
- sha256 = "008ikh5fk0n6ri54mylcl8jn0mq8p2nfyfqif2q3pp0lwilkcxsk";
+ sha256 = "0fbc25p8vqyzmg8wpmgacqjkk3jhrr6kz9y45m43ygck74h2cad2";
type = "gem";
};
- version = "1.5.2";
+ version = "2.0.0";
};
jekyll-seo-tag = {
dependencies = ["jekyll"];
@@ -358,20 +358,42 @@
platforms = [];
source = {
remotes = ["https://rubygems.org"];
- sha256 = "0x463l6a8ikaf6pzap0dgh4gfvlkx56g6kdasj9jfb1ld3fvl99k";
+ sha256 = "1yd77r5jvh9chf5qcp6z63gg40yp5n1sr7nv1hlmbq3xjzlhs6h6";
type = "gem";
};
- version = "0.11.0";
+ version = "0.11.1";
};
kramdown = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
- sha256 = "1n1c4jmrh5ig8iv1rw81s4mw4xsp4v97hvf8zkigv4hn5h542qjq";
+ sha256 = "1dl840bvx8d9nq6lg3mxqyvbiqnr6lk3jfsm6r8zhz7p5srmd688";
type = "gem";
};
- version = "1.17.0";
+ version = "2.1.0";
+ };
+ kramdown-parser-gfm = {
+ dependencies = ["kramdown"];
+ groups = ["default"];
+ platforms = [];
+ source = {
+ remotes = ["https://rubygems.org"];
+ sha256 = "0a8pb3v951f4x7h968rqfsa19c8arz21zw1vaj42jza22rap8fgv";
+ type = "gem";
+ };
+ version = "1.1.0";
+ };
+ kramdown-syntax-coderay = {
+ dependencies = ["coderay" "kramdown"];
+ groups = ["default"];
+ platforms = [];
+ source = {
+ remotes = ["https://rubygems.org"];
+ sha256 = "03vpfpmxcdbqyh6kxrjf5xa9qgvwqj0cfv2khz5h32fp5f5dmrda";
+ type = "gem";
+ };
+ version = "1.0.1";
};
liquid = {
groups = ["default"];
@@ -413,10 +435,10 @@
}];
source = {
remotes = ["https://rubygems.org"];
- sha256 = "0a5n7q314ma32y7v9a1g6ps60b14zfn2q4nip4j5aknblz51v7gi";
+ sha256 = "0ibcpajsgq530xrz3dk578mfvivrlfd624j6ifz6ms4w69j8jqj6";
type = "gem";
};
- version = "3.0.0";
+ version = "4.0.0";
};
listen = {
dependencies = ["rb-fsevent" "rb-inotify" "ruby_dep"];
@@ -480,28 +502,6 @@
};
version = "5.11.3";
};
- multi_json = {
- groups = ["default"];
- platforms = [{
- engine = "maglev";
- } {
- engine = "mingw";
- } {
- engine = "mingw";
- } {
- engine = "mswin";
- } {
- engine = "rbx";
- } {
- engine = "ruby";
- }];
- source = {
- remotes = ["https://rubygems.org"];
- sha256 = "1rl0qy4inf1mp8mybfk56dfga0mvx97zwpmq5xmiwl5r770171nv";
- type = "gem";
- };
- version = "1.13.1";
- };
multipart-post = {
groups = ["default"];
platforms = [];
@@ -518,10 +518,10 @@
platforms = [];
source = {
remotes = ["https://rubygems.org"];
- sha256 = "02bjydih0j515szfv9mls195cvpyidh6ixm7dwbl3s2sbaxxk5s4";
+ sha256 = "0nmdrqqz1gs0fwkgzxjl4wr554gr8dc1fkrqjc2jpsvwgm41rygv";
type = "gem";
};
- version = "1.10.3";
+ version = "1.10.4";
};
octokit = {
dependencies = ["sawyer"];
@@ -555,29 +555,6 @@
};
version = "3.1.1";
};
- "pygments.rb" = {
- dependencies = ["multi_json"];
- groups = ["default"];
- platforms = [{
- engine = "maglev";
- } {
- engine = "mingw";
- } {
- engine = "mingw";
- } {
- engine = "mswin";
- } {
- engine = "rbx";
- } {
- engine = "ruby";
- }];
- source = {
- remotes = ["https://rubygems.org"];
- sha256 = "0lbvnwvz770ambm4d6lxgc2097rydn5rcc5d6986bnkzyxfqqjnv";
- type = "gem";
- };
- version = "1.2.1";
- };
rb-fsevent = {
groups = ["default"];
platforms = [];
@@ -599,28 +576,6 @@
};
version = "0.10.0";
};
- rdiscount = {
- groups = ["default"];
- platforms = [{
- engine = "maglev";
- } {
- engine = "mingw";
- } {
- engine = "mingw";
- } {
- engine = "mswin";
- } {
- engine = "rbx";
- } {
- engine = "ruby";
- }];
- source = {
- remotes = ["https://rubygems.org"];
- sha256 = "1arvk3k06prxasq1djbj065ixar4zl171340g7wr1ww4gj9makx3";
- type = "gem";
- };
- version = "2.2.0.1";
- };
rdoc = {
groups = ["default"];
platforms = [];
@@ -631,37 +586,15 @@
};
version = "6.1.1";
};
- redcarpet = {
- groups = ["default"];
- platforms = [{
- engine = "maglev";
- } {
- engine = "mingw";
- } {
- engine = "mingw";
- } {
- engine = "mswin";
- } {
- engine = "rbx";
- } {
- engine = "ruby";
- }];
- source = {
- remotes = ["https://rubygems.org"];
- sha256 = "0h9qz2hik4s9knpmbwrzb3jcp3vc5vygp9ya8lcpl7f1l9khmcd7";
- type = "gem";
- };
- version = "3.4.0";
- };
rouge = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
- sha256 = "0yfhazlhjc4abgzhkgq8zqmdphvkh52211widkl4zhsbhqh8wg2q";
+ sha256 = "1cn6fin40ngrasqi6qis85mqwx6phnbkzhkkd93acm9vrcf3rkl3";
type = "gem";
};
- version = "3.5.1";
+ version = "3.9.0";
};
ruby_dep = {
groups = ["default"];
@@ -683,27 +616,16 @@
};
version = "1.0.5";
};
- sass = {
- dependencies = ["sass-listen"];
+ sassc = {
+ dependencies = ["ffi"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
- sha256 = "0p95lhs0jza5l7hqci1isflxakz83xkj97lkvxl919is0lwhv2w0";
+ sha256 = "06kwfqvpwf33cvkvbv1l9g5ln3q721hz5d3dyasq0k9d28x9w4fs";
type = "gem";
};
- version = "3.7.4";
- };
- sass-listen = {
- dependencies = ["rb-fsevent" "rb-inotify"];
- groups = ["default"];
- platforms = [];
- source = {
- remotes = ["https://rubygems.org"];
- sha256 = "0xw3q46cmahkgyldid5hwyiwacp590zj2vmswlll68ryvmvcp7df";
- type = "gem";
- };
- version = "4.0.0";
+ version = "2.1.0";
};
sawyer = {
dependencies = ["addressable" "faraday"];
@@ -716,6 +638,17 @@
};
version = "0.8.2";
};
+ terminal-table = {
+ dependencies = ["unicode-display_width"];
+ groups = ["default"];
+ platforms = [];
+ source = {
+ remotes = ["https://rubygems.org"];
+ sha256 = "1512cngw35hsmhvw4c05rscihc59mnj09m249sm9p3pik831ydqk";
+ type = "gem";
+ };
+ version = "1.8.0";
+ };
thread_safe = {
groups = ["default"];
platforms = [];
@@ -747,6 +680,16 @@
};
version = "1.2.5";
};
+ unicode-display_width = {
+ groups = ["default"];
+ platforms = [];
+ source = {
+ remotes = ["https://rubygems.org"];
+ sha256 = "08kfiniak1pvg3gn5k6snpigzvhvhyg7slmm0s2qx5zkj62c1z2w";
+ type = "gem";
+ };
+ version = "1.6.0";
+ };
yajl-ruby = {
groups = ["default"];
platforms = [{
@@ -764,9 +707,19 @@
}];
source = {
remotes = ["https://rubygems.org"];
- sha256 = "1rn4kc9fha990yd252wglh6rcyh35cavm1vpyfj8krlcwph09g30";
+ sha256 = "16v0w5749qjp13xhjgr2gcsvjv6mf35br7iqwycix1n2h7kfcckf";
type = "gem";
};
- version = "1.3.1";
+ version = "1.4.1";
+ };
+ zeitwerk = {
+ groups = ["default"];
+ platforms = [];
+ source = {
+ remotes = ["https://rubygems.org"];
+ sha256 = "0gaiqg207j99cvqpgmn4ps6a14hz1rrh5zaxfdkiiavapbc5vpzw";
+ type = "gem";
+ };
+ version = "2.1.9";
};
}
\ No newline at end of file
diff --git a/pkgs/applications/misc/jgmenu/default.nix b/pkgs/applications/misc/jgmenu/default.nix
index 64c693092b03..17d5dd873369 100644
--- a/pkgs/applications/misc/jgmenu/default.nix
+++ b/pkgs/applications/misc/jgmenu/default.nix
@@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "jgmenu";
- version = "3.1";
+ version = "3.4";
src = fetchFromGitHub {
owner = "johanmalm";
repo = pname;
rev = "v${version}";
- sha256 = "03lk89d6wvqv234qciksd4zm0z4lkvrxfh6r9ff0d8yzg67m7rd0";
+ sha256 = "1cikndf71wi17qld3rwp38gk0q7zic707zzz0mr7cgn86dc4if3d";
};
nativeBuildInputs = [
diff --git a/pkgs/applications/misc/joplin-desktop/default.nix b/pkgs/applications/misc/joplin-desktop/default.nix
index 410b04d5dcbd..ff0332e1e5ff 100644
--- a/pkgs/applications/misc/joplin-desktop/default.nix
+++ b/pkgs/applications/misc/joplin-desktop/default.nix
@@ -2,12 +2,12 @@
let
pname = "joplin-desktop";
- version = "1.0.158";
+ version = "1.0.167";
in appimageTools.wrapType2 rec {
name = "${pname}-${version}";
src = fetchurl {
url = "https://github.com/laurent22/joplin/releases/download/v${version}/Joplin-${version}-x86_64.AppImage";
- sha256 = "1xaamwcasihja3agwb0nnfnzc1wmmr0d2ng73qmfil9nhf9v3j6q";
+ sha256 = "062f2av60490ffrml0q8zv68yir6zaqif0g3d32c985gcvmgn9lw";
};
diff --git a/pkgs/applications/misc/josm/default.nix b/pkgs/applications/misc/josm/default.nix
index 8838de9ac961..857cc6c74560 100644
--- a/pkgs/applications/misc/josm/default.nix
+++ b/pkgs/applications/misc/josm/default.nix
@@ -1,12 +1,12 @@
{ fetchurl, stdenv, makeDesktopItem, makeWrapper, unzip, jdk11, libXxf86vm }:
stdenv.mkDerivation rec {
- name = "josm-${version}";
- version = "15238";
+ pname = "josm";
+ version = "15390";
src = fetchurl {
url = "https://josm.openstreetmap.de/download/josm-snapshot-${version}.jar";
- sha256 = "0zh84glb4545av0s1qnccqqp8nrnfsr7rnwgbqpwwzvc2ngk91gv";
+ sha256 = "1wxncd3mjd4j14svgpmvrxc0nkzfkpn0xlci7m7wp9hfp1l81v9f";
};
buildInputs = [ jdk11 makeWrapper ];
diff --git a/pkgs/applications/misc/jotta-cli/default.nix b/pkgs/applications/misc/jotta-cli/default.nix
new file mode 100644
index 000000000000..a5196811a6a5
--- /dev/null
+++ b/pkgs/applications/misc/jotta-cli/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchzip }:
+
+let
+ arch = "amd64";
+in
+stdenv.mkDerivation rec {
+ pname = "jotta-cli";
+ version = "0.6.18626";
+ src =
+ fetchzip {
+ url = "https://repo.jotta.us/archives/linux/${arch}/jotta-cli-${version}_linux_${arch}.tar.gz";
+ sha256 = "0v9bw0f2mcvmzp7v8gs6q4p1q54rflqnbjv5sw7h1kyfwznmflzj";
+ stripRoot = false;
+ };
+
+ installPhase = ''
+ install -D usr/bin/jotta-cli usr/bin/jottad -t $out/bin/
+ mkdir -p $out/share/bash-completion/completions
+ '';
+
+ postFixup = ''
+ patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $out/bin/jotta-cli
+ patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $out/bin/jottad
+ $out/bin/jotta-cli completion > $out/share/bash-completion/completions/jotta-cli.bash
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Jottacloud CLI";
+ homepage = https://www.jottacloud.com/;
+ downloadPage = https://repo.jotta.us/archives/linux/;
+ maintainers = with maintainers; [ evenbrenden ];
+ license = licenses.unfree;
+ platforms = [ "x86_64-linux" ];
+ };
+}
diff --git a/pkgs/applications/misc/jp2a/default.nix b/pkgs/applications/misc/jp2a/default.nix
index 138ee397d3fd..2a9e162e7ea9 100644
--- a/pkgs/applications/misc/jp2a/default.nix
+++ b/pkgs/applications/misc/jp2a/default.nix
@@ -2,7 +2,7 @@
stdenv.mkDerivation rec {
version = "1.0.7";
- name = "jp2a-${version}";
+ pname = "jp2a";
src = fetchFromGitHub {
owner = "cslarsen";
diff --git a/pkgs/applications/misc/k2pdfopt/default.nix b/pkgs/applications/misc/k2pdfopt/default.nix
index 7c5845b35419..a2eba8e08c27 100644
--- a/pkgs/applications/misc/k2pdfopt/default.nix
+++ b/pkgs/applications/misc/k2pdfopt/default.nix
@@ -12,7 +12,7 @@
with stdenv.lib;
stdenv.mkDerivation rec {
- name = "k2pdfopt-${version}";
+ pname = "k2pdfopt";
version = "2.51a";
src = (fetchzip {
@@ -30,73 +30,25 @@ stdenv.mkDerivation rec {
cp -r ${v251a_src}/* $sourceRoot
'';
- patches = [ ./k2pdfopt.patch ];
+ patches = [ ./k2pdfopt.patch ./k2pdfopt-mupdf-1.16.1.patch ];
nativeBuildInputs = [ cmake pkgconfig ];
buildInputs =
let
+ # The patches below were constructed by taking the files from k2pdfopt in
+ # the {mupdf,leptonica,tesseract}_mod/ directories, replacing the
+ # corresponding files in the respective source trees, resolving any errors
+ # with more recent versions of these depencencies, and running diff.
mupdf_modded = mupdf.overrideAttrs (attrs: {
- # Excluded the pdf-*.c files, since they mostly just broke the #includes
- prePatch = ''
- cp ${src}/mupdf_mod/{font,stext-device,string}.c source/fitz/
- cp ${src}/mupdf_mod/font-win32.c source/pdf/
- '';
+ patches = attrs.patches ++ [ ./mupdf.patch ]; # Last verified with mupdf 1.16.1
});
-
leptonica_modded = leptonica.overrideAttrs (attrs: {
- name = "leptonica-1.74.4";
- # Modified source files apply to this particular version of leptonica
- version = "1.74.4";
-
- src = fetchurl {
- url = "http://www.leptonica.org/source/leptonica-1.74.4.tar.gz";
- sha256 = "0fw39amgyv8v6nc7x8a4c7i37dm04i6c5zn62d24bgqnlhk59hr9";
- };
-
- prePatch = ''
- cp ${src}/leptonica_mod/{allheaders.h,dewarp2.c,leptwin.c} src/
- '';
- patches = [
- # stripped down copy of upstream commit b88c821f8d347bce0aea86d606c710303919f3d2
- ./leptonica-CVE-2018-3836.patch
- (fetchpatch {
- # CVE-2018-7186
- url = "https://github.com/DanBloomberg/leptonica/commit/"
- + "ee301cb2029db8a6289c5295daa42bba7715e99a.patch";
- sha256 = "0cgb7mvz2px1rg5i80wk1wxxjvzjga617d8q6j7qygkp7jm6495d";
- })
- (fetchpatch {
- # CVE-2018-7247
- url = "https://github.com/DanBloomberg/leptonica/commit/"
- + "c1079bb8e77cdd426759e466729917ca37a3ed9f.patch";
- sha256 = "1z4iac5gwqggh7aa8cvyp6nl9fwd1v7wif26caxc9y5qr3jj34qf";
- })
- (fetchpatch {
- # CVE-2018-7440
- url = "https://github.com/DanBloomberg/leptonica/commit/"
- + "49ecb6c2dfd6ed5078c62f4a8eeff03e3beced3b.patch";
- sha256 = "1hjmva98iaw9xj7prg7aimykyayikcwnk4hk0380007hqb35lqmy";
- })
- ];
+ patches = [ ./leptonica.patch ]; # Last verified with leptonica 1.78.0
});
tesseract_modded = tesseract4.override {
tesseractBase = tesseract4.tesseractBase.overrideAttrs (_: {
- prePatch = ''
- cp ${src}/tesseract_mod/baseapi.{h,cpp} src/api/
- cp ${src}/tesseract_mod/ccutil.{h,cpp} src/ccutil/
- cp ${src}/tesseract_mod/genericvector.h src/ccutil/
- cp ${src}/tesseract_mod/input.cpp src/lstm/
- cp ${src}/tesseract_mod/lstmrecognizer.cpp src/lstm/
- cp ${src}/tesseract_mod/mainblk.cpp src/ccutil/
- cp ${src}/tesseract_mod/params.cpp src/ccutil/
- cp ${src}/tesseract_mod/serialis.{h,cpp} src/ccutil/
- cp ${src}/tesseract_mod/tesscapi.cpp src/api/
- cp ${src}/tesseract_mod/tessdatamanager.cpp src/ccstruct/
- cp ${src}/tesseract_mod/tessedit.cpp src/ccmain/
- cp ${src}/include_mod/{tesseract.h,leptonica.h} src/api/
- '';
- patches = [ ./tesseract.patch ];
+ patches = [ ./tesseract.patch ]; # Last verified with tesseract 1.4
});
};
in
diff --git a/pkgs/applications/misc/k2pdfopt/k2pdfopt-mupdf-1.16.1.patch b/pkgs/applications/misc/k2pdfopt/k2pdfopt-mupdf-1.16.1.patch
new file mode 100644
index 000000000000..3a9eca30e751
--- /dev/null
+++ b/pkgs/applications/misc/k2pdfopt/k2pdfopt-mupdf-1.16.1.patch
@@ -0,0 +1,151 @@
+diff --git a/willuslib/wmupdf.c b/willuslib/wmupdf.c
+index 81627ef..f14a96c 100644
+--- a/willuslib/wmupdf.c
++++ b/willuslib/wmupdf.c
+@@ -189,8 +189,6 @@ int wmupdf_remake_pdf(char *infile,char *outfile,WPDFPAGEINFO *pageinfo,int use_
+ pdf_write_opts.do_compress=1;
+ pdf_write_opts.do_linear=0;
+ pdf_write_opts.do_garbage=1; /* 2 and 3 don't work for this. */
+- pdf_write_opts.continue_on_error=0;
+- pdf_write_opts.errors=NULL;
+ write_failed=0;
+ wpdfpageinfo_sort(pageinfo);
+ xref=NULL;
+@@ -1687,8 +1685,8 @@ WPDFOUTLINE *wpdfoutline_read_from_pdf_file(char *filename)
+ /* Sumatra version of MuPDF v1.4 -- use locally installed fonts */
+ pdf_install_load_system_font_funcs(ctx);
+ fz_try(ctx) { doc=fz_open_document(ctx,filename); }
+- fz_catch(ctx)
+- {
++ fz_catch(ctx)
++ {
+ fz_drop_context(ctx);
+ return(NULL);
+ }
+@@ -1890,5 +1888,5 @@ static pdf_obj *pdf_new_string_utf8(fz_context *ctx,char *string)
+ willus_mem_free((double **)&utfbuf,funcname);
+ return(pdfobj);
+ }
+-
++
+ #endif /* HAVE_MUPDF_LIB */
+diff --git a/willuslib/wmupdfinfo.c b/willuslib/wmupdfinfo.c
+index 5c7f38c..9b9e6fd 100644
+--- a/willuslib/wmupdfinfo.c
++++ b/willuslib/wmupdfinfo.c
+@@ -237,23 +237,22 @@ static void showglobalinfo(fz_context *ctx, globals *glo,char *filename)
+ pdf_obj *robj;
+
+ robj=pdf_resolve_indirect(ctx,obj);
+- n=pdf_sprint_obj(ctx,NULL,0,robj,1);
+- buf=malloc(n+2);
++ buf=pdf_sprint_obj(ctx,NULL,0,&n,robj,1,0);
+ if (buf==NULL)
+ {
+ fz_write_printf(ctx,out,"Info object (%d %d R):\n",pdf_to_num(ctx,obj),pdf_to_gen(ctx,obj));
+- pdf_print_obj(ctx,out,robj,1);
++ pdf_print_obj(ctx,out,robj,1,0);
+ }
+ else
+ {
+- pdf_sprint_obj(ctx,buf,n+2,robj,1);
++ pdf_sprint_obj(ctx,buf,n+2,&n,robj,1,0);
+ display_pdf_field(ctx,out,buf,"Title","TITLE");
+ display_pdf_field(ctx,out,buf,"CreationDate","CREATED");
+ display_pdf_field(ctx,out,buf,"ModDate","LAST MODIFIED");
+ display_pdf_field(ctx,out,buf,"Producer","PDF PRODUCER");
+ display_pdf_field(ctx,out,buf,"Creator","CREATOR");
+ display_file_size(ctx,out,filename);
+- free(buf);
++ fz_free(ctx,buf);
+ }
+ }
+ if (glo->dims==1)
+@@ -275,7 +274,7 @@ static void showglobalinfo(fz_context *ctx, globals *glo,char *filename)
+ if (obj)
+ {
+ fz_write_printf(ctx,out, "\nEncryption object (%d %d R):\n", pdf_to_num(ctx,obj), pdf_to_gen(ctx,obj));
+- pdf_print_obj(ctx,out, pdf_resolve_indirect(ctx,obj), 1);
++ pdf_print_obj(ctx,out, pdf_resolve_indirect(ctx,obj), 1, 0);
+ }
+ }
+
+@@ -396,7 +395,7 @@ gatherdimensions(fz_context *ctx, globals *glo, int page, pdf_obj *pageref, pdf_
+ if (j < glo->dims)
+ return;
+
+- glo->dim = fz_resize_array(ctx, glo->dim, glo->dims+1, sizeof(struct info));
++ glo->dim = fz_realloc_array(ctx, glo->dim, glo->dims+1, struct info);
+ glo->dims++;
+
+ glo->dim[glo->dims - 1].page = page;
+@@ -441,7 +440,7 @@ gatherfonts(fz_context *ctx, globals *glo, int page, pdf_obj *pageref, pdf_obj *
+ if (k < glo->fonts)
+ continue;
+
+- glo->font = fz_resize_array(ctx, glo->font, glo->fonts+1, sizeof(struct info));
++ glo->font = fz_realloc_array(ctx, glo->font, glo->fonts+1, struct info);
+ glo->fonts++;
+
+ glo->font[glo->fonts - 1].page = page;
+@@ -510,7 +509,7 @@ gatherimages(fz_context *ctx, globals *glo, int page, pdf_obj *pageref, pdf_obj
+ if (k < glo->images)
+ continue;
+
+- glo->image = fz_resize_array(ctx, glo->image, glo->images+1, sizeof(struct info));
++ glo->image = fz_realloc_array(ctx, glo->image, glo->images+1, struct info);
+ glo->images++;
+
+ glo->image[glo->images - 1].page = page;
+@@ -568,7 +567,7 @@ gatherforms(fz_context *ctx, globals *glo, int page, pdf_obj *pageref, pdf_obj *
+ if (k < glo->forms)
+ continue;
+
+- glo->form = fz_resize_array(ctx, glo->form, glo->forms+1, sizeof(struct info));
++ glo->form = fz_realloc_array(ctx, glo->form, glo->forms+1, struct info);
+ glo->forms++;
+
+ glo->form[glo->forms - 1].page = page;
+@@ -613,7 +612,7 @@ gatherpsobjs(fz_context *ctx, globals *glo, int page, pdf_obj *pageref, pdf_obj
+ if (k < glo->psobjs)
+ continue;
+
+- glo->psobj = fz_resize_array(ctx, glo->psobj, glo->psobjs+1, sizeof(struct info));
++ glo->psobj = fz_realloc_array(ctx, glo->psobj, glo->psobjs+1, struct info);
+ glo->psobjs++;
+
+ glo->psobj[glo->psobjs - 1].page = page;
+@@ -656,7 +655,7 @@ gathershadings(fz_context *ctx, globals *glo, int page, pdf_obj *pageref, pdf_ob
+ if (k < glo->shadings)
+ continue;
+
+- glo->shading = fz_resize_array(ctx, glo->shading, glo->shadings+1, sizeof(struct info));
++ glo->shading = fz_realloc_array(ctx, glo->shading, glo->shadings+1, struct info);
+ glo->shadings++;
+
+ glo->shading[glo->shadings - 1].page = page;
+@@ -724,7 +723,7 @@ gatherpatterns(fz_context *ctx, globals *glo, int page, pdf_obj *pageref, pdf_ob
+ if (k < glo->patterns)
+ continue;
+
+- glo->pattern = fz_resize_array(ctx, glo->pattern, glo->patterns+1, sizeof(struct info));
++ glo->pattern = fz_realloc_array(ctx, glo->pattern, glo->patterns+1, struct info);
+ glo->patterns++;
+
+ glo->pattern[glo->patterns - 1].page = page;
+@@ -1216,7 +1215,7 @@ void wmupdfinfo_get(char *filename,int *pagelist,char **buf)
+ if (fout==NULL)
+ return;
+ */
+-
++
+ ctx = fz_new_context(NULL, NULL, FZ_STORE_UNLIMITED);
+ if (!ctx)
+ {
+@@ -1307,5 +1306,5 @@ static void date_convert(char *dst,char *src)
+ else if (src[i]!='\0')
+ sprintf(&dst[strlen(dst)]," %s",&src[i]);
+ }
+-
++
+ #endif /* HAVE_MUPDF_LIB */
diff --git a/pkgs/applications/misc/k2pdfopt/leptonica-CVE-2018-3836.patch b/pkgs/applications/misc/k2pdfopt/leptonica-CVE-2018-3836.patch
deleted file mode 100644
index f1b4170fbaae..000000000000
--- a/pkgs/applications/misc/k2pdfopt/leptonica-CVE-2018-3836.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- a/src/allheaders.h
-+++ b/src/allheaders.h
-@@ -2600,6 +2600,7 @@
- LEPT_DLL extern char * stringReverse ( const char *src );
- LEPT_DLL extern char * strtokSafe ( char *cstr, const char *seps, char **psaveptr );
- LEPT_DLL extern l_int32 stringSplitOnToken ( char *cstr, const char *seps, char **phead, char **ptail );
-+LEPT_DLL extern l_int32 stringCheckForChars ( const char *src, const char *chars, l_int32 *pfound );
- LEPT_DLL extern char * stringRemoveChars ( const char *src, const char *remchars );
- LEPT_DLL extern l_int32 stringFindSubstr ( const char *src, const char *sub, l_int32 *ploc );
- LEPT_DLL extern char * stringReplaceSubstr ( const char *src, const char *sub1, const char *sub2, l_int32 *pfound, l_int32 *ploc );
---- a/src/gplot.c
-+++ b/src/gplot.c
-@@ -141,9 +141,10 @@
- const char *xlabel,
- const char *ylabel)
- {
--char *newroot;
--char buf[L_BUF_SIZE];
--GPLOT *gplot;
-+char *newroot;
-+char buf[L_BUF_SIZE];
-+l_int32 badchar;
-+GPLOT *gplot;
-
- PROCNAME("gplotCreate");
-
-@@ -152,6 +153,9 @@
- if (outformat != GPLOT_PNG && outformat != GPLOT_PS &&
- outformat != GPLOT_EPS && outformat != GPLOT_LATEX)
- return (GPLOT *)ERROR_PTR("outformat invalid", procName, NULL);
-+ stringCheckForChars(rootname, "`;&|><\"?*", &badchar);
-+ if (badchar) /* danger of command injection */
-+ return (GPLOT *)ERROR_PTR("invalid rootname", procName, NULL);
-
- if ((gplot = (GPLOT *)LEPT_CALLOC(1, sizeof(GPLOT))) == NULL)
- return (GPLOT *)ERROR_PTR("gplot not made", procName, NULL);
---- a/src/utils2.c
-+++ b/src/utils2.c
-@@ -42,6 +42,7 @@
- * l_int32 stringSplitOnToken()
- *
- * Find and replace string and array procs
-+ * l_int32 stringCheckForChars()
- * char *stringRemoveChars()
- * l_int32 stringFindSubstr()
- * char *stringReplaceSubstr()
-@@ -701,6 +702,48 @@
- /*--------------------------------------------------------------------*
- * Find and replace procs *
- *--------------------------------------------------------------------*/
-+/*!
-+ * \brief stringCheckForChars()
-+ *
-+ * \param[in] src input string; can be of zero length
-+ * \param[in] chars string of chars to be searched for in %src
-+ * \param[out] pfound 1 if any characters are found; 0 otherwise
-+ * \return 0 if OK, 1 on error
-+ *
-+ *
-+ * Notes:
-+ * (1) This can be used to sanitize an operation by checking for
-+ * special characters that don't belong in a string.
-+ *