Merge branch 'master' of github.com:troydm/nixpkgs
This commit is contained in:
+3
-3
@@ -298,9 +298,9 @@ pkgs/development/python-modules/buildcatrust/ @ajs124 @lukegb @mweinelt
|
||||
/doc/languages-frameworks/javascript.section.md @winterqt
|
||||
|
||||
# OCaml
|
||||
/pkgs/build-support/ocaml @romildo @ulrikstrid
|
||||
/pkgs/development/compilers/ocaml @romildo @ulrikstrid
|
||||
/pkgs/development/ocaml-modules @romildo @ulrikstrid
|
||||
/pkgs/build-support/ocaml @ulrikstrid
|
||||
/pkgs/development/compilers/ocaml @ulrikstrid
|
||||
/pkgs/development/ocaml-modules @ulrikstrid
|
||||
|
||||
# ZFS
|
||||
pkgs/os-specific/linux/zfs @raitobezarius
|
||||
|
||||
+35
-2
@@ -66,9 +66,12 @@ Useful git commands that can help a lot with this are `git commit --patch --amen
|
||||
From time to time, changes between branches must be rebased, for example, if the
|
||||
number of new rebuilds they would cause is too large for the target branch. When
|
||||
rebasing, care must be taken to include only the intended changes, otherwise
|
||||
many CODEOWNERS will be inadvertently requested for review. To achieve this,
|
||||
many CODEOWNERS will be inadvertently requested for review. To achieve this,
|
||||
rebasing should not be performed directly on the target branch, but on the merge
|
||||
base between the current and target branch.
|
||||
base between the current and target branch. As an additional precautionary measure,
|
||||
you should temporarily mark the PR as draft for the duration of the operation.
|
||||
This reduces the probability of mass-pinging people. (OfBorg might still
|
||||
request a couple of persons for reviews though.)
|
||||
|
||||
In the following example, we assume that the current branch, called `feature`,
|
||||
is based on `master`, and we rebase it onto the merge base between
|
||||
@@ -102,6 +105,36 @@ git status
|
||||
git push origin feature --force-with-lease
|
||||
```
|
||||
|
||||
### Something went wrong and a lot of people were pinged
|
||||
|
||||
It happens. Remember to be kind, especially to new contributors.
|
||||
There is no way back, so the pull request should be closed and locked
|
||||
(if possible). The changes should be re-submitted in a new PR, in which the people
|
||||
originally involved in the conversation need to manually be pinged again.
|
||||
No further discussion should happen on the original PR, as a lot of people
|
||||
are now subscribed to it.
|
||||
|
||||
The following message (or a version thereof) might be left when closing to
|
||||
describe the situation, since closing and locking without any explanation
|
||||
is kind of rude:
|
||||
|
||||
```markdown
|
||||
It looks like you accidentally mass-pinged a bunch of people, which are now subscribed
|
||||
and getting notifications for everything in this pull request. Unfortunately, they
|
||||
cannot be automatically unsubscribed from the issue (removing review request does not
|
||||
unsubscribe), therefore development cannot continue in this pull request anymore.
|
||||
|
||||
Please open a new pull request with your changes, link back to this one and ping the
|
||||
people actually involved in here over there.
|
||||
|
||||
In order to avoid this in the future, there are instructions for how to properly
|
||||
rebase between branches in our [contribution guidelines](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#rebasing-between-branches-ie-from-master-to-staging).
|
||||
Setting your pull request to draft prior to rebasing is strongly recommended.
|
||||
In draft status, you can preview the list of people that are about to be requested
|
||||
for review, which allows you to sidestep this issue.
|
||||
This is not a bulletproof method though, as OfBorg still does review requests even on draft PRs.
|
||||
```
|
||||
|
||||
## Backporting changes
|
||||
|
||||
Follow these steps to backport a change into a release branch in compliance with the [commit policy](https://nixos.org/nixpkgs/manual/#submitting-changes-stable-release-branches).
|
||||
|
||||
+2
-7
@@ -66,18 +66,13 @@ out/html/index.html: doc-support/result manual-full.xml style.css highlightjs
|
||||
cp doc-support/result/xsl/docbook/images/callouts/*.svg out/html/images/callouts/
|
||||
chmod u+w -R out/html/
|
||||
|
||||
out/epub/manual.epub: manual-full.xml
|
||||
out/epub/manual.epub: epub.xml
|
||||
mkdir -p out/epub/scratch
|
||||
xsltproc --nonet \
|
||||
--output out/epub/scratch/ \
|
||||
doc-support/result/epub.xsl \
|
||||
./manual-full.xml
|
||||
./epub.xml
|
||||
|
||||
cp -r $(pandoc_media_dir) out/epub/scratch/OEBPS
|
||||
cp ./overrides.css out/epub/scratch/OEBPS
|
||||
cp ./style.css out/epub/scratch/OEBPS
|
||||
mkdir -p out/epub/scratch/OEBPS/images/callouts/
|
||||
cp doc-support/result/xsl/docbook/images/callouts/*.svg out/epub/scratch/OEBPS/images/callouts/
|
||||
echo "application/epub+zip" > mimetype
|
||||
zip -0Xq "out/epub/manual.epub" mimetype
|
||||
rm mimetype
|
||||
|
||||
@@ -62,7 +62,7 @@ builders-use-substitutes = true
|
||||
$ sudo launchctl kickstart -k system/org.nixos.nix-daemon
|
||||
```
|
||||
|
||||
## Example flake usage
|
||||
## Example flake usage {#sec-darwin-builder-example-flake}
|
||||
|
||||
```
|
||||
{
|
||||
@@ -120,7 +120,7 @@ $ sudo launchctl kickstart -k system/org.nixos.nix-daemon
|
||||
}
|
||||
```
|
||||
|
||||
## Reconfiguring the builder
|
||||
## Reconfiguring the builder {#sec-darwin-builder-reconfiguring}
|
||||
|
||||
Initially you should not change the builder configuration else you will not be
|
||||
able to use the binary cache. However, after you have the builder running locally
|
||||
|
||||
@@ -12,7 +12,7 @@ pkgs.makeSetupHook {
|
||||
} ./script.sh
|
||||
```
|
||||
|
||||
#### setup hook that depends on the hello package and runs hello and @shell@ is substituted with path to bash {#sec-pkgs.makeSetupHook-usage-example}
|
||||
### setup hook that depends on the hello package and runs hello and @shell@ is substituted with path to bash {#sec-pkgs.makeSetupHook-usage-example}
|
||||
|
||||
```nix
|
||||
pkgs.makeSetupHook {
|
||||
|
||||
@@ -6,7 +6,7 @@ A set of VM related utilities, that help in building some packages in more advan
|
||||
|
||||
A bash script fragment that produces a disk image at `destination`.
|
||||
|
||||
### Attributes
|
||||
### Attributes {#vm-tools-createEmptyImage-attributes}
|
||||
|
||||
* `size`. The disk size, in MiB.
|
||||
* `fullName`. Name that will be written to `${destination}/nix-support/full-name`.
|
||||
@@ -20,14 +20,14 @@ Thus, any pure Nix derivation should run unmodified.
|
||||
|
||||
If the build fails and Nix is run with the `-K/--keep-failed` option, a script `run-vm` will be left behind in the temporary build directory that allows you to boot into the VM and debug it interactively.
|
||||
|
||||
### Attributes
|
||||
### Attributes {#vm-tools-runInLinuxVM-attributes}
|
||||
|
||||
* `preVM` (optional). Shell command to be evaluated *before* the VM is started (i.e., on the host).
|
||||
* `memSize` (optional, default `512`). The memory size of the VM in MiB.
|
||||
* `diskImage` (optional). A file system image to be attached to `/dev/sda`.
|
||||
Note that currently we expect the image to contain a filesystem, not a full disk image with a partition table etc.
|
||||
|
||||
### Examples
|
||||
### Examples {#vm-tools-runInLinuxVM-examples}
|
||||
|
||||
Build the derivation hello inside a VM:
|
||||
```nix
|
||||
@@ -56,13 +56,13 @@ runInLinuxVM (hello.overrideAttrs (_: {
|
||||
|
||||
Takes a file, such as an ISO, and extracts its contents into the store.
|
||||
|
||||
### Attributes
|
||||
### Attributes {#vm-tools-extractFs-attributes}
|
||||
|
||||
* `file`. Path to the file to be extracted.
|
||||
Note that currently we expect the image to contain a filesystem, not a full disk image with a partition table etc.
|
||||
* `fs` (optional). Filesystem of the contents of the file.
|
||||
|
||||
### Examples
|
||||
### Examples {#vm-tools-extractFs-examples}
|
||||
|
||||
Extract the contents of an ISO file:
|
||||
```nix
|
||||
@@ -82,7 +82,7 @@ Like [](#vm-tools-runInLinuxVM), but instead of using `stdenv` from the Nix stor
|
||||
|
||||
Generate a script that can be used to run an interactive session in the given image.
|
||||
|
||||
### Examples
|
||||
### Examples {#vm-tools-makeImageTestScript-examples}
|
||||
|
||||
Create a script for running a Fedora 27 VM:
|
||||
```nix
|
||||
@@ -100,7 +100,7 @@ makeImageTestScript diskImages.ubuntu2004x86_64
|
||||
|
||||
A set of functions that build a predefined set of minimal Linux distributions images.
|
||||
|
||||
### Images
|
||||
### Images {#vm-tools-diskImageFuns-images}
|
||||
|
||||
* Fedora
|
||||
* `fedora26x86_64`
|
||||
@@ -126,12 +126,12 @@ A set of functions that build a predefined set of minimal Linux distributions im
|
||||
* `debian11i386`
|
||||
* `debian11x86_64`
|
||||
|
||||
### Attributes
|
||||
### Attributes {#vm-tools-diskImageFuns-attributes}
|
||||
|
||||
* `size` (optional, defaults to `4096`). The size of the image, in MiB.
|
||||
* `extraPackages` (optional). A list names of additional packages from the distribution that should be included in the image.
|
||||
|
||||
### Examples
|
||||
### Examples {#vm-tools-diskImageFuns-examples}
|
||||
|
||||
8GiB image containing Firefox in addition to the default packages:
|
||||
```nix
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Testers {#chap-testers}
|
||||
This chapter describes several testing builders which are available in the <literal>testers</literal> namespace.
|
||||
This chapter describes several testing builders which are available in the `testers` namespace.
|
||||
|
||||
## `hasPkgConfigModule` {#tester-hasPkgConfigModule}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ When reviewing a pull request, please always be nice and polite. Controversial c
|
||||
|
||||
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.
|
||||
|
||||
@@ -201,7 +201,7 @@ checks should be performed:
|
||||
them to either recommit using that key or to remove their key
|
||||
information.
|
||||
|
||||
Given a maintainter entry like this:
|
||||
Given a maintainer entry like this:
|
||||
|
||||
``` nix
|
||||
{
|
||||
|
||||
@@ -20,7 +20,33 @@ in pkgs.stdenv.mkDerivation {
|
||||
ln -s ${doc-support} ./doc-support/result
|
||||
'';
|
||||
|
||||
epub = ''
|
||||
<book xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
version="5.0"
|
||||
xml:id="nixpkgs-manual">
|
||||
<info>
|
||||
<title>Nixpkgs Manual</title>
|
||||
<subtitle>Version ${pkgs.lib.version}</subtitle>
|
||||
</info>
|
||||
<chapter>
|
||||
<title>Temporarily unavailable</title>
|
||||
<para>
|
||||
The Nixpkgs manual is currently not available in EPUB format,
|
||||
please use the <link xlink:href="https://nixos.org/nixpkgs/manual">HTML manual</link>
|
||||
instead.
|
||||
</para>
|
||||
<para>
|
||||
If you've used the EPUB manual in the past and it has been useful to you, please
|
||||
<link xlink:href="https://github.com/NixOS/nixpkgs/issues/237234">let us know</link>.
|
||||
</para>
|
||||
</chapter>
|
||||
</book>
|
||||
'';
|
||||
passAsFile = [ "epub" ];
|
||||
|
||||
preBuild = ''
|
||||
cp $epubPath epub.xml
|
||||
make -j$NIX_BUILD_CORES render-md
|
||||
'';
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ let
|
||||
if v == true then ''"yes"''
|
||||
else if v == false then ''"no"''
|
||||
else if isString v then ''"${v}"''
|
||||
# and delegats all other values to the default generator
|
||||
# and delegates all other values to the default generator
|
||||
else generators.mkValueStringDefault {} v;
|
||||
} ":";
|
||||
};
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
### Autoconf {#setup-hook-autoconf}
|
||||
# Autoconf {#setup-hook-autoconf}
|
||||
|
||||
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.
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
### Automake {#setup-hook-automake}
|
||||
# Automake {#setup-hook-automake}
|
||||
|
||||
Adds the `share/aclocal` subdirectory of each build input to the `ACLOCAL_PATH` environment variable.
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
### autoPatchelfHook {#setup-hook-autopatchelfhook}
|
||||
# autoPatchelfHook {#setup-hook-autopatchelfhook}
|
||||
|
||||
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`.
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
### breakpointHook {#breakpointhook}
|
||||
# breakpointHook {#breakpointhook}
|
||||
|
||||
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`.
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
### cmake {#cmake}
|
||||
# cmake {#cmake}
|
||||
|
||||
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.
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
### gdk-pixbuf {#setup-hook-gdk-pixbuf}
|
||||
# gdk-pixbuf {#setup-hook-gdk-pixbuf}
|
||||
|
||||
Exports `GDK_PIXBUF_MODULE_FILE` environment variable to the builder. Add librsvg package to `buildInputs` to get svg support. See also the [setup hook description in GNOME platform docs](#ssec-gnome-hooks-gdk-pixbuf).
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
### GHC {#ghc}
|
||||
# GHC {#ghc}
|
||||
|
||||
Creates a temporary package database and registers every Haskell build input in it (TODO: how?).
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
### GNOME platform {#gnome-platform}
|
||||
# GNOME platform {#gnome-platform}
|
||||
|
||||
Hooks related to GNOME platform and related libraries like GLib, GTK and GStreamer are described in [](#sec-language-gnome).
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
### `installShellFiles` {#installshellfiles}
|
||||
# `installShellFiles` {#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.
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
### libiconv, libintl {#libiconv-libintl}
|
||||
# libiconv, libintl {#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`.
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
### libxml2 {#setup-hook-libxml2}
|
||||
# libxml2 {#setup-hook-libxml2}
|
||||
|
||||
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.
|
||||
|
||||
@@ -1,26 +1,25 @@
|
||||
|
||||
### Meson {#meson}
|
||||
# Meson {#meson}
|
||||
|
||||
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 {#variables-controlling-meson}
|
||||
## Variables controlling Meson {#variables-controlling-meson}
|
||||
|
||||
##### `mesonFlags` {#mesonflags}
|
||||
### `mesonFlags` {#mesonflags}
|
||||
|
||||
Controls the flags passed to meson.
|
||||
|
||||
##### `mesonBuildType` {#mesonbuildtype}
|
||||
### `mesonBuildType` {#mesonbuildtype}
|
||||
|
||||
Which [`--buildtype`](https://mesonbuild.com/Builtin-options.html#core-options) to pass to Meson. We default to `plain`.
|
||||
|
||||
##### `mesonAutoFeatures` {#mesonautofeatures}
|
||||
### `mesonAutoFeatures` {#mesonautofeatures}
|
||||
|
||||
What value to set [`-Dauto_features=`](https://mesonbuild.com/Builtin-options.html#core-options) to. We default to `enabled`.
|
||||
|
||||
##### `mesonWrapMode` {#mesonwrapmode}
|
||||
### `mesonWrapMode` {#mesonwrapmode}
|
||||
|
||||
What value to set [`-Dwrap_mode=`](https://mesonbuild.com/Builtin-options.html#core-options) to. We default to `nodownload` as we disallow network access.
|
||||
|
||||
##### `dontUseMesonConfigure` {#dontusemesonconfigure}
|
||||
### `dontUseMesonConfigure` {#dontusemesonconfigure}
|
||||
|
||||
Disables using Meson’s `configurePhase`.
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
### ninja {#ninja}
|
||||
# ninja {#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.
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
### Perl {#setup-hook-perl}
|
||||
# Perl {#setup-hook-perl}
|
||||
|
||||
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.
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
### pkg-config {#setup-hook-pkg-config}
|
||||
# pkg-config {#setup-hook-pkg-config}
|
||||
|
||||
Adds the `lib/pkgconfig` and `share/pkgconfig` subdirectories of each build input to the `PKG_CONFIG_PATH` environment variable.
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
### Python {#setup-hook-python}
|
||||
# Python {#setup-hook-python}
|
||||
|
||||
Adds the `lib/${python.libPrefix}/site-packages` subdirectory of each build input to the `PYTHONPATH` environment variable.
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
### Qt 4 {#qt-4}
|
||||
# Qt 4 {#qt-4}
|
||||
|
||||
Sets the `QTDIR` environment variable to Qt’s path.
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
### scons {#scons}
|
||||
# scons {#scons}
|
||||
|
||||
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.
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
### teTeX / TeX Live {#tetex-tex-live}
|
||||
# teTeX / TeX Live {#tetex-tex-live}
|
||||
|
||||
Adds the `share/texmf-nix` subdirectory of each build input to the `TEXINPUTS` environment variable.
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
### unzip {#unzip}
|
||||
# unzip {#unzip}
|
||||
|
||||
This setup hook will allow you to unzip .zip files specified in `$src`. There are many similar packages like `unrar`, `undmg`, etc.
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
### validatePkgConfig {#validatepkgconfig}
|
||||
# validatePkgConfig {#validatepkgconfig}
|
||||
|
||||
The `validatePkgConfig` hook validates all pkg-config (`.pc`) files in a package. This helps catching some common errors in pkg-config files, such as undefined variables.
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
### wafHook {#wafhook}
|
||||
# wafHook {#wafhook}
|
||||
|
||||
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.
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
### xcbuildHook {#xcbuildhook}
|
||||
# xcbuildHook {#xcbuildhook}
|
||||
|
||||
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.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Bower {#sec-bower}
|
||||
|
||||
[Bower](https://bower.io) 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](https://bower.io) is a package manager for web site front-end components. Bower packages (comprising of build artifacts 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.
|
||||
|
||||
@@ -41,32 +41,18 @@ The function is implemented in [pkgs/development/bower-modules/generic/default.n
|
||||
|
||||
### Example buildBowerComponents {#ex-buildBowerComponents}
|
||||
|
||||
```{=docbook}
|
||||
<programlisting language="nix">
|
||||
```nix
|
||||
bowerComponents = buildBowerComponents {
|
||||
name = "my-web-app";
|
||||
generated = ./bower-packages.nix; <co xml:id="ex-buildBowerComponents-1" />
|
||||
src = myWebApp; <co xml:id="ex-buildBowerComponents-2" />
|
||||
generated = ./bower-packages.nix; # note 1
|
||||
src = myWebApp; # note 2
|
||||
};
|
||||
</programlisting>
|
||||
```
|
||||
|
||||
In ["buildBowerComponents" example](#ex-buildBowerComponents) the following arguments are of special significance to the function:
|
||||
|
||||
```{=docbook}
|
||||
<calloutlist>
|
||||
<callout arearefs="ex-buildBowerComponents-1">
|
||||
<para>
|
||||
<varname>generated</varname> specifies the file which was created by <command>bower2nix</command>.
|
||||
</para>
|
||||
</callout>
|
||||
<callout arearefs="ex-buildBowerComponents-2">
|
||||
<para>
|
||||
<varname>src</varname> is your project's sources. It needs to contain a <filename>bower.json</filename> file.
|
||||
</para>
|
||||
</callout>
|
||||
</calloutlist>
|
||||
```
|
||||
1. `generated` specifies the file which was created by {command}`bower2nix`.
|
||||
2. `src` is your project's sources. It needs to contain a {file}`bower.json` file.
|
||||
|
||||
`buildBowerComponents` will run Bower to link together the output of `bower2nix`, resulting in a `bower_components` directory which can be used.
|
||||
|
||||
@@ -91,10 +77,9 @@ gulp.task('build', [], function () {
|
||||
|
||||
### Example Full example — default.nix {#ex-buildBowerComponentsDefaultNix}
|
||||
|
||||
```{=docbook}
|
||||
<programlisting language="nix">
|
||||
```nix
|
||||
{ myWebApp ? { outPath = ./.; name = "myWebApp"; }
|
||||
, pkgs ? import <nixpkgs> {}
|
||||
, pkgs ? import <nixpkgs> {}
|
||||
}:
|
||||
|
||||
pkgs.stdenv.mkDerivation {
|
||||
@@ -103,49 +88,29 @@ pkgs.stdenv.mkDerivation {
|
||||
|
||||
buildInputs = [ pkgs.nodePackages.gulp ];
|
||||
|
||||
bowerComponents = pkgs.buildBowerComponents { <co xml:id="ex-buildBowerComponentsDefault-1" />
|
||||
bowerComponents = pkgs.buildBowerComponents { # note 1
|
||||
name = "my-web-app";
|
||||
generated = ./bower-packages.nix;
|
||||
src = myWebApp;
|
||||
};
|
||||
|
||||
buildPhase = ''
|
||||
cp --reflink=auto --no-preserve=mode -R $bowerComponents/bower_components . <co xml:id="ex-buildBowerComponentsDefault-2" />
|
||||
export HOME=$PWD <co xml:id="ex-buildBowerComponentsDefault-3" />
|
||||
${pkgs.nodePackages.gulp}/bin/gulp build <co xml:id="ex-buildBowerComponentsDefault-4" />
|
||||
cp --reflink=auto --no-preserve=mode -R $bowerComponents/bower_components . # note 2
|
||||
export HOME=$PWD # note 3
|
||||
${pkgs.nodePackages.gulp}/bin/gulp build # note 4
|
||||
'';
|
||||
|
||||
installPhase = "mv gulpdist $out";
|
||||
}
|
||||
</programlisting>
|
||||
```
|
||||
|
||||
A few notes about [Full example — `default.nix`](#ex-buildBowerComponentsDefaultNix):
|
||||
|
||||
```{=docbook}
|
||||
<calloutlist>
|
||||
<callout arearefs="ex-buildBowerComponentsDefault-1">
|
||||
<para>
|
||||
The result of <varname>buildBowerComponents</varname> is an input to the frontend build.
|
||||
</para>
|
||||
</callout>
|
||||
<callout arearefs="ex-buildBowerComponentsDefault-2">
|
||||
<para>
|
||||
Whether to symlink or copy the <filename>bower_components</filename> directory depends on the build tool in use. In this case a copy is used to avoid <command>gulp</command> silliness with permissions.
|
||||
</para>
|
||||
</callout>
|
||||
<callout arearefs="ex-buildBowerComponentsDefault-3">
|
||||
<para>
|
||||
<command>gulp</command> requires <varname>HOME</varname> to refer to a writeable directory.
|
||||
</para>
|
||||
</callout>
|
||||
<callout arearefs="ex-buildBowerComponentsDefault-4">
|
||||
<para>
|
||||
The actual build command. Other tools could be used.
|
||||
</para>
|
||||
</callout>
|
||||
</calloutlist>
|
||||
```
|
||||
1. The result of `buildBowerComponents` is an input to the frontend build.
|
||||
2. Whether to symlink or copy the {file}`bower_components` directory depends on the build tool in use.
|
||||
In this case a copy is used to avoid {command}`gulp` silliness with permissions.
|
||||
3. {command}`gulp` requires `HOME` to refer to a writeable directory.
|
||||
4. The actual build command in this example is {command}`gulp`. Other tools could be used instead.
|
||||
|
||||
## Troubleshooting {#ssec-bower2nix-troubleshooting}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ The modules are typically installed to `lib/gio/modules/` directory of a package
|
||||
|
||||
In particular, we recommend:
|
||||
|
||||
* adding `dconf.lib` for any software on Linux that reads [GSettings](#ssec-gnome-settings) (even transitivily through e.g. GTK’s file manager)
|
||||
* adding `dconf.lib` for any software on Linux that reads [GSettings](#ssec-gnome-settings) (even transitively through e.g. GTK’s file manager)
|
||||
* adding `glib-networking` for any software that accesses network using GIO or libsoup – glib-networking contains a module that implements TLS support and loads system-wide proxy settings
|
||||
|
||||
To allow software to use various virtual file systems, `gvfs` package can be also added. But that is usually an optional feature so we typically use `gvfs` from the system (e.g. installed globally using NixOS module).
|
||||
@@ -137,15 +137,15 @@ Most GNOME package offer [`updateScript`](#var-passthru-updateScript), it is the
|
||||
|
||||
## Frequently encountered issues {#ssec-gnome-common-issues}
|
||||
|
||||
#### `GLib-GIO-ERROR **: 06:04:50.903: No GSettings schemas are installed on the system` {#ssec-gnome-common-issues-no-schemas}
|
||||
### `GLib-GIO-ERROR **: 06:04:50.903: No GSettings schemas are installed on the system` {#ssec-gnome-common-issues-no-schemas}
|
||||
|
||||
There are no schemas available in `XDG_DATA_DIRS`. Temporarily add a random package containing schemas like `gsettings-desktop-schemas` to `buildInputs`. [`glib`](#ssec-gnome-hooks-glib) and [`wrapGAppsHook`](#ssec-gnome-hooks-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](#ssec-gnome-common-issues-missing-schema). 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` {#ssec-gnome-common-issues-missing-schema}
|
||||
### `GLib-GIO-ERROR **: 06:04:50.903: Settings schema ‘org.gnome.foo’ is not installed` {#ssec-gnome-common-issues-missing-schema}
|
||||
|
||||
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](#ssec-gnome-common-issues-no-schemas).
|
||||
|
||||
#### When using `wrapGAppsHook` with special derivers you can end up with double wrapped binaries. {#ssec-gnome-common-issues-double-wrapped}
|
||||
### When using `wrapGAppsHook` with special derivers you can end up with double wrapped binaries. {#ssec-gnome-common-issues-double-wrapped}
|
||||
|
||||
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.
|
||||
|
||||
@@ -193,7 +193,7 @@ mkDerivation {
|
||||
}
|
||||
```
|
||||
|
||||
#### I am packaging a project that cannot be wrapped, like a library or GNOME Shell extension. {#ssec-gnome-common-issues-unwrappable-package}
|
||||
### I am packaging a project that cannot be wrapped, like a library or GNOME Shell extension. {#ssec-gnome-common-issues-unwrappable-package}
|
||||
|
||||
You can rely on applications depending on the library setting the necessary environment variables but that is often easy to miss. Instead we recommend to patch the paths in the source code whenever possible. Here are some examples:
|
||||
|
||||
@@ -209,6 +209,6 @@ You can rely on applications depending on the library setting the necessary envi
|
||||
|
||||
[]{#ssec-gnome-common-issues-unwrappable-package-gsettings-c} [Hard-coding GSettings schema path in C library](https://github.com/NixOS/nixpkgs/blob/29c120c065d03b000224872251bed93932d42412/pkgs/development/libraries/glib-networking/default.nix#L31-L34) – nothing special other than using [Coccinelle patch](https://github.com/NixOS/nixpkgs/pull/67957#issuecomment-527717467) to generate the patch itself.
|
||||
|
||||
#### I need to wrap a binary outside `bin` and `libexec` directories. {#ssec-gnome-common-issues-weird-location}
|
||||
### I need to wrap a binary outside `bin` and `libexec` directories. {#ssec-gnome-common-issues-weird-location}
|
||||
|
||||
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`](#fun-wrapProgram) function.
|
||||
|
||||
@@ -104,7 +104,7 @@ The above function takes a variety of parameters:
|
||||
and the location where the source code resides
|
||||
* `sdkVersion` specifies which version of the iOS SDK to use.
|
||||
|
||||
It also possile to adjust the `xcodebuild` parameters. This is only needed in
|
||||
It also possible to adjust the `xcodebuild` parameters. This is only needed in
|
||||
rare circumstances. In most cases the default values should suffice:
|
||||
|
||||
* Specifies which `xcodebuild` target to build. By default it takes the target
|
||||
@@ -130,7 +130,7 @@ In addition, you need to set the following parameters:
|
||||
store certificates.
|
||||
* `generateIPA` specifies that we want to produce an IPA file (this is probably
|
||||
what you want)
|
||||
* `generateXCArchive` specifies thet we want to produce an xcarchive file.
|
||||
* `generateXCArchive` specifies that we want to produce an xcarchive file.
|
||||
|
||||
When building IPA files on Hydra and when it is desired to allow iOS devices to
|
||||
install IPAs by browsing to the Hydra build products page, you can enable the
|
||||
|
||||
@@ -143,7 +143,7 @@ To update NPM packages in nixpkgs, run the same `generate.sh` script:
|
||||
#### Git protocol error {#javascript-git-error}
|
||||
|
||||
Some packages may have Git dependencies from GitHub specified with `git://`.
|
||||
GitHub has [disabled unecrypted Git connections](https://github.blog/2021-09-01-improving-git-protocol-security-github/#no-more-unauthenticated-git), so you may see the following error when running the generate script:
|
||||
GitHub has [disabled unencrypted Git connections](https://github.blog/2021-09-01-improving-git-protocol-security-github/#no-more-unauthenticated-git), so you may see the following error when running the generate script:
|
||||
|
||||
```
|
||||
The unauthenticated git protocol on port 9418 is no longer supported
|
||||
|
||||
@@ -995,7 +995,7 @@ and in this case the `python3` interpreter is automatically used.
|
||||
### Interpreters {#interpreters}
|
||||
|
||||
Versions 2.7, 3.8, 3.9, 3.10 and 3.11 of the CPython interpreter are available
|
||||
as respectively `python27`, python38`, `python39`, `python310` and `python311`.
|
||||
as respectively `python27`, `python38`, `python39`, `python310` and `python311`.
|
||||
The aliases `python2` and `python3` correspond to respectively `python27` and
|
||||
`python310`. The attribute `python` maps to `python2`. The PyPy interpreters
|
||||
compatible with Python 2.7 and 3 are available as `pypy27` and `pypy3`, with
|
||||
|
||||
@@ -10,37 +10,22 @@ pure and explicit at build-time, at the cost of introducing an extra indirection
|
||||
|
||||
## Nix expression for a Qt package (default.nix) {#qt-default-nix}
|
||||
|
||||
```{=docbook}
|
||||
<programlisting>
|
||||
{ stdenv, lib, qtbase, wrapQtAppsHook }: <co xml:id='qt-default-nix-co-1' />
|
||||
```nix
|
||||
{ stdenv, lib, qtbase, wrapQtAppsHook }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "myapp";
|
||||
version = "1.0";
|
||||
|
||||
buildInputs = [ qtbase ];
|
||||
nativeBuildInputs = [ wrapQtAppsHook ]; <co xml:id='qt-default-nix-co-2' />
|
||||
nativeBuildInputs = [ wrapQtAppsHook ];
|
||||
}
|
||||
</programlisting>
|
||||
|
||||
<calloutlist>
|
||||
<callout arearefs='qt-default-nix-co-1'>
|
||||
<para>
|
||||
Import Qt modules directly, that is: <literal>qtbase</literal>, <literal>qtdeclarative</literal>, etc.
|
||||
<emphasis>Do not</emphasis> import Qt package sets such as <literal>qt5</literal>
|
||||
because the Qt versions of dependencies may not be coherent, causing build and runtime failures.
|
||||
</para>
|
||||
</callout>
|
||||
<callout arearefs='qt-default-nix-co-2'>
|
||||
<para>
|
||||
All Qt packages must include <literal>wrapQtAppsHook</literal> in
|
||||
<literal>nativeBuildInputs</literal>, or you must explicitly set
|
||||
<literal>dontWrapQtApps</literal>.
|
||||
</para>
|
||||
</callout>
|
||||
</calloutlist>
|
||||
```
|
||||
|
||||
It is important to import Qt modules directly, that is: `qtbase`, `qtdeclarative`, etc. *Do not* import Qt package sets such as `qt5` because the Qt versions of dependencies may not be coherent, causing build and runtime failures.
|
||||
|
||||
Additionally all Qt packages must include `wrapQtAppsHook` in `nativeBuildInputs`, or you must explicitly set `dontWrapQtApps`.
|
||||
|
||||
## Locating runtime dependencies {#qt-runtime-dependencies}
|
||||
|
||||
Qt applications must be wrapped to find runtime dependencies.
|
||||
|
||||
@@ -70,7 +70,7 @@ A list of the maintainers of this Nix expression. Maintainers are defined in [`n
|
||||
|
||||
### `mainProgram` {#var-meta-mainProgram}
|
||||
|
||||
The name of the main binary for the package. This effects the binary `nix run` executes and falls back to the name of the package. Example: `"rg"`
|
||||
The name of the main binary for the package. This affects the binary `nix run` executes and falls back to the name of the package. Example: `"rg"`
|
||||
|
||||
### `priority` {#var-meta-priority}
|
||||
|
||||
@@ -128,7 +128,7 @@ Prefer `passthru.tests` for tests that are introduced in nixpkgs because:
|
||||
* we can run `passthru.tests` independently
|
||||
* `installCheckPhase` adds overhead to each build
|
||||
|
||||
For more on how to write and run package tests, see <xref linkend="sec-package-tests"/>.
|
||||
For more on how to write and run package tests, see [](#sec-package-tests).
|
||||
|
||||
#### NixOS tests {#var-meta-tests-nixos}
|
||||
|
||||
|
||||
@@ -286,7 +286,7 @@ This is where “sum-like” comes in from above: We can just sum all of the hos
|
||||
|
||||
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 depending 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 unforgeable 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.
|
||||
|
||||
#### Variables specifying dependencies {#variables-specifying-dependencies}
|
||||
|
||||
@@ -971,7 +971,8 @@ to `~/.gdbinit`. GDB will then be able to find debug information installed via `
|
||||
|
||||
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`.
|
||||
|
||||
It is often better to add tests that are not part of the source distribution to `passthru.tests` (see <xref linkend="var-meta-tests"/>). This avoids adding overhead to every build and enables us to run them independently.
|
||||
It is often better to add tests that are not part of the source distribution to `passthru.tests` (see
|
||||
[](#var-meta-tests)). This avoids adding overhead to every build and enables us to run them independently.
|
||||
|
||||
#### Variables controlling the installCheck phase {#variables-controlling-the-installcheck-phase}
|
||||
|
||||
@@ -1234,7 +1235,7 @@ This runs the strip command on installed binaries and libraries. This removes un
|
||||
|
||||
This setup hook patches installed scripts to add Nix store paths to their shebang interpreter as found in the build environment. The [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) line tells a Unix-like operating system which interpreter to use to execute the script's contents.
|
||||
|
||||
::: note
|
||||
::: {.note}
|
||||
The [generic builder][generic-builder] populates `PATH` from inputs of the derivation.
|
||||
:::
|
||||
|
||||
@@ -1272,7 +1273,7 @@ patchShebangs --build configure
|
||||
|
||||
Interpreter paths that point to a valid Nix store location are not changed.
|
||||
|
||||
::: note
|
||||
::: {.note}
|
||||
A script file must be marked as executable, otherwise it will not be
|
||||
considered.
|
||||
:::
|
||||
|
||||
@@ -215,6 +215,12 @@ in mkLicense lset) ({
|
||||
url = "https://opensource.org/licenses/CAL-1.0";
|
||||
};
|
||||
|
||||
caldera = {
|
||||
spdxId = "Caldera";
|
||||
fullName = "Caldera License";
|
||||
url = "http://www.lemis.com/grog/UNIX/ancient-source-all.pdf";
|
||||
};
|
||||
|
||||
capec = {
|
||||
fullName = "Common Attack Pattern Enumeration and Classification";
|
||||
url = "https://capec.mitre.org/about/termsofuse.html";
|
||||
@@ -556,6 +562,12 @@ in mkLicense lset) ({
|
||||
fullName = "Imlib2 License";
|
||||
};
|
||||
|
||||
info-zip = {
|
||||
spdxId = "Info-ZIP";
|
||||
fullName = "Info-ZIP License";
|
||||
url = "http://www.info-zip.org/pub/infozip/license.html";
|
||||
};
|
||||
|
||||
inria-compcert = {
|
||||
fullName = "INRIA Non-Commercial License Agreement for the CompCert verified compiler";
|
||||
url = "https://compcert.org/doc/LICENSE.txt";
|
||||
|
||||
@@ -2222,6 +2222,13 @@
|
||||
githubId = 68566724;
|
||||
name = "bootstrap-prime";
|
||||
};
|
||||
boozedog = {
|
||||
email = "code@booze.dog";
|
||||
github = "boozedog";
|
||||
githubId = 1410808;
|
||||
matrix = "@boozedog:matrix.org";
|
||||
name = "David A. Buser";
|
||||
};
|
||||
borisbabic = {
|
||||
email = "boris.ivan.babic@gmail.com";
|
||||
github = "borisbabic";
|
||||
@@ -3560,6 +3567,12 @@
|
||||
fingerprint = "4779 D1D5 3C97 2EAE 34A5 ED3D D8AF C4BF 0567 0F9D";
|
||||
}];
|
||||
};
|
||||
dariof4 = {
|
||||
name = "dariof4";
|
||||
email = "dazedtank@gmail.com";
|
||||
github = "dariof4";
|
||||
githubId = 9992814;
|
||||
};
|
||||
darkonion0 = {
|
||||
name = "Alexandre Peruggia";
|
||||
email = "darkgenius1@protonmail.com";
|
||||
@@ -4946,6 +4959,12 @@
|
||||
githubId = 1847524;
|
||||
name = "Evan Stoll";
|
||||
};
|
||||
evanrichter = {
|
||||
email = "evanjrichter@gmail.com";
|
||||
github = "evanrichter";
|
||||
githubId = 330292;
|
||||
name = "Evan Richter";
|
||||
};
|
||||
evax = {
|
||||
email = "nixos@evax.fr";
|
||||
github = "evax";
|
||||
@@ -5749,6 +5768,12 @@
|
||||
githubId = 10353047;
|
||||
name = "Tobias Happ";
|
||||
};
|
||||
getchoo = {
|
||||
email = "getchoo@tuta.io";
|
||||
github = "getchoo";
|
||||
githubId = 48872998;
|
||||
name = "Seth";
|
||||
};
|
||||
gfrascadorio = {
|
||||
email = "gfrascadorio@tutanota.com";
|
||||
github = "gfrascadorio";
|
||||
@@ -9202,6 +9227,12 @@
|
||||
fingerprint = "74F5 E5CC 19D3 B5CB 608F 6124 68FF 81E6 A785 0F49";
|
||||
}];
|
||||
};
|
||||
liyangau = {
|
||||
email = "d@aufomm.com";
|
||||
github = "liyangau";
|
||||
githubId = 71299093;
|
||||
name = "Li Yang";
|
||||
};
|
||||
lizelive = {
|
||||
email = "nixpkgs@lize.live";
|
||||
github = "lizelive";
|
||||
@@ -10787,6 +10818,12 @@
|
||||
fingerprint = "6460 4147 C434 F65E C306 A21F 135E EDD0 F719 34F3";
|
||||
}];
|
||||
};
|
||||
moody = {
|
||||
email = "moody@posixcafe.org";
|
||||
github = "majiru";
|
||||
githubId = 3579600;
|
||||
name = "Jacob Moody";
|
||||
};
|
||||
moosingin3space = {
|
||||
email = "moosingin3space@gmail.com";
|
||||
github = "moosingin3space";
|
||||
@@ -16519,6 +16556,15 @@
|
||||
fingerprint = "EE59 5E29 BB5B F2B3 5ED2 3F1C D276 FF74 6700 7335";
|
||||
}];
|
||||
};
|
||||
undefined-moe = {
|
||||
name = "undefined";
|
||||
email = "i@undefined.moe";
|
||||
github = "undefined-moe";
|
||||
githubId = 29992205;
|
||||
keys = [{
|
||||
fingerprint = "6684 4E7D D213 C75D 8828 6215 C714 A58B 6C1E 0F52";
|
||||
}];
|
||||
};
|
||||
unhammer = {
|
||||
email = "unhammer@fsfe.org";
|
||||
github = "unhammer";
|
||||
@@ -17826,6 +17872,12 @@
|
||||
githubId = 2189609;
|
||||
name = "Zhaofeng Li";
|
||||
};
|
||||
zi3m5f = {
|
||||
name = "zi3m5f";
|
||||
email = "k7n3o3a6f@mozmail.com";
|
||||
github = "zi3m5f";
|
||||
githubId = 113244000;
|
||||
};
|
||||
ziguana = {
|
||||
name = "Zig Uana";
|
||||
email = "git@ziguana.dev";
|
||||
|
||||
@@ -267,19 +267,41 @@ in rec {
|
||||
|
||||
manualEpub = runCommand "nixos-manual-epub"
|
||||
{ nativeBuildInputs = [ buildPackages.libxml2.bin buildPackages.libxslt.bin buildPackages.zip ];
|
||||
doc = ''
|
||||
<book xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
version="5.0"
|
||||
xml:id="book-nixos-manual">
|
||||
<info>
|
||||
<title>NixOS Manual</title>
|
||||
<subtitle>Version ${lib.version}</subtitle>
|
||||
</info>
|
||||
<chapter>
|
||||
<title>Temporarily unavailable</title>
|
||||
<para>
|
||||
The NixOS manual is currently not available in EPUB format,
|
||||
please use the <link xlink:href="https://nixos.org/nixos/manual">HTML manual</link>
|
||||
instead.
|
||||
</para>
|
||||
<para>
|
||||
If you've used the EPUB manual in the past and it has been useful to you, please
|
||||
<link xlink:href="https://github.com/NixOS/nixpkgs/issues/237234">let us know</link>.
|
||||
</para>
|
||||
</chapter>
|
||||
</book>
|
||||
'';
|
||||
passAsFile = [ "doc" ];
|
||||
}
|
||||
''
|
||||
# Generate the epub manual.
|
||||
dst=$out/share/doc/nixos
|
||||
|
||||
xsltproc \
|
||||
${manualXsltprocOptions} \
|
||||
--param chapter.autolabel 0 \
|
||||
--nonet --xinclude --output $dst/epub/ \
|
||||
${docbook_xsl_ns}/xml/xsl/docbook/epub/docbook.xsl \
|
||||
${manual-combined}/manual-combined.xml
|
||||
$docPath
|
||||
|
||||
mkdir -p $dst/epub/OEBPS/images/callouts
|
||||
cp -r ${docbook_xsl_ns}/xml/xsl/docbook/images/callouts/*.svg $dst/epub/OEBPS/images/callouts # */
|
||||
echo "application/epub+zip" > mimetype
|
||||
manual="$dst/nixos-manual.epub"
|
||||
zip -0Xq "$manual" mimetype
|
||||
|
||||
@@ -201,7 +201,7 @@ In addition to numerous new and updated packages, this release has the following
|
||||
|
||||
- `graylog` has been updated to version 5, which can not be updated directly from the previously packaged version 3.3. If you had installed the previously packaged version 3.3, please follow the [upgrade path](https://go2docs.graylog.org/5-0/upgrading_graylog/upgrade_path.htm) from 3.3 to 4.0 to 4.3 to 5.0.
|
||||
|
||||
- `buildFHSUserEnv` is now called `buildFHSEnv` and uses FlatPak's Bubblewrap sandboxing tool rather than Nixpkgs' own chrootenv. The old chrootenv-based implemenation is still available via `buildFHSEnvChrootenv` but is considered deprecated and will be removed when the remaining uses inside Nixpkgs have been migrated. If your FHSEnv-wrapped application misbehaves when using the new bubblewrap implementation, please create an issue in Nixpkgs.
|
||||
- `buildFHSUserEnv` is now called `buildFHSEnv` and uses FlatPak's Bubblewrap sandboxing tool rather than Nixpkgs' own chrootenv. The old chrootenv-based implemenation is still available via `buildFHSEnvChroot` but is considered deprecated and will be removed when the remaining uses inside Nixpkgs have been migrated. If your FHSEnv-wrapped application misbehaves when using the new bubblewrap implementation, please create an issue in Nixpkgs.
|
||||
|
||||
- `nushell` has been updated to at least version 0.77.0, which includes potential breaking changes in aliases. The old aliases are now available as `old-alias` but it is recommended you migrate to the new format. See [Reworked aliases](https://www.nushell.sh/blog/2023-03-14-nushell_0_77.html#reworked-aliases-breaking-changes-kubouch).
|
||||
|
||||
@@ -525,7 +525,7 @@ In addition to numerous new and updated packages, this release has the following
|
||||
|
||||
- The new option `services.tailscale.useRoutingFeatures` controls various settings for using Tailscale features like exit nodes and subnet routers. If you wish to use your machine as an exit node, you can set this setting to `server`, otherwise if you wish to use an exit node you can set this setting to `client`. The strict RPF warning has been removed as the RPF will be loosened automatically based on the value of this setting.
|
||||
|
||||
- `openjdk` from versioggn 11 and above is not build with `openjfx` (i.e.: JavaFX) support by default anymore. You can re-enable it by overriding, e.g.: `openjdk11.override { enableJavaFX = true; };`.
|
||||
- `openjdk` from version 11 and above is not build with `openjfx` (i.e.: JavaFX) support by default anymore. You can re-enable it by overriding, e.g.: `openjdk11.override { enableJavaFX = true; };`.
|
||||
|
||||
- [Xastir](https://xastir.org/index.php/Main_Page) can now access AX.25 interfaces via the `libax25` package.
|
||||
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
|
||||
- [river](https://github.com/riverwm/river), A dynamic tiling wayland compositor. Available as [programs.river](#opt-programs.river.enable).
|
||||
|
||||
- [GoToSocial](https://gotosocial.org/), an ActivityPub social network server, written in Golang. Available as [services.gotosocial](#opt-services.gotosocial.enable).
|
||||
|
||||
- [sitespeed-io](https://sitespeed.io), a tool that can generate metrics (timings, diagnostics) for websites. Available as [services.sitespeed-io](#opt-services.sitespeed-io.enable).
|
||||
|
||||
## Backward Incompatibilities {#sec-release-23.11-incompatibilities}
|
||||
@@ -30,6 +32,8 @@
|
||||
|
||||
- `himalaya` has been updated to `0.8.0`, which drops the native TLS support (in favor of Rustls) and add OAuth 2.0 support. See the [release note](https://github.com/soywod/himalaya/releases/tag/v0.8.0) for more details.
|
||||
|
||||
- The [services.caddy.acmeCA](#opt-services.caddy.acmeCA) option now defaults to `null` instead of `"https://acme-v02.api.letsencrypt.org/directory"`, to use all of Caddy's default ACME CAs and enable Caddy's automatic issuer fallback feature by default, as recommended by upstream.
|
||||
|
||||
- `util-linux` is now supported on Darwin and is no longer an alias to `unixtools`. Use the `unixtools.util-linux` package for access to the Apple variants of the utilities.
|
||||
|
||||
- `fileSystems.<name>.autoFormat` now uses `systemd-makefs`, which does not accept formatting options. Therefore, `fileSystems.<name>.formatOptions` has been removed.
|
||||
|
||||
@@ -85,7 +85,7 @@ sub debug {
|
||||
|
||||
|
||||
# nixpkgs.system
|
||||
push @attrs, "nixpkgs.hostPlatform = lib.mkDefault \"@system@\";";
|
||||
push @attrs, "nixpkgs.hostPlatform = lib.mkDefault \"@hostPlatformSystem@\";";
|
||||
|
||||
|
||||
my $cpuinfo = read_file "/proc/cpuinfo";
|
||||
|
||||
@@ -35,7 +35,7 @@ let
|
||||
name = "nixos-generate-config";
|
||||
src = ./nixos-generate-config.pl;
|
||||
perl = "${pkgs.perl.withPackages (p: [ p.FileSlurp ])}/bin/perl";
|
||||
system = pkgs.stdenv.hostPlatform.system;
|
||||
hostPlatformSystem = pkgs.stdenv.hostPlatform.system;
|
||||
detectvirt = "${config.systemd.package}/bin/systemd-detect-virt";
|
||||
btrfs = "${pkgs.btrfs-progs}/bin/btrfs";
|
||||
inherit (config.system.nixos-generate-config) configuration desktopConfiguration;
|
||||
|
||||
@@ -328,6 +328,8 @@
|
||||
./services/audio/spotifyd.nix
|
||||
./services/audio/squeezelite.nix
|
||||
./services/audio/tts.nix
|
||||
./services/audio/wyoming/faster-whisper.nix
|
||||
./services/audio/wyoming/piper.nix
|
||||
./services/audio/ympd.nix
|
||||
./services/backup/automysqlbackup.nix
|
||||
./services/backup/bacula.nix
|
||||
@@ -1188,6 +1190,7 @@
|
||||
./services/web-apps/galene.nix
|
||||
./services/web-apps/gerrit.nix
|
||||
./services/web-apps/gotify-server.nix
|
||||
./services/web-apps/gotosocial.nix
|
||||
./services/web-apps/grocy.nix
|
||||
./services/web-apps/pixelfed.nix
|
||||
./services/web-apps/healthchecks.nix
|
||||
|
||||
@@ -484,6 +484,9 @@ let
|
||||
optionalString cfg.mysqlAuth ''
|
||||
account sufficient ${pkgs.pam_mysql}/lib/security/pam_mysql.so config_file=/etc/security/pam_mysql.conf
|
||||
'' +
|
||||
optionalString (config.services.kanidm.enablePam) ''
|
||||
account sufficient ${pkgs.kanidm}/lib/pam_kanidm.so ignore_unknown_user
|
||||
'' +
|
||||
optionalString (config.services.sssd.enable && cfg.sssdStrictAccess==false) ''
|
||||
account sufficient ${pkgs.sssd}/lib/security/pam_sss.so
|
||||
'' +
|
||||
@@ -617,6 +620,9 @@ let
|
||||
optionalString use_ldap ''
|
||||
auth sufficient ${pam_ldap}/lib/security/pam_ldap.so use_first_pass
|
||||
'' +
|
||||
optionalString config.services.kanidm.enablePam ''
|
||||
auth sufficient ${pkgs.kanidm}/lib/pam_kanidm.so ignore_unknown_user use_first_pass
|
||||
'' +
|
||||
optionalString config.services.sssd.enable ''
|
||||
auth sufficient ${pkgs.sssd}/lib/security/pam_sss.so use_first_pass
|
||||
'' +
|
||||
@@ -653,6 +659,9 @@ let
|
||||
optionalString cfg.mysqlAuth ''
|
||||
password sufficient ${pkgs.pam_mysql}/lib/security/pam_mysql.so config_file=/etc/security/pam_mysql.conf
|
||||
'' +
|
||||
optionalString config.services.kanidm.enablePam ''
|
||||
password sufficient ${pkgs.kanidm}/lib/pam_kanidm.so
|
||||
'' +
|
||||
optionalString config.services.sssd.enable ''
|
||||
password sufficient ${pkgs.sssd}/lib/security/pam_sss.so
|
||||
'' +
|
||||
@@ -714,6 +723,9 @@ let
|
||||
optionalString cfg.mysqlAuth ''
|
||||
session optional ${pkgs.pam_mysql}/lib/security/pam_mysql.so config_file=/etc/security/pam_mysql.conf
|
||||
'' +
|
||||
optionalString config.services.kanidm.enablePam ''
|
||||
session optional ${pkgs.kanidm}/lib/pam_kanidm.so
|
||||
'' +
|
||||
optionalString config.services.sssd.enable ''
|
||||
session optional ${pkgs.sssd}/lib/security/pam_sss.so
|
||||
'' +
|
||||
@@ -1298,6 +1310,7 @@ in
|
||||
# Include the PAM modules in the system path mostly for the manpages.
|
||||
[ pkgs.pam ]
|
||||
++ optional config.users.ldap.enable pam_ldap
|
||||
++ optional config.services.kanidm.enablePam pkgs.kanidm
|
||||
++ optional config.services.sssd.enable pkgs.sssd
|
||||
++ optionals config.security.pam.krb5.enable [pam_krb5 pam_ccreds]
|
||||
++ optionals config.security.pam.enableOTPW [ pkgs.otpw ]
|
||||
@@ -1364,6 +1377,9 @@ in
|
||||
optionalString use_ldap ''
|
||||
mr ${pam_ldap}/lib/security/pam_ldap.so,
|
||||
'' +
|
||||
optionalString config.services.kanidm.enablePam ''
|
||||
mr ${pkgs.kanidm}/lib/pam_kanidm.so,
|
||||
'' +
|
||||
optionalString config.services.sssd.enable ''
|
||||
mr ${pkgs.sssd}/lib/security/pam_sss.so,
|
||||
'' +
|
||||
|
||||
@@ -0,0 +1,186 @@
|
||||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.services.wyoming.faster-whisper;
|
||||
|
||||
inherit (lib)
|
||||
escapeShellArgs
|
||||
mkOption
|
||||
mdDoc
|
||||
mkEnableOption
|
||||
mkPackageOptionMD
|
||||
types
|
||||
;
|
||||
|
||||
inherit (builtins)
|
||||
toString
|
||||
;
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
options.services.wyoming.faster-whisper = with types; {
|
||||
package = mkPackageOptionMD pkgs "wyoming-faster-whisper" { };
|
||||
|
||||
servers = mkOption {
|
||||
default = {};
|
||||
description = mdDoc ''
|
||||
Attribute set of faster-whisper instances to spawn.
|
||||
'';
|
||||
type = types.attrsOf (types.submodule (
|
||||
{ ... }: {
|
||||
options = {
|
||||
enable = mkEnableOption (mdDoc "Wyoming faster-whisper server");
|
||||
|
||||
model = mkOption {
|
||||
type = enum [
|
||||
"tiny"
|
||||
"tiny-int8"
|
||||
"base"
|
||||
"base-int8"
|
||||
"small"
|
||||
"small-int8"
|
||||
"medium"
|
||||
"medium-int8"
|
||||
];
|
||||
default = "tiny-int8";
|
||||
example = "medium-int8";
|
||||
description = mdDoc ''
|
||||
Name of the voice model to use.
|
||||
'';
|
||||
};
|
||||
|
||||
uri = mkOption {
|
||||
type = strMatching "^(tcp|unix)://.*$";
|
||||
example = "tcp://0.0.0.0:10300";
|
||||
description = mdDoc ''
|
||||
URI to bind the wyoming server to.
|
||||
'';
|
||||
};
|
||||
|
||||
device = mkOption {
|
||||
# https://opennmt.net/CTranslate2/python/ctranslate2.models.Whisper.html#
|
||||
type = types.enum [
|
||||
"cpu"
|
||||
"cuda"
|
||||
"auto"
|
||||
];
|
||||
default = "cpu";
|
||||
description = mdDoc ''
|
||||
Id of a speaker in a multi-speaker model.
|
||||
'';
|
||||
};
|
||||
|
||||
language = mkOption {
|
||||
type = enum [
|
||||
# https://github.com/home-assistant/addons/blob/master/whisper/config.yaml#L20
|
||||
"auto" "af" "am" "ar" "as" "az" "ba" "be" "bg" "bn" "bo" "br" "bs" "ca" "cs" "cy" "da" "de" "el" "en" "es" "et" "eu" "fa" "fi" "fo" "fr" "gl" "gu" "ha" "haw" "he" "hi" "hr" "ht" "hu" "hy" "id" "is" "it" "ja" "jw" "ka" "kk" "km" "kn" "ko" "la" "lb" "ln" "lo" "lt" "lv" "mg" "mi" "mk" "ml" "mn" "mr" "ms" "mt" "my" "ne" "nl" "nn" "no" "oc" "pa" "pl" "ps" "pt" "ro" "ru" "sa" "sd" "si" "sk" "sl" "sn" "so" "sq" "sr" "su" "sv" "sw" "ta" "te" "tg" "th" "tk" "tl" "tr" "tt" "uk" "ur" "uz" "vi" "yi" "yo" "zh"
|
||||
];
|
||||
example = "en";
|
||||
description = mdDoc ''
|
||||
The language used to to parse words and sentences.
|
||||
'';
|
||||
};
|
||||
|
||||
beamSize = mkOption {
|
||||
type = ints.unsigned;
|
||||
default = 1;
|
||||
example = 5;
|
||||
description = mdDoc ''
|
||||
The number of beams to use in beam search.
|
||||
'';
|
||||
apply = toString;
|
||||
};
|
||||
|
||||
extraArgs = mkOption {
|
||||
type = listOf str;
|
||||
default = [ ];
|
||||
description = mdDoc ''
|
||||
Extra arguments to pass to the server commandline.
|
||||
'';
|
||||
apply = escapeShellArgs;
|
||||
};
|
||||
};
|
||||
}
|
||||
));
|
||||
};
|
||||
};
|
||||
|
||||
config = let
|
||||
inherit (lib)
|
||||
mapAttrs'
|
||||
mkIf
|
||||
nameValuePair
|
||||
;
|
||||
in mkIf (cfg.servers != {}) {
|
||||
systemd.services = mapAttrs' (server: options:
|
||||
nameValuePair "wyoming-faster-whisper-${server}" {
|
||||
description = "Wyoming faster-whisper server instance ${server}";
|
||||
after = [
|
||||
"network-online.target"
|
||||
];
|
||||
wantedBy = [
|
||||
"multi-user.target"
|
||||
];
|
||||
serviceConfig = {
|
||||
DynamicUser = true;
|
||||
User = "wyoming-faster-whisper";
|
||||
StateDirectory = "wyoming/faster-whisper";
|
||||
# https://github.com/home-assistant/addons/blob/master/whisper/rootfs/etc/s6-overlay/s6-rc.d/whisper/run
|
||||
ExecStart = ''
|
||||
${cfg.package}/bin/wyoming-faster-whisper \
|
||||
--data-dir $STATE_DIRECTORY \
|
||||
--download-dir $STATE_DIRECTORY \
|
||||
--uri ${options.uri} \
|
||||
--model ${options.model} \
|
||||
--language ${options.language} \
|
||||
--beam-size ${options.beamSize} ${options.extraArgs}
|
||||
'';
|
||||
CapabilityBoundingSet = "";
|
||||
DeviceAllow = if builtins.elem options.device [ "cuda" "auto" ] then [
|
||||
# https://docs.nvidia.com/dgx/pdf/dgx-os-5-user-guide.pdf
|
||||
"/dev/nvidia1"
|
||||
"/dev/nvidia2"
|
||||
"/dev/nvidia3"
|
||||
"/dev/nvidia4"
|
||||
"/dev/nvidia-caps/nvidia-cap1"
|
||||
"/dev/nvidia-caps/nvidia-cap2"
|
||||
"/dev/nvidiactl"
|
||||
"/dev/nvidia-modeset"
|
||||
"/dev/nvidia-uvm"
|
||||
"/dev/nvidia-uvm-tools"
|
||||
] else "";
|
||||
DevicePolicy = "closed";
|
||||
LockPersonality = true;
|
||||
MemoryDenyWriteExecute = true;
|
||||
PrivateDevices = true;
|
||||
PrivateUsers = true;
|
||||
ProtectHome = true;
|
||||
ProtectHostname = true;
|
||||
ProtectKernelLogs = true;
|
||||
ProtectKernelModules = true;
|
||||
ProtectKernelTunables = true;
|
||||
ProtectControlGroups = true;
|
||||
ProtectProc = "invisible";
|
||||
ProcSubset = "pid";
|
||||
RestrictAddressFamilies = [
|
||||
"AF_INET"
|
||||
"AF_INET6"
|
||||
"AF_UNIX"
|
||||
];
|
||||
RestrictNamespaces = true;
|
||||
RestrictRealtime = true;
|
||||
SystemCallArchitectures = "native";
|
||||
SystemCallFilter = [
|
||||
"@system-service"
|
||||
"~@privileged"
|
||||
];
|
||||
UMask = "0077";
|
||||
};
|
||||
}) cfg.servers;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,174 @@
|
||||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.services.wyoming.piper;
|
||||
|
||||
inherit (lib)
|
||||
escapeShellArgs
|
||||
mkOption
|
||||
mdDoc
|
||||
mkEnableOption
|
||||
mkPackageOptionMD
|
||||
types
|
||||
;
|
||||
|
||||
inherit (builtins)
|
||||
toString
|
||||
;
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
meta.buildDocsInSandbox = false;
|
||||
|
||||
options.services.wyoming.piper = with types; {
|
||||
package = mkPackageOptionMD pkgs "wyoming-piper" { };
|
||||
|
||||
servers = mkOption {
|
||||
default = {};
|
||||
description = mdDoc ''
|
||||
Attribute set of piper instances to spawn.
|
||||
'';
|
||||
type = types.attrsOf (types.submodule (
|
||||
{ ... }: {
|
||||
options = {
|
||||
enable = mkEnableOption (mdDoc "Wyoming Piper server");
|
||||
|
||||
piper = mkPackageOptionMD pkgs "piper-tts" { };
|
||||
|
||||
voice = mkOption {
|
||||
type = str;
|
||||
example = "en-us-ryan-medium";
|
||||
description = mdDoc ''
|
||||
Name of the voice model to use. See the following website for samples:
|
||||
https://rhasspy.github.io/piper-samples/
|
||||
'';
|
||||
};
|
||||
|
||||
uri = mkOption {
|
||||
type = strMatching "^(tcp|unix)://.*$";
|
||||
example = "tcp://0.0.0.0:10200";
|
||||
description = mdDoc ''
|
||||
URI to bind the wyoming server to.
|
||||
'';
|
||||
};
|
||||
|
||||
speaker = mkOption {
|
||||
type = ints.unsigned;
|
||||
default = 0;
|
||||
description = mdDoc ''
|
||||
ID of a specific speaker in a multi-speaker model.
|
||||
'';
|
||||
apply = toString;
|
||||
};
|
||||
|
||||
noiseScale = mkOption {
|
||||
type = float;
|
||||
default = 0.667;
|
||||
description = mdDoc ''
|
||||
Generator noise value.
|
||||
'';
|
||||
apply = toString;
|
||||
};
|
||||
|
||||
noiseWidth = mkOption {
|
||||
type = float;
|
||||
default = 0.333;
|
||||
description = mdDoc ''
|
||||
Phoneme width noise value.
|
||||
'';
|
||||
apply = toString;
|
||||
};
|
||||
|
||||
lengthScale = mkOption {
|
||||
type = float;
|
||||
default = 1.0;
|
||||
description = mdDoc ''
|
||||
Phoneme length value.
|
||||
'';
|
||||
apply = toString;
|
||||
};
|
||||
|
||||
extraArgs = mkOption {
|
||||
type = listOf str;
|
||||
default = [ ];
|
||||
description = mdDoc ''
|
||||
Extra arguments to pass to the server commandline.
|
||||
'';
|
||||
apply = escapeShellArgs;
|
||||
};
|
||||
};
|
||||
}
|
||||
));
|
||||
};
|
||||
};
|
||||
|
||||
config = let
|
||||
inherit (lib)
|
||||
mapAttrs'
|
||||
mkIf
|
||||
nameValuePair
|
||||
;
|
||||
in mkIf (cfg.servers != {}) {
|
||||
systemd.services = mapAttrs' (server: options:
|
||||
nameValuePair "wyoming-piper-${server}" {
|
||||
description = "Wyoming Piper server instance ${server}";
|
||||
after = [
|
||||
"network-online.target"
|
||||
];
|
||||
wantedBy = [
|
||||
"multi-user.target"
|
||||
];
|
||||
serviceConfig = {
|
||||
DynamicUser = true;
|
||||
User = "wyoming-piper";
|
||||
StateDirectory = "wyoming/piper";
|
||||
# https://github.com/home-assistant/addons/blob/master/piper/rootfs/etc/s6-overlay/s6-rc.d/piper/run
|
||||
ExecStart = ''
|
||||
${cfg.package}/bin/wyoming-piper \
|
||||
--data-dir $STATE_DIRECTORY \
|
||||
--download-dir $STATE_DIRECTORY \
|
||||
--uri ${options.uri} \
|
||||
--piper ${options.piper}/bin/piper \
|
||||
--voice ${options.voice} \
|
||||
--speaker ${options.speaker} \
|
||||
--length-scale ${options.lengthScale} \
|
||||
--noise-scale ${options.noiseScale} \
|
||||
--noise-w ${options.noiseWidth} ${options.extraArgs}
|
||||
'';
|
||||
CapabilityBoundingSet = "";
|
||||
DeviceAllow = "";
|
||||
DevicePolicy = "closed";
|
||||
LockPersonality = true;
|
||||
MemoryDenyWriteExecute = true;
|
||||
PrivateDevices = true;
|
||||
PrivateUsers = true;
|
||||
ProtectHome = true;
|
||||
ProtectHostname = true;
|
||||
ProtectKernelLogs = true;
|
||||
ProtectKernelModules = true;
|
||||
ProtectKernelTunables = true;
|
||||
ProtectControlGroups = true;
|
||||
ProtectProc = "invisible";
|
||||
ProcSubset = "pid";
|
||||
RestrictAddressFamilies = [
|
||||
"AF_INET"
|
||||
"AF_INET6"
|
||||
"AF_UNIX"
|
||||
];
|
||||
RestrictNamespaces = true;
|
||||
RestrictRealtime = true;
|
||||
SystemCallArchitectures = "native";
|
||||
SystemCallFilter = [
|
||||
"@system-service"
|
||||
"~@privileged"
|
||||
];
|
||||
UMask = "0077";
|
||||
};
|
||||
}) cfg.servers;
|
||||
};
|
||||
}
|
||||
@@ -648,7 +648,7 @@ in
|
||||
'';
|
||||
description = lib.mdDoc ''
|
||||
Configuration for Nix, see
|
||||
<https://nixos.org/manual/nix/stable/#sec-conf-file> or
|
||||
<https://nixos.org/manual/nix/stable/command-ref/conf-file.html> or
|
||||
{manpage}`nix.conf(5)` for available options.
|
||||
The value declared here will be translated directly to the key-value pairs Nix expects.
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ let
|
||||
"ipmi"
|
||||
"json"
|
||||
"jitsi"
|
||||
"junos-czerwonk"
|
||||
"kea"
|
||||
"keylight"
|
||||
"knot"
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
{ config, lib, pkgs, options }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.prometheus.exporters.junos-czerwonk;
|
||||
|
||||
configFile = if cfg.configuration != null then configurationFile else (escapeShellArg cfg.configurationFile);
|
||||
|
||||
configurationFile = pkgs.writeText "prometheus-junos-czerwonk-exporter.conf" (builtins.toJSON (cfg.configuration));
|
||||
in
|
||||
{
|
||||
port = 9326;
|
||||
extraOpts = {
|
||||
environmentFile = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = lib.mdDoc ''
|
||||
File containing env-vars to be substituted into the exporter's config.
|
||||
'';
|
||||
};
|
||||
configurationFile = mkOption {
|
||||
type = types.nullOr types.path;
|
||||
default = null;
|
||||
description = lib.mdDoc ''
|
||||
Specify the JunOS exporter configuration file to use.
|
||||
'';
|
||||
};
|
||||
configuration = mkOption {
|
||||
type = types.nullOr types.attrs;
|
||||
default = null;
|
||||
description = lib.mdDoc ''
|
||||
JunOS exporter configuration as nix attribute set. Mutually exclusive with the `configurationFile` option.
|
||||
'';
|
||||
example = {
|
||||
devices = [
|
||||
{
|
||||
host = "router1";
|
||||
key_file = "/path/to/key";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
telemetryPath = mkOption {
|
||||
type = types.str;
|
||||
default = "/metrics";
|
||||
description = lib.mdDoc ''
|
||||
Path under which to expose metrics.
|
||||
'';
|
||||
};
|
||||
};
|
||||
serviceOpts = {
|
||||
serviceConfig = {
|
||||
DynamicUser = false;
|
||||
EnvironmentFile = mkIf (cfg.environmentFile != null) [ cfg.environmentFile ];
|
||||
RuntimeDirectory = "prometheus-junos-czerwonk-exporter";
|
||||
ExecStartPre = [
|
||||
"${pkgs.writeShellScript "subst-secrets-junos-czerwonk-exporter" ''
|
||||
umask 0077
|
||||
${pkgs.envsubst}/bin/envsubst -i ${configFile} -o ''${RUNTIME_DIRECTORY}/junos-exporter.json
|
||||
''}"
|
||||
];
|
||||
ExecStart = ''
|
||||
${pkgs.prometheus-junos-czerwonk-exporter}/bin/junos_exporter \
|
||||
-web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
|
||||
-web.telemetry-path ${cfg.telemetryPath} \
|
||||
-config.file ''${RUNTIME_DIRECTORY}/junos-exporter.json \
|
||||
${concatStringsSep " \\\n " cfg.extraFlags}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -155,7 +155,7 @@ in
|
||||
description = "GNUnet";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
restartTriggers = [ configFile ];
|
||||
restartTriggers = [ config.environment.etc."gnunet.conf".source ];
|
||||
path = [ cfg.package pkgs.miniupnpc ];
|
||||
serviceConfig.ExecStart = "${cfg.package}/lib/gnunet/libexec/gnunet-service-arm -c /etc/gnunet.conf";
|
||||
serviceConfig.User = "gnunet";
|
||||
|
||||
@@ -90,6 +90,9 @@ with lib;
|
||||
serviceConfig = {
|
||||
DynamicUser = true;
|
||||
ExecStart = "${cfg.package}/bin/xray -config ${settingsFile}";
|
||||
CapabilityBoundingSet = "CAP_NET_ADMIN CAP_NET_BIND_SERVICE";
|
||||
AmbientCapabilities = "CAP_NET_ADMIN CAP_NET_BIND_SERVICE";
|
||||
NoNewPrivileges = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -320,6 +320,7 @@ in
|
||||
ProtectHome = false;
|
||||
RestrictAddressFamilies = [ "AF_UNIX" ];
|
||||
TemporaryFileSystem = "/:ro";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
environment.RUST_LOG = "info";
|
||||
};
|
||||
|
||||
@@ -103,6 +103,10 @@ in
|
||||
serviceConfig = {
|
||||
DynamicUser = true;
|
||||
User = "go2rtc";
|
||||
SupplementaryGroups = [
|
||||
# for v4l2 devices
|
||||
"video"
|
||||
];
|
||||
StateDirectory = "go2rtc";
|
||||
ExecStart = "${cfg.package}/bin/go2rtc -config ${configFile}";
|
||||
};
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
# GoToSocial {#module-services-gotosocial}
|
||||
|
||||
[GoToSocial](https://gotosocial.org/) is an ActivityPub social network server, written in Golang.
|
||||
|
||||
## Service configuration {#modules-services-gotosocial-service-configuration}
|
||||
|
||||
The following configuration sets up the PostgreSQL as database backend and binds
|
||||
GoToSocial to `127.0.0.1:8080`, expecting to be run behind a HTTP proxy on `gotosocial.example.com`.
|
||||
|
||||
```nix
|
||||
services.gotosocial = {
|
||||
enable = true;
|
||||
setupPostgresqlDB = true;
|
||||
settings = {
|
||||
application-name = "My GoToSocial";
|
||||
host = "gotosocial.example.com";
|
||||
protocol = "https";
|
||||
bind-address = "127.0.0.1";
|
||||
port = 8080;
|
||||
};
|
||||
};
|
||||
```
|
||||
|
||||
Please refer to the [GoToSocial Documentation](https://docs.gotosocial.org/en/latest/configuration/general/)
|
||||
for additional configuration options.
|
||||
|
||||
## Proxy configuration {#modules-services-gotosocial-proxy-configuration}
|
||||
|
||||
Although it is possible to expose GoToSocial directly, it is common practice to operate it behind an
|
||||
HTTP reverse proxy such as nginx.
|
||||
|
||||
```nix
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
clientMaxBodySize = "40M";
|
||||
virtualHosts = with config.services.gotosocial.settings; {
|
||||
"${host}" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations = {
|
||||
"/" = {
|
||||
recommendedProxySettings = true;
|
||||
proxyWebsockets = true;
|
||||
proxyPass = "http://${bind-address}:${toString port}";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
```
|
||||
|
||||
Please refer to [](#module-security-acme) for details on how to provision an SSL/TLS certificate.
|
||||
|
||||
## User management {#modules-services-gotosocial-user-management}
|
||||
|
||||
After the GoToSocial service is running, the `gotosocial-admin` utility can be used to manage users. In particular an
|
||||
administrative user can be created with
|
||||
|
||||
```ShellSession
|
||||
$ sudo gotosocial-admin account create --username <nickname> --email <email> --password <password>
|
||||
$ sudo gotosocial-admin account confirm --username <nickname>
|
||||
$ sudo gotosocial-admin account promote --username <nickname>
|
||||
```
|
||||
@@ -0,0 +1,173 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.services.gotosocial;
|
||||
settingsFormat = pkgs.formats.yaml { };
|
||||
configFile = settingsFormat.generate "config.yml" cfg.settings;
|
||||
defaultSettings = {
|
||||
application-name = "gotosocial";
|
||||
|
||||
protocol = "https";
|
||||
|
||||
bind-address = "127.0.0.1";
|
||||
port = 8080;
|
||||
|
||||
storage-local-base-path = "/var/lib/gotosocial/storage";
|
||||
|
||||
db-type = "sqlite";
|
||||
db-address = "/var/lib/gotosocial/database.sqlite";
|
||||
};
|
||||
gotosocial-admin = pkgs.writeShellScriptBin "gotosocial-admin" ''
|
||||
exec systemd-run \
|
||||
-u gotosocial-admin.service \
|
||||
-p Group=gotosocial \
|
||||
-p User=gotosocial \
|
||||
-q -t -G --wait --service-type=exec \
|
||||
${cfg.package}/bin/gotosocial --config-path ${configFile} admin "$@"
|
||||
'';
|
||||
in
|
||||
{
|
||||
meta.doc = ./gotosocial.md;
|
||||
meta.maintainers = with lib.maintainers; [ misuzu ];
|
||||
|
||||
options.services.gotosocial = {
|
||||
enable = lib.mkEnableOption (lib.mdDoc "ActivityPub social network server");
|
||||
|
||||
package = lib.mkPackageOptionMD pkgs "gotosocial" { };
|
||||
|
||||
openFirewall = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = lib.mdDoc ''
|
||||
Open the configured port in the firewall.
|
||||
Using a reverse proxy instead is highly recommended.
|
||||
'';
|
||||
};
|
||||
|
||||
setupPostgresqlDB = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = lib.mdDoc ''
|
||||
Whether to setup a local postgres database and populate the
|
||||
`db-type` fields in `services.gotosocial.settings`.
|
||||
'';
|
||||
};
|
||||
|
||||
settings = lib.mkOption {
|
||||
type = settingsFormat.type;
|
||||
default = defaultSettings;
|
||||
example = {
|
||||
application-name = "My GoToSocial";
|
||||
host = "gotosocial.example.com";
|
||||
};
|
||||
description = lib.mdDoc ''
|
||||
Contents of the GoToSocial YAML config.
|
||||
|
||||
Please refer to the
|
||||
[documentation](https://docs.gotosocial.org/en/latest/configuration/)
|
||||
and
|
||||
[example config](https://github.com/superseriousbusiness/gotosocial/blob/main/example/config.yaml).
|
||||
|
||||
Please note that the `host` option cannot be changed later so it is important to configure this correctly before you start GoToSocial.
|
||||
'';
|
||||
};
|
||||
|
||||
environmentFile = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.path;
|
||||
description = lib.mdDoc ''
|
||||
File path containing environment variables for configuring the GoToSocial service
|
||||
in the format of an EnvironmentFile as described by systemd.exec(5).
|
||||
|
||||
This option could be used to pass sensitive configuration to the GoToSocial daemon.
|
||||
|
||||
Please refer to the Environment Variables section in the
|
||||
[documentation](https://docs.gotosocial.org/en/latest/configuration/).
|
||||
'';
|
||||
default = null;
|
||||
example = "/root/nixos/secrets/gotosocial.env";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion = cfg.settings.host or null != null;
|
||||
message = ''
|
||||
You have to define a hostname for GoToSocial (`services.gotosocial.settings.host`), it cannot be changed later without starting over!
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
services.gotosocial.settings = (lib.mapAttrs (name: lib.mkDefault) (
|
||||
defaultSettings // {
|
||||
web-asset-base-dir = "${cfg.package}/share/gotosocial/web/assets/";
|
||||
web-template-base-dir = "${cfg.package}/share/gotosocial/web/template/";
|
||||
}
|
||||
)) // (lib.optionalAttrs cfg.setupPostgresqlDB {
|
||||
db-type = "postgres";
|
||||
db-address = "/run/postgresql";
|
||||
db-database = "gotosocial";
|
||||
db-user = "gotosocial";
|
||||
});
|
||||
|
||||
environment.systemPackages = [ gotosocial-admin ];
|
||||
|
||||
users.groups.gotosocial = { };
|
||||
users.users.gotosocial = {
|
||||
group = "gotosocial";
|
||||
isSystemUser = true;
|
||||
};
|
||||
|
||||
networking.firewall = lib.mkIf cfg.openFirewall {
|
||||
allowedTCPPorts = [ cfg.settings.port ];
|
||||
};
|
||||
|
||||
services.postgresql = lib.mkIf cfg.setupPostgresqlDB {
|
||||
enable = true;
|
||||
ensureDatabases = [ "gotosocial" ];
|
||||
ensureUsers = [
|
||||
{
|
||||
name = "gotosocial";
|
||||
ensurePermissions = {
|
||||
"DATABASE gotosocial" = "ALL PRIVILEGES";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
systemd.services.gotosocial = {
|
||||
description = "ActivityPub social network server";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ]
|
||||
++ lib.optional cfg.setupPostgresqlDB "postgresql.service";
|
||||
requires = lib.optional cfg.setupPostgresqlDB "postgresql.service";
|
||||
restartTriggers = [ configFile ];
|
||||
|
||||
serviceConfig = {
|
||||
EnvironmentFile = lib.mkIf (cfg.environmentFile != null) cfg.environmentFile;
|
||||
ExecStart = "${cfg.package}/bin/gotosocial --config-path ${configFile} server start";
|
||||
Restart = "on-failure";
|
||||
Group = "gotosocial";
|
||||
User = "gotosocial";
|
||||
StateDirectory = "gotosocial";
|
||||
WorkingDirectory = "/var/lib/gotosocial";
|
||||
|
||||
# Security options:
|
||||
# Based on https://github.com/superseriousbusiness/gotosocial/blob/v0.8.1/example/gotosocial.service
|
||||
AmbientCapabilities = lib.optional (cfg.settings.port < 1024) "CAP_NET_BIND_SERVICE";
|
||||
NoNewPrivileges = true;
|
||||
PrivateTmp = true;
|
||||
PrivateDevices = true;
|
||||
RestrictAddressFamilies = "AF_UNIX AF_INET AF_INET6";
|
||||
RestrictNamespaces = true;
|
||||
RestrictRealtime = true;
|
||||
DevicePolicy = "closed";
|
||||
ProtectSystem = "full";
|
||||
ProtectControlGroups = true;
|
||||
ProtectKernelModules = true;
|
||||
ProtectKernelTunables = true;
|
||||
LockPersonality = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -25,6 +25,7 @@ in
|
||||
};
|
||||
|
||||
caddy.enable = mkEnableOption (lib.mdDoc "exposing lemmy with the caddy reverse proxy");
|
||||
nginx.enable = mkEnableOption (lib.mdDoc "exposing lemmy with the nginx reverse proxy");
|
||||
|
||||
database.createLocally = mkEnableOption (lib.mdDoc "creation of database on the instance");
|
||||
|
||||
@@ -140,6 +141,41 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx = mkIf cfg.nginx.enable {
|
||||
enable = mkDefault true;
|
||||
virtualHosts."${cfg.settings.hostname}".locations = let
|
||||
ui = "http://127.0.0.1:${toString cfg.ui.port}";
|
||||
backend = "http://127.0.0.1:${toString cfg.settings.port}";
|
||||
in {
|
||||
"~ ^/(api|pictrs|feeds|nodeinfo|.well-known)" = {
|
||||
# backend requests
|
||||
proxyPass = backend;
|
||||
proxyWebsockets = true;
|
||||
recommendedProxySettings = true;
|
||||
};
|
||||
"/" = {
|
||||
# mixed frontend and backend requests, based on the request headers
|
||||
proxyPass = "$proxpass";
|
||||
recommendedProxySettings = true;
|
||||
extraConfig = ''
|
||||
set $proxpass "${ui}";
|
||||
if ($http_accept = "application/activity+json") {
|
||||
set $proxpass "${backend}";
|
||||
}
|
||||
if ($http_accept = "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"") {
|
||||
set $proxpass "${backend}";
|
||||
}
|
||||
if ($request_method = POST) {
|
||||
set $proxpass "${backend}";
|
||||
}
|
||||
|
||||
# Cuts off the trailing slash on URLs to make them valid
|
||||
rewrite ^(.+)/+$ $1 permanent;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
assertions = [{
|
||||
assertion = cfg.database.createLocally -> cfg.settings.database.host == "localhost" || cfg.settings.database.host == "/run/postgresql";
|
||||
message = "if you want to create the database locally, you need to use a local database";
|
||||
|
||||
@@ -4,7 +4,8 @@ let
|
||||
cfg = config.services.openvscode-server;
|
||||
defaultUser = "openvscode-server";
|
||||
defaultGroup = defaultUser;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
services.openvscode-server = {
|
||||
enable = lib.mkEnableOption (lib.mdDoc "openvscode-server");
|
||||
@@ -126,12 +127,12 @@ in {
|
||||
};
|
||||
|
||||
telemetryLevel = lib.mkOption {
|
||||
default = "off";
|
||||
default = null;
|
||||
example = "crash";
|
||||
description = lib.mdDoc ''
|
||||
Sets the initial telemetry level. Valid levels are: 'off', 'crash', 'error' and 'all'.
|
||||
'';
|
||||
type = lib.types.str;
|
||||
type = lib.types.nullOr (lib.types.enum [ "off" "crash" "error" "all" ]);
|
||||
};
|
||||
|
||||
connectionToken = lib.mkOption {
|
||||
@@ -167,23 +168,23 @@ in {
|
||||
--accept-server-license-terms \
|
||||
--host=${cfg.host} \
|
||||
--port=${toString cfg.port} \
|
||||
'' + lib.optionalString (cfg.telemetryLevel == true) ''
|
||||
--telemetry-level=${cfg.telemetryLevel} \
|
||||
'' + lib.optionalString (cfg.withoutConnectionToken == true) ''
|
||||
--without-connection-token \
|
||||
'' + lib.optionalString (cfg.socketPath != null) ''
|
||||
--socket-path=${cfg.socketPath} \
|
||||
'' + lib.optionalString (cfg.userDataDir != null) ''
|
||||
--user-data-dir=${cfg.userDataDir} \
|
||||
'' + lib.optionalString (cfg.serverDataDir != null) ''
|
||||
--server-data-dir=${cfg.serverDataDir} \
|
||||
'' + lib.optionalString (cfg.extensionsDir != null) ''
|
||||
--extensions-dir=${cfg.extensionsDir} \
|
||||
'' + lib.optionalString (cfg.connectionToken != null) ''
|
||||
--connection-token=${cfg.connectionToken} \
|
||||
'' + lib.optionalString (cfg.connectionTokenFile != null) ''
|
||||
--connection-token-file=${cfg.connectionTokenFile} \
|
||||
'' + lib.escapeShellArgs cfg.extraArguments;
|
||||
'' + lib.optionalString (cfg.telemetryLevel != null) ''
|
||||
--telemetry-level=${cfg.telemetryLevel} \
|
||||
'' + lib.optionalString (cfg.withoutConnectionToken) ''
|
||||
--without-connection-token \
|
||||
'' + lib.optionalString (cfg.socketPath != null) ''
|
||||
--socket-path=${cfg.socketPath} \
|
||||
'' + lib.optionalString (cfg.userDataDir != null) ''
|
||||
--user-data-dir=${cfg.userDataDir} \
|
||||
'' + lib.optionalString (cfg.serverDataDir != null) ''
|
||||
--server-data-dir=${cfg.serverDataDir} \
|
||||
'' + lib.optionalString (cfg.extensionsDir != null) ''
|
||||
--extensions-dir=${cfg.extensionsDir} \
|
||||
'' + lib.optionalString (cfg.connectionToken != null) ''
|
||||
--connection-token=${cfg.connectionToken} \
|
||||
'' + lib.optionalString (cfg.connectionTokenFile != null) ''
|
||||
--connection-token-file=${cfg.connectionTokenFile} \
|
||||
'' + lib.escapeShellArgs cfg.extraArguments;
|
||||
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
||||
RuntimeDirectory = cfg.user;
|
||||
User = cfg.user;
|
||||
|
||||
@@ -356,7 +356,8 @@ in {
|
||||
ExecStart = "${pixelfed-manage}/bin/pixelfed-manage schedule:run";
|
||||
User = user;
|
||||
Group = group;
|
||||
StateDirectory = cfg.dataDir;
|
||||
StateDirectory =
|
||||
lib.mkIf (cfg.dataDir == "/var/lib/pixelfed") "pixelfed";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -391,6 +392,9 @@ in {
|
||||
rsync -av --no-perms ${pixelfed}/storage-static/ ${cfg.dataDir}/storage
|
||||
chmod -R +w ${cfg.dataDir}/storage
|
||||
|
||||
chmod g+x ${cfg.dataDir}/storage ${cfg.dataDir}/storage/app
|
||||
chmod -R g+rX ${cfg.dataDir}/storage/app/public
|
||||
|
||||
# Link the app.php in the runtime folder.
|
||||
# We cannot link the cache folder only because bootstrap folder needs to be writeable.
|
||||
ln -sf ${pixelfed}/bootstrap-static/app.php ${cfg.runtimeDir}/app.php
|
||||
@@ -441,7 +445,7 @@ in {
|
||||
];
|
||||
|
||||
# Enable NGINX to access our phpfpm-socket.
|
||||
users.users."${config.services.nginx.group}".extraGroups = [ cfg.group ];
|
||||
users.users."${config.services.nginx.user}".extraGroups = [ cfg.group ];
|
||||
services.nginx = mkIf (cfg.nginx != null) {
|
||||
enable = true;
|
||||
virtualHosts."${cfg.domain}" = mkMerge [
|
||||
|
||||
@@ -14,7 +14,7 @@ let
|
||||
in
|
||||
''
|
||||
${hostOpts.hostName} ${concatStringsSep " " hostOpts.serverAliases} {
|
||||
bind ${concatStringsSep " " hostOpts.listenAddresses}
|
||||
${optionalString (hostOpts.listenAddresses != [ ]) "bind ${concatStringsSep " " hostOpts.listenAddresses}"}
|
||||
${optionalString (hostOpts.useACMEHost != null) "tls ${sslCertDir}/cert.pem ${sslCertDir}/key.pem"}
|
||||
log {
|
||||
${hostOpts.logFormat}
|
||||
@@ -245,15 +245,23 @@ in
|
||||
};
|
||||
|
||||
acmeCA = mkOption {
|
||||
default = "https://acme-v02.api.letsencrypt.org/directory";
|
||||
example = "https://acme-staging-v02.api.letsencrypt.org/directory";
|
||||
default = null;
|
||||
example = "https://acme-v02.api.letsencrypt.org/directory";
|
||||
type = with types; nullOr str;
|
||||
description = lib.mdDoc ''
|
||||
The URL to the ACME CA's directory. It is strongly recommended to set
|
||||
this to Let's Encrypt's staging endpoint for testing or development.
|
||||
::: {.note}
|
||||
Sets the [`acme_ca` option](https://caddyserver.com/docs/caddyfile/options#acme-ca)
|
||||
in the global options block of the resulting Caddyfile.
|
||||
:::
|
||||
|
||||
Set it to `null` if you want to write a more
|
||||
fine-grained configuration manually.
|
||||
The URL to the ACME CA's directory. It is strongly recommended to set
|
||||
this to `https://acme-staging-v02.api.letsencrypt.org/directory` for
|
||||
Let's Encrypt's [staging endpoint](https://letsencrypt.org/docs/staging-environment/)
|
||||
while testing or in development.
|
||||
|
||||
Value `null` should be prefered for production setups,
|
||||
as it omits the `acme_ca` option to enable
|
||||
[automatic issuer fallback](https://caddyserver.com/docs/automatic-https#issuer-fallback).
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
@@ -3188,7 +3188,19 @@ let
|
||||
|
||||
systemd.contents."/etc/systemd/networkd.conf" = renderConfig cfg.config;
|
||||
|
||||
systemd.services.systemd-networkd.wantedBy = [ "initrd.target" ];
|
||||
systemd.services.systemd-networkd = {
|
||||
wantedBy = [ "initrd.target" ];
|
||||
# These before and conflicts lines can be removed when this PR makes it into a release:
|
||||
# https://github.com/systemd/systemd/pull/27791
|
||||
before = ["initrd-switch-root.target"];
|
||||
conflicts = ["initrd-switch-root.target"];
|
||||
};
|
||||
systemd.sockets.systemd-networkd = {
|
||||
wantedBy = [ "initrd.target" ];
|
||||
before = ["initrd-switch-root.target"];
|
||||
conflicts = ["initrd-switch-root.target"];
|
||||
};
|
||||
|
||||
systemd.services.systemd-network-generator.wantedBy = [ "sysinit.target" ];
|
||||
|
||||
systemd.storePaths = [
|
||||
|
||||
@@ -11,7 +11,7 @@ let
|
||||
(assertOnlyFields [
|
||||
"Boot" "ProcessTwo" "Parameters" "Environment" "User" "WorkingDirectory"
|
||||
"PivotRoot" "Capability" "DropCapability" "NoNewPrivileges" "KillSignal"
|
||||
"Personality" "MachineId" "PrivateUsers" "NotifyReady" "SystemCallFilter"
|
||||
"Personality" "MachineID" "PrivateUsers" "NotifyReady" "SystemCallFilter"
|
||||
"LimitCPU" "LimitFSIZE" "LimitDATA" "LimitSTACK" "LimitCORE" "LimitRSS"
|
||||
"LimitNOFILE" "LimitAS" "LimitNPROC" "LimitMEMLOCK" "LimitLOCKS"
|
||||
"LimitSIGPENDING" "LimitMSGQUEUE" "LimitNICE" "LimitRTPRIO" "LimitRTTIME"
|
||||
|
||||
@@ -263,7 +263,8 @@ let
|
||||
if cfg.useEFIBoot then "efi_bootloading_with_default_fs"
|
||||
else "legacy_bootloading_with_default_fs"
|
||||
else
|
||||
"direct_boot_with_default_fs"
|
||||
if cfg.directBoot.enable then "direct_boot_with_default_fs"
|
||||
else "custom"
|
||||
else
|
||||
"custom";
|
||||
suggestedRootDevice = {
|
||||
@@ -769,6 +770,40 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
virtualisation.directBoot = {
|
||||
enable =
|
||||
mkOption {
|
||||
type = types.bool;
|
||||
default = !cfg.useBootLoader;
|
||||
defaultText = "!cfg.useBootLoader";
|
||||
description =
|
||||
lib.mdDoc ''
|
||||
If enabled, the virtual machine will boot directly into the kernel instead of through a bootloader. Other relevant parameters such as the initrd are also passed to QEMU.
|
||||
|
||||
If you want to test netboot, consider disabling this option.
|
||||
|
||||
This will not boot / reboot correctly into a system that has switched to a different configuration on disk.
|
||||
|
||||
This is enabled by default if you don't enable bootloaders, but you can still enable a bootloader if you need.
|
||||
Read more about this feature: <https://qemu-project.gitlab.io/qemu/system/linuxboot.html>.
|
||||
'';
|
||||
};
|
||||
initrd =
|
||||
mkOption {
|
||||
type = types.str;
|
||||
default = "${config.system.build.initialRamdisk}/${config.system.boot.loader.initrdFile}";
|
||||
defaultText = "\${config.system.build.initialRamdisk}/\${config.system.boot.loader.initrdFile}";
|
||||
description =
|
||||
lib.mdDoc ''
|
||||
In direct boot situations, you may want to influence the initrd to load
|
||||
to use your own customized payload.
|
||||
|
||||
This is useful if you want to test the netboot image without
|
||||
testing the firmware or the loading part.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation.useBootLoader =
|
||||
mkOption {
|
||||
type = types.bool;
|
||||
@@ -895,6 +930,18 @@ in
|
||||
virtualisation.memorySize is above 2047, but qemu is only able to allocate 2047MB RAM on 32bit max.
|
||||
'';
|
||||
}
|
||||
{ assertion = cfg.directBoot.initrd != options.virtualisation.directBoot.initrd.default -> cfg.directBoot.enable;
|
||||
message =
|
||||
''
|
||||
You changed the default of `virtualisation.directBoot.initrd` but you are not
|
||||
using QEMU direct boot. This initrd will not be used in your current
|
||||
boot configuration.
|
||||
|
||||
Either do not mutate `virtualisation.directBoot.initrd` or enable direct boot.
|
||||
|
||||
If you have a more advanced usecase, please open an issue or a pull request.
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
warnings =
|
||||
@@ -915,6 +962,11 @@ in
|
||||
Otherwise, we recommend
|
||||
|
||||
${opt.writableStore} = false;
|
||||
''
|
||||
++ optional (cfg.directBoot.enable && cfg.useBootLoader)
|
||||
''
|
||||
You enabled direct boot and a bootloader, QEMU will not boot your bootloader, rendering
|
||||
`useBootLoader` useless. You might want to disable one of those options.
|
||||
'';
|
||||
|
||||
# In UEFI boot, we use a EFI-only partition table layout, thus GRUB will fail when trying to install
|
||||
@@ -1036,9 +1088,9 @@ in
|
||||
alphaNumericChars = lowerChars ++ upperChars ++ (map toString (range 0 9));
|
||||
# Replace all non-alphanumeric characters with underscores
|
||||
sanitizeShellIdent = s: concatMapStrings (c: if builtins.elem c alphaNumericChars then c else "_") (stringToCharacters s);
|
||||
in mkIf (!cfg.useBootLoader) [
|
||||
in mkIf cfg.directBoot.enable [
|
||||
"-kernel \${NIXPKGS_QEMU_KERNEL_${sanitizeShellIdent config.system.name}:-${config.system.build.toplevel}/kernel}"
|
||||
"-initrd ${config.system.build.toplevel}/initrd"
|
||||
"-initrd ${cfg.directBoot.initrd}"
|
||||
''-append "$(cat ${config.system.build.toplevel}/kernel-params) init=${config.system.build.toplevel}/init regInfo=${regInfo}/registration ${consoles} $QEMU_KERNEL_PARAMS"''
|
||||
])
|
||||
(mkIf cfg.useEFIBoot [
|
||||
|
||||
@@ -306,6 +306,7 @@ in {
|
||||
gonic = handleTest ./gonic.nix {};
|
||||
google-oslogin = handleTest ./google-oslogin {};
|
||||
gotify-server = handleTest ./gotify-server.nix {};
|
||||
gotosocial = runTest ./web-apps/gotosocial.nix;
|
||||
grafana = handleTest ./grafana {};
|
||||
grafana-agent = handleTest ./grafana-agent.nix {};
|
||||
graphite = handleTest ./graphite.nix {};
|
||||
@@ -744,6 +745,7 @@ in {
|
||||
systemd-networkd-vrf = handleTest ./systemd-networkd-vrf.nix {};
|
||||
systemd-no-tainted = handleTest ./systemd-no-tainted.nix {};
|
||||
systemd-nspawn = handleTest ./systemd-nspawn.nix {};
|
||||
systemd-nspawn-configfile = handleTest ./systemd-nspawn-configfile.nix {};
|
||||
systemd-oomd = handleTest ./systemd-oomd.nix {};
|
||||
systemd-portabled = handleTest ./systemd-portabled.nix {};
|
||||
systemd-repart = handleTest ./systemd-repart.nix {};
|
||||
|
||||
@@ -46,7 +46,7 @@ import ./make-test-python.nix ({ pkgs, lib, ...} :
|
||||
type = "custom";
|
||||
status = {
|
||||
source = "script";
|
||||
cmd = "/bin/sh -c 'echo charger status F'";
|
||||
cmd = "/bin/sh -c 'echo charger status A'";
|
||||
};
|
||||
enabled = {
|
||||
source = "script";
|
||||
|
||||
+43
-1
@@ -2,6 +2,10 @@ import ./make-test-python.nix ({ pkgs, ... }:
|
||||
let
|
||||
certs = import ./common/acme/server/snakeoil-certs.nix;
|
||||
serverDomain = certs.domain;
|
||||
|
||||
testCredentials = {
|
||||
password = "Password1_cZPEwpCWvrReripJmAZdmVIZd8HHoHcl";
|
||||
};
|
||||
in
|
||||
{
|
||||
name = "kanidm";
|
||||
@@ -73,17 +77,55 @@ import ./make-test-python.nix ({ pkgs, ... }:
|
||||
with subtest("Test CLI login"):
|
||||
client.succeed("kanidm login -D anonymous")
|
||||
client.succeed("kanidm self whoami | grep anonymous@${serverDomain}")
|
||||
client.succeed("kanidm logout")
|
||||
|
||||
with subtest("Recover idm_admin account"):
|
||||
# Must stop the server for account recovery or else kanidmd fails with
|
||||
# "unable to lock kanidm exclusive lock at /var/lib/kanidm/kanidm.db.klock".
|
||||
server.succeed("systemctl stop kanidm")
|
||||
server.succeed("su - kanidm -c 'kanidmd recover-account -c ${serverConfigFile} idm_admin 2>&1 | rg -o \'[A-Za-z0-9]{48}\' '")
|
||||
idm_admin_password = server.succeed("su - kanidm -c 'kanidmd recover-account -c ${serverConfigFile} idm_admin 2>&1 | rg -o \'[A-Za-z0-9]{48}\' '").strip().removeprefix("'").removesuffix("'")
|
||||
server.succeed("systemctl start kanidm")
|
||||
|
||||
with subtest("Test unixd connection"):
|
||||
client.wait_for_unit("kanidm-unixd.service")
|
||||
# TODO: client.wait_for_file("/run/kanidm-unixd/sock")
|
||||
client.wait_until_succeeds("kanidm-unix status | grep working!")
|
||||
|
||||
with subtest("Test user creation"):
|
||||
client.wait_for_unit("getty@tty1.service")
|
||||
client.wait_until_succeeds("pgrep -f 'agetty.*tty1'")
|
||||
client.wait_until_tty_matches("1", "login: ")
|
||||
client.send_chars("root\n")
|
||||
client.send_chars("kanidm login -D idm_admin\n")
|
||||
client.wait_until_tty_matches("1", "Enter password: ")
|
||||
client.send_chars(f"{idm_admin_password}\n")
|
||||
client.wait_until_tty_matches("1", "Login Success for idm_admin")
|
||||
client.succeed("kanidm person create testuser TestUser")
|
||||
client.succeed("kanidm person posix set --shell \"$SHELL\" testuser")
|
||||
client.send_chars("kanidm person posix set-password testuser\n")
|
||||
client.wait_until_tty_matches("1", "Enter new")
|
||||
client.send_chars("${testCredentials.password}\n")
|
||||
client.wait_until_tty_matches("1", "Retype")
|
||||
client.send_chars("${testCredentials.password}\n")
|
||||
output = client.succeed("getent passwd testuser")
|
||||
assert "TestUser" in output
|
||||
client.succeed("kanidm group create shell")
|
||||
client.succeed("kanidm group posix set shell")
|
||||
client.succeed("kanidm group add-members shell testuser")
|
||||
|
||||
with subtest("Test user login"):
|
||||
client.send_key("alt-f2")
|
||||
client.wait_until_succeeds("[ $(fgconsole) = 2 ]")
|
||||
client.wait_for_unit("getty@tty2.service")
|
||||
client.wait_until_succeeds("pgrep -f 'agetty.*tty2'")
|
||||
client.wait_until_tty_matches("2", "login: ")
|
||||
client.send_chars("testuser\n")
|
||||
client.wait_until_tty_matches("2", "login: testuser")
|
||||
client.wait_until_succeeds("pgrep login")
|
||||
client.wait_until_tty_matches("2", "Password: ")
|
||||
client.send_chars("${testCredentials.password}\n")
|
||||
client.wait_until_succeeds("systemctl is-active user@$(id -u testuser).service")
|
||||
client.send_chars("touch done\n")
|
||||
client.wait_for_file("/home/testuser@${serverDomain}/done")
|
||||
'';
|
||||
})
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
, config ? { }
|
||||
, pkgs ? import ../../.. { inherit system config; }
|
||||
, lib ? pkgs.lib
|
||||
, kernelVersionsToTest ? [ "4.19" "5.4" "5.10" "5.15" "latest" ]
|
||||
, kernelVersionsToTest ? [ "4.19" "5.4" "5.10" "5.15" "6.1" "latest" ]
|
||||
}:
|
||||
|
||||
# For quickly running a test, the nixosTests.lvm2.lvm-thinpool-linux-latest attribute is recommended
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ kernelPackages ? null }:
|
||||
import ../make-test-python.nix ({ pkgs, ... }: {
|
||||
import ../make-test-python.nix ({ pkgs, lib, ... }: {
|
||||
name = "lvm2-thinpool";
|
||||
meta.maintainers = with pkgs.lib.maintainers; [ ajs124 ];
|
||||
|
||||
@@ -17,11 +17,13 @@ import ../make-test-python.nix ({ pkgs, ... }: {
|
||||
boot = lib.mkIf (kernelPackages != null) { inherit kernelPackages; };
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
testScript = let
|
||||
mkXfsFlags = lib.optionalString (lib.versionOlder kernelPackages.kernel.version "5.10") "-m bigtime=0 -m inobtcount=0";
|
||||
in ''
|
||||
machine.succeed("vgcreate test_vg /dev/vdb")
|
||||
machine.succeed("lvcreate -L 512M -T test_vg/test_thin_pool")
|
||||
machine.succeed("lvcreate -n test_lv -V 16G --thinpool test_thin_pool test_vg")
|
||||
machine.succeed("mkfs.xfs /dev/test_vg/test_lv")
|
||||
machine.succeed("mkfs.xfs ${mkXfsFlags} /dev/test_vg/test_lv")
|
||||
machine.succeed("mkdir /mnt; mount /dev/test_vg/test_lv /mnt")
|
||||
assert "/dev/mapper/test_vg-test_lv" == machine.succeed("findmnt -no SOURCE /mnt").strip()
|
||||
machine.succeed("dd if=/dev/zero of=/mnt/empty.file bs=1M count=1024")
|
||||
|
||||
@@ -41,10 +41,10 @@ let
|
||||
in {
|
||||
matomo = matomoTest pkgs.matomo // {
|
||||
name = "matomo";
|
||||
meta.maintainers = with maintainers; [ florianjacob kiwi mmilata ];
|
||||
meta.maintainers = with maintainers; [ florianjacob kiwi mmilata twey boozedog ];
|
||||
};
|
||||
matomo-beta = matomoTest pkgs.matomo-beta // {
|
||||
name = "matomo-beta";
|
||||
meta.maintainers = with maintainers; [ florianjacob kiwi mmilata ];
|
||||
meta.maintainers = with maintainers; [ florianjacob kiwi mmilata twey boozedog ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -14,22 +14,11 @@ import ./make-test-python.nix ({ pkgs, ... }: {
|
||||
connect-timeout = 1;
|
||||
};
|
||||
|
||||
system.extraDependencies = with pkgs; [
|
||||
curl
|
||||
desktop-file-utils
|
||||
docbook5
|
||||
docbook_xsl_ns
|
||||
grub2
|
||||
kmod.dev
|
||||
libarchive
|
||||
libarchive.dev
|
||||
libxml2.bin
|
||||
libxslt.bin
|
||||
python3Minimal
|
||||
shared-mime-info
|
||||
stdenv
|
||||
sudo
|
||||
xorg.lndir
|
||||
system.includeBuildDependencies = true;
|
||||
|
||||
system.extraDependencies = [
|
||||
# Not part of the initial build apparently?
|
||||
pkgs.grub2
|
||||
];
|
||||
|
||||
virtualisation = {
|
||||
|
||||
@@ -207,11 +207,17 @@ in
|
||||
nodes = {
|
||||
inherit common;
|
||||
|
||||
machine = { pkgs, ... }: {
|
||||
machine = { pkgs, nodes, ... }: {
|
||||
imports = [ common ];
|
||||
boot.loader.systemd-boot.extraFiles = {
|
||||
"efi/fruits/tomato.efi" = pkgs.netbootxyz-efi;
|
||||
};
|
||||
|
||||
# These are configs for different nodes, but we'll use them here in `machine`
|
||||
system.extraDependencies = [
|
||||
nodes.common.system.build.toplevel
|
||||
nodes.with_netbootxyz.system.build.toplevel
|
||||
];
|
||||
};
|
||||
|
||||
with_netbootxyz = { pkgs, ... }: {
|
||||
@@ -221,9 +227,9 @@ in
|
||||
};
|
||||
|
||||
testScript = { nodes, ... }: let
|
||||
originalSystem = nodes.machine.config.system.build.toplevel;
|
||||
baseSystem = nodes.common.config.system.build.toplevel;
|
||||
finalSystem = nodes.with_netbootxyz.config.system.build.toplevel;
|
||||
originalSystem = nodes.machine.system.build.toplevel;
|
||||
baseSystem = nodes.common.system.build.toplevel;
|
||||
finalSystem = nodes.with_netbootxyz.system.build.toplevel;
|
||||
in ''
|
||||
machine.succeed("test -e /boot/efi/fruits/tomato.efi")
|
||||
machine.succeed("test -e /boot/efi/nixos/.extra-files/efi/fruits/tomato.efi")
|
||||
|
||||
@@ -12,6 +12,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
|
||||
systemd.services.check-flush = {
|
||||
requiredBy = ["multi-user.target"];
|
||||
before = ["network-pre.target" "multi-user.target"];
|
||||
wants = ["network-pre.target"];
|
||||
unitConfig.DefaultDependencies = false;
|
||||
serviceConfig.Type = "oneshot";
|
||||
path = [ pkgs.iproute2 pkgs.iputils pkgs.gnugrep ];
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
import ./make-test-python.nix ({ lib, ... }:
|
||||
let
|
||||
execOptions = [
|
||||
"Boot"
|
||||
"ProcessTwo"
|
||||
"Parameters"
|
||||
"Environment"
|
||||
"User"
|
||||
"WorkingDirectory"
|
||||
"PivotRoot"
|
||||
"Capability"
|
||||
"DropCapability"
|
||||
"NoNewPrivileges"
|
||||
"KillSignal"
|
||||
"Personality"
|
||||
"MachineID"
|
||||
"PrivateUsers"
|
||||
"NotifyReady"
|
||||
"SystemCallFilter"
|
||||
"LimitCPU"
|
||||
"LimitFSIZE"
|
||||
"LimitDATA"
|
||||
"LimitSTACK"
|
||||
"LimitCORE"
|
||||
"LimitRSS"
|
||||
"LimitNOFILE"
|
||||
"LimitAS"
|
||||
"LimitNPROC"
|
||||
"LimitMEMLOCK"
|
||||
"LimitLOCKS"
|
||||
"LimitSIGPENDING"
|
||||
"LimitMSGQUEUE"
|
||||
"LimitNICE"
|
||||
"LimitRTPRIO"
|
||||
"LimitRTTIME"
|
||||
"OOMScoreAdjust"
|
||||
"CPUAffinity"
|
||||
"Hostname"
|
||||
"ResolvConf"
|
||||
"Timezone"
|
||||
"LinkJournal"
|
||||
"Ephemeral"
|
||||
"AmbientCapability"
|
||||
];
|
||||
|
||||
filesOptions = [
|
||||
"ReadOnly"
|
||||
"Volatile"
|
||||
"Bind"
|
||||
"BindReadOnly"
|
||||
"TemporaryFileSystem"
|
||||
"Overlay"
|
||||
"OverlayReadOnly"
|
||||
"PrivateUsersChown"
|
||||
"BindUser"
|
||||
"Inaccessible"
|
||||
"PrivateUsersOwnership"
|
||||
];
|
||||
|
||||
networkOptions = [
|
||||
"Private"
|
||||
"VirtualEthernet"
|
||||
"VirtualEthernetExtra"
|
||||
"Interface"
|
||||
"MACVLAN"
|
||||
"IPVLAN"
|
||||
"Bridge"
|
||||
"Zone"
|
||||
"Port"
|
||||
];
|
||||
|
||||
optionsToConfig = opts: builtins.listToAttrs (map (n: lib.nameValuePair n "testdata") opts);
|
||||
|
||||
grepForOptions = opts: ''node.succeed(
|
||||
"for o in ${builtins.concatStringsSep " " opts} ; do grep --quiet $o ${configFile} || exit 1 ; done"
|
||||
)'';
|
||||
|
||||
unitName = "options-test";
|
||||
configFile = "/etc/systemd/nspawn/${unitName}.nspawn";
|
||||
|
||||
in
|
||||
{
|
||||
name = "systemd-nspawn-configfile";
|
||||
|
||||
nodes = {
|
||||
node = { pkgs, ... }: {
|
||||
systemd.nspawn."${unitName}" = {
|
||||
enable = true;
|
||||
|
||||
execConfig = optionsToConfig execOptions // {
|
||||
Boot = true;
|
||||
ProcessTwo = true;
|
||||
NotifyReady = true;
|
||||
};
|
||||
|
||||
filesConfig = optionsToConfig filesOptions // {
|
||||
ReadOnly = true;
|
||||
Volatile = "state";
|
||||
PrivateUsersChown = true;
|
||||
PrivateUsersOwnership = "auto";
|
||||
};
|
||||
|
||||
networkConfig = optionsToConfig networkOptions // {
|
||||
Private = true;
|
||||
VirtualEthernet = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
start_all()
|
||||
|
||||
node.wait_for_file("${configFile}")
|
||||
|
||||
with subtest("Test for presence of all specified options in config file"):
|
||||
${grepForOptions execOptions}
|
||||
${grepForOptions filesOptions}
|
||||
${grepForOptions networkOptions}
|
||||
|
||||
with subtest("Test for absence of misspelled option 'MachineId' (instead of 'MachineID')"):
|
||||
node.fail("grep --quiet MachineId ${configFile}")
|
||||
'';
|
||||
|
||||
meta.maintainers = [
|
||||
lib.maintainers.zi3m5f
|
||||
];
|
||||
})
|
||||
@@ -0,0 +1,28 @@
|
||||
{ lib, ... }:
|
||||
{
|
||||
name = "gotosocial";
|
||||
meta.maintainers = with lib.maintainers; [ misuzu ];
|
||||
|
||||
nodes.machine = { pkgs, ... }: {
|
||||
environment.systemPackages = [ pkgs.jq ];
|
||||
services.gotosocial = {
|
||||
enable = true;
|
||||
setupPostgresqlDB = true;
|
||||
settings = {
|
||||
host = "localhost:8081";
|
||||
port = 8081;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
machine.wait_for_unit("gotosocial.service")
|
||||
machine.wait_for_unit("postgresql.service")
|
||||
machine.wait_for_open_port(8081)
|
||||
|
||||
# check user registration via cli
|
||||
machine.succeed("curl -sS -f http://localhost:8081/nodeinfo/2.0 | jq '.usage.users.total' | grep -q '^0$'")
|
||||
machine.succeed("gotosocial-admin account create --username nickname --email email@example.com --password kurtz575VPeBgjVm")
|
||||
machine.succeed("curl -sS -f http://localhost:8081/nodeinfo/2.0 | jq '.usage.users.total' | grep -q '^1$'")
|
||||
'';
|
||||
}
|
||||
@@ -61,13 +61,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "audacity";
|
||||
version = "3.3.2";
|
||||
version = "3.3.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = "Audacity-${version}";
|
||||
hash = "sha256-/DjTmanPzkShNoMFNbnQzzwEzk/a2uUYvVW9dsvl5uY=";
|
||||
hash = "sha256-m38Awdv2ew+MKqd68x/ZsRBwidM2KJ3BRykIKgnFSx4=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
{ lib, stdenv, fetchurl, alsa-lib, fftw, fftwFloat, flex, libjack2 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "brutefir";
|
||||
version = "1.0o";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://torger.se/anders/files/brutefir-${version}.tar.gz";
|
||||
sha256 = "caae4a933b53b55b29d6cb7e2803e20819f31def6d0e4e12f9a48351e6dbbe9f";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ flex ];
|
||||
|
||||
buildInputs = [
|
||||
alsa-lib
|
||||
fftw
|
||||
fftwFloat
|
||||
libjack2
|
||||
];
|
||||
|
||||
postPatch = "substituteInPlace bfconf.c --replace /usr/local $out";
|
||||
|
||||
installFlags = [ "INSTALL_PREFIX=$(out)" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://torger.se/anders/brutefir.html";
|
||||
description = "A software convolution engine";
|
||||
license = licenses.gpl2Only;
|
||||
maintainers = with maintainers; [ auchter ];
|
||||
platforms = [ "x86_64-linux" "i686-linux" ];
|
||||
};
|
||||
}
|
||||
@@ -9,13 +9,13 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "go-musicfox";
|
||||
version = "4.1.1";
|
||||
version = "4.1.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "go-musicfox";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-A1+JDMT4mHUi10GE4/qV5IMuwNsm4EdBt9VC2ZvJzuU=";
|
||||
hash = "sha256-ushJZKZPIUo6IO33E9A/CneLHHrE6MtdwpCYR4ivHmo=";
|
||||
};
|
||||
|
||||
deleteVendor = true;
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "hydrogen";
|
||||
version = "1.1.1";
|
||||
version = "1.2.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hydrogen-music";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-to24PB9cs4vun93uXEWNVsmSLFRuLGfC4hCh7+mbvIo=";
|
||||
sha256 = "sha256-09zN6OVqVohk153gqXy6C0uHcBhZX2JJL4d6f4BU4Lg=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ];
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
{ lib
|
||||
, desktop-file-utils
|
||||
, fetchFromGitHub
|
||||
, fetchYarnDeps
|
||||
, fixup_yarn_lock
|
||||
, gjs
|
||||
, glib-networking
|
||||
, gobject-introspection
|
||||
, gst_all_1
|
||||
, gtk4
|
||||
, libadwaita
|
||||
, libsoup_3
|
||||
, meson
|
||||
, ninja
|
||||
, pkg-config
|
||||
, stdenv
|
||||
, wrapGAppsHook4
|
||||
, yarn
|
||||
, nodejs
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "muzika";
|
||||
version = "unstable-2023-06-07";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "vixalien";
|
||||
repo = "muzika";
|
||||
rev = "d0ca7eebad67082e73513ebd7ca04edb1fdec7ce";
|
||||
hash = "sha256-ycnHpyYaUJZgproTLCWCVzsvnUisXlq3fqlij1KryWA=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
desktop-file-utils
|
||||
gobject-introspection
|
||||
meson
|
||||
ninja
|
||||
nodejs
|
||||
pkg-config
|
||||
wrapGAppsHook4
|
||||
yarn
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gjs
|
||||
glib-networking
|
||||
gst_all_1.gst-plugins-base
|
||||
gst_all_1.gst-plugins-good
|
||||
gst_all_1.gst-plugins-bad
|
||||
gtk4
|
||||
libadwaita
|
||||
libsoup_3
|
||||
];
|
||||
|
||||
yarnOfflineCache = fetchYarnDeps {
|
||||
yarnLock = src + "/yarn.lock";
|
||||
hash = "sha256-FvPEbYIydgfyKKsf2jnXUbPEhIboPi3wR7BWzEuo72Q=";
|
||||
};
|
||||
|
||||
preConfigure = ''
|
||||
export HOME="$PWD"
|
||||
yarn config --offline set yarn-offline-mirror $yarnOfflineCache
|
||||
${fixup_yarn_lock}/bin/fixup_yarn_lock yarn.lock
|
||||
'';
|
||||
|
||||
mesonFlags = [
|
||||
"-Dyarnrc=../.yarnrc"
|
||||
];
|
||||
|
||||
postFixup = ''
|
||||
sed -i "1 a imports.package._findEffectiveEntryPointName = () => 'com.vixalien.muzika';" $out/bin/.com.vixalien.muzika-wrapped
|
||||
ln -s $out/bin/com.vixalien.muzika $out/bin/muzika
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Elegant music streaming app";
|
||||
homepage = "https://github.com/vixalien/muzika";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ onny ];
|
||||
};
|
||||
}
|
||||
@@ -16,13 +16,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "mympd";
|
||||
version = "10.3.2";
|
||||
version = "10.3.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jcorporation";
|
||||
repo = "myMPD";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-VnV0jZp2ymsZkVIDBYXHhJTR10CZ74wutue1GTGQtxI=";
|
||||
sha256 = "sha256-LqIaRFAXB3XMidC1Dypax/ucayot/IJPAvPwzHQeH9k=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@@ -16,16 +16,16 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "ncspot";
|
||||
version = "0.13.2";
|
||||
version = "0.13.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hrkfdn";
|
||||
repo = "ncspot";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-DdJa4ax/v86OgO+IAsiFA8/u6pEGcCw+N/3MLXzz8DM=";
|
||||
hash = "sha256-AXe/ysNYSWC4cuzvN4fLmDyeBxpzciDo8PFjXdzFMl0=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-HkpFboXgHbJMYJFabJ58Syy1ag+InwqkeJAw8MxAr0A=";
|
||||
cargoHash = "sha256-y7Vaf4jp2Zds0KsYqF0JBWsbq9IQVu6n0TMo3oGL14A=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ]
|
||||
++ lib.optional withClipboard python3;
|
||||
@@ -56,6 +56,7 @@ rustPlatform.buildRustPackage rec {
|
||||
meta = with lib; {
|
||||
description = "Cross-platform ncurses Spotify client written in Rust, inspired by ncmpc and the likes";
|
||||
homepage = "https://github.com/hrkfdn/ncspot";
|
||||
changelog = "https://github.com/hrkfdn/ncspot/releases/tag/v${version}";
|
||||
license = licenses.bsd2;
|
||||
maintainers = [ maintainers.marsam ];
|
||||
};
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
buildNpmPackage rec {
|
||||
pname = "open-stage-control";
|
||||
version = "1.25.0";
|
||||
version = "1.25.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jean-emmanuel";
|
||||
repo = "open-stage-control";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-HbJFxgY/xba6X73TK40xXyLZiIxv1Ku/sVAekjApYFg=";
|
||||
hash = "sha256-mbd+fknSzokFt5dPlZrZIpDox/NzMbvyFp2fNPelv3c=";
|
||||
};
|
||||
|
||||
# Remove some Electron stuff from package.json
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "sidplayfp";
|
||||
version = "2.4.1";
|
||||
version = "2.5.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "libsidplayfp";
|
||||
repo = "sidplayfp";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-15KG+LkPkCLFsnWHUAQpQbqol/izAn/HRinszVRB5Ao=";
|
||||
sha256 = "sha256-ECHtHJrkJ5Y0YvDNdMM3VB+s7I/8JCPZiwsPYLM/oig=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook perl pkg-config ];
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "snd";
|
||||
version = "23.3";
|
||||
version = "23.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/snd/snd-${version}.tar.gz";
|
||||
sha256 = "sha256-YuvTgpa006n+WlQHEtVRfoJl7IBoyevzURz0Suis5sE=";
|
||||
sha256 = "sha256-1D/j/im1Xlx689k8zgnaRzJJYWHNviVhxyVzmLlfJps=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{ lib
|
||||
, fetchFromGitLab
|
||||
, fetchFromGitHub
|
||||
, python3
|
||||
, gobject-introspection
|
||||
@@ -33,37 +32,24 @@ let
|
||||
in
|
||||
python.pkgs.buildPythonApplication rec {
|
||||
pname = "sublime-music";
|
||||
version = "0.11.16";
|
||||
format = "pyproject";
|
||||
version = "0.12.0";
|
||||
format = "flit";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
src = fetchFromGitHub {
|
||||
owner = "sublime-music";
|
||||
repo = pname;
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-n77mTgElwwFaX3WQL8tZzbkPwnsyQ08OW9imSOjpBlg=";
|
||||
hash = "sha256-FPzeFqDOcaiariz7qJwz6P3Wd+ZDxNP57uj+ptMtEyM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
gobject-introspection
|
||||
wrapGAppsHook
|
||||
] ++ (with python.pkgs; [
|
||||
poetry-core
|
||||
pythonRelaxDepsHook
|
||||
]);
|
||||
|
||||
# Can be removed in later versions (probably > 0.11.16)
|
||||
pythonRelaxDeps = [
|
||||
"deepdiff"
|
||||
"python-mpv"
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
sed -i "/--cov/d" setup.cfg
|
||||
sed -i "/--no-cov-on-fail/d" setup.cfg
|
||||
# https://github.com/sublime-music/sublime-music/pull/370
|
||||
# Can be removed in later versions (probably > 0.11.16)
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace 'python-Levenshtein = "^0.12.0"' 'Levenshtein = ">0.12.0"'
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
@@ -76,20 +62,20 @@ python.pkgs.buildPythonApplication rec {
|
||||
|
||||
propagatedBuildInputs = with python.pkgs; [
|
||||
bleach
|
||||
bottle
|
||||
dataclasses-json
|
||||
deepdiff
|
||||
fuzzywuzzy
|
||||
levenshtein
|
||||
mpv
|
||||
peewee
|
||||
pychromecast
|
||||
pygobject3
|
||||
levenshtein
|
||||
python-dateutil
|
||||
requests
|
||||
semver
|
||||
thefuzz
|
||||
]
|
||||
++ lib.optional chromecastSupport pychromecast
|
||||
++ lib.optional keyringSupport keyring
|
||||
++ lib.optional serverSupport bottle
|
||||
;
|
||||
|
||||
nativeCheckInputs = with python.pkgs; [
|
||||
|
||||
@@ -23,15 +23,15 @@
|
||||
, withDiscordRPC ? false
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "tauon";
|
||||
version = "7.6.4";
|
||||
version = "7.6.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Taiko2k";
|
||||
repo = "TauonMusicBox";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-xMUQ2LabxuvCdd7dsoXPN3tjkDxfXIQ8UrJcsGQ+EEU=";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-+K+sX6JbVB7qCRlwlIHMHFR76GwZZrHFh6Jjn8xlMmg=";
|
||||
};
|
||||
|
||||
postUnpack = ''
|
||||
@@ -133,9 +133,9 @@ stdenv.mkDerivation rec {
|
||||
meta = with lib; {
|
||||
description = "The Linux desktop music player from the future";
|
||||
homepage = "https://tauonmusicbox.rocks/";
|
||||
changelog = "https://github.com/Taiko2k/TauonMusicBox/releases/tag/v${version}";
|
||||
changelog = "https://github.com/Taiko2k/TauonMusicBox/releases/tag/v${finalAttrs.version}";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ jansol ];
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, gettext
|
||||
, help2man
|
||||
, meson
|
||||
, ninja
|
||||
, pkg-config
|
||||
, vala
|
||||
, which
|
||||
, gtk3
|
||||
, json-glib
|
||||
, libgee
|
||||
@@ -15,13 +17,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "timeshift";
|
||||
version = "22.11.2";
|
||||
version = "23.06.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "linuxmint";
|
||||
repo = "timeshift";
|
||||
rev = version;
|
||||
sha256 = "yZNERRoNZ1K7BRiAu7sqVQyhghsS/AeZSODMVSm46oY=";
|
||||
sha256 = "epj0oaV+4lebRxcj6MQ2+lJ3juv9JZ+2UPLRc6UisX4=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
@@ -29,6 +31,8 @@ stdenv.mkDerivation rec {
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace ./files/meson.build \
|
||||
--replace "/etc/timeshift" "$out/etc/timeshift"
|
||||
while IFS="" read -r -d $'\0' FILE; do
|
||||
substituteInPlace "$FILE" \
|
||||
--replace "/sbin/blkid" "${util-linux}/bin/blkid"
|
||||
@@ -42,9 +46,11 @@ stdenv.mkDerivation rec {
|
||||
|
||||
nativeBuildInputs = [
|
||||
gettext
|
||||
help2man
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
vala
|
||||
which
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
@@ -55,14 +61,6 @@ stdenv.mkDerivation rec {
|
||||
xapp
|
||||
];
|
||||
|
||||
preBuild = ''
|
||||
makeFlagsArray+=( \
|
||||
"-C" "src" \
|
||||
"prefix=$out" \
|
||||
"sysconfdir=$out/etc" \
|
||||
)
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A system restore tool for Linux";
|
||||
longDescription = ''
|
||||
@@ -70,7 +68,7 @@ stdenv.mkDerivation rec {
|
||||
Snapshots can be restored using TimeShift installed on the system or from Live CD or USB.
|
||||
'';
|
||||
homepage = "https://github.com/linuxmint/timeshift";
|
||||
license = licenses.gpl3;
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ ShamrockLee bobby285271 ];
|
||||
};
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "besu";
|
||||
version = "23.4.0";
|
||||
version = "23.4.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://hyperledger.jfrog.io/artifactory/${pname}-binaries/${pname}/${version}/${pname}-${version}.tar.gz";
|
||||
sha256 = "sha256-ghaVsyVcn2RvTVJ+N0IZyWQW9JgjFSDy7sK+vtxT9aA=";
|
||||
sha256 = "sha256-SdOnoGnK4wdJcJPYNPhzzngEpG3VkgfV6DIUWVMtMY4=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
|
||||
buildDotnetModule rec {
|
||||
pname = "btcpayserver";
|
||||
version = "1.10.1";
|
||||
version = "1.10.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-3FbrNSwVNrxf++7C23XSWmeTfTRP56/7QeQOlggVpao=";
|
||||
sha256 = "sha256-HZlH2FoBPJXbynOUfAGgrI1nq6qpIjBSjMBi6Oq1MdE=";
|
||||
};
|
||||
|
||||
projectFile = "BTCPayServer/BTCPayServer.csproj";
|
||||
|
||||
@@ -22,11 +22,11 @@ let
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "clightning";
|
||||
version = "23.05";
|
||||
version = "23.05.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/ElementsProject/lightning/releases/download/v${version}/clightning-v${version}.zip";
|
||||
sha256 = "sha256-6QbgK16godxnpIBHpykbblS10JAFZvxSeEpwnmdTrAo=";
|
||||
sha256 = "sha256-q0ZPsuvDgXbhxebBIRkGTE7sH7K6c96Iu6RqeBT3NEk=";
|
||||
};
|
||||
|
||||
# when building on darwin we need dawin.cctools to provide the correct libtool
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ergo";
|
||||
version = "5.0.10";
|
||||
version = "5.0.11";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/ergoplatform/ergo/releases/download/v${version}/ergo-${version}.jar";
|
||||
sha256 = "sha256-T1+xQtXbLyfiV1IAeIiqzIFt1UZuctIkyNGzRc8E+zM=";
|
||||
sha256 = "sha256-diaNhqDtfFtDFIqwfv+wmeMVHeN+t4Q/KDRhVwXw14g=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
let
|
||||
pname = "erigon";
|
||||
version = "2.43.0";
|
||||
version = "2.45.1";
|
||||
in
|
||||
buildGoModule {
|
||||
inherit pname version;
|
||||
@@ -11,11 +11,11 @@ buildGoModule {
|
||||
owner = "ledgerwatch";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-3o7vu2bA8lB1CiVaSF6YU9WjwNliQAK5AcGl82GCqFg=";
|
||||
sha256 = "sha256-uaEGshpAmCXIIcpN5Fx/VNUK8DgQp9yFm2xBDGz7FNo=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-JhMefeUxo9ksyCnNsLgAhGG0Ix7kxCA/cYyiELd0H64=";
|
||||
vendorSha256 = "sha256-Yd78OW48HsOgxT5R3QT6/xDzPsRNFRE2nKocljTKKBA=";
|
||||
proxyVendor = true;
|
||||
|
||||
# Build errors in mdbx when format hardening is enabled:
|
||||
|
||||
@@ -32,13 +32,13 @@ let
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = if withGui then "groestlcoin" else "groestlcoind";
|
||||
version = "24.0.1";
|
||||
version = "25.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Groestlcoin";
|
||||
repo = "groestlcoin";
|
||||
rev = "v${version}";
|
||||
sha256 = "0k14y3iv5l26r820wzkwqxi67kwh26i0yq20ffd72shicjs1d3qc";
|
||||
sha256 = "03w5n3qjha63mgj7zk8q17x5j63la3i4li7bf5i1yw59ijqpmnqg";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook pkg-config ]
|
||||
|
||||
@@ -25,6 +25,5 @@ buildGoModule rec {
|
||||
homepage = "https://github.com/getAlby/lndhub.go";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ prusnak ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ton";
|
||||
version = "2023.05";
|
||||
version = "2023.06";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ton-blockchain";
|
||||
repo = "ton";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-EuFKoqOzKoaBCiVAsb8K053kAL4bw1WqmmybVJX2Fmo=";
|
||||
sha256 = "sha256-mDYuOokCGS1sDP6fHDXhGboDjn4JeyA5ea4/6RRt9x4=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user