Merge master into haskell-updates

This commit is contained in:
github-actions[bot] 2024-01-19 00:13:10 +00:00 committed by GitHub
commit 9a3af09826
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
249 changed files with 5260 additions and 2548 deletions

View File

@ -19,8 +19,8 @@ jobs:
# we don't limit this action to only NixOS repo since the checks are cheap and useful developer feedback
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: cachix/install-nix-action@7ac1ec25491415c381d9b62f0657c7a028df52a7 # v24
- uses: cachix/cachix-action@6a2e08b5ebf7a9f285ff57b1870a4262b06e0bee # v13
- uses: cachix/install-nix-action@6004951b182f8860210c8d6f0d808ec5b1a33d28 # v25
- uses: cachix/cachix-action@18cf96c7c98e048e10a83abd92116114cd8504be # v14
with:
# This cache is for the nixpkgs repo checks and should not be trusted or used elsewhere.
name: nixpkgs-ci

View File

@ -90,7 +90,7 @@ jobs:
base=$(mktemp -d)
git worktree add "$base" "$(git rev-parse HEAD^1)"
echo "base=$base" >> "$GITHUB_ENV"
- uses: cachix/install-nix-action@7ac1ec25491415c381d9b62f0657c7a028df52a7 # v24
- uses: cachix/install-nix-action@6004951b182f8860210c8d6f0d808ec5b1a33d28 # v25
- name: Fetching the pinned tool
# Update the pinned version using pkgs/test/nixpkgs-check-by-name/scripts/update-pinned-tool.sh
run: |

View File

@ -16,7 +16,7 @@ jobs:
with:
# pull_request_target checks out the base branch by default
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- uses: cachix/install-nix-action@7ac1ec25491415c381d9b62f0657c7a028df52a7 # v24
- uses: cachix/install-nix-action@6004951b182f8860210c8d6f0d808ec5b1a33d28 # v25
with:
# explicitly enable sandbox
extra_nix_config: sandbox = true

View File

@ -28,7 +28,7 @@ jobs:
with:
# pull_request_target checks out the base branch by default
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- uses: cachix/install-nix-action@7ac1ec25491415c381d9b62f0657c7a028df52a7 # v24
- uses: cachix/install-nix-action@6004951b182f8860210c8d6f0d808ec5b1a33d28 # v25
with:
# nixpkgs commit is pinned so that it doesn't break
# editorconfig-checker 2.4.0

View File

@ -18,11 +18,11 @@ jobs:
with:
# pull_request_target checks out the base branch by default
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- uses: cachix/install-nix-action@7ac1ec25491415c381d9b62f0657c7a028df52a7 # v24
- uses: cachix/install-nix-action@6004951b182f8860210c8d6f0d808ec5b1a33d28 # v25
with:
# explicitly enable sandbox
extra_nix_config: sandbox = true
- uses: cachix/cachix-action@6a2e08b5ebf7a9f285ff57b1870a4262b06e0bee # v13
- uses: cachix/cachix-action@18cf96c7c98e048e10a83abd92116114cd8504be # v14
with:
# This cache is for the nixpkgs repo checks and should not be trusted or used elsewhere.
name: nixpkgs-ci

View File

@ -19,11 +19,11 @@ jobs:
with:
# pull_request_target checks out the base branch by default
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- uses: cachix/install-nix-action@7ac1ec25491415c381d9b62f0657c7a028df52a7 # v24
- uses: cachix/install-nix-action@6004951b182f8860210c8d6f0d808ec5b1a33d28 # v25
with:
# explicitly enable sandbox
extra_nix_config: sandbox = true
- uses: cachix/cachix-action@6a2e08b5ebf7a9f285ff57b1870a4262b06e0bee # v13
- uses: cachix/cachix-action@18cf96c7c98e048e10a83abd92116114cd8504be # v14
with:
# This cache is for the nixpkgs repo checks and should not be trusted or used elsewhere.
name: nixpkgs-ci

View File

@ -29,7 +29,7 @@ jobs:
# pull_request_target checks out the base branch by default
ref: refs/pull/${{ github.event.pull_request.number }}/merge
if: ${{ env.CHANGED_FILES && env.CHANGED_FILES != '' }}
- uses: cachix/install-nix-action@7ac1ec25491415c381d9b62f0657c7a028df52a7 # v24
- uses: cachix/install-nix-action@6004951b182f8860210c8d6f0d808ec5b1a33d28 # v25
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: Parse all changed or added nix files

View File

@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: cachix/install-nix-action@7ac1ec25491415c381d9b62f0657c7a028df52a7 # v24
- uses: cachix/install-nix-action@6004951b182f8860210c8d6f0d808ec5b1a33d28 # v25
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: setup

View File

@ -1,33 +1,228 @@
# pkgs.dockerTools {#sec-pkgs-dockerTools}
`pkgs.dockerTools` is a set of functions for creating and manipulating Docker images according to the [Docker Image Specification v1.2.0](https://github.com/moby/moby/blob/master/image/spec/v1.2.md#docker-image-specification-v120). Docker itself is not used to perform any of the operations done by these functions.
`pkgs.dockerTools` is a set of functions for creating and manipulating Docker images according to the [Docker Image Specification v1.3.0](https://github.com/moby/moby/blob/46f7ab808b9504d735d600e259ca0723f76fb164/image/spec/spec.md#image-json-field-descriptions).
Docker itself is not used to perform any of the operations done by these functions.
## buildImage {#ssec-pkgs-dockerTools-buildImage}
This function is analogous to the `docker build` command, in that it can be used to build a Docker-compatible repository tarball containing a single image with one or multiple layers. As such, the result is suitable for being loaded in Docker with `docker load`.
This function builds a Docker-compatible repository tarball containing a single image.
As such, the result is suitable for being loaded in Docker with `docker load` (see [](#ex-dockerTools-buildImage) for how to do this).
The parameters of `buildImage` with relative example values are described below:
This function will create a single layer for all files (and dependencies) that are specified in its argument.
Only new dependencies that are not already in the existing layers will be copied.
If you prefer to create multiple layers for the files and dependencies you want to add to the image, see [](#ssec-pkgs-dockerTools-buildLayeredImage) or [](#ssec-pkgs-dockerTools-streamLayeredImage) instead.
[]{#ex-dockerTools-buildImage}
[]{#ex-dockerTools-buildImage-runAsRoot}
This function allows a script to be run during the layer generation process, allowing custom behaviour to affect the final results of the image (see the documentation of the `runAsRoot` and `extraCommands` attributes).
The resulting repository tarball will list a single image as specified by the `name` and `tag` attributes.
By default, that image will use a static creation date (see documentation for the `created` attribute).
This allows `buildImage` to produce reproducible images.
:::{.tip}
When running an image built with `buildImage`, you might encounter certain errors depending on what you included in the image, especially if you did not start with any base image.
If you encounter errors similar to `getProtocolByName: does not exist (no such protocol name: tcp)`, you may need to add the contents of `pkgs.iana-etc` in the `copyToRoot` attribute.
Similarly, if you encounter errors similar to `Error_Protocol ("certificate has unknown CA",True,UnknownCa)`, you may need to add the contents of `pkgs.cacert` in the `copyToRoot` attribute.
:::
### Inputs {#ssec-pkgs-dockerTools-buildImage-inputs}
`buildImage` expects an argument with the following attributes:
`name` (String)
: The name of the generated image.
`tag` (String or Null; _optional_)
: Tag of the generated image.
If `null`, the hash of the nix derivation will be used as the tag.
_Default value:_ `null`.
`fromImage` (Path or Null; _optional_)
: The repository tarball of an image to be used as the base for the generated image.
It must be a valid Docker image, such as one exported by `docker save`, or another image built with the `dockerTools` utility functions.
This can be seen as an equivalent of `FROM fromImage` in a `Dockerfile`.
A value of `null` can be seen as an equivalent of `FROM scratch`.
If specified, the layer created by `buildImage` will be appended to the layers defined in the base image, resulting in an image with at least two layers (one or more layers from the base image, and the layer created by `buildImage`).
Otherwise, the resulting image with contain the single layer created by `buildImage`.
_Default value:_ `null`.
`fromImageName` (String or Null; _optional_)
: Used to specify the image within the repository tarball in case it contains multiple images.
A value of `null` means that `buildImage` will use the first image available in the repository.
:::{.note}
This must be used with `fromImageTag`. Using only `fromImageName` without `fromImageTag` will make `buildImage` use the first image available in the repository.
:::
_Default value:_ `null`.
`fromImageTag` (String or Null; _optional_)
: Used to specify the image within the repository tarball in case it contains multiple images.
A value of `null` means that `buildImage` will use the first image available in the repository.
:::{.note}
This must be used with `fromImageName`. Using only `fromImageTag` without `fromImageName` will make `buildImage` use the first image available in the repository
:::
_Default value:_ `null`.
`copyToRoot` (Path, List of Paths, or Null; _optional_)
: Files to add to the generated image.
Anything that coerces to a path (e.g. a derivation) can also be used.
This can be seen as an equivalent of `ADD contents/ /` in a `Dockerfile`.
_Default value:_ `null`.
`keepContentsDirlinks` (Boolean; _optional_)
: When adding files to the generated image (as specified by `copyToRoot`), this attribute controls whether to preserve symlinks to directories.
If `false`, the symlinks will be transformed into directories.
This behaves the same as `rsync -k` when `keepContentsDirlinks` is `false`, and the same as `rsync -K` when `keepContentsDirlinks` is `true`.
_Default value:_ `false`.
`runAsRoot` (String or Null; _optional_)
: A bash script that will run as root inside a VM that contains the existing layers of the base image and the new generated layer (including the files from `copyToRoot`).
The script will be run with a working directory of `/`.
This can be seen as an equivalent of `RUN ...` in a `Dockerfile`.
A value of `null` means that this step in the image generation process will be skipped.
See [](#ex-dockerTools-buildImage-runAsRoot) for how to work with this attribute.
:::{.caution}
Using this attribute requires the `kvm` device to be available, see [`system-features`](https://nixos.org/manual/nix/stable/command-ref/conf-file.html#conf-system-features).
If the `kvm` device isn't available, you should consider using [`buildLayeredImage`](#ssec-pkgs-dockerTools-buildLayeredImage) or [`streamLayeredImage`](#ssec-pkgs-dockerTools-streamLayeredImage) instead.
Those functions allow scripts to be run as root without access to the `kvm` device.
:::
:::{.note}
At the time the script in `runAsRoot` is run, the files specified directly in `copyToRoot` will be present in the VM, but their dependencies might not be there yet.
Copying their dependencies into the generated image is a step that happens after `runAsRoot` finishes running.
:::
_Default value:_ `null`.
`extraCommands` (String; _optional_)
: A bash script that will run before the layer created by `buildImage` is finalised.
The script will be run on some (opaque) working directory which will become `/` once the layer is created.
This is similar to `runAsRoot`, but the script specified in `extraCommands` is **not** run as root, and does not involve creating a VM.
It is simply run as part of building the derivation that outputs the layer created by `buildImage`.
See [](#ex-dockerTools-buildImage-extraCommands) for how to work with this attribute, and subtle differences compared to `runAsRoot`.
_Default value:_ `""`.
`config` (Attribute Set; _optional_)
: Used to specify the configuration of the containers that will be started off the generated image.
Must be an attribute set, with each attribute as listed in the [Docker Image Specification v1.3.0](https://github.com/moby/moby/blob/46f7ab808b9504d735d600e259ca0723f76fb164/image/spec/spec.md#image-json-field-descriptions).
_Default value:_ `null`.
`architecture` (String; _optional_)
: Used to specify the image architecture.
This is useful for multi-architecture builds that don't need cross compiling.
If specified, its value should follow the [OCI Image Configuration Specification](https://github.com/opencontainers/image-spec/blob/main/config.md#properties), which should still be compatible with Docker.
According to the linked specification, all possible values for `$GOARCH` in [the Go docs](https://go.dev/doc/install/source#environment) should be valid, but will commonly be one of `386`, `amd64`, `arm`, or `arm64`.
_Default value:_ the same value from `pkgs.go.GOARCH`.
`diskSize` (Number; _optional_)
: Controls the disk size (in megabytes) of the VM used to run the script specified in `runAsRoot`.
This attribute is ignored if `runAsRoot` is `null`.
_Default value:_ 1024.
`buildVMMemorySize` (Number; _optional_)
: Controls the amount of memory (in megabytes) provisioned for the VM used to run the script specified in `runAsRoot`.
This attribute is ignored if `runAsRoot` is `null`.
_Default value:_ 512.
`created` (String; _optional_)
: Specifies the time of creation of the generated image.
This should be either a date and time formatted according to [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) or `"now"`, in which case `buildImage` will use the current date.
See [](#ex-dockerTools-buildImage-creatednow) for how to use `"now"`.
:::{.caution}
Using `"now"` means that the generated image will not be reproducible anymore (because the date will always change whenever it's built).
:::
_Default value:_ `"1970-01-01T00:00:01Z"`.
`uid` (Number; _optional_)
: The uid of the user that will own the files packed in the new layer built by `buildImage`.
_Default value:_ 0.
`gid` (Number; _optional_)
: The gid of the group that will own the files packed in the new layer built by `buildImage`.
_Default value:_ 0.
`contents` **DEPRECATED**
: This attribute is deprecated, and users are encouraged to use `copyToRoot` instead.
### Passthru outputs {#ssec-pkgs-dockerTools-buildImage-passthru-outputs}
`buildImage` defines a few [`passthru`](#var-stdenv-passthru) attributes:
`buildArgs` (Attribute Set)
: The argument passed to `buildImage` itself.
This allows you to inspect all attributes specified in the argument, as described above.
`layer` (Attribute Set)
: The derivation with the layer created by `buildImage`.
This allows easier inspection of the contents added by `buildImage` in the generated image.
`imageTag` (String)
: The tag of the generated image.
This is useful if no tag was specified in the attributes of the argument to `buildImage`, because an automatic tag will be used instead.
`imageTag` allows you to retrieve the value of the tag used in this case.
### Examples {#ssec-pkgs-dockerTools-buildImage-examples}
:::{.example #ex-dockerTools-buildImage}
# Building a Docker image
The following package builds a Docker image that runs the `redis-server` executable from the `redis` package.
The Docker image will have name `redis` and tag `latest`.
```nix
buildImage {
{ dockerTools, buildEnv, redis }:
dockerTools.buildImage {
name = "redis";
tag = "latest";
fromImage = someBaseImage;
fromImageName = null;
fromImageTag = "latest";
copyToRoot = pkgs.buildEnv {
copyToRoot = buildEnv {
name = "image-root";
paths = [ pkgs.redis ];
paths = [ redis ];
pathsToLink = [ "/bin" ];
};
runAsRoot = ''
#!${pkgs.runtimeShell}
mkdir -p /data
'';
@ -36,68 +231,111 @@ buildImage {
WorkingDir = "/data";
Volumes = { "/data" = { }; };
};
diskSize = 1024;
buildVMMemorySize = 512;
}
```
The above example will build a Docker image `redis/latest` from the given base image. Loading and running this image in Docker results in `redis-server` being started automatically.
The result of building this package is a `.tar.gz` file that can be loaded into Docker:
- `name` specifies the name of the resulting image. This is the only required argument for `buildImage`.
```shell
$ nix-build
(some output removed for clarity)
building '/nix/store/yw0adm4wpsw1w6j4fb5hy25b3arr9s1v-docker-image-redis.tar.gz.drv'...
Adding layer...
tar: Removing leading `/' from member names
Adding meta...
Cooking the image...
Finished.
/nix/store/p4dsg62inh9d2ksy3c7bv58xa851dasr-docker-image-redis.tar.gz
- `tag` specifies the tag of the resulting image. By default it's `null`, which indicates that the nix output hash will be used as tag.
- `fromImage` is the repository tarball containing the base image. It must be a valid Docker image, such as exported by `docker save`. By default it's `null`, which can be seen as equivalent to `FROM scratch` of a `Dockerfile`.
- `fromImageName` can be used to further specify the base image within the repository, in case it contains multiple images. By default it's `null`, in which case `buildImage` will peek the first image available in the repository.
- `fromImageTag` can be used to further specify the tag of the base image within the repository, in case an image contains multiple tags. By default it's `null`, in which case `buildImage` will peek the first tag available for the base image.
- `copyToRoot` is a derivation that will be copied in the new layer of the resulting image. This can be similarly seen as `ADD contents/ /` in a `Dockerfile`. By default it's `null`.
- `runAsRoot` is a bash script that will run as root in an environment that overlays the existing layers of the base image with the new resulting layer, including the previously copied `contents` derivation. This can be similarly seen as `RUN ...` in a `Dockerfile`.
> **_NOTE:_** Using this parameter requires the `kvm` device to be available.
- `config` is used to specify the configuration of the containers that will be started off the built image in Docker. The available options are listed in the [Docker Image Specification v1.2.0](https://github.com/moby/moby/blob/master/image/spec/v1.2.md#image-json-field-descriptions).
- `architecture` is _optional_ and used to specify the image architecture, this is useful for multi-architecture builds that don't need cross compiling. If not specified it will default to `hostPlatform`.
- `diskSize` is used to specify the disk size of the VM used to build the image in megabytes. By default it's 1024 MiB.
- `buildVMMemorySize` is used to specify the memory size of the VM to build the image in megabytes. By default it's 512 MiB.
After the new layer has been created, its closure (to which `contents`, `config` and `runAsRoot` contribute) will be copied in the layer itself. Only new dependencies that are not already in the existing layers will be copied.
At the end of the process, only one new single layer will be produced and added to the resulting image.
The resulting repository will only list the single image `image/tag`. In the case of [the `buildImage` example](#ex-dockerTools-buildImage), it would be `redis/latest`.
It is possible to inspect the arguments with which an image was built using its `buildArgs` attribute.
> **_NOTE:_** If you see errors similar to `getProtocolByName: does not exist (no such protocol name: tcp)` you may need to add `pkgs.iana-etc` to `contents`.
> **_NOTE:_** If you see errors similar to `Error_Protocol ("certificate has unknown CA",True,UnknownCa)` you may need to add `pkgs.cacert` to `contents`.
By default `buildImage` will use a static date of one second past the UNIX Epoch. This allows `buildImage` to produce binary reproducible images. When listing images with `docker images`, the newly created images will be listed like this:
```ShellSession
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
hello latest 08c791c7846e 48 years ago 25.2MB
$ docker load -i /nix/store/p4dsg62inh9d2ksy3c7bv58xa851dasr-docker-image-redis.tar.gz
(some output removed for clarity)
Loaded image: redis:latest
```
:::
You can break binary reproducibility but have a sorted, meaningful `CREATED` column by setting `created` to `now`.
:::{.example #ex-dockerTools-buildImage-runAsRoot}
# Building a Docker image with `runAsRoot`
The following package builds a Docker image with the `hello` executable from the `hello` package.
It uses `runAsRoot` to create a directory and a file inside the image.
This works the same as [](#ex-dockerTools-buildImage-extraCommands), but uses `runAsRoot` instead of `extraCommands`.
```nix
pkgs.dockerTools.buildImage {
{ dockerTools, buildEnv, hello }:
dockerTools.buildImage {
name = "hello";
tag = "latest";
created = "now";
copyToRoot = pkgs.buildEnv {
copyToRoot = buildEnv {
name = "image-root";
paths = [ pkgs.hello ];
paths = [ hello ];
pathsToLink = [ "/bin" ];
};
runAsRoot = ''
mkdir -p /data
echo "some content" > my-file
'';
config = {
Cmd = [ "/bin/hello" ];
WorkingDir = "/data";
};
}
```
:::
:::{.example #ex-dockerTools-buildImage-extraCommands}
# Building a Docker image with `extraCommands`
The following package builds a Docker image with the `hello` executable from the `hello` package.
It uses `extraCommands` to create a directory and a file inside the image.
This works the same as [](#ex-dockerTools-buildImage-runAsRoot), but uses `extraCommands` instead of `runAsRoot`.
Note that with `extraCommands`, we can't directly reference `/` and must create files and directories as if we were already on `/`.
```nix
{ dockerTools, buildEnv, hello }:
dockerTools.buildImage {
name = "hello";
tag = "latest";
copyToRoot = buildEnv {
name = "image-root";
paths = [ hello ];
pathsToLink = [ "/bin" ];
};
extraCommands = ''
mkdir -p data
echo "some content" > my-file
'';
config = {
Cmd = [ "/bin/hello" ];
WorkingDir = "/data";
};
}
```
:::
:::{.example #ex-dockerTools-buildImage-creatednow}
# Building a Docker image with a creation date set to the current time
Note that using a value of `"now"` in the `created` attribute will break reproducibility.
```nix
{ dockerTools, buildEnv, hello }:
dockerTools.buildImage {
name = "hello";
tag = "latest";
created = "now";
copyToRoot = buildEnv {
name = "image-root";
paths = [ hello ];
pathsToLink = [ "/bin" ];
};
@ -105,139 +343,376 @@ pkgs.dockerTools.buildImage {
}
```
Now the Docker CLI will display a reasonable date and sort the images as expected:
After importing the generated repository tarball with Docker, its CLI will display a reasonable date and sort the images as expected:
```ShellSession
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
hello latest de2bf4786de6 About a minute ago 25.2MB
```
However, the produced images will not be binary reproducible.
:::
## buildLayeredImage {#ssec-pkgs-dockerTools-buildLayeredImage}
Create a Docker image with many of the store paths being on their own layer to improve sharing between images. The image is realized into the Nix store as a gzipped tarball. Depending on the intended usage, many users might prefer to use `streamLayeredImage` instead, which this function uses internally.
`buildLayeredImage` uses [`streamLayeredImage`](#ssec-pkgs-dockerTools-streamLayeredImage) underneath to build a compressed Docker-compatible repository tarball.
Basically, `buildLayeredImage` runs the script created by `streamLayeredImage` to save the compressed image in the Nix store.
`buildLayeredImage` supports the same options as `streamLayeredImage`, see [`streamLayeredImage`](#ssec-pkgs-dockerTools-streamLayeredImage) for details.
`name`
:::{.note}
Despite the similar name, [`buildImage`](#ssec-pkgs-dockerTools-buildImage) works completely differently from `buildLayeredImage` and `streamLayeredImage`.
: The name of the resulting image.
Even though some of the arguments may seem related, they cannot be interchanged.
:::
`tag` _optional_
You can use this function to load an image in Docker with `docker load`.
See [](#ex-dockerTools-buildLayeredImage-hello) to see how to do that.
: Tag of the generated image.
### Examples {#ssec-pkgs-dockerTools-buildLayeredImage-examples}
*Default:* the output path's hash
:::{.example #ex-dockerTools-buildLayeredImage-hello}
# Building a layered Docker image
`fromImage` _optional_
: The repository tarball containing the base image. It must be a valid Docker image, such as one exported by `docker save`.
*Default:* `null`, which can be seen as equivalent to `FROM scratch` of a `Dockerfile`.
`contents` _optional_
: Top-level paths in the container. Either a single derivation, or a list of derivations.
*Default:* `[]`
`config` _optional_
`architecture` is _optional_ and used to specify the image architecture, this is useful for multi-architecture builds that don't need cross compiling. If not specified it will default to `hostPlatform`.
: Run-time configuration of the container. A full list of the options available is in the [Docker Image Specification v1.2.0](https://github.com/moby/moby/blob/master/image/spec/v1.2.md#image-json-field-descriptions).
*Default:* `{}`
`created` _optional_
: Date and time the layers were created. Follows the same `now` exception supported by `buildImage`.
*Default:* `1970-01-01T00:00:01Z`
`maxLayers` _optional_
: Maximum number of layers to create.
*Default:* `100`
*Maximum:* `125`
`extraCommands` _optional_
: Shell commands to run while building the final layer, without access to most of the layer contents. Changes to this layer are "on top" of all the other layers, so can create additional directories and files.
`fakeRootCommands` _optional_
: Shell commands to run while creating the archive for the final layer in a fakeroot environment. Unlike `extraCommands`, you can run `chown` to change the owners of the files in the archive, changing fakeroot's state instead of the real filesystem. The latter would require privileges that the build user does not have. Static binaries do not interact with the fakeroot environment. By default all files in the archive will be owned by root.
`enableFakechroot` _optional_
: Whether to run in `fakeRootCommands` in `fakechroot`, making programs behave as though `/` is the root of the image being created, while files in the Nix store are available as usual. This allows scripts that perform installation in `/` to work as expected. Considering that `fakechroot` is implemented via the same mechanism as `fakeroot`, the same caveats apply.
*Default:* `false`
### Behavior of `contents` in the final image {#dockerTools-buildLayeredImage-arg-contents}
Each path directly listed in `contents` will have a symlink in the root of the image.
For example:
The following package builds a layered Docker image that runs the `hello` executable from the `hello` package.
The Docker image will have name `hello` and tag `latest`.
```nix
pkgs.dockerTools.buildLayeredImage {
{ dockerTools, hello }:
dockerTools.buildLayeredImage {
name = "hello";
contents = [ pkgs.hello ];
tag = "latest";
contents = [ hello ];
config.Cmd = [ "/bin/hello" ];
}
```
will create symlinks for all the paths in the `hello` package:
The result of building this package is a `.tar.gz` file that can be loaded into Docker:
```ShellSession
/bin/hello -> /nix/store/h1zb1padqbbb7jicsvkmrym3r6snphxg-hello-2.10/bin/hello
/share/info/hello.info -> /nix/store/h1zb1padqbbb7jicsvkmrym3r6snphxg-hello-2.10/share/info/hello.info
/share/locale/bg/LC_MESSAGES/hello.mo -> /nix/store/h1zb1padqbbb7jicsvkmrym3r6snphxg-hello-2.10/share/locale/bg/LC_MESSAGES/hello.mo
```shell
$ nix-build
(some output removed for clarity)
building '/nix/store/bk8bnrbw10nq7p8pvcmdr0qf57y6scha-hello.tar.gz.drv'...
No 'fromImage' provided
Creating layer 1 from paths: ['/nix/store/i93s7xxblavsacpy82zdbn4kplsyq48l-libunistring-1.1']
Creating layer 2 from paths: ['/nix/store/ji01n9vinnj22nbrb86nx8a1ssgpilx8-libidn2-2.3.4']
Creating layer 3 from paths: ['/nix/store/ldrslljw4rg026nw06gyrdwl78k77vyq-xgcc-12.3.0-libgcc']
Creating layer 4 from paths: ['/nix/store/9y8pmvk8gdwwznmkzxa6pwyah52xy3nk-glibc-2.38-27']
Creating layer 5 from paths: ['/nix/store/zhl06z4lrfrkw5rp0hnjjfrgsclzvxpm-hello-2.12.1']
Creating layer 6 with customisation...
Adding manifests...
Done.
/nix/store/hxcz7snvw7f8rzhbh6mv8jq39d992905-hello.tar.gz
$ docker load -i /nix/store/hxcz7snvw7f8rzhbh6mv8jq39d992905-hello.tar.gz
(some output removed for clarity)
Loaded image: hello:latest
```
### Automatic inclusion of `config` references {#dockerTools-buildLayeredImage-arg-config}
The closure of `config` is automatically included in the closure of the final image.
This allows you to make very simple Docker images with very little code. This container will start up and run `hello`:
```nix
pkgs.dockerTools.buildLayeredImage {
name = "hello";
config.Cmd = [ "${pkgs.hello}/bin/hello" ];
}
```
### Adjusting `maxLayers` {#dockerTools-buildLayeredImage-arg-maxLayers}
Increasing the `maxLayers` increases the number of layers which have a chance to be shared between different images.
Modern Docker installations support up to 128 layers, but older versions support as few as 42.
If the produced image will not be extended by other Docker builds, it is safe to set `maxLayers` to `128`. However, it will be impossible to extend the image further.
The first (`maxLayers-2`) most "popular" paths will have their own individual layers, then layer \#`maxLayers-1` will contain all the remaining "unpopular" paths, and finally layer \#`maxLayers` will contain the Image configuration.
Docker's Layers are not inherently ordered, they are content-addressable and are not explicitly layered until they are composed in to an Image.
:::
## streamLayeredImage {#ssec-pkgs-dockerTools-streamLayeredImage}
Builds a script which, when run, will stream an uncompressed tarball of a Docker image to stdout. The arguments to this function are as for `buildLayeredImage`. This method of constructing an image does not realize the image into the Nix store, so it saves on IO and disk/cache space, particularly with large images.
`streamLayeredImage` builds a **script** which, when run, will stream to stdout a Docker-compatible repository tarball containing a single image, using multiple layers to improve sharing between images.
This means that `streamLayeredImage` does not output an image into the Nix store, but only a script that builds the image, saving on IO and disk/cache space, particularly with large images.
The image produced by running the output script can be piped directly into `docker load`, to load it into the local docker daemon:
You can use this function to load an image in Docker with `docker load`.
See [](#ex-dockerTools-streamLayeredImage-hello) to see how to do that.
```ShellSession
$(nix-build) | docker load
For this function, you specify a [store path](https://nixos.org/manual/nix/stable/store/store-path) or a list of store paths to be added to the image, and the functions will automatically include any dependencies of those paths in the image.
The function will attempt to create one layer per object in the Nix store that needs to be added to the image.
In case there are more objects to include than available layers, the function will put the most ["popular"](https://github.com/NixOS/nixpkgs/tree/release-23.11/pkgs/build-support/references-by-popularity) objects in their own layers, and group all remaining objects into a single layer.
An additional layer will be created with symlinks to the store paths you specified to be included in the image.
These symlinks are built with [`symlinkJoin`](#trivial-builder-symlinkJoin), so they will be included in the root of the image.
See [](#ex-dockerTools-streamLayeredImage-exploringlayers) to understand how these symlinks are laid out in the generated image.
`streamLayeredImage` allows scripts to be run when creating the additional layer with symlinks, allowing custom behaviour to affect the final results of the image (see the documentation of the `extraCommands` and `fakeRootCommands` attributes).
The resulting repository tarball will list a single image as specified by the `name` and `tag` attributes.
By default, that image will use a static creation date (see documentation for the `created` attribute).
This allows the function to produce reproducible images.
### Inputs {#ssec-pkgs-dockerTools-streamLayeredImage-inputs}
`streamLayeredImage` expects one argument with the following attributes:
`name` (String)
: The name of the generated image.
`tag` (String; _optional_)
: Tag of the generated image.
If `null`, the hash of the nix derivation will be used as the tag.
_Default value:_ `null`.
`fromImage`(Path or Null; _optional_)
: The repository tarball of an image to be used as the base for the generated image.
It must be a valid Docker image, such as one exported by `docker save`, or another image built with the `dockerTools` utility functions.
This can be seen as an equivalent of `FROM fromImage` in a `Dockerfile`.
A value of `null` can be seen as an equivalent of `FROM scratch`.
If specified, the created layers will be appended to the layers defined in the base image.
_Default value:_ `null`.
`contents` (Path or List of Paths; _optional_) []{#dockerTools-buildLayeredImage-arg-contents}
: Directories whose contents will be added to the generated image.
Things that coerce to paths (e.g. a derivation) can also be used.
This can be seen as an equivalent of `ADD contents/ /` in a `Dockerfile`.
All the contents specified by `contents` will be added as a final layer in the generated image.
They will be added as links to the actual files (e.g. links to the store paths).
The actual files will be added in previous layers.
_Default value:_ `[]`
`config` (Attribute Set; _optional_) []{#dockerTools-buildLayeredImage-arg-config}
: Used to specify the configuration of the containers that will be started off the generated image.
Must be an attribute set, with each attribute as listed in the [Docker Image Specification v1.3.0](https://github.com/moby/moby/blob/46f7ab808b9504d735d600e259ca0723f76fb164/image/spec/spec.md#image-json-field-descriptions).
If any packages are used directly in `config`, they will be automatically included in the generated image.
See [](#ex-dockerTools-streamLayeredImage-configclosure) for an example.
_Default value:_ `null`.
`architecture` (String; _optional_)
: Used to specify the image architecture.
This is useful for multi-architecture builds that don't need cross compiling.
If specified, its value should follow the [OCI Image Configuration Specification](https://github.com/opencontainers/image-spec/blob/main/config.md#properties), which should still be compatible with Docker.
According to the linked specification, all possible values for `$GOARCH` in [the Go docs](https://go.dev/doc/install/source#environment) should be valid, but will commonly be one of `386`, `amd64`, `arm`, or `arm64`.
_Default value:_ the same value from `pkgs.go.GOARCH`.
`created` (String; _optional_)
: Specifies the time of creation of the generated image.
This should be either a date and time formatted according to [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) or `"now"`, in which case the current date will be used.
:::{.caution}
Using `"now"` means that the generated image will not be reproducible anymore (because the date will always change whenever it's built).
:::
_Default value:_ `"1970-01-01T00:00:01Z"`.
`maxLayers` (Number; _optional_) []{#dockerTools-buildLayeredImage-arg-maxLayers}
: The maximum number of layers that will be used by the generated image.
If a `fromImage` was specified, the number of layers used by `fromImage` will be subtracted from `maxLayers` to ensure that the image generated will have at most `maxLayers`.
:::{.caution}
Depending on the tool/runtime where the image will be used, there might be a limit to the number of layers that an image can have.
For Docker, see [this issue on GitHub](https://github.com/docker/docs/issues/8230).
:::
_Default value:_ 100.
`extraCommands` (String; _optional_)
: A bash script that will run in the context of the layer created with the contents specified by `contents`.
At the moment this script runs, only the contents directly specified by `contents` will be available as links.
_Default value:_ `""`.
`fakeRootCommands` (String; _optional_)
: A bash script that will run in the context of the layer created with the contents specified by `contents`.
During the process to generate that layer, the script in `extraCommands` will be run first, if specified.
After that, a {manpage}`fakeroot(1)` environment will be entered.
The script specified in `fakeRootCommands` runs inside the fakeroot environment, and the layer is then generated from the view of the files inside the fakeroot environment.
This is useful to change the owners of the files in the layer (by running `chown`, for example), or performing any other privileged operations related to file manipulation (by default, all files in the layer will be owned by root, and the build environment doesn't have enough privileges to directly perform privileged operations on these files).
For more details, see the manpage for {manpage}`fakeroot(1)`.
:::{.caution}
Due to how fakeroot works, static binaries cannot perform privileged file operations in `fakeRootCommands`, unless `enableFakechroot` is set to `true`.
:::
_Default value:_ `""`.
`enableFakechroot` (Boolean; _optional_)
: By default, the script specified in `fakeRootCommands` only runs inside a fakeroot environment.
If `enableFakechroot` is `true`, a more complete chroot environment will be created using [`proot`](https://proot-me.github.io/) before running the script in `fakeRootCommands`.
Files in the Nix store will be available.
This allows scripts that perform installation in `/` to work as expected.
This can be seen as an equivalent of `RUN ...` in a `Dockerfile`.
_Default value:_ `false`
`includeStorePaths` (Boolean; _optional_)
: The files specified in `contents` are put into layers in the generated image.
If `includeStorePaths` is `false`, the actual files will not be included in the generated image, and only links to them will be added instead.
It is **not recommended** to set this to `false` unless you have other tooling to insert the store paths via other means (such as bind mounting the host store) when running containers with the generated image.
If you don't provide any extra tooling, the generated image won't run properly.
See [](#ex-dockerTools-streamLayeredImage-exploringlayers) to understand the impact of setting `includeStorePaths` to `false`.
_Default value:_ `true`
`passthru` (Attribute Set; _optional_)
: Use this to pass any attributes as [passthru](#var-stdenv-passthru) for the resulting derivation.
_Default value:_ `{}`
### Passthru outputs {#ssec-pkgs-dockerTools-streamLayeredImage-passthru-outputs}
`streamLayeredImage` also defines its own [`passthru`](#var-stdenv-passthru) attributes:
`imageTag` (String)
: The tag of the generated image.
This is useful if no tag was specified in the attributes of the argument to the function, because an automatic tag will be used instead.
`imageTag` allows you to retrieve the value of the tag used in this case.
### Examples {#ssec-pkgs-dockerTools-streamLayeredImage-examples}
:::{.example #ex-dockerTools-streamLayeredImage-hello}
# Streaming a layered Docker image
The following package builds a **script** which, when run, will stream a layered Docker image that runs the `hello` executable from the `hello` package.
The Docker image will have name `hello` and tag `latest`.
```nix
{ dockerTools, hello }:
dockerTools.streamLayeredImage {
name = "hello";
tag = "latest";
contents = [ hello ];
config.Cmd = [ "/bin/hello" ];
}
```
Alternatively, the image be piped via `gzip` into `skopeo`, e.g., to copy it into a registry:
The result of building this package is a script.
Running this script and piping it into `docker load` gives you the same image that was built in [](#ex-dockerTools-buildLayeredImage-hello).
Note that in this case, the image is never added to the Nix store, but instead streamed directly into Docker.
```ShellSession
$(nix-build) | gzip --fast | skopeo copy docker-archive:/dev/stdin docker://some_docker_registry/myimage:tag
```shell
$ nix-build
(output removed for clarity)
/nix/store/wsz2xl8ckxnlb769irvq6jv1280dfvxd-stream-hello
$ /nix/store/wsz2xl8ckxnlb769irvq6jv1280dfvxd-stream-hello | docker load
No 'fromImage' provided
Creating layer 1 from paths: ['/nix/store/i93s7xxblavsacpy82zdbn4kplsyq48l-libunistring-1.1']
Creating layer 2 from paths: ['/nix/store/ji01n9vinnj22nbrb86nx8a1ssgpilx8-libidn2-2.3.4']
Creating layer 3 from paths: ['/nix/store/ldrslljw4rg026nw06gyrdwl78k77vyq-xgcc-12.3.0-libgcc']
Creating layer 4 from paths: ['/nix/store/9y8pmvk8gdwwznmkzxa6pwyah52xy3nk-glibc-2.38-27']
Creating layer 5 from paths: ['/nix/store/zhl06z4lrfrkw5rp0hnjjfrgsclzvxpm-hello-2.12.1']
Creating layer 6 with customisation...
Adding manifests...
Done.
(some output removed for clarity)
Loaded image: hello:latest
```
:::
:::{.example #ex-dockerTools-streamLayeredImage-exploringlayers}
# Exploring the layers in an image built with `streamLayeredImage`
Assume the following package, which builds a layered Docker image with the `hello` package.
```nix
{ dockerTools, hello }:
dockerTools.streamLayeredImage {
name = "hello";
contents = [ hello ];
}
```
The `hello` package depends on 4 other packages:
```shell
$ nix-store --query -R $(nix-build -A hello)
/nix/store/i93s7xxblavsacpy82zdbn4kplsyq48l-libunistring-1.1
/nix/store/ji01n9vinnj22nbrb86nx8a1ssgpilx8-libidn2-2.3.4
/nix/store/ldrslljw4rg026nw06gyrdwl78k77vyq-xgcc-12.3.0-libgcc
/nix/store/9y8pmvk8gdwwznmkzxa6pwyah52xy3nk-glibc-2.38-27
/nix/store/zhl06z4lrfrkw5rp0hnjjfrgsclzvxpm-hello-2.12.1
```
This means that all these packages will be included in the image generated by `streamLayeredImage`.
It will put each package in its own layer, for a total of 5 layers with actual files in them.
A final layer will be created only with symlinks for the `hello` package.
The image generated will have the following directory structure (some directories were collapsed for readability):
```
├── bin
│ └── hello → /nix/store/zhl06z4lrfrkw5rp0hnjjfrgsclzvxpm-hello-2.12.1/bin/hello
├── nix
│ └── store
│ ├─⊕ 9y8pmvk8gdwwznmkzxa6pwyah52xy3nk-glibc-2.38-27
│ ├─⊕ i93s7xxblavsacpy82zdbn4kplsyq48l-libunistring-1.1
│ ├─⊕ ji01n9vinnj22nbrb86nx8a1ssgpilx8-libidn2-2.3.4
│ ├─⊕ ldrslljw4rg026nw06gyrdwl78k77vyq-xgcc-12.3.0-libgcc
│ └─⊕ zhl06z4lrfrkw5rp0hnjjfrgsclzvxpm-hello-2.12.1
└── share
├── info
│ └── hello.info → /nix/store/zhl06z4lrfrkw5rp0hnjjfrgsclzvxpm-hello-2.12.1/share/info/hello.info
├─⊕ locale
└── man
└── man1
└── hello.1.gz → /nix/store/zhl06z4lrfrkw5rp0hnjjfrgsclzvxpm-hello-2.12.1/share/man/man1/hello.1.gz
```
Each of the packages in `/nix/store` comes from a layer in the image.
The final layer adds the `/bin` and `/share` directories, but they only contain links to the actual files in `/nix/store`.
If our package sets `includeStorePaths` to `false`, we'll end up with only the final layer with the links, but the actual files won't exist in the image:
```nix
{ dockerTools, hello }:
dockerTools.streamLayeredImage {
name = "hello";
contents = [ hello ];
}
```
After building this package, the image will have the following directory structure:
```
├── bin
│ └── hello → /nix/store/zhl06z4lrfrkw5rp0hnjjfrgsclzvxpm-hello-2.12.1/bin/hello
└── share
├── info
│ └── hello.info → /nix/store/zhl06z4lrfrkw5rp0hnjjfrgsclzvxpm-hello-2.12.1/share/info/hello.info
├─⊕ locale
└── man
└── man1
└── hello.1.gz → /nix/store/zhl06z4lrfrkw5rp0hnjjfrgsclzvxpm-hello-2.12.1/share/man/man1/hello.1.gz
```
Note how the links point to paths in `/nix/store`, but they're not included in the image itself.
This is why you need extra tooling when using `includeStorePaths`:
a container created from such image won't find any of the files it needs to run otherwise.
:::
::: {.example #ex-dockerTools-streamLayeredImage-configclosure}
# Building a layered Docker image with packages directly in `config`
The closure of `config` is automatically included in the generated image.
The following package shows a more compact way to create the same output generated in [](#ex-dockerTools-streamLayeredImage-hello).
```nix
{ dockerTools, hello, lib }:
dockerTools.streamLayeredImage {
name = "hello";
tag = "latest";
config.Cmd = [ "${lib.getExe hello}" ];
}
```
:::
## pullImage {#ssec-pkgs-dockerTools-fetchFromRegistry}

View File

@ -29,6 +29,10 @@ pkgs.mkShell {
... all the attributes of `stdenv.mkDerivation`.
## Variants {#sec-pkgs-mkShell-variants}
`pkgs.mkShellNoCC` is a variant that uses `stdenvNoCC` instead of `stdenv` as base environment. This is useful if no C compiler is needed in the shell environment.
## Building the shell {#sec-pkgs-mkShell-building}
This derivation output will contain a text file that contains a reference to

View File

@ -354,6 +354,7 @@ mkYarnPackage rec {
- The `echo 9` steps comes from this answer: <https://stackoverflow.com/a/49139496>
- Exporting the headers in `npm_config_nodedir` comes from this issue: <https://github.com/nodejs/node-gyp/issues/1191#issuecomment-301243919>
- `offlineCache` (described [above](#javascript-yarn2nix-preparation)) must be specified to avoid [Import From Derivation](#ssec-import-from-derivation) (IFD) when used inside Nixpkgs.
## Outside Nixpkgs {#javascript-outside-nixpkgs}

View File

@ -26,6 +26,17 @@ It is important to import Qt modules directly, that is: `qtbase`, `qtdeclarative
Additionally all Qt packages must include `wrapQtAppsHook` in `nativeBuildInputs`, or you must explicitly set `dontWrapQtApps`.
`pkgs.callPackage` does not provide injections for `qtbase` or the like.
Instead you want to either use `pkgs.libsForQt5.callPackage`, or `pkgs.qt6Packages.callPackage`, depending on the Qt version you want to use.
For example (from [here](https://github.com/NixOS/nixpkgs/blob/2f9286912cb215969ece465147badf6d07aa43fe/pkgs/top-level/all-packages.nix#L30106))
```nix
zeal-qt5 = libsForQt5.callPackage ../data/documentation/zeal { };
zeal-qt6 = qt6Packages.callPackage ../data/documentation/zeal { };
zeal = zeal-qt5;
```
## Locating runtime dependencies {#qt-runtime-dependencies}
Qt applications must be wrapped to find runtime dependencies.

View File

@ -44,21 +44,22 @@ rustPlatform.buildRustPackage rec {
}
```
`buildRustPackage` requires either the `cargoSha256` or the
`cargoHash` attribute which is computed over all crate sources of this
package. `cargoHash256` is used for traditional Nix SHA-256 hashes,
such as the one in the example above. `cargoHash` should instead be
used for [SRI](https://www.w3.org/TR/SRI/) hashes. For example:
Exception: If the application has cargo `git` dependencies, the `cargoHash`/`cargoSha256`
approach will not work, and you will need to copy the `Cargo.lock` file of the application
to nixpkgs and continue with the next section for specifying the options of the`cargoLock`
section.
`buildRustPackage` requires either the `cargoHash` or the `cargoSha256`
attribute which is computed over all crate sources of this package.
`cargoSha256` is used for traditional Nix SHA-256 hashes. `cargoHash` should
instead be used for [SRI](https://www.w3.org/TR/SRI/) hashes and should be
preferred. For example:
```nix
cargoHash = "sha256-l1vL2ZdtDRxSGvP0X/l3nMw8+6WF67KPutJEzUROjg8=";
```
Exception: If the application has cargo `git` dependencies, the `cargoHash`/`cargoSha256`
approach will not work, and you will need to copy the `Cargo.lock` file of the application
to nixpkgs and continue with the next section for specifying the options of the `cargoLock`
section.
Both types of hashes are permitted when contributing to nixpkgs. The
Cargo hash is obtained by inserting a fake checksum into the
expression and building the package once. The correct checksum can

View File

@ -475,11 +475,11 @@ A script to be run by `maintainers/scripts/update.nix` when the package is match
```nix
passthru.updateScript = writeScript "update-zoom-us" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl pcre common-updater-scripts
#!nix-shell -i bash -p curl pcre2 common-updater-scripts
set -eu -o pipefail
version="$(curl -sI https://zoom.us/client/latest/zoom_x86_64.tar.xz | grep -Fi 'Location:' | pcregrep -o1 '/(([0-9]\.?)+)/')"
version="$(curl -sI https://zoom.us/client/latest/zoom_x86_64.tar.xz | grep -Fi 'Location:' | pcre2grep -o1 '/(([0-9]\.?)+)/')"
update-source-version zoom-us "$version"
'';
```

View File

@ -62,7 +62,8 @@ rec {
is32bit = { cpu = { bits = 32; }; };
is64bit = { cpu = { bits = 64; }; };
isILP32 = map (a: { abi = { abi = a; }; }) [ "n32" "ilp32" "x32" ];
isILP32 = [ { cpu = { family = "wasm"; bits = 32; }; } ] ++
map (a: { abi = { abi = a; }; }) [ "n32" "ilp32" "x32" ];
isBigEndian = { cpu = { significantByte = significantBytes.bigEndian; }; };
isLittleEndian = { cpu = { significantByte = significantBytes.littleEndian; }; };

View File

@ -3406,8 +3406,7 @@
};
chuangzhu = {
name = "Chuang Zhu";
email = "chuang@melty.land";
matrix = "@chuangzhu:matrix.org";
email = "nixos@chuang.cz";
github = "chuangzhu";
githubId = 31200881;
keys = [{
@ -4670,6 +4669,12 @@
githubId = 13730968;
name = "Justin Restivo";
};
dietmarw = {
name = "Dietmar Winkler";
email = "dietmar.winkler@dwe.no";
github = "dietmarw";
githubId = 9332;
};
diffumist = {
email = "git@diffumist.me";
github = "Diffumist";
@ -6774,6 +6779,12 @@
githubId = 127353;
name = "Geoffrey Huntley";
};
gigahawk = {
email = "Jasper Chan";
name = "jasperchan515@gmail.com";
github = "Gigahawk";
githubId = 10356230;
};
gigglesquid = {
email = "jack.connors@protonmail.com";
github = "gigglesquid";
@ -12064,6 +12075,12 @@
github = "michaelBelsanti";
githubId = 62124625;
};
michaelBrunner = {
email = "michael.brunn3r@gmail.com";
name = "Michael Brunner";
github = "MichaelBrunn3r";
githubId = 19626539;
};
michaelCTS = {
email = "michael.vogel@cts.co";
name = "Michael Vogel";
@ -17255,6 +17272,12 @@
githubId = 3789764;
name = "skykanin";
};
skyrina = {
email = "sorryu02@gmail.com";
github = "skyrina";
githubId = 116099351;
name = "Skylar";
};
slam-bert = {
github = "slam-bert";
githubId = 106779009;
@ -20920,6 +20943,12 @@
githubId = 81353;
name = "Alexandre Macabies";
};
zoriya = {
email = "zoe.roux@zoriya.dev";
github = "zoriya";
githubId = 32224410;
name = "Zoe Roux";
};
zowoq = {
github = "zowoq";
githubId = 59103226;

View File

@ -77,7 +77,7 @@ Linux foo 3.4.82 #1-NixOS SMP Thu Mar 20 14:44:05 UTC 2014 x86_64 GNU/Linux
There are several ways to change the configuration of the container.
First, on the host, you can edit
`/var/lib/container/name/etc/nixos/configuration.nix`, and run
`/var/lib/nixos-containers/foo/etc/nixos/configuration.nix`, and run
```ShellSession
# nixos-container update foo

View File

@ -63,3 +63,42 @@ checks:
is **restart**ed with the others. If it is set, both the service and the
socket are **stop**ped and the socket is **start**ed, leaving socket
activation to start the service when it's needed.
## Sysinit reactivation {#sec-sysinit-reactivation}
[`sysinit.target`](https://www.freedesktop.org/software/systemd/man/latest/systemd.special.html#sysinit.target)
is a systemd target that encodes system initialization (i.e. early startup). A
few units that need to run very early in the bootup process are ordered to
finish before this target is reached. Probably the most notable one of these is
`systemd-tmpfiles-setup.service`. We will refer to these units as "sysinit
units".
"Normal" systemd units, by default, are ordered AFTER `sysinit.target`. In
other words, these "normal" units expect all services ordered before
`sysinit.target` to have finished without explicity declaring this dependency
relationship for each dependency. See the [systemd
bootup](https://www.freedesktop.org/software/systemd/man/latest/bootup.html)
for more details on the bootup process.
When restarting both a unit ordered before `sysinit.target` as well as one
after, this presents a problem because they would be started at the same time
as they do not explicitly declare their dependency relations.
To solve this, NixOS has an artificial `sysinit-reactivation.target` which
allows you to ensure that services ordered before `sysinit.target` are
restarted correctly. This applies both to the ordering between these sysinit
services as well as ensuring that sysinit units are restarted before "normal"
units.
To make an existing sysinit service restart correctly during system switch, you
have to declare:
```nix
systemd.services.my-sysinit = {
requiredBy = [ "sysinit-reactivation.target" ];
before = [ "sysinit-reactivation.target" ];
restartTriggers = [ config.environment.etc."my-sysinit.d".source ];
};
```
You need to configure appropriate `restartTriggers` specific to your service.

View File

@ -37,7 +37,7 @@ of actions is always the same:
- Forget about the failed state of units (`systemctl reset-failed`)
- Reload systemd (`systemctl daemon-reload`)
- Reload systemd user instances (`systemctl --user daemon-reload`)
- Set up tmpfiles (`systemd-tmpfiles --create`)
- Reactivate sysinit (`systemctl restart sysinit-reactivation.target`)
- Reload units (`systemctl reload`)
- Restart units (`systemctl restart`)
- Start units (`systemctl start`)

View File

@ -67,6 +67,12 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
- The legacy and long deprecated systemd target `network-interfaces.target` has been removed. Use `network.target` instead.
- `services.frp.settings` now generates the frp configuration file in TOML format as [recommended by upstream](https://github.com/fatedier/frp#configuration-files), instead of the legacy INI format. This has also introduced other changes in the configuration file structure and options.
- The `settings.common` section in the configuration is no longer valid and all the options form inside it now goes directly under `settings`.
- The `_` separating words in the configuration options is removed so the options are now in camel case. For example: `server_addr` becomes `serverAddr`, `server_port` becomes `serverPort` etc.
- Proxies are now defined with a new option `settings.proxies` which takes a list of proxies.
- Consult the [upstream documentation](https://github.com/fatedier/frp#example-usage) for more details on the changes.
- `mkosi` was updated to v20. Parts of the user interface have changed. Consult the
release notes of [v19](https://github.com/systemd/mkosi/releases/tag/v19) and
[v20](https://github.com/systemd/mkosi/releases/tag/v20) for a list of changes.
@ -114,6 +120,11 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
- The executable file names for `firefox-devedition`, `firefox-beta`, `firefox-esr` now matches their package names, which is consistent with the `firefox-*-bin` packages. The desktop entries are also updated so that you can have multiple editions of firefox in your app launcher.
- switch-to-configuration does not directly call systemd-tmpfiles anymore.
Instead, the new artificial sysinit-reactivation.target is introduced which
allows to restart multiple services that are ordered before sysinit.target
and respect the ordering between the services.
- The `systemd.oomd` module behavior is changed as:
- Raise ManagedOOMMemoryPressureLimit from 50% to 80%. This should make systemd-oomd kill things less often, and fix issues like [this](https://pagure.io/fedora-workstation/issue/358).
@ -128,6 +139,10 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
- `security.pam.enableSSHAgentAuth` now requires `services.openssh.authorizedKeysFiles` to be non-empty,
which is the case when `services.openssh.enable` is true. Previously, `pam_ssh_agent_auth` silently failed to work.
- The configuration format for `services.prometheus.exporters.snmp` changed with release 0.23.0.
The module now includes an optional config check, that is enabled by default, to make the change obvious before any deployment.
More information about the configuration syntax change is available in the [upstream repository](https://github.com/prometheus/snmp_exporter/blob/b75fc6b839ee3f3ccbee68bee55f1ae99555084a/auth-split-migration.md).
## Other Notable Changes {#sec-release-24.05-notable-changes}
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->

View File

@ -435,11 +435,10 @@ in rec {
automountToUnit = name: def:
{ inherit (def) aliases wantedBy requiredBy enable overrideStrategy;
text = commonUnitText def +
''
[Automount]
${attrsToSection def.automountConfig}
'';
text = commonUnitText def ''
[Automount]
${attrsToSection def.automountConfig}
'';
};
sliceToUnit = name: def:

View File

@ -9,17 +9,17 @@
# This file is made to be used as follow:
#
# $ nix-instantiate ./option-usage.nix --argstr testOption service.xserver.enable -A txtContent --eval
# $ nix-instantiate ./option-usages.nix --argstr testOption service.xserver.enable -A txtContent --eval
#
# or
#
# $ nix-build ./option-usage.nix --argstr testOption service.xserver.enable -A txt -o service.xserver.enable._txt
# $ nix-build ./option-usages.nix --argstr testOption service.xserver.enable -A txt -o service.xserver.enable._txt
#
# Other targets exists such as `dotContent`, `dot`, and `pdf`. If you are
# looking for the option usage of multiple options, you can provide a list
# as argument.
#
# $ nix-build ./option-usage.nix --arg testOptions \
# $ nix-build ./option-usages.nix --arg testOptions \
# '["boot.loader.gummiboot.enable" "boot.loader.gummiboot.timeout"]' \
# -A txt -o gummiboot.list
#

View File

@ -72,7 +72,7 @@ services.nginx = {
};
};
};
}
};
```
## Using ACME certificates in Apache/httpd {#module-security-acme-httpd}
@ -111,7 +111,7 @@ services.nginx = {
};
};
};
}
};
# Alternative config for Apache
users.users.wwwrun.extraGroups = [ "acme" ];
services.httpd = {
@ -131,7 +131,7 @@ services.httpd = {
'';
};
};
}
};
```
Now you need to configure ACME to generate a certificate.
@ -181,7 +181,7 @@ services.bind = {
extraConfig = "allow-update { key rfc2136key.example.com.; };";
}
];
}
};
# Now we can configure ACME
security.acme.acceptTerms = true;
@ -271,7 +271,7 @@ services.nginx = {
acmeRoot = null;
};
};
}
};
```
And that's it! Next time your configuration is rebuilt, or when

View File

@ -4,6 +4,25 @@ with lib;
let
cfg = config.services.prometheus.exporters.snmp;
# This ensures that we can deal with string paths, path types and
# store-path strings with context.
coerceConfigFile = file:
if (builtins.isPath file) || (lib.isStorePath file) then
file
else
(lib.warn ''
${logPrefix}: configuration file "${file}" is being copied to the nix-store.
If you would like to avoid that, please set enableConfigCheck to false.
'' /. + file);
checkConfig = file:
pkgs.runCommandLocal "checked-snmp-exporter-config.yml" {
nativeBuildInputs = [ pkgs.buildPackages.prometheus-snmp-exporter ];
} ''
ln -s ${coerceConfigFile file} $out
snmp_exporter --dry-run --config.file $out
'';
in
{
port = 9116;
@ -24,15 +43,23 @@ in
Snmp exporter configuration as nix attribute set. Mutually exclusive with 'configurationPath' option.
'';
example = {
"default" = {
"version" = 2;
"auth" = {
"community" = "public";
};
auths.public_v2 = {
community = "public";
version = 2;
};
};
};
enableConfigCheck = mkOption {
type = types.bool;
default = true;
description = lib.mdDoc ''
Whether to run a correctness check for the configuration file. This depends
on the configuration file residing in the nix-store. Paths passed as string will
be copied to the store.
'';
};
logFormat = mkOption {
type = types.enum ["logfmt" "json"];
default = "logfmt";
@ -50,9 +77,13 @@ in
};
};
serviceOpts = let
configFile = if cfg.configurationPath != null
then cfg.configurationPath
else "${pkgs.writeText "snmp-exporter-conf.yml" (builtins.toJSON cfg.configuration)}";
uncheckedConfigFile = if cfg.configurationPath != null
then cfg.configurationPath
else "${pkgs.writeText "snmp-exporter-conf.yml" (builtins.toJSON cfg.configuration)}";
configFile = if cfg.enableConfigCheck then
checkConfig uncheckedConfigFile
else
uncheckedConfigFile;
in {
serviceConfig = {
ExecStart = ''

View File

@ -4,8 +4,8 @@ with lib;
let
cfg = config.services.frp;
settingsFormat = pkgs.formats.ini { };
configFile = settingsFormat.generate "frp.ini" cfg.settings;
settingsFormat = pkgs.formats.toml { };
configFile = settingsFormat.generate "frp.toml" cfg.settings;
isClient = (cfg.role == "client");
isServer = (cfg.role == "server");
in
@ -31,17 +31,13 @@ in
default = { };
description = mdDoc ''
Frp configuration, for configuration options
see the example of [client](https://github.com/fatedier/frp/blob/dev/conf/frpc_legacy_full.ini)
or [server](https://github.com/fatedier/frp/blob/dev/conf/frps_legacy_full.ini) on github.
'';
example = literalExpression ''
{
common = {
server_addr = "x.x.x.x";
server_port = 7000;
};
}
see the example of [client](https://github.com/fatedier/frp/blob/dev/conf/frpc_full_example.toml)
or [server](https://github.com/fatedier/frp/blob/dev/conf/frps_full_example.toml) on github.
'';
example = {
serverAddr = "x.x.x.x";
serverPort = 7000;
};
};
};
};
@ -62,7 +58,7 @@ in
Type = "simple";
Restart = "on-failure";
RestartSec = 15;
ExecStart = "${cfg.package}/bin/${executableFile} -c ${configFile}";
ExecStart = "${cfg.package}/bin/${executableFile} --strict_config -c ${configFile}";
StateDirectoryMode = optionalString isServer "0700";
DynamicUser = true;
# Hardening

View File

@ -804,14 +804,14 @@ in
];
system.checks = singleton (pkgs.runCommand "xkb-validated" {
inherit (cfg.xkb) model layout variant options;
inherit (cfg.xkb) dir model layout variant options;
nativeBuildInputs = with pkgs.buildPackages; [ xkbvalidate ];
preferLocalBuild = true;
} ''
${optionalString (config.environment.sessionVariables ? XKB_CONFIG_ROOT)
"export XKB_CONFIG_ROOT=${config.environment.sessionVariables.XKB_CONFIG_ROOT}"
}
xkbvalidate "$model" "$layout" "$variant" "$options"
XKB_CONFIG_ROOT="$dir" xkbvalidate "$model" "$layout" "$variant" "$options"
touch "$out"
'');

View File

@ -889,9 +889,15 @@ while (my $f = <$list_active_users>) {
close($list_active_users) || die("Unable to close the file handle to loginctl");
# Set the new tmpfiles
print STDERR "setting up tmpfiles\n";
system("$new_systemd/bin/systemd-tmpfiles", "--create", "--remove", "--exclude-prefix=/dev") == 0 or $res = 3;
# Restart sysinit-reactivation.target.
# This target only exists to restart services ordered before sysinit.target. We
# cannot use X-StopOnReconfiguration to restart sysinit.target because then ALL
# services of the system would be restarted since all normal services have a
# default dependency on sysinit.target. sysinit-reactivation.target ensures
# that services ordered BEFORE sysinit.target get re-started in the correct
# order. Ordering between these services is respected.
print STDERR "restarting sysinit-reactivation.target\n";
system("$new_systemd/bin/systemctl", "restart", "sysinit-reactivation.target") == 0 or $res = 4;
# Before reloading we need to ensure that the units are still active. They may have been
# deactivated because one of their requirements got stopped. If they are inactive

View File

@ -569,6 +569,13 @@ in
unitConfig.X-StopOnReconfiguration = true;
};
# This target only exists so that services ordered before sysinit.target
# are restarted in the correct order, notably BEFORE the other services,
# when switching configurations.
systemd.targets.sysinit-reactivation = {
description = "Reactivate sysinit units";
};
systemd.units =
mapAttrs' (n: v: nameValuePair "${n}.path" (pathToUnit n v)) cfg.paths
// mapAttrs' (n: v: nameValuePair "${n}.service" (serviceToUnit n v)) cfg.services

View File

@ -150,6 +150,41 @@ in
"systemd-tmpfiles-setup.service"
];
# Allow systemd-tmpfiles to be restarted by switch-to-configuration. This
# service is not pulled into the normal boot process. It only exists for
# switch-to-configuration.
#
# This needs to be a separate unit because it does not execute
# systemd-tmpfiles with `--boot` as that is supposed to only be executed
# once at boot time.
#
# Keep this aligned with the upstream `systemd-tmpfiles-setup.service` unit.
systemd.services."systemd-tmpfiles-resetup" = {
description = "Re-setup tmpfiles on a system that is already running.";
requiredBy = [ "sysinit-reactivation.target" ];
after = [ "local-fs.target" "systemd-sysusers.service" "systemd-journald.service" ];
before = [ "sysinit-reactivation.target" "shutdown.target" ];
conflicts = [ "shutdown.target" ];
restartTriggers = [ config.environment.etc."tmpfiles.d".source ];
unitConfig.DefaultDependencies = false;
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
ExecStart = "systemd-tmpfiles --create --remove --exclude-prefix=/dev";
SuccessExitStatus = "DATAERR CANTCREAT";
ImportCredential = [
"tmpfiles.*"
"loging.motd"
"login.issue"
"network.hosts"
"ssh.authorized_keys.root"
];
};
};
environment.etc = {
"tmpfiles.d".source = (pkgs.symlinkJoin {
name = "tmpfiles.d";

View File

@ -150,10 +150,12 @@ in
after = [
"network-online.target"
"lxcfs.service"
] ++ (lib.optional cfg.socketActivation "incus.socket");
"incus.socket"
];
requires = [
"lxcfs.service"
] ++ (lib.optional cfg.socketActivation "incus.socket");
"incus.socket"
];
wants = [
"network-online.target"
];
@ -183,7 +185,7 @@ in
};
};
systemd.sockets.incus = lib.mkIf cfg.socketActivation {
systemd.sockets.incus = {
description = "Incus UNIX socket";
wantedBy = [ "sockets.target" ];
@ -191,7 +193,6 @@ in
ListenStream = "/var/lib/incus/unix.socket";
SocketMode = "0660";
SocketGroup = "incus-admin";
Service = "incus.service";
};
};

View File

@ -214,16 +214,14 @@ in {
LimitNPROC = "infinity";
TasksMax = "infinity";
Restart = "on-failure";
TimeoutStartSec = "${cfg.startTimeout}s";
TimeoutStopSec = "30s";
# By default, `lxd` loads configuration files from hard-coded
# `/usr/share/lxc/config` - since this is a no-go for us, we have to
# explicitly tell it where the actual configuration files are
Environment = lib.mkIf (config.virtualisation.lxc.lxcfs.enable)
"LXD_LXC_TEMPLATE_CONFIG=${pkgs.lxcfs}/share/lxc/config";
};
unitConfig.ConditionPathExists = "!/var/lib/incus/.migrated-from-lxd";
};
systemd.services.lxd-preseed = lib.mkIf (cfg.preseed != null) {

View File

@ -819,6 +819,7 @@ in {
syncthing-init = handleTest ./syncthing-init.nix {};
syncthing-many-devices = handleTest ./syncthing-many-devices.nix {};
syncthing-relay = handleTest ./syncthing-relay.nix {};
sysinit-reactivation = runTest ./sysinit-reactivation.nix;
systemd = handleTest ./systemd.nix {};
systemd-analyze = handleTest ./systemd-analyze.nix {};
systemd-binfmt = handleTestOn ["x86_64-linux"] ./systemd-binfmt.nix {};

View File

@ -18,10 +18,8 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
enable = true;
role = "server";
settings = {
common = {
bind_port = 7000;
vhost_http_port = 80;
};
bindPort = 7000;
vhostHTTPPort = 80;
};
};
};
@ -59,15 +57,16 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
enable = true;
role = "client";
settings = {
common = {
server_addr = "10.0.0.1";
server_port = 7000;
};
web = {
type = "http";
local_port = 80;
custom_domains = "10.0.0.1";
};
serverAddr = "10.0.0.1";
serverPort = 7000;
proxies = [
{
name = "web";
type = "http";
localPort = 80;
customDomains = [ "10.0.0.1" ];
}
];
};
};
};

View File

@ -6,9 +6,8 @@
}:
{
container = import ./container.nix { inherit system pkgs; };
lxd-to-incus = import ./lxd-to-incus.nix { inherit system pkgs; };
preseed = import ./preseed.nix { inherit system pkgs; };
socket-activated = import ./socket-activated.nix { inherit system pkgs; };
virtual-machine = handleTestOn [ "x86_64-linux" ] ./virtual-machine.nix {
inherit system pkgs;
};
virtual-machine = handleTestOn [ "x86_64-linux" ] ./virtual-machine.nix { inherit system pkgs; };
}

View File

@ -0,0 +1,112 @@
import ../make-test-python.nix (
{ pkgs, lib, ... }:
let
releases = import ../../release.nix { configuration.documentation.enable = lib.mkForce false; };
container-image-metadata = releases.lxdContainerMeta.${pkgs.stdenv.hostPlatform.system};
container-image-rootfs = releases.lxdContainerImage.${pkgs.stdenv.hostPlatform.system};
in
{
name = "lxd-to-incus";
meta = {
maintainers = lib.teams.lxc.members;
};
nodes.machine =
{ lib, ... }:
{
environment.systemPackages = [ pkgs.lxd-to-incus ];
virtualisation = {
diskSize = 6144;
cores = 2;
memorySize = 2048;
lxd.enable = true;
lxd.preseed = {
networks = [
{
name = "nixostestbr0";
type = "bridge";
config = {
"ipv4.address" = "10.0.100.1/24";
"ipv4.nat" = "true";
};
}
];
profiles = [
{
name = "default";
devices = {
eth0 = {
name = "eth0";
network = "nixostestbr0";
type = "nic";
};
root = {
path = "/";
pool = "nixostest_pool";
size = "35GiB";
type = "disk";
};
};
}
{
name = "nixos_notdefault";
devices = { };
}
];
storage_pools = [
{
name = "nixostest_pool";
driver = "dir";
}
];
};
incus.enable = true;
};
};
testScript = ''
def lxd_wait_for_preseed(_) -> bool:
_, output = machine.systemctl("is-active lxd-preseed.service")
return ("inactive" in output)
def lxd_instance_is_up(_) -> bool:
status, _ = machine.execute("lxc exec container --disable-stdin --force-interactive /run/current-system/sw/bin/true")
return status == 0
def incus_instance_is_up(_) -> bool:
status, _ = machine.execute("incus exec container --disable-stdin --force-interactive /run/current-system/sw/bin/true")
return status == 0
with machine.nested("initialize lxd and resources"):
machine.wait_for_unit("sockets.target")
machine.wait_for_unit("lxd.service")
retry(lxd_wait_for_preseed)
machine.succeed("lxc image import ${container-image-metadata}/*/*.tar.xz ${container-image-rootfs}/*/*.tar.xz --alias nixos")
machine.succeed("lxc launch nixos container")
retry(lxd_instance_is_up)
machine.wait_for_unit("incus.service")
with machine.nested("run migration"):
machine.succeed("lxd-to-incus --yes")
with machine.nested("verify resources migrated to incus"):
machine.succeed("incus config show container")
retry(incus_instance_is_up)
machine.succeed("incus exec container -- true")
machine.succeed("incus profile show default | grep nixostestbr0")
machine.succeed("incus profile show default | grep nixostest_pool")
machine.succeed("incus profile show nixos_notdefault")
machine.succeed("incus storage show nixostest_pool")
machine.succeed("incus network show nixostestbr0")
'';
}
)

View File

@ -1392,9 +1392,11 @@ let
snmp = {
exporterConfig = {
enable = true;
configuration.default = {
version = 2;
auth.community = "public";
configuration = {
auths.public_v2 = {
community = "public";
version = 2;
};
};
};
exporterTest = ''

View File

@ -0,0 +1,107 @@
# This runs to two scenarios but in one tests:
# - A post-sysinit service needs to be restarted AFTER tmpfiles was restarted.
# - A service needs to be restarted BEFORE tmpfiles is restarted
{ lib, ... }:
let
makeGeneration = generation: {
"${generation}".configuration = {
systemd.services.pre-sysinit-before-tmpfiles.environment.USER =
lib.mkForce "${generation}-tmpfiles-user";
systemd.services.pre-sysinit-after-tmpfiles.environment = {
NEEDED_PATH = lib.mkForce "/run/${generation}-needed-by-pre-sysinit-after-tmpfiles";
PATH_TO_CREATE = lib.mkForce "/run/${generation}-needed-by-post-sysinit";
};
systemd.services.post-sysinit.environment = {
NEEDED_PATH = lib.mkForce "/run/${generation}-needed-by-post-sysinit";
PATH_TO_CREATE = lib.mkForce "/run/${generation}-created-by-post-sysinit";
};
systemd.tmpfiles.settings.test = lib.mkForce {
"/run/${generation}-needed-by-pre-sysinit-after-tmpfiles".f.user =
"${generation}-tmpfiles-user";
};
};
};
in
{
name = "sysinit-reactivation";
meta.maintainers = with lib.maintainers; [ nikstur ];
nodes.machine = { config, lib, pkgs, ... }: {
systemd.services.pre-sysinit-before-tmpfiles = {
wantedBy = [ "sysinit.target" ];
requiredBy = [ "sysinit-reactivation.target" ];
before = [ "systemd-tmpfiles-setup.service" "systemd-tmpfiles-resetup.service" ];
unitConfig.DefaultDependencies = false;
serviceConfig.Type = "oneshot";
serviceConfig.RemainAfterExit = true;
environment.USER = "tmpfiles-user";
script = "${pkgs.shadow}/bin/useradd $USER";
};
systemd.services.pre-sysinit-after-tmpfiles = {
wantedBy = [ "sysinit.target" ];
requiredBy = [ "sysinit-reactivation.target" ];
after = [ "systemd-tmpfiles-setup.service" "systemd-tmpfiles-resetup.service" ];
unitConfig.DefaultDependencies = false;
serviceConfig.Type = "oneshot";
serviceConfig.RemainAfterExit = true;
environment = {
NEEDED_PATH = "/run/needed-by-pre-sysinit-after-tmpfiles";
PATH_TO_CREATE = "/run/needed-by-post-sysinit";
};
script = ''
if [[ -e $NEEDED_PATH ]]; then
touch $PATH_TO_CREATE
fi
'';
};
systemd.services.post-sysinit = {
wantedBy = [ "default.target" ];
serviceConfig.Type = "oneshot";
serviceConfig.RemainAfterExit = true;
environment = {
NEEDED_PATH = "/run/needed-by-post-sysinit";
PATH_TO_CREATE = "/run/created-by-post-sysinit";
};
script = ''
if [[ -e $NEEDED_PATH ]]; then
touch $PATH_TO_CREATE
fi
'';
};
systemd.tmpfiles.settings.test = {
"/run/needed-by-pre-sysinit-after-tmpfiles".f.user =
"tmpfiles-user";
};
specialisation = lib.mkMerge [
(makeGeneration "second")
(makeGeneration "third")
];
};
testScript = { nodes, ... }: ''
def switch(generation):
toplevel = "${nodes.machine.system.build.toplevel}";
machine.succeed(f"{toplevel}/specialisation/{generation}/bin/switch-to-configuration switch")
machine.wait_for_unit("default.target")
machine.succeed("test -e /run/created-by-post-sysinit")
switch("second")
machine.succeed("test -e /run/second-created-by-post-sysinit")
switch("third")
machine.succeed("test -e /run/third-created-by-post-sysinit")
'';
}

View File

@ -7,13 +7,13 @@
python3Packages.buildPythonApplication rec {
pname = "mpdevil";
version = "1.10.2";
version = "1.11.0";
src = fetchFromGitHub {
owner = "SoongNoonien";
repo = pname;
rev = "v${version}";
sha256 = "sha256-zLCL64yX7i/mtUf8CkgrSwb6zZ7vhR1Dw8eUH/vgFT4=";
rev = "refs/tags/v${version}";
sha256 = "sha256-ooNZSsVtIeueqgj9hR9OZp08qm8gGokiq8IU3U/ZV5w=";
};
format = "other";

View File

@ -14,7 +14,7 @@ let
pythonPackages = python3Packages;
pyqt5 =
if enablePlayback then
pythonPackages.pyqt5_with_qtmultimedia
pythonPackages.pyqt5-multimedia
else
pythonPackages.pyqt5;
in

View File

@ -39,7 +39,7 @@ in
font-lock-plus = callPackage ./manual-packages/font-lock-plus { };
ghc-mod = callPackage ./manual-packages/elisp-ffi { };
ghc-mod = callPackage ./manual-packages/ghc-mod { };
git-undo = callPackage ./manual-packages/git-undo { };

View File

@ -0,0 +1,25 @@
{ lib
, melpaBuild
, haskell-mode
, haskellPackages
, writeText
}:
melpaBuild {
pname = "ghc";
inherit (haskellPackages.ghc-mod) version src;
packageRequires = [ haskell-mode ];
propagatedUserEnvPkgs = [ haskellPackages.ghc-mod ];
recipe = writeText "recipe" ''
(ghc-mod :repo "DanielG/ghc-mod" :fetcher github :files ("elisp/*.el"))
'';
meta = {
description = "An extension of haskell-mode that provides completion of symbols and documentation browsing";
license = lib.licenses.bsd3;
};
}

View File

@ -3,11 +3,11 @@
stdenv.mkDerivation (finalAttrs: {
pname = "ldtk";
version = "1.5.2";
version = "1.5.3";
src = fetchurl {
url = "https://github.com/deepnight/ldtk/releases/download/v${finalAttrs.version}/ubuntu-distribution.zip";
hash = "sha256-/2exLVMdSnn/Rc2lL1ytDZ6NvYRJA6W+NT7gGzxm6Vc=";
hash = "sha256-i7HIcKs10srfvwihGdMEnnmGoqgFWNJhC6vGf81QJWY=";
};
nativeBuildInputs = [ unzip makeWrapper copyDesktopItems appimage-run ];

View File

@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, cmake
, pkg-config
@ -38,6 +39,15 @@ stdenv.mkDerivation rec {
sha256 = "sha256-d8GmVHYomDb74iSeEhJEVTHvbiVXggXg7xSqIKCUSzY=";
};
# Backport GCC 13 build fix
# FIXME: remove in next release
patches = [
(fetchpatch {
url = "https://github.com/LibreSprite/LibreSprite/commit/6ffe8472194bf5d0a73b4b2cd7f6804d3c80aa0c.patch";
hash = "sha256-5chXt0H+koofIspYsCJ7/eUxMGcCBVXJcXe3U/7F9Vc=";
})
];
nativeBuildInputs = [
cmake
pkg-config

View File

@ -969,9 +969,28 @@
dependencies = with self; [ nvim-lspconfig ];
};
nvim-spectre = super.nvim-spectre.overrideAttrs {
dependencies = with self; [ plenary-nvim ];
};
nvim-spectre = super.nvim-spectre.overrideAttrs (old:
let
spectre_oxi = rustPlatform.buildRustPackage {
pname = "spectre_oxi";
inherit (old) version src;
sourceRoot = "source/spectre_oxi";
cargoHash = "sha256-y2ZIgOApIShkIesXmItPKDO6XjFrG4GS5HCPncJUmN8=";
preCheck = ''
mkdir tests/tmp/
'';
};
in
(lib.optionalAttrs stdenv.isLinux {
dependencies = with self;
[ plenary-nvim ];
postInstall = ''
ln -s ${spectre_oxi}/lib/libspectre_oxi.* $out/lua/spectre_oxi.so
'';
}));
nvim-teal-maker = super.nvim-teal-maker.overrideAttrs {
postPatch = ''

View File

@ -1884,8 +1884,8 @@ let
mktplcRef = {
name = "Ionide-fsharp";
publisher = "Ionide";
version = "7.5.4";
sha256 = "sha256-cM3ssUzQnqt5WL8UaLYkrmfHscVa2sGa7/UWLXMIHGg=";
version = "7.17.0";
sha256 = "sha256-CC6ySeuO61O/mAkQYGoK/1cd4hlyS0vG+Lqv0HQ7K6c=";
};
meta = {
changelog = "https://marketplace.visualstudio.com/items/Ionide.Ionide-fsharp/changelog";

View File

@ -6,14 +6,13 @@
, curl
, extra-cmake-modules
, ffmpeg
, gettext
, harfbuzz
, libaio
, libbacktrace
, libpcap
, libsamplerate
, libwebp
, libXrandr
, libzip
, lz4
, makeWrapper
, pkg-config
, qtbase
@ -29,6 +28,7 @@
, wrapQtAppsHook
, xz
, zip
, zstd
}:
let
@ -36,26 +36,30 @@ let
pcsx2_patches = fetchFromGitHub {
owner = "PCSX2";
repo = "pcsx2_patches";
rev = "42d7ee72b66955e3bbd2caaeaa855f605b463722";
sha256 = "sha256-Zd+Aeps2IWVX2fS1Vyczv/wAX8Z89XnCH1eqSPdYEw8=";
rev = "619e75bb8db50325b44863f2ccf3c39470c3d5a3";
sha256 = "sha256-2KE0W3WwBJCLe8DosyDVsFtEofKgBsChpQEQe+3O+Hg=";
};
in
llvmPackages_17.stdenv.mkDerivation rec {
pname = "pcsx2";
version = "1.7.5318";
version = "1.7.5474";
src = fetchFromGitHub {
owner = "PCSX2";
repo = "pcsx2";
fetchSubmodules = true;
rev = "v${version}";
sha256 = "sha256-5SUlq3HQAzROG1yncA4u4XGVv+1I+s9FQ6LgJkiLSD0=";
sha256 = "sha256-5ZCXw6PEQ6Ed6kEP27m9O0U79uVGEFR/vwee6/dZBD8=";
};
patches = [
./define-rev.patch
];
cmakeFlags = [
"-DDISABLE_ADVANCE_SIMD=ON"
"-DUSE_LINKED_FFMPEG=ON"
"-DDISABLE_BUILD_DATE=ON"
"-DPCSX2_GIT_REV=v${version}"
];
nativeBuildInputs = [
@ -70,14 +74,13 @@ llvmPackages_17.stdenv.mkDerivation rec {
buildInputs = [
curl
ffmpeg
gettext
harfbuzz
libaio
libbacktrace
libpcap
libsamplerate
libwebp
libXrandr
libzip
lz4
qtbase
qtsvg
qttools
@ -85,9 +88,9 @@ llvmPackages_17.stdenv.mkDerivation rec {
SDL2
soundtouch
vulkan-headers
vulkan-loader
wayland
xz
zstd
]
++ cubeb.passthru.backendLibs;

View File

@ -0,0 +1,12 @@
diff --git a/cmake/Pcsx2Utils.cmake b/cmake/Pcsx2Utils.cmake
index 87f012c..052f1be 100644
--- a/cmake/Pcsx2Utils.cmake
+++ b/cmake/Pcsx2Utils.cmake
@@ -44,7 +44,6 @@ function(detect_compiler)
endfunction()
function(get_git_version_info)
- set(PCSX2_GIT_REV "")
set(PCSX2_GIT_TAG "")
set(PCSX2_GIT_HASH "")
if (GIT_FOUND AND EXISTS ${PROJECT_SOURCE_DIR}/.git)

View File

@ -1,28 +1,29 @@
{ lib, stdenv, fetchFromGitHub, makeWrapper, fetchpatch
, xorg, imlib2, libjpeg, libpng
, curl, libexif, jpegexiforient, perl
, enableAutoreload ? !stdenv.hostPlatform.isDarwin }:
{ lib
, stdenv
, fetchFromGitHub
, makeWrapper
, xorg
, imlib2
, libjpeg
, libpng
, curl
, libexif
, jpegexiforient
, perl
, enableAutoreload ? !stdenv.hostPlatform.isDarwin
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "feh";
version = "3.10.1";
version = "3.10.2";
src = fetchFromGitHub {
owner = "derf";
repo = pname;
rev = version;
hash = "sha256-1dz04RcaoP79EoE+SsatXm2wMRCbNnmAzMECYk3y3jg=";
repo = "feh";
rev = finalAttrs.version;
hash = "sha256-378rhZhpcua3UbsY0OcGKGXdMIQCuG84YjJ9vfJhZVs=";
};
patches = [
# upstream PR: https://github.com/derf/feh/pull/723
(fetchpatch {
name = "fix-right-click-buffer-overflow.patch";
url = "https://github.com/derf/feh/commit/2c31f8863b80030e772a529ade519fc2fee4a991.patch";
sha256 = "sha256-sUWS06qt1d1AyGfqKb+1BzZslYxOzur4q0ePEHcTz1g=";
})
];
outputs = [ "out" "man" "doc" ];
nativeBuildInputs = [ makeWrapper ];
@ -30,9 +31,10 @@ stdenv.mkDerivation rec {
buildInputs = [ xorg.libXt xorg.libX11 xorg.libXinerama imlib2 libjpeg libpng curl libexif ];
makeFlags = [
"PREFIX=${placeholder "out"}" "exif=1"
"PREFIX=${placeholder "out"}"
"exif=1"
] ++ lib.optional stdenv.isDarwin "verscmp=0"
++ lib.optional enableAutoreload "inotify=1";
++ lib.optional enableAutoreload "inotify=1";
installTargets = [ "install" ];
postInstall = ''
@ -49,8 +51,8 @@ stdenv.mkDerivation rec {
# released under a variant of the MIT license
# https://spdx.org/licenses/MIT-feh.html
license = licenses.mit-feh;
maintainers = with maintainers; [ viric willibutz globin ];
maintainers = with maintainers; [ gepbird globin viric willibutz ];
platforms = platforms.unix;
mainProgram = "feh";
};
}
})

View File

@ -9,7 +9,7 @@
let
pname = "1password";
version = if channel == "stable" then "8.10.23" else "8.10.24-6.BETA";
version = if channel == "stable" then "8.10.23" else "8.10.24-35.BETA";
sources = {
stable = {
@ -33,19 +33,19 @@ let
beta = {
x86_64-linux = {
url = "https://downloads.1password.com/linux/tar/beta/x86_64/1password-${version}.x64.tar.gz";
hash = "sha256-vrC+JzcRQnXTB0KDoIpYTJjoQCNFgFaZuV+8BXTwwmk=";
hash = "sha256-NO8jxXvdjDn7uTyboav8UnHfc0plHDLoKQ/FHZJqpsE=";
};
aarch64-linux = {
url = "https://downloads.1password.com/linux/tar/beta/aarch64/1password-${version}.arm64.tar.gz";
hash = "sha256-4v5gtaPWjyBs5VV5quuq77MzjcYQN1k/Ju0NYB44gYM=";
hash = "sha256-9qnODNE3kNRZyj5+2nfoz9zBmY2MqxVPo3rpLOCFAsI=";
};
x86_64-darwin = {
url = "https://downloads.1password.com/mac/1Password-${version}-x86_64.zip";
hash = "sha256-SSGg8zLiEaYFTWRb4K145nG/dDQCQw2di8bD59xoTrA=";
hash = "sha256-gU11xBIGOCRbQshOQ4ktYVgHe6dxJ0GnONkVnZkCiEE=";
};
aarch64-darwin = {
url = "https://downloads.1password.com/mac/1Password-${version}-aarch64.zip";
hash = "sha256-SgTv1gYPBAr/LPeAtHGBZUw35TegpaVW1M84maT8BdY=";
hash = "sha256-YcnVIgV+2MZOS+a+3lFuNMgnLaGVrOP53B/k70zRoTI=";
};
};
};

View File

@ -1,8 +1,8 @@
{ stdenv, lib, python3Packages, gettext, qt5, fetchFromGitHub}:
{ stdenv, lib, python3Packages, gettext, qt5, fetchFromGitHub }:
python3Packages.buildPythonApplication rec {
pname = "dupeguru";
version = "4.1.1";
version = "4.3.1";
format = "other";
@ -10,23 +10,25 @@ python3Packages.buildPythonApplication rec {
owner = "arsenetar";
repo = "dupeguru";
rev = version;
sha256 = "sha256-0lJocrNQHTrpslbPE6xjZDWhzza8cAt2js35LvicZKg=";
fetchSubmodules = true;
hash = "sha256-/jkZiCapmCLMp7WfgUmpsR8aNCfb3gBELlMYaC4e7zI=";
};
nativeBuildInputs = [
gettext
python3Packages.pyqt5
python3Packages.setuptools
qt5.wrapQtAppsHook
];
pythonPath = with python3Packages; [
propagatedBuildInputs = with python3Packages; [
hsaudiotag3k
mutagen
polib
pyqt5
pyqt5-sip
semantic-version
send2trash
sphinx
polib
hsaudiotag3k
];
makeFlags = [
@ -37,6 +39,7 @@ python3Packages.buildPythonApplication rec {
nativeCheckInputs = with python3Packages; [
pytestCheckHook
];
preCheck = ''
export HOME="$(mktemp -d)"
'';
@ -62,7 +65,7 @@ python3Packages.buildPythonApplication rec {
homepage = "https://github.com/arsenetar/dupeguru";
license = licenses.bsd3;
platforms = platforms.unix;
maintainers = [ maintainers.novoxd ];
maintainers = with maintainers; [ novoxd ];
mainProgram = "dupeguru";
};
}

View File

@ -19,15 +19,15 @@
python3.pkgs.buildPythonApplication rec {
pname = "gpu-viewer";
version = "2.26";
version = "2.32";
format = "other";
src = fetchFromGitHub {
owner = "arunsivaramanneo";
repo = pname;
rev = "v${version}";
hash = "sha256-3GYJq76g/pU8dt+OMGBeDcw47z5Xv3AGkLsACcBCELs=";
rev = "refs/tags/v${version}";
hash = "sha256-zv53tvFQ0NAqFPYp7qZVmbuM1fBJwC4t43YJDZdqSPU=";
};
nativeBuildInputs = [

View File

@ -31,6 +31,7 @@ buildFHSEnv rec {
ocl-icd # needed for opencl
numactl # needed by hfs ocl backend
ncurses5 # needed by hfs ocl backend
zstd # needed from 20.0
] ++ (with xorg; [
libICE
libSM

View File

@ -1,14 +1,11 @@
{ lib, stdenv, requireFile, callPackage}:
let
license_dir = "~/.config/houdini";
in
callPackage ./runtime-build.nix rec {
version = "19.5.569";
version = "20.0.506";
eulaDate = "2021-10-13";
src = requireFile rec {
name = "houdini-${version}-linux_x86_64_gcc9.3.tar.gz";
sha256 = "0c2d6a31c24f5e7229498af6c3a7cdf81242501d7a0792e4c33b53a898d4999e";
name = "houdini-${version}-linux_x86_64_gcc11.2.tar.gz";
sha256 = "10dcb695bf9bb6407ccfd91c67858d69864208ee97e1e9afe216abf99db549f5";
url = "https://www.sidefx.com/download/daily-builds/?production=true";
};
}

View File

@ -14,11 +14,11 @@ stdenv.mkDerivation (finalAttrs: let
in {
pname = "logseq";
version = "0.10.3";
version = "0.10.4";
src = fetchurl {
url = "https://github.com/logseq/logseq/releases/download/${version}/logseq-linux-x64-${version}.AppImage";
hash = "sha256-aduFqab5cpoXR3oFOHzsXJwogm1bZ9KgT2Mt6G9kbBA=";
hash = "sha256-vFCNhnhfxlSLeieB1DJgym5nbzPKO1ngArTUXvf+DAU=";
name = "${pname}-${version}.AppImage";
};

View File

@ -15,9 +15,9 @@
version = "2023-10-23";
};
};
hash = "sha256-yqk0bh68onWqML20Q8eDsTT9o+eKtta7kS9HL74do6Q=";
hash_deb_amd64 = "sha256-MxIyOXssQ1Ke5WZbBbB4FpDec+rn46m8+PbMdmxaQCA=";
version = "120.0.6099.216";
hash = "sha256-HFQ7QAL4hcux3jmMmLYFNym3sfWR1o1hWV75bokID4I=";
hash_deb_amd64 = "sha256-dFllEHRYH3yAPg3uaaCzdpiZxSLENEwmtIb/gg53/ZU=";
version = "120.0.6099.224";
};
ungoogled-chromium = {
deps = {
@ -28,12 +28,12 @@
version = "2023-10-23";
};
ungoogled-patches = {
hash = "sha256-qB1OrsfRCWfobKAAfcYJFmKc36ofF+VmjqPNbIPugJA=";
rev = "120.0.6099.216-1";
hash = "sha256-feMWYdxQSgn1ZTdnXTYHUBi3pV1fsaAcKjbf+qHzYnU=";
rev = "120.0.6099.224-1";
};
};
hash = "sha256-yqk0bh68onWqML20Q8eDsTT9o+eKtta7kS9HL74do6Q=";
hash_deb_amd64 = "sha256-MxIyOXssQ1Ke5WZbBbB4FpDec+rn46m8+PbMdmxaQCA=";
version = "120.0.6099.216";
hash = "sha256-HFQ7QAL4hcux3jmMmLYFNym3sfWR1o1hWV75bokID4I=";
hash_deb_amd64 = "sha256-dFllEHRYH3yAPg3uaaCzdpiZxSLENEwmtIb/gg53/ZU=";
version = "120.0.6099.224";
};
}

View File

@ -2,16 +2,16 @@
buildGoModule rec {
pname = "atmos";
version = "1.53.0";
version = "1.54.0";
src = fetchFromGitHub {
owner = "cloudposse";
repo = pname;
rev = "v${version}";
sha256 = "sha256-2T5LCtycTBnJntcKQoJqNwTczWR8bC1SBAqjMN+3Qd4=";
sha256 = "sha256-WGOuFqkrX3/5RINdsegTSxJ28W4iEMPuLVrCjtmCkTw=";
};
vendorHash = "sha256-piK9IVwGAidDhBNAEnu9hD7Ng67ZKxZMcNqgOXLCkq0=";
vendorHash = "sha256-kR13BVbjgQoEjb2xwH8LkxLeMp30h6mbWum9RbzzSGE=";
ldflags = [ "-s" "-w" "-X github.com/cloudposse/atmos/cmd.Version=v${version}" ];

View File

@ -167,9 +167,9 @@ rec {
mkTerraform = attrs: pluggable (generic attrs);
terraform_1 = mkTerraform {
version = "1.6.6";
hash = "sha256-fYFmHypzSbSgut9Wij6Sz8xR97DVOwPLQap6pan7IRA=";
vendorHash = "sha256-fQsxTX1v8HsMDIkofeCVfNitJAaTWHwppC7DniXlvT4=";
version = "1.7.0";
hash = "sha256-oF0osIC/ti9ZkWDTBIQuBHreIBVfeo4f/naGFdaMxJE=";
vendorHash = "sha256-77W0x6DENB+U3yB4LI3PwJU9bTuH7Eqz2a9FNoERuJg=";
patches = [ ./provider-path-0_15.patch ];
passthru = {
inherit plugins;

View File

@ -33,14 +33,14 @@ let
}.${system} or throwSystem;
hash = {
x86_64-linux = "sha256-8iQR6cWqDzjTRL6psiugQOdYqaEOgZnjcLN+90apWuY=";
x86_64-linux = "sha256-tn3vumHjRt5bhNnFA0k8WaJmpCQx7SJea89xf1NGhME=";
}.${system} or throwSystem;
displayname = "XPipe";
in stdenvNoCC.mkDerivation rec {
pname = "xpipe";
version = "1.7.13";
version = "1.7.14";
src = fetchzip {
url = "https://github.com/xpipe-io/xpipe/releases/download/${version}/xpipe-portable-linux-${arch}.tar.gz";

View File

@ -13,11 +13,11 @@
stdenv.mkDerivation rec {
pname = "appflowy";
version = "0.4.1";
version = "0.4.3";
src = fetchzip {
url = "https://github.com/AppFlowy-IO/appflowy/releases/download/${version}/AppFlowy-${version}-linux-x86_64.tar.gz";
hash = "sha256-9wv7/3wtR1xiOHRYXP29Qbom1Xl9xZbhCFEPf0LJitg=";
hash = "sha256-JrcqVPlFr8zD9ZSBxk9WqN7KCLKq+yCjMfA4QbIfDZE=";
stripRoot = false;
};

View File

@ -45,11 +45,11 @@
# If one wishes to use a different src or name for a very custom build
, overrideSrc ? {}
, pname ? "gnuradio"
, version ? "3.10.9.1"
, version ? "3.10.9.2"
}:
let
sourceSha256 = "sha256-prCQj2gan5udOj2vnV8Vrr8B4OwpYpzAGb9w+kkJDQc=";
sourceSha256 = "sha256-SMalZwIvATZ3rqAAqeSmf8/RJ1d9pp7NvoWO/YP0BMc=";
featuresInfo = {
# Needed always
basic = {

View File

@ -9,78 +9,123 @@
}:
let
version = "0.4.15";
release = "SR10";
branch = "simulide_0.4.14"; # the branch name does not mach the version for some reason
rev = "291";
sha256 = "sha256-BBoZr/S2pif0Jft5wrem8y00dXl08jq3kFiIUtOr3LM=";
in
mkDerivation {
pname = "simulide";
version = "${version}-${release}";
generic =
{ version
, release
, branch
, rev
, sha256
, extraPostPatch ? ""
, extraBuildInputs ? [ ]
, iconPath ? "resources/icons/simulide.png"
, installFiles ? ''
cp -r data examples $out/share/simulide
cp simulide $out/bin/simulide
''
}:
mkDerivation {
pname = "simulide";
version = "${version}-${release}";
src = fetchbzr {
url = "https://code.launchpad.net/~arcachofo/simulide/${branch}";
inherit rev sha256;
src = fetchbzr {
url = "https://code.launchpad.net/~arcachofo/simulide/${branch}";
inherit rev sha256;
};
postPatch = ''
sed -i resources/simulide.desktop \
-e "s|^Exec=.*$|Exec=simulide|" \
-e "s|^Icon=.*$|Icon=simulide|"
# Note: older versions don't have REV_NO
sed -i SimulIDE.pro \
-e "s|^VERSION = .*$|VERSION = ${version}|" \
-e "s|^RELEASE = .*$|RELEASE = -${release}|" \
-e "s|^REV_NO = .*$|REV_NO = ${rev}|" \
-e "s|^BUILD_DATE = .*$|BUILD_DATE = ??-??-??|"
${extraPostPatch}
'';
preConfigure = ''
cd build_XX
'';
nativeBuildInputs = [
qmake
];
buildInputs = [
qtserialport
qtmultimedia
qttools
] ++ extraBuildInputs;
installPhase = ''
runHook preInstall
install -Dm644 ../resources/simulide.desktop $out/share/applications/simulide.desktop
install -Dm644 ../${iconPath} $out/share/icons/hicolor/256x256/apps/simulide.png
mkdir -p $out/share/simulide $out/bin
pushd executables/SimulIDE_*
${installFiles}
popd
runHook postInstall
'';
meta = {
description = "A simple real time electronic circuit simulator";
longDescription = ''
SimulIDE is a simple real time electronic circuit simulator, intended for hobbyist or students
to learn and experiment with analog and digital electronic circuits and microcontrollers.
It supports PIC, AVR, Arduino and other MCUs and MPUs.
'';
homepage = "https://simulide.com/";
license = lib.licenses.gpl3Only;
mainProgram = "simulide";
maintainers = with lib.maintainers; [ carloscraveiro tomasajt ];
platforms = [ "x86_64-linux" ];
};
};
in
{
simulide_0_4_15 = generic {
version = "0.4.15";
release = "SR10";
branch = "simulide_0.4.14"; # the branch name does not mach the version for some reason
rev = "291";
sha256 = "sha256-BBoZr/S2pif0Jft5wrem8y00dXl08jq3kFiIUtOr3LM=";
extraPostPatch = ''
# GCC 13 needs the <cstdint> header explicitly included
sed -i src/gpsim/value.h -e '1i #include <cstdint>'
sed -i src/gpsim/modules/watchdog.h -e '1i #include <cstdint>'
'';
extraBuildInputs = [ qtscript ];
iconPath = "resources/icons/hicolor/256x256/simulide.png"; # upstream had a messed up icon path in this release
installFiles = ''
cp -r share/simulide/* $out/share/simulide
cp bin/simulide $out/bin/simulide
'';
};
postPatch = ''
# GCC 13 needs this header explicitly included
sed -i src/gpsim/value.h -e '1i #include <cstdint>'
sed -i src/gpsim/modules/watchdog.h -e '1i #include <cstdint>'
simulide_1_0_0 = generic {
version = "1.0.0";
release = "SR2";
branch = "1.0.0";
rev = "1449";
sha256 = "sha256-rJWZvnjVzaKXU2ktbde1w8LSNvu0jWkDIk4dq2l7t5g=";
extraBuildInputs = [ qtscript ];
};
sed -i resources/simulide.desktop \
-e "s|^Exec=.*$|Exec=simulide|" \
-e "s|^Icon=.*$|Icon=simulide|"
sed -i SimulIDE.pro \
-e "s|^VERSION = .*$|VERSION = ${version}|" \
-e "s|^RELEASE = .*$|RELEASE = -${release}|" \
-e "s|^REV_NO = .*$|REV_NO = ${rev}|" \
-e "s|^BUILD_DATE = .*$|BUILD_DATE = ??-??-??|"
'';
preConfigure = ''
cd build_XX
'';
nativeBuildInputs = [
qmake
];
buildInputs = [
qtserialport
qtmultimedia
qttools
qtscript
];
installPhase = ''
runHook preInstall
install -Dm644 ../resources/simulide.desktop $out/share/applications/simulide.desktop
install -Dm644 ../resources/icons/hicolor/256x256/simulide.png $out/share/icons/hicolor/256x256/apps/simulide.png
mkdir -p $out/share/simulide $out/bin
pushd executables/SimulIDE_*
cp -r share/simulide/* $out/share/simulide
cp bin/simulide $out/bin/simulide
popd
runHook postInstall
'';
meta = with lib; {
description = "A simple real time electronic circuit simulator";
longDescription = ''
SimulIDE is a simple real time electronic circuit simulator, intended for hobbyist or students
to learn and experiment with analog and digital electronic circuits and microcontrollers.
It supports PIC, AVR, Arduino and other MCUs and MPUs.
'';
homepage = "https://simulide.com/";
license = licenses.gpl3Only;
mainProgram = "simulide";
maintainers = with maintainers; [ carloscraveiro tomasajt ];
platforms = ["x86_64-linux"];
simulide_1_1_0 = generic {
version = "1.1.0";
release = "RC1";
# The 1.1.0 branch didn't get merged correctly from trunk
# See: https://simulide.com/p/forum/topic/new-files-missing-from-1-1-0-rc1-after-merge
branch = "trunk";
rev = "2162";
sha256 = "sha256-bgRAqt7h2LtU2Ze6Jiz8APhyPcV15v4ofxIilIeZV9E=";
};
}

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "easycrypt";
version = "2023.09";
version = "2024.01";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "r${version}";
hash = "sha256-9xavU9jRisZekPqC87EyiLXtZCGu/9QeGzq6BJGt1+Y=";
hash = "sha256-UYDoVMi5TtYxgPq5nkp/oRtcMcHl2p7KAG8ptvuOL5U=";
};
nativeBuildInputs = with ocamlPackages; [

View File

@ -6,14 +6,18 @@
python3.pkgs.buildPythonApplication rec {
pname = "snakemake";
version = "8.0.1";
version = "8.2.1";
format = "setuptools";
src = fetchFromGitHub {
owner = "snakemake";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-F4c/lgp7J6LLye+f3FpzaXz3zM7R+jXxTziPlVbxFxA=";
hash = "sha256-NpsDJuxH+NHvE735OCHaISPSOhYDxWiKqCb4Yk9DHf4=";
# https://github.com/python-versioneer/python-versioneer/issues/217
postFetch = ''
sed -i "$out"/snakemake/_version.py -e 's#git_refnames = ".*"#git_refnames = " (tag: v${version})"#'
'';
};
postPatch = ''

View File

@ -2,13 +2,13 @@
buildGoModule rec {
pname = "gh";
version = "2.41.0";
version = "2.42.1";
src = fetchFromGitHub {
owner = "cli";
repo = "cli";
rev = "v${version}";
hash = "sha256-GkrEirunY17WgAv4XOreG+JwPQn7cRTmr7hJ3/2tSrY=";
hash = "sha256-5kTBOWdL31UfFDp8XC+lc2vJrXZ0PBJafXyczMPn59o=";
};
vendorHash = "sha256-XBoC1sHfxInkamSHNm7Vb3AKCgIch6uYx0jJWqN7PN8=";

View File

@ -54,11 +54,18 @@ in python.pkgs.buildPythonApplication rec {
owner = "ManimCommunity";
repo = "manim";
rev = "refs/tags/v${version}";
sha256 = "sha256-TI7O0b1JvUZAxTj6XfpAJKhbGqrGnhcrE9eRJUVx4GM=";
hash = "sha256-TI7O0b1JvUZAxTj6XfpAJKhbGqrGnhcrE9eRJUVx4GM=";
};
nativeBuildInputs = with python.pkgs; [
poetry-core
pythonRelaxDepsHook
];
pythonRelaxDeps = [
"cloup"
"pillow"
"skia-pathops"
];
patches = [
@ -67,8 +74,7 @@ in python.pkgs.buildPythonApplication rec {
postPatch = ''
substituteInPlace pyproject.toml \
--replace "--no-cov-on-fail --cov=manim --cov-report xml --cov-report term" "" \
--replace 'cloup = "^0.13.0"' 'cloup = "*"' \
--replace "--no-cov-on-fail --cov=manim --cov-report xml --cov-report term" ""
'';
buildInputs = [ cairo ];

View File

@ -23,13 +23,13 @@
stdenv.mkDerivation rec {
pname = "advanced-scene-switcher";
version = "1.24.0";
version = "1.24.2";
src = fetchFromGitHub {
owner = "WarmUpTill";
repo = "SceneSwitcher";
rev = version;
hash = "sha256-Xnf8Vz6I5EfiiVoG0JRd0f0IJHw1IVkTLL4Th/hWYrc=";
hash = "sha256-J5Qcs2eoKMeO1O/MCsR5wfmfbtndRaZmHrbleEZqqOo=";
};
nativeBuildInputs = [

View File

@ -4,13 +4,13 @@ stdenv.mkDerivation rec {
pname = "obs-ndi";
version = "4.13.0";
nativeBuildInputs = [ cmake ];
nativeBuildInputs = [ cmake qtbase ];
buildInputs = [ obs-studio qtbase ndi ];
src = fetchFromGitHub {
owner = "Palakis";
repo = "obs-ndi";
rev = "dummy-tag-${version}";
rev = version;
sha256 = "sha256-ugAMSTXbbIZ61oWvoggVJ5kZEgp/waEcWt89AISrSdE=";
};
@ -19,8 +19,8 @@ stdenv.mkDerivation rec {
];
postPatch = ''
# Add path (variable added in hardcode-ndi-path.patch)
sed -i -e s,@NDI@,${ndi},g src/obs-ndi.cpp
# Add path (variable added in hardcode-ndi-path.patch
sed -i -e s,@NDI@,${ndi},g src/plugin-main.cpp
# Replace bundled NDI SDK with the upstream version
# (This fixes soname issues)
@ -28,12 +28,7 @@ stdenv.mkDerivation rec {
ln -s ${ndi}/include lib/ndi
'';
postInstall = ''
mkdir $out/lib $out/share
mv $out/obs-plugins/64bit $out/lib/obs-plugins
rm -rf $out/obs-plugins
mv $out/data $out/share/obs
'';
cmakeFlags = [ "-DENABLE_QT=ON" ];
dontWrapQtApps = true;

View File

@ -1,19 +1,16 @@
diff --git a/src/obs-ndi.cpp b/src/obs-ndi.cpp
index 1a8aeb3..9a36ea9 100644
--- a/src/obs-ndi.cpp
+++ b/src/obs-ndi.cpp
@@ -132,13 +132,7 @@ const NDIlib_v5 *load_ndilib()
const char *redistFolder = std::getenv(NDILIB_REDIST_FOLDER);
if (redistFolder)
libraryLocations.push_back(redistFolder);
diff --git a/src/plugin-main.cpp b/src/plugin-main.cpp
index 0d94add..617af73 100644
--- a/src/plugin-main.cpp
+++ b/src/plugin-main.cpp
@@ -244,10 +244,7 @@ const NDIlib_v4 *load_ndilib()
if (!path.isEmpty()) {
locations << path;
}
-#if defined(__linux__) || defined(__APPLE__)
- libraryLocations.push_back("/usr/lib");
- libraryLocations.push_back("/usr/lib64");
- libraryLocations.push_back("/usr/lib/x86_64-linux-gnu");
- libraryLocations.push_back("/usr/local/lib");
- libraryLocations.push_back("/usr/local/lib64");
- locations << "/usr/lib";
- locations << "/usr/local/lib";
-#endif
+ libraryLocations.push_back("@NDI@/lib");
for (std::string path : libraryLocations) {
blog(LOG_DEBUG, "[load_ndilib] Trying library path: '%s'", path.c_str());
+ locations << "@NDI@/lib";
for (QString location : locations) {
path = QDir::cleanPath(
QDir(location).absoluteFilePath(NDILIB_LIBRARY_NAME));

View File

@ -1,7 +1,7 @@
{ mkDerivation, lib, fetchbzr, python3, rtmpdump }:
let
pythonEnv = python3.withPackages (ps: with ps; [ m3u8 pyqt5_with_qtmultimedia ]);
pythonEnv = python3.withPackages (ps: with ps; [ m3u8 pyqt5-multimedia ]);
in mkDerivation {
pname = "qarte";
version = "5.5.0";

View File

@ -3,8 +3,10 @@
, fetchFromGitHub
, cmake
, file
, hyprlang
, libGL
, libjpeg
, libwebp
, mesa
, pango
, pkg-config
@ -15,13 +17,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "hyprpaper";
version = "0.5.0";
version = "0.6.0";
src = fetchFromGitHub {
owner = "hyprwm";
repo = finalAttrs.pname;
rev = "v${finalAttrs.version}";
hash = "sha256-tcHtiyDtLky3lBk5cTmpHRSSbo1IjqOwf+q6Lofz5qM=";
hash = "sha256-mqxnaNiCVJS88Dk4V1v2wdS0RaCbOk8HFOUUbp0Uiy0=";
};
nativeBuildInputs = [
@ -32,8 +34,10 @@ stdenv.mkDerivation (finalAttrs: {
buildInputs = [
file
hyprlang
libGL
libjpeg
libwebp
mesa
pango
wayland

View File

@ -3,36 +3,26 @@
{ name
, description ? ""
, deps ? []
}:
, ...
}@args:
let
nuget-source = stdenvNoCC.mkDerivation {
inherit name;
stdenvNoCC.mkDerivation (lib.recursiveUpdate {
inherit name;
nativeBuildInputs = [ python3 ];
nativeBuildInputs = [ python3 ];
buildCommand = ''
mkdir -p $out/{lib,share}
buildCommand = ''
mkdir -p $out/{lib,share}
# use -L to follow symbolic links. When `projectReferences` is used in
# buildDotnetModule, one of the deps will be a symlink farm.
find -L ${lib.concatStringsSep " " deps} -type f -name '*.nupkg' -exec \
ln -s '{}' -t $out/lib ';'
# use -L to follow symbolic links. When `projectReferences` is used in
# buildDotnetModule, one of the deps will be a symlink farm.
find -L ${lib.concatStringsSep " " deps} -type f -name '*.nupkg' -exec \
ln -s '{}' -t $out/lib ';'
# Generates a list of all licenses' spdx ids, if available.
# Note that this currently ignores any license provided in plain text (e.g. "LICENSE.txt")
python ${./extract-licenses-from-nupkgs.py} $out/lib > $out/share/licenses
'';
# Generates a list of all licenses' spdx ids, if available.
# Note that this currently ignores any license provided in plain text (e.g. "LICENSE.txt")
python ${./extract-licenses-from-nupkgs.py} $out/lib > $out/share/licenses
'';
meta.description = description;
} // { # We need data from `$out` for `meta`, so we have to use overrides as to not hit infinite recursion.
meta = nuget-source.meta // {
licenses = let
# TODO: avoid IFD
depLicenses = lib.splitString "\n" (builtins.readFile "${nuget-source}/share/licenses");
in lib.flatten (lib.forEach depLicenses (spdx:
lib.optionals (spdx != "") (lib.getLicenseFromSpdxId spdx)
));
};
};
in nuget-source
meta.description = description;
} (removeAttrs args [ "name" "description" "deps" ]))

View File

@ -5,14 +5,14 @@
python3.pkgs.buildPythonApplication rec {
pname = "arjun";
version = "2.2.1";
version = "2.2.2";
pyproject = true;
src = fetchFromGitHub {
owner = "s0md3v";
repo = "Arjun";
rev = "refs/tags/${version}";
hash = "sha256-YxfUlD7aBwoYYsZE0zTZxoXg1TgU2yT1V+mglmsXtlo=";
hash = "sha256-odVUFs517RSp66MymniSeTKTntQtXomjC68Hhdsglf0=";
};
nativeBuildInputs = with python3.pkgs; [

View File

@ -0,0 +1,28 @@
{ lib
, fetchFromGitHub
, buildGoPackage
}:
buildGoPackage rec {
pname = "assetfinder";
version = "0.1.1";
goPackagePath = "github.com/tomnomnom/assetfinder";
src = fetchFromGitHub {
owner = "tomnomnom";
repo = "assetfinder";
rev = "v${version}";
hash = "sha256-7+YF1VXBcFehKw9JzurmXNu8yeZPdqfQEuaqwtR4AuA=";
};
meta = with lib; {
homepage = "https://github.com/tomnomnom/assetfinder";
description = "Find domains and subdomains related to a given domain";
mainProgram = "assetfinder";
maintainers = with maintainers; [ shard7 ];
platforms = platforms.unix;
sourceProvenance = with sourceTypes; [ fromSource binaryNativeCode ];
license = with licenses; [ mit ];
};
}

View File

@ -15,19 +15,19 @@
let
nodejs = nodejs_18;
source = builtins.fromJSON (builtins.readFile ./source.json);
pname = "audiobookshelf";
version = "2.7.1";
src = fetchFromGitHub {
owner = "advplyr";
repo = pname;
rev = "v${version}";
sha256 = "sha256-ROxVAevnxCyND/h1yyXfUeK9v5SEULL8gkR3flTmmW8=";
rev = "refs/tags/v${source.version}";
inherit (source) hash;
};
client = buildNpmPackage {
pname = "${pname}-client";
inherit version;
inherit (source) version;
src = runCommand "cp-source" {} ''
cp -r ${src}/client $out
@ -36,7 +36,7 @@ let
NODE_OPTIONS = "--openssl-legacy-provider";
npmBuildScript = "generate";
npmDepsHash = "sha256-2t/+IpmgTZglh3SSuYZNUvT1RZCDZGVT2gS57KU1mqA=";
npmDepsHash = source.clientDepsHash;
};
wrapper = import ./wrapper.nix {
@ -44,14 +44,15 @@ let
};
in buildNpmPackage {
inherit pname version src;
inherit pname src;
inherit (source) version;
buildInputs = [ util-linux ];
nativeBuildInputs = [ python3 ];
dontNpmBuild = true;
npmInstallFlags = [ "--only-production" ];
npmDepsHash = "sha256-1VVFGc4RPE0FHQX1PeRnvU3cAq9eRYGfJ/0GzMy7Fh4=";
npmDepsHash = source.depsHash;
installPhase = ''
mkdir -p $out/opt/client
@ -65,12 +66,14 @@ in buildNpmPackage {
chmod +x $out/bin/${pname}
'';
passthru.updateScript = ./update.nu;
meta = with lib; {
homepage = "https://www.audiobookshelf.org/";
description = "Self-hosted audiobook and podcast server";
changelog = "https://github.com/advplyr/audiobookshelf/releases/tag/v${version}";
changelog = "https://github.com/advplyr/audiobookshelf/releases/tag/v${source.version}";
license = licenses.gpl3;
maintainers = [ maintainers.jvanbruegge ];
maintainers = [ maintainers.jvanbruegge maintainers.adamcstephens ];
platforms = platforms.linux;
mainProgram = "audiobookshelf";
};

View File

@ -0,0 +1,9 @@
{
"owner": "advplyr",
"repo": "audiobookshelf",
"rev": "90f4833c9e0957f08799af15966d1909516b335e",
"hash": "sha256-m+CwUV3Bu9sHvRKCA1vFXYYRx48bxZ8N3BornO1tLQ0=",
"version": "2.7.2",
"depsHash": "sha256-1623oXtkOp43xQvHI3GbJpEQLvgr5WD5FpfNO+d0RR8=",
"clientDepsHash": "sha256-ugf9C/L5aBTO7gCy561kV06Ihb/mg/ZW916NKngIYXI="
}

View File

@ -0,0 +1,30 @@
#!/usr/bin/env nix-shell
#!nix-shell -i nu -p nushell common-updater-scripts prefetch-npm-deps
def main [] {
let sourceFile = $"(pwd)/pkgs/by-name/au/audiobookshelf/source.json"
let tags = list-git-tags --url=https://github.com/advplyr/audiobookshelf | lines | sort --natural | str replace v ''
let latest_tag = $tags | last
let current_version = open $sourceFile | get version
if $latest_tag != $current_version {
let source = nix-prefetch-github advplyr audiobookshelf --rev $"v($latest_tag)" | from json | merge { version: $latest_tag, depsHash: "", clientDepsHash: ""}
$source | save --force $sourceFile
let srcPath = nix-build $env.PWD -A audiobookshelf.src | complete | get stdout | lines | first
print $srcPath
ls $srcPath
$source | merge {
depsHash: (prefetch-npm-deps $"($srcPath)/package-lock.json"),
clientDepsHash: (prefetch-npm-deps $"($srcPath)/client/package-lock.json")
} | save --force $sourceFile
# appease the editorconfig CI check
echo "\n" | save --append $sourceFile
}
{before: $current_version, after: $latest_tag}
}

View File

@ -0,0 +1,38 @@
{ lib
, stdenv
, fetchFromGitHub
, autoreconfHook
, openssl
}:
stdenv.mkDerivation rec {
pname = "bruteforce-salted-openssl";
version = "1.4.2";
src = fetchFromGitHub {
owner = "glv2";
repo = "bruteforce-salted-openssl";
rev = version;
hash = "sha256-ICxXdKjRP2vXdJpjn0PP0/6rw9LKju0nVOSj47TyrzY=";
};
nativeBuildInputs = [
autoreconfHook
];
buildInputs = [
openssl
];
enableParallelBuilding = true;
meta = with lib; {
description = "Try to find the password of file encrypted with OpenSSL";
homepage = "https://github.com/glv2/bruteforce-salted-openssl";
changelog = "https://github.com/glv2/bruteforce-salted-openssl/blob/${src.rev}/NEWS";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ octodi ];
mainProgram = "bruteforce-salted-openssl";
platforms = platforms.linux;
};
}

View File

@ -0,0 +1,40 @@
{ lib
, stdenv
, fetchFromGitHub
, autoreconfHook
, openssl
, db
}:
stdenv.mkDerivation rec {
pname = "bruteforce-wallet";
version = "1.5.3";
src = fetchFromGitHub {
owner = "glv2";
repo = "bruteforce-wallet";
rev = version;
hash = "sha256-1sMoVlQK3ceFOHyGeXKXUD35HmMxVX8w7qefZrzAj5k=";
};
nativeBuildInputs = [
autoreconfHook
];
buildInputs = [
openssl
db
];
enableParallelBuilding = true;
meta = with lib; {
description = "Try to find password of encrypted cryptocurrency wallet";
homepage = "https://github.com/glv2/bruteforce-wallet";
changelog = "https://github.com/glv2/bruteforce-wallet/blob/${src.rev}/NEWS";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ octodi ];
mainProgram = "bruteforce-wallet";
platforms = platforms.linux;
};
}

View File

@ -0,0 +1,24 @@
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule {
pname = "c-for-go";
version = "unstable-2023-09-06";
src = fetchFromGitHub {
owner = "xlab";
repo = "c-for-go";
# c-for-go is not versioned upstream, so we pin it to a commit hash.
rev = "a1822f0a09c1c6c89fc12aeb691a27b3221c73f3";
hash = "sha256-P7lrAVyZ6fV63gVvLvsKt14pi32Pr2eVLT2mTdHHdrQ=";
};
vendorHash = "sha256-u/GWniw5UQBOtnj3ErdxL80j2Cv6cbMwvP1im3dZ2cM=";
meta = with lib; {
homepage = "https://github.com/xlab/c-for-go";
description = "Automatic C-Go Bindings Generator for the Go Programming Language";
license = licenses.mit;
maintainers = with maintainers; [ msanft ];
mainProgram = "c-for-go";
};
}

View File

@ -13,10 +13,10 @@ let
}.${system} or throwSystem;
hash = {
x86_64-linux = "sha256-zJsgYjmnGT9Ye5hnhqtv5piGM1/HT+DFhVivKLlvE1Q=";
aarch64-linux = "sha256-RjIiSgSxkejS+Dun1xMCZ6C9SPH9AahudQMICH3thC0=";
x86_64-darwin = "sha256-PrfHusjA6o1L60eMblnydTKAYe8vKvK2W3jQZYp5dPc=";
aarch64-darwin = "sha256-LpyXsdjPpdoIqFzm3sLOlBBQdJgrNl8cPehNAVqFvXg=";
x86_64-linux = "sha256-vr/c7kYXoKlZh7+f1ZPHcmIGw0nB8x1wJt/iR2F9bQI=";
aarch64-linux = "sha256-mKLbxj5LSztjHtLWdZFlW4T6S+kN56SZnJNxKZDQIQ4=";
x86_64-darwin = "sha256-AllKEadf+1s3XGCXD0PRycvDUyYNL6HLaViBwwaYswU=";
aarch64-darwin = "sha256-6Pik3uYLfbeAW4Q4ZxJFt90IH+jhXWKY6kpDA6NAmaA=";
}.${system} or throwSystem;
bin = "$out/bin/codeium_language_server";
@ -24,7 +24,7 @@ let
in
stdenv.mkDerivation (finalAttrs: {
pname = "codeium";
version = "1.6.22";
version = "1.6.23";
src = fetchurl {
name = "${finalAttrs.pname}-${finalAttrs.version}.gz";
url = "https://github.com/Exafunction/codeium/releases/download/language-server-v${finalAttrs.version}/language_server_${plat}.gz";

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,6 @@
lib,
stdenv,
fetchFromGitHub,
rust,
rustPlatform,
cmake,
makeBinaryWrapper,
@ -21,13 +20,13 @@
rustPlatform.buildRustPackage rec {
pname = "cosmic-edit";
version = "unstable-2023-11-29";
version = "0-unstable-2024-01-12";
src = fetchFromGitHub {
owner = "pop-os";
repo = pname;
rev = "4a3dd101f35eb3c1c585f104d78ed4ee31d393d3";
hash = "sha256-pk+4u13oWZ4fgXy1tlDgq+E4J+UddjTNSexMm4dgBSo=";
rev = "c1944f9c15812ce842c91a77e228cc22a0f49f18";
hash = "sha256-wJnBfBQKYmpJBSboGKtlwew17clE60ac2AismIe1XaA=";
};
cargoLock = {
@ -35,8 +34,10 @@ rustPlatform.buildRustPackage rec {
outputHashes = {
"accesskit-0.11.0" = "sha256-xVhe6adUb8VmwIKKjHxwCwOo5Y1p3Or3ylcJJdLDrrE=";
"atomicwrites-0.4.2" = "sha256-QZSuGPrJXh+svMeFWqAXoqZQxLq/WfIiamqvjJNVhxA=";
"cosmic-config-0.1.0" = "sha256-wBliqZbRHYiwZmu0vHeIP5DFzg/1IeQP3aMxiYC88bo=";
"cosmic-text-0.10.0" = "sha256-fE5HkhITLw0OBfFLFMsKEJw5idO265i4S7qylHTt7C0=";
"cosmic-config-0.1.0" = "sha256-GHjoLGF9hFJRpf5i+TwflRnh8N+oWyWZ9fqgRFLXQsw=";
"cosmic-syntax-theme-0.1.0" = "sha256-9Vf2s5Ry2hco80EbXOuVLwvOWygRiuaRD4tTImWooSg=";
"cosmic-text-0.10.0" = "sha256-PHz5jUecK889E88Y20XUe2adTUO8ElnoV7IIcaohMUw=";
"glyphon-0.3.0" = "sha256-JGkNIfj1HjOF8kGxqJPNq/JO+NhZD6XrZ4KmkXEP6Xc=";
"sctk-adwaita-0.5.4" = "sha256-yK0F2w/0nxyKrSiHZbx7+aPNY2vlFs7s8nu/COp2KqQ=";
"softbuffer-0.3.3" = "sha256-eKYFVr6C1+X6ulidHIu9SP591rJxStxwL9uMiqnXx4k=";
"smithay-client-toolkit-0.16.1" = "sha256-z7EZThbh7YmKzAACv181zaEZmWxTrMkFRzP0nfsHK6c=";
@ -50,12 +51,7 @@ rustPlatform.buildRustPackage rec {
substituteInPlace justfile --replace '#!/usr/bin/env' "#!$(command -v env)"
'';
nativeBuildInputs = [
cmake
just
pkg-config
makeBinaryWrapper
];
nativeBuildInputs = [ just pkg-config makeBinaryWrapper ];
buildInputs = [
libxkbcommon
xorg.libX11
@ -75,9 +71,7 @@ rustPlatform.buildRustPackage rec {
(placeholder "out")
"--set"
"bin-src"
"target/${
rust.lib.toRustTargetSpecShort stdenv.hostPlatform
}/release/cosmic-edit"
"target/${stdenv.hostPlatform.rust.cargoShortTarget}/release/cosmic-edit"
];
# LD_LIBRARY_PATH can be removed once tiny-xlib is bumped above 0.2.2
@ -91,7 +85,7 @@ rustPlatform.buildRustPackage rec {
homepage = "https://github.com/pop-os/cosmic-edit";
description = "Text Editor for the COSMIC Desktop Environment";
license = licenses.gpl3Only;
maintainers = with maintainers; [ ahoneybun ];
maintainers = with maintainers; [ ahoneybun nyanbinary ];
platforms = platforms.linux;
};
}

View File

@ -10,8 +10,6 @@
just,
pkg-config,
libxkbcommon,
glib,
gtk3,
libinput,
fontconfig,
freetype,
@ -63,8 +61,6 @@ rustPlatform.buildRustPackage rec {
fontconfig
freetype
wayland
glib
gtk3
];
dontUseJustBuild = true;
@ -84,7 +80,7 @@ rustPlatform.buildRustPackage rec {
postInstall = ''
wrapProgram "$out/bin/${pname}" \
--suffix XDG_DATA_DIRS : "${cosmic-icons}/share" \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ xorg.libX11 wayland libxkbcommon ]}
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ xorg.libX11 xorg.libXcursor xorg.libXrandr xorg.libXi wayland libxkbcommon ]}
'';
meta = with lib; {

View File

@ -0,0 +1,18 @@
{ buildDotnetGlobalTool, lib }:
buildDotnetGlobalTool {
pname = "csharpier";
version = "0.27.0";
executables = "dotnet-csharpier";
nugetSha256 = "sha256-aI8sZoUXAA/bOn7ITMkBFXHeTVRm9O/qX+bWfOKwRDs=";
meta = with lib; {
description = "An opinionated code formatter for C#";
homepage = "https://csharpier.com/";
changelog = "https://github.com/belav/csharpier/blob/main/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ zoriya ];
mainProgram = "dotnet-csharpier";
};
}

View File

@ -5,16 +5,16 @@
buildGoModule rec {
pname = "flarectl";
version = "0.85.0";
version = "0.86.0";
src = fetchFromGitHub {
owner = "cloudflare";
repo = "cloudflare-go";
rev = "v${version}";
hash = "sha256-mXbWiHU28MlcYbS+RLHToJZpVMWsQ7qY6dAyY+ulwjw=";
hash = "sha256-BGjay9DTlIU563bCSjprq5YwF47Xqj+ZulCda5t2t5I=";
};
vendorHash = "sha256-v6xhhufqxfFvY3BpcM6Qvpljf/vE8ZwPG47zhx+ilb0=";
vendorHash = "sha256-Bn2SDvFWmmMYDpOe+KBuzyTZLpdDtYDPc8HixgEgX+M=";
subPackages = [ "cmd/flarectl" ];

View File

@ -0,0 +1,70 @@
{ lib
, blueprint-compiler
, desktop-file-utils
, fetchFromGitHub
, gjs
, glib
, glib-networking
, gtk4
, libadwaita
, libportal
, libsecret
, libsoup_3
, meson
, ninja
, pkg-config
, stdenv
, wrapGAppsHook4
}:
stdenv.mkDerivation rec {
pname = "forge-sparks";
version = "0.2.0";
src = fetchFromGitHub {
owner = "rafaelmardojai";
repo = pname;
rev = version;
hash = "sha256-kUvUAJLCqIQpjm8RzAZaHVkdDCD9uKSQz9cYN60xS+4=";
fetchSubmodules = true;
};
patches = [
# XdpGtk4 is imported but not used so we remove it to avoid the dependence on libportal-gtk4
./remove-xdpgtk4-import.patch
];
postPatch = ''
patchShebangs troll/gjspack/bin/gjspack
'';
nativeBuildInputs = [
blueprint-compiler
desktop-file-utils
gjs
meson
ninja
pkg-config
wrapGAppsHook4
];
buildInputs = [
glib
glib-networking
gtk4
libadwaita
libportal
libsecret
libsoup_3
];
meta = with lib; {
description = "Get Git forges notifications";
homepage = "https://github.com/rafaelmardojai/forge-sparks";
changelog = "https://github.com/rafaelmardojai/forge-sparks/releases/tag/${version}";
license = licenses.mit;
maintainers = with maintainers; [ michaelgrahamevans ];
mainProgram = "forge-sparks";
platforms = platforms.linux;
};
}

View File

@ -0,0 +1,12 @@
diff --git a/src/util.js b/src/util.js
index d37e42f..9e57ad5 100644
--- a/src/util.js
+++ b/src/util.js
@@ -4,7 +4,6 @@ import Gio from 'gi://Gio';
import GLib from 'gi://GLib';
import Soup from 'gi://Soup';
import Xdp from 'gi://Xdp';
-import XdpGtk4 from 'gi://XdpGtk4';
import { gettext as _, ngettext } from 'gettext';
const Format = imports.format;

View File

@ -0,0 +1,62 @@
{ lib
, blueprint-compiler
, cargo
, desktop-file-utils
, fetchFromGitHub
, glib
, gtk4
, libadwaita
, meson
, ninja
, pkg-config
, rustPlatform
, rustc
, stdenv
, wrapGAppsHook4
}:
stdenv.mkDerivation rec {
pname = "fretboard";
version = "5.3";
src = fetchFromGitHub {
owner = "bragefuglseth";
repo = pname;
rev = "v${version}";
hash = "sha256-wwq4Xq6IVLF2hICk9HfCpfxpWer8PNWywD8p3wQdp6U=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-H/dAKaYHxRmldny8EoasrcDROZhLo5UbHPAoMicDehA=";
};
nativeBuildInputs = [
blueprint-compiler
cargo
desktop-file-utils
meson
ninja
pkg-config
rustPlatform.cargoSetupHook
rustc
wrapGAppsHook4
];
buildInputs = [
glib
gtk4
libadwaita
];
meta = with lib; {
description = "Look up guitar chords";
homepage = "https://github.com/bragefuglseth/fretboard";
changelog = "https://github.com/bragefuglseth/fretboard/releases/tag/v${version}";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ michaelgrahamevans ];
mainProgram = "fretboard";
platforms = platforms.linux;
};
}

View File

@ -0,0 +1,54 @@
{ lib
, fetchFromGitHub
, buildGoModule
, oath-toolkit
, openldap
}:
buildGoModule rec {
pname = "glauth";
version = "2.3.0";
src = fetchFromGitHub {
owner = "glauth";
repo = "glauth";
rev = "v${version}";
hash = "sha256-XYNNR3bVLNtAl+vbGRv0VhbLf+em8Ay983jqcW7KDFU=";
};
vendorHash = "sha256-SFmGgxDokIbVl3ANDPMCqrB0ck8Wyva2kSV2mgNRogo=";
nativeCheckInputs = [
oath-toolkit
openldap
];
modRoot = "v2";
# Disable go workspaces to fix build.
env.GOWORK = "off";
# Fix this build error:
# main module (github.com/glauth/glauth/v2) does not contain package github.com/glauth/glauth/v2/vendored/toml
excludedPackages = [ "vendored/toml" ];
# Based on ldflags in <glauth>/Makefile.
ldflags = [
"-s"
"-w"
"-X main.GitClean=1"
"-X main.LastGitTag=v${version}"
"-X main.GitTagIsCommit=1"
];
# Tests fail in the sandbox.
doCheck = false;
meta = with lib; {
description = "A lightweight LDAP server for development, home use, or CI";
homepage = "https://github.com/glauth/glauth";
license = licenses.mit;
maintainers = with maintainers; [ bjornfor ];
mainProgram = "glauth";
};
}

View File

@ -0,0 +1,31 @@
{ lib
, buildPackages
, hare
, runCommandNoCC
, stdenv
, writeText
}:
let
inherit (stdenv.hostPlatform.uname) processor;
inherit (stdenv.hostPlatform) emulator;
mainDotHare = writeText "main.ha" ''
use fmt;
use os;
export fn main() void = {
const machine = os::machine();
if (machine == "${processor}") {
fmt::println("os::machine() matches ${processor}")!;
} else {
fmt::fatalf("os::machine() does not match ${processor}: {}", machine);
};
};
'';
in
runCommandNoCC "${hare.pname}-cross-compilation-test" { meta.timeout = 60; } ''
HARECACHE="$(mktemp -d --tmpdir harecache.XXXXXXXX)"
export HARECACHE
outbin="test-${processor}"
${lib.getExe hare} build -q -a "${processor}" -o "$outbin" ${mainDotHare}
${emulator buildPackages} "./$outbin"
: 1>$out
''

View File

@ -8,15 +8,55 @@
, scdoc
, tzdata
, substituteAll
, callPackage
, enableCrossCompilation ? (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.is64bit)
, pkgsCross
, x86_64PkgsCrossToolchain ? pkgsCross.gnu64
, aarch64PkgsCrossToolchain ? pkgsCross.aarch64-multiplatform
, riscv64PkgsCrossToolchain ? pkgsCross.riscv64
}:
# There's no support for `aarch64-freebsd` or `riscv64-freebsd` on nix.
# See `lib.systems.doubles.aarch64` and `lib.systems.doubles.riscv64`.
assert let
inherit (stdenv.hostPlatform) isLinux is64bit;
inherit (lib) intersectLists platforms concatStringsSep;
workingPlatforms = intersectLists platforms.linux (with platforms; x86_64 ++ aarch64 ++ riscv64);
in
(enableCrossCompilation -> !(isLinux && is64bit))
-> builtins.throw ''
The cross-compilation toolchains may only be enabled on the following platforms:
${concatStringsSep "\n" workingPlatforms}
'';
let
# We use harec's override of qbe until 1.2 is released, but the `qbe` argument
# is kept to avoid breakage.
qbe = harec.qbeUnstable;
# https://harelang.org/platforms/
arch = stdenv.hostPlatform.uname.processor;
platform = lib.strings.toLower stdenv.hostPlatform.uname.system;
platform = lib.toLower stdenv.hostPlatform.uname.system;
embeddedOnBinaryTools =
let
genToolsFromToolchain = toolchain:
let
crossTargetPrefix = toolchain.stdenv.cc.targetPrefix;
toolchainArch = toolchain.stdenv.hostPlatform.uname.processor;
absOrRelPath = toolDrv: toolBasename:
if arch == toolchainArch then toolBasename
else lib.getExe' toolDrv "${crossTargetPrefix}${toolBasename}";
in
{
"ld" = absOrRelPath toolchain.buildPackages.binutils "ld";
"as" = absOrRelPath toolchain.buildPackages.binutils "as";
"cc" = absOrRelPath toolchain.stdenv.cc "cc";
};
in
{
x86_64 = genToolsFromToolchain x86_64PkgsCrossToolchain;
aarch64 = genToolsFromToolchain aarch64PkgsCrossToolchain;
riscv64 = genToolsFromToolchain riscv64PkgsCrossToolchain;
};
in
stdenv.mkDerivation (finalAttrs: {
pname = "hare";
@ -58,6 +98,19 @@ stdenv.mkDerivation (finalAttrs: {
"PREFIX=${builtins.placeholder "out"}"
"PLATFORM=${platform}"
"ARCH=${arch}"
# Strip the variable of an empty $(SRCDIR)/hare/third-party, since nix does
# not follow the FHS.
"HAREPATH=$(SRCDIR)/hare/stdlib"
] ++ lib.optionals enableCrossCompilation [
"RISCV64_AS=${embeddedOnBinaryTools.riscv64.as}"
"RISCV64_CC=${embeddedOnBinaryTools.riscv64.cc}"
"RISCV64_LD=${embeddedOnBinaryTools.riscv64.ld}"
"AARCH64_AS=${embeddedOnBinaryTools.aarch64.as}"
"AARCH64_CC=${embeddedOnBinaryTools.aarch64.cc}"
"AARCH64_LD=${embeddedOnBinaryTools.aarch64.ld}"
"x86_64_AS=${embeddedOnBinaryTools.x86_64.as}"
"x86_64_CC=${embeddedOnBinaryTools.x86_64.cc}"
"x86_64_LD=${embeddedOnBinaryTools.x86_64.ld}"
];
enableParallelBuilding = true;
@ -80,6 +133,14 @@ stdenv.mkDerivation (finalAttrs: {
setupHook = ./setup-hook.sh;
passthru = {
tests = lib.optionalAttrs enableCrossCompilation {
crossCompilation = callPackage ./cross-compilation-tests.nix {
hare = finalAttrs.finalPackage;
};
};
};
meta = {
homepage = "https://harelang.org/";
description = "Systems programming language designed to be simple, stable, and robust";

View File

@ -0,0 +1,65 @@
{ lib
, stdenv
, fetchFromGitHub
, autoreconfHook
, pkg-config
, SDL2
, alsa-lib
, ffmpeg
, lua5_3
, qt5
, file
, makeDesktopItem
}:
stdenv.mkDerivation (finalAttrs: {
pname = "libtas";
version = "1.4.5";
src = fetchFromGitHub {
owner = "clementgallet";
repo = "libTAS";
rev = "v${finalAttrs.version}";
hash = "sha256-n4iaJG9k+/TFfGMDCYL83Z6paxpm/gY3thP9T84GeQU=";
};
nativeBuildInputs = [ autoreconfHook qt5.wrapQtAppsHook pkg-config ];
buildInputs = [ SDL2 alsa-lib ffmpeg lua5_3 qt5.qtbase ];
configureFlags = [
"--enable-release-build"
];
postInstall = ''
mkdir -p $out/lib
mv $out/bin/libtas*.so $out/lib/
'';
enableParallelBuilding = true;
postFixup = ''
wrapProgram $out/bin/libTAS \
--suffix PATH : ${lib.makeBinPath [ file ]} \
--set-default LIBTAS_SO_PATH $out/lib/libtas.so
'';
desktopItems = [
(makeDesktopItem {
name = "libTAS";
desktopName = "libTAS";
exec = "libTAS %U";
icon = "libTAS";
startupWMClass = "libTAS";
keywords = [ "libTAS" ];
})
];
meta = with lib; {
homepage = "https://clementgallet.github.io/libTAS/";
description = "GNU/Linux software to give TAS tools to games";
license = lib.licenses.gpl3Only;
maintainers = with maintainers; [ skyrina ];
mainProgram = "libTAS";
platforms = [ "i686-linux" "x86_64-linux" ];
};
})

View File

@ -0,0 +1,61 @@
{ lib
, cargo
, desktop-file-utils
, fetchFromGitLab
, glib
, gtk4
, libadwaita
, meson
, ninja
, pkg-config
, rustPlatform
, rustc
, stdenv
, wrapGAppsHook4
}:
stdenv.mkDerivation rec {
pname = "lorem";
version = "1.3";
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "World/design";
repo = pname;
rev = version;
hash = "sha256-+Dp/o1rZSHWihLLLe6CzV6c7uUnSsE8Ct3tbLNqlGF0=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-YYjPhlPp211i+ECPu1xgDumz8nVqWRO8YzcZXy8uunI=";
};
nativeBuildInputs = [
cargo
desktop-file-utils
meson
ninja
pkg-config
rustPlatform.cargoSetupHook
rustc
wrapGAppsHook4
];
buildInputs = [
glib
gtk4
libadwaita
];
meta = with lib; {
description = "Generate placeholder text";
homepage = "https://gitlab.gnome.org/World/design/lorem";
changelog = "https://gitlab.gnome.org/World/design/lorem/-/releases/${version}";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ michaelgrahamevans ];
mainProgram = "lorem";
platforms = platforms.linux;
};
}

View File

@ -1,6 +1,7 @@
{ lib
, buildGoModule
, fetchFromGitHub
, fetchpatch
, nix-update-script
}:
@ -15,6 +16,14 @@ buildGoModule rec {
hash = "sha256-crWepf5j3Gd1lhya2DGIh/to7l+AnjKJPR+qUd9WOzw=";
};
patches = [
# create migration touch file, remove > 0.4.0
(fetchpatch {
url = "https://github.com/lxc/incus/commit/edc5fd2a9baccfb7b6814a440e2947cbb580afcf.diff";
hash = "sha256-ffQfMFrKDPuLU4jVbG/VGHSO3DmeHw30ATJ8yxJAoHQ=";
})
];
modRoot = "cmd/lxd-to-incus";
vendorHash = "sha256-cBAqJz3Y4CqyxTt7u/4mXoQPKmKgQ3gYJV1NiC/H+TA=";

View File

@ -0,0 +1,50 @@
{ lib
, stdenv
, fetchFromGitHub
, pkg-config
, libevdev
, kmod
, bash
, installShellFiles
}:
let
pname = "modprobed-db";
version = "2.46";
in
stdenv.mkDerivation {
inherit pname version;
src = fetchFromGitHub {
owner = "graysky2";
repo = "modprobed-db";
rev = "v${version}";
hash = "sha256-GQME5CAZsGVHSPowKQMyUR7OjHeFZi/5YcWFUT9L/AQ=";
};
strictDeps = true;
nativeBuildInputs = [ pkg-config installShellFiles ];
buildInputs = [ kmod libevdev bash ];
installFlags = [
"PREFIX=$(out)"
"INITDIR_SYSTEMD=$(out)/lib/systemd/user"
];
postPatch = ''
substituteInPlace ./common/modprobed-db.in \
--replace "/usr/share" "$out/share"
'';
postInstall = ''
installShellCompletion --zsh common/zsh-completion
'';
meta = {
homepage = "https://github.com/graysky2/modprobed-db";
description = "Useful utility for users wishing to build a minimal kernel via a make localmodconfig";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ NotAShelf ];
mainProgram = "modprobed-db";
platforms = lib.platforms.linux;
};
}

View File

@ -11,13 +11,13 @@
buildDotnetModule rec {
pname = "naps2";
version = "7.2.2";
version = "7.3.0";
src = fetchFromGitHub {
owner = "cyanfish";
repo = "naps2";
rev = "v${version}";
hash = "sha256-ikt0gl/pNjEaENj1WRLdn/Zvx349FAGpzSV62Y2GwXI=";
hash = "sha256-aR4IDPfcbWWyM+1MhSWIsNUNLi43MvbWBykoEkVbe+4=";
};
projectFile = "NAPS2.App.Gtk/NAPS2.App.Gtk.csproj";

View File

@ -405,6 +405,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3362992a0d9f1dd7c3d0e89e0ab2bb540b7a95fea8cd798090e758fda2899b5e"
dependencies = [
"codespan-reporting",
"serde",
]
[[package]]
@ -424,6 +425,7 @@ version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e"
dependencies = [
"serde",
"termcolor",
"unicode-width",
]
@ -1642,7 +1644,7 @@ dependencies = [
[[package]]
name = "nickel-lang-cli"
version = "1.3.0"
version = "1.4.0"
dependencies = [
"clap 4.4.7",
"clap_complete",
@ -1660,7 +1662,7 @@ dependencies = [
[[package]]
name = "nickel-lang-core"
version = "0.3.0"
version = "0.4.0"
dependencies = [
"ansi_term",
"assert_matches",
@ -1706,7 +1708,7 @@ dependencies = [
"toml",
"topiary",
"topiary-queries",
"tree-sitter-nickel 0.1.0",
"tree-sitter-nickel",
"typed-arena",
"unicode-segmentation",
"void",
@ -1715,7 +1717,7 @@ dependencies = [
[[package]]
name = "nickel-lang-lsp"
version = "1.3.0"
version = "1.4.0"
dependencies = [
"anyhow",
"assert_cmd",
@ -1760,7 +1762,7 @@ dependencies = [
[[package]]
name = "nickel-wasm-repl"
version = "0.3.0"
version = "0.4.0"
dependencies = [
"nickel-lang-core",
]
@ -2106,7 +2108,7 @@ dependencies = [
[[package]]
name = "pyckel"
version = "1.3.0"
version = "1.4.0"
dependencies = [
"codespan-reporting",
"nickel-lang-core",
@ -2984,8 +2986,8 @@ dependencies = [
[[package]]
name = "topiary"
version = "0.2.3"
source = "git+https://github.com/tweag/topiary.git?rev=8299a04bf83c4a2774cbbff7a036c022efa939b3#8299a04bf83c4a2774cbbff7a036c022efa939b3"
version = "0.3.0"
source = "git+https://github.com/tweag/topiary.git?rev=9ae9ef49c2fa968d15107b817864ff6627e0983e#9ae9ef49c2fa968d15107b817864ff6627e0983e"
dependencies = [
"clap 4.4.7",
"futures",
@ -3001,7 +3003,7 @@ dependencies = [
"tree-sitter-bash",
"tree-sitter-facade",
"tree-sitter-json",
"tree-sitter-nickel 0.0.1",
"tree-sitter-nickel",
"tree-sitter-ocaml",
"tree-sitter-ocamllex",
"tree-sitter-query",
@ -3013,8 +3015,8 @@ dependencies = [
[[package]]
name = "topiary-queries"
version = "0.2.3"
source = "git+https://github.com/tweag/topiary.git?rev=8299a04bf83c4a2774cbbff7a036c022efa939b3#8299a04bf83c4a2774cbbff7a036c022efa939b3"
version = "0.3.0"
source = "git+https://github.com/tweag/topiary.git?rev=9ae9ef49c2fa968d15107b817864ff6627e0983e#9ae9ef49c2fa968d15107b817864ff6627e0983e"
[[package]]
name = "tree-sitter"
@ -3056,20 +3058,10 @@ dependencies = [
"tree-sitter",
]
[[package]]
name = "tree-sitter-nickel"
version = "0.0.1"
source = "git+https://github.com/nickel-lang/tree-sitter-nickel?rev=b1a4718601ebd29a62bf3a7fd1069a99ccf48093#b1a4718601ebd29a62bf3a7fd1069a99ccf48093"
dependencies = [
"cc",
"tree-sitter",
]
[[package]]
name = "tree-sitter-nickel"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e95267764f0648c768e4da3e4c31b96bc5716446497dfa8b6296924b149f64a"
source = "git+https://github.com/nickel-lang/tree-sitter-nickel?rev=091b5dcc7d138901bcc162da9409c0bb626c0d27#091b5dcc7d138901bcc162da9409c0bb626c0d27"
dependencies = [
"cc",
"tree-sitter",
@ -3078,7 +3070,7 @@ dependencies = [
[[package]]
name = "tree-sitter-ocaml"
version = "0.20.4"
source = "git+https://github.com/tree-sitter/tree-sitter-ocaml.git#694c57718fd85d514f8b81176038e7a4cfabcaaf"
source = "git+https://github.com/tree-sitter/tree-sitter-ocaml.git#4abfdc1c7af2c6c77a370aee974627be1c285b3b"
dependencies = [
"cc",
"tree-sitter",
@ -3105,7 +3097,7 @@ dependencies = [
[[package]]
name = "tree-sitter-rust"
version = "0.20.4"
source = "git+https://github.com/tree-sitter/tree-sitter-rust.git#48e053397b587de97790b055a1097b7c8a4ef846"
source = "git+https://github.com/tree-sitter/tree-sitter-rust.git#79456e6080f50fc1ca7c21845794308fa5d35a51"
dependencies = [
"cc",
"tree-sitter",
@ -3197,9 +3189,9 @@ checksum = "e1766d682d402817b5ac4490b3c3002d91dfa0d22812f341609f97b08757359c"
[[package]]
name = "unsafe-libyaml"
version = "0.2.9"
version = "0.2.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f28467d3e1d3c6586d8f25fa243f544f5800fec42d97032474e17222c2b75cfa"
checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b"
[[package]]
name = "url"
@ -3566,18 +3558,18 @@ checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec"
[[package]]
name = "zerocopy"
version = "0.7.18"
version = "0.7.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ede7d7c7970ca2215b8c1ccf4d4f354c4733201dfaaba72d44ae5b37472e4901"
checksum = "1c4061bedbb353041c12f413700357bec76df2c7e2ca8e4df8bac24c6bf68e3d"
dependencies = [
"zerocopy-derive",
]
[[package]]
name = "zerocopy-derive"
version = "0.7.18"
version = "0.7.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4b27b1bb92570f989aac0ab7e9cbfbacdd65973f7ee920d9f0e71ebac878fd0b"
checksum = "b3c129550b3e6de3fd0ba67ba5c81818f9805e58b8d7fee80a3a59d2c9fc601a"
dependencies = [
"proc-macro2 1.0.69",
"quote 1.0.33",

View File

@ -8,28 +8,28 @@
rustPlatform.buildRustPackage rec {
pname = "nickel";
version = "1.3.0";
version = "1.4.0";
src = fetchFromGitHub {
owner = "tweag";
repo = "nickel";
rev = "refs/tags/${version}";
hash = "sha256-MBonps3yFEpw9l3EAJ6BXNNjY2fUGzWCP+7h0M8LEAY=";
hash = "sha256-YPS+Szj0T8mbcrYBdAuoQupv1x0EIq4rFS2Wk5oYVsY=";
};
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"topiary-0.2.3" = "sha256-EgDFjJeGJb36je/be7DXvzvpBYDUaupOiQxtL7bN/+Q=";
"topiary-0.3.0" = "sha256-1leQLRohX0iDiOOO96ETM2L3yOElW8OwR5IcrsoxfOo=";
"tree-sitter-bash-0.20.4" = "sha256-VP7rJfE/k8KV1XN1w5f0YKjCnDMYU1go/up0zj1mabM=";
"tree-sitter-facade-0.9.3" = "sha256-M/npshnHJkU70pP3I4WMXp3onlCSWM5mMIqXP45zcUs=";
"tree-sitter-nickel-0.0.1" = "sha256-aYsEx1Y5oDEqSPCUbf1G3J5Y45ULT9OkD+fn6stzrOU=";
"tree-sitter-nickel-0.1.0" = "sha256-HyHdameEgET5UXKMgw7EJvZsJxToc9Qz26XHvc5qmU0=";
"tree-sitter-query-0.1.0" = "sha256-5N7FT0HTK3xzzhAlk3wBOB9xlEpKSNIfakgFnsxEi18=";
"tree-sitter-json-0.20.1" = "sha256-Msnct7JzPBIR9+PIBZCJTRdVMUzhaDTKkl3JaDUKAgo=";
"tree-sitter-ocaml-0.20.4" = "sha256-j3Hv2qOMxeBNOW+WIgIYzG3zMIFWPQpoHe94b2rT+A8=";
"tree-sitter-ocaml-0.20.4" = "sha256-ycmjIKfrsVSVHmPP3HCxfk5wcBIF/JFH8OnU8mY1Cc8=";
"tree-sitter-ocamllex-0.20.2" = "sha256-YhmEE7I7UF83qMuldHqc/fD/no/7YuZd6CaAIaZ1now=";
"tree-sitter-toml-0.5.1" = "sha256-5nLNBxFeOGE+gzbwpcrTVnuL1jLUA0ZLBVw2QrOLsDQ=";
"tree-sitter-rust-0.20.4" = "sha256-ht0l1a3esvBbVHNbUosItmqxwL7mDp+QyhIU6XTUiEk=";
"tree-sitter-rust-0.20.4" = "sha256-57CuGp7gP+AVYIR3HbMXnmmSAbtlpWrOHRYpMbmWfds=";
"web-tree-sitter-sys-1.3.0" = "sha256-9rKB0rt0y9TD/HLRoB9LjEP9nO4kSWR9ylbbOXo2+2M=";
};

View File

@ -8,13 +8,13 @@
buildNimPackage (finalAttrs: prevAttrs: {
pname = "nitter";
version = "unstable-2023-12-03";
version = "unstable-2024-01-12";
src = fetchFromGitHub {
owner = "zedeus";
repo = "nitter";
rev = "583c858cdf3486451ed6a0627640844f27009dbe";
hash = "sha256-3E6nfmOFhQ2bjwGMWdTmZ38Fg/SE36s6fxYDXwSJaTw=";
rev = "52db03b73ad5f83f67c83ab197ae3b20a2523d39";
hash = "sha256-Jp8iix6VUeepigGx+eeJUTQeZfSJ3tSc/TAa5AMfG2U=";
};
lockFile = ./lock.json;

Some files were not shown because too many files have changed in this diff Show More